@compassdigital/sdk.typescript 3.67.0 → 3.69.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/.editorconfig +4 -0
- package/.eslintignore +4 -0
- package/.eslintrc.js +71 -0
- package/lib/base.d.ts +36 -35
- package/lib/base.d.ts.map +1 -1
- package/lib/base.js +68 -66
- package/lib/base.js.map +1 -1
- package/lib/index.d.ts +23 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +26 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/calendar.js +1 -1
- package/lib/interface/calendar.js.map +1 -1
- package/lib/interface/compassconnect.js +1 -1
- package/lib/interface/compassconnect.js.map +1 -1
- package/lib/interface/delivery.js +1 -1
- package/lib/interface/delivery.js.map +1 -1
- package/lib/interface/file.js +1 -1
- package/lib/interface/file.js.map +1 -1
- package/lib/interface/menu.d.ts +171 -39
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/menu.js +1 -1
- package/lib/interface/menu.js.map +1 -1
- package/lib/interface/notification.js +1 -1
- package/lib/interface/notification.js.map +1 -1
- package/lib/interface/promo.d.ts +8 -10
- package/lib/interface/promo.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +7 -0
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/lib/interface/user.d.ts +10 -1
- package/lib/interface/user.d.ts.map +1 -1
- package/lib/interface/user.js +1 -1
- package/lib/interface/user.js.map +1 -1
- package/lib/interface/vendor.js +1 -1
- package/lib/interface/vendor.js.map +1 -1
- package/package.json +56 -52
- package/prettier.config.js +10 -0
- package/src/base.ts +425 -410
- package/src/index.ts +66 -0
- package/src/interface/calendar.ts +1 -1
- package/src/interface/compassconnect.ts +1 -1
- package/src/interface/delivery.ts +1 -1
- package/src/interface/file.ts +1 -1
- package/src/interface/menu.ts +196 -41
- package/src/interface/notification.ts +1 -1
- package/src/interface/promo.ts +9 -10
- package/src/interface/shoppingcart.ts +8 -0
- package/src/interface/user.ts +12 -2
- package/src/interface/vendor.ts +1 -1
- package/test/client.test.ts +223 -226
package/.editorconfig
CHANGED
package/.eslintignore
ADDED
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
parser: '@typescript-eslint/parser',
|
|
4
|
+
parserOptions: { ecmaVersion: 2017 },
|
|
5
|
+
plugins: ['@typescript-eslint', 'prettier'],
|
|
6
|
+
extends: ['airbnb-base', 'plugin:import/typescript', 'prettier'],
|
|
7
|
+
env: { node: true, mocha: true, es6: true },
|
|
8
|
+
rules: {
|
|
9
|
+
camelcase: ['off', { properties: 'never' }],
|
|
10
|
+
'global-require': 'off',
|
|
11
|
+
'no-param-reassign': 'off',
|
|
12
|
+
'no-new': 'off',
|
|
13
|
+
'no-console': 'off',
|
|
14
|
+
'no-tabs': ['off', { allowIndentationTabs: true }],
|
|
15
|
+
'no-use-before-define': ['error', { functions: false }],
|
|
16
|
+
'no-underscore-dangle': 'off',
|
|
17
|
+
'prefer-destructuring': 'off',
|
|
18
|
+
'spaced-comment': 'off',
|
|
19
|
+
'import/prefer-default-export': 'off',
|
|
20
|
+
'import/extensions': 'off',
|
|
21
|
+
'class-methods-use-this': 'off',
|
|
22
|
+
'prettier/prettier': 'error',
|
|
23
|
+
'no-restricted-syntax': 'off',
|
|
24
|
+
'no-await-in-loop': 'off',
|
|
25
|
+
'no-continue': 'off',
|
|
26
|
+
'func-names': 'off',
|
|
27
|
+
'import/no-extraneous-dependencies': [
|
|
28
|
+
'error',
|
|
29
|
+
{
|
|
30
|
+
devDependencies: [
|
|
31
|
+
'**/*.test.js',
|
|
32
|
+
'**/*.spec.js',
|
|
33
|
+
'**/*.test.ts',
|
|
34
|
+
'**/*.spec.ts',
|
|
35
|
+
'**/test/**/*.js',
|
|
36
|
+
'**/test/**/*.ts',
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
|
|
41
|
+
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
|
|
42
|
+
// See: https://github.com/import-js/eslint-plugin-import/issues/1810
|
|
43
|
+
'import/no-unresolved': ['error', { ignore: ['@compassdigital/core/*'] }],
|
|
44
|
+
},
|
|
45
|
+
overrides: [
|
|
46
|
+
{
|
|
47
|
+
files: ['*.ts', '*.tsx'],
|
|
48
|
+
rules: {
|
|
49
|
+
'import/no-unresolved': 'off',
|
|
50
|
+
'no-undef': 'off',
|
|
51
|
+
'no-unused-vars': 'off',
|
|
52
|
+
'@typescript-eslint/no-unused-vars': [2, { args: 'none' }],
|
|
53
|
+
'no-dupe-class-members': 'off',
|
|
54
|
+
'@typescript-eslint/no-dupe-class-members': ['error'],
|
|
55
|
+
'no-useless-constructor': 'off',
|
|
56
|
+
'@typescript-eslint/no-useless-constructor': ['error'],
|
|
57
|
+
'no-empty-function': 'off',
|
|
58
|
+
'@typescript-eslint/no-empty-function': ['error'],
|
|
59
|
+
'lines-between-class-members': 'off',
|
|
60
|
+
'@typescript-eslint/lines-between-class-members': ['error'],
|
|
61
|
+
'no-use-before-define': 'off',
|
|
62
|
+
'@typescript-eslint/no-use-before-define': ['error', { functions: false }],
|
|
63
|
+
'no-shadow': 'off',
|
|
64
|
+
'@typescript-eslint/explicit-function-return-type': [
|
|
65
|
+
'error',
|
|
66
|
+
{ allowExpressions: true },
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
};
|
package/lib/base.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface RequestOptions {
|
|
|
10
10
|
base_url?: string | Record<string, string>;
|
|
11
11
|
intercept?: InterceptFn;
|
|
12
12
|
throws?: any;
|
|
13
|
+
agent?: any;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* The request data provided to intercept
|
|
@@ -41,41 +42,6 @@ export type FetchFn = (req: RequestData) => Promise<ResponseData>;
|
|
|
41
42
|
* A function that intercepts an http request and returns a response.
|
|
42
43
|
*/
|
|
43
44
|
export type InterceptFn = (req: RequestData, fetch: FetchFn) => Promise<ResponseData>;
|
|
44
|
-
/**
|
|
45
|
-
* We have to re-implement the promise methods instead of just existing
|
|
46
|
-
* the existing Promise class due to: https://github.com/microsoft/TypeScript/issues/15202
|
|
47
|
-
*/
|
|
48
|
-
export declare class ResponsePromise<T> implements Promise<T> {
|
|
49
|
-
private promise;
|
|
50
|
-
/**
|
|
51
|
-
* Implements Promise interface.
|
|
52
|
-
*/
|
|
53
|
-
[Symbol.toStringTag]: string;
|
|
54
|
-
constructor(promise: Promise<T>);
|
|
55
|
-
/**
|
|
56
|
-
* Implements Promise interface.
|
|
57
|
-
*/
|
|
58
|
-
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): ResponsePromise<TResult1 | TResult2>;
|
|
59
|
-
/**
|
|
60
|
-
* Implements Promise interface.
|
|
61
|
-
*/
|
|
62
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): ResponsePromise<T | TResult>;
|
|
63
|
-
/**
|
|
64
|
-
* Implements Promise interface.
|
|
65
|
-
*/
|
|
66
|
-
finally(onfinally?: (() => void) | null): ResponsePromise<T>;
|
|
67
|
-
/**
|
|
68
|
-
* Returns a promise that resolves to null if http status code
|
|
69
|
-
* or service error code matches one of the provided codes.
|
|
70
|
-
* If no codes are specified, all codes are ignored.
|
|
71
|
-
*/
|
|
72
|
-
ignore(...codes: number[]): ResponsePromise<T | null>;
|
|
73
|
-
/**
|
|
74
|
-
* Returns a promise that resolves to either the response body
|
|
75
|
-
* or a ServiceError.
|
|
76
|
-
*/
|
|
77
|
-
combine(...codes: number[]): Promise<EitherResponse<T>>;
|
|
78
|
-
}
|
|
79
45
|
/**
|
|
80
46
|
* Either a response body or a service error.
|
|
81
47
|
*/
|
|
@@ -127,6 +93,41 @@ export declare class ServiceError extends Error {
|
|
|
127
93
|
*/
|
|
128
94
|
static from_res(res: ResponseData): ServiceError;
|
|
129
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* We have to re-implement the promise methods instead of just existing
|
|
98
|
+
* the existing Promise class due to: https://github.com/microsoft/TypeScript/issues/15202
|
|
99
|
+
*/
|
|
100
|
+
export declare class ResponsePromise<T> implements Promise<T> {
|
|
101
|
+
private promise;
|
|
102
|
+
/**
|
|
103
|
+
* Implements Promise interface.
|
|
104
|
+
*/
|
|
105
|
+
[Symbol.toStringTag]: string;
|
|
106
|
+
constructor(promise: Promise<T>);
|
|
107
|
+
/**
|
|
108
|
+
* Implements Promise interface.
|
|
109
|
+
*/
|
|
110
|
+
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): ResponsePromise<TResult1 | TResult2>;
|
|
111
|
+
/**
|
|
112
|
+
* Implements Promise interface.
|
|
113
|
+
*/
|
|
114
|
+
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): ResponsePromise<T | TResult>;
|
|
115
|
+
/**
|
|
116
|
+
* Implements Promise interface.
|
|
117
|
+
*/
|
|
118
|
+
finally(onfinally?: (() => void) | null): ResponsePromise<T>;
|
|
119
|
+
/**
|
|
120
|
+
* Returns a promise that resolves to null if http status code
|
|
121
|
+
* or service error code matches one of the provided codes.
|
|
122
|
+
* If no codes are specified, all codes are ignored.
|
|
123
|
+
*/
|
|
124
|
+
ignore(...codes: number[]): ResponsePromise<T | null>;
|
|
125
|
+
/**
|
|
126
|
+
* Returns a promise that resolves to either the response body
|
|
127
|
+
* or a ServiceError.
|
|
128
|
+
*/
|
|
129
|
+
combine(...codes: number[]): Promise<EitherResponse<T>>;
|
|
130
|
+
}
|
|
130
131
|
/**
|
|
131
132
|
* BaseServiceClient contains the logic for executing http requests.
|
|
132
133
|
* This class is meant to be extended by the generated code.
|
package/lib/base.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAE9B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC,KAAK,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAE/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE3C,SAAS,CAAC,EAAE,WAAW,CAAC;IAGxB,MAAM,CAAC,EAAE,GAAG,CAAC;IAGb,KAAK,CAAC,EAAE,GAAG,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC5B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,GAAG,CAAC;CACV;AAED;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,GA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,WAAW;IA6BnB;;OAEG;IACH,OAAO,CAAC,SAAS;IAyBjB,OAAO,CAAC,SAAS;IAOjB;;;OAGG;YACW,KAAK;IA2BnB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAmBpB;;OAEG;IACH,OAAO,CAAC,WAAW;IAWnB;;OAEG;IACH,SAAS,CAAC,OAAO,CAChB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,GAAG,EACT,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,GAAG,CAAA;KAAE,GAAG,cAAmB,GAC5C,eAAe,CAAC,GAAG,CAAC;IAKvB;;;OAGG;YACW,QAAQ;CA6CtB"}
|
package/lib/base.js
CHANGED
|
@@ -13,64 +13,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
var _a;
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.BaseServiceClient = exports.
|
|
16
|
+
exports.BaseServiceClient = exports.ResponsePromise = exports.ServiceError = void 0;
|
|
17
|
+
/* eslint-disable max-classes-per-file */
|
|
17
18
|
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
18
|
-
/**
|
|
19
|
-
* We have to re-implement the promise methods instead of just existing
|
|
20
|
-
* the existing Promise class due to: https://github.com/microsoft/TypeScript/issues/15202
|
|
21
|
-
*/
|
|
22
|
-
class ResponsePromise {
|
|
23
|
-
constructor(promise) {
|
|
24
|
-
this.promise = promise;
|
|
25
|
-
/**
|
|
26
|
-
* Implements Promise interface.
|
|
27
|
-
*/
|
|
28
|
-
this[_a] = "[object ResponsePromise]";
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Implements Promise interface.
|
|
32
|
-
*/
|
|
33
|
-
then(onfulfilled, onrejected) {
|
|
34
|
-
return new ResponsePromise(this.promise.then(onfulfilled, onrejected));
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Implements Promise interface.
|
|
38
|
-
*/
|
|
39
|
-
catch(onrejected) {
|
|
40
|
-
return new ResponsePromise(this.promise.catch(onrejected));
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Implements Promise interface.
|
|
44
|
-
*/
|
|
45
|
-
finally(onfinally) {
|
|
46
|
-
return new ResponsePromise(this.promise.finally(onfinally));
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Returns a promise that resolves to null if http status code
|
|
50
|
-
* or service error code matches one of the provided codes.
|
|
51
|
-
* If no codes are specified, all codes are ignored.
|
|
52
|
-
*/
|
|
53
|
-
ignore(...codes) {
|
|
54
|
-
return new ResponsePromise(ServiceError.ignore(codes, this.promise));
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Returns a promise that resolves to either the response body
|
|
58
|
-
* or a ServiceError.
|
|
59
|
-
*/
|
|
60
|
-
combine(...codes) {
|
|
61
|
-
return new ResponsePromise(ServiceError.combine(codes, this.promise));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
exports.ResponsePromise = ResponsePromise;
|
|
65
|
-
_a = Symbol.toStringTag;
|
|
66
19
|
/**
|
|
67
20
|
* An error returned from an api service.
|
|
68
21
|
*/
|
|
69
22
|
class ServiceError extends Error {
|
|
70
23
|
constructor(status, // http status
|
|
71
24
|
code, // service error code
|
|
72
|
-
message
|
|
73
|
-
) {
|
|
25
|
+
message) {
|
|
74
26
|
super(message);
|
|
75
27
|
this.status = status;
|
|
76
28
|
this.code = code;
|
|
@@ -166,19 +118,21 @@ class ServiceError extends Error {
|
|
|
166
118
|
message = res.err.message;
|
|
167
119
|
}
|
|
168
120
|
else {
|
|
169
|
-
message =
|
|
121
|
+
message = 'Network Error';
|
|
170
122
|
}
|
|
171
123
|
code = 0;
|
|
172
124
|
}
|
|
173
125
|
else {
|
|
174
126
|
try {
|
|
175
|
-
|
|
127
|
+
const data = JSON.parse(res.body);
|
|
176
128
|
if (data.code && (data.message || data.error)) {
|
|
177
129
|
code = data.code;
|
|
178
130
|
message = data.message || data.error;
|
|
179
131
|
}
|
|
180
132
|
}
|
|
181
|
-
catch (
|
|
133
|
+
catch (_b) {
|
|
134
|
+
// ignore
|
|
135
|
+
}
|
|
182
136
|
}
|
|
183
137
|
const err = new ServiceError(res.status, code, message);
|
|
184
138
|
// override the stack trace so that it doesn't include the from_res helper.
|
|
@@ -189,6 +143,54 @@ class ServiceError extends Error {
|
|
|
189
143
|
}
|
|
190
144
|
}
|
|
191
145
|
exports.ServiceError = ServiceError;
|
|
146
|
+
/**
|
|
147
|
+
* We have to re-implement the promise methods instead of just existing
|
|
148
|
+
* the existing Promise class due to: https://github.com/microsoft/TypeScript/issues/15202
|
|
149
|
+
*/
|
|
150
|
+
class ResponsePromise {
|
|
151
|
+
constructor(promise) {
|
|
152
|
+
this.promise = promise;
|
|
153
|
+
/**
|
|
154
|
+
* Implements Promise interface.
|
|
155
|
+
*/
|
|
156
|
+
this[_a] = '[object ResponsePromise]';
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Implements Promise interface.
|
|
160
|
+
*/
|
|
161
|
+
then(onfulfilled, onrejected) {
|
|
162
|
+
return new ResponsePromise(this.promise.then(onfulfilled, onrejected));
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Implements Promise interface.
|
|
166
|
+
*/
|
|
167
|
+
catch(onrejected) {
|
|
168
|
+
return new ResponsePromise(this.promise.catch(onrejected));
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Implements Promise interface.
|
|
172
|
+
*/
|
|
173
|
+
finally(onfinally) {
|
|
174
|
+
return new ResponsePromise(this.promise.finally(onfinally));
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Returns a promise that resolves to null if http status code
|
|
178
|
+
* or service error code matches one of the provided codes.
|
|
179
|
+
* If no codes are specified, all codes are ignored.
|
|
180
|
+
*/
|
|
181
|
+
ignore(...codes) {
|
|
182
|
+
return new ResponsePromise(ServiceError.ignore(codes, this.promise));
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Returns a promise that resolves to either the response body
|
|
186
|
+
* or a ServiceError.
|
|
187
|
+
*/
|
|
188
|
+
combine(...codes) {
|
|
189
|
+
return new ResponsePromise(ServiceError.combine(codes, this.promise));
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
exports.ResponsePromise = ResponsePromise;
|
|
193
|
+
_a = Symbol.toStringTag;
|
|
192
194
|
/**
|
|
193
195
|
* BaseServiceClient contains the logic for executing http requests.
|
|
194
196
|
* This class is meant to be extended by the generated code.
|
|
@@ -211,7 +213,7 @@ class BaseServiceClient {
|
|
|
211
213
|
options.token = token;
|
|
212
214
|
}
|
|
213
215
|
const debug = process.env.P2_SDK_DEBUG;
|
|
214
|
-
if (debug && debug !==
|
|
216
|
+
if (debug && debug !== '0' && `${debug}`.toLowerCase() !== 'false') {
|
|
215
217
|
options.debug = true;
|
|
216
218
|
}
|
|
217
219
|
const base_url = process.env.P2_SDK_BASE_URL;
|
|
@@ -232,7 +234,7 @@ class BaseServiceClient {
|
|
|
232
234
|
/**
|
|
233
235
|
* Combine the route and query parameters into a full url.
|
|
234
236
|
*/
|
|
235
|
-
build_url(route, service, { base_url, stage =
|
|
237
|
+
build_url(route, service, { base_url, stage = 'dev' }, params) {
|
|
236
238
|
let url = `https://api.compassdigital.org/${stage}${route}`;
|
|
237
239
|
// use the base url if one was provided.
|
|
238
240
|
if (base_url) {
|
|
@@ -249,12 +251,12 @@ class BaseServiceClient {
|
|
|
249
251
|
}
|
|
250
252
|
}
|
|
251
253
|
if (query.length > 0) {
|
|
252
|
-
url +=
|
|
254
|
+
url += `?${query.join('&')}`;
|
|
253
255
|
}
|
|
254
256
|
return url;
|
|
255
257
|
}
|
|
256
258
|
clean_url(url) {
|
|
257
|
-
if (url.endsWith(
|
|
259
|
+
if (url.endsWith('/')) {
|
|
258
260
|
url = url.slice(0, -1);
|
|
259
261
|
}
|
|
260
262
|
return url;
|
|
@@ -273,6 +275,8 @@ class BaseServiceClient {
|
|
|
273
275
|
method: req.method,
|
|
274
276
|
body: req.body,
|
|
275
277
|
headers: req.headers,
|
|
278
|
+
// @ts-ignore
|
|
279
|
+
agent: options === null || options === void 0 ? void 0 : options.agent,
|
|
276
280
|
});
|
|
277
281
|
return {
|
|
278
282
|
ok: res.ok,
|
|
@@ -284,8 +288,8 @@ class BaseServiceClient {
|
|
|
284
288
|
return {
|
|
285
289
|
ok: false,
|
|
286
290
|
status: 0,
|
|
287
|
-
body:
|
|
288
|
-
err
|
|
291
|
+
body: '',
|
|
292
|
+
err,
|
|
289
293
|
};
|
|
290
294
|
}
|
|
291
295
|
});
|
|
@@ -334,11 +338,9 @@ class BaseServiceClient {
|
|
|
334
338
|
return __awaiter(this, void 0, void 0, function* () {
|
|
335
339
|
options = this.get_options(options);
|
|
336
340
|
const url = this.build_url(route, service, options, (_b = options.query) !== null && _b !== void 0 ? _b : {});
|
|
337
|
-
const headers = Object.assign({
|
|
338
|
-
"User-Agent": "CDL/ServiceClient"
|
|
339
|
-
}, options.headers);
|
|
341
|
+
const headers = Object.assign({ 'User-Agent': 'CDL/ServiceClient' }, options.headers);
|
|
340
342
|
if (options.token) {
|
|
341
|
-
headers
|
|
343
|
+
headers.Authorization = `Bearer ${options.token}`;
|
|
342
344
|
}
|
|
343
345
|
const req = { name, service, url, method, headers };
|
|
344
346
|
if (body) {
|
|
@@ -353,8 +355,8 @@ class BaseServiceClient {
|
|
|
353
355
|
if (options.debug) {
|
|
354
356
|
console.log(`ERR(${res.status})`, url, err.message);
|
|
355
357
|
}
|
|
356
|
-
if (typeof options.retry ===
|
|
357
|
-
options.retry
|
|
358
|
+
if (typeof options.retry === 'number' && options.retry > 0 && this.should_retry(res)) {
|
|
359
|
+
options.retry -= 1;
|
|
358
360
|
return this.request(service, name, method, route, body, options);
|
|
359
361
|
}
|
|
360
362
|
if (options.throws) {
|
package/lib/base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAyC;AACzC,8DAAgC;AA+EhC;;GAEG;AACH,MAAa,YAAa,SAAQ,KAAK;IACtC,YACQ,MAAc,EAAE,cAAc;IAC9B,IAAY,EAAE,qBAAqB;IAC1C,OAAe;QAEf,KAAK,CAAC,OAAO,CAAC,CAAC;QAJR,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAQ;QAInB,IAAI,CAAC,IAAI,GAAG,gBAAgB,IAAI,GAAG,CAAC;QAEpC,0DAA0D;QAC1D,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,GAAQ;QACrB,IAAI,GAAG,YAAY,YAAY,EAAE;YAChC,OAAO,GAAG,CAAC,MAAM,CAAC;SAClB;QACD,OAAO,CAAC,CAAC,CAAC;IACX,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,IAAI,CAAC,GAAQ;QACnB,IAAI,GAAG,YAAY,YAAY,EAAE;YAChC,OAAO,GAAG,CAAC,IAAI,CAAC;SAChB;QACD,OAAO,CAAC,CAAC,CAAC;IACX,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAO,MAAM,CAAI,KAAe,EAAE,QAAoB;;YAC3D,IAAI;gBACH,OAAO,MAAM,QAAQ,CAAC;aACtB;YAAC,OAAO,GAAG,EAAE;gBACb,IAAI,YAAY,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE;oBACpC,OAAO,IAAI,CAAC;iBACZ;gBACD,MAAM,GAAG,CAAC;aACV;QACF,CAAC;KAAA;IAED;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AAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;iBACjE;gBACD,IAAI,OAAO,CAAC,MAAM,EAAE;oBACnB,MAAM,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;iBACpD;gBACD,MAAM,GAAG,CAAC;aACV;YACD,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;YACxD,IAAI,OAAO,CAAC,KAAK,EAAE;gBAClB,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;aACtE;YACD,OAAO,IAAI,CAAC;;KACZ;CACD;AAjND,8CAiNC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { GetReportAnalyticsGroupQuery, GetReportAnalyticsGroupResponse, GetRepor
|
|
|
15
15
|
import { GetUserAuthQuery, GetUserAuthResponse, PostUserAuthBody, PostUserAuthResponse, PostUserOauthBody, PostUserOauthResponse, GetUserZendeskQuery, GetUserZendeskResponse, PostUserQuery, PostUserBody, PostUserResponse, GetUserQuery, GetUserResponse, PutUserQuery, PutUserBody, PutUserResponse, PatchUserQuery, PatchUserBody, PatchUserResponse, DeleteUserQuery, DeleteUserResponse, PostUserKdsTokenBody, PostUserKdsTokenResponse, GetUserKdsTokenQuery, GetUserKdsTokenResponse, DeleteUserDeviceAuthResponse, PatchUserAuthKdsResponse, PostUserChangePasswordBody, PostUserChangePasswordResponse, DeleteUserLogoutResponse, PostUserAddSecretBody, PostUserAddSecretResponse, GetUserSecretQuery, GetUserSecretResponse, PostUserResetPasswordQuery, PostUserResetPasswordBody, PostUserResetPasswordResponse, PostUserResetPasswordTokenQuery, PostUserResetPasswordTokenBody, PostUserResetPasswordTokenResponse, GetUserRealmUsersQuery, GetUserRealmUsersResponse, GetUserPermissionsQuery, GetUserPermissionsResponse, PutUserPermissionsQuery, PutUserPermissionsBody, PutUserPermissionsResponse, PostUserCheckInBody, PostUserCheckInResponse, PatchUserCheckinBody, PatchUserCheckinResponse, GetUserSearchCheckInQuery, GetUserSearchCheckInResponse, PostUserSendEmailVerificationResponse, PutUserVerifyUserEmailBody, PutUserVerifyUserEmailResponse, PostUserGuestUserBody, PostUserGuestUserResponse, PostUserGuestTokenBody, PostUserGuestTokenResponse, PostUserEmbedurlBody, PostUserEmbedurlResponse } from "./interface/user";
|
|
16
16
|
import { GetCalendarQuery, GetCalendarResponse, PutCalendarBody, PutCalendarResponse, DeleteCalendarResponse, GetCalendarCdlQuery, GetCalendarCdlResponse, GetCalendarSwaggerQuery, GetCalendarSwaggerResponse, PostCalendarSyncResponse } from "./interface/calendar";
|
|
17
17
|
import { PostFileBody, PostFileResponse, DeleteFileBody, DeleteFileResponse } from "./interface/file";
|
|
18
|
-
import { GetMenuClientQuery, GetMenuClientResponse, GetMenusQuery, GetMenusResponse, PostMenuBody, PostMenuResponse, HeadMenuQuery, HeadMenuResponse, GetMenuQuery, GetMenuResponse, PutMenuQuery, PutMenuBody, PutMenuResponse, DeleteMenuQuery, DeleteMenuResponse, PatchMenuQuery, PatchMenuBody, PatchMenuResponse, PostMenuImportMenuBody, PostMenuImportMenuResponse, GetMenuItemQuery, GetMenuItemResponse, DeleteMenuItemResponse, PostMenuItemBody, PostMenuItemResponse, GetMenuItemsQuery, GetMenuItemsResponse, PostMenuImportItemsCanteenResponse, GetMenuLocationItemsQuery, GetMenuLocationItemsResponse, GetMenuLocationItemRandomQuery, GetMenuLocationItemRandomResponse, GetMenuLocationItemsRandomQuery, GetMenuLocationItemsRandomResponse, GetMenuSectorMenusQuery, GetMenuSectorMenusResponse, GetMenuCompanyMenusQuery, GetMenuCompanyMenusResponse, PostMenuModifierGroupBody, PostMenuModifierGroupResponse, GetMenuModifierGroupQuery, GetMenuModifierGroupResponse, PutMenuModifierGroupBody, PutMenuModifierGroupResponse, DeleteMenuModifierGroupResponse, GetMenuCompanyModifierGroupsQuery, GetMenuCompanyModifierGroupsResponse, GetMenuCompanyModifierGroupsExportQuery, GetMenuCompanyModifierGroupsExportResponse, GetMenuExportQuery, GetMenuExportResponse, GetMenuPartialGroupsQuery, GetMenuPartialGroupsResponse, GetMenuPartialGroupItemsQuery, GetMenuPartialGroupItemsResponse, PostMenuPartialGroupItemOptionsQuery, PostMenuPartialGroupItemOptionsBody, PostMenuPartialGroupItemOptionsResponse, PostMenuV3LocalMenuGroupBody, PostMenuV3LocalMenuGroupResponse, GetMenuV3LocalMenuGroupQuery, GetMenuV3LocalMenuGroupResponse, PatchMenuV3LocalMenuGroupBody, PatchMenuV3LocalMenuGroupResponse, DeleteMenuV3LocalMenuGroupResponse, GetMenuV3LocalMenuGroupsQuery, GetMenuV3LocalMenuGroupsResponse, PostMenuV3LocalMenuGroupsBody, PostMenuV3LocalMenuGroupsResponse, GetMenuV3LocalMenuGroupsCountQuery, GetMenuV3LocalMenuGroupsCountResponse, GetMenuV3DraftLocalMenuGroupBrandsQuery, GetMenuV3DraftLocalMenuGroupBrandsResponse, GetMenuV3LocalMenuGroupBrandsQuery, GetMenuV3LocalMenuGroupBrandsResponse, GetMenuV3LocalMenuGroupAllowedGlobalBrandsQuery, GetMenuV3LocalMenuGroupAllowedGlobalBrandsResponse, PostMenuV3LocalMenuGroupImportBrandsQuery, PostMenuV3LocalMenuGroupImportBrandsResponse, PostMenuV3GlobalMenuGroupBody, PostMenuV3GlobalMenuGroupResponse, GetMenuV3GlobalMenuGroupQuery, GetMenuV3GlobalMenuGroupResponse, PatchMenuV3GlobalMenuGroupBody, PatchMenuV3GlobalMenuGroupResponse, DeleteMenuV3GlobalMenuGroupQuery, DeleteMenuV3GlobalMenuGroupResponse, GetMenuV3GlobalMenuGroupsQuery, GetMenuV3GlobalMenuGroupsResponse, PostMenuV3GlobalMenuGroupsBody, PostMenuV3GlobalMenuGroupsResponse, GetMenuV3GlobalMenuGroupsCountQuery, GetMenuV3GlobalMenuGroupsCountResponse, GetMenuV3DraftGlobalMenuGroupBrandsQuery, GetMenuV3DraftGlobalMenuGroupBrandsResponse, GetMenuV3GlobalMenuGroupBrandsQuery, GetMenuV3GlobalMenuGroupBrandsResponse, PostMenuV3DraftBrandBody, PostMenuV3DraftBrandResponse, GetMenuV3DraftBrandQuery, GetMenuV3DraftBrandResponse, PatchMenuV3DraftBrandBody, PatchMenuV3DraftBrandResponse, DeleteMenuV3DraftBrandResponse, GetMenuV3DraftBrandsQuery, GetMenuV3DraftBrandsResponse, PostMenuV3DraftBrandsBody, PostMenuV3DraftBrandsResponse, GetMenuV3DraftBrandsCountQuery, GetMenuV3DraftBrandsCountResponse, GetMenuV3DraftBrandMenusQuery, GetMenuV3DraftBrandMenusResponse, GetMenuV3DraftBrandModifiersQuery, GetMenuV3DraftBrandModifiersResponse, GetMenuV3DraftBrandModifierGroupsQuery, GetMenuV3DraftBrandModifierGroupsResponse, GetMenuV3DraftBrandItemsQuery, GetMenuV3DraftBrandItemsResponse, GetMenuV3DraftBrandItemsReportingCategoriesQuery, GetMenuV3DraftBrandItemsReportingCategoriesResponse, GetMenuV3DraftBrandModifiersReportingCategoriesQuery, GetMenuV3DraftBrandModifiersReportingCategoriesResponse, PostMenuV3DraftBrandPublishResponse, PostMenuV3DraftBrandDiffGenerateResponse, GetMenuV3DraftBrandDiffsQuery, GetMenuV3DraftBrandDiffsResponse, PostMenuV3DraftBrandGlobalDiffsApplyQuery, PostMenuV3DraftBrandGlobalDiffsApplyResponse, PostMenuV3BrandAttachmentQuery, PostMenuV3BrandAttachmentResponse, PostMenuV3BrandQuery, PostMenuV3BrandBody, PostMenuV3BrandResponse, GetMenuV3BrandQuery, GetMenuV3BrandResponse, PatchMenuV3BrandQuery, PatchMenuV3BrandBody, PatchMenuV3BrandResponse, DeleteMenuV3BrandQuery, DeleteMenuV3BrandResponse, GetMenuV3BrandsQuery, GetMenuV3BrandsResponse, PostMenuV3BrandsQuery, PostMenuV3BrandsBody, PostMenuV3BrandsResponse, GetMenuV3BrandsCountQuery, GetMenuV3BrandsCountResponse, GetMenuV3BrandMenusQuery, GetMenuV3BrandMenusResponse, GetMenuV3BrandModifiersQuery, GetMenuV3BrandModifiersResponse, GetMenuV3BrandModifierGroupsQuery, GetMenuV3BrandModifierGroupsResponse, GetMenuV3BrandItemsQuery, GetMenuV3BrandItemsResponse, PostMenuV3BrandLocalQuery, PostMenuV3BrandLocalResponse, PostMenuV3DraftMenuBody, PostMenuV3DraftMenuResponse, GetMenuV3DraftMenuQuery, GetMenuV3DraftMenuResponse, PatchMenuV3DraftMenuBody, PatchMenuV3DraftMenuResponse, DeleteMenuV3DraftMenuResponse, GetMenuV3DraftMenusQuery, GetMenuV3DraftMenusResponse, PostMenuV3DraftMenusBody, PostMenuV3DraftMenusResponse, GetMenuV3DraftMenusCountQuery, GetMenuV3DraftMenusCountResponse, GetMenuV3DraftMenuCategoriesQuery, GetMenuV3DraftMenuCategoriesResponse, PostMenuV3DraftMenuPublishResponse, GetMenuV3MenuQuery, GetMenuV3MenuResponse, GetMenuV3MenusQuery, GetMenuV3MenusResponse, GetMenuV3MenusCountQuery, GetMenuV3MenusCountResponse, GetMenuV3MenuCategoriesQuery, GetMenuV3MenuCategoriesResponse, PostMenuV3DraftCategoryBody, PostMenuV3DraftCategoryResponse, GetMenuV3DraftCategoryQuery, GetMenuV3DraftCategoryResponse, PatchMenuV3DraftCategoryBody, PatchMenuV3DraftCategoryResponse, DeleteMenuV3DraftCategoryResponse, GetMenuV3DraftCategoriesCountQuery, GetMenuV3DraftCategoriesCountResponse, PostMenuV3DraftCategoriesBody, PostMenuV3DraftCategoriesResponse, GetMenuV3CategoryQuery, GetMenuV3CategoryResponse, GetMenuV3CategorysCountQuery, GetMenuV3CategorysCountResponse, PostMenuV3DraftCategoryRelationshipsItemBody, PostMenuV3DraftCategoryRelationshipsItemResponse, GetMenuV3DraftCategoryRelationshipsItemQuery, GetMenuV3DraftCategoryRelationshipsItemResponse, PatchMenuV3DraftCategoryRelationshipsItemBody, PatchMenuV3DraftCategoryRelationshipsItemResponse, DeleteMenuV3DraftCategoryRelationshipsItemResponse, GetMenuV3DraftCategoryRelationshipsItemsQuery, GetMenuV3DraftCategoryRelationshipsItemsResponse, PostMenuV3DraftCategoryRelationshipsItemsBody, PostMenuV3DraftCategoryRelationshipsItemsResponse, GetMenuV3DraftCategoryRelationshipsItemsCountQuery, GetMenuV3DraftCategoryRelationshipsItemsCountResponse, GetMenuV3CategoryRelationshipsModifierGroupQuery, GetMenuV3CategoryRelationshipsModifierGroupResponse, GetMenuV3CategoryRelationshipsModifierGroupsQuery, GetMenuV3CategoryRelationshipsModifierGroupsResponse, GetMenuV3CategoryRelationshipsModifierGroupsCountQuery, GetMenuV3CategoryRelationshipsModifierGroupsCountResponse, PostMenuV3DraftItemBody, PostMenuV3DraftItemResponse, GetMenuV3DraftItemQuery, GetMenuV3DraftItemResponse, PatchMenuV3DraftItemBody, PatchMenuV3DraftItemResponse, DeleteMenuV3DraftItemResponse, GetMenuV3DraftItemsQuery, GetMenuV3DraftItemsResponse, PostMenuV3DraftItemsBody, PostMenuV3DraftItemsResponse, GetMenuV3DraftItemsCountQuery, GetMenuV3DraftItemsCountResponse, PostMenuV3ItemAttachmentQuery, PostMenuV3ItemAttachmentResponse, GetMenuV3ItemQuery, GetMenuV3ItemResponse, GetMenuV3ItemsQuery, GetMenuV3ItemsResponse, GetMenuV3ItemsCountQuery, GetMenuV3ItemsCountResponse, PostMenuV3DraftItemRelationshipsModifierGroupBody, PostMenuV3DraftItemRelationshipsModifierGroupResponse, GetMenuV3DraftItemRelationshipsModifierGroupQuery, GetMenuV3DraftItemRelationshipsModifierGroupResponse, PatchMenuV3DraftItemRelationshipsModifierGroupBody, PatchMenuV3DraftItemRelationshipsModifierGroupResponse, DeleteMenuV3DraftItemRelationshipsModifierGroupResponse, GetMenuV3DraftItemRelationshipsModifierGroupsQuery, GetMenuV3DraftItemRelationshipsModifierGroupsResponse, PostMenuV3DraftItemRelationshipsModifierGroupsBody, PostMenuV3DraftItemRelationshipsModifierGroupsResponse, GetMenuV3DraftItemRelationshipsModifierGroupsCountQuery, GetMenuV3DraftItemRelationshipsModifierGroupsCountResponse, GetMenuV3ItemRelationshipsModifierGroupQuery, GetMenuV3ItemRelationshipsModifierGroupResponse, GetMenuV3ItemRelationshipsModifierGroupsQuery, GetMenuV3ItemRelationshipsModifierGroupsResponse, GetMenuV3ItemRelationshipsModifierGroupsCountQuery, GetMenuV3ItemRelationshipsModifierGroupsCountResponse, PostMenuV3DraftModifierGroupBody, PostMenuV3DraftModifierGroupResponse, GetMenuV3DraftModifierGroupQuery, GetMenuV3DraftModifierGroupResponse, PatchMenuV3DraftModifierGroupBody, PatchMenuV3DraftModifierGroupResponse, DeleteMenuV3DraftModifierGroupResponse, GetMenuV3DraftModifierGroupsQuery, GetMenuV3DraftModifierGroupsResponse, PostMenuV3DraftModifierGroupsBody, PostMenuV3DraftModifierGroupsResponse, GetMenuV3DraftModifierGroupsCountQuery, GetMenuV3DraftModifierGroupsCountResponse, GetMenuV3ModifierGroupQuery, GetMenuV3ModifierGroupResponse, GetMenuV3ModifierGroupsQuery, GetMenuV3ModifierGroupsResponse, GetMenuV3ModifierGroupsCountQuery, GetMenuV3ModifierGroupsCountResponse, PostMenuV3DraftModifierGroupRelationshipsModifierBody, PostMenuV3DraftModifierGroupRelationshipsModifierResponse, GetMenuV3DraftModifierGroupRelationshipsModifierQuery, GetMenuV3DraftModifierGroupRelationshipsModifierResponse, PatchMenuV3DraftModifierGroupRelationshipsModifierBody, PatchMenuV3DraftModifierGroupRelationshipsModifierResponse, DeleteMenuV3DraftModifierGroupRelationshipsModifierResponse, GetMenuV3DraftModifierGroupRelationshipsModifiersQuery, GetMenuV3DraftModifierGroupRelationshipsModifiersResponse, PostMenuV3DraftModifierGroupRelationshipsModifiersBody, PostMenuV3DraftModifierGroupRelationshipsModifiersResponse, GetMenuV3DraftModifierGroupRelationshipsModifiersCountQuery, GetMenuV3DraftModifierGroupRelationshipsModifiersCountResponse, GetMenuV3ModifierGroupRelationshipsModifierQuery, GetMenuV3ModifierGroupRelationshipsModifierResponse, GetMenuV3ModifierGroupRelationshipsModifiersQuery, GetMenuV3ModifierGroupRelationshipsModifiersResponse, GetMenuV3ModifierGroupRelationshipsModifiersCountQuery, GetMenuV3ModifierGroupRelationshipsModifiersCountResponse, PostMenuV3DraftModifierBody, PostMenuV3DraftModifierResponse, GetMenuV3DraftModifierQuery, GetMenuV3DraftModifierResponse, PatchMenuV3DraftModifierBody, PatchMenuV3DraftModifierResponse, DeleteMenuV3DraftModifierResponse, GetMenuV3DraftModifiersQuery, GetMenuV3DraftModifiersResponse, PostMenuV3DraftModifiersBody, PostMenuV3DraftModifiersResponse, GetMenuV3DraftModifiersCountQuery, GetMenuV3DraftModifiersCountResponse, GetMenuV3ModifierQuery, GetMenuV3ModifierResponse, GetMenuV3ModifiersQuery, GetMenuV3ModifiersResponse, GetMenuV3ModifiersCountQuery, GetMenuV3ModifiersCountResponse, PostMenuV3IntegrationsTransltrImportQuery, PostMenuV3IntegrationsTransltrImportResponse, GetMenuV3GlobalDiffQuery, GetMenuV3GlobalDiffResponse, GetMenuV3GlobalDiffsQuery, GetMenuV3GlobalDiffsResponse, GetMenuV3GlobalDiffsCountQuery, GetMenuV3GlobalDiffsCountResponse } from "./interface/menu";
|
|
18
|
+
import { GetMenuClientQuery, GetMenuClientResponse, GetMenusQuery, GetMenusResponse, PostMenuBody, PostMenuResponse, HeadMenuQuery, HeadMenuResponse, GetMenuQuery, GetMenuResponse, PutMenuQuery, PutMenuBody, PutMenuResponse, DeleteMenuQuery, DeleteMenuResponse, PatchMenuQuery, PatchMenuBody, PatchMenuResponse, PostMenuImportMenuBody, PostMenuImportMenuResponse, GetMenuItemQuery, GetMenuItemResponse, DeleteMenuItemResponse, PostMenuItemBody, PostMenuItemResponse, GetMenuItemsQuery, GetMenuItemsResponse, PostMenuImportItemsCanteenResponse, GetMenuLocationItemsQuery, GetMenuLocationItemsResponse, GetMenuLocationItemRandomQuery, GetMenuLocationItemRandomResponse, GetMenuLocationItemsRandomQuery, GetMenuLocationItemsRandomResponse, GetMenuSectorMenusQuery, GetMenuSectorMenusResponse, GetMenuCompanyMenusQuery, GetMenuCompanyMenusResponse, PostMenuModifierGroupBody, PostMenuModifierGroupResponse, GetMenuModifierGroupQuery, GetMenuModifierGroupResponse, PutMenuModifierGroupBody, PutMenuModifierGroupResponse, DeleteMenuModifierGroupResponse, GetMenuCompanyModifierGroupsQuery, GetMenuCompanyModifierGroupsResponse, GetMenuCompanyModifierGroupsExportQuery, GetMenuCompanyModifierGroupsExportResponse, GetMenuExportQuery, GetMenuExportResponse, GetMenuPartialGroupsQuery, GetMenuPartialGroupsResponse, GetMenuPartialGroupItemsQuery, GetMenuPartialGroupItemsResponse, PostMenuPartialGroupItemOptionsQuery, PostMenuPartialGroupItemOptionsBody, PostMenuPartialGroupItemOptionsResponse, PostMenuV3LocalMenuGroupBody, PostMenuV3LocalMenuGroupResponse, GetMenuV3LocalMenuGroupQuery, GetMenuV3LocalMenuGroupResponse, PatchMenuV3LocalMenuGroupBody, PatchMenuV3LocalMenuGroupResponse, DeleteMenuV3LocalMenuGroupResponse, GetMenuV3LocalMenuGroupsQuery, GetMenuV3LocalMenuGroupsResponse, PostMenuV3LocalMenuGroupsBody, PostMenuV3LocalMenuGroupsResponse, GetMenuV3LocalMenuGroupsCountQuery, GetMenuV3LocalMenuGroupsCountResponse, GetMenuV3DraftLocalMenuGroupBrandsQuery, GetMenuV3DraftLocalMenuGroupBrandsResponse, GetMenuV3LocalMenuGroupBrandsQuery, GetMenuV3LocalMenuGroupBrandsResponse, GetMenuV3LocalMenuGroupAllowedGlobalBrandsQuery, GetMenuV3LocalMenuGroupAllowedGlobalBrandsResponse, PostMenuV3LocalMenuGroupImportBrandsQuery, PostMenuV3LocalMenuGroupImportBrandsResponse, PostMenuV3GlobalMenuGroupBody, PostMenuV3GlobalMenuGroupResponse, GetMenuV3GlobalMenuGroupQuery, GetMenuV3GlobalMenuGroupResponse, PatchMenuV3GlobalMenuGroupBody, PatchMenuV3GlobalMenuGroupResponse, DeleteMenuV3GlobalMenuGroupQuery, DeleteMenuV3GlobalMenuGroupResponse, GetMenuV3GlobalMenuGroupsQuery, GetMenuV3GlobalMenuGroupsResponse, PostMenuV3GlobalMenuGroupsBody, PostMenuV3GlobalMenuGroupsResponse, GetMenuV3GlobalMenuGroupsCountQuery, GetMenuV3GlobalMenuGroupsCountResponse, GetMenuV3DraftGlobalMenuGroupBrandsQuery, GetMenuV3DraftGlobalMenuGroupBrandsResponse, GetMenuV3GlobalMenuGroupBrandsQuery, GetMenuV3GlobalMenuGroupBrandsResponse, PostMenuV3DraftBrandBody, PostMenuV3DraftBrandResponse, GetMenuV3DraftBrandQuery, GetMenuV3DraftBrandResponse, PatchMenuV3DraftBrandBody, PatchMenuV3DraftBrandResponse, DeleteMenuV3DraftBrandResponse, GetMenuV3DraftBrandsQuery, GetMenuV3DraftBrandsResponse, PostMenuV3DraftBrandsBody, PostMenuV3DraftBrandsResponse, GetMenuV3DraftBrandsCountQuery, GetMenuV3DraftBrandsCountResponse, GetMenuV3DraftBrandMenusQuery, GetMenuV3DraftBrandMenusResponse, GetMenuV3DraftBrandModifiersQuery, GetMenuV3DraftBrandModifiersResponse, GetMenuV3DraftBrandModifierGroupsQuery, GetMenuV3DraftBrandModifierGroupsResponse, GetMenuV3DraftBrandItemsQuery, GetMenuV3DraftBrandItemsResponse, GetMenuV3DraftBrandItemsReportingCategoriesQuery, GetMenuV3DraftBrandItemsReportingCategoriesResponse, GetMenuV3DraftBrandModifiersReportingCategoriesQuery, GetMenuV3DraftBrandModifiersReportingCategoriesResponse, PostMenuV3DraftBrandPublishResponse, PostMenuV3DraftBrandDiffGenerateResponse, GetMenuV3DraftBrandDiffsQuery, GetMenuV3DraftBrandDiffsResponse, PostMenuV3DraftBrandGlobalDiffsApplyQuery, PostMenuV3DraftBrandGlobalDiffsApplyResponse, PostMenuV3BrandAttachmentQuery, PostMenuV3BrandAttachmentResponse, PostMenuV3BrandQuery, PostMenuV3BrandBody, PostMenuV3BrandResponse, GetMenuV3BrandQuery, GetMenuV3BrandResponse, PatchMenuV3BrandQuery, PatchMenuV3BrandBody, PatchMenuV3BrandResponse, DeleteMenuV3BrandQuery, DeleteMenuV3BrandResponse, GetMenuV3BrandsQuery, GetMenuV3BrandsResponse, PostMenuV3BrandsQuery, PostMenuV3BrandsBody, PostMenuV3BrandsResponse, GetMenuV3BrandsCountQuery, GetMenuV3BrandsCountResponse, GetMenuV3BrandMenusQuery, GetMenuV3BrandMenusResponse, GetMenuV3BrandModifiersQuery, GetMenuV3BrandModifiersResponse, GetMenuV3BrandModifierGroupsQuery, GetMenuV3BrandModifierGroupsResponse, GetMenuV3BrandItemsQuery, GetMenuV3BrandItemsResponse, PostMenuV3BrandLocalQuery, PostMenuV3BrandLocalResponse, PostMenuV3DraftMenuBody, PostMenuV3DraftMenuResponse, GetMenuV3DraftMenuQuery, GetMenuV3DraftMenuResponse, PatchMenuV3DraftMenuBody, PatchMenuV3DraftMenuResponse, DeleteMenuV3DraftMenuResponse, GetMenuV3DraftMenusQuery, GetMenuV3DraftMenusResponse, PostMenuV3DraftMenusBody, PostMenuV3DraftMenusResponse, GetMenuV3DraftMenusCountQuery, GetMenuV3DraftMenusCountResponse, GetMenuV3DraftMenuCategoriesQuery, GetMenuV3DraftMenuCategoriesResponse, PostMenuV3DraftMenuPublishResponse, GetMenuV3MenuQuery, GetMenuV3MenuResponse, GetMenuV3MenusQuery, GetMenuV3MenusResponse, GetMenuV3MenusCountQuery, GetMenuV3MenusCountResponse, GetMenuV3MenuCategoriesQuery, GetMenuV3MenuCategoriesResponse, PostMenuV3DraftCategoryBody, PostMenuV3DraftCategoryResponse, GetMenuV3DraftCategoryQuery, GetMenuV3DraftCategoryResponse, PatchMenuV3DraftCategoryBody, PatchMenuV3DraftCategoryResponse, DeleteMenuV3DraftCategoryResponse, GetMenuV3DraftCategoriesCountQuery, GetMenuV3DraftCategoriesCountResponse, PostMenuV3DraftCategoriesBody, PostMenuV3DraftCategoriesResponse, GetMenuV3CategoryQuery, GetMenuV3CategoryResponse, GetMenuV3CategorysCountQuery, GetMenuV3CategorysCountResponse, PostMenuV3DraftCategoryRelationshipsItemBody, PostMenuV3DraftCategoryRelationshipsItemResponse, GetMenuV3DraftCategoryRelationshipsItemQuery, GetMenuV3DraftCategoryRelationshipsItemResponse, PatchMenuV3DraftCategoryRelationshipsItemBody, PatchMenuV3DraftCategoryRelationshipsItemResponse, DeleteMenuV3DraftCategoryRelationshipsItemResponse, GetMenuV3DraftCategoryRelationshipsItemsQuery, GetMenuV3DraftCategoryRelationshipsItemsResponse, PostMenuV3DraftCategoryRelationshipsItemsBody, PostMenuV3DraftCategoryRelationshipsItemsResponse, GetMenuV3DraftCategoryRelationshipsItemsCountQuery, GetMenuV3DraftCategoryRelationshipsItemsCountResponse, GetMenuV3CategoryRelationshipsModifierGroupQuery, GetMenuV3CategoryRelationshipsModifierGroupResponse, GetMenuV3CategoryRelationshipsModifierGroupsQuery, GetMenuV3CategoryRelationshipsModifierGroupsResponse, GetMenuV3CategoryRelationshipsModifierGroupsCountQuery, GetMenuV3CategoryRelationshipsModifierGroupsCountResponse, PostMenuV3DraftItemBody, PostMenuV3DraftItemResponse, GetMenuV3DraftItemQuery, GetMenuV3DraftItemResponse, PatchMenuV3DraftItemBody, PatchMenuV3DraftItemResponse, DeleteMenuV3DraftItemResponse, GetMenuV3DraftItemsQuery, GetMenuV3DraftItemsResponse, PostMenuV3DraftItemsBody, PostMenuV3DraftItemsResponse, GetMenuV3DraftItemsCountQuery, GetMenuV3DraftItemsCountResponse, PatchMenuV3DraftItemsBulkUpdateBody, PatchMenuV3DraftItemsBulkUpdateResponse, PostMenuV3ItemAttachmentQuery, PostMenuV3ItemAttachmentResponse, PostMenuV3ItemsImportQuery, PostMenuV3ItemsImportResponse, GetMenuV3ItemQuery, GetMenuV3ItemResponse, GetMenuV3ItemsQuery, GetMenuV3ItemsResponse, GetMenuV3ItemsCountQuery, GetMenuV3ItemsCountResponse, PostMenuV3DraftItemRelationshipsModifierGroupBody, PostMenuV3DraftItemRelationshipsModifierGroupResponse, GetMenuV3DraftItemRelationshipsModifierGroupQuery, GetMenuV3DraftItemRelationshipsModifierGroupResponse, PatchMenuV3DraftItemRelationshipsModifierGroupBody, PatchMenuV3DraftItemRelationshipsModifierGroupResponse, DeleteMenuV3DraftItemRelationshipsModifierGroupResponse, GetMenuV3DraftItemRelationshipsModifierGroupsQuery, GetMenuV3DraftItemRelationshipsModifierGroupsResponse, PostMenuV3DraftItemRelationshipsModifierGroupsBody, PostMenuV3DraftItemRelationshipsModifierGroupsResponse, GetMenuV3DraftItemRelationshipsModifierGroupsCountQuery, GetMenuV3DraftItemRelationshipsModifierGroupsCountResponse, GetMenuV3ItemRelationshipsModifierGroupQuery, GetMenuV3ItemRelationshipsModifierGroupResponse, GetMenuV3ItemRelationshipsModifierGroupsQuery, GetMenuV3ItemRelationshipsModifierGroupsResponse, GetMenuV3ItemRelationshipsModifierGroupsCountQuery, GetMenuV3ItemRelationshipsModifierGroupsCountResponse, PostMenuV3DraftModifierGroupBody, PostMenuV3DraftModifierGroupResponse, GetMenuV3DraftModifierGroupQuery, GetMenuV3DraftModifierGroupResponse, PatchMenuV3DraftModifierGroupBody, PatchMenuV3DraftModifierGroupResponse, DeleteMenuV3DraftModifierGroupResponse, GetMenuV3DraftModifierGroupsQuery, GetMenuV3DraftModifierGroupsResponse, PostMenuV3DraftModifierGroupsBody, PostMenuV3DraftModifierGroupsResponse, GetMenuV3DraftModifierGroupsCountQuery, GetMenuV3DraftModifierGroupsCountResponse, GetMenuV3ModifierGroupQuery, GetMenuV3ModifierGroupResponse, GetMenuV3ModifierGroupsQuery, GetMenuV3ModifierGroupsResponse, GetMenuV3ModifierGroupsCountQuery, GetMenuV3ModifierGroupsCountResponse, PostMenuV3DraftModifierGroupRelationshipsModifierBody, PostMenuV3DraftModifierGroupRelationshipsModifierResponse, GetMenuV3DraftModifierGroupRelationshipsModifierQuery, GetMenuV3DraftModifierGroupRelationshipsModifierResponse, PatchMenuV3DraftModifierGroupRelationshipsModifierBody, PatchMenuV3DraftModifierGroupRelationshipsModifierResponse, DeleteMenuV3DraftModifierGroupRelationshipsModifierResponse, GetMenuV3DraftModifierGroupRelationshipsModifiersQuery, GetMenuV3DraftModifierGroupRelationshipsModifiersResponse, PostMenuV3DraftModifierGroupRelationshipsModifiersBody, PostMenuV3DraftModifierGroupRelationshipsModifiersResponse, GetMenuV3DraftModifierGroupRelationshipsModifiersCountQuery, GetMenuV3DraftModifierGroupRelationshipsModifiersCountResponse, GetMenuV3ModifierGroupRelationshipsModifierQuery, GetMenuV3ModifierGroupRelationshipsModifierResponse, GetMenuV3ModifierGroupRelationshipsModifiersQuery, GetMenuV3ModifierGroupRelationshipsModifiersResponse, GetMenuV3ModifierGroupRelationshipsModifiersCountQuery, GetMenuV3ModifierGroupRelationshipsModifiersCountResponse, PostMenuV3DraftModifierBody, PostMenuV3DraftModifierResponse, GetMenuV3DraftModifierQuery, GetMenuV3DraftModifierResponse, PatchMenuV3DraftModifierBody, PatchMenuV3DraftModifierResponse, DeleteMenuV3DraftModifierResponse, GetMenuV3DraftModifiersQuery, GetMenuV3DraftModifiersResponse, PostMenuV3DraftModifiersBody, PostMenuV3DraftModifiersResponse, GetMenuV3DraftModifiersCountQuery, GetMenuV3DraftModifiersCountResponse, PatchMenuV3DraftModifiersBulkUpdateBody, PatchMenuV3DraftModifiersBulkUpdateResponse, GetMenuV3ModifierQuery, GetMenuV3ModifierResponse, GetMenuV3ModifiersQuery, GetMenuV3ModifiersResponse, GetMenuV3ModifiersCountQuery, GetMenuV3ModifiersCountResponse, PostMenuV3IntegrationsTransltrImportQuery, PostMenuV3IntegrationsTransltrImportResponse, GetMenuV3GlobalDiffQuery, GetMenuV3GlobalDiffResponse, GetMenuV3GlobalDiffsQuery, GetMenuV3GlobalDiffsResponse, GetMenuV3GlobalDiffsCountQuery, GetMenuV3GlobalDiffsCountResponse } from "./interface/menu";
|
|
19
19
|
import { GetNotificationsQuery, GetNotificationsResponse, PostNotificationBody, PostNotificationResponse, PatchNotificationBody, PatchNotificationResponse, DeleteNotificationResponse, PostNotificationStatusBody, PostNotificationStatusResponse, PostNotificationDevicePushBody, PostNotificationDevicePushResponse, GetNotificationSwaggerQuery, GetNotificationSwaggerResponse } from "./interface/notification";
|
|
20
20
|
import { GetCompassconnectOmsTokenQuery, GetCompassconnectOmsTokenResponse } from "./interface/compassconnect";
|
|
21
21
|
import { PostVendorApplicationBody, PostVendorApplicationResponse, GetVendorApplicationQuery, GetVendorApplicationResponse, PatchVendorApplicationBody, PatchVendorApplicationResponse, PostVendorBody, PostVendorResponse, GetVendorsQuery, GetVendorsResponse, GetVendorQuery, GetVendorResponse, PatchVendorBody, PatchVendorResponse, GetVendorAuthQuery, GetVendorAuthResponse, PostVendorAuthBody, PostVendorAuthResponse, GetVendorKeysQuery, GetVendorKeysResponse, PostVendorKeyBody, PostVendorKeyResponse, GetVendorKeyQuery, GetVendorKeyResponse, PatchVendorKeyBody, PatchVendorKeyResponse, DeleteVendorKeyResponse, PostVendorKeyRotateQuery, PostVendorKeyRotateResponse, PostVendorResetPasswordBody, PostVendorResetPasswordResponse } from "./interface/vendor";
|
|
@@ -2706,6 +2706,13 @@ export declare class ServiceClient extends BaseServiceClient {
|
|
|
2706
2706
|
get_menu_v3_draft_items_count(options?: {
|
|
2707
2707
|
query?: GetMenuV3DraftItemsCountQuery;
|
|
2708
2708
|
} & RequestOptions): ResponsePromise<GetMenuV3DraftItemsCountResponse>;
|
|
2709
|
+
/**
|
|
2710
|
+
* PATCH /menu/v3/draft/items/bulk-update
|
|
2711
|
+
*
|
|
2712
|
+
* @param body
|
|
2713
|
+
* @param options - additional request options
|
|
2714
|
+
*/
|
|
2715
|
+
patch_menu_v3_draft_items_bulk_update(body: PatchMenuV3DraftItemsBulkUpdateBody, options?: RequestOptions): ResponsePromise<PatchMenuV3DraftItemsBulkUpdateResponse>;
|
|
2709
2716
|
/**
|
|
2710
2717
|
* POST /menu/v3/item/{id}/attachment/{name}
|
|
2711
2718
|
*
|
|
@@ -2716,6 +2723,14 @@ export declare class ServiceClient extends BaseServiceClient {
|
|
|
2716
2723
|
post_menu_v3_item_attachment(id: string, name: string, options?: {
|
|
2717
2724
|
query?: PostMenuV3ItemAttachmentQuery;
|
|
2718
2725
|
} & RequestOptions): ResponsePromise<PostMenuV3ItemAttachmentResponse>;
|
|
2726
|
+
/**
|
|
2727
|
+
* POST /menu/v3/items/import
|
|
2728
|
+
*
|
|
2729
|
+
* @param options - additional request options
|
|
2730
|
+
*/
|
|
2731
|
+
post_menu_v3_items_import(options?: {
|
|
2732
|
+
query?: PostMenuV3ItemsImportQuery;
|
|
2733
|
+
} & RequestOptions): ResponsePromise<PostMenuV3ItemsImportResponse>;
|
|
2719
2734
|
/**
|
|
2720
2735
|
* GET /menu/v3/item/{id}
|
|
2721
2736
|
*
|
|
@@ -3032,6 +3047,13 @@ export declare class ServiceClient extends BaseServiceClient {
|
|
|
3032
3047
|
get_menu_v3_draft_modifiers_count(options?: {
|
|
3033
3048
|
query?: GetMenuV3DraftModifiersCountQuery;
|
|
3034
3049
|
} & RequestOptions): ResponsePromise<GetMenuV3DraftModifiersCountResponse>;
|
|
3050
|
+
/**
|
|
3051
|
+
* PATCH /menu/v3/draft/modifiers/bulk-update
|
|
3052
|
+
*
|
|
3053
|
+
* @param body
|
|
3054
|
+
* @param options - additional request options
|
|
3055
|
+
*/
|
|
3056
|
+
patch_menu_v3_draft_modifiers_bulk_update(body: PatchMenuV3DraftModifiersBulkUpdateBody, options?: RequestOptions): ResponsePromise<PatchMenuV3DraftModifiersBulkUpdateResponse>;
|
|
3035
3057
|
/**
|
|
3036
3058
|
* GET /menu/v3/modifier/{id}
|
|
3037
3059
|
*
|