flexinet-api 0.0.675-prerelease0 → 0.0.687-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 +135 -0
- package/dist/api.d.ts +88 -0
- package/dist/api.js +80 -0
- package/dist/esm/api.d.ts +88 -0
- package/dist/esm/api.js +80 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## flexinet-api@0.0.
|
|
1
|
+
## flexinet-api@0.0.687-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.687-prerelease0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/api.ts
CHANGED
|
@@ -2079,6 +2079,12 @@ export interface Promotion {
|
|
|
2079
2079
|
}
|
|
2080
2080
|
|
|
2081
2081
|
|
|
2082
|
+
/**
|
|
2083
|
+
* @type PromotionBeneficiariesResponse
|
|
2084
|
+
* @export
|
|
2085
|
+
*/
|
|
2086
|
+
export type PromotionBeneficiariesResponse = { kind: 'client' } & PromotionClientBeneficiaries | { kind: 'user' } & PromotionUserBeneficiaries;
|
|
2087
|
+
|
|
2082
2088
|
/**
|
|
2083
2089
|
*
|
|
2084
2090
|
* @export
|
|
@@ -2098,6 +2104,27 @@ export interface PromotionClaimRequest {
|
|
|
2098
2104
|
*/
|
|
2099
2105
|
'clientId'?: string;
|
|
2100
2106
|
}
|
|
2107
|
+
/**
|
|
2108
|
+
*
|
|
2109
|
+
* @export
|
|
2110
|
+
* @interface PromotionClientBeneficiaries
|
|
2111
|
+
*/
|
|
2112
|
+
export interface PromotionClientBeneficiaries {
|
|
2113
|
+
/**
|
|
2114
|
+
*
|
|
2115
|
+
* @type {BeneficiaryKind}
|
|
2116
|
+
* @memberof PromotionClientBeneficiaries
|
|
2117
|
+
*/
|
|
2118
|
+
'kind': BeneficiaryKind;
|
|
2119
|
+
/**
|
|
2120
|
+
*
|
|
2121
|
+
* @type {Array<Client>}
|
|
2122
|
+
* @memberof PromotionClientBeneficiaries
|
|
2123
|
+
*/
|
|
2124
|
+
'beneficiaries': Array<Client>;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
|
|
2101
2128
|
/**
|
|
2102
2129
|
*
|
|
2103
2130
|
* @export
|
|
@@ -2257,6 +2284,27 @@ export const PromotionType = {
|
|
|
2257
2284
|
export type PromotionType = typeof PromotionType[keyof typeof PromotionType];
|
|
2258
2285
|
|
|
2259
2286
|
|
|
2287
|
+
/**
|
|
2288
|
+
*
|
|
2289
|
+
* @export
|
|
2290
|
+
* @interface PromotionUserBeneficiaries
|
|
2291
|
+
*/
|
|
2292
|
+
export interface PromotionUserBeneficiaries {
|
|
2293
|
+
/**
|
|
2294
|
+
*
|
|
2295
|
+
* @type {BeneficiaryKind}
|
|
2296
|
+
* @memberof PromotionUserBeneficiaries
|
|
2297
|
+
*/
|
|
2298
|
+
'kind': BeneficiaryKind;
|
|
2299
|
+
/**
|
|
2300
|
+
*
|
|
2301
|
+
* @type {Array<User>}
|
|
2302
|
+
* @memberof PromotionUserBeneficiaries
|
|
2303
|
+
*/
|
|
2304
|
+
'beneficiaries': Array<User>;
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2307
|
+
|
|
2260
2308
|
/**
|
|
2261
2309
|
*
|
|
2262
2310
|
* @export
|
|
@@ -8086,6 +8134,54 @@ export const PromotionApiAxiosParamCreator = function (configuration?: Configura
|
|
|
8086
8134
|
|
|
8087
8135
|
|
|
8088
8136
|
|
|
8137
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
8138
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
8139
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
8140
|
+
|
|
8141
|
+
return {
|
|
8142
|
+
url: toPathString(localVarUrlObj),
|
|
8143
|
+
options: localVarRequestOptions,
|
|
8144
|
+
};
|
|
8145
|
+
},
|
|
8146
|
+
/**
|
|
8147
|
+
* List promotion beneficiaries
|
|
8148
|
+
* @summary List promotion beneficiaries
|
|
8149
|
+
* @param {string} id Promotion ID
|
|
8150
|
+
* @param {number} [periodID] Period ID
|
|
8151
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
8152
|
+
* @param {*} [options] Override http request option.
|
|
8153
|
+
* @throws {RequiredError}
|
|
8154
|
+
*/
|
|
8155
|
+
listPromotionBeneficiaries: async (id: string, periodID?: number, hasProgress?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
8156
|
+
// verify required parameter 'id' is not null or undefined
|
|
8157
|
+
assertParamExists('listPromotionBeneficiaries', 'id', id)
|
|
8158
|
+
const localVarPath = `/admins/promotions/{id}/beneficiaries`
|
|
8159
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
8160
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
8161
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
8162
|
+
let baseOptions;
|
|
8163
|
+
if (configuration) {
|
|
8164
|
+
baseOptions = configuration.baseOptions;
|
|
8165
|
+
}
|
|
8166
|
+
|
|
8167
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
8168
|
+
const localVarHeaderParameter = {} as any;
|
|
8169
|
+
const localVarQueryParameter = {} as any;
|
|
8170
|
+
|
|
8171
|
+
// authentication systemJWT required
|
|
8172
|
+
// http bearer authentication required
|
|
8173
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
8174
|
+
|
|
8175
|
+
if (periodID !== undefined) {
|
|
8176
|
+
localVarQueryParameter['periodID'] = periodID;
|
|
8177
|
+
}
|
|
8178
|
+
|
|
8179
|
+
if (hasProgress !== undefined) {
|
|
8180
|
+
localVarQueryParameter['hasProgress'] = hasProgress;
|
|
8181
|
+
}
|
|
8182
|
+
|
|
8183
|
+
|
|
8184
|
+
|
|
8089
8185
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
8090
8186
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
8091
8187
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -8454,6 +8550,19 @@ export const PromotionApiFp = function(configuration?: Configuration) {
|
|
|
8454
8550
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserPromotion(id, options);
|
|
8455
8551
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
8456
8552
|
},
|
|
8553
|
+
/**
|
|
8554
|
+
* List promotion beneficiaries
|
|
8555
|
+
* @summary List promotion beneficiaries
|
|
8556
|
+
* @param {string} id Promotion ID
|
|
8557
|
+
* @param {number} [periodID] Period ID
|
|
8558
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
8559
|
+
* @param {*} [options] Override http request option.
|
|
8560
|
+
* @throws {RequiredError}
|
|
8561
|
+
*/
|
|
8562
|
+
async listPromotionBeneficiaries(id: string, periodID?: number, hasProgress?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PromotionBeneficiariesResponse>> {
|
|
8563
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listPromotionBeneficiaries(id, periodID, hasProgress, options);
|
|
8564
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
8565
|
+
},
|
|
8457
8566
|
/**
|
|
8458
8567
|
* List all promotions
|
|
8459
8568
|
* @summary List promotions
|
|
@@ -8612,6 +8721,18 @@ export const PromotionApiFactory = function (configuration?: Configuration, base
|
|
|
8612
8721
|
getUserPromotion(id: string, options?: any): AxiosPromise<UserPromotion> {
|
|
8613
8722
|
return localVarFp.getUserPromotion(id, options).then((request) => request(axios, basePath));
|
|
8614
8723
|
},
|
|
8724
|
+
/**
|
|
8725
|
+
* List promotion beneficiaries
|
|
8726
|
+
* @summary List promotion beneficiaries
|
|
8727
|
+
* @param {string} id Promotion ID
|
|
8728
|
+
* @param {number} [periodID] Period ID
|
|
8729
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
8730
|
+
* @param {*} [options] Override http request option.
|
|
8731
|
+
* @throws {RequiredError}
|
|
8732
|
+
*/
|
|
8733
|
+
listPromotionBeneficiaries(id: string, periodID?: number, hasProgress?: boolean, options?: any): AxiosPromise<PromotionBeneficiariesResponse> {
|
|
8734
|
+
return localVarFp.listPromotionBeneficiaries(id, periodID, hasProgress, options).then((request) => request(axios, basePath));
|
|
8735
|
+
},
|
|
8615
8736
|
/**
|
|
8616
8737
|
* List all promotions
|
|
8617
8738
|
* @summary List promotions
|
|
@@ -8785,6 +8906,20 @@ export class PromotionApi extends BaseAPI {
|
|
|
8785
8906
|
return PromotionApiFp(this.configuration).getUserPromotion(id, options).then((request) => request(this.axios, this.basePath));
|
|
8786
8907
|
}
|
|
8787
8908
|
|
|
8909
|
+
/**
|
|
8910
|
+
* List promotion beneficiaries
|
|
8911
|
+
* @summary List promotion beneficiaries
|
|
8912
|
+
* @param {string} id Promotion ID
|
|
8913
|
+
* @param {number} [periodID] Period ID
|
|
8914
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
8915
|
+
* @param {*} [options] Override http request option.
|
|
8916
|
+
* @throws {RequiredError}
|
|
8917
|
+
* @memberof PromotionApi
|
|
8918
|
+
*/
|
|
8919
|
+
public listPromotionBeneficiaries(id: string, periodID?: number, hasProgress?: boolean, options?: AxiosRequestConfig) {
|
|
8920
|
+
return PromotionApiFp(this.configuration).listPromotionBeneficiaries(id, periodID, hasProgress, options).then((request) => request(this.axios, this.basePath));
|
|
8921
|
+
}
|
|
8922
|
+
|
|
8788
8923
|
/**
|
|
8789
8924
|
* List all promotions
|
|
8790
8925
|
* @summary List promotions
|
package/dist/api.d.ts
CHANGED
|
@@ -1978,6 +1978,15 @@ export interface Promotion {
|
|
|
1978
1978
|
*/
|
|
1979
1979
|
'notificationConfig': PromotionNotificationConfig;
|
|
1980
1980
|
}
|
|
1981
|
+
/**
|
|
1982
|
+
* @type PromotionBeneficiariesResponse
|
|
1983
|
+
* @export
|
|
1984
|
+
*/
|
|
1985
|
+
export type PromotionBeneficiariesResponse = {
|
|
1986
|
+
kind: 'client';
|
|
1987
|
+
} & PromotionClientBeneficiaries | {
|
|
1988
|
+
kind: 'user';
|
|
1989
|
+
} & PromotionUserBeneficiaries;
|
|
1981
1990
|
/**
|
|
1982
1991
|
*
|
|
1983
1992
|
* @export
|
|
@@ -1997,6 +2006,25 @@ export interface PromotionClaimRequest {
|
|
|
1997
2006
|
*/
|
|
1998
2007
|
'clientId'?: string;
|
|
1999
2008
|
}
|
|
2009
|
+
/**
|
|
2010
|
+
*
|
|
2011
|
+
* @export
|
|
2012
|
+
* @interface PromotionClientBeneficiaries
|
|
2013
|
+
*/
|
|
2014
|
+
export interface PromotionClientBeneficiaries {
|
|
2015
|
+
/**
|
|
2016
|
+
*
|
|
2017
|
+
* @type {BeneficiaryKind}
|
|
2018
|
+
* @memberof PromotionClientBeneficiaries
|
|
2019
|
+
*/
|
|
2020
|
+
'kind': BeneficiaryKind;
|
|
2021
|
+
/**
|
|
2022
|
+
*
|
|
2023
|
+
* @type {Array<Client>}
|
|
2024
|
+
* @memberof PromotionClientBeneficiaries
|
|
2025
|
+
*/
|
|
2026
|
+
'beneficiaries': Array<Client>;
|
|
2027
|
+
}
|
|
2000
2028
|
/**
|
|
2001
2029
|
*
|
|
2002
2030
|
* @export
|
|
@@ -2148,6 +2176,25 @@ export declare const PromotionType: {
|
|
|
2148
2176
|
readonly CustomDeal: "custom_deal";
|
|
2149
2177
|
};
|
|
2150
2178
|
export type PromotionType = typeof PromotionType[keyof typeof PromotionType];
|
|
2179
|
+
/**
|
|
2180
|
+
*
|
|
2181
|
+
* @export
|
|
2182
|
+
* @interface PromotionUserBeneficiaries
|
|
2183
|
+
*/
|
|
2184
|
+
export interface PromotionUserBeneficiaries {
|
|
2185
|
+
/**
|
|
2186
|
+
*
|
|
2187
|
+
* @type {BeneficiaryKind}
|
|
2188
|
+
* @memberof PromotionUserBeneficiaries
|
|
2189
|
+
*/
|
|
2190
|
+
'kind': BeneficiaryKind;
|
|
2191
|
+
/**
|
|
2192
|
+
*
|
|
2193
|
+
* @type {Array<User>}
|
|
2194
|
+
* @memberof PromotionUserBeneficiaries
|
|
2195
|
+
*/
|
|
2196
|
+
'beneficiaries': Array<User>;
|
|
2197
|
+
}
|
|
2151
2198
|
/**
|
|
2152
2199
|
*
|
|
2153
2200
|
* @export
|
|
@@ -5479,6 +5526,16 @@ export declare const PromotionApiAxiosParamCreator: (configuration?: Configurati
|
|
|
5479
5526
|
* @throws {RequiredError}
|
|
5480
5527
|
*/
|
|
5481
5528
|
getUserPromotion: (id: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
5529
|
+
/**
|
|
5530
|
+
* List promotion beneficiaries
|
|
5531
|
+
* @summary List promotion beneficiaries
|
|
5532
|
+
* @param {string} id Promotion ID
|
|
5533
|
+
* @param {number} [periodID] Period ID
|
|
5534
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
5535
|
+
* @param {*} [options] Override http request option.
|
|
5536
|
+
* @throws {RequiredError}
|
|
5537
|
+
*/
|
|
5538
|
+
listPromotionBeneficiaries: (id: string, periodID?: number, hasProgress?: boolean, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
5482
5539
|
/**
|
|
5483
5540
|
* List all promotions
|
|
5484
5541
|
* @summary List promotions
|
|
@@ -5606,6 +5663,16 @@ export declare const PromotionApiFp: (configuration?: Configuration) => {
|
|
|
5606
5663
|
* @throws {RequiredError}
|
|
5607
5664
|
*/
|
|
5608
5665
|
getUserPromotion(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserPromotion>>;
|
|
5666
|
+
/**
|
|
5667
|
+
* List promotion beneficiaries
|
|
5668
|
+
* @summary List promotion beneficiaries
|
|
5669
|
+
* @param {string} id Promotion ID
|
|
5670
|
+
* @param {number} [periodID] Period ID
|
|
5671
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
5672
|
+
* @param {*} [options] Override http request option.
|
|
5673
|
+
* @throws {RequiredError}
|
|
5674
|
+
*/
|
|
5675
|
+
listPromotionBeneficiaries(id: string, periodID?: number, hasProgress?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PromotionBeneficiariesResponse>>;
|
|
5609
5676
|
/**
|
|
5610
5677
|
* List all promotions
|
|
5611
5678
|
* @summary List promotions
|
|
@@ -5733,6 +5800,16 @@ export declare const PromotionApiFactory: (configuration?: Configuration, basePa
|
|
|
5733
5800
|
* @throws {RequiredError}
|
|
5734
5801
|
*/
|
|
5735
5802
|
getUserPromotion(id: string, options?: any): AxiosPromise<UserPromotion>;
|
|
5803
|
+
/**
|
|
5804
|
+
* List promotion beneficiaries
|
|
5805
|
+
* @summary List promotion beneficiaries
|
|
5806
|
+
* @param {string} id Promotion ID
|
|
5807
|
+
* @param {number} [periodID] Period ID
|
|
5808
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
5809
|
+
* @param {*} [options] Override http request option.
|
|
5810
|
+
* @throws {RequiredError}
|
|
5811
|
+
*/
|
|
5812
|
+
listPromotionBeneficiaries(id: string, periodID?: number, hasProgress?: boolean, options?: any): AxiosPromise<PromotionBeneficiariesResponse>;
|
|
5736
5813
|
/**
|
|
5737
5814
|
* List all promotions
|
|
5738
5815
|
* @summary List promotions
|
|
@@ -5871,6 +5948,17 @@ export declare class PromotionApi extends BaseAPI {
|
|
|
5871
5948
|
* @memberof PromotionApi
|
|
5872
5949
|
*/
|
|
5873
5950
|
getUserPromotion(id: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UserPromotion, any>>;
|
|
5951
|
+
/**
|
|
5952
|
+
* List promotion beneficiaries
|
|
5953
|
+
* @summary List promotion beneficiaries
|
|
5954
|
+
* @param {string} id Promotion ID
|
|
5955
|
+
* @param {number} [periodID] Period ID
|
|
5956
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
5957
|
+
* @param {*} [options] Override http request option.
|
|
5958
|
+
* @throws {RequiredError}
|
|
5959
|
+
* @memberof PromotionApi
|
|
5960
|
+
*/
|
|
5961
|
+
listPromotionBeneficiaries(id: string, periodID?: number, hasProgress?: boolean, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PromotionBeneficiariesResponse, any>>;
|
|
5874
5962
|
/**
|
|
5875
5963
|
* List all promotions
|
|
5876
5964
|
* @summary List promotions
|
package/dist/api.js
CHANGED
|
@@ -4512,6 +4512,46 @@ const PromotionApiAxiosParamCreator = function (configuration) {
|
|
|
4512
4512
|
options: localVarRequestOptions,
|
|
4513
4513
|
};
|
|
4514
4514
|
}),
|
|
4515
|
+
/**
|
|
4516
|
+
* List promotion beneficiaries
|
|
4517
|
+
* @summary List promotion beneficiaries
|
|
4518
|
+
* @param {string} id Promotion ID
|
|
4519
|
+
* @param {number} [periodID] Period ID
|
|
4520
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
4521
|
+
* @param {*} [options] Override http request option.
|
|
4522
|
+
* @throws {RequiredError}
|
|
4523
|
+
*/
|
|
4524
|
+
listPromotionBeneficiaries: (id, periodID, hasProgress, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4525
|
+
// verify required parameter 'id' is not null or undefined
|
|
4526
|
+
(0, common_1.assertParamExists)('listPromotionBeneficiaries', 'id', id);
|
|
4527
|
+
const localVarPath = `/admins/promotions/{id}/beneficiaries`
|
|
4528
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
4529
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4530
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
4531
|
+
let baseOptions;
|
|
4532
|
+
if (configuration) {
|
|
4533
|
+
baseOptions = configuration.baseOptions;
|
|
4534
|
+
}
|
|
4535
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
4536
|
+
const localVarHeaderParameter = {};
|
|
4537
|
+
const localVarQueryParameter = {};
|
|
4538
|
+
// authentication systemJWT required
|
|
4539
|
+
// http bearer authentication required
|
|
4540
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
4541
|
+
if (periodID !== undefined) {
|
|
4542
|
+
localVarQueryParameter['periodID'] = periodID;
|
|
4543
|
+
}
|
|
4544
|
+
if (hasProgress !== undefined) {
|
|
4545
|
+
localVarQueryParameter['hasProgress'] = hasProgress;
|
|
4546
|
+
}
|
|
4547
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
4548
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4549
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4550
|
+
return {
|
|
4551
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
4552
|
+
options: localVarRequestOptions,
|
|
4553
|
+
};
|
|
4554
|
+
}),
|
|
4515
4555
|
/**
|
|
4516
4556
|
* List all promotions
|
|
4517
4557
|
* @summary List promotions
|
|
@@ -4846,6 +4886,21 @@ const PromotionApiFp = function (configuration) {
|
|
|
4846
4886
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
4847
4887
|
});
|
|
4848
4888
|
},
|
|
4889
|
+
/**
|
|
4890
|
+
* List promotion beneficiaries
|
|
4891
|
+
* @summary List promotion beneficiaries
|
|
4892
|
+
* @param {string} id Promotion ID
|
|
4893
|
+
* @param {number} [periodID] Period ID
|
|
4894
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
4895
|
+
* @param {*} [options] Override http request option.
|
|
4896
|
+
* @throws {RequiredError}
|
|
4897
|
+
*/
|
|
4898
|
+
listPromotionBeneficiaries(id, periodID, hasProgress, options) {
|
|
4899
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4900
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listPromotionBeneficiaries(id, periodID, hasProgress, options);
|
|
4901
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
4902
|
+
});
|
|
4903
|
+
},
|
|
4849
4904
|
/**
|
|
4850
4905
|
* List all promotions
|
|
4851
4906
|
* @summary List promotions
|
|
@@ -5010,6 +5065,18 @@ const PromotionApiFactory = function (configuration, basePath, axios) {
|
|
|
5010
5065
|
getUserPromotion(id, options) {
|
|
5011
5066
|
return localVarFp.getUserPromotion(id, options).then((request) => request(axios, basePath));
|
|
5012
5067
|
},
|
|
5068
|
+
/**
|
|
5069
|
+
* List promotion beneficiaries
|
|
5070
|
+
* @summary List promotion beneficiaries
|
|
5071
|
+
* @param {string} id Promotion ID
|
|
5072
|
+
* @param {number} [periodID] Period ID
|
|
5073
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
5074
|
+
* @param {*} [options] Override http request option.
|
|
5075
|
+
* @throws {RequiredError}
|
|
5076
|
+
*/
|
|
5077
|
+
listPromotionBeneficiaries(id, periodID, hasProgress, options) {
|
|
5078
|
+
return localVarFp.listPromotionBeneficiaries(id, periodID, hasProgress, options).then((request) => request(axios, basePath));
|
|
5079
|
+
},
|
|
5013
5080
|
/**
|
|
5014
5081
|
* List all promotions
|
|
5015
5082
|
* @summary List promotions
|
|
@@ -5174,6 +5241,19 @@ class PromotionApi extends base_1.BaseAPI {
|
|
|
5174
5241
|
getUserPromotion(id, options) {
|
|
5175
5242
|
return (0, exports.PromotionApiFp)(this.configuration).getUserPromotion(id, options).then((request) => request(this.axios, this.basePath));
|
|
5176
5243
|
}
|
|
5244
|
+
/**
|
|
5245
|
+
* List promotion beneficiaries
|
|
5246
|
+
* @summary List promotion beneficiaries
|
|
5247
|
+
* @param {string} id Promotion ID
|
|
5248
|
+
* @param {number} [periodID] Period ID
|
|
5249
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
5250
|
+
* @param {*} [options] Override http request option.
|
|
5251
|
+
* @throws {RequiredError}
|
|
5252
|
+
* @memberof PromotionApi
|
|
5253
|
+
*/
|
|
5254
|
+
listPromotionBeneficiaries(id, periodID, hasProgress, options) {
|
|
5255
|
+
return (0, exports.PromotionApiFp)(this.configuration).listPromotionBeneficiaries(id, periodID, hasProgress, options).then((request) => request(this.axios, this.basePath));
|
|
5256
|
+
}
|
|
5177
5257
|
/**
|
|
5178
5258
|
* List all promotions
|
|
5179
5259
|
* @summary List promotions
|
package/dist/esm/api.d.ts
CHANGED
|
@@ -1978,6 +1978,15 @@ export interface Promotion {
|
|
|
1978
1978
|
*/
|
|
1979
1979
|
'notificationConfig': PromotionNotificationConfig;
|
|
1980
1980
|
}
|
|
1981
|
+
/**
|
|
1982
|
+
* @type PromotionBeneficiariesResponse
|
|
1983
|
+
* @export
|
|
1984
|
+
*/
|
|
1985
|
+
export type PromotionBeneficiariesResponse = {
|
|
1986
|
+
kind: 'client';
|
|
1987
|
+
} & PromotionClientBeneficiaries | {
|
|
1988
|
+
kind: 'user';
|
|
1989
|
+
} & PromotionUserBeneficiaries;
|
|
1981
1990
|
/**
|
|
1982
1991
|
*
|
|
1983
1992
|
* @export
|
|
@@ -1997,6 +2006,25 @@ export interface PromotionClaimRequest {
|
|
|
1997
2006
|
*/
|
|
1998
2007
|
'clientId'?: string;
|
|
1999
2008
|
}
|
|
2009
|
+
/**
|
|
2010
|
+
*
|
|
2011
|
+
* @export
|
|
2012
|
+
* @interface PromotionClientBeneficiaries
|
|
2013
|
+
*/
|
|
2014
|
+
export interface PromotionClientBeneficiaries {
|
|
2015
|
+
/**
|
|
2016
|
+
*
|
|
2017
|
+
* @type {BeneficiaryKind}
|
|
2018
|
+
* @memberof PromotionClientBeneficiaries
|
|
2019
|
+
*/
|
|
2020
|
+
'kind': BeneficiaryKind;
|
|
2021
|
+
/**
|
|
2022
|
+
*
|
|
2023
|
+
* @type {Array<Client>}
|
|
2024
|
+
* @memberof PromotionClientBeneficiaries
|
|
2025
|
+
*/
|
|
2026
|
+
'beneficiaries': Array<Client>;
|
|
2027
|
+
}
|
|
2000
2028
|
/**
|
|
2001
2029
|
*
|
|
2002
2030
|
* @export
|
|
@@ -2148,6 +2176,25 @@ export declare const PromotionType: {
|
|
|
2148
2176
|
readonly CustomDeal: "custom_deal";
|
|
2149
2177
|
};
|
|
2150
2178
|
export type PromotionType = typeof PromotionType[keyof typeof PromotionType];
|
|
2179
|
+
/**
|
|
2180
|
+
*
|
|
2181
|
+
* @export
|
|
2182
|
+
* @interface PromotionUserBeneficiaries
|
|
2183
|
+
*/
|
|
2184
|
+
export interface PromotionUserBeneficiaries {
|
|
2185
|
+
/**
|
|
2186
|
+
*
|
|
2187
|
+
* @type {BeneficiaryKind}
|
|
2188
|
+
* @memberof PromotionUserBeneficiaries
|
|
2189
|
+
*/
|
|
2190
|
+
'kind': BeneficiaryKind;
|
|
2191
|
+
/**
|
|
2192
|
+
*
|
|
2193
|
+
* @type {Array<User>}
|
|
2194
|
+
* @memberof PromotionUserBeneficiaries
|
|
2195
|
+
*/
|
|
2196
|
+
'beneficiaries': Array<User>;
|
|
2197
|
+
}
|
|
2151
2198
|
/**
|
|
2152
2199
|
*
|
|
2153
2200
|
* @export
|
|
@@ -5479,6 +5526,16 @@ export declare const PromotionApiAxiosParamCreator: (configuration?: Configurati
|
|
|
5479
5526
|
* @throws {RequiredError}
|
|
5480
5527
|
*/
|
|
5481
5528
|
getUserPromotion: (id: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
5529
|
+
/**
|
|
5530
|
+
* List promotion beneficiaries
|
|
5531
|
+
* @summary List promotion beneficiaries
|
|
5532
|
+
* @param {string} id Promotion ID
|
|
5533
|
+
* @param {number} [periodID] Period ID
|
|
5534
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
5535
|
+
* @param {*} [options] Override http request option.
|
|
5536
|
+
* @throws {RequiredError}
|
|
5537
|
+
*/
|
|
5538
|
+
listPromotionBeneficiaries: (id: string, periodID?: number, hasProgress?: boolean, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
5482
5539
|
/**
|
|
5483
5540
|
* List all promotions
|
|
5484
5541
|
* @summary List promotions
|
|
@@ -5606,6 +5663,16 @@ export declare const PromotionApiFp: (configuration?: Configuration) => {
|
|
|
5606
5663
|
* @throws {RequiredError}
|
|
5607
5664
|
*/
|
|
5608
5665
|
getUserPromotion(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserPromotion>>;
|
|
5666
|
+
/**
|
|
5667
|
+
* List promotion beneficiaries
|
|
5668
|
+
* @summary List promotion beneficiaries
|
|
5669
|
+
* @param {string} id Promotion ID
|
|
5670
|
+
* @param {number} [periodID] Period ID
|
|
5671
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
5672
|
+
* @param {*} [options] Override http request option.
|
|
5673
|
+
* @throws {RequiredError}
|
|
5674
|
+
*/
|
|
5675
|
+
listPromotionBeneficiaries(id: string, periodID?: number, hasProgress?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PromotionBeneficiariesResponse>>;
|
|
5609
5676
|
/**
|
|
5610
5677
|
* List all promotions
|
|
5611
5678
|
* @summary List promotions
|
|
@@ -5733,6 +5800,16 @@ export declare const PromotionApiFactory: (configuration?: Configuration, basePa
|
|
|
5733
5800
|
* @throws {RequiredError}
|
|
5734
5801
|
*/
|
|
5735
5802
|
getUserPromotion(id: string, options?: any): AxiosPromise<UserPromotion>;
|
|
5803
|
+
/**
|
|
5804
|
+
* List promotion beneficiaries
|
|
5805
|
+
* @summary List promotion beneficiaries
|
|
5806
|
+
* @param {string} id Promotion ID
|
|
5807
|
+
* @param {number} [periodID] Period ID
|
|
5808
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
5809
|
+
* @param {*} [options] Override http request option.
|
|
5810
|
+
* @throws {RequiredError}
|
|
5811
|
+
*/
|
|
5812
|
+
listPromotionBeneficiaries(id: string, periodID?: number, hasProgress?: boolean, options?: any): AxiosPromise<PromotionBeneficiariesResponse>;
|
|
5736
5813
|
/**
|
|
5737
5814
|
* List all promotions
|
|
5738
5815
|
* @summary List promotions
|
|
@@ -5871,6 +5948,17 @@ export declare class PromotionApi extends BaseAPI {
|
|
|
5871
5948
|
* @memberof PromotionApi
|
|
5872
5949
|
*/
|
|
5873
5950
|
getUserPromotion(id: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UserPromotion, any>>;
|
|
5951
|
+
/**
|
|
5952
|
+
* List promotion beneficiaries
|
|
5953
|
+
* @summary List promotion beneficiaries
|
|
5954
|
+
* @param {string} id Promotion ID
|
|
5955
|
+
* @param {number} [periodID] Period ID
|
|
5956
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
5957
|
+
* @param {*} [options] Override http request option.
|
|
5958
|
+
* @throws {RequiredError}
|
|
5959
|
+
* @memberof PromotionApi
|
|
5960
|
+
*/
|
|
5961
|
+
listPromotionBeneficiaries(id: string, periodID?: number, hasProgress?: boolean, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PromotionBeneficiariesResponse, any>>;
|
|
5874
5962
|
/**
|
|
5875
5963
|
* List all promotions
|
|
5876
5964
|
* @summary List promotions
|
package/dist/esm/api.js
CHANGED
|
@@ -4459,6 +4459,46 @@ export const PromotionApiAxiosParamCreator = function (configuration) {
|
|
|
4459
4459
|
options: localVarRequestOptions,
|
|
4460
4460
|
};
|
|
4461
4461
|
}),
|
|
4462
|
+
/**
|
|
4463
|
+
* List promotion beneficiaries
|
|
4464
|
+
* @summary List promotion beneficiaries
|
|
4465
|
+
* @param {string} id Promotion ID
|
|
4466
|
+
* @param {number} [periodID] Period ID
|
|
4467
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
4468
|
+
* @param {*} [options] Override http request option.
|
|
4469
|
+
* @throws {RequiredError}
|
|
4470
|
+
*/
|
|
4471
|
+
listPromotionBeneficiaries: (id, periodID, hasProgress, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4472
|
+
// verify required parameter 'id' is not null or undefined
|
|
4473
|
+
assertParamExists('listPromotionBeneficiaries', 'id', id);
|
|
4474
|
+
const localVarPath = `/admins/promotions/{id}/beneficiaries`
|
|
4475
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
4476
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4477
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4478
|
+
let baseOptions;
|
|
4479
|
+
if (configuration) {
|
|
4480
|
+
baseOptions = configuration.baseOptions;
|
|
4481
|
+
}
|
|
4482
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
4483
|
+
const localVarHeaderParameter = {};
|
|
4484
|
+
const localVarQueryParameter = {};
|
|
4485
|
+
// authentication systemJWT required
|
|
4486
|
+
// http bearer authentication required
|
|
4487
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4488
|
+
if (periodID !== undefined) {
|
|
4489
|
+
localVarQueryParameter['periodID'] = periodID;
|
|
4490
|
+
}
|
|
4491
|
+
if (hasProgress !== undefined) {
|
|
4492
|
+
localVarQueryParameter['hasProgress'] = hasProgress;
|
|
4493
|
+
}
|
|
4494
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4495
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4496
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4497
|
+
return {
|
|
4498
|
+
url: toPathString(localVarUrlObj),
|
|
4499
|
+
options: localVarRequestOptions,
|
|
4500
|
+
};
|
|
4501
|
+
}),
|
|
4462
4502
|
/**
|
|
4463
4503
|
* List all promotions
|
|
4464
4504
|
* @summary List promotions
|
|
@@ -4792,6 +4832,21 @@ export const PromotionApiFp = function (configuration) {
|
|
|
4792
4832
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
4793
4833
|
});
|
|
4794
4834
|
},
|
|
4835
|
+
/**
|
|
4836
|
+
* List promotion beneficiaries
|
|
4837
|
+
* @summary List promotion beneficiaries
|
|
4838
|
+
* @param {string} id Promotion ID
|
|
4839
|
+
* @param {number} [periodID] Period ID
|
|
4840
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
4841
|
+
* @param {*} [options] Override http request option.
|
|
4842
|
+
* @throws {RequiredError}
|
|
4843
|
+
*/
|
|
4844
|
+
listPromotionBeneficiaries(id, periodID, hasProgress, options) {
|
|
4845
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4846
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listPromotionBeneficiaries(id, periodID, hasProgress, options);
|
|
4847
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
4848
|
+
});
|
|
4849
|
+
},
|
|
4795
4850
|
/**
|
|
4796
4851
|
* List all promotions
|
|
4797
4852
|
* @summary List promotions
|
|
@@ -4955,6 +5010,18 @@ export const PromotionApiFactory = function (configuration, basePath, axios) {
|
|
|
4955
5010
|
getUserPromotion(id, options) {
|
|
4956
5011
|
return localVarFp.getUserPromotion(id, options).then((request) => request(axios, basePath));
|
|
4957
5012
|
},
|
|
5013
|
+
/**
|
|
5014
|
+
* List promotion beneficiaries
|
|
5015
|
+
* @summary List promotion beneficiaries
|
|
5016
|
+
* @param {string} id Promotion ID
|
|
5017
|
+
* @param {number} [periodID] Period ID
|
|
5018
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
5019
|
+
* @param {*} [options] Override http request option.
|
|
5020
|
+
* @throws {RequiredError}
|
|
5021
|
+
*/
|
|
5022
|
+
listPromotionBeneficiaries(id, periodID, hasProgress, options) {
|
|
5023
|
+
return localVarFp.listPromotionBeneficiaries(id, periodID, hasProgress, options).then((request) => request(axios, basePath));
|
|
5024
|
+
},
|
|
4958
5025
|
/**
|
|
4959
5026
|
* List all promotions
|
|
4960
5027
|
* @summary List promotions
|
|
@@ -5118,6 +5185,19 @@ export class PromotionApi extends BaseAPI {
|
|
|
5118
5185
|
getUserPromotion(id, options) {
|
|
5119
5186
|
return PromotionApiFp(this.configuration).getUserPromotion(id, options).then((request) => request(this.axios, this.basePath));
|
|
5120
5187
|
}
|
|
5188
|
+
/**
|
|
5189
|
+
* List promotion beneficiaries
|
|
5190
|
+
* @summary List promotion beneficiaries
|
|
5191
|
+
* @param {string} id Promotion ID
|
|
5192
|
+
* @param {number} [periodID] Period ID
|
|
5193
|
+
* @param {boolean} [hasProgress] Beneficiary has progress
|
|
5194
|
+
* @param {*} [options] Override http request option.
|
|
5195
|
+
* @throws {RequiredError}
|
|
5196
|
+
* @memberof PromotionApi
|
|
5197
|
+
*/
|
|
5198
|
+
listPromotionBeneficiaries(id, periodID, hasProgress, options) {
|
|
5199
|
+
return PromotionApiFp(this.configuration).listPromotionBeneficiaries(id, periodID, hasProgress, options).then((request) => request(this.axios, this.basePath));
|
|
5200
|
+
}
|
|
5121
5201
|
/**
|
|
5122
5202
|
* List all promotions
|
|
5123
5203
|
* @summary List promotions
|