@emilgroup/customer-sdk-node 1.17.0 → 1.18.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/README.md +2 -2
- package/api/customers-api.ts +168 -0
- package/dist/api/customers-api.d.ts +100 -0
- package/dist/api/customers-api.js +113 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
|
|
|
17
17
|
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
npm install @emilgroup/customer-sdk-node@1.
|
|
20
|
+
npm install @emilgroup/customer-sdk-node@1.18.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/customer-sdk-node@1.
|
|
24
|
+
yarn add @emilgroup/customer-sdk-node@1.18.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `CustomersApi`.
|
package/api/customers-api.ts
CHANGED
|
@@ -73,6 +73,73 @@ export const CustomersApiAxiosParamCreator = function (configuration?: Configura
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
77
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
78
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
url: toPathString(localVarUrlObj),
|
|
82
|
+
options: localVarRequestOptions,
|
|
83
|
+
};
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
* Get customer list.
|
|
87
|
+
* @summary Get customers list
|
|
88
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
89
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
90
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
91
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
92
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
93
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
94
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
95
|
+
* @param {*} [options] Override http request option.
|
|
96
|
+
* @throws {RequiredError}
|
|
97
|
+
*/
|
|
98
|
+
listCustomers: async (pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
99
|
+
const localVarPath = `/v1/customers`;
|
|
100
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
101
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
102
|
+
let baseOptions;
|
|
103
|
+
let baseAccessToken;
|
|
104
|
+
if (configuration) {
|
|
105
|
+
baseOptions = configuration.baseOptions;
|
|
106
|
+
baseAccessToken = configuration.accessToken;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
110
|
+
const localVarHeaderParameter = {} as any;
|
|
111
|
+
const localVarQueryParameter = {} as any;
|
|
112
|
+
|
|
113
|
+
if (pageSize !== undefined) {
|
|
114
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (pageToken !== undefined) {
|
|
118
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (filter !== undefined) {
|
|
122
|
+
localVarQueryParameter['filter'] = filter;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (search !== undefined) {
|
|
126
|
+
localVarQueryParameter['search'] = search;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (order !== undefined) {
|
|
130
|
+
localVarQueryParameter['order'] = order;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (expand !== undefined) {
|
|
134
|
+
localVarQueryParameter['expand'] = expand;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
138
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
76
143
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
77
144
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
78
145
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -152,6 +219,23 @@ export const CustomersApiFp = function(configuration?: Configuration) {
|
|
|
152
219
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomer(customerCode, expand, authorization, options);
|
|
153
220
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
154
221
|
},
|
|
222
|
+
/**
|
|
223
|
+
* Get customer list.
|
|
224
|
+
* @summary Get customers list
|
|
225
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
226
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
227
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
228
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
229
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
230
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
231
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
232
|
+
* @param {*} [options] Override http request option.
|
|
233
|
+
* @throws {RequiredError}
|
|
234
|
+
*/
|
|
235
|
+
async listCustomers(pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
|
236
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listCustomers(pageSize, pageToken, filter, search, order, expand, authorization, options);
|
|
237
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
238
|
+
},
|
|
155
239
|
/**
|
|
156
240
|
* Update customer details like phone, email, names, addresses etc.
|
|
157
241
|
* @summary Update customer details
|
|
@@ -187,6 +271,22 @@ export const CustomersApiFactory = function (configuration?: Configuration, base
|
|
|
187
271
|
getCustomer(customerCode: string, expand?: string, authorization?: string, options?: any): AxiosPromise<GetCustomerResponseClass> {
|
|
188
272
|
return localVarFp.getCustomer(customerCode, expand, authorization, options).then((request) => request(axios, basePath));
|
|
189
273
|
},
|
|
274
|
+
/**
|
|
275
|
+
* Get customer list.
|
|
276
|
+
* @summary Get customers list
|
|
277
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
278
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
279
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
280
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
281
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
282
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
283
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
284
|
+
* @param {*} [options] Override http request option.
|
|
285
|
+
* @throws {RequiredError}
|
|
286
|
+
*/
|
|
287
|
+
listCustomers(pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options?: any): AxiosPromise<object> {
|
|
288
|
+
return localVarFp.listCustomers(pageSize, pageToken, filter, search, order, expand, authorization, options).then((request) => request(axios, basePath));
|
|
289
|
+
},
|
|
190
290
|
/**
|
|
191
291
|
* Update customer details like phone, email, names, addresses etc.
|
|
192
292
|
* @summary Update customer details
|
|
@@ -230,6 +330,62 @@ export interface CustomersApiGetCustomerRequest {
|
|
|
230
330
|
readonly authorization?: string
|
|
231
331
|
}
|
|
232
332
|
|
|
333
|
+
/**
|
|
334
|
+
* Request parameters for listCustomers operation in CustomersApi.
|
|
335
|
+
* @export
|
|
336
|
+
* @interface CustomersApiListCustomersRequest
|
|
337
|
+
*/
|
|
338
|
+
export interface CustomersApiListCustomersRequest {
|
|
339
|
+
/**
|
|
340
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
341
|
+
* @type {any}
|
|
342
|
+
* @memberof CustomersApiListCustomers
|
|
343
|
+
*/
|
|
344
|
+
readonly pageSize?: any
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
348
|
+
* @type {any}
|
|
349
|
+
* @memberof CustomersApiListCustomers
|
|
350
|
+
*/
|
|
351
|
+
readonly pageToken?: any
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
355
|
+
* @type {any}
|
|
356
|
+
* @memberof CustomersApiListCustomers
|
|
357
|
+
*/
|
|
358
|
+
readonly filter?: any
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
362
|
+
* @type {any}
|
|
363
|
+
* @memberof CustomersApiListCustomers
|
|
364
|
+
*/
|
|
365
|
+
readonly search?: any
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
369
|
+
* @type {any}
|
|
370
|
+
* @memberof CustomersApiListCustomers
|
|
371
|
+
*/
|
|
372
|
+
readonly order?: any
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
376
|
+
* @type {any}
|
|
377
|
+
* @memberof CustomersApiListCustomers
|
|
378
|
+
*/
|
|
379
|
+
readonly expand?: any
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
383
|
+
* @type {string}
|
|
384
|
+
* @memberof CustomersApiListCustomers
|
|
385
|
+
*/
|
|
386
|
+
readonly authorization?: string
|
|
387
|
+
}
|
|
388
|
+
|
|
233
389
|
/**
|
|
234
390
|
* Request parameters for updateCustomer operation in CustomersApi.
|
|
235
391
|
* @export
|
|
@@ -277,6 +433,18 @@ export class CustomersApi extends BaseAPI {
|
|
|
277
433
|
return CustomersApiFp(this.configuration).getCustomer(requestParameters.customerCode, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
278
434
|
}
|
|
279
435
|
|
|
436
|
+
/**
|
|
437
|
+
* Get customer list.
|
|
438
|
+
* @summary Get customers list
|
|
439
|
+
* @param {CustomersApiListCustomersRequest} requestParameters Request parameters.
|
|
440
|
+
* @param {*} [options] Override http request option.
|
|
441
|
+
* @throws {RequiredError}
|
|
442
|
+
* @memberof CustomersApi
|
|
443
|
+
*/
|
|
444
|
+
public listCustomers(requestParameters: CustomersApiListCustomersRequest = {}, options?: AxiosRequestConfig) {
|
|
445
|
+
return CustomersApiFp(this.configuration).listCustomers(requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
446
|
+
}
|
|
447
|
+
|
|
280
448
|
/**
|
|
281
449
|
* Update customer details like phone, email, names, addresses etc.
|
|
282
450
|
* @summary Update customer details
|
|
@@ -30,6 +30,20 @@ export declare const CustomersApiAxiosParamCreator: (configuration?: Configurati
|
|
|
30
30
|
* @throws {RequiredError}
|
|
31
31
|
*/
|
|
32
32
|
getCustomer: (customerCode: string, expand?: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
33
|
+
/**
|
|
34
|
+
* Get customer list.
|
|
35
|
+
* @summary Get customers list
|
|
36
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
37
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
38
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
39
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
40
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
41
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
42
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
43
|
+
* @param {*} [options] Override http request option.
|
|
44
|
+
* @throws {RequiredError}
|
|
45
|
+
*/
|
|
46
|
+
listCustomers: (pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
33
47
|
/**
|
|
34
48
|
* Update customer details like phone, email, names, addresses etc.
|
|
35
49
|
* @summary Update customer details
|
|
@@ -56,6 +70,20 @@ export declare const CustomersApiFp: (configuration?: Configuration) => {
|
|
|
56
70
|
* @throws {RequiredError}
|
|
57
71
|
*/
|
|
58
72
|
getCustomer(customerCode: string, expand?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetCustomerResponseClass>>;
|
|
73
|
+
/**
|
|
74
|
+
* Get customer list.
|
|
75
|
+
* @summary Get customers list
|
|
76
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
77
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
78
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
79
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
80
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
81
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
82
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
83
|
+
* @param {*} [options] Override http request option.
|
|
84
|
+
* @throws {RequiredError}
|
|
85
|
+
*/
|
|
86
|
+
listCustomers(pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
|
|
59
87
|
/**
|
|
60
88
|
* Update customer details like phone, email, names, addresses etc.
|
|
61
89
|
* @summary Update customer details
|
|
@@ -82,6 +110,20 @@ export declare const CustomersApiFactory: (configuration?: Configuration, basePa
|
|
|
82
110
|
* @throws {RequiredError}
|
|
83
111
|
*/
|
|
84
112
|
getCustomer(customerCode: string, expand?: string, authorization?: string, options?: any): AxiosPromise<GetCustomerResponseClass>;
|
|
113
|
+
/**
|
|
114
|
+
* Get customer list.
|
|
115
|
+
* @summary Get customers list
|
|
116
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
117
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
118
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
119
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
120
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
121
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
122
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
123
|
+
* @param {*} [options] Override http request option.
|
|
124
|
+
* @throws {RequiredError}
|
|
125
|
+
*/
|
|
126
|
+
listCustomers(pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options?: any): AxiosPromise<object>;
|
|
85
127
|
/**
|
|
86
128
|
* Update customer details like phone, email, names, addresses etc.
|
|
87
129
|
* @summary Update customer details
|
|
@@ -118,6 +160,55 @@ export interface CustomersApiGetCustomerRequest {
|
|
|
118
160
|
*/
|
|
119
161
|
readonly authorization?: string;
|
|
120
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* Request parameters for listCustomers operation in CustomersApi.
|
|
165
|
+
* @export
|
|
166
|
+
* @interface CustomersApiListCustomersRequest
|
|
167
|
+
*/
|
|
168
|
+
export interface CustomersApiListCustomersRequest {
|
|
169
|
+
/**
|
|
170
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
171
|
+
* @type {any}
|
|
172
|
+
* @memberof CustomersApiListCustomers
|
|
173
|
+
*/
|
|
174
|
+
readonly pageSize?: any;
|
|
175
|
+
/**
|
|
176
|
+
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
177
|
+
* @type {any}
|
|
178
|
+
* @memberof CustomersApiListCustomers
|
|
179
|
+
*/
|
|
180
|
+
readonly pageToken?: any;
|
|
181
|
+
/**
|
|
182
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
183
|
+
* @type {any}
|
|
184
|
+
* @memberof CustomersApiListCustomers
|
|
185
|
+
*/
|
|
186
|
+
readonly filter?: any;
|
|
187
|
+
/**
|
|
188
|
+
* Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
189
|
+
* @type {any}
|
|
190
|
+
* @memberof CustomersApiListCustomers
|
|
191
|
+
*/
|
|
192
|
+
readonly search?: any;
|
|
193
|
+
/**
|
|
194
|
+
* The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
195
|
+
* @type {any}
|
|
196
|
+
* @memberof CustomersApiListCustomers
|
|
197
|
+
*/
|
|
198
|
+
readonly order?: any;
|
|
199
|
+
/**
|
|
200
|
+
* Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
201
|
+
* @type {any}
|
|
202
|
+
* @memberof CustomersApiListCustomers
|
|
203
|
+
*/
|
|
204
|
+
readonly expand?: any;
|
|
205
|
+
/**
|
|
206
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
207
|
+
* @type {string}
|
|
208
|
+
* @memberof CustomersApiListCustomers
|
|
209
|
+
*/
|
|
210
|
+
readonly authorization?: string;
|
|
211
|
+
}
|
|
121
212
|
/**
|
|
122
213
|
* Request parameters for updateCustomer operation in CustomersApi.
|
|
123
214
|
* @export
|
|
@@ -159,6 +250,15 @@ export declare class CustomersApi extends BaseAPI {
|
|
|
159
250
|
* @memberof CustomersApi
|
|
160
251
|
*/
|
|
161
252
|
getCustomer(requestParameters: CustomersApiGetCustomerRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetCustomerResponseClass, any>>;
|
|
253
|
+
/**
|
|
254
|
+
* Get customer list.
|
|
255
|
+
* @summary Get customers list
|
|
256
|
+
* @param {CustomersApiListCustomersRequest} requestParameters Request parameters.
|
|
257
|
+
* @param {*} [options] Override http request option.
|
|
258
|
+
* @throws {RequiredError}
|
|
259
|
+
* @memberof CustomersApi
|
|
260
|
+
*/
|
|
261
|
+
listCustomers(requestParameters?: CustomersApiListCustomersRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
|
|
162
262
|
/**
|
|
163
263
|
* Update customer details like phone, email, names, addresses etc.
|
|
164
264
|
* @summary Update customer details
|
|
@@ -138,6 +138,64 @@ var CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
138
138
|
});
|
|
139
139
|
});
|
|
140
140
|
},
|
|
141
|
+
/**
|
|
142
|
+
* Get customer list.
|
|
143
|
+
* @summary Get customers list
|
|
144
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
145
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
146
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
147
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
148
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
149
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
150
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
151
|
+
* @param {*} [options] Override http request option.
|
|
152
|
+
* @throws {RequiredError}
|
|
153
|
+
*/
|
|
154
|
+
listCustomers: function (pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
155
|
+
if (options === void 0) { options = {}; }
|
|
156
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
157
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
158
|
+
return __generator(this, function (_a) {
|
|
159
|
+
localVarPath = "/v1/customers";
|
|
160
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
161
|
+
if (configuration) {
|
|
162
|
+
baseOptions = configuration.baseOptions;
|
|
163
|
+
baseAccessToken = configuration.accessToken;
|
|
164
|
+
}
|
|
165
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
166
|
+
localVarHeaderParameter = {};
|
|
167
|
+
localVarQueryParameter = {};
|
|
168
|
+
if (pageSize !== undefined) {
|
|
169
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
170
|
+
}
|
|
171
|
+
if (pageToken !== undefined) {
|
|
172
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
173
|
+
}
|
|
174
|
+
if (filter !== undefined) {
|
|
175
|
+
localVarQueryParameter['filter'] = filter;
|
|
176
|
+
}
|
|
177
|
+
if (search !== undefined) {
|
|
178
|
+
localVarQueryParameter['search'] = search;
|
|
179
|
+
}
|
|
180
|
+
if (order !== undefined) {
|
|
181
|
+
localVarQueryParameter['order'] = order;
|
|
182
|
+
}
|
|
183
|
+
if (expand !== undefined) {
|
|
184
|
+
localVarQueryParameter['expand'] = expand;
|
|
185
|
+
}
|
|
186
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
187
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
188
|
+
}
|
|
189
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
190
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
191
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
192
|
+
return [2 /*return*/, {
|
|
193
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
194
|
+
options: localVarRequestOptions,
|
|
195
|
+
}];
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
},
|
|
141
199
|
/**
|
|
142
200
|
* Update customer details like phone, email, names, addresses etc.
|
|
143
201
|
* @summary Update customer details
|
|
@@ -213,6 +271,32 @@ var CustomersApiFp = function (configuration) {
|
|
|
213
271
|
});
|
|
214
272
|
});
|
|
215
273
|
},
|
|
274
|
+
/**
|
|
275
|
+
* Get customer list.
|
|
276
|
+
* @summary Get customers list
|
|
277
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
278
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
279
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
280
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
281
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
282
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
283
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
284
|
+
* @param {*} [options] Override http request option.
|
|
285
|
+
* @throws {RequiredError}
|
|
286
|
+
*/
|
|
287
|
+
listCustomers: function (pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
288
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
289
|
+
var localVarAxiosArgs;
|
|
290
|
+
return __generator(this, function (_a) {
|
|
291
|
+
switch (_a.label) {
|
|
292
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listCustomers(pageSize, pageToken, filter, search, order, expand, authorization, options)];
|
|
293
|
+
case 1:
|
|
294
|
+
localVarAxiosArgs = _a.sent();
|
|
295
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
});
|
|
299
|
+
},
|
|
216
300
|
/**
|
|
217
301
|
* Update customer details like phone, email, names, addresses etc.
|
|
218
302
|
* @summary Update customer details
|
|
@@ -257,6 +341,22 @@ var CustomersApiFactory = function (configuration, basePath, axios) {
|
|
|
257
341
|
getCustomer: function (customerCode, expand, authorization, options) {
|
|
258
342
|
return localVarFp.getCustomer(customerCode, expand, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
259
343
|
},
|
|
344
|
+
/**
|
|
345
|
+
* Get customer list.
|
|
346
|
+
* @summary Get customers list
|
|
347
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
348
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
349
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
350
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
351
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
352
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
353
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
354
|
+
* @param {*} [options] Override http request option.
|
|
355
|
+
* @throws {RequiredError}
|
|
356
|
+
*/
|
|
357
|
+
listCustomers: function (pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
358
|
+
return localVarFp.listCustomers(pageSize, pageToken, filter, search, order, expand, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
359
|
+
},
|
|
260
360
|
/**
|
|
261
361
|
* Update customer details like phone, email, names, addresses etc.
|
|
262
362
|
* @summary Update customer details
|
|
@@ -295,6 +395,19 @@ var CustomersApi = /** @class */ (function (_super) {
|
|
|
295
395
|
var _this = this;
|
|
296
396
|
return (0, exports.CustomersApiFp)(this.configuration).getCustomer(requestParameters.customerCode, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
297
397
|
};
|
|
398
|
+
/**
|
|
399
|
+
* Get customer list.
|
|
400
|
+
* @summary Get customers list
|
|
401
|
+
* @param {CustomersApiListCustomersRequest} requestParameters Request parameters.
|
|
402
|
+
* @param {*} [options] Override http request option.
|
|
403
|
+
* @throws {RequiredError}
|
|
404
|
+
* @memberof CustomersApi
|
|
405
|
+
*/
|
|
406
|
+
CustomersApi.prototype.listCustomers = function (requestParameters, options) {
|
|
407
|
+
var _this = this;
|
|
408
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
409
|
+
return (0, exports.CustomersApiFp)(this.configuration).listCustomers(requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
410
|
+
};
|
|
298
411
|
/**
|
|
299
412
|
* Update customer details like phone, email, names, addresses etc.
|
|
300
413
|
* @summary Update customer details
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emilgroup/customer-sdk-node",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "OpenAPI client for @emilgroup/customer-sdk-node",
|
|
5
5
|
"author": "OpenAPI-Generator Contributors",
|
|
6
6
|
"keywords": [
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"url": "^0.11.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
|
|
26
|
+
"@types/node": "^12.11.5",
|
|
27
27
|
"typescript": "^4.0"
|
|
28
28
|
}
|
|
29
29
|
}
|