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/dist/api.js
CHANGED
|
@@ -86,8 +86,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
86
86
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
87
87
|
exports.AccountsApiAxiosParamCreator = exports.UpgradeRequestModelSchoolTypeEnum = exports.UpgradeRequestModelLicenceTypeEnum = exports.TcxWizardModelInstallationStatusEnum = exports.TcxWizardModelInstallTypeEnum = exports.TcxSetupEntityRegionEnum = exports.TcxSetupEntityInstallTypeEnum = exports.TcxMultiTenantModelPackageEnum = exports.StockReportItemModelCurrencyEnum = exports.StockOrderModelPaidEnum = exports.StockOrderModelDeliveryMethodEnum = exports.SmsResponseModelEventTypeEnum = exports.SmsPhoneNumberModelStatusEnum = exports.SmsAccountRequestDTOTypeEnum = exports.SmsAccountRequestDTOProviderEnum = exports.SipTrunkChangeResponseModelTypeEnum = exports.ShippingServiceModelCourierEnum = exports.ShippingServiceDTOCourierEnum = exports.ShippingRequestDTOPrinterEnum = exports.ShippingRequestDTOCourierEnum = exports.ShipmentRequestDTOCourierEnum = exports.ShipmentDTOCourierEnum = exports.ServiceStatusDTOStatusEnum = exports.ServiceHealthDTOGlobalStatusEnum = exports.SeriesDTOTypeEnum = exports.SdrReferenceType = exports.ReportRequestDTOGraphTypeEnum = exports.ReportRequestDTOReportEnum = exports.ProspectDTOStatusEnum = exports.PostGetServicePlansRequestPlanGroupEnum = exports.PatchUpdateTcxHostingPriceListRequestPriceListEnum = exports.PatchUpdatePriceListRequestPriceListEnum = exports.PasswordSenderDTOIntervalTypeEnum = exports.OrderTotalModelCurrencyEnum = exports.OrderRequestModelSchoolTypeEnum = exports.OrderRequestModelLicenceTypeEnum = exports.MultiTenantChangeResponseModelTypeEnum = exports.ItemDiscountEntityTypeEnum = exports.HostingRegionDTOCodeEnum = exports.HostingChangeResponseModelTypeEnum = exports.GraphDTOCurrencyEnum = exports.EventDTOStatusEnum = exports.DivertResponseModelStatusEnum = exports.CustomerRateType = exports.AxisDataDTOTypeEnum = exports.AuditLogEntityTypeEnum = exports.AuditLogEntityActionEnum = exports.AdminUserModelPermissionsEnum = exports.AdminUserModelRoleEnum = exports.AdminOrderRequestDTOPaymentMethodEnum = void 0;
|
|
88
88
|
exports.MiscApi = exports.MiscApiFactory = exports.MiscApiFp = exports.MiscApiAxiosParamCreator = exports.GetGetTenantsStatusEnum = exports.Class3CXMultiTenantApi = exports.Class3CXMultiTenantApiFactory = exports.Class3CXMultiTenantApiFp = exports.Class3CXMultiTenantApiAxiosParamCreator = exports.GetGetPriceSchoolTypeEnum = exports.GetGetPriceLicenceTypeEnum = exports.Class3CXIntegrationsApi = exports.Class3CXIntegrationsApiFactory = exports.Class3CXIntegrationsApiFp = exports.Class3CXIntegrationsApiAxiosParamCreator = exports.PostResizeInstanceSizeEnum = exports.PostFailoverInstanceTypeEnum = exports.GetGetInstallationsInstallTypeEnum = exports.GetGetInstallationsHostingEnum = exports.GetGetInstallationsStatusEnum = exports.Class3CXInstallationsApi = exports.Class3CXInstallationsApiFactory = exports.Class3CXInstallationsApiFp = exports.Class3CXInstallationsApiAxiosParamCreator = exports.Class3CXInstallationWizardApi = exports.Class3CXInstallationWizardApiFactory = exports.Class3CXInstallationWizardApiFp = exports.Class3CXInstallationWizardApiAxiosParamCreator = exports.Class3CXApi = exports.Class3CXApiFactory = exports.Class3CXApiFp = exports.Class3CXApiAxiosParamCreator = exports.GetGetCrmActivitiesTypeEnum = exports.CRMApi = exports.CRMApiFactory = exports.CRMApiFp = exports.CRMApiAxiosParamCreator = exports.GetGetServicesPlanDetailsTypeEnum = exports.GetGetConnectionsTypeEnum = exports.BillingApi = exports.BillingApiFactory = exports.BillingApiFp = exports.BillingApiAxiosParamCreator = exports.PatchSetPrizePromoStateEnum = exports.PatchSetPortalAccessStateEnum = exports.PatchSetOnHoldStateEnum = exports.PatchSetAccountStatusStateEnum = exports.AccountsApi = exports.AccountsApiFactory = exports.AccountsApiFp = void 0;
|
|
89
|
-
exports.
|
|
90
|
-
exports.PostAddWebhookWebhookUriEnum = exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = exports.WebhooksApiAxiosParamCreator = exports.TicketsApi = exports.TicketsApiFactory = exports.TicketsApiFp = exports.TicketsApiAxiosParamCreator = exports.SystemApi = exports.SystemApiFactory = exports.SystemApiFp = exports.SystemApiAxiosParamCreator = exports.SuppliersApi = exports.SuppliersApiFactory = exports.SuppliersApiFp = exports.SuppliersApiAxiosParamCreator = exports.StockManagementApi = exports.StockManagementApiFactory = exports.StockManagementApiFp = exports.StockManagementApiAxiosParamCreator = exports.ShippingApi = exports.ShippingApiFactory = exports.ShippingApiFp = exports.ShippingApiAxiosParamCreator = exports.ServicesApi = exports.ServicesApiFactory = exports.ServicesApiFp = exports.ServicesApiAxiosParamCreator = exports.SMSApi = exports.SMSApiFactory = exports.SMSApiFp = exports.SMSApiAxiosParamCreator = exports.SIPTrunksApi = exports.SIPTrunksApiFactory = exports.SIPTrunksApiFp = exports.SIPTrunksApiAxiosParamCreator = void 0;
|
|
89
|
+
exports.ProvisioningApi = exports.ProvisioningApiFactory = exports.ProvisioningApiFp = exports.ProvisioningApiAxiosParamCreator = exports.ProspectsApi = exports.ProspectsApiFactory = exports.ProspectsApiFp = exports.ProspectsApiAxiosParamCreator = exports.PromotionsApi = exports.PromotionsApiFactory = exports.PromotionsApiFp = exports.PromotionsApiAxiosParamCreator = exports.GetGetLegacyStockListFormatEnum = exports.ProductsApi = exports.ProductsApiFactory = exports.ProductsApiFp = exports.ProductsApiAxiosParamCreator = exports.PostSendPriceListCategoryEnum = exports.PostSendPriceListFormatEnum = exports.PostSendPriceListTypeEnum = exports.GetGetPriceListCategoryEnum = exports.GetGetPriceListFormatEnum = exports.GetGetPriceListTypeEnum = exports.PricingApi = exports.PricingApiFactory = exports.PricingApiFp = exports.PricingApiAxiosParamCreator = exports.PostPrintShippingLabelPrinterEnum = exports.GetGetOrdersFilterEnum = exports.GetGetOrdersStatusEnum = exports.OrdersApi = exports.OrdersApiFactory = exports.OrdersApiFp = exports.OrdersApiAxiosParamCreator = exports.PostAuthoriseScopeEnum = exports.PostAccessTokenTokenExchangeTypeEnum = exports.PostAccessTokenScopeEnum = exports.PostAccessTokenGrantTypeEnum = exports.OAuth20Api = exports.OAuth20ApiFactory = exports.OAuth20ApiFp = exports.OAuth20ApiAxiosParamCreator = exports.NumberPortingApi = exports.NumberPortingApiFactory = exports.NumberPortingApiFp = exports.NumberPortingApiAxiosParamCreator = exports.MyPBXToolsApi = exports.MyPBXToolsApiFactory = exports.MyPBXToolsApiFp = exports.MyPBXToolsApiAxiosParamCreator = void 0;
|
|
90
|
+
exports.PostAddWebhookWebhookUriEnum = exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = exports.WebhooksApiAxiosParamCreator = exports.TicketsApi = exports.TicketsApiFactory = exports.TicketsApiFp = exports.TicketsApiAxiosParamCreator = exports.SystemApi = exports.SystemApiFactory = exports.SystemApiFp = exports.SystemApiAxiosParamCreator = exports.SuppliersApi = exports.SuppliersApiFactory = exports.SuppliersApiFp = exports.SuppliersApiAxiosParamCreator = exports.StockManagementApi = exports.StockManagementApiFactory = exports.StockManagementApiFp = exports.StockManagementApiAxiosParamCreator = exports.ShippingApi = exports.ShippingApiFactory = exports.ShippingApiFp = exports.ShippingApiAxiosParamCreator = exports.ServicesApi = exports.ServicesApiFactory = exports.ServicesApiFp = exports.ServicesApiAxiosParamCreator = exports.SMSApi = exports.SMSApiFactory = exports.SMSApiFp = exports.SMSApiAxiosParamCreator = exports.SIPTrunksApi = exports.SIPTrunksApiFactory = exports.SIPTrunksApiFp = exports.SIPTrunksApiAxiosParamCreator = exports.ReportsApi = exports.ReportsApiFactory = exports.ReportsApiFp = exports.ReportsApiAxiosParamCreator = void 0;
|
|
91
91
|
var axios_1 = require("axios");
|
|
92
92
|
// Some imports not used depending on template conditions
|
|
93
93
|
// @ts-ignore
|
|
@@ -23262,6 +23262,382 @@ exports.GetGetLegacyStockListFormatEnum = {
|
|
|
23262
23262
|
Xml: 'XML',
|
|
23263
23263
|
Csv: 'CSV',
|
|
23264
23264
|
};
|
|
23265
|
+
/**
|
|
23266
|
+
* PromotionsApi - axios parameter creator
|
|
23267
|
+
*/
|
|
23268
|
+
var PromotionsApiAxiosParamCreator = function (configuration) {
|
|
23269
|
+
var _this = this;
|
|
23270
|
+
return {
|
|
23271
|
+
/**
|
|
23272
|
+
* Get a promotion
|
|
23273
|
+
* @param {number} id Promo ID
|
|
23274
|
+
* @param {*} [options] Override http request option.
|
|
23275
|
+
* @throws {RequiredError}
|
|
23276
|
+
*/
|
|
23277
|
+
getGetPromo: function (id_1) {
|
|
23278
|
+
var args_1 = [];
|
|
23279
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
23280
|
+
args_1[_i - 1] = arguments[_i];
|
|
23281
|
+
}
|
|
23282
|
+
return __awaiter(_this, __spreadArray([id_1], args_1, true), void 0, function (id, options) {
|
|
23283
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
23284
|
+
if (options === void 0) { options = {}; }
|
|
23285
|
+
return __generator(this, function (_a) {
|
|
23286
|
+
// verify required parameter 'id' is not null or undefined
|
|
23287
|
+
(0, common_1.assertParamExists)('getGetPromo', 'id', id);
|
|
23288
|
+
localVarPath = "/marketing/promos/{id}"
|
|
23289
|
+
.replace('{id}', encodeURIComponent(String(id)));
|
|
23290
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
23291
|
+
if (configuration) {
|
|
23292
|
+
baseOptions = configuration.baseOptions;
|
|
23293
|
+
}
|
|
23294
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
23295
|
+
localVarHeaderParameter = {};
|
|
23296
|
+
localVarQueryParameter = {};
|
|
23297
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
23298
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
23299
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
23300
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
23301
|
+
return [2 /*return*/, {
|
|
23302
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
23303
|
+
options: localVarRequestOptions,
|
|
23304
|
+
}];
|
|
23305
|
+
});
|
|
23306
|
+
});
|
|
23307
|
+
},
|
|
23308
|
+
/**
|
|
23309
|
+
* Get Promos
|
|
23310
|
+
* @param {number} [pageSize] Number Of Results
|
|
23311
|
+
* @param {number} [page] Page Number
|
|
23312
|
+
* @param {string} [search] Search
|
|
23313
|
+
* @param {boolean} [expired] Expired
|
|
23314
|
+
* @param {*} [options] Override http request option.
|
|
23315
|
+
* @throws {RequiredError}
|
|
23316
|
+
*/
|
|
23317
|
+
getGetPromos: function (pageSize_1, page_1, search_1, expired_1) {
|
|
23318
|
+
var args_1 = [];
|
|
23319
|
+
for (var _i = 4; _i < arguments.length; _i++) {
|
|
23320
|
+
args_1[_i - 4] = arguments[_i];
|
|
23321
|
+
}
|
|
23322
|
+
return __awaiter(_this, __spreadArray([pageSize_1, page_1, search_1, expired_1], args_1, true), void 0, function (pageSize, page, search, expired, options) {
|
|
23323
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
23324
|
+
if (options === void 0) { options = {}; }
|
|
23325
|
+
return __generator(this, function (_a) {
|
|
23326
|
+
localVarPath = "/marketing/promos";
|
|
23327
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
23328
|
+
if (configuration) {
|
|
23329
|
+
baseOptions = configuration.baseOptions;
|
|
23330
|
+
}
|
|
23331
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
23332
|
+
localVarHeaderParameter = {};
|
|
23333
|
+
localVarQueryParameter = {};
|
|
23334
|
+
if (pageSize !== undefined) {
|
|
23335
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
23336
|
+
}
|
|
23337
|
+
if (page !== undefined) {
|
|
23338
|
+
localVarQueryParameter['page'] = page;
|
|
23339
|
+
}
|
|
23340
|
+
if (search !== undefined) {
|
|
23341
|
+
localVarQueryParameter['search'] = search;
|
|
23342
|
+
}
|
|
23343
|
+
if (expired !== undefined) {
|
|
23344
|
+
localVarQueryParameter['expired'] = expired;
|
|
23345
|
+
}
|
|
23346
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
23347
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
23348
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
23349
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
23350
|
+
return [2 /*return*/, {
|
|
23351
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
23352
|
+
options: localVarRequestOptions,
|
|
23353
|
+
}];
|
|
23354
|
+
});
|
|
23355
|
+
});
|
|
23356
|
+
},
|
|
23357
|
+
/**
|
|
23358
|
+
* Create a promotion
|
|
23359
|
+
* @param {PromoModel} [promoModel] Promotion
|
|
23360
|
+
* @param {*} [options] Override http request option.
|
|
23361
|
+
* @throws {RequiredError}
|
|
23362
|
+
*/
|
|
23363
|
+
postGetPromos: function (promoModel_1) {
|
|
23364
|
+
var args_1 = [];
|
|
23365
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
23366
|
+
args_1[_i - 1] = arguments[_i];
|
|
23367
|
+
}
|
|
23368
|
+
return __awaiter(_this, __spreadArray([promoModel_1], args_1, true), void 0, function (promoModel, options) {
|
|
23369
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
23370
|
+
if (options === void 0) { options = {}; }
|
|
23371
|
+
return __generator(this, function (_a) {
|
|
23372
|
+
localVarPath = "/marketing/promos";
|
|
23373
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
23374
|
+
if (configuration) {
|
|
23375
|
+
baseOptions = configuration.baseOptions;
|
|
23376
|
+
}
|
|
23377
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
23378
|
+
localVarHeaderParameter = {};
|
|
23379
|
+
localVarQueryParameter = {};
|
|
23380
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
23381
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
23382
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
23383
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
23384
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
23385
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(promoModel, localVarRequestOptions, configuration);
|
|
23386
|
+
return [2 /*return*/, {
|
|
23387
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
23388
|
+
options: localVarRequestOptions,
|
|
23389
|
+
}];
|
|
23390
|
+
});
|
|
23391
|
+
});
|
|
23392
|
+
},
|
|
23393
|
+
/**
|
|
23394
|
+
* Update a promotion
|
|
23395
|
+
* @param {number} id Promo ID
|
|
23396
|
+
* @param {PromoModel} [promoModel] Promotion
|
|
23397
|
+
* @param {*} [options] Override http request option.
|
|
23398
|
+
* @throws {RequiredError}
|
|
23399
|
+
*/
|
|
23400
|
+
putGetPromo: function (id_1, promoModel_1) {
|
|
23401
|
+
var args_1 = [];
|
|
23402
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
23403
|
+
args_1[_i - 2] = arguments[_i];
|
|
23404
|
+
}
|
|
23405
|
+
return __awaiter(_this, __spreadArray([id_1, promoModel_1], args_1, true), void 0, function (id, promoModel, options) {
|
|
23406
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
23407
|
+
if (options === void 0) { options = {}; }
|
|
23408
|
+
return __generator(this, function (_a) {
|
|
23409
|
+
// verify required parameter 'id' is not null or undefined
|
|
23410
|
+
(0, common_1.assertParamExists)('putGetPromo', 'id', id);
|
|
23411
|
+
localVarPath = "/marketing/promos/{id}"
|
|
23412
|
+
.replace('{id}', encodeURIComponent(String(id)));
|
|
23413
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
23414
|
+
if (configuration) {
|
|
23415
|
+
baseOptions = configuration.baseOptions;
|
|
23416
|
+
}
|
|
23417
|
+
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
|
|
23418
|
+
localVarHeaderParameter = {};
|
|
23419
|
+
localVarQueryParameter = {};
|
|
23420
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
23421
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
23422
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
23423
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
23424
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
23425
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(promoModel, localVarRequestOptions, configuration);
|
|
23426
|
+
return [2 /*return*/, {
|
|
23427
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
23428
|
+
options: localVarRequestOptions,
|
|
23429
|
+
}];
|
|
23430
|
+
});
|
|
23431
|
+
});
|
|
23432
|
+
},
|
|
23433
|
+
};
|
|
23434
|
+
};
|
|
23435
|
+
exports.PromotionsApiAxiosParamCreator = PromotionsApiAxiosParamCreator;
|
|
23436
|
+
/**
|
|
23437
|
+
* PromotionsApi - functional programming interface
|
|
23438
|
+
*/
|
|
23439
|
+
var PromotionsApiFp = function (configuration) {
|
|
23440
|
+
var localVarAxiosParamCreator = (0, exports.PromotionsApiAxiosParamCreator)(configuration);
|
|
23441
|
+
return {
|
|
23442
|
+
/**
|
|
23443
|
+
* Get a promotion
|
|
23444
|
+
* @param {number} id Promo ID
|
|
23445
|
+
* @param {*} [options] Override http request option.
|
|
23446
|
+
* @throws {RequiredError}
|
|
23447
|
+
*/
|
|
23448
|
+
getGetPromo: function (id, options) {
|
|
23449
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
23450
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
23451
|
+
var _a, _b, _c;
|
|
23452
|
+
return __generator(this, function (_d) {
|
|
23453
|
+
switch (_d.label) {
|
|
23454
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getGetPromo(id, options)];
|
|
23455
|
+
case 1:
|
|
23456
|
+
localVarAxiosArgs = _d.sent();
|
|
23457
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
23458
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PromotionsApi.getGetPromo']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
23459
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
23460
|
+
}
|
|
23461
|
+
});
|
|
23462
|
+
});
|
|
23463
|
+
},
|
|
23464
|
+
/**
|
|
23465
|
+
* Get Promos
|
|
23466
|
+
* @param {number} [pageSize] Number Of Results
|
|
23467
|
+
* @param {number} [page] Page Number
|
|
23468
|
+
* @param {string} [search] Search
|
|
23469
|
+
* @param {boolean} [expired] Expired
|
|
23470
|
+
* @param {*} [options] Override http request option.
|
|
23471
|
+
* @throws {RequiredError}
|
|
23472
|
+
*/
|
|
23473
|
+
getGetPromos: function (pageSize, page, search, expired, options) {
|
|
23474
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
23475
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
23476
|
+
var _a, _b, _c;
|
|
23477
|
+
return __generator(this, function (_d) {
|
|
23478
|
+
switch (_d.label) {
|
|
23479
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getGetPromos(pageSize, page, search, expired, options)];
|
|
23480
|
+
case 1:
|
|
23481
|
+
localVarAxiosArgs = _d.sent();
|
|
23482
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
23483
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PromotionsApi.getGetPromos']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
23484
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
23485
|
+
}
|
|
23486
|
+
});
|
|
23487
|
+
});
|
|
23488
|
+
},
|
|
23489
|
+
/**
|
|
23490
|
+
* Create a promotion
|
|
23491
|
+
* @param {PromoModel} [promoModel] Promotion
|
|
23492
|
+
* @param {*} [options] Override http request option.
|
|
23493
|
+
* @throws {RequiredError}
|
|
23494
|
+
*/
|
|
23495
|
+
postGetPromos: function (promoModel, options) {
|
|
23496
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
23497
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
23498
|
+
var _a, _b, _c;
|
|
23499
|
+
return __generator(this, function (_d) {
|
|
23500
|
+
switch (_d.label) {
|
|
23501
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.postGetPromos(promoModel, options)];
|
|
23502
|
+
case 1:
|
|
23503
|
+
localVarAxiosArgs = _d.sent();
|
|
23504
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
23505
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PromotionsApi.postGetPromos']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
23506
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
23507
|
+
}
|
|
23508
|
+
});
|
|
23509
|
+
});
|
|
23510
|
+
},
|
|
23511
|
+
/**
|
|
23512
|
+
* Update a promotion
|
|
23513
|
+
* @param {number} id Promo ID
|
|
23514
|
+
* @param {PromoModel} [promoModel] Promotion
|
|
23515
|
+
* @param {*} [options] Override http request option.
|
|
23516
|
+
* @throws {RequiredError}
|
|
23517
|
+
*/
|
|
23518
|
+
putGetPromo: function (id, promoModel, options) {
|
|
23519
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
23520
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
23521
|
+
var _a, _b, _c;
|
|
23522
|
+
return __generator(this, function (_d) {
|
|
23523
|
+
switch (_d.label) {
|
|
23524
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.putGetPromo(id, promoModel, options)];
|
|
23525
|
+
case 1:
|
|
23526
|
+
localVarAxiosArgs = _d.sent();
|
|
23527
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
23528
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PromotionsApi.putGetPromo']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
23529
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
23530
|
+
}
|
|
23531
|
+
});
|
|
23532
|
+
});
|
|
23533
|
+
},
|
|
23534
|
+
};
|
|
23535
|
+
};
|
|
23536
|
+
exports.PromotionsApiFp = PromotionsApiFp;
|
|
23537
|
+
/**
|
|
23538
|
+
* PromotionsApi - factory interface
|
|
23539
|
+
*/
|
|
23540
|
+
var PromotionsApiFactory = function (configuration, basePath, axios) {
|
|
23541
|
+
var localVarFp = (0, exports.PromotionsApiFp)(configuration);
|
|
23542
|
+
return {
|
|
23543
|
+
/**
|
|
23544
|
+
* Get a promotion
|
|
23545
|
+
* @param {number} id Promo ID
|
|
23546
|
+
* @param {*} [options] Override http request option.
|
|
23547
|
+
* @throws {RequiredError}
|
|
23548
|
+
*/
|
|
23549
|
+
getGetPromo: function (id, options) {
|
|
23550
|
+
return localVarFp.getGetPromo(id, options).then(function (request) { return request(axios, basePath); });
|
|
23551
|
+
},
|
|
23552
|
+
/**
|
|
23553
|
+
* Get Promos
|
|
23554
|
+
* @param {number} [pageSize] Number Of Results
|
|
23555
|
+
* @param {number} [page] Page Number
|
|
23556
|
+
* @param {string} [search] Search
|
|
23557
|
+
* @param {boolean} [expired] Expired
|
|
23558
|
+
* @param {*} [options] Override http request option.
|
|
23559
|
+
* @throws {RequiredError}
|
|
23560
|
+
*/
|
|
23561
|
+
getGetPromos: function (pageSize, page, search, expired, options) {
|
|
23562
|
+
return localVarFp.getGetPromos(pageSize, page, search, expired, options).then(function (request) { return request(axios, basePath); });
|
|
23563
|
+
},
|
|
23564
|
+
/**
|
|
23565
|
+
* Create a promotion
|
|
23566
|
+
* @param {PromoModel} [promoModel] Promotion
|
|
23567
|
+
* @param {*} [options] Override http request option.
|
|
23568
|
+
* @throws {RequiredError}
|
|
23569
|
+
*/
|
|
23570
|
+
postGetPromos: function (promoModel, options) {
|
|
23571
|
+
return localVarFp.postGetPromos(promoModel, options).then(function (request) { return request(axios, basePath); });
|
|
23572
|
+
},
|
|
23573
|
+
/**
|
|
23574
|
+
* Update a promotion
|
|
23575
|
+
* @param {number} id Promo ID
|
|
23576
|
+
* @param {PromoModel} [promoModel] Promotion
|
|
23577
|
+
* @param {*} [options] Override http request option.
|
|
23578
|
+
* @throws {RequiredError}
|
|
23579
|
+
*/
|
|
23580
|
+
putGetPromo: function (id, promoModel, options) {
|
|
23581
|
+
return localVarFp.putGetPromo(id, promoModel, options).then(function (request) { return request(axios, basePath); });
|
|
23582
|
+
},
|
|
23583
|
+
};
|
|
23584
|
+
};
|
|
23585
|
+
exports.PromotionsApiFactory = PromotionsApiFactory;
|
|
23586
|
+
/**
|
|
23587
|
+
* PromotionsApi - object-oriented interface
|
|
23588
|
+
*/
|
|
23589
|
+
var PromotionsApi = /** @class */ (function (_super) {
|
|
23590
|
+
__extends(PromotionsApi, _super);
|
|
23591
|
+
function PromotionsApi() {
|
|
23592
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
23593
|
+
}
|
|
23594
|
+
/**
|
|
23595
|
+
* Get a promotion
|
|
23596
|
+
* @param {number} id Promo ID
|
|
23597
|
+
* @param {*} [options] Override http request option.
|
|
23598
|
+
* @throws {RequiredError}
|
|
23599
|
+
*/
|
|
23600
|
+
PromotionsApi.prototype.getGetPromo = function (id, options) {
|
|
23601
|
+
var _this = this;
|
|
23602
|
+
return (0, exports.PromotionsApiFp)(this.configuration).getGetPromo(id, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
23603
|
+
};
|
|
23604
|
+
/**
|
|
23605
|
+
* Get Promos
|
|
23606
|
+
* @param {number} [pageSize] Number Of Results
|
|
23607
|
+
* @param {number} [page] Page Number
|
|
23608
|
+
* @param {string} [search] Search
|
|
23609
|
+
* @param {boolean} [expired] Expired
|
|
23610
|
+
* @param {*} [options] Override http request option.
|
|
23611
|
+
* @throws {RequiredError}
|
|
23612
|
+
*/
|
|
23613
|
+
PromotionsApi.prototype.getGetPromos = function (pageSize, page, search, expired, options) {
|
|
23614
|
+
var _this = this;
|
|
23615
|
+
return (0, exports.PromotionsApiFp)(this.configuration).getGetPromos(pageSize, page, search, expired, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
23616
|
+
};
|
|
23617
|
+
/**
|
|
23618
|
+
* Create a promotion
|
|
23619
|
+
* @param {PromoModel} [promoModel] Promotion
|
|
23620
|
+
* @param {*} [options] Override http request option.
|
|
23621
|
+
* @throws {RequiredError}
|
|
23622
|
+
*/
|
|
23623
|
+
PromotionsApi.prototype.postGetPromos = function (promoModel, options) {
|
|
23624
|
+
var _this = this;
|
|
23625
|
+
return (0, exports.PromotionsApiFp)(this.configuration).postGetPromos(promoModel, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
23626
|
+
};
|
|
23627
|
+
/**
|
|
23628
|
+
* Update a promotion
|
|
23629
|
+
* @param {number} id Promo ID
|
|
23630
|
+
* @param {PromoModel} [promoModel] Promotion
|
|
23631
|
+
* @param {*} [options] Override http request option.
|
|
23632
|
+
* @throws {RequiredError}
|
|
23633
|
+
*/
|
|
23634
|
+
PromotionsApi.prototype.putGetPromo = function (id, promoModel, options) {
|
|
23635
|
+
var _this = this;
|
|
23636
|
+
return (0, exports.PromotionsApiFp)(this.configuration).putGetPromo(id, promoModel, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
23637
|
+
};
|
|
23638
|
+
return PromotionsApi;
|
|
23639
|
+
}(base_1.BaseAPI));
|
|
23640
|
+
exports.PromotionsApi = PromotionsApi;
|
|
23265
23641
|
/**
|
|
23266
23642
|
* ProspectsApi - axios parameter creator
|
|
23267
23643
|
*/
|
package/docs/PromoCodesEntity.md
CHANGED
|
@@ -9,14 +9,14 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**id** | **number** | id | [optional] [default to undefined]
|
|
10
10
|
**code** | **string** | code | [optional] [default to undefined]
|
|
11
11
|
**description** | **string** | description | [optional] [default to undefined]
|
|
12
|
-
**
|
|
13
|
-
**
|
|
14
|
-
**expiry** | **string** | expiry | [optional] [default to undefined]
|
|
12
|
+
**startDate** | **string** | start | [optional] [default to undefined]
|
|
13
|
+
**endDate** | **string** | expiry | [optional] [default to undefined]
|
|
15
14
|
**customerLimit** | **number** | customerLimit | [optional] [default to undefined]
|
|
16
15
|
**globalLimit** | **number** | globalLimit | [optional] [default to undefined]
|
|
17
|
-
**orderRestrictions** | **string
|
|
18
|
-
**includeDistribution** | **
|
|
19
|
-
**distributionOnly** | **
|
|
16
|
+
**orderRestrictions** | **Array<string>** | orderRestrictions | [optional] [default to undefined]
|
|
17
|
+
**includeDistribution** | **boolean** | includeDistribution | [optional] [default to undefined]
|
|
18
|
+
**distributionOnly** | **boolean** | distributionOnly | [optional] [default to undefined]
|
|
19
|
+
**nfr** | **boolean** | nfr | [optional] [default to undefined]
|
|
20
20
|
**note** | **string** | note | [optional] [default to undefined]
|
|
21
21
|
|
|
22
22
|
## Example
|
|
@@ -28,14 +28,14 @@ const instance: PromoCodesEntity = {
|
|
|
28
28
|
id,
|
|
29
29
|
code,
|
|
30
30
|
description,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
expiry,
|
|
31
|
+
startDate,
|
|
32
|
+
endDate,
|
|
34
33
|
customerLimit,
|
|
35
34
|
globalLimit,
|
|
36
35
|
orderRestrictions,
|
|
37
36
|
includeDistribution,
|
|
38
37
|
distributionOnly,
|
|
38
|
+
nfr,
|
|
39
39
|
note,
|
|
40
40
|
};
|
|
41
41
|
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# PromoItemModel
|
|
2
|
+
|
|
3
|
+
Promo Item
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **number** | id | [optional] [default to undefined]
|
|
10
|
+
**promoId** | **number** | promoId | [optional] [default to undefined]
|
|
11
|
+
**price** | **number** | price | [optional] [default to undefined]
|
|
12
|
+
**discount** | **number** | discount | [optional] [default to undefined]
|
|
13
|
+
**sku** | **string** | sku | [optional] [default to undefined]
|
|
14
|
+
**quantity** | **number** | quantity | [optional] [default to undefined]
|
|
15
|
+
**bulkQuantity** | **number** | bulkQuantity | [optional] [default to undefined]
|
|
16
|
+
**bulkAdd** | **number** | bulkAdd | [optional] [default to undefined]
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { PromoItemModel } from 'yellowgrid-api-ts';
|
|
22
|
+
|
|
23
|
+
const instance: PromoItemModel = {
|
|
24
|
+
id,
|
|
25
|
+
promoId,
|
|
26
|
+
price,
|
|
27
|
+
discount,
|
|
28
|
+
sku,
|
|
29
|
+
quantity,
|
|
30
|
+
bulkQuantity,
|
|
31
|
+
bulkAdd,
|
|
32
|
+
};
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# PromoModel
|
|
2
|
+
|
|
3
|
+
Promotion
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **number** | id | [optional] [default to undefined]
|
|
10
|
+
**code** | **string** | code | [optional] [default to undefined]
|
|
11
|
+
**description** | **string** | description | [optional] [default to undefined]
|
|
12
|
+
**startDate** | **string** | start | [optional] [default to undefined]
|
|
13
|
+
**endDate** | **string** | expiry | [optional] [default to undefined]
|
|
14
|
+
**customerLimit** | **number** | customerLimit | [optional] [default to undefined]
|
|
15
|
+
**globalLimit** | **number** | globalLimit | [optional] [default to undefined]
|
|
16
|
+
**orderRestrictions** | **Array<string>** | orderRestrictions | [optional] [default to undefined]
|
|
17
|
+
**includeDistribution** | **boolean** | includeDistribution | [optional] [default to undefined]
|
|
18
|
+
**distributionOnly** | **boolean** | distributionOnly | [optional] [default to undefined]
|
|
19
|
+
**nfr** | **boolean** | nfr | [optional] [default to undefined]
|
|
20
|
+
**note** | **string** | note | [optional] [default to undefined]
|
|
21
|
+
**items** | [**Array<PromoItemModel>**](PromoItemModel.md) | Items | [optional] [default to undefined]
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { PromoModel } from 'yellowgrid-api-ts';
|
|
27
|
+
|
|
28
|
+
const instance: PromoModel = {
|
|
29
|
+
id,
|
|
30
|
+
code,
|
|
31
|
+
description,
|
|
32
|
+
startDate,
|
|
33
|
+
endDate,
|
|
34
|
+
customerLimit,
|
|
35
|
+
globalLimit,
|
|
36
|
+
orderRestrictions,
|
|
37
|
+
includeDistribution,
|
|
38
|
+
distributionOnly,
|
|
39
|
+
nfr,
|
|
40
|
+
note,
|
|
41
|
+
items,
|
|
42
|
+
};
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# PromoSummariesModel
|
|
2
|
+
|
|
3
|
+
Promotions
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**results** | [**Array<PromoSummaryDTO>**](PromoSummaryDTO.md) | Results | [optional] [default to undefined]
|
|
10
|
+
**page** | **number** | Page | [optional] [default to undefined]
|
|
11
|
+
**perPage** | **number** | Per Page | [optional] [default to undefined]
|
|
12
|
+
**totalResults** | **number** | Total Results | [optional] [default to undefined]
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { PromoSummariesModel } from 'yellowgrid-api-ts';
|
|
18
|
+
|
|
19
|
+
const instance: PromoSummariesModel = {
|
|
20
|
+
results,
|
|
21
|
+
page,
|
|
22
|
+
perPage,
|
|
23
|
+
totalResults,
|
|
24
|
+
};
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# PromoSummaryDTO
|
|
2
|
+
|
|
3
|
+
Promo Summary
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **number** | ID | [optional] [default to undefined]
|
|
10
|
+
**description** | **string** | Description | [optional] [default to undefined]
|
|
11
|
+
**code** | **string** | Promo Code | [optional] [default to undefined]
|
|
12
|
+
**startDate** | **string** | Start Date | [optional] [default to undefined]
|
|
13
|
+
**endDate** | **string** | End Date | [optional] [default to undefined]
|
|
14
|
+
**orders** | **number** | Orders | [optional] [default to undefined]
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { PromoSummaryDTO } from 'yellowgrid-api-ts';
|
|
20
|
+
|
|
21
|
+
const instance: PromoSummaryDTO = {
|
|
22
|
+
id,
|
|
23
|
+
description,
|
|
24
|
+
code,
|
|
25
|
+
startDate,
|
|
26
|
+
endDate,
|
|
27
|
+
orders,
|
|
28
|
+
};
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|