yellowgrid-api-ts 3.2.268 → 3.2.273
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/.openapi-generator/FILES +5 -0
- package/README.md +8 -0
- package/api.ts +474 -11
- package/dist/api.d.ts +303 -11
- package/dist/api.js +378 -2
- package/docs/PromoCodesEntity.md +9 -9
- package/docs/PromoItemModel.md +35 -0
- package/docs/PromoModel.md +45 -0
- package/docs/PromoSummariesModel.md +27 -0
- package/docs/PromoSummaryDTO.md +31 -0
- package/docs/PromotionsApi.md +241 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -211,7 +211,12 @@ docs/ProductSerialInfoModel.md
|
|
|
211
211
|
docs/ProductSummaryDTO.md
|
|
212
212
|
docs/ProductsApi.md
|
|
213
213
|
docs/PromoCodesEntity.md
|
|
214
|
+
docs/PromoItemModel.md
|
|
214
215
|
docs/PromoItemsEntity.md
|
|
216
|
+
docs/PromoModel.md
|
|
217
|
+
docs/PromoSummariesModel.md
|
|
218
|
+
docs/PromoSummaryDTO.md
|
|
219
|
+
docs/PromotionsApi.md
|
|
215
220
|
docs/ProspectDTO.md
|
|
216
221
|
docs/ProspectEntity.md
|
|
217
222
|
docs/ProspectsApi.md
|
package/README.md
CHANGED
|
@@ -307,6 +307,10 @@ Class | Method | HTTP request | Description
|
|
|
307
307
|
*ProductsApi* | [**patchAddQuantityToStock**](docs/ProductsApi.md#patchaddquantitytostock) | **PATCH** /products/{sku}/stock/add | Add Item Quantity To Stock
|
|
308
308
|
*ProductsApi* | [**postGetProduct**](docs/ProductsApi.md#postgetproduct) | **POST** /products/{sku} | Get Product
|
|
309
309
|
*ProductsApi* | [**postGetProductForCustomer**](docs/ProductsApi.md#postgetproductforcustomer) | **POST** /admin/products/{sku} | Get Product For Customer
|
|
310
|
+
*PromotionsApi* | [**getGetPromo**](docs/PromotionsApi.md#getgetpromo) | **GET** /marketing/promos/{id} |
|
|
311
|
+
*PromotionsApi* | [**getGetPromos**](docs/PromotionsApi.md#getgetpromos) | **GET** /marketing/promos |
|
|
312
|
+
*PromotionsApi* | [**postGetPromos**](docs/PromotionsApi.md#postgetpromos) | **POST** /marketing/promos |
|
|
313
|
+
*PromotionsApi* | [**putGetPromo**](docs/PromotionsApi.md#putgetpromo) | **PUT** /marketing/promos/{id} |
|
|
310
314
|
*ProspectsApi* | [**getGetProspect**](docs/ProspectsApi.md#getgetprospect) | **GET** /accounts/prospects/{xero_id} | Get Prospect
|
|
311
315
|
*ProspectsApi* | [**getGetProspects**](docs/ProspectsApi.md#getgetprospects) | **GET** /accounts/prospects | Get Prospects
|
|
312
316
|
*ProspectsApi* | [**getRemoveFromProspects**](docs/ProspectsApi.md#getremovefromprospects) | **GET** /accounts/prospects/{xero_id}/remove | Remove From Prospects
|
|
@@ -587,7 +591,11 @@ Class | Method | HTTP request | Description
|
|
|
587
591
|
- [ProductSerialInfoModel](docs/ProductSerialInfoModel.md)
|
|
588
592
|
- [ProductSummaryDTO](docs/ProductSummaryDTO.md)
|
|
589
593
|
- [PromoCodesEntity](docs/PromoCodesEntity.md)
|
|
594
|
+
- [PromoItemModel](docs/PromoItemModel.md)
|
|
590
595
|
- [PromoItemsEntity](docs/PromoItemsEntity.md)
|
|
596
|
+
- [PromoModel](docs/PromoModel.md)
|
|
597
|
+
- [PromoSummariesModel](docs/PromoSummariesModel.md)
|
|
598
|
+
- [PromoSummaryDTO](docs/PromoSummaryDTO.md)
|
|
591
599
|
- [ProspectDTO](docs/ProspectDTO.md)
|
|
592
600
|
- [ProspectEntity](docs/ProspectEntity.md)
|
|
593
601
|
- [ProvisioningModel](docs/ProvisioningModel.md)
|
package/api.ts
CHANGED
|
@@ -5624,7 +5624,7 @@ export interface PromoCodesEntity {
|
|
|
5624
5624
|
/**
|
|
5625
5625
|
* id
|
|
5626
5626
|
*/
|
|
5627
|
-
'id'?: number;
|
|
5627
|
+
'id'?: number | null;
|
|
5628
5628
|
/**
|
|
5629
5629
|
* code
|
|
5630
5630
|
*/
|
|
@@ -5633,18 +5633,14 @@ export interface PromoCodesEntity {
|
|
|
5633
5633
|
* description
|
|
5634
5634
|
*/
|
|
5635
5635
|
'description'?: string;
|
|
5636
|
-
/**
|
|
5637
|
-
* banner
|
|
5638
|
-
*/
|
|
5639
|
-
'banner'?: string;
|
|
5640
5636
|
/**
|
|
5641
5637
|
* start
|
|
5642
5638
|
*/
|
|
5643
|
-
'
|
|
5639
|
+
'startDate'?: string | null;
|
|
5644
5640
|
/**
|
|
5645
5641
|
* expiry
|
|
5646
5642
|
*/
|
|
5647
|
-
'
|
|
5643
|
+
'endDate'?: string | null;
|
|
5648
5644
|
/**
|
|
5649
5645
|
* customerLimit
|
|
5650
5646
|
*/
|
|
@@ -5656,19 +5652,60 @@ export interface PromoCodesEntity {
|
|
|
5656
5652
|
/**
|
|
5657
5653
|
* orderRestrictions
|
|
5658
5654
|
*/
|
|
5659
|
-
'orderRestrictions'?: string
|
|
5655
|
+
'orderRestrictions'?: Array<string>;
|
|
5660
5656
|
/**
|
|
5661
5657
|
* includeDistribution
|
|
5662
5658
|
*/
|
|
5663
|
-
'includeDistribution'?:
|
|
5659
|
+
'includeDistribution'?: boolean;
|
|
5664
5660
|
/**
|
|
5665
5661
|
* distributionOnly
|
|
5666
5662
|
*/
|
|
5667
|
-
'distributionOnly'?:
|
|
5663
|
+
'distributionOnly'?: boolean;
|
|
5664
|
+
/**
|
|
5665
|
+
* nfr
|
|
5666
|
+
*/
|
|
5667
|
+
'nfr'?: boolean;
|
|
5668
5668
|
/**
|
|
5669
5669
|
* note
|
|
5670
5670
|
*/
|
|
5671
|
-
'note'?: string;
|
|
5671
|
+
'note'?: string | null;
|
|
5672
|
+
}
|
|
5673
|
+
/**
|
|
5674
|
+
* Promo Item
|
|
5675
|
+
*/
|
|
5676
|
+
export interface PromoItemModel {
|
|
5677
|
+
/**
|
|
5678
|
+
* id
|
|
5679
|
+
*/
|
|
5680
|
+
'id'?: number;
|
|
5681
|
+
/**
|
|
5682
|
+
* promoId
|
|
5683
|
+
*/
|
|
5684
|
+
'promoId'?: number;
|
|
5685
|
+
/**
|
|
5686
|
+
* price
|
|
5687
|
+
*/
|
|
5688
|
+
'price'?: number;
|
|
5689
|
+
/**
|
|
5690
|
+
* discount
|
|
5691
|
+
*/
|
|
5692
|
+
'discount'?: number;
|
|
5693
|
+
/**
|
|
5694
|
+
* sku
|
|
5695
|
+
*/
|
|
5696
|
+
'sku'?: string;
|
|
5697
|
+
/**
|
|
5698
|
+
* quantity
|
|
5699
|
+
*/
|
|
5700
|
+
'quantity'?: number;
|
|
5701
|
+
/**
|
|
5702
|
+
* bulkQuantity
|
|
5703
|
+
*/
|
|
5704
|
+
'bulkQuantity'?: number;
|
|
5705
|
+
/**
|
|
5706
|
+
* bulkAdd
|
|
5707
|
+
*/
|
|
5708
|
+
'bulkAdd'?: number;
|
|
5672
5709
|
}
|
|
5673
5710
|
/**
|
|
5674
5711
|
* PromoItemsEntity
|
|
@@ -5707,6 +5744,113 @@ export interface PromoItemsEntity {
|
|
|
5707
5744
|
*/
|
|
5708
5745
|
'bulkAdd'?: number;
|
|
5709
5746
|
}
|
|
5747
|
+
/**
|
|
5748
|
+
* Promotion
|
|
5749
|
+
*/
|
|
5750
|
+
export interface PromoModel {
|
|
5751
|
+
/**
|
|
5752
|
+
* id
|
|
5753
|
+
*/
|
|
5754
|
+
'id'?: number | null;
|
|
5755
|
+
/**
|
|
5756
|
+
* code
|
|
5757
|
+
*/
|
|
5758
|
+
'code'?: string;
|
|
5759
|
+
/**
|
|
5760
|
+
* description
|
|
5761
|
+
*/
|
|
5762
|
+
'description'?: string;
|
|
5763
|
+
/**
|
|
5764
|
+
* start
|
|
5765
|
+
*/
|
|
5766
|
+
'startDate'?: string | null;
|
|
5767
|
+
/**
|
|
5768
|
+
* expiry
|
|
5769
|
+
*/
|
|
5770
|
+
'endDate'?: string | null;
|
|
5771
|
+
/**
|
|
5772
|
+
* customerLimit
|
|
5773
|
+
*/
|
|
5774
|
+
'customerLimit'?: number;
|
|
5775
|
+
/**
|
|
5776
|
+
* globalLimit
|
|
5777
|
+
*/
|
|
5778
|
+
'globalLimit'?: number;
|
|
5779
|
+
/**
|
|
5780
|
+
* orderRestrictions
|
|
5781
|
+
*/
|
|
5782
|
+
'orderRestrictions'?: Array<string>;
|
|
5783
|
+
/**
|
|
5784
|
+
* includeDistribution
|
|
5785
|
+
*/
|
|
5786
|
+
'includeDistribution'?: boolean;
|
|
5787
|
+
/**
|
|
5788
|
+
* distributionOnly
|
|
5789
|
+
*/
|
|
5790
|
+
'distributionOnly'?: boolean;
|
|
5791
|
+
/**
|
|
5792
|
+
* nfr
|
|
5793
|
+
*/
|
|
5794
|
+
'nfr'?: boolean;
|
|
5795
|
+
/**
|
|
5796
|
+
* note
|
|
5797
|
+
*/
|
|
5798
|
+
'note'?: string | null;
|
|
5799
|
+
/**
|
|
5800
|
+
* Items
|
|
5801
|
+
*/
|
|
5802
|
+
'items'?: Array<PromoItemModel>;
|
|
5803
|
+
}
|
|
5804
|
+
/**
|
|
5805
|
+
* Promotions
|
|
5806
|
+
*/
|
|
5807
|
+
export interface PromoSummariesModel {
|
|
5808
|
+
/**
|
|
5809
|
+
* Results
|
|
5810
|
+
*/
|
|
5811
|
+
'results'?: Array<PromoSummaryDTO>;
|
|
5812
|
+
/**
|
|
5813
|
+
* Page
|
|
5814
|
+
*/
|
|
5815
|
+
'page'?: number;
|
|
5816
|
+
/**
|
|
5817
|
+
* Per Page
|
|
5818
|
+
*/
|
|
5819
|
+
'perPage'?: number;
|
|
5820
|
+
/**
|
|
5821
|
+
* Total Results
|
|
5822
|
+
*/
|
|
5823
|
+
'totalResults'?: number;
|
|
5824
|
+
}
|
|
5825
|
+
/**
|
|
5826
|
+
* Promo Summary
|
|
5827
|
+
*/
|
|
5828
|
+
export interface PromoSummaryDTO {
|
|
5829
|
+
/**
|
|
5830
|
+
* ID
|
|
5831
|
+
*/
|
|
5832
|
+
'id'?: number | null;
|
|
5833
|
+
/**
|
|
5834
|
+
* Description
|
|
5835
|
+
*/
|
|
5836
|
+
'description'?: string;
|
|
5837
|
+
/**
|
|
5838
|
+
* Promo Code
|
|
5839
|
+
*/
|
|
5840
|
+
'code'?: string;
|
|
5841
|
+
/**
|
|
5842
|
+
* Start Date
|
|
5843
|
+
*/
|
|
5844
|
+
'startDate'?: string | null;
|
|
5845
|
+
/**
|
|
5846
|
+
* End Date
|
|
5847
|
+
*/
|
|
5848
|
+
'endDate'?: string | null;
|
|
5849
|
+
/**
|
|
5850
|
+
* Orders
|
|
5851
|
+
*/
|
|
5852
|
+
'orders'?: number;
|
|
5853
|
+
}
|
|
5710
5854
|
/**
|
|
5711
5855
|
* Prospect
|
|
5712
5856
|
*/
|
|
@@ -29094,6 +29238,325 @@ export const GetGetLegacyStockListFormatEnum = {
|
|
|
29094
29238
|
export type GetGetLegacyStockListFormatEnum = typeof GetGetLegacyStockListFormatEnum[keyof typeof GetGetLegacyStockListFormatEnum];
|
|
29095
29239
|
|
|
29096
29240
|
|
|
29241
|
+
/**
|
|
29242
|
+
* PromotionsApi - axios parameter creator
|
|
29243
|
+
*/
|
|
29244
|
+
export const PromotionsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
29245
|
+
return {
|
|
29246
|
+
/**
|
|
29247
|
+
* Get a promotion
|
|
29248
|
+
* @param {number} id Promo ID
|
|
29249
|
+
* @param {*} [options] Override http request option.
|
|
29250
|
+
* @throws {RequiredError}
|
|
29251
|
+
*/
|
|
29252
|
+
getGetPromo: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
29253
|
+
// verify required parameter 'id' is not null or undefined
|
|
29254
|
+
assertParamExists('getGetPromo', 'id', id)
|
|
29255
|
+
const localVarPath = `/marketing/promos/{id}`
|
|
29256
|
+
.replace('{id}', encodeURIComponent(String(id)));
|
|
29257
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
29258
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
29259
|
+
let baseOptions;
|
|
29260
|
+
if (configuration) {
|
|
29261
|
+
baseOptions = configuration.baseOptions;
|
|
29262
|
+
}
|
|
29263
|
+
|
|
29264
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
29265
|
+
const localVarHeaderParameter = {} as any;
|
|
29266
|
+
const localVarQueryParameter = {} as any;
|
|
29267
|
+
|
|
29268
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
29269
|
+
|
|
29270
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
29271
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
29272
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
29273
|
+
|
|
29274
|
+
return {
|
|
29275
|
+
url: toPathString(localVarUrlObj),
|
|
29276
|
+
options: localVarRequestOptions,
|
|
29277
|
+
};
|
|
29278
|
+
},
|
|
29279
|
+
/**
|
|
29280
|
+
* Get Promos
|
|
29281
|
+
* @param {number} [pageSize] Number Of Results
|
|
29282
|
+
* @param {number} [page] Page Number
|
|
29283
|
+
* @param {string} [search] Search
|
|
29284
|
+
* @param {boolean} [expired] Expired
|
|
29285
|
+
* @param {*} [options] Override http request option.
|
|
29286
|
+
* @throws {RequiredError}
|
|
29287
|
+
*/
|
|
29288
|
+
getGetPromos: async (pageSize?: number, page?: number, search?: string, expired?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
29289
|
+
const localVarPath = `/marketing/promos`;
|
|
29290
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
29291
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
29292
|
+
let baseOptions;
|
|
29293
|
+
if (configuration) {
|
|
29294
|
+
baseOptions = configuration.baseOptions;
|
|
29295
|
+
}
|
|
29296
|
+
|
|
29297
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
29298
|
+
const localVarHeaderParameter = {} as any;
|
|
29299
|
+
const localVarQueryParameter = {} as any;
|
|
29300
|
+
|
|
29301
|
+
if (pageSize !== undefined) {
|
|
29302
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
29303
|
+
}
|
|
29304
|
+
|
|
29305
|
+
if (page !== undefined) {
|
|
29306
|
+
localVarQueryParameter['page'] = page;
|
|
29307
|
+
}
|
|
29308
|
+
|
|
29309
|
+
if (search !== undefined) {
|
|
29310
|
+
localVarQueryParameter['search'] = search;
|
|
29311
|
+
}
|
|
29312
|
+
|
|
29313
|
+
if (expired !== undefined) {
|
|
29314
|
+
localVarQueryParameter['expired'] = expired;
|
|
29315
|
+
}
|
|
29316
|
+
|
|
29317
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
29318
|
+
|
|
29319
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
29320
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
29321
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
29322
|
+
|
|
29323
|
+
return {
|
|
29324
|
+
url: toPathString(localVarUrlObj),
|
|
29325
|
+
options: localVarRequestOptions,
|
|
29326
|
+
};
|
|
29327
|
+
},
|
|
29328
|
+
/**
|
|
29329
|
+
* Create a promotion
|
|
29330
|
+
* @param {PromoModel} [promoModel] Promotion
|
|
29331
|
+
* @param {*} [options] Override http request option.
|
|
29332
|
+
* @throws {RequiredError}
|
|
29333
|
+
*/
|
|
29334
|
+
postGetPromos: async (promoModel?: PromoModel, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
29335
|
+
const localVarPath = `/marketing/promos`;
|
|
29336
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
29337
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
29338
|
+
let baseOptions;
|
|
29339
|
+
if (configuration) {
|
|
29340
|
+
baseOptions = configuration.baseOptions;
|
|
29341
|
+
}
|
|
29342
|
+
|
|
29343
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
29344
|
+
const localVarHeaderParameter = {} as any;
|
|
29345
|
+
const localVarQueryParameter = {} as any;
|
|
29346
|
+
|
|
29347
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
29348
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
29349
|
+
|
|
29350
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
29351
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
29352
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
29353
|
+
localVarRequestOptions.data = serializeDataIfNeeded(promoModel, localVarRequestOptions, configuration)
|
|
29354
|
+
|
|
29355
|
+
return {
|
|
29356
|
+
url: toPathString(localVarUrlObj),
|
|
29357
|
+
options: localVarRequestOptions,
|
|
29358
|
+
};
|
|
29359
|
+
},
|
|
29360
|
+
/**
|
|
29361
|
+
* Update a promotion
|
|
29362
|
+
* @param {number} id Promo ID
|
|
29363
|
+
* @param {PromoModel} [promoModel] Promotion
|
|
29364
|
+
* @param {*} [options] Override http request option.
|
|
29365
|
+
* @throws {RequiredError}
|
|
29366
|
+
*/
|
|
29367
|
+
putGetPromo: async (id: number, promoModel?: PromoModel, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
29368
|
+
// verify required parameter 'id' is not null or undefined
|
|
29369
|
+
assertParamExists('putGetPromo', 'id', id)
|
|
29370
|
+
const localVarPath = `/marketing/promos/{id}`
|
|
29371
|
+
.replace('{id}', encodeURIComponent(String(id)));
|
|
29372
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
29373
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
29374
|
+
let baseOptions;
|
|
29375
|
+
if (configuration) {
|
|
29376
|
+
baseOptions = configuration.baseOptions;
|
|
29377
|
+
}
|
|
29378
|
+
|
|
29379
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
29380
|
+
const localVarHeaderParameter = {} as any;
|
|
29381
|
+
const localVarQueryParameter = {} as any;
|
|
29382
|
+
|
|
29383
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
29384
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
29385
|
+
|
|
29386
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
29387
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
29388
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
29389
|
+
localVarRequestOptions.data = serializeDataIfNeeded(promoModel, localVarRequestOptions, configuration)
|
|
29390
|
+
|
|
29391
|
+
return {
|
|
29392
|
+
url: toPathString(localVarUrlObj),
|
|
29393
|
+
options: localVarRequestOptions,
|
|
29394
|
+
};
|
|
29395
|
+
},
|
|
29396
|
+
}
|
|
29397
|
+
};
|
|
29398
|
+
|
|
29399
|
+
/**
|
|
29400
|
+
* PromotionsApi - functional programming interface
|
|
29401
|
+
*/
|
|
29402
|
+
export const PromotionsApiFp = function(configuration?: Configuration) {
|
|
29403
|
+
const localVarAxiosParamCreator = PromotionsApiAxiosParamCreator(configuration)
|
|
29404
|
+
return {
|
|
29405
|
+
/**
|
|
29406
|
+
* Get a promotion
|
|
29407
|
+
* @param {number} id Promo ID
|
|
29408
|
+
* @param {*} [options] Override http request option.
|
|
29409
|
+
* @throws {RequiredError}
|
|
29410
|
+
*/
|
|
29411
|
+
async getGetPromo(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PromoModel>> {
|
|
29412
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getGetPromo(id, options);
|
|
29413
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
29414
|
+
const localVarOperationServerBasePath = operationServerMap['PromotionsApi.getGetPromo']?.[localVarOperationServerIndex]?.url;
|
|
29415
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
29416
|
+
},
|
|
29417
|
+
/**
|
|
29418
|
+
* Get Promos
|
|
29419
|
+
* @param {number} [pageSize] Number Of Results
|
|
29420
|
+
* @param {number} [page] Page Number
|
|
29421
|
+
* @param {string} [search] Search
|
|
29422
|
+
* @param {boolean} [expired] Expired
|
|
29423
|
+
* @param {*} [options] Override http request option.
|
|
29424
|
+
* @throws {RequiredError}
|
|
29425
|
+
*/
|
|
29426
|
+
async getGetPromos(pageSize?: number, page?: number, search?: string, expired?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PromoSummariesModel>> {
|
|
29427
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getGetPromos(pageSize, page, search, expired, options);
|
|
29428
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
29429
|
+
const localVarOperationServerBasePath = operationServerMap['PromotionsApi.getGetPromos']?.[localVarOperationServerIndex]?.url;
|
|
29430
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
29431
|
+
},
|
|
29432
|
+
/**
|
|
29433
|
+
* Create a promotion
|
|
29434
|
+
* @param {PromoModel} [promoModel] Promotion
|
|
29435
|
+
* @param {*} [options] Override http request option.
|
|
29436
|
+
* @throws {RequiredError}
|
|
29437
|
+
*/
|
|
29438
|
+
async postGetPromos(promoModel?: PromoModel, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PromoModel>> {
|
|
29439
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.postGetPromos(promoModel, options);
|
|
29440
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
29441
|
+
const localVarOperationServerBasePath = operationServerMap['PromotionsApi.postGetPromos']?.[localVarOperationServerIndex]?.url;
|
|
29442
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
29443
|
+
},
|
|
29444
|
+
/**
|
|
29445
|
+
* Update a promotion
|
|
29446
|
+
* @param {number} id Promo ID
|
|
29447
|
+
* @param {PromoModel} [promoModel] Promotion
|
|
29448
|
+
* @param {*} [options] Override http request option.
|
|
29449
|
+
* @throws {RequiredError}
|
|
29450
|
+
*/
|
|
29451
|
+
async putGetPromo(id: number, promoModel?: PromoModel, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PromoModel>> {
|
|
29452
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.putGetPromo(id, promoModel, options);
|
|
29453
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
29454
|
+
const localVarOperationServerBasePath = operationServerMap['PromotionsApi.putGetPromo']?.[localVarOperationServerIndex]?.url;
|
|
29455
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
29456
|
+
},
|
|
29457
|
+
}
|
|
29458
|
+
};
|
|
29459
|
+
|
|
29460
|
+
/**
|
|
29461
|
+
* PromotionsApi - factory interface
|
|
29462
|
+
*/
|
|
29463
|
+
export const PromotionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
29464
|
+
const localVarFp = PromotionsApiFp(configuration)
|
|
29465
|
+
return {
|
|
29466
|
+
/**
|
|
29467
|
+
* Get a promotion
|
|
29468
|
+
* @param {number} id Promo ID
|
|
29469
|
+
* @param {*} [options] Override http request option.
|
|
29470
|
+
* @throws {RequiredError}
|
|
29471
|
+
*/
|
|
29472
|
+
getGetPromo(id: number, options?: RawAxiosRequestConfig): AxiosPromise<PromoModel> {
|
|
29473
|
+
return localVarFp.getGetPromo(id, options).then((request) => request(axios, basePath));
|
|
29474
|
+
},
|
|
29475
|
+
/**
|
|
29476
|
+
* Get Promos
|
|
29477
|
+
* @param {number} [pageSize] Number Of Results
|
|
29478
|
+
* @param {number} [page] Page Number
|
|
29479
|
+
* @param {string} [search] Search
|
|
29480
|
+
* @param {boolean} [expired] Expired
|
|
29481
|
+
* @param {*} [options] Override http request option.
|
|
29482
|
+
* @throws {RequiredError}
|
|
29483
|
+
*/
|
|
29484
|
+
getGetPromos(pageSize?: number, page?: number, search?: string, expired?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<PromoSummariesModel> {
|
|
29485
|
+
return localVarFp.getGetPromos(pageSize, page, search, expired, options).then((request) => request(axios, basePath));
|
|
29486
|
+
},
|
|
29487
|
+
/**
|
|
29488
|
+
* Create a promotion
|
|
29489
|
+
* @param {PromoModel} [promoModel] Promotion
|
|
29490
|
+
* @param {*} [options] Override http request option.
|
|
29491
|
+
* @throws {RequiredError}
|
|
29492
|
+
*/
|
|
29493
|
+
postGetPromos(promoModel?: PromoModel, options?: RawAxiosRequestConfig): AxiosPromise<PromoModel> {
|
|
29494
|
+
return localVarFp.postGetPromos(promoModel, options).then((request) => request(axios, basePath));
|
|
29495
|
+
},
|
|
29496
|
+
/**
|
|
29497
|
+
* Update a promotion
|
|
29498
|
+
* @param {number} id Promo ID
|
|
29499
|
+
* @param {PromoModel} [promoModel] Promotion
|
|
29500
|
+
* @param {*} [options] Override http request option.
|
|
29501
|
+
* @throws {RequiredError}
|
|
29502
|
+
*/
|
|
29503
|
+
putGetPromo(id: number, promoModel?: PromoModel, options?: RawAxiosRequestConfig): AxiosPromise<PromoModel> {
|
|
29504
|
+
return localVarFp.putGetPromo(id, promoModel, options).then((request) => request(axios, basePath));
|
|
29505
|
+
},
|
|
29506
|
+
};
|
|
29507
|
+
};
|
|
29508
|
+
|
|
29509
|
+
/**
|
|
29510
|
+
* PromotionsApi - object-oriented interface
|
|
29511
|
+
*/
|
|
29512
|
+
export class PromotionsApi extends BaseAPI {
|
|
29513
|
+
/**
|
|
29514
|
+
* Get a promotion
|
|
29515
|
+
* @param {number} id Promo ID
|
|
29516
|
+
* @param {*} [options] Override http request option.
|
|
29517
|
+
* @throws {RequiredError}
|
|
29518
|
+
*/
|
|
29519
|
+
public getGetPromo(id: number, options?: RawAxiosRequestConfig) {
|
|
29520
|
+
return PromotionsApiFp(this.configuration).getGetPromo(id, options).then((request) => request(this.axios, this.basePath));
|
|
29521
|
+
}
|
|
29522
|
+
|
|
29523
|
+
/**
|
|
29524
|
+
* Get Promos
|
|
29525
|
+
* @param {number} [pageSize] Number Of Results
|
|
29526
|
+
* @param {number} [page] Page Number
|
|
29527
|
+
* @param {string} [search] Search
|
|
29528
|
+
* @param {boolean} [expired] Expired
|
|
29529
|
+
* @param {*} [options] Override http request option.
|
|
29530
|
+
* @throws {RequiredError}
|
|
29531
|
+
*/
|
|
29532
|
+
public getGetPromos(pageSize?: number, page?: number, search?: string, expired?: boolean, options?: RawAxiosRequestConfig) {
|
|
29533
|
+
return PromotionsApiFp(this.configuration).getGetPromos(pageSize, page, search, expired, options).then((request) => request(this.axios, this.basePath));
|
|
29534
|
+
}
|
|
29535
|
+
|
|
29536
|
+
/**
|
|
29537
|
+
* Create a promotion
|
|
29538
|
+
* @param {PromoModel} [promoModel] Promotion
|
|
29539
|
+
* @param {*} [options] Override http request option.
|
|
29540
|
+
* @throws {RequiredError}
|
|
29541
|
+
*/
|
|
29542
|
+
public postGetPromos(promoModel?: PromoModel, options?: RawAxiosRequestConfig) {
|
|
29543
|
+
return PromotionsApiFp(this.configuration).postGetPromos(promoModel, options).then((request) => request(this.axios, this.basePath));
|
|
29544
|
+
}
|
|
29545
|
+
|
|
29546
|
+
/**
|
|
29547
|
+
* Update a promotion
|
|
29548
|
+
* @param {number} id Promo ID
|
|
29549
|
+
* @param {PromoModel} [promoModel] Promotion
|
|
29550
|
+
* @param {*} [options] Override http request option.
|
|
29551
|
+
* @throws {RequiredError}
|
|
29552
|
+
*/
|
|
29553
|
+
public putGetPromo(id: number, promoModel?: PromoModel, options?: RawAxiosRequestConfig) {
|
|
29554
|
+
return PromotionsApiFp(this.configuration).putGetPromo(id, promoModel, options).then((request) => request(this.axios, this.basePath));
|
|
29555
|
+
}
|
|
29556
|
+
}
|
|
29557
|
+
|
|
29558
|
+
|
|
29559
|
+
|
|
29097
29560
|
/**
|
|
29098
29561
|
* ProspectsApi - axios parameter creator
|
|
29099
29562
|
*/
|