btrz-api-client 8.34.0 → 8.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client-standalone-min.js +3 -3
- package/lib/client.js +4 -0
- package/lib/endpoints/inventory/banks.js +39 -21
- package/lib/endpoints/inventory/change-requests.js +59 -31
- package/lib/endpoints/inventory/control-classes.js +39 -20
- package/lib/endpoints/inventory/countries.js +25 -9
- package/lib/endpoints/inventory/custom-content.js +38 -21
- package/lib/endpoints/inventory/custom-fields.js +25 -17
- package/lib/endpoints/inventory/document-types.js +33 -42
- package/lib/endpoints/inventory/external-wallets.js +26 -20
- package/lib/endpoints/inventory/fees.js +24 -17
- package/lib/endpoints/inventory/filtered-trips.js +34 -8
- package/lib/endpoints/inventory/financing-costs.js +19 -14
- package/lib/endpoints/inventory/garages.js +19 -14
- package/lib/endpoints/inventory/getnet-terminals.js +20 -15
- package/lib/endpoints/inventory/gift-certificate-definitions.js +10 -5
- package/lib/endpoints/inventory/holidays.js +158 -0
- package/lib/endpoints/inventory/insurances.js +17 -13
- package/lib/endpoints/inventory/items.js +13 -9
- package/lib/endpoints/inventory/labels.js +16 -11
- package/lib/endpoints/inventory/marital-status.js +16 -11
- package/lib/endpoints/inventory/marketplace-modifiers.js +16 -11
- package/lib/endpoints/inventory/mit-terminal-settings.js +15 -10
- package/lib/endpoints/inventory/mit-terminals.js +16 -11
- package/lib/endpoints/inventory/operation-messages.js +18 -12
- package/lib/endpoints/inventory/operation-reasons.js +15 -10
- package/lib/endpoints/inventory/pay-on-accounts.js +5 -4
- package/lib/endpoints/inventory/payment-terminals.js +15 -10
- package/lib/endpoints/inventory/products.js +22 -10
- package/lib/endpoints/inventory/promos.js +27 -18
- package/lib/endpoints/inventory/station-groups.js +2 -4
- package/lib/endpoints/inventory/taxes.js +11 -2
- package/lib/endpoints/inventory/traveller-card-providers-types.js +6 -6
- package/lib/endpoints/inventory/vehicle-types.js +2 -5
- package/lib/endpoints/inventory/vehicles.js +4 -2
- package/lib/endpoints/notifications/customers.js +1 -1
- package/lib/endpoints/notifications/external-customers.js +54 -0
- package/lib/endpoints/notifications/pdfs.js +0 -3
- package/lib/endpoints/operations/accounting_items.js +7 -1
- package/lib/endpoints/operations/flexpasses.js +9 -7
- package/lib/endpoints/operations/gift-certificates.js +53 -0
- package/lib/endpoints/operations/loans.js +16 -10
- package/lib/endpoints/operations/movements.js +17 -6
- package/lib/endpoints/operations/pago-express.js +96 -0
- package/lib/endpoints/operations/parcels.js +11 -11
- package/lib/endpoints/operations/parcels_manifests.js +7 -4
- package/package.json +1 -1
- package/src/client.js +4 -0
- package/src/endpoints/inventory/banks.js +39 -21
- package/src/endpoints/inventory/change-requests.js +59 -31
- package/src/endpoints/inventory/control-classes.js +39 -20
- package/src/endpoints/inventory/countries.js +25 -10
- package/src/endpoints/inventory/custom-content.js +38 -22
- package/src/endpoints/inventory/custom-fields.js +25 -19
- package/src/endpoints/inventory/document-types.js +34 -33
- package/src/endpoints/inventory/external-wallets.js +25 -20
- package/src/endpoints/inventory/fees.js +24 -18
- package/src/endpoints/inventory/filtered-trips.js +29 -8
- package/src/endpoints/inventory/financing-costs.js +19 -14
- package/src/endpoints/inventory/garages.js +19 -14
- package/src/endpoints/inventory/getnet-terminals.js +20 -15
- package/src/endpoints/inventory/gift-certificate-definitions.js +10 -5
- package/src/endpoints/inventory/holidays.js +121 -0
- package/src/endpoints/inventory/insurances.js +17 -13
- package/src/endpoints/inventory/items.js +13 -9
- package/src/endpoints/inventory/labels.js +16 -11
- package/src/endpoints/inventory/marital-status.js +16 -11
- package/src/endpoints/inventory/marketplace-modifiers.js +16 -11
- package/src/endpoints/inventory/mit-terminal-settings.js +15 -10
- package/src/endpoints/inventory/mit-terminals.js +16 -11
- package/src/endpoints/inventory/operation-messages.js +18 -12
- package/src/endpoints/inventory/operation-reasons.js +15 -10
- package/src/endpoints/inventory/pay-on-accounts.js +5 -4
- package/src/endpoints/inventory/payment-terminals.js +15 -10
- package/src/endpoints/inventory/products.js +22 -10
- package/src/endpoints/inventory/promos.js +27 -18
- package/src/endpoints/inventory/station-groups.js +2 -4
- package/src/endpoints/inventory/taxes.js +11 -2
- package/src/endpoints/inventory/traveller-card-providers-types.js +6 -5
- package/src/endpoints/inventory/vehicle-types.js +3 -4
- package/src/endpoints/inventory/vehicles.js +4 -3
- package/src/endpoints/notifications/customers.js +1 -1
- package/src/endpoints/notifications/external-customers.js +41 -0
- package/src/endpoints/notifications/pdfs.js +0 -3
- package/src/endpoints/operations/accounting_items.js +7 -2
- package/src/endpoints/operations/flexpasses.js +9 -7
- package/src/endpoints/operations/gift-certificates.js +39 -0
- package/src/endpoints/operations/loans.js +16 -11
- package/src/endpoints/operations/movements.js +17 -6
- package/src/endpoints/operations/pago-express.js +73 -0
- package/src/endpoints/operations/parcels.js +11 -11
- package/src/endpoints/operations/parcels_manifests.js +7 -5
- package/test/endpoints/inventory/banks.test.js +8 -10
- package/test/endpoints/inventory/filtered-trips.test.js +6 -0
- package/test/endpoints/inventory/holidays.test.js +52 -0
- package/test/endpoints/inventory/traveller-card-providers-types.test.js +3 -2
- package/test/endpoints/notifications/external-customers.test.js +30 -0
- package/test/endpoints/operations/gift_certificates.test.js +37 -0
- package/test/endpoints/operations/operations.test.js +30 -0
|
@@ -24,13 +24,14 @@ function labelsFactory(_ref) {
|
|
|
24
24
|
internalAuthTokenProvider = _ref.internalAuthTokenProvider;
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* GET /labels - list labels.
|
|
27
|
+
* GET /labels - list labels (paginated).
|
|
28
28
|
* @param {Object} opts
|
|
29
29
|
* @param {string} [opts.token] - API key
|
|
30
30
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
31
31
|
* @param {LabelsQuery} [opts.query] - Query params (name, page)
|
|
32
32
|
* @param {Object} [opts.headers] - Optional headers
|
|
33
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
33
|
+
* @returns {Promise<import("axios").AxiosResponse<{ labels: Object[], count: number, next?: string, previous?: string }>>}
|
|
34
|
+
* @throws 401; 500.
|
|
34
35
|
*/
|
|
35
36
|
function all(_ref2) {
|
|
36
37
|
var token = _ref2.token,
|
|
@@ -50,9 +51,10 @@ function labelsFactory(_ref) {
|
|
|
50
51
|
* @param {Object} opts
|
|
51
52
|
* @param {string} [opts.token] - API key
|
|
52
53
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
53
|
-
* @param {string} opts.labelId - Label id (
|
|
54
|
+
* @param {string} opts.labelId - Label id (24 hex characters)
|
|
54
55
|
* @param {Object} [opts.headers] - Optional headers
|
|
55
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
56
|
+
* @returns {Promise<import("axios").AxiosResponse<{ label: Object }>>}
|
|
57
|
+
* @throws 400 WRONG_DATA, INVALID_LABEL_ID; 401; 404 LABEL_NOT_FOUND; 500.
|
|
56
58
|
*/
|
|
57
59
|
function get(_ref3) {
|
|
58
60
|
var labelId = _ref3.labelId,
|
|
@@ -73,9 +75,10 @@ function labelsFactory(_ref) {
|
|
|
73
75
|
* @param {Object} opts
|
|
74
76
|
* @param {string} [opts.token] - API key
|
|
75
77
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
76
|
-
* @param {Object} opts.label - Label payload
|
|
78
|
+
* @param {Object} opts.label - Label payload (name, description, color required; type: ticket|manifest)
|
|
77
79
|
* @param {Object} [opts.headers] - Optional headers
|
|
78
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
80
|
+
* @returns {Promise<import("axios").AxiosResponse<{ label: Object }>>}
|
|
81
|
+
* @throws 400 WRONG_DATA (name/description/color required), INVALID_TYPE; 401; 500.
|
|
79
82
|
*/
|
|
80
83
|
function create(_ref4) {
|
|
81
84
|
var jwtToken = _ref4.jwtToken,
|
|
@@ -96,10 +99,11 @@ function labelsFactory(_ref) {
|
|
|
96
99
|
* @param {Object} opts
|
|
97
100
|
* @param {string} [opts.token] - API key
|
|
98
101
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
99
|
-
* @param {string} opts.labelId - Label id
|
|
100
|
-
* @param {Object} opts.label - Label payload
|
|
102
|
+
* @param {string} opts.labelId - Label id (24 hex characters)
|
|
103
|
+
* @param {Object} opts.label - Label payload (LabelData)
|
|
101
104
|
* @param {Object} [opts.headers] - Optional headers
|
|
102
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
105
|
+
* @returns {Promise<import("axios").AxiosResponse<{ label: Object }>>}
|
|
106
|
+
* @throws 400 WRONG_DATA, INVALID_TYPE, LABEL_ALREADY_USED; 401; 404 LABEL_NOT_FOUND; 500.
|
|
103
107
|
*/
|
|
104
108
|
function update(_ref5) {
|
|
105
109
|
var jwtToken = _ref5.jwtToken,
|
|
@@ -121,9 +125,10 @@ function labelsFactory(_ref) {
|
|
|
121
125
|
* @param {Object} opts
|
|
122
126
|
* @param {string} [opts.token] - API key
|
|
123
127
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
124
|
-
* @param {string} opts.labelId - Label id
|
|
128
|
+
* @param {string} opts.labelId - Label id (24 hex characters)
|
|
125
129
|
* @param {Object} [opts.headers] - Optional headers
|
|
126
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
130
|
+
* @returns {Promise<import("axios").AxiosResponse<{ labelId: string }>>}
|
|
131
|
+
* @throws 400 LABEL_ID (invalid format), LABEL_ALREADY_USED; 401; 404 LABEL_NOT_FOUND; 500.
|
|
127
132
|
*/
|
|
128
133
|
function remove(_ref6) {
|
|
129
134
|
var jwtToken = _ref6.jwtToken,
|
|
@@ -23,13 +23,14 @@ function maritalStatusFactory(_ref) {
|
|
|
23
23
|
internalAuthTokenProvider = _ref.internalAuthTokenProvider;
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* GET /marital-status - list marital statuses.
|
|
26
|
+
* GET /marital-status - list marital statuses (paginated).
|
|
27
27
|
* @param {Object} opts
|
|
28
28
|
* @param {string} [opts.token] - API key
|
|
29
29
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
30
30
|
* @param {MaritalStatusListQuery} [opts.query] - Query params (providerIds)
|
|
31
31
|
* @param {Object} [opts.headers] - Optional headers
|
|
32
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
32
|
+
* @returns {Promise<import("axios").AxiosResponse<{ maritalstatus: Object[], next?: string, previous?: string, count: number }>>}
|
|
33
|
+
* @throws 401; 500.
|
|
33
34
|
*/
|
|
34
35
|
function all(_ref2) {
|
|
35
36
|
var token = _ref2.token,
|
|
@@ -51,9 +52,10 @@ function maritalStatusFactory(_ref) {
|
|
|
51
52
|
* @param {Object} opts
|
|
52
53
|
* @param {string} [opts.token] - API key
|
|
53
54
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
54
|
-
* @param {string} opts.id - Marital status id
|
|
55
|
+
* @param {string} opts.id - Marital status id (24 hex characters)
|
|
55
56
|
* @param {Object} [opts.headers] - Optional headers
|
|
56
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
57
|
+
* @returns {Promise<import("axios").AxiosResponse<{ maritalstatus: Object }>>}
|
|
58
|
+
* @throws 400 WRONG_DATA, INVALID_MARITALSTATUS_ID; 401; 404 MARITALSTATUS_NOT_FOUND; 500.
|
|
57
59
|
*/
|
|
58
60
|
function get(_ref3) {
|
|
59
61
|
var token = _ref3.token,
|
|
@@ -76,10 +78,11 @@ function maritalStatusFactory(_ref) {
|
|
|
76
78
|
* @param {Object} opts
|
|
77
79
|
* @param {string} [opts.token] - API key
|
|
78
80
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
79
|
-
* @param {string} opts.id - Marital status id
|
|
80
|
-
* @param {Object} opts.data - Request body
|
|
81
|
+
* @param {string} opts.id - Marital status id (24 hex characters)
|
|
82
|
+
* @param {Object} opts.data - Request body (MaritalStatusPutData: name, ord, lexiconKeys)
|
|
81
83
|
* @param {Object} [opts.headers] - Optional headers
|
|
82
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
84
|
+
* @returns {Promise<import("axios").AxiosResponse<{ maritalstatus: Object }>>}
|
|
85
|
+
* @throws 400 WRONG_DATA; 401; 404 MARITALSTATUS_NOT_FOUND; 409 CANNOT_UPDATE_LEXICON_ENTRIES; 500.
|
|
83
86
|
*/
|
|
84
87
|
function update(_ref4) {
|
|
85
88
|
var token = _ref4.token,
|
|
@@ -104,9 +107,10 @@ function maritalStatusFactory(_ref) {
|
|
|
104
107
|
* @param {Object} opts
|
|
105
108
|
* @param {string} [opts.token] - API key
|
|
106
109
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
107
|
-
* @param {string} opts.id - Marital status id
|
|
110
|
+
* @param {string} opts.id - Marital status id (24 hex characters)
|
|
108
111
|
* @param {Object} [opts.headers] - Optional headers
|
|
109
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
112
|
+
* @returns {Promise<import("axios").AxiosResponse<{ maritalstatusId: string }>>}
|
|
113
|
+
* @throws 400 WRONG_DATA, INVALID_MARITALSTATUS_ID; 401; 404 MARITALSTATUS_NOT_FOUND; 500.
|
|
110
114
|
*/
|
|
111
115
|
function remove(_ref5) {
|
|
112
116
|
var token = _ref5.token,
|
|
@@ -129,9 +133,10 @@ function maritalStatusFactory(_ref) {
|
|
|
129
133
|
* @param {Object} opts
|
|
130
134
|
* @param {string} [opts.token] - API key
|
|
131
135
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
132
|
-
* @param {Object} opts.data - Request body
|
|
136
|
+
* @param {Object} opts.data - Request body (MaritalStatusPostData: name, ord, lexiconKeys required)
|
|
133
137
|
* @param {Object} [opts.headers] - Optional headers
|
|
134
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
138
|
+
* @returns {Promise<import("axios").AxiosResponse<{ maritalstatus: Object }>>}
|
|
139
|
+
* @throws 400 WRONG_DATA (maritalstatus/name/ord/lexiconKeys required); 401; 409 CANNOT_CREATE_LEXICON_ENTRIES; 500.
|
|
135
140
|
*/
|
|
136
141
|
function create(_ref6) {
|
|
137
142
|
var token = _ref6.token,
|
|
@@ -31,12 +31,13 @@ function marketplaceModifierFactory(_ref) {
|
|
|
31
31
|
internalAuthTokenProvider = _ref.internalAuthTokenProvider;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
* GET /marketplace-modifiers - list marketplace modifiers.
|
|
34
|
+
* GET /marketplace-modifiers - list marketplace modifiers (paginated).
|
|
35
35
|
* @param {Object} opts
|
|
36
36
|
* @param {string} [opts.token] - API key
|
|
37
37
|
* @param {MarketplaceModifiersListQuery} [opts.query] - Query params
|
|
38
38
|
* @param {Object} [opts.headers] - Optional headers
|
|
39
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
39
|
+
* @returns {Promise<import("axios").AxiosResponse<{ marketplaceModifiers: Object[], next?: string, previous?: string, count: number }>>}
|
|
40
|
+
* @throws 401; 500 MISSING_ACCOUNT.
|
|
40
41
|
*/
|
|
41
42
|
function all(_ref2) {
|
|
42
43
|
var token = _ref2.token,
|
|
@@ -53,10 +54,11 @@ function marketplaceModifierFactory(_ref) {
|
|
|
53
54
|
/**
|
|
54
55
|
* GET /marketplace-modifiers/:marketplaceModifierId - get marketplace modifier by id. API does not accept query params.
|
|
55
56
|
* @param {Object} opts
|
|
56
|
-
* @param {string} opts.marketplaceModifierId - Marketplace modifier id
|
|
57
|
+
* @param {string} opts.marketplaceModifierId - Marketplace modifier id (24 hex characters)
|
|
57
58
|
* @param {string} [opts.token] - API key
|
|
58
59
|
* @param {Object} [opts.headers] - Optional headers
|
|
59
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
60
|
+
* @returns {Promise<import("axios").AxiosResponse<{ marketplaceModifier: Object }>>}
|
|
61
|
+
* @throws 400 WRONG_DATA, INVALID_MARKETPLACEMODIFIER_ID; 401; 404 MARKETPLACE_MODIFIER_NOT_FOUND; 500.
|
|
60
62
|
*/
|
|
61
63
|
function get(_ref3) {
|
|
62
64
|
var marketplaceModifierId = _ref3.marketplaceModifierId,
|
|
@@ -73,9 +75,10 @@ function marketplaceModifierFactory(_ref) {
|
|
|
73
75
|
* @param {Object} opts
|
|
74
76
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
75
77
|
* @param {string} [opts.token] - API key
|
|
76
|
-
* @param {Object} opts.marketplaceModifier - Marketplace modifier payload
|
|
78
|
+
* @param {Object} opts.marketplaceModifier - Marketplace modifier payload (MarketplaceModifierPostData)
|
|
77
79
|
* @param {Object} [opts.headers] - Optional headers
|
|
78
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
80
|
+
* @returns {Promise<import("axios").AxiosResponse<{ marketplaceModifier: Object }>>}
|
|
81
|
+
* @throws 400 WRONG_DATA, *_NOT_FOUND, INVALID_*, MODIFIER_*, OANDDS_STATION_NOT_FOUND; 401; 404; 500.
|
|
79
82
|
*/
|
|
80
83
|
function create(_ref4) {
|
|
81
84
|
var jwtToken = _ref4.jwtToken,
|
|
@@ -97,10 +100,11 @@ function marketplaceModifierFactory(_ref) {
|
|
|
97
100
|
* DELETE /marketplace-modifiers/:marketplaceModifierId - remove marketplace modifier. API does not accept query params.
|
|
98
101
|
* @param {Object} opts
|
|
99
102
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
100
|
-
* @param {string} opts.marketplaceModifierId - Marketplace modifier id
|
|
103
|
+
* @param {string} opts.marketplaceModifierId - Marketplace modifier id (24 hex characters)
|
|
101
104
|
* @param {string} [opts.token] - API key
|
|
102
105
|
* @param {Object} [opts.headers] - Optional headers
|
|
103
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
106
|
+
* @returns {Promise<import("axios").AxiosResponse<{ marketplaceModifierId: string }>>}
|
|
107
|
+
* @throws 400 MARKETPLACE_MODIFIER_ID (invalid format); 401; 404 MARKETPLACE_MODIFIER_NOT_FOUND; 500.
|
|
104
108
|
*/
|
|
105
109
|
function remove(_ref5) {
|
|
106
110
|
var jwtToken = _ref5.jwtToken,
|
|
@@ -120,10 +124,11 @@ function marketplaceModifierFactory(_ref) {
|
|
|
120
124
|
* @param {Object} opts
|
|
121
125
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
122
126
|
* @param {string} [opts.token] - API key
|
|
123
|
-
* @param {string} opts.marketplaceModifierId - Marketplace modifier id
|
|
124
|
-
* @param {Object} opts.marketplaceModifier - Marketplace modifier payload
|
|
127
|
+
* @param {string} opts.marketplaceModifierId - Marketplace modifier id (24 hex characters)
|
|
128
|
+
* @param {Object} opts.marketplaceModifier - Marketplace modifier payload (MarketplaceModifierPutData)
|
|
125
129
|
* @param {Object} [opts.headers] - Optional headers
|
|
126
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
130
|
+
* @returns {Promise<import("axios").AxiosResponse<{ marketplaceModifier: Object }>>}
|
|
131
|
+
* @throws 400 WRONG_DATA, INVALID_MARKETPLACEMODIFIER_ID, *_NOT_FOUND, INVALID_*, MODIFIER_*; 401; 404; 500.
|
|
127
132
|
*/
|
|
128
133
|
function update(_ref6) {
|
|
129
134
|
var jwtToken = _ref6.jwtToken,
|
|
@@ -22,7 +22,8 @@ function mitTerminalFactory(_ref) {
|
|
|
22
22
|
* @param {string} [opts.token] - API key
|
|
23
23
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
24
24
|
* @param {Object} [opts.headers] - Optional headers
|
|
25
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
25
|
+
* @returns {Promise<import("axios").AxiosResponse<{ mitTerminalsSettings: Object[], next?: string, previous?: string, count: number }>>}
|
|
26
|
+
* @throws When the request fails (e.g. 401 Unauthorized, 500 Internal Server Error)
|
|
26
27
|
*/
|
|
27
28
|
function all(_ref2) {
|
|
28
29
|
var token = _ref2.token,
|
|
@@ -42,9 +43,10 @@ function mitTerminalFactory(_ref) {
|
|
|
42
43
|
* @param {Object} opts
|
|
43
44
|
* @param {string} [opts.token] - API key
|
|
44
45
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
45
|
-
* @param {string} opts.id - MIT terminal setting id
|
|
46
|
+
* @param {string} opts.id - MIT terminal setting id (24-char hex ObjectId)
|
|
46
47
|
* @param {Object} [opts.headers] - Optional headers
|
|
47
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
48
|
+
* @returns {Promise<import("axios").AxiosResponse<{ mitTerminalSettings: Object }>>}
|
|
49
|
+
* @throws When the request fails (e.g. 400 INVALID_ID, 401 Unauthorized, 404 MITTERMINALSETTING_NOT_FOUND, 500 Internal Server Error)
|
|
48
50
|
*/
|
|
49
51
|
function get(_ref3) {
|
|
50
52
|
var id = _ref3.id,
|
|
@@ -62,9 +64,10 @@ function mitTerminalFactory(_ref) {
|
|
|
62
64
|
* @param {Object} opts
|
|
63
65
|
* @param {string} [opts.token] - API key
|
|
64
66
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
65
|
-
* @param {Object} opts.mitTerminalSettings - MIT terminal settings payload
|
|
67
|
+
* @param {Object} opts.mitTerminalSettings - MIT terminal settings payload (name, operatingCompanyId, shiftLocationId, user, password)
|
|
66
68
|
* @param {Object} [opts.headers] - Optional headers
|
|
67
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
69
|
+
* @returns {Promise<import("axios").AxiosResponse<{ mitTerminalSettings: Object }>>}
|
|
70
|
+
* @throws When the request fails (e.g. 400 WRONG_DATA, 401 Unauthorized, 500 Internal Server Error)
|
|
68
71
|
*/
|
|
69
72
|
function create(_ref4) {
|
|
70
73
|
var jwtToken = _ref4.jwtToken,
|
|
@@ -87,9 +90,10 @@ function mitTerminalFactory(_ref) {
|
|
|
87
90
|
* @param {Object} opts
|
|
88
91
|
* @param {string} [opts.token] - API key
|
|
89
92
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
90
|
-
* @param {string} opts.id - MIT terminal setting id
|
|
93
|
+
* @param {string} opts.id - MIT terminal setting id (24-char hex ObjectId)
|
|
91
94
|
* @param {Object} [opts.headers] - Optional headers
|
|
92
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
95
|
+
* @returns {Promise<import("axios").AxiosResponse<{ mitterminalsettingId: string }>>}
|
|
96
|
+
* @throws When the request fails (e.g. 400 INVALID_ID, 401 Unauthorized, 404 MITTERMINALSETTING_NOT_FOUND, 500 Internal Server Error)
|
|
93
97
|
*/
|
|
94
98
|
function remove(_ref5) {
|
|
95
99
|
var jwtToken = _ref5.jwtToken,
|
|
@@ -109,10 +113,11 @@ function mitTerminalFactory(_ref) {
|
|
|
109
113
|
* @param {Object} opts
|
|
110
114
|
* @param {string} [opts.token] - API key
|
|
111
115
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
112
|
-
* @param {string} opts.id - MIT terminal setting id
|
|
113
|
-
* @param {Object} opts.mitTerminalSettings - MIT terminal settings payload
|
|
116
|
+
* @param {string} opts.id - MIT terminal setting id (24-char hex ObjectId)
|
|
117
|
+
* @param {Object} opts.mitTerminalSettings - MIT terminal settings payload (name, operatingCompanyId, shiftLocationId, user, password)
|
|
114
118
|
* @param {Object} [opts.headers] - Optional headers
|
|
115
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
119
|
+
* @returns {Promise<import("axios").AxiosResponse<{ mitTerminalSettings: Object }>>}
|
|
120
|
+
* @throws When the request fails (e.g. 400 WRONG_DATA/INVALID_ID, 401, 404 MITTERMINALSETTING_NOT_FOUND, 500)
|
|
116
121
|
*/
|
|
117
122
|
function update(_ref6) {
|
|
118
123
|
var jwtToken = _ref6.jwtToken,
|
|
@@ -17,12 +17,13 @@ function mitTerminalFactory(_ref) {
|
|
|
17
17
|
internalAuthTokenProvider = _ref.internalAuthTokenProvider;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* GET /mit-terminals - list MIT terminals. API does not accept query params.
|
|
20
|
+
* GET /mit-terminals - list MIT terminals (paginated). API does not accept query params.
|
|
21
21
|
* @param {Object} opts
|
|
22
22
|
* @param {string} [opts.token] - API key
|
|
23
23
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
24
24
|
* @param {Object} [opts.headers] - Optional headers
|
|
25
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
25
|
+
* @returns {Promise<import("axios").AxiosResponse<{ mitTerminals: Object[], next?: string, previous?: string, count: number }>>}
|
|
26
|
+
* @throws 401; 500.
|
|
26
27
|
*/
|
|
27
28
|
function all(_ref2) {
|
|
28
29
|
var token = _ref2.token,
|
|
@@ -41,9 +42,10 @@ function mitTerminalFactory(_ref) {
|
|
|
41
42
|
* @param {Object} opts
|
|
42
43
|
* @param {string} [opts.token] - API key
|
|
43
44
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
44
|
-
* @param {string} opts.mitTerminalId - MIT terminal id
|
|
45
|
+
* @param {string} opts.mitTerminalId - MIT terminal id (24 hex characters)
|
|
45
46
|
* @param {Object} [opts.headers] - Optional headers
|
|
46
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
47
|
+
* @returns {Promise<import("axios").AxiosResponse<{ mitTerminal: Object }>>}
|
|
48
|
+
* @throws 400 INVALID_MIT_TERMINAL_ID; 401; 404 MIT_TERMINAL_NOT_FOUND; 500.
|
|
47
49
|
*/
|
|
48
50
|
function get(_ref3) {
|
|
49
51
|
var mitTerminalId = _ref3.mitTerminalId,
|
|
@@ -60,9 +62,10 @@ function mitTerminalFactory(_ref) {
|
|
|
60
62
|
* @param {Object} opts
|
|
61
63
|
* @param {string} [opts.token] - API key
|
|
62
64
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
63
|
-
* @param {Object} opts.mitTerminal - MIT terminal payload
|
|
65
|
+
* @param {Object} opts.mitTerminal - MIT terminal payload (name, serialNumber required; user, password per API)
|
|
64
66
|
* @param {Object} [opts.headers] - Optional headers
|
|
65
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
67
|
+
* @returns {Promise<import("axios").AxiosResponse<{ mitTerminal: Object }>>}
|
|
68
|
+
* @throws 400 WRONG_DATA (mitTerminal, name, serialNumber, user, password); 401; 404 MIT_TERMINAL_NOT_FOUND; 500.
|
|
66
69
|
*/
|
|
67
70
|
function create(_ref4) {
|
|
68
71
|
var jwtToken = _ref4.jwtToken,
|
|
@@ -85,9 +88,10 @@ function mitTerminalFactory(_ref) {
|
|
|
85
88
|
* @param {Object} opts
|
|
86
89
|
* @param {string} [opts.token] - API key
|
|
87
90
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
88
|
-
* @param {string} opts.mitTerminalId - MIT terminal id
|
|
91
|
+
* @param {string} opts.mitTerminalId - MIT terminal id (24 hex characters)
|
|
89
92
|
* @param {Object} [opts.headers] - Optional headers
|
|
90
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
93
|
+
* @returns {Promise<import("axios").AxiosResponse<{ mitTerminalId: string }>>}
|
|
94
|
+
* @throws 400 INVALID_MIT_TERMINAL_ID; 401; 404 MIT_TERMINAL_NOT_FOUND; 500.
|
|
91
95
|
*/
|
|
92
96
|
function remove(_ref5) {
|
|
93
97
|
var jwtToken = _ref5.jwtToken,
|
|
@@ -107,10 +111,11 @@ function mitTerminalFactory(_ref) {
|
|
|
107
111
|
* @param {Object} opts
|
|
108
112
|
* @param {string} [opts.token] - API key
|
|
109
113
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
110
|
-
* @param {string} opts.mitTerminalId - MIT terminal id
|
|
111
|
-
* @param {Object} opts.mitTerminal - MIT terminal payload
|
|
114
|
+
* @param {string} opts.mitTerminalId - MIT terminal id (24 hex characters)
|
|
115
|
+
* @param {Object} opts.mitTerminal - MIT terminal payload (MitTerminalPost)
|
|
112
116
|
* @param {Object} [opts.headers] - Optional headers
|
|
113
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
117
|
+
* @returns {Promise<import("axios").AxiosResponse<{ mitTerminal: Object }>>}
|
|
118
|
+
* @throws 400 WRONG_DATA; 401; 404 MIT_TERMINAL_NOT_FOUND; 500.
|
|
114
119
|
*/
|
|
115
120
|
function update(_ref6) {
|
|
116
121
|
var jwtToken = _ref6.jwtToken,
|
|
@@ -36,7 +36,8 @@ function operationMessagesFactory(_ref) {
|
|
|
36
36
|
* @param {string} [opts.token] - API key
|
|
37
37
|
* @param {OperationMessagesListQuery} [opts.query] - Query params
|
|
38
38
|
* @param {Object} [opts.headers] - Optional headers
|
|
39
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
39
|
+
* @returns {Promise<import("axios").AxiosResponse<{ operationMessages: Object[], count?: number, next?: string, previous?: string }>>}
|
|
40
|
+
* @throws When the request fails (e.g. 401 Unauthorized, 500 Internal Server Error)
|
|
40
41
|
*/
|
|
41
42
|
function all(_ref2) {
|
|
42
43
|
var token = _ref2.token,
|
|
@@ -57,9 +58,10 @@ function operationMessagesFactory(_ref) {
|
|
|
57
58
|
* @param {Object} opts
|
|
58
59
|
* @param {string} [opts.token] - API key
|
|
59
60
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
60
|
-
* @param {Object} opts.opMsgData - Operation message payload
|
|
61
|
+
* @param {Object} opts.opMsgData - Operation message payload (message, name, type, effectiveDateTimeStart/End, etc.)
|
|
61
62
|
* @param {Object} [opts.headers] - Optional headers
|
|
62
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
63
|
+
* @returns {Promise<import("axios").AxiosResponse<Object>>} Created OperationMessage
|
|
64
|
+
* @throws When the request fails (400, 401, 409 duplicate key, 500)
|
|
63
65
|
*/
|
|
64
66
|
function create(_ref3) {
|
|
65
67
|
var token = _ref3.token,
|
|
@@ -80,10 +82,11 @@ function operationMessagesFactory(_ref) {
|
|
|
80
82
|
* @param {Object} opts
|
|
81
83
|
* @param {string} [opts.token] - API key
|
|
82
84
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
83
|
-
* @param {string} opts.operationMessageId - Operation message id
|
|
84
|
-
* @param {Object} opts.opMsgData - Operation message payload
|
|
85
|
+
* @param {string} opts.operationMessageId - Operation message id (24-char hex ObjectId)
|
|
86
|
+
* @param {Object} opts.opMsgData - Operation message payload (message, name, type, etc.)
|
|
85
87
|
* @param {Object} [opts.headers] - Optional headers
|
|
86
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
88
|
+
* @returns {Promise<import("axios").AxiosResponse<Object>>} Updated OperationMessage
|
|
89
|
+
* @throws When the request fails (400, 401, 404 NOT_FOUND, 500)
|
|
87
90
|
*/
|
|
88
91
|
function update(_ref4) {
|
|
89
92
|
var token = _ref4.token,
|
|
@@ -104,9 +107,10 @@ function operationMessagesFactory(_ref) {
|
|
|
104
107
|
* GET /operation-messages/:operationMessageId - get operation message by id. API does not accept query params.
|
|
105
108
|
* @param {Object} opts
|
|
106
109
|
* @param {string} [opts.token] - API key
|
|
107
|
-
* @param {string} opts.operationMessageId - Operation message id
|
|
110
|
+
* @param {string} opts.operationMessageId - Operation message id (24-char hex ObjectId)
|
|
108
111
|
* @param {Object} [opts.headers] - Optional headers
|
|
109
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
112
|
+
* @returns {Promise<import("axios").AxiosResponse<Object>>} Response body is the OperationMessage
|
|
113
|
+
* @throws When the request fails (e.g. 401 Unauthorized, 404 NOT_FOUND, 500 Internal Server Error)
|
|
110
114
|
*/
|
|
111
115
|
function get(_ref5) {
|
|
112
116
|
var token = _ref5.token,
|
|
@@ -124,10 +128,11 @@ function operationMessagesFactory(_ref) {
|
|
|
124
128
|
* DELETE /operation-messages/:operationMessageId - remove operation message. API does not accept query params.
|
|
125
129
|
* @param {Object} opts
|
|
126
130
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
127
|
-
* @param {string} opts.operationMessageId - Operation message id
|
|
131
|
+
* @param {string} opts.operationMessageId - Operation message id (24-char hex ObjectId)
|
|
128
132
|
* @param {string} [opts.token] - API key
|
|
129
133
|
* @param {Object} [opts.headers] - Optional headers
|
|
130
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
134
|
+
* @returns {Promise<import("axios").AxiosResponse<void>>} 204 No Content on success
|
|
135
|
+
* @throws When the request fails (e.g. 401 Unauthorized, 404 NOT_FOUND, 500 Internal Server Error)
|
|
131
136
|
*/
|
|
132
137
|
function remove(_ref6) {
|
|
133
138
|
var jwtToken = _ref6.jwtToken,
|
|
@@ -147,9 +152,10 @@ function operationMessagesFactory(_ref) {
|
|
|
147
152
|
* @param {Object} opts
|
|
148
153
|
* @param {string} [opts.token] - API key
|
|
149
154
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
150
|
-
* @param {Object} opts.opMsgData - Request body (station criteria)
|
|
155
|
+
* @param {Object} opts.opMsgData - Request body (OperationMessagesStationsQuery: station criteria and dates)
|
|
151
156
|
* @param {Object} [opts.headers] - Optional headers
|
|
152
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
157
|
+
* @returns {Promise<import("axios").AxiosResponse<Object>>} Response body matches OperationMessagesStations schema
|
|
158
|
+
* @throws When the request fails (e.g. 400 INVALID_DATE_RANGE/INVALID_STATION, 401, 500)
|
|
153
159
|
*/
|
|
154
160
|
function getByStation(_ref7) {
|
|
155
161
|
var token = _ref7.token,
|
|
@@ -29,7 +29,8 @@ function operationReasonFactory(_ref) {
|
|
|
29
29
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
30
30
|
* @param {OperationReasonsListQuery} [opts.query] - Query params (page)
|
|
31
31
|
* @param {Object} [opts.headers] - Optional headers
|
|
32
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
32
|
+
* @returns {Promise<import("axios").AxiosResponse<{ operationReasons: Object[], next?: string, previous?: string, count: number }>>}
|
|
33
|
+
* @throws When the request fails (e.g. 400 INVALID_PAGE, 401 Unauthorized, 500)
|
|
33
34
|
*/
|
|
34
35
|
function all(_ref2) {
|
|
35
36
|
var token = _ref2.token,
|
|
@@ -51,9 +52,10 @@ function operationReasonFactory(_ref) {
|
|
|
51
52
|
* @param {Object} opts
|
|
52
53
|
* @param {string} [opts.token] - API key
|
|
53
54
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
54
|
-
* @param {string} opts.id - Operation reason id
|
|
55
|
+
* @param {string} opts.id - Operation reason id (24-char hex ObjectId)
|
|
55
56
|
* @param {Object} [opts.headers] - Optional headers
|
|
56
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
57
|
+
* @returns {Promise<import("axios").AxiosResponse<{ operationReason: Object }>>}
|
|
58
|
+
* @throws When the request fails (400 INVALID_OPERATION_REASON_ID, 401, 404 OPERATION_REASON_NOT_FOUND, 500)
|
|
57
59
|
*/
|
|
58
60
|
function get(_ref3) {
|
|
59
61
|
var token = _ref3.token,
|
|
@@ -76,10 +78,11 @@ function operationReasonFactory(_ref) {
|
|
|
76
78
|
* @param {Object} opts
|
|
77
79
|
* @param {string} [opts.token] - API key
|
|
78
80
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
79
|
-
* @param {string} opts.id - Operation reason id
|
|
80
|
-
* @param {Object} opts.operationReason - Operation reason payload
|
|
81
|
+
* @param {string} opts.id - Operation reason id (24-char hex ObjectId)
|
|
82
|
+
* @param {Object} opts.operationReason - Operation reason payload (name, type, lexiconKeys, etc.)
|
|
81
83
|
* @param {Object} [opts.headers] - Optional headers
|
|
82
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
84
|
+
* @returns {Promise<import("axios").AxiosResponse<{ operationReason: Object }>>}
|
|
85
|
+
* @throws When the request fails (400 WRONG_DATA/INVALID_OPERATION_REASON_ID, 401, 404, 500)
|
|
83
86
|
*/
|
|
84
87
|
function update(_ref4) {
|
|
85
88
|
var token = _ref4.token,
|
|
@@ -104,9 +107,10 @@ function operationReasonFactory(_ref) {
|
|
|
104
107
|
* @param {Object} opts
|
|
105
108
|
* @param {string} [opts.token] - API key
|
|
106
109
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
107
|
-
* @param {string} opts.id - Operation reason id
|
|
110
|
+
* @param {string} opts.id - Operation reason id (24-char hex ObjectId)
|
|
108
111
|
* @param {Object} [opts.headers] - Optional headers
|
|
109
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
112
|
+
* @returns {Promise<import("axios").AxiosResponse<{ _id: string }>>}
|
|
113
|
+
* @throws When the request fails (400 INVALID_OPERATION_REASON_ID, 401, 404 OPERATION_REASON_NOT_FOUND, 500)
|
|
110
114
|
*/
|
|
111
115
|
function remove(_ref5) {
|
|
112
116
|
var token = _ref5.token,
|
|
@@ -129,9 +133,10 @@ function operationReasonFactory(_ref) {
|
|
|
129
133
|
* @param {Object} opts
|
|
130
134
|
* @param {string} [opts.token] - API key
|
|
131
135
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
132
|
-
* @param {Object} opts.operationReason - Operation reason payload
|
|
136
|
+
* @param {Object} opts.operationReason - Operation reason payload (name, type, lexiconKeys required)
|
|
133
137
|
* @param {Object} [opts.headers] - Optional headers
|
|
134
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
138
|
+
* @returns {Promise<import("axios").AxiosResponse<{ operationReason: Object }>>}
|
|
139
|
+
* @throws When the request fails (400 WRONG_DATA, 401, 409 CANNOT_CREATE_LEXICON_ENTRIES, 500)
|
|
135
140
|
*/
|
|
136
141
|
function create(_ref6) {
|
|
137
142
|
var token = _ref6.token,
|
|
@@ -28,14 +28,15 @@ function payOnAccountsFactory(_ref) {
|
|
|
28
28
|
internalAuthTokenProvider = _ref.internalAuthTokenProvider;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* GET /pay-on-accounts - list pay-on accounts.
|
|
31
|
+
* GET /pay-on-accounts - list pay-on accounts. When format=csv returns CSV (text/csv); otherwise JSON with pagination.
|
|
32
32
|
* @param {Object} opts
|
|
33
33
|
* @param {string} [opts.token] - API key
|
|
34
34
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
35
|
-
* @param {PayOnAccountsListQuery} [opts.query] - Query params
|
|
36
|
-
* @param {string} [opts.responseType] - Response type (e.g. json)
|
|
35
|
+
* @param {PayOnAccountsListQuery} [opts.query] - Query params (page, format, disabled, term, fareIds, providerId)
|
|
36
|
+
* @param {string} [opts.responseType] - Response type (e.g. json); use for CSV when format=csv
|
|
37
37
|
* @param {Object} [opts.headers] - Optional headers
|
|
38
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
38
|
+
* @returns {Promise<import("axios").AxiosResponse<{ payOnAccounts: Object[], next?: string, previous?: string, count: number }|string>>}
|
|
39
|
+
* @throws When the request fails (400 INVALID_PAGE/INVALID_FARE_IDS/INVALID_PROVIDER_ID/INVALID_SEARCH_TERM, 401, 500)
|
|
39
40
|
*/
|
|
40
41
|
function all(_ref2) {
|
|
41
42
|
var token = _ref2.token,
|
|
@@ -21,7 +21,8 @@ function paymentTerminalFactory(_ref) {
|
|
|
21
21
|
* @param {Object} opts
|
|
22
22
|
* @param {string} [opts.token] - API key
|
|
23
23
|
* @param {Object} [opts.headers] - Optional headers
|
|
24
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
24
|
+
* @returns {Promise<import("axios").AxiosResponse<{ paymentTerminals: Object[], next?: string, previous?: string, count: number }>>}
|
|
25
|
+
* @throws When the request fails (401 Unauthorized, 500 Internal Server Error)
|
|
25
26
|
*/
|
|
26
27
|
function all(_ref2) {
|
|
27
28
|
var token = _ref2.token,
|
|
@@ -38,10 +39,11 @@ function paymentTerminalFactory(_ref) {
|
|
|
38
39
|
/**
|
|
39
40
|
* GET /payment-terminals/:paymentTerminalId - get payment terminal by id. API does not accept query params.
|
|
40
41
|
* @param {Object} opts
|
|
41
|
-
* @param {string} opts.paymentTerminalId - Payment terminal id
|
|
42
|
+
* @param {string} opts.paymentTerminalId - Payment terminal id (24-char hex ObjectId)
|
|
42
43
|
* @param {string} [opts.token] - API key
|
|
43
44
|
* @param {Object} [opts.headers] - Optional headers
|
|
44
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
45
|
+
* @returns {Promise<import("axios").AxiosResponse<{ paymentTerminal: Object }>>}
|
|
46
|
+
* @throws When the request fails (400 INVALID_PAYMENT_TERMINAL_ID, 401, 404 PAYMENT_TERMINAL_NOT_FOUND, 500)
|
|
45
47
|
*/
|
|
46
48
|
function get(_ref3) {
|
|
47
49
|
var paymentTerminalId = _ref3.paymentTerminalId,
|
|
@@ -58,9 +60,10 @@ function paymentTerminalFactory(_ref) {
|
|
|
58
60
|
* @param {Object} opts
|
|
59
61
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
60
62
|
* @param {string} [opts.token] - API key
|
|
61
|
-
* @param {Object} opts.paymentTerminal - Payment terminal payload
|
|
63
|
+
* @param {Object} opts.paymentTerminal - Payment terminal payload (name, protocol, ip, locationId, partNumber, serialNumber)
|
|
62
64
|
* @param {Object} [opts.headers] - Optional headers
|
|
63
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
65
|
+
* @returns {Promise<import("axios").AxiosResponse<{ paymentTerminal: Object }>>}
|
|
66
|
+
* @throws When the request fails (400 WRONG_DATA, 401, 500)
|
|
64
67
|
*/
|
|
65
68
|
function create(_ref4) {
|
|
66
69
|
var jwtToken = _ref4.jwtToken,
|
|
@@ -82,10 +85,11 @@ function paymentTerminalFactory(_ref) {
|
|
|
82
85
|
* DELETE /payment-terminals/:paymentTerminalId - remove payment terminal. API does not accept query params.
|
|
83
86
|
* @param {Object} opts
|
|
84
87
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
85
|
-
* @param {string} opts.paymentTerminalId - Payment terminal id
|
|
88
|
+
* @param {string} opts.paymentTerminalId - Payment terminal id (24-char hex ObjectId)
|
|
86
89
|
* @param {string} [opts.token] - API key
|
|
87
90
|
* @param {Object} [opts.headers] - Optional headers
|
|
88
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
91
|
+
* @returns {Promise<import("axios").AxiosResponse<{ paymentTerminalId: string }>>}
|
|
92
|
+
* @throws When the request fails (400 INVALID_PAYMENT_TERMINAL_ID, 401, 404 PAYMENT_TERMINAL_NOT_FOUND, 500)
|
|
89
93
|
*/
|
|
90
94
|
function remove(_ref5) {
|
|
91
95
|
var jwtToken = _ref5.jwtToken,
|
|
@@ -105,10 +109,11 @@ function paymentTerminalFactory(_ref) {
|
|
|
105
109
|
* @param {Object} opts
|
|
106
110
|
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
107
111
|
* @param {string} [opts.token] - API key
|
|
108
|
-
* @param {string} opts.paymentTerminalId - Payment terminal id
|
|
109
|
-
* @param {Object} opts.paymentTerminal - Payment terminal payload
|
|
112
|
+
* @param {string} opts.paymentTerminalId - Payment terminal id (24-char hex ObjectId)
|
|
113
|
+
* @param {Object} opts.paymentTerminal - Payment terminal payload (name, protocol, ip, locationId, partNumber, serialNumber)
|
|
110
114
|
* @param {Object} [opts.headers] - Optional headers
|
|
111
|
-
* @returns {Promise<import("axios").AxiosResponse
|
|
115
|
+
* @returns {Promise<import("axios").AxiosResponse<{ paymentTerminal: Object }>>}
|
|
116
|
+
* @throws When the request fails (400 WRONG_DATA, 401, 404 PAYMENT_TERMINAL_NOT_FOUND, 500)
|
|
112
117
|
*/
|
|
113
118
|
function update(_ref6) {
|
|
114
119
|
var jwtToken = _ref6.jwtToken,
|