flexinet-api 0.0.675-prerelease0 → 0.0.688-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 CHANGED
@@ -1,4 +1,4 @@
1
- ## flexinet-api@0.0.675-prerelease0
1
+ ## flexinet-api@0.0.688-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.675-prerelease0 --save
39
+ npm install flexinet-api@0.0.688-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
@@ -4233,10 +4281,6 @@ export const ClientApiAxiosParamCreator = function (configuration?: Configuratio
4233
4281
  const localVarHeaderParameter = {} as any;
4234
4282
  const localVarQueryParameter = {} as any;
4235
4283
 
4236
- // authentication systemJWT required
4237
- // http bearer authentication required
4238
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
4239
-
4240
4284
  // authentication ApiKeyAuth required
4241
4285
  await setApiKeyToObject(localVarHeaderParameter, "X-API-Key", configuration)
4242
4286
 
@@ -6536,10 +6580,6 @@ export const ProductApiAxiosParamCreator = function (configuration?: Configurati
6536
6580
  const localVarHeaderParameter = {} as any;
6537
6581
  const localVarQueryParameter = {} as any;
6538
6582
 
6539
- // authentication systemJWT required
6540
- // http bearer authentication required
6541
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
6542
-
6543
6583
  // authentication ApiKeyAuth required
6544
6584
  await setApiKeyToObject(localVarHeaderParameter, "X-API-Key", configuration)
6545
6585
 
@@ -8086,6 +8126,54 @@ export const PromotionApiAxiosParamCreator = function (configuration?: Configura
8086
8126
 
8087
8127
 
8088
8128
 
8129
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
8130
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8131
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
8132
+
8133
+ return {
8134
+ url: toPathString(localVarUrlObj),
8135
+ options: localVarRequestOptions,
8136
+ };
8137
+ },
8138
+ /**
8139
+ * List promotion beneficiaries
8140
+ * @summary List promotion beneficiaries
8141
+ * @param {string} id Promotion ID
8142
+ * @param {number} [periodID] Period ID
8143
+ * @param {boolean} [hasProgress] Beneficiary has progress
8144
+ * @param {*} [options] Override http request option.
8145
+ * @throws {RequiredError}
8146
+ */
8147
+ listPromotionBeneficiaries: async (id: string, periodID?: number, hasProgress?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
8148
+ // verify required parameter 'id' is not null or undefined
8149
+ assertParamExists('listPromotionBeneficiaries', 'id', id)
8150
+ const localVarPath = `/admins/promotions/{id}/beneficiaries`
8151
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
8152
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
8153
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
8154
+ let baseOptions;
8155
+ if (configuration) {
8156
+ baseOptions = configuration.baseOptions;
8157
+ }
8158
+
8159
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
8160
+ const localVarHeaderParameter = {} as any;
8161
+ const localVarQueryParameter = {} as any;
8162
+
8163
+ // authentication systemJWT required
8164
+ // http bearer authentication required
8165
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
8166
+
8167
+ if (periodID !== undefined) {
8168
+ localVarQueryParameter['periodID'] = periodID;
8169
+ }
8170
+
8171
+ if (hasProgress !== undefined) {
8172
+ localVarQueryParameter['hasProgress'] = hasProgress;
8173
+ }
8174
+
8175
+
8176
+
8089
8177
  setSearchParams(localVarUrlObj, localVarQueryParameter);
8090
8178
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8091
8179
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -8454,6 +8542,19 @@ export const PromotionApiFp = function(configuration?: Configuration) {
8454
8542
  const localVarAxiosArgs = await localVarAxiosParamCreator.getUserPromotion(id, options);
8455
8543
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
8456
8544
  },
8545
+ /**
8546
+ * List promotion beneficiaries
8547
+ * @summary List promotion beneficiaries
8548
+ * @param {string} id Promotion ID
8549
+ * @param {number} [periodID] Period ID
8550
+ * @param {boolean} [hasProgress] Beneficiary has progress
8551
+ * @param {*} [options] Override http request option.
8552
+ * @throws {RequiredError}
8553
+ */
8554
+ async listPromotionBeneficiaries(id: string, periodID?: number, hasProgress?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PromotionBeneficiariesResponse>> {
8555
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPromotionBeneficiaries(id, periodID, hasProgress, options);
8556
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
8557
+ },
8457
8558
  /**
8458
8559
  * List all promotions
8459
8560
  * @summary List promotions
@@ -8612,6 +8713,18 @@ export const PromotionApiFactory = function (configuration?: Configuration, base
8612
8713
  getUserPromotion(id: string, options?: any): AxiosPromise<UserPromotion> {
8613
8714
  return localVarFp.getUserPromotion(id, options).then((request) => request(axios, basePath));
8614
8715
  },
8716
+ /**
8717
+ * List promotion beneficiaries
8718
+ * @summary List promotion beneficiaries
8719
+ * @param {string} id Promotion ID
8720
+ * @param {number} [periodID] Period ID
8721
+ * @param {boolean} [hasProgress] Beneficiary has progress
8722
+ * @param {*} [options] Override http request option.
8723
+ * @throws {RequiredError}
8724
+ */
8725
+ listPromotionBeneficiaries(id: string, periodID?: number, hasProgress?: boolean, options?: any): AxiosPromise<PromotionBeneficiariesResponse> {
8726
+ return localVarFp.listPromotionBeneficiaries(id, periodID, hasProgress, options).then((request) => request(axios, basePath));
8727
+ },
8615
8728
  /**
8616
8729
  * List all promotions
8617
8730
  * @summary List promotions
@@ -8785,6 +8898,20 @@ export class PromotionApi extends BaseAPI {
8785
8898
  return PromotionApiFp(this.configuration).getUserPromotion(id, options).then((request) => request(this.axios, this.basePath));
8786
8899
  }
8787
8900
 
8901
+ /**
8902
+ * List promotion beneficiaries
8903
+ * @summary List promotion beneficiaries
8904
+ * @param {string} id Promotion ID
8905
+ * @param {number} [periodID] Period ID
8906
+ * @param {boolean} [hasProgress] Beneficiary has progress
8907
+ * @param {*} [options] Override http request option.
8908
+ * @throws {RequiredError}
8909
+ * @memberof PromotionApi
8910
+ */
8911
+ public listPromotionBeneficiaries(id: string, periodID?: number, hasProgress?: boolean, options?: AxiosRequestConfig) {
8912
+ return PromotionApiFp(this.configuration).listPromotionBeneficiaries(id, periodID, hasProgress, options).then((request) => request(this.axios, this.basePath));
8913
+ }
8914
+
8788
8915
  /**
8789
8916
  * List all promotions
8790
8917
  * @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
@@ -981,9 +981,6 @@ const ClientApiAxiosParamCreator = function (configuration) {
981
981
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
982
982
  const localVarHeaderParameter = {};
983
983
  const localVarQueryParameter = {};
984
- // authentication systemJWT required
985
- // http bearer authentication required
986
- yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
987
984
  // authentication ApiKeyAuth required
988
985
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-API-Key", configuration);
989
986
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -3105,9 +3102,6 @@ const ProductApiAxiosParamCreator = function (configuration) {
3105
3102
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3106
3103
  const localVarHeaderParameter = {};
3107
3104
  const localVarQueryParameter = {};
3108
- // authentication systemJWT required
3109
- // http bearer authentication required
3110
- yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3111
3105
  // authentication ApiKeyAuth required
3112
3106
  yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-API-Key", configuration);
3113
3107
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -4512,6 +4506,46 @@ const PromotionApiAxiosParamCreator = function (configuration) {
4512
4506
  options: localVarRequestOptions,
4513
4507
  };
4514
4508
  }),
4509
+ /**
4510
+ * List promotion beneficiaries
4511
+ * @summary List promotion beneficiaries
4512
+ * @param {string} id Promotion ID
4513
+ * @param {number} [periodID] Period ID
4514
+ * @param {boolean} [hasProgress] Beneficiary has progress
4515
+ * @param {*} [options] Override http request option.
4516
+ * @throws {RequiredError}
4517
+ */
4518
+ listPromotionBeneficiaries: (id, periodID, hasProgress, options = {}) => __awaiter(this, void 0, void 0, function* () {
4519
+ // verify required parameter 'id' is not null or undefined
4520
+ (0, common_1.assertParamExists)('listPromotionBeneficiaries', 'id', id);
4521
+ const localVarPath = `/admins/promotions/{id}/beneficiaries`
4522
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
4523
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4524
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
4525
+ let baseOptions;
4526
+ if (configuration) {
4527
+ baseOptions = configuration.baseOptions;
4528
+ }
4529
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
4530
+ const localVarHeaderParameter = {};
4531
+ const localVarQueryParameter = {};
4532
+ // authentication systemJWT required
4533
+ // http bearer authentication required
4534
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
4535
+ if (periodID !== undefined) {
4536
+ localVarQueryParameter['periodID'] = periodID;
4537
+ }
4538
+ if (hasProgress !== undefined) {
4539
+ localVarQueryParameter['hasProgress'] = hasProgress;
4540
+ }
4541
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
4542
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4543
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4544
+ return {
4545
+ url: (0, common_1.toPathString)(localVarUrlObj),
4546
+ options: localVarRequestOptions,
4547
+ };
4548
+ }),
4515
4549
  /**
4516
4550
  * List all promotions
4517
4551
  * @summary List promotions
@@ -4846,6 +4880,21 @@ const PromotionApiFp = function (configuration) {
4846
4880
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
4847
4881
  });
4848
4882
  },
4883
+ /**
4884
+ * List promotion beneficiaries
4885
+ * @summary List promotion beneficiaries
4886
+ * @param {string} id Promotion ID
4887
+ * @param {number} [periodID] Period ID
4888
+ * @param {boolean} [hasProgress] Beneficiary has progress
4889
+ * @param {*} [options] Override http request option.
4890
+ * @throws {RequiredError}
4891
+ */
4892
+ listPromotionBeneficiaries(id, periodID, hasProgress, options) {
4893
+ return __awaiter(this, void 0, void 0, function* () {
4894
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listPromotionBeneficiaries(id, periodID, hasProgress, options);
4895
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
4896
+ });
4897
+ },
4849
4898
  /**
4850
4899
  * List all promotions
4851
4900
  * @summary List promotions
@@ -5010,6 +5059,18 @@ const PromotionApiFactory = function (configuration, basePath, axios) {
5010
5059
  getUserPromotion(id, options) {
5011
5060
  return localVarFp.getUserPromotion(id, options).then((request) => request(axios, basePath));
5012
5061
  },
5062
+ /**
5063
+ * List promotion beneficiaries
5064
+ * @summary List promotion beneficiaries
5065
+ * @param {string} id Promotion ID
5066
+ * @param {number} [periodID] Period ID
5067
+ * @param {boolean} [hasProgress] Beneficiary has progress
5068
+ * @param {*} [options] Override http request option.
5069
+ * @throws {RequiredError}
5070
+ */
5071
+ listPromotionBeneficiaries(id, periodID, hasProgress, options) {
5072
+ return localVarFp.listPromotionBeneficiaries(id, periodID, hasProgress, options).then((request) => request(axios, basePath));
5073
+ },
5013
5074
  /**
5014
5075
  * List all promotions
5015
5076
  * @summary List promotions
@@ -5174,6 +5235,19 @@ class PromotionApi extends base_1.BaseAPI {
5174
5235
  getUserPromotion(id, options) {
5175
5236
  return (0, exports.PromotionApiFp)(this.configuration).getUserPromotion(id, options).then((request) => request(this.axios, this.basePath));
5176
5237
  }
5238
+ /**
5239
+ * List promotion beneficiaries
5240
+ * @summary List promotion beneficiaries
5241
+ * @param {string} id Promotion ID
5242
+ * @param {number} [periodID] Period ID
5243
+ * @param {boolean} [hasProgress] Beneficiary has progress
5244
+ * @param {*} [options] Override http request option.
5245
+ * @throws {RequiredError}
5246
+ * @memberof PromotionApi
5247
+ */
5248
+ listPromotionBeneficiaries(id, periodID, hasProgress, options) {
5249
+ return (0, exports.PromotionApiFp)(this.configuration).listPromotionBeneficiaries(id, periodID, hasProgress, options).then((request) => request(this.axios, this.basePath));
5250
+ }
5177
5251
  /**
5178
5252
  * List all promotions
5179
5253
  * @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
@@ -964,9 +964,6 @@ export const ClientApiAxiosParamCreator = function (configuration) {
964
964
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
965
965
  const localVarHeaderParameter = {};
966
966
  const localVarQueryParameter = {};
967
- // authentication systemJWT required
968
- // http bearer authentication required
969
- yield setBearerAuthToObject(localVarHeaderParameter, configuration);
970
967
  // authentication ApiKeyAuth required
971
968
  yield setApiKeyToObject(localVarHeaderParameter, "X-API-Key", configuration);
972
969
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -3060,9 +3057,6 @@ export const ProductApiAxiosParamCreator = function (configuration) {
3060
3057
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3061
3058
  const localVarHeaderParameter = {};
3062
3059
  const localVarQueryParameter = {};
3063
- // authentication systemJWT required
3064
- // http bearer authentication required
3065
- yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3066
3060
  // authentication ApiKeyAuth required
3067
3061
  yield setApiKeyToObject(localVarHeaderParameter, "X-API-Key", configuration);
3068
3062
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -4459,6 +4453,46 @@ export const PromotionApiAxiosParamCreator = function (configuration) {
4459
4453
  options: localVarRequestOptions,
4460
4454
  };
4461
4455
  }),
4456
+ /**
4457
+ * List promotion beneficiaries
4458
+ * @summary List promotion beneficiaries
4459
+ * @param {string} id Promotion ID
4460
+ * @param {number} [periodID] Period ID
4461
+ * @param {boolean} [hasProgress] Beneficiary has progress
4462
+ * @param {*} [options] Override http request option.
4463
+ * @throws {RequiredError}
4464
+ */
4465
+ listPromotionBeneficiaries: (id, periodID, hasProgress, options = {}) => __awaiter(this, void 0, void 0, function* () {
4466
+ // verify required parameter 'id' is not null or undefined
4467
+ assertParamExists('listPromotionBeneficiaries', 'id', id);
4468
+ const localVarPath = `/admins/promotions/{id}/beneficiaries`
4469
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
4470
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4471
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4472
+ let baseOptions;
4473
+ if (configuration) {
4474
+ baseOptions = configuration.baseOptions;
4475
+ }
4476
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
4477
+ const localVarHeaderParameter = {};
4478
+ const localVarQueryParameter = {};
4479
+ // authentication systemJWT required
4480
+ // http bearer authentication required
4481
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
4482
+ if (periodID !== undefined) {
4483
+ localVarQueryParameter['periodID'] = periodID;
4484
+ }
4485
+ if (hasProgress !== undefined) {
4486
+ localVarQueryParameter['hasProgress'] = hasProgress;
4487
+ }
4488
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4489
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4490
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4491
+ return {
4492
+ url: toPathString(localVarUrlObj),
4493
+ options: localVarRequestOptions,
4494
+ };
4495
+ }),
4462
4496
  /**
4463
4497
  * List all promotions
4464
4498
  * @summary List promotions
@@ -4792,6 +4826,21 @@ export const PromotionApiFp = function (configuration) {
4792
4826
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4793
4827
  });
4794
4828
  },
4829
+ /**
4830
+ * List promotion beneficiaries
4831
+ * @summary List promotion beneficiaries
4832
+ * @param {string} id Promotion ID
4833
+ * @param {number} [periodID] Period ID
4834
+ * @param {boolean} [hasProgress] Beneficiary has progress
4835
+ * @param {*} [options] Override http request option.
4836
+ * @throws {RequiredError}
4837
+ */
4838
+ listPromotionBeneficiaries(id, periodID, hasProgress, options) {
4839
+ return __awaiter(this, void 0, void 0, function* () {
4840
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listPromotionBeneficiaries(id, periodID, hasProgress, options);
4841
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4842
+ });
4843
+ },
4795
4844
  /**
4796
4845
  * List all promotions
4797
4846
  * @summary List promotions
@@ -4955,6 +5004,18 @@ export const PromotionApiFactory = function (configuration, basePath, axios) {
4955
5004
  getUserPromotion(id, options) {
4956
5005
  return localVarFp.getUserPromotion(id, options).then((request) => request(axios, basePath));
4957
5006
  },
5007
+ /**
5008
+ * List promotion beneficiaries
5009
+ * @summary List promotion beneficiaries
5010
+ * @param {string} id Promotion ID
5011
+ * @param {number} [periodID] Period ID
5012
+ * @param {boolean} [hasProgress] Beneficiary has progress
5013
+ * @param {*} [options] Override http request option.
5014
+ * @throws {RequiredError}
5015
+ */
5016
+ listPromotionBeneficiaries(id, periodID, hasProgress, options) {
5017
+ return localVarFp.listPromotionBeneficiaries(id, periodID, hasProgress, options).then((request) => request(axios, basePath));
5018
+ },
4958
5019
  /**
4959
5020
  * List all promotions
4960
5021
  * @summary List promotions
@@ -5118,6 +5179,19 @@ export class PromotionApi extends BaseAPI {
5118
5179
  getUserPromotion(id, options) {
5119
5180
  return PromotionApiFp(this.configuration).getUserPromotion(id, options).then((request) => request(this.axios, this.basePath));
5120
5181
  }
5182
+ /**
5183
+ * List promotion beneficiaries
5184
+ * @summary List promotion beneficiaries
5185
+ * @param {string} id Promotion ID
5186
+ * @param {number} [periodID] Period ID
5187
+ * @param {boolean} [hasProgress] Beneficiary has progress
5188
+ * @param {*} [options] Override http request option.
5189
+ * @throws {RequiredError}
5190
+ * @memberof PromotionApi
5191
+ */
5192
+ listPromotionBeneficiaries(id, periodID, hasProgress, options) {
5193
+ return PromotionApiFp(this.configuration).listPromotionBeneficiaries(id, periodID, hasProgress, options).then((request) => request(this.axios, this.basePath));
5194
+ }
5121
5195
  /**
5122
5196
  * List all promotions
5123
5197
  * @summary List promotions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flexinet-api",
3
- "version": "0.0.675-prerelease0",
3
+ "version": "0.0.688-prerelease0",
4
4
  "description": "OpenAPI client for flexinet-api",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {