flexinet-api 0.0.319-prerelease0 → 0.0.320-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.319-prerelease0
1
+ ## flexinet-api@0.0.320-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.319-prerelease0 --save
39
+ npm install flexinet-api@0.0.320-prerelease0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
package/api.ts CHANGED
@@ -267,6 +267,58 @@ export interface BulkNotificationsReadRequest {
267
267
  */
268
268
  'notificationIds': Array<string>;
269
269
  }
270
+ /**
271
+ *
272
+ * @export
273
+ * @interface CallbackBeneficiaryDetails
274
+ */
275
+ export interface CallbackBeneficiaryDetails {
276
+ /**
277
+ *
278
+ * @type {string}
279
+ * @memberof CallbackBeneficiaryDetails
280
+ */
281
+ 'value': string;
282
+ /**
283
+ *
284
+ * @type {BeneficiaryKind}
285
+ * @memberof CallbackBeneficiaryDetails
286
+ */
287
+ 'kind': BeneficiaryKind;
288
+ /**
289
+ *
290
+ * @type {string}
291
+ * @memberof CallbackBeneficiaryDetails
292
+ */
293
+ 'reference'?: string;
294
+ }
295
+
296
+
297
+ /**
298
+ * @type CallbackEvent
299
+ * @export
300
+ */
301
+ export type CallbackEvent = { kind: 'order' } & CallbackOrder;
302
+
303
+ /**
304
+ *
305
+ * @export
306
+ * @interface CallbackItemDetails
307
+ */
308
+ export interface CallbackItemDetails {
309
+ /**
310
+ *
311
+ * @type {number}
312
+ * @memberof CallbackItemDetails
313
+ */
314
+ 'qty': number;
315
+ /**
316
+ *
317
+ * @type {CallbackProductDetails}
318
+ * @memberof CallbackItemDetails
319
+ */
320
+ 'product': CallbackProductDetails;
321
+ }
270
322
  /**
271
323
  *
272
324
  * @export
@@ -275,22 +327,80 @@ export interface BulkNotificationsReadRequest {
275
327
  export interface CallbackOrder {
276
328
  /**
277
329
  *
278
- * @type {Order}
330
+ * @type {CallbackOrderDetails}
279
331
  * @memberof CallbackOrder
280
332
  */
281
- 'order'?: Order;
333
+ 'order': CallbackOrderDetails;
282
334
  /**
283
335
  *
284
336
  * @type {string}
285
337
  * @memberof CallbackOrder
286
338
  */
287
- 'id'?: string;
339
+ 'id': string;
288
340
  /**
289
341
  *
290
342
  * @type {string}
291
343
  * @memberof CallbackOrder
292
344
  */
293
- 'status'?: string;
345
+ 'status': string;
346
+ /**
347
+ *
348
+ * @type {WebhookKind}
349
+ * @memberof CallbackOrder
350
+ */
351
+ 'kind': WebhookKind;
352
+ }
353
+
354
+
355
+ /**
356
+ *
357
+ * @export
358
+ * @interface CallbackOrderDetails
359
+ */
360
+ export interface CallbackOrderDetails {
361
+ /**
362
+ *
363
+ * @type {CallbackBeneficiaryDetails}
364
+ * @memberof CallbackOrderDetails
365
+ */
366
+ 'beneficiary': CallbackBeneficiaryDetails;
367
+ /**
368
+ *
369
+ * @type {Array<CallbackItemDetails>}
370
+ * @memberof CallbackOrderDetails
371
+ */
372
+ 'items': Array<CallbackItemDetails>;
373
+ /**
374
+ *
375
+ * @type {string}
376
+ * @memberof CallbackOrderDetails
377
+ */
378
+ 'id': string;
379
+ /**
380
+ *
381
+ * @type {string}
382
+ * @memberof CallbackOrderDetails
383
+ */
384
+ 'createdAt'?: string;
385
+ }
386
+ /**
387
+ *
388
+ * @export
389
+ * @interface CallbackProductDetails
390
+ */
391
+ export interface CallbackProductDetails {
392
+ /**
393
+ *
394
+ * @type {string}
395
+ * @memberof CallbackProductDetails
396
+ */
397
+ 'id': string;
398
+ /**
399
+ *
400
+ * @type {string}
401
+ * @memberof CallbackProductDetails
402
+ */
403
+ 'productCode': string;
294
404
  }
295
405
  /**
296
406
  *
@@ -2918,7 +3028,8 @@ export interface Webhook {
2918
3028
  */
2919
3029
 
