Skip to content

Commit

Permalink
Merge pull request #60 from route4me/v1.0.3
Browse files Browse the repository at this point in the history
V1.0.3
  • Loading branch information
h2rd authored Mar 23, 2022
2 parents 75a3529 + 5febe1a commit 8fc4867
Show file tree
Hide file tree
Showing 45 changed files with 694 additions and 249 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
/bower_components/*
/dev/
/coverage/
/examples/*
/test/*
16 changes: 12 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ exports = module.exports = {
"dot-notation": "off",

// code style
"arrow-parens": ["error", "as-needed", { "requireForBlockBody": true }],
"indent": ["warn", "tab"],
"max-classes-per-file": ["error", 15],
"no-else-return": ["error", { "allowElseIf": true }],
"no-tabs": "off",
"import/no-useless-path-segments": "off",
"semi": ["error", "never"],
"yoda": ["error", "always"],
"no-multi-spaces": "off", // TODO: stop ignoring, set a rule
Expand All @@ -36,7 +40,11 @@ exports = module.exports = {

// TODO: this is LINT rules for DOC. `Use with npm install eslint-plugin-jsdoc`
//"jsdoc/check-param-names": 1,
"jsdoc/check-tag-names": "warn",
//"jsdoc/check-tag-names": "warn",
"jsdoc/check-tag-names": [
"warn",
{ "definedTags": ["category", "tag"] }
],
// "jsdoc/check-types": 1,
// "jsdoc/newline-after-description": 1,
// "jsdoc/require-description-complete-sentence": 1,
Expand All @@ -51,9 +59,9 @@ exports = module.exports = {
"jsdoc": {
"tagNamePreference": {
"returns": "return"
},
"additionalTagNames": {
"customTags": ["category", "tag"]
// },
// "additionalTagNames": {
// "customTags": ["category", "tag"]
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@
/build

# Coverage directory used by tools like istanbul
.coverdata
.coverrun
/coverage
/lib-cov

npm-debug.log*
/logs
*.log
testem.log
.nyc_output

# =========================================
10 changes: 10 additions & 0 deletions .mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict'

module.exports = {
reporter: "spec",
recursive: true,
checkLeaks: true,
ui: "bdd",
require: ["test/bootstrap"],
spec: ["test/**/*.spec.js", "test/**/*.test.js"]
};
50 changes: 47 additions & 3 deletions book/en/code/ActivityFeed.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
<a id="ActivityFeed" name="ActivityFeed"></a>

## ActivityFeed
## ActivityFeed

ActivityFeed facility

