flexinet-api 0.0.1237-prerelease0 → 0.0.1264-prerelease0
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.ts +128 -14
- package/dist/api.d.ts +77 -9
- package/dist/api.js +90 -9
- package/dist/esm/api.d.ts +77 -9
- package/dist/esm/api.js +90 -9
- package/package.json +1 -1
package/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
## flexinet-api@0.0.
|
1
|
+
## flexinet-api@0.0.1264-prerelease0
|
2
2
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
4
4
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
36
36
|
_published:_
|
37
37
|
|
38
38
|
```
|
39
|
-
npm install flexinet-api@0.0.
|
39
|
+
npm install flexinet-api@0.0.1264-prerelease0 --save
|
40
40
|
```
|
41
41
|
|
42
42
|
_unPublished (not recommended):_
|
package/api.ts
CHANGED
@@ -23,6 +23,25 @@ import type { RequestArgs } from './base';
|
|
23
23
|
// @ts-ignore
|
24
24
|
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base';
|
25
25
|
|
26
|
+
/**
|
27
|
+
*
|
28
|
+
* @export
|
29
|
+
* @interface AdminOrderCreationRequest
|
30
|
+
*/
|
31
|
+
export interface AdminOrderCreationRequest {
|
32
|
+
/**
|
33
|
+
*
|
34
|
+
* @type {Array<OrderItemCreationRequest>}
|
35
|
+
* @memberof AdminOrderCreationRequest
|
36
|
+
*/
|
37
|
+
'items': Array<OrderItemCreationRequest>;
|
38
|
+
/**
|
39
|
+
*
|
40
|
+
* @type {Beneficiary}
|
41
|
+
* @memberof AdminOrderCreationRequest
|
42
|
+
*/
|
43
|
+
'beneficiary'?: Beneficiary;
|
44
|
+
}
|
26
45
|
/**
|
27
46
|
*
|
28
47
|
* @export
|
@@ -238,7 +257,7 @@ export interface BalanceUpdateRequest {
|
|
238
257
|
* @type {TransactionKind}
|
239
258
|
* @memberof BalanceUpdateRequest
|
240
259
|
*/
|
241
|
-
'transactionKind'
|
260
|
+
'transactionKind': TransactionKind;
|
242
261
|
/**
|
243
262
|
*
|
244
263
|
* @type {TransactionCurrencyKind}
|
@@ -1283,6 +1302,12 @@ export interface Order {
|
|
1283
1302
|
* @memberof Order
|
1284
1303
|
*/
|
1285
1304
|
'status'?: OrderStatus;
|
1305
|
+
/**
|
1306
|
+
*
|
1307
|
+
* @type {string}
|
1308
|
+
* @memberof Order
|
1309
|
+
*/
|
1310
|
+
'clientID'?: string;
|
1286
1311
|
}
|
1287
1312
|
|
1288
1313
|
|
@@ -1332,7 +1357,8 @@ export interface OrderItemCreationRequest {
|
|
1332
1357
|
|
1333
1358
|
export const OrderKind = {
|
1334
1359
|
Webshop: 'webshop',
|
1335
|
-
Promotions: 'promotions'
|
1360
|
+
Promotions: 'promotions',
|
1361
|
+
SalesBudget: 'sales_budget'
|
1336
1362
|
} as const;
|
1337
1363
|
|
1338
1364
|
export type OrderKind = typeof OrderKind[keyof typeof OrderKind];
|
@@ -3690,7 +3716,8 @@ export const TransactionSource = {
|
|
3690
3716
|
Promotion: 'promotion',
|
3691
3717
|
Manual: 'manual',
|
3692
3718
|
Expiry: 'expiry',
|
3693
|
-
Transfer: 'transfer'
|
3719
|
+
Transfer: 'transfer',
|
3720
|
+
SalesBudget: 'sales_budget'
|
3694
3721
|
} as const;
|
3695
3722
|
|
3696
3723
|
export type TransactionSource = typeof TransactionSource[keyof typeof TransactionSource];
|
@@ -3700,7 +3727,7 @@ export type TransactionSource = typeof TransactionSource[keyof typeof Transactio
|
|
3700
3727
|
* @type TransactionSourceReference
|
3701
3728
|
* @export
|
3702
3729
|
*/
|
3703
|
-
export type TransactionSourceReference = BalanceWithBeneficiaryRef |
|
3730
|
+
export type TransactionSourceReference = BalanceWithBeneficiaryRef | PeriodPromotion | User | UserOrder;
|
3704
3731
|
|
3705
3732
|
/**
|
3706
3733
|
*
|
@@ -4055,7 +4082,7 @@ export interface UserOrder {
|
|
4055
4082
|
* @type {string}
|
4056
4083
|
* @memberof UserOrder
|
4057
4084
|
*/
|
4058
|
-
'source'
|
4085
|
+
'source': string;
|
4059
4086
|
/**
|
4060
4087
|
*
|
4061
4088
|
* @type {string}
|
@@ -4064,10 +4091,10 @@ export interface UserOrder {
|
|
4064
4091
|
'userID'?: string;
|
4065
4092
|
/**
|
4066
4093
|
*
|
4067
|
-
* @type {
|
4094
|
+
* @type {string}
|
4068
4095
|
* @memberof UserOrder
|
4069
4096
|
*/
|
4070
|
-
'
|
4097
|
+
'clientID': string;
|
4071
4098
|
}
|
4072
4099
|
|
4073
4100
|
|
@@ -6919,6 +6946,44 @@ export class NotificationApi extends BaseAPI {
|
|
6919
6946
|
*/
|
6920
6947
|
export const OrderApiAxiosParamCreator = function (configuration?: Configuration) {
|
6921
6948
|
return {
|
6949
|
+
/**
|
6950
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
6951
|
+
* @summary Create an order for a product
|
6952
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
6953
|
+
* @param {*} [options] Override http request option.
|
6954
|
+
* @throws {RequiredError}
|
6955
|
+
*/
|
6956
|
+
createAdminOrder: async (adminOrderCreationRequest?: AdminOrderCreationRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
6957
|
+
const localVarPath = `/admins/orders`;
|
6958
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
6959
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
6960
|
+
let baseOptions;
|
6961
|
+
if (configuration) {
|
6962
|
+
baseOptions = configuration.baseOptions;
|
6963
|
+
}
|
6964
|
+
|
6965
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
6966
|
+
const localVarHeaderParameter = {} as any;
|
6967
|
+
const localVarQueryParameter = {} as any;
|
6968
|
+
|
6969
|
+
// authentication systemJWT required
|
6970
|
+
// http bearer authentication required
|
6971
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
6972
|
+
|
6973
|
+
|
6974
|
+
|
6975
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
6976
|
+
|
6977
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
6978
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
6979
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
6980
|
+
localVarRequestOptions.data = serializeDataIfNeeded(adminOrderCreationRequest, localVarRequestOptions, configuration)
|
6981
|
+
|
6982
|
+
return {
|
6983
|
+
url: toPathString(localVarUrlObj),
|
6984
|
+
options: localVarRequestOptions,
|
6985
|
+
};
|
6986
|
+
},
|
6922
6987
|
/**
|
6923
6988
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
6924
6989
|
* @summary Create an order for a product
|
@@ -7044,10 +7109,12 @@ export const OrderApiAxiosParamCreator = function (configuration?: Configuration
|
|
7044
7109
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
7045
7110
|
* @param {Array<string>} [userIDs] Filter by user ids
|
7046
7111
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
7112
|
+
* @param {OrderKind} [kind] Filter by kind
|
7113
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
7047
7114
|
* @param {*} [options] Override http request option.
|
7048
7115
|
* @throws {RequiredError}
|
7049
7116
|
*/
|
7050
|
-
listOrders: async (paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
7117
|
+
listOrders: async (paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, kind?: OrderKind, source?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
7051
7118
|
const localVarPath = `/admins/orders`;
|
7052
7119
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
7053
7120
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
@@ -7100,6 +7167,14 @@ export const OrderApiAxiosParamCreator = function (configuration?: Configuration
|
|
7100
7167
|
localVarQueryParameter['clientIDs'] = clientIDs;
|
7101
7168
|
}
|
7102
7169
|
|
7170
|
+
if (kind !== undefined) {
|
7171
|
+
localVarQueryParameter['kind'] = kind;
|
7172
|
+
}
|
7173
|
+
|
7174
|
+
if (source !== undefined) {
|
7175
|
+
localVarQueryParameter['source'] = source;
|
7176
|
+
}
|
7177
|
+
|
7103
7178
|
|
7104
7179
|
|
7105
7180
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
@@ -7194,6 +7269,17 @@ export const OrderApiAxiosParamCreator = function (configuration?: Configuration
|
|
7194
7269
|
export const OrderApiFp = function(configuration?: Configuration) {
|
7195
7270
|
const localVarAxiosParamCreator = OrderApiAxiosParamCreator(configuration)
|
7196
7271
|
return {
|
7272
|
+
/**
|
7273
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
7274
|
+
* @summary Create an order for a product
|
7275
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
7276
|
+
* @param {*} [options] Override http request option.
|
7277
|
+
* @throws {RequiredError}
|
7278
|
+
*/
|
7279
|
+
async createAdminOrder(adminOrderCreationRequest?: AdminOrderCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>> {
|
7280
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createAdminOrder(adminOrderCreationRequest, options);
|
7281
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
7282
|
+
},
|
7197
7283
|
/**
|
7198
7284
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
7199
7285
|
* @summary Create an order for a product
|
@@ -7238,11 +7324,13 @@ export const OrderApiFp = function(configuration?: Configuration) {
|
|
7238
7324
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
7239
7325
|
* @param {Array<string>} [userIDs] Filter by user ids
|
7240
7326
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
7327
|
+
* @param {OrderKind} [kind] Filter by kind
|
7328
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
7241
7329
|
* @param {*} [options] Override http request option.
|
7242
7330
|
* @throws {RequiredError}
|
7243
7331
|
*/
|
7244
|
-
async listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderListResponse>> {
|
7245
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options);
|
7332
|
+
async listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, kind?: OrderKind, source?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderListResponse>> {
|
7333
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options);
|
7246
7334
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
7247
7335
|
},
|
7248
7336
|
/**
|
@@ -7272,6 +7360,16 @@ export const OrderApiFp = function(configuration?: Configuration) {
|
|
7272
7360
|
export const OrderApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
7273
7361
|
const localVarFp = OrderApiFp(configuration)
|
7274
7362
|
return {
|
7363
|
+
/**
|
7364
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
7365
|
+
* @summary Create an order for a product
|
7366
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
7367
|
+
* @param {*} [options] Override http request option.
|
7368
|
+
* @throws {RequiredError}
|
7369
|
+
*/
|
7370
|
+
createAdminOrder(adminOrderCreationRequest?: AdminOrderCreationRequest, options?: any): AxiosPromise<Order> {
|
7371
|
+
return localVarFp.createAdminOrder(adminOrderCreationRequest, options).then((request) => request(axios, basePath));
|
7372
|
+
},
|
7275
7373
|
/**
|
7276
7374
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
7277
7375
|
* @summary Create an order for a product
|
@@ -7313,11 +7411,13 @@ export const OrderApiFactory = function (configuration?: Configuration, basePath
|
|
7313
7411
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
7314
7412
|
* @param {Array<string>} [userIDs] Filter by user ids
|
7315
7413
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
7414
|
+
* @param {OrderKind} [kind] Filter by kind
|
7415
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
7316
7416
|
* @param {*} [options] Override http request option.
|
7317
7417
|
* @throws {RequiredError}
|
7318
7418
|
*/
|
7319
|
-
listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, options?: any): AxiosPromise<OrderListResponse> {
|
7320
|
-
return localVarFp.listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options).then((request) => request(axios, basePath));
|
7419
|
+
listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, kind?: OrderKind, source?: string, options?: any): AxiosPromise<OrderListResponse> {
|
7420
|
+
return localVarFp.listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options).then((request) => request(axios, basePath));
|
7321
7421
|
},
|
7322
7422
|
/**
|
7323
7423
|
* List existing orders
|
@@ -7345,6 +7445,18 @@ export const OrderApiFactory = function (configuration?: Configuration, basePath
|
|
7345
7445
|
* @extends {BaseAPI}
|
7346
7446
|
*/
|
7347
7447
|
export class OrderApi extends BaseAPI {
|
7448
|
+
/**
|
7449
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
7450
|
+
* @summary Create an order for a product
|
7451
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
7452
|
+
* @param {*} [options] Override http request option.
|
7453
|
+
* @throws {RequiredError}
|
7454
|
+
* @memberof OrderApi
|
7455
|
+
*/
|
7456
|
+
public createAdminOrder(adminOrderCreationRequest?: AdminOrderCreationRequest, options?: AxiosRequestConfig) {
|
7457
|
+
return OrderApiFp(this.configuration).createAdminOrder(adminOrderCreationRequest, options).then((request) => request(this.axios, this.basePath));
|
7458
|
+
}
|
7459
|
+
|
7348
7460
|
/**
|
7349
7461
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
7350
7462
|
* @summary Create an order for a product
|
@@ -7392,12 +7504,14 @@ export class OrderApi extends BaseAPI {
|
|
7392
7504
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
7393
7505
|
* @param {Array<string>} [userIDs] Filter by user ids
|
7394
7506
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
7507
|
+
* @param {OrderKind} [kind] Filter by kind
|
7508
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
7395
7509
|
* @param {*} [options] Override http request option.
|
7396
7510
|
* @throws {RequiredError}
|
7397
7511
|
* @memberof OrderApi
|
7398
7512
|
*/
|
7399
|
-
public listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, options?: AxiosRequestConfig) {
|
7400
|
-
return OrderApiFp(this.configuration).listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options).then((request) => request(this.axios, this.basePath));
|
7513
|
+
public listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, kind?: OrderKind, source?: string, options?: AxiosRequestConfig) {
|
7514
|
+
return OrderApiFp(this.configuration).listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options).then((request) => request(this.axios, this.basePath));
|
7401
7515
|
}
|
7402
7516
|
|
7403
7517
|
/**
|
package/dist/api.d.ts
CHANGED
@@ -13,6 +13,25 @@ import type { Configuration } from './configuration';
|
|
13
13
|
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
14
14
|
import type { RequestArgs } from './base';
|
15
15
|
import { BaseAPI } from './base';
|
16
|
+
/**
|
17
|
+
*
|
18
|
+
* @export
|
19
|
+
* @interface AdminOrderCreationRequest
|
20
|
+
*/
|
21
|
+
export interface AdminOrderCreationRequest {
|
22
|
+
/**
|
23
|
+
*
|
24
|
+
* @type {Array<OrderItemCreationRequest>}
|
25
|
+
* @memberof AdminOrderCreationRequest
|
26
|
+
*/
|
27
|
+
'items': Array<OrderItemCreationRequest>;
|
28
|
+
/**
|
29
|
+
*
|
30
|
+
* @type {Beneficiary}
|
31
|
+
* @memberof AdminOrderCreationRequest
|
32
|
+
*/
|
33
|
+
'beneficiary'?: Beneficiary;
|
34
|
+
}
|
16
35
|
/**
|
17
36
|
*
|
18
37
|
* @export
|
@@ -211,7 +230,7 @@ export interface BalanceUpdateRequest {
|
|
211
230
|
* @type {TransactionKind}
|
212
231
|
* @memberof BalanceUpdateRequest
|
213
232
|
*/
|
214
|
-
'transactionKind'
|
233
|
+
'transactionKind': TransactionKind;
|
215
234
|
/**
|
216
235
|
*
|
217
236
|
* @type {TransactionCurrencyKind}
|
@@ -1205,6 +1224,12 @@ export interface Order {
|
|
1205
1224
|
* @memberof Order
|
1206
1225
|
*/
|
1207
1226
|
'status'?: OrderStatus;
|
1227
|
+
/**
|
1228
|
+
*
|
1229
|
+
* @type {string}
|
1230
|
+
* @memberof Order
|
1231
|
+
*/
|
1232
|
+
'clientID'?: string;
|
1208
1233
|
}
|
1209
1234
|
/**
|
1210
1235
|
*
|
@@ -1252,6 +1277,7 @@ export interface OrderItemCreationRequest {
|
|
1252
1277
|
export declare const OrderKind: {
|
1253
1278
|
readonly Webshop: "webshop";
|
1254
1279
|
readonly Promotions: "promotions";
|
1280
|
+
readonly SalesBudget: "sales_budget";
|
1255
1281
|
};
|
1256
1282
|
export type OrderKind = typeof OrderKind[keyof typeof OrderKind];
|
1257
1283
|
/**
|
@@ -3494,13 +3520,14 @@ export declare const TransactionSource: {
|
|
3494
3520
|
readonly Manual: "manual";
|
3495
3521
|
readonly Expiry: "expiry";
|
3496
3522
|
readonly Transfer: "transfer";
|
3523
|
+
readonly SalesBudget: "sales_budget";
|
3497
3524
|
};
|
3498
3525
|
export type TransactionSource = typeof TransactionSource[keyof typeof TransactionSource];
|
3499
3526
|
/**
|
3500
3527
|
* @type TransactionSourceReference
|
3501
3528
|
* @export
|
3502
3529
|
*/
|
3503
|
-
export type TransactionSourceReference = BalanceWithBeneficiaryRef |
|
3530
|
+
export type TransactionSourceReference = BalanceWithBeneficiaryRef | PeriodPromotion | User | UserOrder;
|
3504
3531
|
/**
|
3505
3532
|
*
|
3506
3533
|
* @export
|
@@ -3857,7 +3884,7 @@ export interface UserOrder {
|
|
3857
3884
|
* @type {string}
|
3858
3885
|
* @memberof UserOrder
|
3859
3886
|
*/
|
3860
|
-
'source'
|
3887
|
+
'source': string;
|
3861
3888
|
/**
|
3862
3889
|
*
|
3863
3890
|
* @type {string}
|
@@ -3866,10 +3893,10 @@ export interface UserOrder {
|
|
3866
3893
|
'userID'?: string;
|
3867
3894
|
/**
|
3868
3895
|
*
|
3869
|
-
* @type {
|
3896
|
+
* @type {string}
|
3870
3897
|
* @memberof UserOrder
|
3871
3898
|
*/
|
3872
|
-
'
|
3899
|
+
'clientID': string;
|
3873
3900
|
}
|
3874
3901
|
/**
|
3875
3902
|
*
|
@@ -5412,6 +5439,14 @@ export declare class NotificationApi extends BaseAPI {
|
|
5412
5439
|
* @export
|
5413
5440
|
*/
|
5414
5441
|
export declare const OrderApiAxiosParamCreator: (configuration?: Configuration) => {
|
5442
|
+
/**
|
5443
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
5444
|
+
* @summary Create an order for a product
|
5445
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
5446
|
+
* @param {*} [options] Override http request option.
|
5447
|
+
* @throws {RequiredError}
|
5448
|
+
*/
|
5449
|
+
createAdminOrder: (adminOrderCreationRequest?: AdminOrderCreationRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
5415
5450
|
/**
|
5416
5451
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
5417
5452
|
* @summary Create an order for a product
|
@@ -5447,10 +5482,12 @@ export declare const OrderApiAxiosParamCreator: (configuration?: Configuration)
|
|
5447
5482
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
5448
5483
|
* @param {Array<string>} [userIDs] Filter by user ids
|
5449
5484
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
5485
|
+
* @param {OrderKind} [kind] Filter by kind
|
5486
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
5450
5487
|
* @param {*} [options] Override http request option.
|
5451
5488
|
* @throws {RequiredError}
|
5452
5489
|
*/
|
5453
|
-
listOrders: (paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
5490
|
+
listOrders: (paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, kind?: OrderKind, source?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
5454
5491
|
/**
|
5455
5492
|
* List existing orders
|
5456
5493
|
* @summary List existing orders
|
@@ -5471,6 +5508,14 @@ export declare const OrderApiAxiosParamCreator: (configuration?: Configuration)
|
|
5471
5508
|
* @export
|
5472
5509
|
*/
|
5473
5510
|
export declare const OrderApiFp: (configuration?: Configuration) => {
|
5511
|
+
/**
|
5512
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
5513
|
+
* @summary Create an order for a product
|
5514
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
5515
|
+
* @param {*} [options] Override http request option.
|
5516
|
+
* @throws {RequiredError}
|
5517
|
+
*/
|
5518
|
+
createAdminOrder(adminOrderCreationRequest?: AdminOrderCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>>;
|
5474
5519
|
/**
|
5475
5520
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
5476
5521
|
* @summary Create an order for a product
|
@@ -5506,10 +5551,12 @@ export declare const OrderApiFp: (configuration?: Configuration) => {
|
|
5506
5551
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
5507
5552
|
* @param {Array<string>} [userIDs] Filter by user ids
|
5508
5553
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
5554
|
+
* @param {OrderKind} [kind] Filter by kind
|
5555
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
5509
5556
|
* @param {*} [options] Override http request option.
|
5510
5557
|
* @throws {RequiredError}
|
5511
5558
|
*/
|
5512
|
-
listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderListResponse>>;
|
5559
|
+
listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, kind?: OrderKind, source?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderListResponse>>;
|
5513
5560
|
/**
|
5514
5561
|
* List existing orders
|
5515
5562
|
* @summary List existing orders
|
@@ -5530,6 +5577,14 @@ export declare const OrderApiFp: (configuration?: Configuration) => {
|
|
5530
5577
|
* @export
|
5531
5578
|
*/
|
5532
5579
|
export declare const OrderApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
5580
|
+
/**
|
5581
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
5582
|
+
* @summary Create an order for a product
|
5583
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
5584
|
+
* @param {*} [options] Override http request option.
|
5585
|
+
* @throws {RequiredError}
|
5586
|
+
*/
|
5587
|
+
createAdminOrder(adminOrderCreationRequest?: AdminOrderCreationRequest, options?: any): AxiosPromise<Order>;
|
5533
5588
|
/**
|
5534
5589
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
5535
5590
|
* @summary Create an order for a product
|
@@ -5565,10 +5620,12 @@ export declare const OrderApiFactory: (configuration?: Configuration, basePath?:
|
|
5565
5620
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
5566
5621
|
* @param {Array<string>} [userIDs] Filter by user ids
|
5567
5622
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
5623
|
+
* @param {OrderKind} [kind] Filter by kind
|
5624
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
5568
5625
|
* @param {*} [options] Override http request option.
|
5569
5626
|
* @throws {RequiredError}
|
5570
5627
|
*/
|
5571
|
-
listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, options?: any): AxiosPromise<OrderListResponse>;
|
5628
|
+
listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, kind?: OrderKind, source?: string, options?: any): AxiosPromise<OrderListResponse>;
|
5572
5629
|
/**
|
5573
5630
|
* List existing orders
|
5574
5631
|
* @summary List existing orders
|
@@ -5591,6 +5648,15 @@ export declare const OrderApiFactory: (configuration?: Configuration, basePath?:
|
|
5591
5648
|
* @extends {BaseAPI}
|
5592
5649
|
*/
|
5593
5650
|
export declare class OrderApi extends BaseAPI {
|
5651
|
+
/**
|
5652
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
5653
|
+
* @summary Create an order for a product
|
5654
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
5655
|
+
* @param {*} [options] Override http request option.
|
5656
|
+
* @throws {RequiredError}
|
5657
|
+
* @memberof OrderApi
|
5658
|
+
*/
|
5659
|
+
createAdminOrder(adminOrderCreationRequest?: AdminOrderCreationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Order, any>>;
|
5594
5660
|
/**
|
5595
5661
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
5596
5662
|
* @summary Create an order for a product
|
@@ -5629,11 +5695,13 @@ export declare class OrderApi extends BaseAPI {
|
|
5629
5695
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
5630
5696
|
* @param {Array<string>} [userIDs] Filter by user ids
|
5631
5697
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
5698
|
+
* @param {OrderKind} [kind] Filter by kind
|
5699
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
5632
5700
|
* @param {*} [options] Override http request option.
|
5633
5701
|
* @throws {RequiredError}
|
5634
5702
|
* @memberof OrderApi
|
5635
5703
|
*/
|
5636
|
-
listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OrderListResponse, any>>;
|
5704
|
+
listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, kind?: OrderKind, source?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OrderListResponse, any>>;
|
5637
5705
|
/**
|
5638
5706
|
* List existing orders
|
5639
5707
|
* @summary List existing orders
|
package/dist/api.js
CHANGED
@@ -158,7 +158,8 @@ exports.NotificationStatus = {
|
|
158
158
|
*/
|
159
159
|
exports.OrderKind = {
|
160
160
|
Webshop: 'webshop',
|
161
|
-
Promotions: 'promotions'
|
161
|
+
Promotions: 'promotions',
|
162
|
+
SalesBudget: 'sales_budget'
|
162
163
|
};
|
163
164
|
/**
|
164
165
|
*
|
@@ -402,7 +403,8 @@ exports.TransactionSource = {
|
|
402
403
|
Promotion: 'promotion',
|
403
404
|
Manual: 'manual',
|
404
405
|
Expiry: 'expiry',
|
405
|
-
Transfer: 'transfer'
|
406
|
+
Transfer: 'transfer',
|
407
|
+
SalesBudget: 'sales_budget'
|
406
408
|
};
|
407
409
|
/**
|
408
410
|
*
|
@@ -2788,6 +2790,37 @@ exports.NotificationApi = NotificationApi;
|
|
2788
2790
|
*/
|
2789
2791
|
const OrderApiAxiosParamCreator = function (configuration) {
|
2790
2792
|
return {
|
2793
|
+
/**
|
2794
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
2795
|
+
* @summary Create an order for a product
|
2796
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
2797
|
+
* @param {*} [options] Override http request option.
|
2798
|
+
* @throws {RequiredError}
|
2799
|
+
*/
|
2800
|
+
createAdminOrder: (adminOrderCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
2801
|
+
const localVarPath = `/admins/orders`;
|
2802
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
2803
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
2804
|
+
let baseOptions;
|
2805
|
+
if (configuration) {
|
2806
|
+
baseOptions = configuration.baseOptions;
|
2807
|
+
}
|
2808
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
2809
|
+
const localVarHeaderParameter = {};
|
2810
|
+
const localVarQueryParameter = {};
|
2811
|
+
// authentication systemJWT required
|
2812
|
+
// http bearer authentication required
|
2813
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
2814
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
2815
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
2816
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
2817
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
2818
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(adminOrderCreationRequest, localVarRequestOptions, configuration);
|
2819
|
+
return {
|
2820
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
2821
|
+
options: localVarRequestOptions,
|
2822
|
+
};
|
2823
|
+
}),
|
2791
2824
|
/**
|
2792
2825
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
2793
2826
|
* @summary Create an order for a product
|
@@ -2894,10 +2927,12 @@ const OrderApiAxiosParamCreator = function (configuration) {
|
|
2894
2927
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
2895
2928
|
* @param {Array<string>} [userIDs] Filter by user ids
|
2896
2929
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
2930
|
+
* @param {OrderKind} [kind] Filter by kind
|
2931
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
2897
2932
|
* @param {*} [options] Override http request option.
|
2898
2933
|
* @throws {RequiredError}
|
2899
2934
|
*/
|
2900
|
-
listOrders: (paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
2935
|
+
listOrders: (paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
2901
2936
|
const localVarPath = `/admins/orders`;
|
2902
2937
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
2903
2938
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
@@ -2939,6 +2974,12 @@ const OrderApiAxiosParamCreator = function (configuration) {
|
|
2939
2974
|
if (clientIDs) {
|
2940
2975
|
localVarQueryParameter['clientIDs'] = clientIDs;
|
2941
2976
|
}
|
2977
|
+
if (kind !== undefined) {
|
2978
|
+
localVarQueryParameter['kind'] = kind;
|
2979
|
+
}
|
2980
|
+
if (source !== undefined) {
|
2981
|
+
localVarQueryParameter['source'] = source;
|
2982
|
+
}
|
2942
2983
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
2943
2984
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
2944
2985
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
@@ -3017,6 +3058,19 @@ exports.OrderApiAxiosParamCreator = OrderApiAxiosParamCreator;
|
|
3017
3058
|
const OrderApiFp = function (configuration) {
|
3018
3059
|
const localVarAxiosParamCreator = (0, exports.OrderApiAxiosParamCreator)(configuration);
|
3019
3060
|
return {
|
3061
|
+
/**
|
3062
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
3063
|
+
* @summary Create an order for a product
|
3064
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
3065
|
+
* @param {*} [options] Override http request option.
|
3066
|
+
* @throws {RequiredError}
|
3067
|
+
*/
|
3068
|
+
createAdminOrder(adminOrderCreationRequest, options) {
|
3069
|
+
return __awaiter(this, void 0, void 0, function* () {
|
3070
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createAdminOrder(adminOrderCreationRequest, options);
|
3071
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
3072
|
+
});
|
3073
|
+
},
|
3020
3074
|
/**
|
3021
3075
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
3022
3076
|
* @summary Create an order for a product
|
@@ -3067,12 +3121,14 @@ const OrderApiFp = function (configuration) {
|
|
3067
3121
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
3068
3122
|
* @param {Array<string>} [userIDs] Filter by user ids
|
3069
3123
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
3124
|
+
* @param {OrderKind} [kind] Filter by kind
|
3125
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
3070
3126
|
* @param {*} [options] Override http request option.
|
3071
3127
|
* @throws {RequiredError}
|
3072
3128
|
*/
|
3073
|
-
listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options) {
|
3129
|
+
listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options) {
|
3074
3130
|
return __awaiter(this, void 0, void 0, function* () {
|
3075
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options);
|
3131
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options);
|
3076
3132
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
3077
3133
|
});
|
3078
3134
|
},
|
@@ -3105,6 +3161,16 @@ exports.OrderApiFp = OrderApiFp;
|
|
3105
3161
|
const OrderApiFactory = function (configuration, basePath, axios) {
|
3106
3162
|
const localVarFp = (0, exports.OrderApiFp)(configuration);
|
3107
3163
|
return {
|
3164
|
+
/**
|
3165
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
3166
|
+
* @summary Create an order for a product
|
3167
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
3168
|
+
* @param {*} [options] Override http request option.
|
3169
|
+
* @throws {RequiredError}
|
3170
|
+
*/
|
3171
|
+
createAdminOrder(adminOrderCreationRequest, options) {
|
3172
|
+
return localVarFp.createAdminOrder(adminOrderCreationRequest, options).then((request) => request(axios, basePath));
|
3173
|
+
},
|
3108
3174
|
/**
|
3109
3175
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
3110
3176
|
* @summary Create an order for a product
|
@@ -3146,11 +3212,13 @@ const OrderApiFactory = function (configuration, basePath, axios) {
|
|
3146
3212
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
3147
3213
|
* @param {Array<string>} [userIDs] Filter by user ids
|
3148
3214
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
3215
|
+
* @param {OrderKind} [kind] Filter by kind
|
3216
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
3149
3217
|
* @param {*} [options] Override http request option.
|
3150
3218
|
* @throws {RequiredError}
|
3151
3219
|
*/
|
3152
|
-
listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options) {
|
3153
|
-
return localVarFp.listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options).then((request) => request(axios, basePath));
|
3220
|
+
listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options) {
|
3221
|
+
return localVarFp.listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options).then((request) => request(axios, basePath));
|
3154
3222
|
},
|
3155
3223
|
/**
|
3156
3224
|
* List existing orders
|
@@ -3178,6 +3246,17 @@ exports.OrderApiFactory = OrderApiFactory;
|
|
3178
3246
|
* @extends {BaseAPI}
|
3179
3247
|
*/
|
3180
3248
|
class OrderApi extends base_1.BaseAPI {
|
3249
|
+
/**
|
3250
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
3251
|
+
* @summary Create an order for a product
|
3252
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
3253
|
+
* @param {*} [options] Override http request option.
|
3254
|
+
* @throws {RequiredError}
|
3255
|
+
* @memberof OrderApi
|
3256
|
+
*/
|
3257
|
+
createAdminOrder(adminOrderCreationRequest, options) {
|
3258
|
+
return (0, exports.OrderApiFp)(this.configuration).createAdminOrder(adminOrderCreationRequest, options).then((request) => request(this.axios, this.basePath));
|
3259
|
+
}
|
3181
3260
|
/**
|
3182
3261
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
3183
3262
|
* @summary Create an order for a product
|
@@ -3222,12 +3301,14 @@ class OrderApi extends base_1.BaseAPI {
|
|
3222
3301
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
3223
3302
|
* @param {Array<string>} [userIDs] Filter by user ids
|
3224
3303
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
3304
|
+
* @param {OrderKind} [kind] Filter by kind
|
3305
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
3225
3306
|
* @param {*} [options] Override http request option.
|
3226
3307
|
* @throws {RequiredError}
|
3227
3308
|
* @memberof OrderApi
|
3228
3309
|
*/
|
3229
|
-
listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options) {
|
3230
|
-
return (0, exports.OrderApiFp)(this.configuration).listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options).then((request) => request(this.axios, this.basePath));
|
3310
|
+
listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options) {
|
3311
|
+
return (0, exports.OrderApiFp)(this.configuration).listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options).then((request) => request(this.axios, this.basePath));
|
3231
3312
|
}
|
3232
3313
|
/**
|
3233
3314
|
* List existing orders
|
package/dist/esm/api.d.ts
CHANGED
@@ -13,6 +13,25 @@ import type { Configuration } from './configuration';
|
|
13
13
|
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
14
14
|
import type { RequestArgs } from './base';
|
15
15
|
import { BaseAPI } from './base';
|
16
|
+
/**
|
17
|
+
*
|
18
|
+
* @export
|
19
|
+
* @interface AdminOrderCreationRequest
|
20
|
+
*/
|
21
|
+
export interface AdminOrderCreationRequest {
|
22
|
+
/**
|
23
|
+
*
|
24
|
+
* @type {Array<OrderItemCreationRequest>}
|
25
|
+
* @memberof AdminOrderCreationRequest
|
26
|
+
*/
|
27
|
+
'items': Array<OrderItemCreationRequest>;
|
28
|
+
/**
|
29
|
+
*
|
30
|
+
* @type {Beneficiary}
|
31
|
+
* @memberof AdminOrderCreationRequest
|
32
|
+
*/
|
33
|
+
'beneficiary'?: Beneficiary;
|
34
|
+
}
|
16
35
|
/**
|
17
36
|
*
|
18
37
|
* @export
|
@@ -211,7 +230,7 @@ export interface BalanceUpdateRequest {
|
|
211
230
|
* @type {TransactionKind}
|
212
231
|
* @memberof BalanceUpdateRequest
|
213
232
|
*/
|
214
|
-
'transactionKind'
|
233
|
+
'transactionKind': TransactionKind;
|
215
234
|
/**
|
216
235
|
*
|
217
236
|
* @type {TransactionCurrencyKind}
|
@@ -1205,6 +1224,12 @@ export interface Order {
|
|
1205
1224
|
* @memberof Order
|
1206
1225
|
*/
|
1207
1226
|
'status'?: OrderStatus;
|
1227
|
+
/**
|
1228
|
+
*
|
1229
|
+
* @type {string}
|
1230
|
+
* @memberof Order
|
1231
|
+
*/
|
1232
|
+
'clientID'?: string;
|
1208
1233
|
}
|
1209
1234
|
/**
|
1210
1235
|
*
|
@@ -1252,6 +1277,7 @@ export interface OrderItemCreationRequest {
|
|
1252
1277
|
export declare const OrderKind: {
|
1253
1278
|
readonly Webshop: "webshop";
|
1254
1279
|
readonly Promotions: "promotions";
|
1280
|
+
readonly SalesBudget: "sales_budget";
|
1255
1281
|
};
|
1256
1282
|
export type OrderKind = typeof OrderKind[keyof typeof OrderKind];
|
1257
1283
|
/**
|
@@ -3494,13 +3520,14 @@ export declare const TransactionSource: {
|
|
3494
3520
|
readonly Manual: "manual";
|
3495
3521
|
readonly Expiry: "expiry";
|
3496
3522
|
readonly Transfer: "transfer";
|
3523
|
+
readonly SalesBudget: "sales_budget";
|
3497
3524
|
};
|
3498
3525
|
export type TransactionSource = typeof TransactionSource[keyof typeof TransactionSource];
|
3499
3526
|
/**
|
3500
3527
|
* @type TransactionSourceReference
|
3501
3528
|
* @export
|
3502
3529
|
*/
|
3503
|
-
export type TransactionSourceReference = BalanceWithBeneficiaryRef |
|
3530
|
+
export type TransactionSourceReference = BalanceWithBeneficiaryRef | PeriodPromotion | User | UserOrder;
|
3504
3531
|
/**
|
3505
3532
|
*
|
3506
3533
|
* @export
|
@@ -3857,7 +3884,7 @@ export interface UserOrder {
|
|
3857
3884
|
* @type {string}
|
3858
3885
|
* @memberof UserOrder
|
3859
3886
|
*/
|
3860
|
-
'source'
|
3887
|
+
'source': string;
|
3861
3888
|
/**
|
3862
3889
|
*
|
3863
3890
|
* @type {string}
|
@@ -3866,10 +3893,10 @@ export interface UserOrder {
|
|
3866
3893
|
'userID'?: string;
|
3867
3894
|
/**
|
3868
3895
|
*
|
3869
|
-
* @type {
|
3896
|
+
* @type {string}
|
3870
3897
|
* @memberof UserOrder
|
3871
3898
|
*/
|
3872
|
-
'
|
3899
|
+
'clientID': string;
|
3873
3900
|
}
|
3874
3901
|
/**
|
3875
3902
|
*
|
@@ -5412,6 +5439,14 @@ export declare class NotificationApi extends BaseAPI {
|
|
5412
5439
|
* @export
|
5413
5440
|
*/
|
5414
5441
|
export declare const OrderApiAxiosParamCreator: (configuration?: Configuration) => {
|
5442
|
+
/**
|
5443
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
5444
|
+
* @summary Create an order for a product
|
5445
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
5446
|
+
* @param {*} [options] Override http request option.
|
5447
|
+
* @throws {RequiredError}
|
5448
|
+
*/
|
5449
|
+
createAdminOrder: (adminOrderCreationRequest?: AdminOrderCreationRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
5415
5450
|
/**
|
5416
5451
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
5417
5452
|
* @summary Create an order for a product
|
@@ -5447,10 +5482,12 @@ export declare const OrderApiAxiosParamCreator: (configuration?: Configuration)
|
|
5447
5482
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
5448
5483
|
* @param {Array<string>} [userIDs] Filter by user ids
|
5449
5484
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
5485
|
+
* @param {OrderKind} [kind] Filter by kind
|
5486
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
5450
5487
|
* @param {*} [options] Override http request option.
|
5451
5488
|
* @throws {RequiredError}
|
5452
5489
|
*/
|
5453
|
-
listOrders: (paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
5490
|
+
listOrders: (paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, kind?: OrderKind, source?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
5454
5491
|
/**
|
5455
5492
|
* List existing orders
|
5456
5493
|
* @summary List existing orders
|
@@ -5471,6 +5508,14 @@ export declare const OrderApiAxiosParamCreator: (configuration?: Configuration)
|
|
5471
5508
|
* @export
|
5472
5509
|
*/
|
5473
5510
|
export declare const OrderApiFp: (configuration?: Configuration) => {
|
5511
|
+
/**
|
5512
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
5513
|
+
* @summary Create an order for a product
|
5514
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
5515
|
+
* @param {*} [options] Override http request option.
|
5516
|
+
* @throws {RequiredError}
|
5517
|
+
*/
|
5518
|
+
createAdminOrder(adminOrderCreationRequest?: AdminOrderCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>>;
|
5474
5519
|
/**
|
5475
5520
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
5476
5521
|
* @summary Create an order for a product
|
@@ -5506,10 +5551,12 @@ export declare const OrderApiFp: (configuration?: Configuration) => {
|
|
5506
5551
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
5507
5552
|
* @param {Array<string>} [userIDs] Filter by user ids
|
5508
5553
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
5554
|
+
* @param {OrderKind} [kind] Filter by kind
|
5555
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
5509
5556
|
* @param {*} [options] Override http request option.
|
5510
5557
|
* @throws {RequiredError}
|
5511
5558
|
*/
|
5512
|
-
listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderListResponse>>;
|
5559
|
+
listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, kind?: OrderKind, source?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderListResponse>>;
|
5513
5560
|
/**
|
5514
5561
|
* List existing orders
|
5515
5562
|
* @summary List existing orders
|
@@ -5530,6 +5577,14 @@ export declare const OrderApiFp: (configuration?: Configuration) => {
|
|
5530
5577
|
* @export
|
5531
5578
|
*/
|
5532
5579
|
export declare const OrderApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
5580
|
+
/**
|
5581
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
5582
|
+
* @summary Create an order for a product
|
5583
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
5584
|
+
* @param {*} [options] Override http request option.
|
5585
|
+
* @throws {RequiredError}
|
5586
|
+
*/
|
5587
|
+
createAdminOrder(adminOrderCreationRequest?: AdminOrderCreationRequest, options?: any): AxiosPromise<Order>;
|
5533
5588
|
/**
|
5534
5589
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
5535
5590
|
* @summary Create an order for a product
|
@@ -5565,10 +5620,12 @@ export declare const OrderApiFactory: (configuration?: Configuration, basePath?:
|
|
5565
5620
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
5566
5621
|
* @param {Array<string>} [userIDs] Filter by user ids
|
5567
5622
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
5623
|
+
* @param {OrderKind} [kind] Filter by kind
|
5624
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
5568
5625
|
* @param {*} [options] Override http request option.
|
5569
5626
|
* @throws {RequiredError}
|
5570
5627
|
*/
|
5571
|
-
listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, options?: any): AxiosPromise<OrderListResponse>;
|
5628
|
+
listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, kind?: OrderKind, source?: string, options?: any): AxiosPromise<OrderListResponse>;
|
5572
5629
|
/**
|
5573
5630
|
* List existing orders
|
5574
5631
|
* @summary List existing orders
|
@@ -5591,6 +5648,15 @@ export declare const OrderApiFactory: (configuration?: Configuration, basePath?:
|
|
5591
5648
|
* @extends {BaseAPI}
|
5592
5649
|
*/
|
5593
5650
|
export declare class OrderApi extends BaseAPI {
|
5651
|
+
/**
|
5652
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
5653
|
+
* @summary Create an order for a product
|
5654
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
5655
|
+
* @param {*} [options] Override http request option.
|
5656
|
+
* @throws {RequiredError}
|
5657
|
+
* @memberof OrderApi
|
5658
|
+
*/
|
5659
|
+
createAdminOrder(adminOrderCreationRequest?: AdminOrderCreationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Order, any>>;
|
5594
5660
|
/**
|
5595
5661
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
5596
5662
|
* @summary Create an order for a product
|
@@ -5629,11 +5695,13 @@ export declare class OrderApi extends BaseAPI {
|
|
5629
5695
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
5630
5696
|
* @param {Array<string>} [userIDs] Filter by user ids
|
5631
5697
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
5698
|
+
* @param {OrderKind} [kind] Filter by kind
|
5699
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
5632
5700
|
* @param {*} [options] Override http request option.
|
5633
5701
|
* @throws {RequiredError}
|
5634
5702
|
* @memberof OrderApi
|
5635
5703
|
*/
|
5636
|
-
listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OrderListResponse, any>>;
|
5704
|
+
listOrders(paginationToken?: string, search?: string, productId?: string, balanceIDs?: Array<string>, createdAfter?: string, createdBefore?: string, userIDs?: Array<string>, clientIDs?: Array<string>, kind?: OrderKind, source?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OrderListResponse, any>>;
|
5637
5705
|
/**
|
5638
5706
|
* List existing orders
|
5639
5707
|
* @summary List existing orders
|
package/dist/esm/api.js
CHANGED
@@ -153,7 +153,8 @@ export const NotificationStatus = {
|
|
153
153
|
*/
|
154
154
|
export const OrderKind = {
|
155
155
|
Webshop: 'webshop',
|
156
|
-
Promotions: 'promotions'
|
156
|
+
Promotions: 'promotions',
|
157
|
+
SalesBudget: 'sales_budget'
|
157
158
|
};
|
158
159
|
/**
|
159
160
|
*
|
@@ -397,7 +398,8 @@ export const TransactionSource = {
|
|
397
398
|
Promotion: 'promotion',
|
398
399
|
Manual: 'manual',
|
399
400
|
Expiry: 'expiry',
|
400
|
-
Transfer: 'transfer'
|
401
|
+
Transfer: 'transfer',
|
402
|
+
SalesBudget: 'sales_budget'
|
401
403
|
};
|
402
404
|
/**
|
403
405
|
*
|
@@ -2743,6 +2745,37 @@ export class NotificationApi extends BaseAPI {
|
|
2743
2745
|
*/
|
2744
2746
|
export const OrderApiAxiosParamCreator = function (configuration) {
|
2745
2747
|
return {
|
2748
|
+
/**
|
2749
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
2750
|
+
* @summary Create an order for a product
|
2751
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
2752
|
+
* @param {*} [options] Override http request option.
|
2753
|
+
* @throws {RequiredError}
|
2754
|
+
*/
|
2755
|
+
createAdminOrder: (adminOrderCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
2756
|
+
const localVarPath = `/admins/orders`;
|
2757
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
2758
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
2759
|
+
let baseOptions;
|
2760
|
+
if (configuration) {
|
2761
|
+
baseOptions = configuration.baseOptions;
|
2762
|
+
}
|
2763
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
2764
|
+
const localVarHeaderParameter = {};
|
2765
|
+
const localVarQueryParameter = {};
|
2766
|
+
// authentication systemJWT required
|
2767
|
+
// http bearer authentication required
|
2768
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
2769
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
2770
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
2771
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
2772
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
2773
|
+
localVarRequestOptions.data = serializeDataIfNeeded(adminOrderCreationRequest, localVarRequestOptions, configuration);
|
2774
|
+
return {
|
2775
|
+
url: toPathString(localVarUrlObj),
|
2776
|
+
options: localVarRequestOptions,
|
2777
|
+
};
|
2778
|
+
}),
|
2746
2779
|
/**
|
2747
2780
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
2748
2781
|
* @summary Create an order for a product
|
@@ -2849,10 +2882,12 @@ export const OrderApiAxiosParamCreator = function (configuration) {
|
|
2849
2882
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
2850
2883
|
* @param {Array<string>} [userIDs] Filter by user ids
|
2851
2884
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
2885
|
+
* @param {OrderKind} [kind] Filter by kind
|
2886
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
2852
2887
|
* @param {*} [options] Override http request option.
|
2853
2888
|
* @throws {RequiredError}
|
2854
2889
|
*/
|
2855
|
-
listOrders: (paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
2890
|
+
listOrders: (paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
2856
2891
|
const localVarPath = `/admins/orders`;
|
2857
2892
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
2858
2893
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
@@ -2894,6 +2929,12 @@ export const OrderApiAxiosParamCreator = function (configuration) {
|
|
2894
2929
|
if (clientIDs) {
|
2895
2930
|
localVarQueryParameter['clientIDs'] = clientIDs;
|
2896
2931
|
}
|
2932
|
+
if (kind !== undefined) {
|
2933
|
+
localVarQueryParameter['kind'] = kind;
|
2934
|
+
}
|
2935
|
+
if (source !== undefined) {
|
2936
|
+
localVarQueryParameter['source'] = source;
|
2937
|
+
}
|
2897
2938
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
2898
2939
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
2899
2940
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
@@ -2971,6 +3012,19 @@ export const OrderApiAxiosParamCreator = function (configuration) {
|
|
2971
3012
|
export const OrderApiFp = function (configuration) {
|
2972
3013
|
const localVarAxiosParamCreator = OrderApiAxiosParamCreator(configuration);
|
2973
3014
|
return {
|
3015
|
+
/**
|
3016
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
3017
|
+
* @summary Create an order for a product
|
3018
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
3019
|
+
* @param {*} [options] Override http request option.
|
3020
|
+
* @throws {RequiredError}
|
3021
|
+
*/
|
3022
|
+
createAdminOrder(adminOrderCreationRequest, options) {
|
3023
|
+
return __awaiter(this, void 0, void 0, function* () {
|
3024
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createAdminOrder(adminOrderCreationRequest, options);
|
3025
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
3026
|
+
});
|
3027
|
+
},
|
2974
3028
|
/**
|
2975
3029
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
2976
3030
|
* @summary Create an order for a product
|
@@ -3021,12 +3075,14 @@ export const OrderApiFp = function (configuration) {
|
|
3021
3075
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
3022
3076
|
* @param {Array<string>} [userIDs] Filter by user ids
|
3023
3077
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
3078
|
+
* @param {OrderKind} [kind] Filter by kind
|
3079
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
3024
3080
|
* @param {*} [options] Override http request option.
|
3025
3081
|
* @throws {RequiredError}
|
3026
3082
|
*/
|
3027
|
-
listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options) {
|
3083
|
+
listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options) {
|
3028
3084
|
return __awaiter(this, void 0, void 0, function* () {
|
3029
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options);
|
3085
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options);
|
3030
3086
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
3031
3087
|
});
|
3032
3088
|
},
|
@@ -3058,6 +3114,16 @@ export const OrderApiFp = function (configuration) {
|
|
3058
3114
|
export const OrderApiFactory = function (configuration, basePath, axios) {
|
3059
3115
|
const localVarFp = OrderApiFp(configuration);
|
3060
3116
|
return {
|
3117
|
+
/**
|
3118
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
3119
|
+
* @summary Create an order for a product
|
3120
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
3121
|
+
* @param {*} [options] Override http request option.
|
3122
|
+
* @throws {RequiredError}
|
3123
|
+
*/
|
3124
|
+
createAdminOrder(adminOrderCreationRequest, options) {
|
3125
|
+
return localVarFp.createAdminOrder(adminOrderCreationRequest, options).then((request) => request(axios, basePath));
|
3126
|
+
},
|
3061
3127
|
/**
|
3062
3128
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
3063
3129
|
* @summary Create an order for a product
|
@@ -3099,11 +3165,13 @@ export const OrderApiFactory = function (configuration, basePath, axios) {
|
|
3099
3165
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
3100
3166
|
* @param {Array<string>} [userIDs] Filter by user ids
|
3101
3167
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
3168
|
+
* @param {OrderKind} [kind] Filter by kind
|
3169
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
3102
3170
|
* @param {*} [options] Override http request option.
|
3103
3171
|
* @throws {RequiredError}
|
3104
3172
|
*/
|
3105
|
-
listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options) {
|
3106
|
-
return localVarFp.listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options).then((request) => request(axios, basePath));
|
3173
|
+
listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options) {
|
3174
|
+
return localVarFp.listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options).then((request) => request(axios, basePath));
|
3107
3175
|
},
|
3108
3176
|
/**
|
3109
3177
|
* List existing orders
|
@@ -3130,6 +3198,17 @@ export const OrderApiFactory = function (configuration, basePath, axios) {
|
|
3130
3198
|
* @extends {BaseAPI}
|
3131
3199
|
*/
|
3132
3200
|
export class OrderApi extends BaseAPI {
|
3201
|
+
/**
|
3202
|
+
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
3203
|
+
* @summary Create an order for a product
|
3204
|
+
* @param {AdminOrderCreationRequest} [adminOrderCreationRequest]
|
3205
|
+
* @param {*} [options] Override http request option.
|
3206
|
+
* @throws {RequiredError}
|
3207
|
+
* @memberof OrderApi
|
3208
|
+
*/
|
3209
|
+
createAdminOrder(adminOrderCreationRequest, options) {
|
3210
|
+
return OrderApiFp(this.configuration).createAdminOrder(adminOrderCreationRequest, options).then((request) => request(this.axios, this.basePath));
|
3211
|
+
}
|
3133
3212
|
/**
|
3134
3213
|
* Create a product order. If successful the value of the product will be deducted from the used balance.
|
3135
3214
|
* @summary Create an order for a product
|
@@ -3174,12 +3253,14 @@ export class OrderApi extends BaseAPI {
|
|
3174
3253
|
* @param {string} [createdBefore] Filter orders created before the specified date
|
3175
3254
|
* @param {Array<string>} [userIDs] Filter by user ids
|
3176
3255
|
* @param {Array<string>} [clientIDs] Filter by client ids
|
3256
|
+
* @param {OrderKind} [kind] Filter by kind
|
3257
|
+
* @param {string} [source] Filter by order source. Either promotion or user reference, depending on the kind.
|
3177
3258
|
* @param {*} [options] Override http request option.
|
3178
3259
|
* @throws {RequiredError}
|
3179
3260
|
* @memberof OrderApi
|
3180
3261
|
*/
|
3181
|
-
listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options) {
|
3182
|
-
return OrderApiFp(this.configuration).listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, options).then((request) => request(this.axios, this.basePath));
|
3262
|
+
listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options) {
|
3263
|
+
return OrderApiFp(this.configuration).listOrders(paginationToken, search, productId, balanceIDs, createdAfter, createdBefore, userIDs, clientIDs, kind, source, options).then((request) => request(this.axios, this.basePath));
|
3183
3264
|
}
|
3184
3265
|
/**
|
3185
3266
|
* List existing orders
|