flexinet-api 0.0.319-prerelease0 → 0.0.321-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.321-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.321-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
  *
@@ -620,18 +730,6 @@ export interface EventCreationRequest {
620
730
  * @memberof EventCreationRequest
621
731
  */
622
732
  'kind': EventCreationRequestKindEnum;
623
- /**
624
- *
625
- * @type {string}
626
- * @memberof EventCreationRequest
627
- */
628
- 'timestamp': string;
629
- /**
630
- *
631
- * @type {string}
632
- * @memberof EventCreationRequest
633
- */
634
- 'id': string;
635
733
  }
636
734
 
637
735
  export const EventCreationRequestKindEnum = {
@@ -644,7 +742,7 @@ export type EventCreationRequestKindEnum = typeof EventCreationRequestKindEnum[k
644
742
  * @type EventCreationRequestDetails
645
743
  * @export
646
744
  */
647
- export type EventCreationRequestDetails = object;
745
+ export type EventCreationRequestDetails = TransactionEventDetails;
648
746
 
649
747
  /**
650
748
  *
@@ -1600,7 +1698,7 @@ export interface Promotion {
1600
1698
  * @type {BeneficiaryKind}
1601
1699
  * @memberof Promotion
1602
1700
  */
1603
- 'beneficiaryKind'?: BeneficiaryKind;
1701
+ 'beneficiaryKind': BeneficiaryKind;
1604
1702
  /**
1605
1703
  *
1606
1704
  * @type {Array<string>}
@@ -2512,6 +2610,89 @@ export interface Transaction {
2512
2610
  }
2513
2611
 
2514
2612
 
2613
+ /**
2614
+ *
2615
+ * @export
2616
+ * @interface TransactionEventDetails
2617
+ */
2618
+ export interface TransactionEventDetails {
2619
+ /**
2620
+ *
2621
+ * @type {string}
2622
+ * @memberof TransactionEventDetails
2623
+ */
2624
+ 'clientRef': string;
2625
+ /**
2626
+ *
2627
+ * @type {string}
2628
+ * @memberof TransactionEventDetails
2629
+ */
2630
+ 'userRef'?: string;
2631
+ /**
2632
+ *
2633
+ * @type {string}
2634
+ * @memberof TransactionEventDetails
2635
+ */
2636
+ 'reference': string;
2637
+ /**
2638
+ *
2639
+ * @type {TransactionEventKind}
2640
+ * @memberof TransactionEventDetails
2641
+ */
2642
+ 'kind': TransactionEventKind;
2643
+ /**
2644
+ *
2645
+ * @type {{ [key: string]: string; }}
2646
+ * @memberof TransactionEventDetails
2647
+ */
2648
+ 'tags': { [key: string]: string; };
2649
+ /**
2650
+ *
2651
+ * @type {number}
2652
+ * @memberof TransactionEventDetails
2653
+ */
2654
+ 'value': number;
2655
+ /**
2656
+ *
2657
+ * @type {number}
2658
+ * @memberof TransactionEventDetails
2659
+ */
2660
+ 'quantity': number;
2661
+ /**
2662
+ *
2663
+ * @type {number}
2664
+ * @memberof TransactionEventDetails
2665
+ */
2666
+ 'liter': number;
2667
+ /**
2668
+ *
2669
+ * @type {string}
2670
+ * @memberof TransactionEventDetails
2671
+ */
2672
+ 'timestamp': string;
2673
+ /**
2674
+ *
2675
+ * @type {string}
2676
+ * @memberof TransactionEventDetails
2677
+ */
2678
+ 'originalTimestamp'?: string;
2679
+ }
2680
+
2681
+
2682
+ /**
2683
+ *
2684
+ * @export
2685
+ * @enum {string}
2686
+ */
2687
+
2688
+ export const TransactionEventKind = {
2689
+ Pending: 'pending',
2690
+ Completed: 'completed'
2691
+ } as const;
2692
+
2693
+ export type TransactionEventKind = typeof TransactionEventKind[keyof typeof TransactionEventKind];
2694
+
2695
+
2515
2696
  /**
2516
2697
  *
2517
2698
  * @export
@@ -2918,7 +3099,8 @@ export interface Webhook {
2918
3099
  */
2919
3100
 
2920
3101
  export const WebhookKind = {
2921
- Order: 'order'
3102
+ Order: 'order',
3103
+ Prod: 'prod'
2922
3104
  } as const;
2923
3105
 
2924
3106
  export type WebhookKind = typeof WebhookKind[keyof typeof WebhookKind];
@@ -4208,13 +4390,16 @@ export class CustomDealsApi extends BaseAPI {
4208
4390
  export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
4209
4391
  return {
4210
4392
  /**
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
4393
+ * Import events to the system to be processed
4394
+ * @summary Add event
4395
+ * @param {Array<EventCreationRequest>} eventCreationRequest Entities
4213
4396
  * @param {*} [options] Override http request option.
4214
4397
  * @throws {RequiredError}
4215
4398
  */
4216
- generateApiKey: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
4217
- const localVarPath = `/admins/integrations/apikey`;
4399
+ importEvents: async (eventCreationRequest: Array<EventCreationRequest>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
4400
+ // verify required parameter 'eventCreationRequest' is not null or undefined
4401
+ assertParamExists('importEvents', 'eventCreationRequest', eventCreationRequest)
4402
+ const localVarPath = `/admins/events`;
4218
4403
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4219
4404
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4220
4405
  let baseOptions;
@@ -4232,15 +4417,49 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
4232
4417
 
4233
4418
 
4234
4419
 
4420
+ localVarHeaderParameter['Content-Type'] = 'application/json';
4421
+
4235
4422
  setSearchParams(localVarUrlObj, localVarQueryParameter);
4236
4423
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4237
4424
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
4425
+ localVarRequestOptions.data = serializeDataIfNeeded(eventCreationRequest, localVarRequestOptions, configuration)
4238
4426
 
4239
4427
  return {
4240
4428
  url: toPathString(localVarUrlObj),
4241
4429
  options: localVarRequestOptions,
4242
4430
  };
4243
4431
  },
4432
+ }
4433
+ };
4434
+
4435
+ /**
4436
+ * DefaultApi - functional programming interface
4437
+ * @export
4438
+ */
4439
+ export const DefaultApiFp = function(configuration?: Configuration) {
4440
+ const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
4441
+ return {
4442
+ /**
4443
+ * Import events to the system to be processed
4444
+ * @summary Add event
4445
+ * @param {Array<EventCreationRequest>} eventCreationRequest Entities
4446
+ * @param {*} [options] Override http request option.
4447
+ * @throws {RequiredError}
4448
+ */
4449
+ async importEvents(eventCreationRequest: Array<EventCreationRequest>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
4450
+ const localVarAxiosArgs = await localVarAxiosParamCreator.importEvents(eventCreationRequest, options);
4451
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4452
+ },
4453
+ }
4454
+ };
4455
+
4456
+ /**
4457
+ * DefaultApi - factory interface
4458
+ * @export
4459
+ */
4460
+ export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
4461
+ const localVarFp = DefaultApiFp(configuration)
4462
+ return {
4244
4463
  /**
4245
4464
  * Import events to the system to be processed
4246
4465
  * @summary Add event
@@ -4248,10 +4467,48 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
4248
4467
  * @param {*} [options] Override http request option.
4249
4468
  * @throws {RequiredError}
4250
4469
  */
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`;
4470
+ importEvents(eventCreationRequest: Array<EventCreationRequest>, options?: any): AxiosPromise<void> {
4471
+ return localVarFp.importEvents(eventCreationRequest, options).then((request) => request(axios, basePath));
4472
+ },
4473
+ };
4474
+ };
4475
+
4476
+ /**
4477
+ * DefaultApi - object-oriented interface
4478
+ * @export
4479
+ * @class DefaultApi
4480
+ * @extends {BaseAPI}
4481
+ */
4482
+ export class DefaultApi extends BaseAPI {
4483
+ /**
4484
+ * Import events to the system to be processed
4485
+ * @summary Add event
4486
+ * @param {Array<EventCreationRequest>} eventCreationRequest Entities
4487
+ * @param {*} [options] Override http request option.
4488
+ * @throws {RequiredError}
4489
+ * @memberof DefaultApi
4490
+ */
4491
+ public importEvents(eventCreationRequest: Array<EventCreationRequest>, options?: AxiosRequestConfig) {
4492
+ return DefaultApiFp(this.configuration).importEvents(eventCreationRequest, options).then((request) => request(this.axios, this.basePath));
4493
+ }
4494
+ }
4495
+
4496
+
4497
+
4498
+ /**
4499
+ * IntegrationApi - axios parameter creator
4500
+ * @export
4501
+ */
4502
+ export const IntegrationApiAxiosParamCreator = function (configuration?: Configuration) {
4503
+ return {
4504
+ /**
4505
+ * 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.
4506
+ * @summary Generate API key for the current tenant
4507
+ * @param {*} [options] Override http request option.
4508
+ * @throws {RequiredError}
4509
+ */
4510
+ generateApiKey: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
4511
+ const localVarPath = `/admins/integrations/apikey`;
4255
4512
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4256
4513
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4257
4514
  let baseOptions;
@@ -4269,12 +4526,9 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
4269
4526
 
4270
4527
 
4271
4528
 
4272
- localVarHeaderParameter['Content-Type'] = 'application/json';
4273
-
4274
4529
  setSearchParams(localVarUrlObj, localVarQueryParameter);
4275
4530
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4276
4531
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
4277
- localVarRequestOptions.data = serializeDataIfNeeded(eventCreationRequest, localVarRequestOptions, configuration)
4278
4532
 
4279
4533
  return {
4280
4534
  url: toPathString(localVarUrlObj),
@@ -4392,11 +4646,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
4392
4646
  };
4393
4647
 
4394
4648
  /**
4395
- * DefaultApi - functional programming interface
4649
+ * IntegrationApi - functional programming interface
4396
4650
  * @export
4397
4651
  */
4398
- export const DefaultApiFp = function(configuration?: Configuration) {
4399
- const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
4652
+ export const IntegrationApiFp = function(configuration?: Configuration) {
4653
+ const localVarAxiosParamCreator = IntegrationApiAxiosParamCreator(configuration)
4400
4654
  return {
4401
4655
  /**
4402
4656
  * 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 +4662,6 @@ export const DefaultApiFp = function(configuration?: Configuration) {
4408
4662
  const localVarAxiosArgs = await localVarAxiosParamCreator.generateApiKey(options);
4409
4663
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4410
4664
  },
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
4665
  /**
4423
4666
  * List all webhooks for current tenant
4424
4667
  * @summary List webhooks
@@ -4454,11 +4697,11 @@ export const DefaultApiFp = function(configuration?: Configuration) {
4454
4697
  };
4455
4698
 
4456
4699
  /**
4457
- * DefaultApi - factory interface
4700
+ * IntegrationApi - factory interface
4458
4701
  * @export
4459
4702
  */
4460
- export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
4461
- const localVarFp = DefaultApiFp(configuration)
4703
+ export const IntegrationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
4704
+ const localVarFp = IntegrationApiFp(configuration)
4462
4705
  return {
4463
4706
  /**
4464
4707
  * 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 +4712,6 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
4469
4712
  generateApiKey(options?: any): AxiosPromise<ApiKey> {
4470
4713
  return localVarFp.generateApiKey(options).then((request) => request(axios, basePath));
4471
4714
  },
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
4715
  /**
4483
4716
  * List all webhooks for current tenant
4484
4717
  * @summary List webhooks
@@ -4511,33 +4744,21 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
4511
4744
  };
4512
4745
 
4513
4746
  /**
4514
- * DefaultApi - object-oriented interface
4747
+ * IntegrationApi - object-oriented interface
4515
4748
  * @export
4516
- * @class DefaultApi
4749
+ * @class IntegrationApi
4517
4750
  * @extends {BaseAPI}
4518
4751
  */
4519
- export class DefaultApi extends BaseAPI {
4752
+ export class IntegrationApi extends BaseAPI {
4520
4753
  /**
4521
4754
  * 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
4755
  * @summary Generate API key for the current tenant
4523
4756
  * @param {*} [options] Override http request option.
4524
4757
  * @throws {RequiredError}
4525
- * @memberof DefaultApi
4758
+ * @memberof IntegrationApi
4526
4759
  */
4527
4760
  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));
4761
+ return IntegrationApiFp(this.configuration).generateApiKey(options).then((request) => request(this.axios, this.basePath));
4541
4762
  }
4542
4763
 
4543
4764
  /**
@@ -4545,10 +4766,10 @@ export class DefaultApi extends BaseAPI {
4545
4766
  * @summary List webhooks
4546
4767
  * @param {*} [options] Override http request option.
4547
4768
  * @throws {RequiredError}
4548
- * @memberof DefaultApi
4769
+ * @memberof IntegrationApi
4549
4770
  */
4550
4771
  public listWebhooks(options?: AxiosRequestConfig) {
4551
- return DefaultApiFp(this.configuration).listWebhooks(options).then((request) => request(this.axios, this.basePath));
4772
+ return IntegrationApiFp(this.configuration).listWebhooks(options).then((request) => request(this.axios, this.basePath));
4552
4773
  }
4553
4774
 
4554
4775
  /**
@@ -4557,10 +4778,10 @@ export class DefaultApi extends BaseAPI {
4557
4778
  * @param {Webhook} webhook webhook data
4558
4779
  * @param {*} [options] Override http request option.
4559
4780
  * @throws {RequiredError}
4560
- * @memberof DefaultApi
4781
+ * @memberof IntegrationApi
4561
4782
  */
4562
4783
  public setWebhook(webhook: Webhook, options?: AxiosRequestConfig) {
4563
- return DefaultApiFp(this.configuration).setWebhook(webhook, options).then((request) => request(this.axios, this.basePath));
4784
+ return IntegrationApiFp(this.configuration).setWebhook(webhook, options).then((request) => request(this.axios, this.basePath));
4564
4785
  }
4565
4786
 
4566
4787
  /**
@@ -4568,10 +4789,10 @@ export class DefaultApi extends BaseAPI {
4568
4789
  * @summary Test API key security scheme
4569
4790
  * @param {*} [options] Override http request option.
4570
4791
  * @throws {RequiredError}
4571
- * @memberof DefaultApi
4792
+ * @memberof IntegrationApi
4572
4793
  */
4573
4794
  public testApiKey(options?: AxiosRequestConfig) {
4574
- return DefaultApiFp(this.configuration).testApiKey(options).then((request) => request(this.axios, this.basePath));
4795
+ return IntegrationApiFp(this.configuration).testApiKey(options).then((request) => request(this.axios, this.basePath));
4575
4796
  }
4576
4797
  }
4577
4798