**Category**: ActivityFeed
**Access**: private
**See**: [https://route4me.io/docs/#activity-feed](https://route4me.io/docs/#activity-feed)
**Since**: 0.1.12

* [ActivityFeed](#ActivityFeed)
* [ActivityFeed](#ActivityFeed)
* [new ActivityFeed(requestManager)](#new_ActivityFeed_new)
* [.ActivityTypeEnum](#ActivityFeed+ActivityTypeEnum)
* [.create(data, [callback])](#ActivityFeed+create)
* [.list(criteria, [options], [callback])](#ActivityFeed+list)
* [.getactivities_example(data, [callback])](#ActivityFeed+getactivities_example)
* [.logcustomactivity(data, [callback])](#ActivityFeed+logcustomactivity)

<a id="new_ActivityFeed_new" name="new_ActivityFeed_new"></a>

### new ActivityFeed(requestManager)

Constructor

**Returns**: [<code>ActivityFeed</code>](#ActivityFeed) - - ActivityFeed facility

| Param | Type | Description |
| --- | --- | --- |
Expand Down Expand Up @@ -74,7 +80,7 @@ two-way chat.

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| criteria | <code>string</code> &#124; <code>Object</code> | | Criteria for event filter. Depending on type will be considered as: * `string` - criteria is a string representation of [Activity type](ActivityTypeEnum) * `Object` - criteria is a set of filters, see below |
| criteria | <code>string</code> \| <code>Object</code> | | Criteria for event filter. Depending on type will be considered as: * `string` - criteria is a string representation of [Activity type](ActivityTypeEnum) * `Object` - criteria is a set of filters, see below |
| [criteria.activityType] | <code>string</code> | | [Activity type](ActivityTypeEnum) |
| [criteria.routeId] | <code>string</code> | | Route ID |
| [options] | <code>Object</code> | | Options for activity search |
Expand All @@ -83,3 +89,41 @@ two-way chat.
| [options.includeTeamActivities] | <code>boolean</code> | <code>false</code> | Indicate, whether team activities should be included |
| [callback] | <code>module:route4me-node~RequestCallback.&lt;jsonschema:ActivityFeed.ActivityFeedResult&gt;</code> | | |

<a id="ActivityFeed+getactivities_example" name="ActivityFeed+getactivities_example"></a>

### activityFeed.getactivities\_example(data, [callback])

Log a Specific Message

This example demonstrates how to permanently store a specific message
directly to the activity feed. For example, this can be used for one or
two-way chat.

**The created activity will have `activityType === "user_message"`**

**See**: [https://route4me.io/docs/#activity-feed](https://route4me.io/docs/#activity-feed)

| Param | Type | Description |
| --- | --- | --- |
| data | <code>Object</code> | Activity Feed parameter |
| [callback] | <code>module:route4me-node~RequestCallback.&lt;jsonschema:Routes.Route&gt;</code> | |

<a id="ActivityFeed+logcustomactivity" name="ActivityFeed+logcustomactivity"></a>

### activityFeed.logcustomactivity(data, [callback])

Log a Specific Message

This example demonstrates how to permanently store a specific message
directly to the activity feed. For example, this can be used for one or
two-way chat.

**The created activity will have `activityType === "user_message"`**

**See**: [https://route4me.io/docs/#activity-feed](https://route4me.io/docs/#activity-feed)

| Param | Type | Description |
| --- | --- | --- |
| data | <code>Object</code> | Activity Feed parameter |
| [callback] | <code>module:route4me-node~RequestCallback.&lt;jsonschema:Routes.Route&gt;</code> | |

12 changes: 8 additions & 4 deletions book/en/code/AddressBook.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<a id="AddressBook" name="AddressBook"></a>

## AddressBook
## AddressBook

AddressBook facility

**Category**: AddressBook
**Access**: private
**See**: [https://route4me.io/docs/#address-book](https://route4me.io/docs/#address-book)
**Since**: 0.1.8

* [AddressBook](#AddressBook)
* [AddressBook](#AddressBook)
* [new AddressBook(requestManager)](#new_AddressBook_new)
* [.create(data, [callback])](#AddressBook+create)
* [.getMany(ids, [callback])](#AddressBook+getMany)
Expand All @@ -21,6 +24,7 @@ AddressBook facility

Constructor

**Returns**: [<code>AddressBook</code>](#AddressBook) - - AddressBook facility

| Param | Type | Description |
| --- | --- | --- |
Expand Down Expand Up @@ -56,7 +60,7 @@ GET locations from an address book by a specified list of locations IDs.

| Param | Type | Description |
| --- | --- | --- |
| ids | <code>number</code> &#124; <code>string</code> &#124; <code>Array.&lt;number&gt;</code> &#124; <code>Array.&lt;string&gt;</code> | Address IDs (as number, string, CSV-separated string, or an array of numbers, or an array of strings). |
| ids | <code>number</code> \| <code>string</code> \| <code>Array.&lt;number&gt;</code> \| <code>Array.&lt;string&gt;</code> | Address IDs (as number, string, CSV-separated string, or an array of numbers, or an array of strings). |
| [callback] | <code>module:route4me-node~RequestCallback.&lt;jsonschema:AddressBook.AddressBookSearchResult&gt;</code> | |

<a id="AddressBook+list" name="AddressBook+list"></a>
Expand Down Expand Up @@ -140,7 +144,7 @@ REMOVE locations from an address book.

| Param | Type | Description |
| --- | --- | --- |
| ids | <code>number</code> &#124; <code>string</code> &#124; <code>Array.&lt;number&gt;</code> &#124; <code>Array.&lt;string&gt;</code> | locations IDs, CSV-string OR one ID as string OR one ID as number OR array of strings/numbers |
| ids | <code>number</code> \| <code>string</code> \| <code>Array.&lt;number&gt;</code> \| <code>Array.&lt;string&gt;</code> | locations IDs, CSV-string OR one ID as string OR one ID as number OR array of strings/numbers |
| [callback] | <code>module:route4me-node~RequestCallback.&lt;boolean&gt;</code> | |

**Example**
Expand Down
8 changes: 6 additions & 2 deletions book/en/code/Addresses.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<a id="Addresses" name="Addresses"></a>

## Addresses
## Addresses

Addresses facility

**Category**: Addresses
**Access**: private
**See**: [https://route4me.io/docs/#addresses](https://route4me.io/docs/#addresses)
**Since**: 0.1.8

* [Addresses](#Addresses)
* [Addresses](#Addresses)
* [new Addresses(requestManager)](#new_Addresses_new)
* [.get(id, routeId, [options], [callback])](#Addresses+get)
* [.updateCustomData(id, routeId, customFields, [callback])](#Addresses+updateCustomData)
Expand All @@ -21,6 +24,7 @@ Addresses facility

Constructor

**Returns**: [<code>Addresses</code>](#Addresses) - - Addresses facility

| Param | Type | Description |
| --- | --- | --- |
Expand Down
8 changes: 6 additions & 2 deletions book/en/code/AvoidanceZones.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<a id="AvoidanceZones" name="AvoidanceZones"></a>

## AvoidanceZones
## AvoidanceZones

AvoidanceZones facility

**Category**: AvoidanceZones
**Access**: private
**See**: [https://route4me.io/docs/#avoidance-zones](https://route4me.io/docs/#avoidance-zones)
**Since**: 0.1.8

* [AvoidanceZones](#AvoidanceZones)
* [AvoidanceZones](#AvoidanceZones)
* [new AvoidanceZones(requestManager)](#new_AvoidanceZones_new)
* [.create(data, [callback])](#AvoidanceZones+create)
* [.get(id, [callback])](#AvoidanceZones+get)
Expand All @@ -20,6 +23,7 @@ AvoidanceZones facility

Constructor

**Returns**: [<code>AvoidanceZones</code>](#AvoidanceZones) - - AvoidanceZones facility

| Param | Type | Description |
| --- | --- | --- |
Expand Down
13 changes: 9 additions & 4 deletions book/en/code/Errors.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<a id="Route4MeError" name="Route4MeError"></a>

## Route4MeError
## Route4MeError

The base type for all error-objects of this SDK

**Category**: Errors
**Access**: private
<a id="new_Route4MeError_new" name="new_Route4MeError_new"></a>

### new Route4MeError(msg, innerError)

Create Route4MeError

**Returns**: [<code>Route4MeError</code>](#Route4MeError) - [description]

| Param | Type | Description |
| --- | --- | --- |
Expand All @@ -19,17 +21,19 @@ Create Route4MeError

<a id="Route4MeApiError" name="Route4MeApiError"></a>

## Route4MeApiError
## Route4MeApiError

Error received from the API-server

**Category**: Errors
**Access**: private
<a id="new_Route4MeApiError_new" name="new_Route4MeApiError_new"></a>

### new Route4MeApiError(msg, res, innerError)

Create Route4MeApiError

**Returns**: [<code>Route4MeApiError</code>](#Route4MeApiError) - [description]

| Param | Type | Description |
| --- | --- | --- |
Expand All @@ -39,13 +43,14 @@ Create Route4MeApiError

<a id="Route4MeValidationError" name="Route4MeValidationError"></a>

## Route4MeValidationError
## Route4MeValidationError

Error occured during internal validation

**Category**: Errors
**Access**: private

* [Route4MeValidationError](#Route4MeValidationError)
* [Route4MeValidationError](#Route4MeValidationError)
* [new Route4MeValidationError(msg, data, innerError)](#new_Route4MeValidationError_new)
* [.data](#Route4MeValidationError+data) : <code>\*</code>

Expand Down
12 changes: 8 additions & 4 deletions book/en/code/Geocoding.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<a id="Geocoding" name="Geocoding"></a>

## Geocoding
## Geocoding

Geocoding facility

**Category**: Geocoding
**Access**: private
**See**: [https://route4me.io/docs/#geocoding](https://route4me.io/docs/#geocoding)
**Since**: 0.1.9

* [Geocoding](#Geocoding)
* [Geocoding](#Geocoding)
* [new Geocoding(requestManager)](#new_Geocoding_new)
* [.forward(address, [callback])](#Geocoding+forward)
* [.reverse(latitude, longitude, [callback])](#Geocoding+reverse)
Expand All @@ -19,6 +22,7 @@ Geocoding facility

Constructor

**Returns**: [<code>Geocoding</code>](#Geocoding) - - Geocoding facility

| Param | Type | Description |
| --- | --- | --- |
Expand Down Expand Up @@ -103,8 +107,8 @@ Rapid Address Search
| Param | Type | Description |
| --- | --- | --- |
| criteria | <code>Object</code> | Search criterias, such as `zipcode`, `house number` and other |
| [criteria.zipCode] | <code>number</code> &#124; <code>string</code> | Zip code of the area |
| [criteria.houseNumber] | <code>number</code> &#124; <code>string</code> | House number |
| [criteria.zipCode] | <code>number</code> \| <code>string</code> | Zip code of the area |
| [criteria.houseNumber] | <code>number</code> \| <code>string</code> | House number |
| options | <code>Object</code> | Search parameters |
| [options.offset] | <code>number</code> | Start search position |
| [options.limit] | <code>number</code> | Search results limitation |
Expand Down
8 changes: 6 additions & 2 deletions book/en/code/Members.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<a id="Members" name="Members"></a>

## Members
## Members

Members facility

**Category**: Members
**Access**: private
**See**: [https://route4me.io/docs/#territories](https://route4me.io/docs/#territories)
**Since**: 0.1.8

* [Members](#Members)
* [Members](#Members)
* [new Members(requestManager)](#new_Members_new)
* [.create(data, [callback])](#Members+create)
* [.list([callback])](#Members+list)
Expand All @@ -23,6 +26,7 @@ Members facility

Constructor

**Returns**: [<code>Members</code>](#Members) - - Members facility

| Param | Type | Description |
| --- | --- | --- |
Expand Down
8 changes: 6 additions & 2 deletions book/en/code/Notes.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<a id="Notes" name="Notes"></a>

## Notes
## Notes

Notes facility

**Category**: Notes
**Access**: private
**See**: [https://route4me.io/docs/#tracking](https://route4me.io/docs/#tracking)
**Since**: 0.1.9

* [Notes](#Notes)
* [Notes](#Notes)
* [new Notes(requestManager)](#new_Notes_new)
* [.create(data, [callback])](#Notes+create)

Expand All @@ -16,6 +19,7 @@ Notes facility

Constructor

**Returns**: [<code>Notes</code>](#Notes) - - Notes facility

| Param | Type | Description |
| --- | --- | --- |
Expand Down
Loading

0 comments on commit 8fc4867

Please sign in to comment.