2920
3030
  export const WebhookKind = {
2921
- Order: 'order'
3031
+ Order: 'order',
3032
+ Prod: 'prod'
2922
3033
  } as const;
2923
3034
 
2924
3035
  export type WebhookKind = typeof WebhookKind[keyof typeof WebhookKind];
@@ -4208,13 +4319,16 @@ export class CustomDealsApi extends BaseAPI {
4208
4319
  export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
4209
4320
  return {
4210
4321
  /**
4211
- * Generate a new API key, if one already exists it will be rotated, but the old one will still be valid for a short period of time. Important that API key is only returned once, so make sure to store it securely.
4212
- * @summary Generate API key for the current tenant
4322
+ * Import events to the system to be processed
4323
+ * @summary Add event
4324
+ * @param {Array<EventCreationRequest>} eventCreationRequest Entities
4213
4325
  * @param {*} [options] Override http request option.
4214
4326
  * @throws {RequiredError}
4215
4327
  */
4216
- generateApiKey: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
4217
- const localVarPath = `/admins/integrations/apikey`;
4328
+ importEvent: async (eventCreationRequest: Array<EventCreationRequest>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
4329
+ // verify required parameter 'eventCreationRequest' is not null or undefined
4330
+ assertParamExists('importEvent', 'eventCreationRequest', eventCreationRequest)
4331
+ const localVarPath = `/admins/events`;
4218
4332
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4219
4333
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4220
4334
  let baseOptions;
@@ -4232,15 +4346,28 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
4232
4346
 
4233
4347
 
4234
4348
 
4349
+ localVarHeaderParameter['Content-Type'] = 'application/json';
4350
+
4235
4351
  setSearchParams(localVarUrlObj, localVarQueryParameter);
4236
4352
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4237
4353
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
4354
+ localVarRequestOptions.data = serializeDataIfNeeded(eventCreationRequest, localVarRequestOptions, configuration)
4238
4355
 
4239
4356
  return {
4240
4357
  url: toPathString(localVarUrlObj),
4241
4358
  options: localVarRequestOptions,
4242
4359
  };
4243
4360
  },
4361
+ }
4362
+ };
4363
+
4364
+ /**
4365
+ * DefaultApi - functional programming interface
4366
+ * @export
4367
+ */
4368
+ export const DefaultApiFp = function(configuration?: Configuration) {
4369
+ const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
4370
+ return {
4244
4371
  /**
4245
4372
  * Import events to the system to be processed
4246
4373
  * @summary Add event
@@ -4248,10 +4375,69 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
4248
4375
  * @param {*} [options] Override http request option.
4249
4376
  * @throws {RequiredError}
4250
4377
  */
4251
- importEvent: async (eventCreationRequest: Array<EventCreationRequest>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
4252
- // verify required parameter 'eventCreationRequest' is not null or undefined
4253
- assertParamExists('importEvent', 'eventCreationRequest', eventCreationRequest)
4254
- const localVarPath = `/admins/events`;
4378
+ async importEvent(eventCreationRequest: Array<EventCreationRequest>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
4379
+ const localVarAxiosArgs = await localVarAxiosParamCreator.importEvent(eventCreationRequest, options);
4380
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4381
+ },
4382
+ }
4383
+ };
4384
+
4385
+ /**
4386
+ * DefaultApi - factory interface
4387
+ * @export
4388
+ */
4389
+ export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
4390
+ const localVarFp = DefaultApiFp(configuration)
4391
+ return {
4392
+ /**
4393
+ * Import events to the system to be processed
4394
+ * @summary Add event
4395
+ * @param {Array<EventCreationRequest>} eventCreationRequest Entities
4396
+ * @param {*} [options] Override http request option.
4397
+ * @throws {RequiredError}
4398
+ */
4399
+ importEvent(eventCreationRequest: Array<EventCreationRequest>, options?: any): AxiosPromise<void> {
4400
+ return localVarFp.importEvent(eventCreationRequest, options).then((request) => request(axios, basePath));
4401
+ },
4402
+ };
4403
+ };
4404
+
4405
+ /**
4406
+ * DefaultApi - object-oriented interface
4407
+ * @export
4408
+ * @class DefaultApi
4409
+ * @extends {BaseAPI}
4410
+ */
4411
+ export class DefaultApi extends BaseAPI {
4412
+ /**
4413
+ * Import events to the system to be processed
4414
+ * @summary Add event
4415
+ * @param {Array<EventCreationRequest>} eventCreationRequest Entities
4416
+ * @param {*} [options] Override http request option.
4417
+ * @throws {RequiredError}
4418
+ * @memberof DefaultApi
4419
+ */
4420
+ public importEvent(eventCreationRequest: Array<EventCreationRequest>, options?: AxiosRequestConfig) {
4421
+ return DefaultApiFp(this.configuration).importEvent(eventCreationRequest, options).then((request) => request(this.axios, this.basePath));
4422
+ }
4423
+ }
4424
+
4425
+
4426
+
4427
+ /**
4428
+ * IntegrationApi - axios parameter creator
4429
+ * @export
4430
+ */
4431
+ export const IntegrationApiAxiosParamCreator = function (configuration?: Configuration) {
4432
+ return {
4433
+ /**
4434
+ * Generate a new API key, if one already exists it will be rotated, but the old one will still be valid for a short period of time. Important that API key is only returned once, so make sure to store it securely.
4435
+ * @summary Generate API key for the current tenant
4436
+ * @param {*} [options] Override http request option.
4437
+ * @throws {RequiredError}
4438
+ */
4439
+ generateApiKey: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
4440
+ const localVarPath = `/admins/integrations/apikey`;
4255
4441
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4256
4442
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4257
4443
  let baseOptions;
@@ -4269,12 +4455,9 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
4269
4455
 
4270
4456
 
4271
4457
 
4272
- localVarHeaderParameter['Content-Type'] = 'application/json';
4273
-
4274
4458
  setSearchParams(localVarUrlObj, localVarQueryParameter);
4275
4459
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4276
4460
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
4277
- localVarRequestOptions.data = serializeDataIfNeeded(eventCreationRequest, localVarRequestOptions, configuration)
4278
4461
 
4279
4462
  return {
4280
4463
  url: toPathString(localVarUrlObj),
@@ -4392,11 +4575,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
4392
4575
  };
4393
4576
 
4394
4577
  /**
4395
- * DefaultApi - functional programming interface
4578
+ * IntegrationApi - functional programming interface
4396
4579
  * @export
4397
4580
  */
4398
- export const DefaultApiFp = function(configuration?: Configuration) {
4399
- const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
4581
+ export const IntegrationApiFp = function(configuration?: Configuration) {
4582
+ const localVarAxiosParamCreator = IntegrationApiAxiosParamCreator(configuration)
4400
4583
  return {
4401
4584
  /**
4402
4585
  * Generate a new API key, if one already exists it will be rotated, but the old one will still be valid for a short period of time. Important that API key is only returned once, so make sure to store it securely.
@@ -4408,17 +4591,6 @@ export const DefaultApiFp = function(configuration?: Configuration) {
4408
4591
  const localVarAxiosArgs = await localVarAxiosParamCreator.generateApiKey(options);
4409
4592
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4410
4593
  },
4411
- /**
4412
- * Import events to the system to be processed
4413
- * @summary Add event
4414
- * @param {Array<EventCreationRequest>} eventCreationRequest Entities
4415
- * @param {*} [options] Override http request option.
4416
- * @throws {RequiredError}
4417
- */
4418
- async importEvent(eventCreationRequest: Array<EventCreationRequest>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
4419
- const localVarAxiosArgs = await localVarAxiosParamCreator.importEvent(eventCreationRequest, options);
4420
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4421
- },
4422
4594
  /**
4423
4595
  * List all webhooks for current tenant
4424
4596
  * @summary List webhooks
@@ -4454,11 +4626,11 @@ export const DefaultApiFp = function(configuration?: Configuration) {
4454
4626
  };
4455
4627
 
4456
4628
  /**
4457
- * DefaultApi - factory interface
4629
+ * IntegrationApi - factory interface
4458
4630
  * @export
4459
4631
  */
4460
- export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
4461
- const localVarFp = DefaultApiFp(configuration)
4632
+ export const IntegrationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
4633
+ const localVarFp = IntegrationApiFp(configuration)
4462
4634
  return {
4463
4635
  /**
4464
4636
  * Generate a new API key, if one already exists it will be rotated, but the old one will still be valid for a short period of time. Important that API key is only returned once, so make sure to store it securely.
@@ -4469,16 +4641,6 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
4469
4641
  generateApiKey(options?: any): AxiosPromise<ApiKey> {
4470
4642
  return localVarFp.generateApiKey(options).then((request) => request(axios, basePath));
4471
4643
  },
4472
- /**
4473
- * Import events to the system to be processed
4474
- * @summary Add event
4475
- * @param {Array<EventCreationRequest>} eventCreationRequest Entities
4476
- * @param {*} [options] Override http request option.
4477
- * @throws {RequiredError}
4478
- */
4479
- importEvent(eventCreationRequest: Array<EventCreationRequest>, options?: any): AxiosPromise<void> {
4480
- return localVarFp.importEvent(eventCreationRequest, options).then((request) => request(axios, basePath));
4481
- },
4482
4644
  /**
4483
4645
  * List all webhooks for current tenant
4484
4646
  * @summary List webhooks
@@ -4511,33 +4673,21 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
4511
4673
  };
4512
4674
 
4513
4675
  /**
4514
- * DefaultApi - object-oriented interface
4676
+ * IntegrationApi - object-oriented interface
4515
4677
  * @export
4516
- * @class DefaultApi
4678
+ * @class IntegrationApi
4517
4679
  * @extends {BaseAPI}
4518
4680
  */
4519
- export class DefaultApi extends BaseAPI {
4681
+ export class IntegrationApi extends BaseAPI {
4520
4682
  /**
4521
4683
  * Generate a new API key, if one already exists it will be rotated, but the old one will still be valid for a short period of time. Important that API key is only returned once, so make sure to store it securely.
4522
4684
  * @summary Generate API key for the current tenant
4523
4685
  * @param {*} [options] Override http request option.
4524
4686
  * @throws {RequiredError}
4525
- * @memberof DefaultApi
4687
+ * @memberof IntegrationApi
4526
4688
  */
4527
4689
  public generateApiKey(options?: AxiosRequestConfig) {
4528
- return DefaultApiFp(this.configuration).generateApiKey(options).then((request) => request(this.axios, this.basePath));
4529
- }
4530
-
4531
- /**
4532
- * Import events to the system to be processed
4533
- * @summary Add event
4534
- * @param {Array<EventCreationRequest>} eventCreationRequest Entities
4535
- * @param {*} [options] Override http request option.
4536
- * @throws {RequiredError}
4537
- * @memberof DefaultApi
4538
- */
4539
- public importEvent(eventCreationRequest: Array<EventCreationRequest>, options?: AxiosRequestConfig) {
4540
- return DefaultApiFp(this.configuration).importEvent(eventCreationRequest, options).then((request) => request(this.axios, this.basePath));
4690
+ return IntegrationApiFp(this.configuration).generateApiKey(options).then((request) => request(this.axios, this.basePath));
4541
4691
  }
4542
4692
 
4543
4693
  /**
@@ -4545,10 +4695,10 @@ export class DefaultApi extends BaseAPI {
4545
4695
  * @summary List webhooks
4546
4696
  * @param {*} [options] Override http request option.
4547
4697
  * @throws {RequiredError}
4548
- * @memberof DefaultApi
4698
+ * @memberof IntegrationApi
4549
4699
  */
4550
4700
  public listWebhooks(options?: AxiosRequestConfig) {
4551
- return DefaultApiFp(this.configuration).listWebhooks(options).then((request) => request(this.axios, this.basePath));
4701
+ return IntegrationApiFp(this.configuration).listWebhooks(options).then((request) => request(this.axios, this.basePath));
4552
4702
  }
4553
4703
 
4554
4704
  /**
@@ -4557,10 +4707,10 @@ export class DefaultApi extends BaseAPI {
4557
4707
  * @param {Webhook} webhook webhook data
4558
4708
  * @param {*} [options] Override http request option.
4559
4709
  * @throws {RequiredError}
4560
- * @memberof DefaultApi
4710
+ * @memberof IntegrationApi
4561
4711
  */
4562
4712
  public setWebhook(webhook: Webhook, options?: AxiosRequestConfig) {
4563
- return DefaultApiFp(this.configuration).setWebhook(webhook, options).then((request) => request(this.axios, this.basePath));
4713
+ return IntegrationApiFp(this.configuration).setWebhook(webhook, options).then((request) => request(this.axios, this.basePath));
4564
4714
  }
4565
4715
 
4566
4716
  /**
@@ -4568,10 +4718,10 @@ export class DefaultApi extends BaseAPI {
4568
4718
  * @summary Test API key security scheme
4569
4719
  * @param {*} [options] Override http request option.
4570
4720
  * @throws {RequiredError}
4571
- * @memberof DefaultApi
4721
+ * @memberof IntegrationApi
4572
4722
  */
4573
4723
  public testApiKey(options?: AxiosRequestConfig) {
4574
- return DefaultApiFp(this.configuration).testApiKey(options).then((request) => request(this.axios, this.basePath));
4724
+ return IntegrationApiFp(this.configuration).testApiKey(options).then((request) => request(this.axios, this.basePath));
4575
4725
  }
4576
4726
  }
4577
4727