hostinger-api-sdk 3.4.2 → 3.4.3
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 +2 -2
- package/api.ts +784 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +505 -1
- package/dist/api.js +551 -14
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +505 -1
- package/dist/esm/api.js +534 -1
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/EcommerceV1WebhookStoreRequest.md +24 -0
- package/docs/EcommerceV1WebhookUpdateRequest.md +26 -0
- package/docs/EcommerceV1WebhookWebhookCreationResource.md +22 -0
- package/docs/EcommerceV1WebhookWebhookEndpointResource.md +44 -0
- package/docs/EcommerceV1WebhookWebhookListResource.md +20 -0
- package/docs/EcommerceV1WebhookWebhookResource.md +20 -0
- package/docs/EcommerceV1WebhookWebhookSecretResource.md +22 -0
- package/docs/EcommerceWebhooksApi.md +362 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/esm/api.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 3.4.
|
|
6
|
+
* API Version: 3.4.3
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -313,6 +313,53 @@ export const EcommerceV1StoreStoreCreationResourceSalesChannelTypeEnum = {
|
|
|
313
313
|
export const EcommerceV1StoreStoreRequestSalesChannelTypeEnum = {
|
|
314
314
|
Custom: 'custom'
|
|
315
315
|
};
|
|
316
|
+
export const EcommerceV1WebhookStoreRequestEventsEnum = {
|
|
317
|
+
OrderPlaced: 'order.placed',
|
|
318
|
+
OrderPaid: 'order.paid',
|
|
319
|
+
OrderCancelled: 'order.cancelled',
|
|
320
|
+
OrderRefunded: 'order.refunded',
|
|
321
|
+
OrderFulfilled: 'order.fulfilled',
|
|
322
|
+
FulfillmentCreated: 'fulfillment.created',
|
|
323
|
+
FulfillmentUpdated: 'fulfillment.updated',
|
|
324
|
+
FulfillmentCancelled: 'fulfillment.cancelled',
|
|
325
|
+
ProductCreated: 'product.created',
|
|
326
|
+
ProductUpdated: 'product.updated',
|
|
327
|
+
ProductDeleted: 'product.deleted'
|
|
328
|
+
};
|
|
329
|
+
export const EcommerceV1WebhookUpdateRequestEventsEnum = {
|
|
330
|
+
OrderPlaced: 'order.placed',
|
|
331
|
+
OrderPaid: 'order.paid',
|
|
332
|
+
OrderCancelled: 'order.cancelled',
|
|
333
|
+
OrderRefunded: 'order.refunded',
|
|
334
|
+
OrderFulfilled: 'order.fulfilled',
|
|
335
|
+
FulfillmentCreated: 'fulfillment.created',
|
|
336
|
+
FulfillmentUpdated: 'fulfillment.updated',
|
|
337
|
+
FulfillmentCancelled: 'fulfillment.cancelled',
|
|
338
|
+
ProductCreated: 'product.created',
|
|
339
|
+
ProductUpdated: 'product.updated',
|
|
340
|
+
ProductDeleted: 'product.deleted'
|
|
341
|
+
};
|
|
342
|
+
export const EcommerceV1WebhookWebhookEndpointResourceEventsEnum = {
|
|
343
|
+
OrderPlaced: 'order.placed',
|
|
344
|
+
OrderPaid: 'order.paid',
|
|
345
|
+
OrderCancelled: 'order.cancelled',
|
|
346
|
+
OrderRefunded: 'order.refunded',
|
|
347
|
+
OrderFulfilled: 'order.fulfilled',
|
|
348
|
+
FulfillmentCreated: 'fulfillment.created',
|
|
349
|
+
FulfillmentUpdated: 'fulfillment.updated',
|
|
350
|
+
FulfillmentCancelled: 'fulfillment.cancelled',
|
|
351
|
+
ProductCreated: 'product.created',
|
|
352
|
+
ProductUpdated: 'product.updated',
|
|
353
|
+
ProductDeleted: 'product.deleted'
|
|
354
|
+
};
|
|
355
|
+
export const EcommerceV1WebhookWebhookEndpointResourceDisabledReasonEnum = {
|
|
356
|
+
MerchantDisabled: 'merchant_disabled',
|
|
357
|
+
StoreTransferred: 'store_transferred',
|
|
358
|
+
StoreSuspended: 'store_suspended',
|
|
359
|
+
StoreDeleted: 'store_deleted',
|
|
360
|
+
ReceiverGone: 'receiver_gone',
|
|
361
|
+
ReceiverFailing: 'receiver_failing'
|
|
362
|
+
};
|
|
316
363
|
export const GPUV1ExposedServiceExposedServiceResourceProtocolEnum = {
|
|
317
364
|
Tcp: 'tcp',
|
|
318
365
|
Udp: 'udp'
|
|
@@ -12392,6 +12439,492 @@ export class EcommerceStoresApi extends BaseAPI {
|
|
|
12392
12439
|
return EcommerceStoresApiFp(this.configuration).getStoresV1(page, options).then((request) => request(this.axios, this.basePath));
|
|
12393
12440
|
}
|
|
12394
12441
|
}
|
|
12442
|
+
/**
|
|
12443
|
+
* EcommerceWebhooksApi - axios parameter creator
|
|
12444
|
+
* @export
|
|
12445
|
+
*/
|
|
12446
|
+
export const EcommerceWebhooksApiAxiosParamCreator = function (configuration) {
|
|
12447
|
+
return {
|
|
12448
|
+
/**
|
|
12449
|
+
* Create an enabled subscription for your store to receive ecommerce events in external automation systems. Save the whsec_ signing secret securely; it is returned once. Up to ten endpoints, including disabled endpoints, may exist per store. Deliveries follow Standard Webhooks: verify the webhook-id, webhook-timestamp and webhook-signature headers against the raw body with an official Standard Webhooks library before parsing. Events can arrive out of order or more than once; deduplicate by event id. 400: the URL is not a public destination, or webhook_sales_channel_invalid (a channel ID does not belong to this store). 409 codes: webhook_endpoint_limit_reached, webhook_store_inactive, webhook_endpoint_catalog_busy (a catalog change is in progress; retry). Errors return the upstream code in `message`, as `[Ecommerce:<code>] <reason>`.
|
|
12450
|
+
* @summary Create an ecommerce webhook
|
|
12451
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12452
|
+
* @param {EcommerceV1WebhookStoreRequest} ecommerceV1WebhookStoreRequest
|
|
12453
|
+
* @param {*} [options] Override http request option.
|
|
12454
|
+
* @throws {RequiredError}
|
|
12455
|
+
*/
|
|
12456
|
+
createAnEcommerceWebhookV1: (storeId_1, ecommerceV1WebhookStoreRequest_1, ...args_1) => __awaiter(this, [storeId_1, ecommerceV1WebhookStoreRequest_1, ...args_1], void 0, function* (storeId, ecommerceV1WebhookStoreRequest, options = {}) {
|
|
12457
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
12458
|
+
assertParamExists('createAnEcommerceWebhookV1', 'storeId', storeId);
|
|
12459
|
+
// verify required parameter 'ecommerceV1WebhookStoreRequest' is not null or undefined
|
|
12460
|
+
assertParamExists('createAnEcommerceWebhookV1', 'ecommerceV1WebhookStoreRequest', ecommerceV1WebhookStoreRequest);
|
|
12461
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/webhooks`
|
|
12462
|
+
.replace(`{${"store_id"}}`, encodePathParam('storeId', storeId));
|
|
12463
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12464
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12465
|
+
let baseOptions;
|
|
12466
|
+
if (configuration) {
|
|
12467
|
+
baseOptions = configuration.baseOptions;
|
|
12468
|
+
}
|
|
12469
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
12470
|
+
const localVarHeaderParameter = {};
|
|
12471
|
+
const localVarQueryParameter = {};
|
|
12472
|
+
// authentication apiToken required
|
|
12473
|
+
// http bearer authentication required
|
|
12474
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12475
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
12476
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12477
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12478
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12479
|
+
localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1WebhookStoreRequest, localVarRequestOptions, configuration);
|
|
12480
|
+
return {
|
|
12481
|
+
url: toPathString(localVarUrlObj),
|
|
12482
|
+
options: localVarRequestOptions,
|
|
12483
|
+
};
|
|
12484
|
+
}),
|
|
12485
|
+
/**
|
|
12486
|
+
* Delete a subscription owned by your store, retaining delivery audit records.
|
|
12487
|
+
* @summary Delete an ecommerce webhook
|
|
12488
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12489
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
12490
|
+
* @param {*} [options] Override http request option.
|
|
12491
|
+
* @throws {RequiredError}
|
|
12492
|
+
*/
|
|
12493
|
+
deleteAnEcommerceWebhookV1: (storeId_1, endpointId_1, ...args_1) => __awaiter(this, [storeId_1, endpointId_1, ...args_1], void 0, function* (storeId, endpointId, options = {}) {
|
|
12494
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
12495
|
+
assertParamExists('deleteAnEcommerceWebhookV1', 'storeId', storeId);
|
|
12496
|
+
// verify required parameter 'endpointId' is not null or undefined
|
|
12497
|
+
assertParamExists('deleteAnEcommerceWebhookV1', 'endpointId', endpointId);
|
|
12498
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/webhooks/{endpoint_id}`
|
|
12499
|
+
.replace(`{${"store_id"}}`, encodePathParam('storeId', storeId))
|
|
12500
|
+
.replace(`{${"endpoint_id"}}`, encodePathParam('endpointId', endpointId));
|
|
12501
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12502
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12503
|
+
let baseOptions;
|
|
12504
|
+
if (configuration) {
|
|
12505
|
+
baseOptions = configuration.baseOptions;
|
|
12506
|
+
}
|
|
12507
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
12508
|
+
const localVarHeaderParameter = {};
|
|
12509
|
+
const localVarQueryParameter = {};
|
|
12510
|
+
// authentication apiToken required
|
|
12511
|
+
// http bearer authentication required
|
|
12512
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12513
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12514
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12515
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12516
|
+
return {
|
|
12517
|
+
url: toPathString(localVarUrlObj),
|
|
12518
|
+
options: localVarRequestOptions,
|
|
12519
|
+
};
|
|
12520
|
+
}),
|
|
12521
|
+
/**
|
|
12522
|
+
* Get a subscription owned by your store, without signing secrets.
|
|
12523
|
+
* @summary Get an ecommerce webhook
|
|
12524
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12525
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
12526
|
+
* @param {*} [options] Override http request option.
|
|
12527
|
+
* @throws {RequiredError}
|
|
12528
|
+
*/
|
|
12529
|
+
getAnEcommerceWebhookV1: (storeId_1, endpointId_1, ...args_1) => __awaiter(this, [storeId_1, endpointId_1, ...args_1], void 0, function* (storeId, endpointId, options = {}) {
|
|
12530
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
12531
|
+
assertParamExists('getAnEcommerceWebhookV1', 'storeId', storeId);
|
|
12532
|
+
// verify required parameter 'endpointId' is not null or undefined
|
|
12533
|
+
assertParamExists('getAnEcommerceWebhookV1', 'endpointId', endpointId);
|
|
12534
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/webhooks/{endpoint_id}`
|
|
12535
|
+
.replace(`{${"store_id"}}`, encodePathParam('storeId', storeId))
|
|
12536
|
+
.replace(`{${"endpoint_id"}}`, encodePathParam('endpointId', endpointId));
|
|
12537
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12538
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12539
|
+
let baseOptions;
|
|
12540
|
+
if (configuration) {
|
|
12541
|
+
baseOptions = configuration.baseOptions;
|
|
12542
|
+
}
|
|
12543
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
12544
|
+
const localVarHeaderParameter = {};
|
|
12545
|
+
const localVarQueryParameter = {};
|
|
12546
|
+
// authentication apiToken required
|
|
12547
|
+
// http bearer authentication required
|
|
12548
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12549
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12550
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12551
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12552
|
+
return {
|
|
12553
|
+
url: toPathString(localVarUrlObj),
|
|
12554
|
+
options: localVarRequestOptions,
|
|
12555
|
+
};
|
|
12556
|
+
}),
|
|
12557
|
+
/**
|
|
12558
|
+
* List your store\'s subscriptions for external automation systems, without signing secrets.
|
|
12559
|
+
* @summary List ecommerce webhooks
|
|
12560
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12561
|
+
* @param {*} [options] Override http request option.
|
|
12562
|
+
* @throws {RequiredError}
|
|
12563
|
+
*/
|
|
12564
|
+
listEcommerceWebhooksV1: (storeId_1, ...args_1) => __awaiter(this, [storeId_1, ...args_1], void 0, function* (storeId, options = {}) {
|
|
12565
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
12566
|
+
assertParamExists('listEcommerceWebhooksV1', 'storeId', storeId);
|
|
12567
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/webhooks`
|
|
12568
|
+
.replace(`{${"store_id"}}`, encodePathParam('storeId', storeId));
|
|
12569
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12570
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12571
|
+
let baseOptions;
|
|
12572
|
+
if (configuration) {
|
|
12573
|
+
baseOptions = configuration.baseOptions;
|
|
12574
|
+
}
|
|
12575
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
12576
|
+
const localVarHeaderParameter = {};
|
|
12577
|
+
const localVarQueryParameter = {};
|
|
12578
|
+
// authentication apiToken required
|
|
12579
|
+
// http bearer authentication required
|
|
12580
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12581
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12582
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12583
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12584
|
+
return {
|
|
12585
|
+
url: toPathString(localVarUrlObj),
|
|
12586
|
+
options: localVarRequestOptions,
|
|
12587
|
+
};
|
|
12588
|
+
}),
|
|
12589
|
+
/**
|
|
12590
|
+
* Explicitly rotate the signing secret of an enabled endpoint on an active store. Save the new secret securely. Prior secrets retain their original 24-hour overlap deadlines. Repeated calls create distinct secrets, up to five live secrets. Wait for an old secret to expire at the limit. After a lost response, explicitly rotate again; stored secrets cannot be retrieved. No daily renewal is required. 409 codes: webhook_endpoint_disabled (endpoint is disabled or revoked), webhook_store_inactive, webhook_secret_rotation_limit_reached (five live secrets). Errors return the upstream code in `message`, as `[Ecommerce:<code>] <reason>`.
|
|
12591
|
+
* @summary Rotate an ecommerce webhook secret
|
|
12592
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12593
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
12594
|
+
* @param {*} [options] Override http request option.
|
|
12595
|
+
* @throws {RequiredError}
|
|
12596
|
+
*/
|
|
12597
|
+
rotateAnEcommerceWebhookSecretV1: (storeId_1, endpointId_1, ...args_1) => __awaiter(this, [storeId_1, endpointId_1, ...args_1], void 0, function* (storeId, endpointId, options = {}) {
|
|
12598
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
12599
|
+
assertParamExists('rotateAnEcommerceWebhookSecretV1', 'storeId', storeId);
|
|
12600
|
+
// verify required parameter 'endpointId' is not null or undefined
|
|
12601
|
+
assertParamExists('rotateAnEcommerceWebhookSecretV1', 'endpointId', endpointId);
|
|
12602
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/webhooks/{endpoint_id}/rotate-secret`
|
|
12603
|
+
.replace(`{${"store_id"}}`, encodePathParam('storeId', storeId))
|
|
12604
|
+
.replace(`{${"endpoint_id"}}`, encodePathParam('endpointId', endpointId));
|
|
12605
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12606
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12607
|
+
let baseOptions;
|
|
12608
|
+
if (configuration) {
|
|
12609
|
+
baseOptions = configuration.baseOptions;
|
|
12610
|
+
}
|
|
12611
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
12612
|
+
const localVarHeaderParameter = {};
|
|
12613
|
+
const localVarQueryParameter = {};
|
|
12614
|
+
// authentication apiToken required
|
|
12615
|
+
// http bearer authentication required
|
|
12616
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12617
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12618
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12619
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12620
|
+
return {
|
|
12621
|
+
url: toPathString(localVarUrlObj),
|
|
12622
|
+
options: localVarRequestOptions,
|
|
12623
|
+
};
|
|
12624
|
+
}),
|
|
12625
|
+
/**
|
|
12626
|
+
* Change the receiver, events, channel filter or enabled state. Omitted fields are preserved; a null channel filter restores store-wide delivery. Endpoints disabled automatically after a 410 Gone (receiver_gone) or persistent delivery failures (receiver_failing) resume with enabled: true; events from the disabled period are not sent. Lifecycle-revoked endpoints cannot be enabled again: delete them and create fresh subscriptions after recovery. 400 codes: webhook_destination_not_allowed (the new URL, or the saved URL when enabling, is not a public destination), webhook_sales_channel_invalid. 409 codes: webhook_endpoint_revoked, webhook_store_inactive, webhook_endpoint_catalog_busy (retry). Errors return the upstream code in `message`, as `[Ecommerce:<code>] <reason>`.
|
|
12627
|
+
* @summary Update an ecommerce webhook
|
|
12628
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12629
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
12630
|
+
* @param {EcommerceV1WebhookUpdateRequest} ecommerceV1WebhookUpdateRequest
|
|
12631
|
+
* @param {*} [options] Override http request option.
|
|
12632
|
+
* @throws {RequiredError}
|
|
12633
|
+
*/
|
|
12634
|
+
updateAnEcommerceWebhookV1: (storeId_1, endpointId_1, ecommerceV1WebhookUpdateRequest_1, ...args_1) => __awaiter(this, [storeId_1, endpointId_1, ecommerceV1WebhookUpdateRequest_1, ...args_1], void 0, function* (storeId, endpointId, ecommerceV1WebhookUpdateRequest, options = {}) {
|
|
12635
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
12636
|
+
assertParamExists('updateAnEcommerceWebhookV1', 'storeId', storeId);
|
|
12637
|
+
// verify required parameter 'endpointId' is not null or undefined
|
|
12638
|
+
assertParamExists('updateAnEcommerceWebhookV1', 'endpointId', endpointId);
|
|
12639
|
+
// verify required parameter 'ecommerceV1WebhookUpdateRequest' is not null or undefined
|
|
12640
|
+
assertParamExists('updateAnEcommerceWebhookV1', 'ecommerceV1WebhookUpdateRequest', ecommerceV1WebhookUpdateRequest);
|
|
12641
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/webhooks/{endpoint_id}`
|
|
12642
|
+
.replace(`{${"store_id"}}`, encodePathParam('storeId', storeId))
|
|
12643
|
+
.replace(`{${"endpoint_id"}}`, encodePathParam('endpointId', endpointId));
|
|
12644
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12645
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12646
|
+
let baseOptions;
|
|
12647
|
+
if (configuration) {
|
|
12648
|
+
baseOptions = configuration.baseOptions;
|
|
12649
|
+
}
|
|
12650
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
12651
|
+
const localVarHeaderParameter = {};
|
|
12652
|
+
const localVarQueryParameter = {};
|
|
12653
|
+
// authentication apiToken required
|
|
12654
|
+
// http bearer authentication required
|
|
12655
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12656
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
12657
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12658
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12659
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12660
|
+
localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1WebhookUpdateRequest, localVarRequestOptions, configuration);
|
|
12661
|
+
return {
|
|
12662
|
+
url: toPathString(localVarUrlObj),
|
|
12663
|
+
options: localVarRequestOptions,
|
|
12664
|
+
};
|
|
12665
|
+
}),
|
|
12666
|
+
};
|
|
12667
|
+
};
|
|
12668
|
+
/**
|
|
12669
|
+
* EcommerceWebhooksApi - functional programming interface
|
|
12670
|
+
* @export
|
|
12671
|
+
*/
|
|
12672
|
+
export const EcommerceWebhooksApiFp = function (configuration) {
|
|
12673
|
+
const localVarAxiosParamCreator = EcommerceWebhooksApiAxiosParamCreator(configuration);
|
|
12674
|
+
return {
|
|
12675
|
+
/**
|
|
12676
|
+
* Create an enabled subscription for your store to receive ecommerce events in external automation systems. Save the whsec_ signing secret securely; it is returned once. Up to ten endpoints, including disabled endpoints, may exist per store. Deliveries follow Standard Webhooks: verify the webhook-id, webhook-timestamp and webhook-signature headers against the raw body with an official Standard Webhooks library before parsing. Events can arrive out of order or more than once; deduplicate by event id. 400: the URL is not a public destination, or webhook_sales_channel_invalid (a channel ID does not belong to this store). 409 codes: webhook_endpoint_limit_reached, webhook_store_inactive, webhook_endpoint_catalog_busy (a catalog change is in progress; retry). Errors return the upstream code in `message`, as `[Ecommerce:<code>] <reason>`.
|
|
12677
|
+
* @summary Create an ecommerce webhook
|
|
12678
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12679
|
+
* @param {EcommerceV1WebhookStoreRequest} ecommerceV1WebhookStoreRequest
|
|
12680
|
+
* @param {*} [options] Override http request option.
|
|
12681
|
+
* @throws {RequiredError}
|
|
12682
|
+
*/
|
|
12683
|
+
createAnEcommerceWebhookV1(storeId, ecommerceV1WebhookStoreRequest, options) {
|
|
12684
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12685
|
+
var _a, _b;
|
|
12686
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createAnEcommerceWebhookV1(storeId, ecommerceV1WebhookStoreRequest, options);
|
|
12687
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceWebhooksApi.createAnEcommerceWebhookV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12688
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12689
|
+
});
|
|
12690
|
+
},
|
|
12691
|
+
/**
|
|
12692
|
+
* Delete a subscription owned by your store, retaining delivery audit records.
|
|
12693
|
+
* @summary Delete an ecommerce webhook
|
|
12694
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12695
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
12696
|
+
* @param {*} [options] Override http request option.
|
|
12697
|
+
* @throws {RequiredError}
|
|
12698
|
+
*/
|
|
12699
|
+
deleteAnEcommerceWebhookV1(storeId, endpointId, options) {
|
|
12700
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12701
|
+
var _a, _b;
|
|
12702
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteAnEcommerceWebhookV1(storeId, endpointId, options);
|
|
12703
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceWebhooksApi.deleteAnEcommerceWebhookV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12704
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12705
|
+
});
|
|
12706
|
+
},
|
|
12707
|
+
/**
|
|
12708
|
+
* Get a subscription owned by your store, without signing secrets.
|
|
12709
|
+
* @summary Get an ecommerce webhook
|
|
12710
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12711
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
12712
|
+
* @param {*} [options] Override http request option.
|
|
12713
|
+
* @throws {RequiredError}
|
|
12714
|
+
*/
|
|
12715
|
+
getAnEcommerceWebhookV1(storeId, endpointId, options) {
|
|
12716
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12717
|
+
var _a, _b;
|
|
12718
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAnEcommerceWebhookV1(storeId, endpointId, options);
|
|
12719
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceWebhooksApi.getAnEcommerceWebhookV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12720
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12721
|
+
});
|
|
12722
|
+
},
|
|
12723
|
+
/**
|
|
12724
|
+
* List your store\'s subscriptions for external automation systems, without signing secrets.
|
|
12725
|
+
* @summary List ecommerce webhooks
|
|
12726
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12727
|
+
* @param {*} [options] Override http request option.
|
|
12728
|
+
* @throws {RequiredError}
|
|
12729
|
+
*/
|
|
12730
|
+
listEcommerceWebhooksV1(storeId, options) {
|
|
12731
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12732
|
+
var _a, _b;
|
|
12733
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listEcommerceWebhooksV1(storeId, options);
|
|
12734
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceWebhooksApi.listEcommerceWebhooksV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12735
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12736
|
+
});
|
|
12737
|
+
},
|
|
12738
|
+
/**
|
|
12739
|
+
* Explicitly rotate the signing secret of an enabled endpoint on an active store. Save the new secret securely. Prior secrets retain their original 24-hour overlap deadlines. Repeated calls create distinct secrets, up to five live secrets. Wait for an old secret to expire at the limit. After a lost response, explicitly rotate again; stored secrets cannot be retrieved. No daily renewal is required. 409 codes: webhook_endpoint_disabled (endpoint is disabled or revoked), webhook_store_inactive, webhook_secret_rotation_limit_reached (five live secrets). Errors return the upstream code in `message`, as `[Ecommerce:<code>] <reason>`.
|
|
12740
|
+
* @summary Rotate an ecommerce webhook secret
|
|
12741
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12742
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
12743
|
+
* @param {*} [options] Override http request option.
|
|
12744
|
+
* @throws {RequiredError}
|
|
12745
|
+
*/
|
|
12746
|
+
rotateAnEcommerceWebhookSecretV1(storeId, endpointId, options) {
|
|
12747
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12748
|
+
var _a, _b;
|
|
12749
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.rotateAnEcommerceWebhookSecretV1(storeId, endpointId, options);
|
|
12750
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceWebhooksApi.rotateAnEcommerceWebhookSecretV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12751
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12752
|
+
});
|
|
12753
|
+
},
|
|
12754
|
+
/**
|
|
12755
|
+
* Change the receiver, events, channel filter or enabled state. Omitted fields are preserved; a null channel filter restores store-wide delivery. Endpoints disabled automatically after a 410 Gone (receiver_gone) or persistent delivery failures (receiver_failing) resume with enabled: true; events from the disabled period are not sent. Lifecycle-revoked endpoints cannot be enabled again: delete them and create fresh subscriptions after recovery. 400 codes: webhook_destination_not_allowed (the new URL, or the saved URL when enabling, is not a public destination), webhook_sales_channel_invalid. 409 codes: webhook_endpoint_revoked, webhook_store_inactive, webhook_endpoint_catalog_busy (retry). Errors return the upstream code in `message`, as `[Ecommerce:<code>] <reason>`.
|
|
12756
|
+
* @summary Update an ecommerce webhook
|
|
12757
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12758
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
12759
|
+
* @param {EcommerceV1WebhookUpdateRequest} ecommerceV1WebhookUpdateRequest
|
|
12760
|
+
* @param {*} [options] Override http request option.
|
|
12761
|
+
* @throws {RequiredError}
|
|
12762
|
+
*/
|
|
12763
|
+
updateAnEcommerceWebhookV1(storeId, endpointId, ecommerceV1WebhookUpdateRequest, options) {
|
|
12764
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12765
|
+
var _a, _b;
|
|
12766
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateAnEcommerceWebhookV1(storeId, endpointId, ecommerceV1WebhookUpdateRequest, options);
|
|
12767
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceWebhooksApi.updateAnEcommerceWebhookV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12768
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12769
|
+
});
|
|
12770
|
+
},
|
|
12771
|
+
};
|
|
12772
|
+
};
|
|
12773
|
+
/**
|
|
12774
|
+
* EcommerceWebhooksApi - factory interface
|
|
12775
|
+
* @export
|
|
12776
|
+
*/
|
|
12777
|
+
export const EcommerceWebhooksApiFactory = function (configuration, basePath, axios) {
|
|
12778
|
+
const localVarFp = EcommerceWebhooksApiFp(configuration);
|
|
12779
|
+
return {
|
|
12780
|
+
/**
|
|
12781
|
+
* Create an enabled subscription for your store to receive ecommerce events in external automation systems. Save the whsec_ signing secret securely; it is returned once. Up to ten endpoints, including disabled endpoints, may exist per store. Deliveries follow Standard Webhooks: verify the webhook-id, webhook-timestamp and webhook-signature headers against the raw body with an official Standard Webhooks library before parsing. Events can arrive out of order or more than once; deduplicate by event id. 400: the URL is not a public destination, or webhook_sales_channel_invalid (a channel ID does not belong to this store). 409 codes: webhook_endpoint_limit_reached, webhook_store_inactive, webhook_endpoint_catalog_busy (a catalog change is in progress; retry). Errors return the upstream code in `message`, as `[Ecommerce:<code>] <reason>`.
|
|
12782
|
+
* @summary Create an ecommerce webhook
|
|
12783
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12784
|
+
* @param {EcommerceV1WebhookStoreRequest} ecommerceV1WebhookStoreRequest
|
|
12785
|
+
* @param {*} [options] Override http request option.
|
|
12786
|
+
* @throws {RequiredError}
|
|
12787
|
+
*/
|
|
12788
|
+
createAnEcommerceWebhookV1(storeId, ecommerceV1WebhookStoreRequest, options) {
|
|
12789
|
+
return localVarFp.createAnEcommerceWebhookV1(storeId, ecommerceV1WebhookStoreRequest, options).then((request) => request(axios, basePath));
|
|
12790
|
+
},
|
|
12791
|
+
/**
|
|
12792
|
+
* Delete a subscription owned by your store, retaining delivery audit records.
|
|
12793
|
+
* @summary Delete an ecommerce webhook
|
|
12794
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12795
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
12796
|
+
* @param {*} [options] Override http request option.
|
|
12797
|
+
* @throws {RequiredError}
|
|
12798
|
+
*/
|
|
12799
|
+
deleteAnEcommerceWebhookV1(storeId, endpointId, options) {
|
|
12800
|
+
return localVarFp.deleteAnEcommerceWebhookV1(storeId, endpointId, options).then((request) => request(axios, basePath));
|
|
12801
|
+
},
|
|
12802
|
+
/**
|
|
12803
|
+
* Get a subscription owned by your store, without signing secrets.
|
|
12804
|
+
* @summary Get an ecommerce webhook
|
|
12805
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12806
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
12807
|
+
* @param {*} [options] Override http request option.
|
|
12808
|
+
* @throws {RequiredError}
|
|
12809
|
+
*/
|
|
12810
|
+
getAnEcommerceWebhookV1(storeId, endpointId, options) {
|
|
12811
|
+
return localVarFp.getAnEcommerceWebhookV1(storeId, endpointId, options).then((request) => request(axios, basePath));
|
|
12812
|
+
},
|
|
12813
|
+
/**
|
|
12814
|
+
* List your store\'s subscriptions for external automation systems, without signing secrets.
|
|
12815
|
+
* @summary List ecommerce webhooks
|
|
12816
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12817
|
+
* @param {*} [options] Override http request option.
|
|
12818
|
+
* @throws {RequiredError}
|
|
12819
|
+
*/
|
|
12820
|
+
listEcommerceWebhooksV1(storeId, options) {
|
|
12821
|
+
return localVarFp.listEcommerceWebhooksV1(storeId, options).then((request) => request(axios, basePath));
|
|
12822
|
+
},
|
|
12823
|
+
/**
|
|
12824
|
+
* Explicitly rotate the signing secret of an enabled endpoint on an active store. Save the new secret securely. Prior secrets retain their original 24-hour overlap deadlines. Repeated calls create distinct secrets, up to five live secrets. Wait for an old secret to expire at the limit. After a lost response, explicitly rotate again; stored secrets cannot be retrieved. No daily renewal is required. 409 codes: webhook_endpoint_disabled (endpoint is disabled or revoked), webhook_store_inactive, webhook_secret_rotation_limit_reached (five live secrets). Errors return the upstream code in `message`, as `[Ecommerce:<code>] <reason>`.
|
|
12825
|
+
* @summary Rotate an ecommerce webhook secret
|
|
12826
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12827
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
12828
|
+
* @param {*} [options] Override http request option.
|
|
12829
|
+
* @throws {RequiredError}
|
|
12830
|
+
*/
|
|
12831
|
+
rotateAnEcommerceWebhookSecretV1(storeId, endpointId, options) {
|
|
12832
|
+
return localVarFp.rotateAnEcommerceWebhookSecretV1(storeId, endpointId, options).then((request) => request(axios, basePath));
|
|
12833
|
+
},
|
|
12834
|
+
/**
|
|
12835
|
+
* Change the receiver, events, channel filter or enabled state. Omitted fields are preserved; a null channel filter restores store-wide delivery. Endpoints disabled automatically after a 410 Gone (receiver_gone) or persistent delivery failures (receiver_failing) resume with enabled: true; events from the disabled period are not sent. Lifecycle-revoked endpoints cannot be enabled again: delete them and create fresh subscriptions after recovery. 400 codes: webhook_destination_not_allowed (the new URL, or the saved URL when enabling, is not a public destination), webhook_sales_channel_invalid. 409 codes: webhook_endpoint_revoked, webhook_store_inactive, webhook_endpoint_catalog_busy (retry). Errors return the upstream code in `message`, as `[Ecommerce:<code>] <reason>`.
|
|
12836
|
+
* @summary Update an ecommerce webhook
|
|
12837
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12838
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
12839
|
+
* @param {EcommerceV1WebhookUpdateRequest} ecommerceV1WebhookUpdateRequest
|
|
12840
|
+
* @param {*} [options] Override http request option.
|
|
12841
|
+
* @throws {RequiredError}
|
|
12842
|
+
*/
|
|
12843
|
+
updateAnEcommerceWebhookV1(storeId, endpointId, ecommerceV1WebhookUpdateRequest, options) {
|
|
12844
|
+
return localVarFp.updateAnEcommerceWebhookV1(storeId, endpointId, ecommerceV1WebhookUpdateRequest, options).then((request) => request(axios, basePath));
|
|
12845
|
+
},
|
|
12846
|
+
};
|
|
12847
|
+
};
|
|
12848
|
+
/**
|
|
12849
|
+
* EcommerceWebhooksApi - object-oriented interface
|
|
12850
|
+
* @export
|
|
12851
|
+
* @class EcommerceWebhooksApi
|
|
12852
|
+
* @extends {BaseAPI}
|
|
12853
|
+
*/
|
|
12854
|
+
export class EcommerceWebhooksApi extends BaseAPI {
|
|
12855
|
+
/**
|
|
12856
|
+
* Create an enabled subscription for your store to receive ecommerce events in external automation systems. Save the whsec_ signing secret securely; it is returned once. Up to ten endpoints, including disabled endpoints, may exist per store. Deliveries follow Standard Webhooks: verify the webhook-id, webhook-timestamp and webhook-signature headers against the raw body with an official Standard Webhooks library before parsing. Events can arrive out of order or more than once; deduplicate by event id. 400: the URL is not a public destination, or webhook_sales_channel_invalid (a channel ID does not belong to this store). 409 codes: webhook_endpoint_limit_reached, webhook_store_inactive, webhook_endpoint_catalog_busy (a catalog change is in progress; retry). Errors return the upstream code in `message`, as `[Ecommerce:<code>] <reason>`.
|
|
12857
|
+
* @summary Create an ecommerce webhook
|
|
12858
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12859
|
+
* @param {EcommerceV1WebhookStoreRequest} ecommerceV1WebhookStoreRequest
|
|
12860
|
+
* @param {*} [options] Override http request option.
|
|
12861
|
+
* @throws {RequiredError}
|
|
12862
|
+
* @memberof EcommerceWebhooksApi
|
|
12863
|
+
*/
|
|
12864
|
+
createAnEcommerceWebhookV1(storeId, ecommerceV1WebhookStoreRequest, options) {
|
|
12865
|
+
return EcommerceWebhooksApiFp(this.configuration).createAnEcommerceWebhookV1(storeId, ecommerceV1WebhookStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
12866
|
+
}
|
|
12867
|
+
/**
|
|
12868
|
+
* Delete a subscription owned by your store, retaining delivery audit records.
|
|
12869
|
+
* @summary Delete an ecommerce webhook
|
|
12870
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12871
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
12872
|
+
* @param {*} [options] Override http request option.
|
|
12873
|
+
* @throws {RequiredError}
|
|
12874
|
+
* @memberof EcommerceWebhooksApi
|
|
12875
|
+
*/
|
|
12876
|
+
deleteAnEcommerceWebhookV1(storeId, endpointId, options) {
|
|
12877
|
+
return EcommerceWebhooksApiFp(this.configuration).deleteAnEcommerceWebhookV1(storeId, endpointId, options).then((request) => request(this.axios, this.basePath));
|
|
12878
|
+
}
|
|
12879
|
+
/**
|
|
12880
|
+
* Get a subscription owned by your store, without signing secrets.
|
|
12881
|
+
* @summary Get an ecommerce webhook
|
|
12882
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12883
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
12884
|
+
* @param {*} [options] Override http request option.
|
|
12885
|
+
* @throws {RequiredError}
|
|
12886
|
+
* @memberof EcommerceWebhooksApi
|
|
12887
|
+
*/
|
|
12888
|
+
getAnEcommerceWebhookV1(storeId, endpointId, options) {
|
|
12889
|
+
return EcommerceWebhooksApiFp(this.configuration).getAnEcommerceWebhookV1(storeId, endpointId, options).then((request) => request(this.axios, this.basePath));
|
|
12890
|
+
}
|
|
12891
|
+
/**
|
|
12892
|
+
* List your store\'s subscriptions for external automation systems, without signing secrets.
|
|
12893
|
+
* @summary List ecommerce webhooks
|
|
12894
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12895
|
+
* @param {*} [options] Override http request option.
|
|
12896
|
+
* @throws {RequiredError}
|
|
12897
|
+
* @memberof EcommerceWebhooksApi
|
|
12898
|
+
*/
|
|
12899
|
+
listEcommerceWebhooksV1(storeId, options) {
|
|
12900
|
+
return EcommerceWebhooksApiFp(this.configuration).listEcommerceWebhooksV1(storeId, options).then((request) => request(this.axios, this.basePath));
|
|
12901
|
+
}
|
|
12902
|
+
/**
|
|
12903
|
+
* Explicitly rotate the signing secret of an enabled endpoint on an active store. Save the new secret securely. Prior secrets retain their original 24-hour overlap deadlines. Repeated calls create distinct secrets, up to five live secrets. Wait for an old secret to expire at the limit. After a lost response, explicitly rotate again; stored secrets cannot be retrieved. No daily renewal is required. 409 codes: webhook_endpoint_disabled (endpoint is disabled or revoked), webhook_store_inactive, webhook_secret_rotation_limit_reached (five live secrets). Errors return the upstream code in `message`, as `[Ecommerce:<code>] <reason>`.
|
|
12904
|
+
* @summary Rotate an ecommerce webhook secret
|
|
12905
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12906
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
12907
|
+
* @param {*} [options] Override http request option.
|
|
12908
|
+
* @throws {RequiredError}
|
|
12909
|
+
* @memberof EcommerceWebhooksApi
|
|
12910
|
+
*/
|
|
12911
|
+
rotateAnEcommerceWebhookSecretV1(storeId, endpointId, options) {
|
|
12912
|
+
return EcommerceWebhooksApiFp(this.configuration).rotateAnEcommerceWebhookSecretV1(storeId, endpointId, options).then((request) => request(this.axios, this.basePath));
|
|
12913
|
+
}
|
|
12914
|
+
/**
|
|
12915
|
+
* Change the receiver, events, channel filter or enabled state. Omitted fields are preserved; a null channel filter restores store-wide delivery. Endpoints disabled automatically after a 410 Gone (receiver_gone) or persistent delivery failures (receiver_failing) resume with enabled: true; events from the disabled period are not sent. Lifecycle-revoked endpoints cannot be enabled again: delete them and create fresh subscriptions after recovery. 400 codes: webhook_destination_not_allowed (the new URL, or the saved URL when enabling, is not a public destination), webhook_sales_channel_invalid. 409 codes: webhook_endpoint_revoked, webhook_store_inactive, webhook_endpoint_catalog_busy (retry). Errors return the upstream code in `message`, as `[Ecommerce:<code>] <reason>`.
|
|
12916
|
+
* @summary Update an ecommerce webhook
|
|
12917
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
12918
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
12919
|
+
* @param {EcommerceV1WebhookUpdateRequest} ecommerceV1WebhookUpdateRequest
|
|
12920
|
+
* @param {*} [options] Override http request option.
|
|
12921
|
+
* @throws {RequiredError}
|
|
12922
|
+
* @memberof EcommerceWebhooksApi
|
|
12923
|
+
*/
|
|
12924
|
+
updateAnEcommerceWebhookV1(storeId, endpointId, ecommerceV1WebhookUpdateRequest, options) {
|
|
12925
|
+
return EcommerceWebhooksApiFp(this.configuration).updateAnEcommerceWebhookV1(storeId, endpointId, ecommerceV1WebhookUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
12926
|
+
}
|
|
12927
|
+
}
|
|
12395
12928
|
/**
|
|
12396
12929
|
* GPUCatalogApi - axios parameter creator
|
|
12397
12930
|
* @export
|
package/dist/esm/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 3.4.
|
|
4
|
+
* API Version: 3.4.3
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/base.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 3.4.
|
|
6
|
+
* API Version: 3.4.3
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 3.4.
|
|
4
|
+
* API Version: 3.4.3
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/common.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 3.4.
|
|
6
|
+
* API Version: 3.4.3
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 3.4.
|
|
4
|
+
* API Version: 3.4.3
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 3.4.
|
|
6
|
+
* API Version: 3.4.3
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -13,7 +13,7 @@ export class Configuration {
|
|
|
13
13
|
var _a;
|
|
14
14
|
this.accessToken = param.accessToken;
|
|
15
15
|
this.basePath = param.basePath;
|
|
16
|
-
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/3.4.
|
|
16
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/3.4.3" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
17
17
|
this.formDataCtor = param.formDataCtor;
|
|
18
18
|
}
|
|
19
19
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 3.4.
|
|
4
|
+
* API Version: 3.4.3
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|