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/api.ts
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
|
|
@@ -7129,6 +7129,272 @@ export interface EcommerceV1VariantVariantResponseResource {
|
|
|
7129
7129
|
*/
|
|
7130
7130
|
'data': EcommerceV1VariantVariantResource;
|
|
7131
7131
|
}
|
|
7132
|
+
/**
|
|
7133
|
+
*
|
|
7134
|
+
* @export
|
|
7135
|
+
* @interface EcommerceV1WebhookStoreRequest
|
|
7136
|
+
*/
|
|
7137
|
+
export interface EcommerceV1WebhookStoreRequest {
|
|
7138
|
+
/**
|
|
7139
|
+
* HTTPS receiver on port 443, without credentials or a fragment. Must be a public destination: localhost, single-label and local-network names (.local, .home.arpa, .internal), Hostinger service domains and loopback, private, link-local or reserved IP addresses are rejected. Merchant-owned domains hosted by Hostinger are allowed.
|
|
7140
|
+
* @type {string}
|
|
7141
|
+
* @memberof EcommerceV1WebhookStoreRequest
|
|
7142
|
+
*/
|
|
7143
|
+
'url': string;
|
|
7144
|
+
/**
|
|
7145
|
+
* Event types to subscribe to. - `order.placed`: a customer places an order, before any online payment is completed. Orders paid online may not have an order number yet. - `order.paid`: an order becomes fully paid: an online payment is captured, a free order is placed or the merchant marks it as paid. Partial payments don\'t send it. - `order.cancelled`: an unpaid order is canceled, for example by the merchant, a connected sales channel or after a delayed payment fails. Paid orders can\'t be canceled, so a cancellation never involves a refund. - `order.refunded`: each time a full or partial refund is recorded, through the payment provider or manually. - `order.fulfilled`: a fulfillment leaves every item in the order fulfilled. Partial fulfillments send `fulfillment.created` instead. - `fulfillment.created`: each time items in an order are fulfilled, including partial fulfillments and digital items fulfilled automatically after payment. - `fulfillment.updated`: a fulfillment\'s tracking details change, or a connected shipping service or sales channel reports progress such as delivery. - `fulfillment.cancelled`: a fulfillment is canceled before it ships, for example when it is canceled or its shipping label is voided. - `product.created`: a product is added to the store, including drafts and products created in bulk. - `product.updated`: a product changes, including its details, variants, prices, stock, visibility or collections. Stock changes from orders also send it, so expect frequent events. - `product.deleted`: a product is deleted, individually or in bulk.
|
|
7146
|
+
* @type {Array<string>}
|
|
7147
|
+
* @memberof EcommerceV1WebhookStoreRequest
|
|
7148
|
+
*/
|
|
7149
|
+
'events': Array<EcommerceV1WebhookStoreRequestEventsEnum>;
|
|
7150
|
+
/**
|
|
7151
|
+
* Omit for store-wide delivery. IDs must belong to this store; empty arrays are invalid.
|
|
7152
|
+
* @type {Array<string>}
|
|
7153
|
+
* @memberof EcommerceV1WebhookStoreRequest
|
|
7154
|
+
*/
|
|
7155
|
+
'sales_channel_ids': Array<string>;
|
|
7156
|
+
}
|
|
7157
|
+
|
|
7158
|
+
export const EcommerceV1WebhookStoreRequestEventsEnum = {
|
|
7159
|
+
OrderPlaced: 'order.placed',
|
|
7160
|
+
OrderPaid: 'order.paid',
|
|
7161
|
+
OrderCancelled: 'order.cancelled',
|
|
7162
|
+
OrderRefunded: 'order.refunded',
|
|
7163
|
+
OrderFulfilled: 'order.fulfilled',
|
|
7164
|
+
FulfillmentCreated: 'fulfillment.created',
|
|
7165
|
+
FulfillmentUpdated: 'fulfillment.updated',
|
|
7166
|
+
FulfillmentCancelled: 'fulfillment.cancelled',
|
|
7167
|
+
ProductCreated: 'product.created',
|
|
7168
|
+
ProductUpdated: 'product.updated',
|
|
7169
|
+
ProductDeleted: 'product.deleted'
|
|
7170
|
+
} as const;
|
|
7171
|
+
|
|
7172
|
+
export type EcommerceV1WebhookStoreRequestEventsEnum = typeof EcommerceV1WebhookStoreRequestEventsEnum[keyof typeof EcommerceV1WebhookStoreRequestEventsEnum];
|
|
7173
|
+
|
|
7174
|
+
/**
|
|
7175
|
+
*
|
|
7176
|
+
* @export
|
|
7177
|
+
* @interface EcommerceV1WebhookUpdateRequest
|
|
7178
|
+
*/
|
|
7179
|
+
export interface EcommerceV1WebhookUpdateRequest {
|
|
7180
|
+
/**
|
|
7181
|
+
* HTTPS receiver on port 443, without credentials or a fragment. Omit to preserve. A changed URL must be a public destination under the same rules as creation; resending the saved URL unchanged is accepted.
|
|
7182
|
+
* @type {string}
|
|
7183
|
+
* @memberof EcommerceV1WebhookUpdateRequest
|
|
7184
|
+
*/
|
|
7185
|
+
'url': string;
|
|
7186
|
+
/**
|
|
7187
|
+
* Replacement event types. Omit to preserve. - `order.placed`: a customer places an order, before any online payment is completed. Orders paid online may not have an order number yet. - `order.paid`: an order becomes fully paid: an online payment is captured, a free order is placed or the merchant marks it as paid. Partial payments don\'t send it. - `order.cancelled`: an unpaid order is canceled, for example by the merchant, a connected sales channel or after a delayed payment fails. Paid orders can\'t be canceled, so a cancellation never involves a refund. - `order.refunded`: each time a full or partial refund is recorded, through the payment provider or manually. - `order.fulfilled`: a fulfillment leaves every item in the order fulfilled. Partial fulfillments send `fulfillment.created` instead. - `fulfillment.created`: each time items in an order are fulfilled, including partial fulfillments and digital items fulfilled automatically after payment. - `fulfillment.updated`: a fulfillment\'s tracking details change, or a connected shipping service or sales channel reports progress such as delivery. - `fulfillment.cancelled`: a fulfillment is canceled before it ships, for example when it is canceled or its shipping label is voided. - `product.created`: a product is added to the store, including drafts and products created in bulk. - `product.updated`: a product changes, including its details, variants, prices, stock, visibility or collections. Stock changes from orders also send it, so expect frequent events. - `product.deleted`: a product is deleted, individually or in bulk.
|
|
7188
|
+
* @type {Array<string>}
|
|
7189
|
+
* @memberof EcommerceV1WebhookUpdateRequest
|
|
7190
|
+
*/
|
|
7191
|
+
'events': Array<EcommerceV1WebhookUpdateRequestEventsEnum>;
|
|
7192
|
+
/**
|
|
7193
|
+
* Omit to preserve; null restores store-wide delivery. Empty or foreign-store IDs are invalid.
|
|
7194
|
+
* @type {Array<string>}
|
|
7195
|
+
* @memberof EcommerceV1WebhookUpdateRequest
|
|
7196
|
+
*/
|
|
7197
|
+
'sales_channel_ids': Array<string> | null;
|
|
7198
|
+
/**
|
|
7199
|
+
* Merchant-disabled endpoints can be enabled again; lifecycle-revoked endpoints cannot.
|
|
7200
|
+
* @type {boolean}
|
|
7201
|
+
* @memberof EcommerceV1WebhookUpdateRequest
|
|
7202
|
+
*/
|
|
7203
|
+
'enabled': boolean;
|
|
7204
|
+
}
|
|
7205
|
+
|
|
7206
|
+
export const EcommerceV1WebhookUpdateRequestEventsEnum = {
|
|
7207
|
+
OrderPlaced: 'order.placed',
|
|
7208
|
+
OrderPaid: 'order.paid',
|
|
7209
|
+
OrderCancelled: 'order.cancelled',
|
|
7210
|
+
OrderRefunded: 'order.refunded',
|
|
7211
|
+
OrderFulfilled: 'order.fulfilled',
|
|
7212
|
+
FulfillmentCreated: 'fulfillment.created',
|
|
7213
|
+
FulfillmentUpdated: 'fulfillment.updated',
|
|
7214
|
+
FulfillmentCancelled: 'fulfillment.cancelled',
|
|
7215
|
+
ProductCreated: 'product.created',
|
|
7216
|
+
ProductUpdated: 'product.updated',
|
|
7217
|
+
ProductDeleted: 'product.deleted'
|
|
7218
|
+
} as const;
|
|
7219
|
+
|
|
7220
|
+
export type EcommerceV1WebhookUpdateRequestEventsEnum = typeof EcommerceV1WebhookUpdateRequestEventsEnum[keyof typeof EcommerceV1WebhookUpdateRequestEventsEnum];
|
|
7221
|
+
|
|
7222
|
+
/**
|
|
7223
|
+
*
|
|
7224
|
+
* @export
|
|
7225
|
+
* @interface EcommerceV1WebhookWebhookCreationResource
|
|
7226
|
+
*/
|
|
7227
|
+
export interface EcommerceV1WebhookWebhookCreationResource {
|
|
7228
|
+
/**
|
|
7229
|
+
*
|
|
7230
|
+
* @type {EcommerceV1WebhookWebhookEndpointResource}
|
|
7231
|
+
* @memberof EcommerceV1WebhookWebhookCreationResource
|
|
7232
|
+
*/
|
|
7233
|
+
'endpoint': EcommerceV1WebhookWebhookEndpointResource;
|
|
7234
|
+
/**
|
|
7235
|
+
* New whsec_ signing secret. Save securely.
|
|
7236
|
+
* @type {string}
|
|
7237
|
+
* @memberof EcommerceV1WebhookWebhookCreationResource
|
|
7238
|
+
*/
|
|
7239
|
+
'secret': string;
|
|
7240
|
+
}
|
|
7241
|
+
/**
|
|
7242
|
+
*
|
|
7243
|
+
* @export
|
|
7244
|
+
* @interface EcommerceV1WebhookWebhookEndpointResource
|
|
7245
|
+
*/
|
|
7246
|
+
export interface EcommerceV1WebhookWebhookEndpointResource {
|
|
7247
|
+
/**
|
|
7248
|
+
* Webhook endpoint ID.
|
|
7249
|
+
* @type {string}
|
|
7250
|
+
* @memberof EcommerceV1WebhookWebhookEndpointResource
|
|
7251
|
+
*/
|
|
7252
|
+
'id': string;
|
|
7253
|
+
/**
|
|
7254
|
+
* Owning store ID.
|
|
7255
|
+
* @type {string}
|
|
7256
|
+
* @memberof EcommerceV1WebhookWebhookEndpointResource
|
|
7257
|
+
*/
|
|
7258
|
+
'store_id': string;
|
|
7259
|
+
/**
|
|
7260
|
+
* HTTPS receiver URL.
|
|
7261
|
+
* @type {string}
|
|
7262
|
+
* @memberof EcommerceV1WebhookWebhookEndpointResource
|
|
7263
|
+
*/
|
|
7264
|
+
'url': string;
|
|
7265
|
+
/**
|
|
7266
|
+
* Subscribed event types. - `order.placed`: a customer places an order, before any online payment is completed. Orders paid online may not have an order number yet. - `order.paid`: an order becomes fully paid: an online payment is captured, a free order is placed or the merchant marks it as paid. Partial payments don\'t send it. - `order.cancelled`: an unpaid order is canceled, for example by the merchant, a connected sales channel or after a delayed payment fails. Paid orders can\'t be canceled, so a cancellation never involves a refund. - `order.refunded`: each time a full or partial refund is recorded, through the payment provider or manually. - `order.fulfilled`: a fulfillment leaves every item in the order fulfilled. Partial fulfillments send `fulfillment.created` instead. - `fulfillment.created`: each time items in an order are fulfilled, including partial fulfillments and digital items fulfilled automatically after payment. - `fulfillment.updated`: a fulfillment\'s tracking details change, or a connected shipping service or sales channel reports progress such as delivery. - `fulfillment.cancelled`: a fulfillment is canceled before it ships, for example when it is canceled or its shipping label is voided. - `product.created`: a product is added to the store, including drafts and products created in bulk. - `product.updated`: a product changes, including its details, variants, prices, stock, visibility or collections. Stock changes from orders also send it, so expect frequent events. - `product.deleted`: a product is deleted, individually or in bulk.
|
|
7267
|
+
* @type {Array<string>}
|
|
7268
|
+
* @memberof EcommerceV1WebhookWebhookEndpointResource
|
|
7269
|
+
*/
|
|
7270
|
+
'events': Array<EcommerceV1WebhookWebhookEndpointResourceEventsEnum>;
|
|
7271
|
+
/**
|
|
7272
|
+
* Channel filter; null means store-wide.
|
|
7273
|
+
* @type {Array<string>}
|
|
7274
|
+
* @memberof EcommerceV1WebhookWebhookEndpointResource
|
|
7275
|
+
*/
|
|
7276
|
+
'sales_channel_ids': Array<string> | null;
|
|
7277
|
+
/**
|
|
7278
|
+
* Whether delivery is enabled.
|
|
7279
|
+
* @type {boolean}
|
|
7280
|
+
* @memberof EcommerceV1WebhookWebhookEndpointResource
|
|
7281
|
+
*/
|
|
7282
|
+
'enabled': boolean;
|
|
7283
|
+
/**
|
|
7284
|
+
* Reason delivery was disabled. receiver_gone and receiver_failing are automatic health disables that can be resumed with enabled: true; store_* reasons are permanent revocations.
|
|
7285
|
+
* @type {string}
|
|
7286
|
+
* @memberof EcommerceV1WebhookWebhookEndpointResource
|
|
7287
|
+
*/
|
|
7288
|
+
'disabled_reason': EcommerceV1WebhookWebhookEndpointResourceDisabledReasonEnum | null;
|
|
7289
|
+
/**
|
|
7290
|
+
*
|
|
7291
|
+
* @type {string}
|
|
7292
|
+
* @memberof EcommerceV1WebhookWebhookEndpointResource
|
|
7293
|
+
*/
|
|
7294
|
+
'disabled_at': string | null;
|
|
7295
|
+
/**
|
|
7296
|
+
* Start of the current failure streak; null after a successful delivery attempt, a URL change or re-enabling.
|
|
7297
|
+
* @type {string}
|
|
7298
|
+
* @memberof EcommerceV1WebhookWebhookEndpointResource
|
|
7299
|
+
*/
|
|
7300
|
+
'failing_since': string | null;
|
|
7301
|
+
/**
|
|
7302
|
+
* When the latest delivery attempt started, whether or not it reached the receiver; null before any attempt.
|
|
7303
|
+
* @type {string}
|
|
7304
|
+
* @memberof EcommerceV1WebhookWebhookEndpointResource
|
|
7305
|
+
*/
|
|
7306
|
+
'last_attempted_at': string | null;
|
|
7307
|
+
/**
|
|
7308
|
+
* When the latest successful delivery completed; null before any success.
|
|
7309
|
+
* @type {string}
|
|
7310
|
+
* @memberof EcommerceV1WebhookWebhookEndpointResource
|
|
7311
|
+
*/
|
|
7312
|
+
'last_succeeded_at': string | null;
|
|
7313
|
+
/**
|
|
7314
|
+
*
|
|
7315
|
+
* @type {string}
|
|
7316
|
+
* @memberof EcommerceV1WebhookWebhookEndpointResource
|
|
7317
|
+
*/
|
|
7318
|
+
'created_at': string;
|
|
7319
|
+
/**
|
|
7320
|
+
*
|
|
7321
|
+
* @type {string}
|
|
7322
|
+
* @memberof EcommerceV1WebhookWebhookEndpointResource
|
|
7323
|
+
*/
|
|
7324
|
+
'updated_at': string;
|
|
7325
|
+
}
|
|
7326
|
+
|
|
7327
|
+
export const EcommerceV1WebhookWebhookEndpointResourceEventsEnum = {
|
|
7328
|
+
OrderPlaced: 'order.placed',
|
|
7329
|
+
OrderPaid: 'order.paid',
|
|
7330
|
+
OrderCancelled: 'order.cancelled',
|
|
7331
|
+
OrderRefunded: 'order.refunded',
|
|
7332
|
+
OrderFulfilled: 'order.fulfilled',
|
|
7333
|
+
FulfillmentCreated: 'fulfillment.created',
|
|
7334
|
+
FulfillmentUpdated: 'fulfillment.updated',
|
|
7335
|
+
FulfillmentCancelled: 'fulfillment.cancelled',
|
|
7336
|
+
ProductCreated: 'product.created',
|
|
7337
|
+
ProductUpdated: 'product.updated',
|
|
7338
|
+
ProductDeleted: 'product.deleted'
|
|
7339
|
+
} as const;
|
|
7340
|
+
|
|
7341
|
+
export type EcommerceV1WebhookWebhookEndpointResourceEventsEnum = typeof EcommerceV1WebhookWebhookEndpointResourceEventsEnum[keyof typeof EcommerceV1WebhookWebhookEndpointResourceEventsEnum];
|
|
7342
|
+
export const EcommerceV1WebhookWebhookEndpointResourceDisabledReasonEnum = {
|
|
7343
|
+
MerchantDisabled: 'merchant_disabled',
|
|
7344
|
+
StoreTransferred: 'store_transferred',
|
|
7345
|
+
StoreSuspended: 'store_suspended',
|
|
7346
|
+
StoreDeleted: 'store_deleted',
|
|
7347
|
+
ReceiverGone: 'receiver_gone',
|
|
7348
|
+
ReceiverFailing: 'receiver_failing'
|
|
7349
|
+
} as const;
|
|
7350
|
+
|
|
7351
|
+
export type EcommerceV1WebhookWebhookEndpointResourceDisabledReasonEnum = typeof EcommerceV1WebhookWebhookEndpointResourceDisabledReasonEnum[keyof typeof EcommerceV1WebhookWebhookEndpointResourceDisabledReasonEnum];
|
|
7352
|
+
|
|
7353
|
+
/**
|
|
7354
|
+
*
|
|
7355
|
+
* @export
|
|
7356
|
+
* @interface EcommerceV1WebhookWebhookListResource
|
|
7357
|
+
*/
|
|
7358
|
+
export interface EcommerceV1WebhookWebhookListResource {
|
|
7359
|
+
/**
|
|
7360
|
+
*
|
|
7361
|
+
* @type {Array<EcommerceV1WebhookWebhookEndpointResource>}
|
|
7362
|
+
* @memberof EcommerceV1WebhookWebhookListResource
|
|
7363
|
+
*/
|
|
7364
|
+
'endpoints': Array<EcommerceV1WebhookWebhookEndpointResource>;
|
|
7365
|
+
}
|
|
7366
|
+
/**
|
|
7367
|
+
*
|
|
7368
|
+
* @export
|
|
7369
|
+
* @interface EcommerceV1WebhookWebhookResource
|
|
7370
|
+
*/
|
|
7371
|
+
export interface EcommerceV1WebhookWebhookResource {
|
|
7372
|
+
/**
|
|
7373
|
+
*
|
|
7374
|
+
* @type {EcommerceV1WebhookWebhookEndpointResource}
|
|
7375
|
+
* @memberof EcommerceV1WebhookWebhookResource
|
|
7376
|
+
*/
|
|
7377
|
+
'endpoint': EcommerceV1WebhookWebhookEndpointResource;
|
|
7378
|
+
}
|
|
7379
|
+
/**
|
|
7380
|
+
*
|
|
7381
|
+
* @export
|
|
7382
|
+
* @interface EcommerceV1WebhookWebhookSecretResource
|
|
7383
|
+
*/
|
|
7384
|
+
export interface EcommerceV1WebhookWebhookSecretResource {
|
|
7385
|
+
/**
|
|
7386
|
+
*
|
|
7387
|
+
* @type {EcommerceV1WebhookWebhookEndpointResource}
|
|
7388
|
+
* @memberof EcommerceV1WebhookWebhookSecretResource
|
|
7389
|
+
*/
|
|
7390
|
+
'endpoint': EcommerceV1WebhookWebhookEndpointResource;
|
|
7391
|
+
/**
|
|
7392
|
+
* New whsec_ signing secret, returned only on create or rotation. Save securely.
|
|
7393
|
+
* @type {string}
|
|
7394
|
+
* @memberof EcommerceV1WebhookWebhookSecretResource
|
|
7395
|
+
*/
|
|
7396
|
+
'secret': string;
|
|
7397
|
+
}
|
|
7132
7398
|
/**
|
|
7133
7399
|
*
|
|
7134
7400
|
* @export
|
|
@@ -32015,6 +32281,523 @@ export class EcommerceStoresApi extends BaseAPI {
|
|
|
32015
32281
|
|
|
32016
32282
|
|
|
32017
32283
|
|
|
32284
|
+
/**
|
|
32285
|
+
* EcommerceWebhooksApi - axios parameter creator
|
|
32286
|
+
* @export
|
|
32287
|
+
*/
|
|
32288
|
+
export const EcommerceWebhooksApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
32289
|
+
return {
|
|
32290
|
+
/**
|
|
32291
|
+
* 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>`.
|
|
32292
|
+
* @summary Create an ecommerce webhook
|
|
32293
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32294
|
+
* @param {EcommerceV1WebhookStoreRequest} ecommerceV1WebhookStoreRequest
|
|
32295
|
+
* @param {*} [options] Override http request option.
|
|
32296
|
+
* @throws {RequiredError}
|
|
32297
|
+
*/
|
|
32298
|
+
createAnEcommerceWebhookV1: async (storeId: string, ecommerceV1WebhookStoreRequest: EcommerceV1WebhookStoreRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
32299
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
32300
|
+
assertParamExists('createAnEcommerceWebhookV1', 'storeId', storeId)
|
|
32301
|
+
// verify required parameter 'ecommerceV1WebhookStoreRequest' is not null or undefined
|
|
32302
|
+
assertParamExists('createAnEcommerceWebhookV1', 'ecommerceV1WebhookStoreRequest', ecommerceV1WebhookStoreRequest)
|
|
32303
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/webhooks`
|
|
32304
|
+
.replace(`{${"store_id"}}`, encodePathParam('storeId', storeId));
|
|
32305
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
32306
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
32307
|
+
let baseOptions;
|
|
32308
|
+
if (configuration) {
|
|
32309
|
+
baseOptions = configuration.baseOptions;
|
|
32310
|
+
}
|
|
32311
|
+
|
|
32312
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
32313
|
+
const localVarHeaderParameter = {} as any;
|
|
32314
|
+
const localVarQueryParameter = {} as any;
|
|
32315
|
+
|
|
32316
|
+
// authentication apiToken required
|
|
32317
|
+
// http bearer authentication required
|
|
32318
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
32319
|
+
|
|
32320
|
+
|
|
32321
|
+
|
|
32322
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
32323
|
+
|
|
32324
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
32325
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
32326
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
32327
|
+
localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1WebhookStoreRequest, localVarRequestOptions, configuration)
|
|
32328
|
+
|
|
32329
|
+
return {
|
|
32330
|
+
url: toPathString(localVarUrlObj),
|
|
32331
|
+
options: localVarRequestOptions,
|
|
32332
|
+
};
|
|
32333
|
+
},
|
|
32334
|
+
/**
|
|
32335
|
+
* Delete a subscription owned by your store, retaining delivery audit records.
|
|
32336
|
+
* @summary Delete an ecommerce webhook
|
|
32337
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32338
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
32339
|
+
* @param {*} [options] Override http request option.
|
|
32340
|
+
* @throws {RequiredError}
|
|
32341
|
+
*/
|
|
32342
|
+
deleteAnEcommerceWebhookV1: async (storeId: string, endpointId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
32343
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
32344
|
+
assertParamExists('deleteAnEcommerceWebhookV1', 'storeId', storeId)
|
|
32345
|
+
// verify required parameter 'endpointId' is not null or undefined
|
|
32346
|
+
assertParamExists('deleteAnEcommerceWebhookV1', 'endpointId', endpointId)
|
|
32347
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/webhooks/{endpoint_id}`
|
|
32348
|
+
.replace(`{${"store_id"}}`, encodePathParam('storeId', storeId))
|
|
32349
|
+
.replace(`{${"endpoint_id"}}`, encodePathParam('endpointId', endpointId));
|
|
32350
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
32351
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
32352
|
+
let baseOptions;
|
|
32353
|
+
if (configuration) {
|
|
32354
|
+
baseOptions = configuration.baseOptions;
|
|
32355
|
+
}
|
|
32356
|
+
|
|
32357
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
32358
|
+
const localVarHeaderParameter = {} as any;
|
|
32359
|
+
const localVarQueryParameter = {} as any;
|
|
32360
|
+
|
|
32361
|
+
// authentication apiToken required
|
|
32362
|
+
// http bearer authentication required
|
|
32363
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
32364
|
+
|
|
32365
|
+
|
|
32366
|
+
|
|
32367
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
32368
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
32369
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
32370
|
+
|
|
32371
|
+
return {
|
|
32372
|
+
url: toPathString(localVarUrlObj),
|
|
32373
|
+
options: localVarRequestOptions,
|
|
32374
|
+
};
|
|
32375
|
+
},
|
|
32376
|
+
/**
|
|
32377
|
+
* Get a subscription owned by your store, without signing secrets.
|
|
32378
|
+
* @summary Get an ecommerce webhook
|
|
32379
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32380
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
32381
|
+
* @param {*} [options] Override http request option.
|
|
32382
|
+
* @throws {RequiredError}
|
|
32383
|
+
*/
|
|
32384
|
+
getAnEcommerceWebhookV1: async (storeId: string, endpointId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
32385
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
32386
|
+
assertParamExists('getAnEcommerceWebhookV1', 'storeId', storeId)
|
|
32387
|
+
// verify required parameter 'endpointId' is not null or undefined
|
|
32388
|
+
assertParamExists('getAnEcommerceWebhookV1', 'endpointId', endpointId)
|
|
32389
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/webhooks/{endpoint_id}`
|
|
32390
|
+
.replace(`{${"store_id"}}`, encodePathParam('storeId', storeId))
|
|
32391
|
+
.replace(`{${"endpoint_id"}}`, encodePathParam('endpointId', endpointId));
|
|
32392
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
32393
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
32394
|
+
let baseOptions;
|
|
32395
|
+
if (configuration) {
|
|
32396
|
+
baseOptions = configuration.baseOptions;
|
|
32397
|
+
}
|
|
32398
|
+
|
|
32399
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
32400
|
+
const localVarHeaderParameter = {} as any;
|
|
32401
|
+
const localVarQueryParameter = {} as any;
|
|
32402
|
+
|
|
32403
|
+
// authentication apiToken required
|
|
32404
|
+
// http bearer authentication required
|
|
32405
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
32406
|
+
|
|
32407
|
+
|
|
32408
|
+
|
|
32409
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
32410
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
32411
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
32412
|
+
|
|
32413
|
+
return {
|
|
32414
|
+
url: toPathString(localVarUrlObj),
|
|
32415
|
+
options: localVarRequestOptions,
|
|
32416
|
+
};
|
|
32417
|
+
},
|
|
32418
|
+
/**
|
|
32419
|
+
* List your store\'s subscriptions for external automation systems, without signing secrets.
|
|
32420
|
+
* @summary List ecommerce webhooks
|
|
32421
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32422
|
+
* @param {*} [options] Override http request option.
|
|
32423
|
+
* @throws {RequiredError}
|
|
32424
|
+
*/
|
|
32425
|
+
listEcommerceWebhooksV1: async (storeId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
32426
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
32427
|
+
assertParamExists('listEcommerceWebhooksV1', 'storeId', storeId)
|
|
32428
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/webhooks`
|
|
32429
|
+
.replace(`{${"store_id"}}`, encodePathParam('storeId', storeId));
|
|
32430
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
32431
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
32432
|
+
let baseOptions;
|
|
32433
|
+
if (configuration) {
|
|
32434
|
+
baseOptions = configuration.baseOptions;
|
|
32435
|
+
}
|
|
32436
|
+
|
|
32437
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
32438
|
+
const localVarHeaderParameter = {} as any;
|
|
32439
|
+
const localVarQueryParameter = {} as any;
|
|
32440
|
+
|
|
32441
|
+
// authentication apiToken required
|
|
32442
|
+
// http bearer authentication required
|
|
32443
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
32444
|
+
|
|
32445
|
+
|
|
32446
|
+
|
|
32447
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
32448
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
32449
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
32450
|
+
|
|
32451
|
+
return {
|
|
32452
|
+
url: toPathString(localVarUrlObj),
|
|
32453
|
+
options: localVarRequestOptions,
|
|
32454
|
+
};
|
|
32455
|
+
},
|
|
32456
|
+
/**
|
|
32457
|
+
* 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>`.
|
|
32458
|
+
* @summary Rotate an ecommerce webhook secret
|
|
32459
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32460
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
32461
|
+
* @param {*} [options] Override http request option.
|
|
32462
|
+
* @throws {RequiredError}
|
|
32463
|
+
*/
|
|
32464
|
+
rotateAnEcommerceWebhookSecretV1: async (storeId: string, endpointId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
32465
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
32466
|
+
assertParamExists('rotateAnEcommerceWebhookSecretV1', 'storeId', storeId)
|
|
32467
|
+
// verify required parameter 'endpointId' is not null or undefined
|
|
32468
|
+
assertParamExists('rotateAnEcommerceWebhookSecretV1', 'endpointId', endpointId)
|
|
32469
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/webhooks/{endpoint_id}/rotate-secret`
|
|
32470
|
+
.replace(`{${"store_id"}}`, encodePathParam('storeId', storeId))
|
|
32471
|
+
.replace(`{${"endpoint_id"}}`, encodePathParam('endpointId', endpointId));
|
|
32472
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
32473
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
32474
|
+
let baseOptions;
|
|
32475
|
+
if (configuration) {
|
|
32476
|
+
baseOptions = configuration.baseOptions;
|
|
32477
|
+
}
|
|
32478
|
+
|
|
32479
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
32480
|
+
const localVarHeaderParameter = {} as any;
|
|
32481
|
+
const localVarQueryParameter = {} as any;
|
|
32482
|
+
|
|
32483
|
+
// authentication apiToken required
|
|
32484
|
+
// http bearer authentication required
|
|
32485
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
32486
|
+
|
|
32487
|
+
|
|
32488
|
+
|
|
32489
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
32490
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
32491
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
32492
|
+
|
|
32493
|
+
return {
|
|
32494
|
+
url: toPathString(localVarUrlObj),
|
|
32495
|
+
options: localVarRequestOptions,
|
|
32496
|
+
};
|
|
32497
|
+
},
|
|
32498
|
+
/**
|
|
32499
|
+
* 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>`.
|
|
32500
|
+
* @summary Update an ecommerce webhook
|
|
32501
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32502
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
32503
|
+
* @param {EcommerceV1WebhookUpdateRequest} ecommerceV1WebhookUpdateRequest
|
|
32504
|
+
* @param {*} [options] Override http request option.
|
|
32505
|
+
* @throws {RequiredError}
|
|
32506
|
+
*/
|
|
32507
|
+
updateAnEcommerceWebhookV1: async (storeId: string, endpointId: string, ecommerceV1WebhookUpdateRequest: EcommerceV1WebhookUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
32508
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
32509
|
+
assertParamExists('updateAnEcommerceWebhookV1', 'storeId', storeId)
|
|
32510
|
+
// verify required parameter 'endpointId' is not null or undefined
|
|
32511
|
+
assertParamExists('updateAnEcommerceWebhookV1', 'endpointId', endpointId)
|
|
32512
|
+
// verify required parameter 'ecommerceV1WebhookUpdateRequest' is not null or undefined
|
|
32513
|
+
assertParamExists('updateAnEcommerceWebhookV1', 'ecommerceV1WebhookUpdateRequest', ecommerceV1WebhookUpdateRequest)
|
|
32514
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/webhooks/{endpoint_id}`
|
|
32515
|
+
.replace(`{${"store_id"}}`, encodePathParam('storeId', storeId))
|
|
32516
|
+
.replace(`{${"endpoint_id"}}`, encodePathParam('endpointId', endpointId));
|
|
32517
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
32518
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
32519
|
+
let baseOptions;
|
|
32520
|
+
if (configuration) {
|
|
32521
|
+
baseOptions = configuration.baseOptions;
|
|
32522
|
+
}
|
|
32523
|
+
|
|
32524
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
32525
|
+
const localVarHeaderParameter = {} as any;
|
|
32526
|
+
const localVarQueryParameter = {} as any;
|
|
32527
|
+
|
|
32528
|
+
// authentication apiToken required
|
|
32529
|
+
// http bearer authentication required
|
|
32530
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
32531
|
+
|
|
32532
|
+
|
|
32533
|
+
|
|
32534
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
32535
|
+
|
|
32536
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
32537
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
32538
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
32539
|
+
localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1WebhookUpdateRequest, localVarRequestOptions, configuration)
|
|
32540
|
+
|
|
32541
|
+
return {
|
|
32542
|
+
url: toPathString(localVarUrlObj),
|
|
32543
|
+
options: localVarRequestOptions,
|
|
32544
|
+
};
|
|
32545
|
+
},
|
|
32546
|
+
}
|
|
32547
|
+
};
|
|
32548
|
+
|
|
32549
|
+
/**
|
|
32550
|
+
* EcommerceWebhooksApi - functional programming interface
|
|
32551
|
+
* @export
|
|
32552
|
+
*/
|
|
32553
|
+
export const EcommerceWebhooksApiFp = function(configuration?: Configuration) {
|
|
32554
|
+
const localVarAxiosParamCreator = EcommerceWebhooksApiAxiosParamCreator(configuration)
|
|
32555
|
+
return {
|
|
32556
|
+
/**
|
|
32557
|
+
* 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>`.
|
|
32558
|
+
* @summary Create an ecommerce webhook
|
|
32559
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32560
|
+
* @param {EcommerceV1WebhookStoreRequest} ecommerceV1WebhookStoreRequest
|
|
32561
|
+
* @param {*} [options] Override http request option.
|
|
32562
|
+
* @throws {RequiredError}
|
|
32563
|
+
*/
|
|
32564
|
+
async createAnEcommerceWebhookV1(storeId: string, ecommerceV1WebhookStoreRequest: EcommerceV1WebhookStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1WebhookWebhookCreationResource>> {
|
|
32565
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createAnEcommerceWebhookV1(storeId, ecommerceV1WebhookStoreRequest, options);
|
|
32566
|
+
const localVarOperationServerBasePath = operationServerMap['EcommerceWebhooksApi.createAnEcommerceWebhookV1']?.[0]?.url;
|
|
32567
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
32568
|
+
},
|
|
32569
|
+
/**
|
|
32570
|
+
* Delete a subscription owned by your store, retaining delivery audit records.
|
|
32571
|
+
* @summary Delete an ecommerce webhook
|
|
32572
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32573
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
32574
|
+
* @param {*} [options] Override http request option.
|
|
32575
|
+
* @throws {RequiredError}
|
|
32576
|
+
*/
|
|
32577
|
+
async deleteAnEcommerceWebhookV1(storeId: string, endpointId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
32578
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAnEcommerceWebhookV1(storeId, endpointId, options);
|
|
32579
|
+
const localVarOperationServerBasePath = operationServerMap['EcommerceWebhooksApi.deleteAnEcommerceWebhookV1']?.[0]?.url;
|
|
32580
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
32581
|
+
},
|
|
32582
|
+
/**
|
|
32583
|
+
* Get a subscription owned by your store, without signing secrets.
|
|
32584
|
+
* @summary Get an ecommerce webhook
|
|
32585
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32586
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
32587
|
+
* @param {*} [options] Override http request option.
|
|
32588
|
+
* @throws {RequiredError}
|
|
32589
|
+
*/
|
|
32590
|
+
async getAnEcommerceWebhookV1(storeId: string, endpointId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1WebhookWebhookResource>> {
|
|
32591
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getAnEcommerceWebhookV1(storeId, endpointId, options);
|
|
32592
|
+
const localVarOperationServerBasePath = operationServerMap['EcommerceWebhooksApi.getAnEcommerceWebhookV1']?.[0]?.url;
|
|
32593
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
32594
|
+
},
|
|
32595
|
+
/**
|
|
32596
|
+
* List your store\'s subscriptions for external automation systems, without signing secrets.
|
|
32597
|
+
* @summary List ecommerce webhooks
|
|
32598
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32599
|
+
* @param {*} [options] Override http request option.
|
|
32600
|
+
* @throws {RequiredError}
|
|
32601
|
+
*/
|
|
32602
|
+
async listEcommerceWebhooksV1(storeId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1WebhookWebhookListResource>> {
|
|
32603
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listEcommerceWebhooksV1(storeId, options);
|
|
32604
|
+
const localVarOperationServerBasePath = operationServerMap['EcommerceWebhooksApi.listEcommerceWebhooksV1']?.[0]?.url;
|
|
32605
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
32606
|
+
},
|
|
32607
|
+
/**
|
|
32608
|
+
* 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>`.
|
|
32609
|
+
* @summary Rotate an ecommerce webhook secret
|
|
32610
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32611
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
32612
|
+
* @param {*} [options] Override http request option.
|
|
32613
|
+
* @throws {RequiredError}
|
|
32614
|
+
*/
|
|
32615
|
+
async rotateAnEcommerceWebhookSecretV1(storeId: string, endpointId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1WebhookWebhookSecretResource>> {
|
|
32616
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.rotateAnEcommerceWebhookSecretV1(storeId, endpointId, options);
|
|
32617
|
+
const localVarOperationServerBasePath = operationServerMap['EcommerceWebhooksApi.rotateAnEcommerceWebhookSecretV1']?.[0]?.url;
|
|
32618
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
32619
|
+
},
|
|
32620
|
+
/**
|
|
32621
|
+
* 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>`.
|
|
32622
|
+
* @summary Update an ecommerce webhook
|
|
32623
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32624
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
32625
|
+
* @param {EcommerceV1WebhookUpdateRequest} ecommerceV1WebhookUpdateRequest
|
|
32626
|
+
* @param {*} [options] Override http request option.
|
|
32627
|
+
* @throws {RequiredError}
|
|
32628
|
+
*/
|
|
32629
|
+
async updateAnEcommerceWebhookV1(storeId: string, endpointId: string, ecommerceV1WebhookUpdateRequest: EcommerceV1WebhookUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1WebhookWebhookResource>> {
|
|
32630
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateAnEcommerceWebhookV1(storeId, endpointId, ecommerceV1WebhookUpdateRequest, options);
|
|
32631
|
+
const localVarOperationServerBasePath = operationServerMap['EcommerceWebhooksApi.updateAnEcommerceWebhookV1']?.[0]?.url;
|
|
32632
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
32633
|
+
},
|
|
32634
|
+
}
|
|
32635
|
+
};
|
|
32636
|
+
|
|
32637
|
+
/**
|
|
32638
|
+
* EcommerceWebhooksApi - factory interface
|
|
32639
|
+
* @export
|
|
32640
|
+
*/
|
|
32641
|
+
export const EcommerceWebhooksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
32642
|
+
const localVarFp = EcommerceWebhooksApiFp(configuration)
|
|
32643
|
+
return {
|
|
32644
|
+
/**
|
|
32645
|
+
* 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>`.
|
|
32646
|
+
* @summary Create an ecommerce webhook
|
|
32647
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32648
|
+
* @param {EcommerceV1WebhookStoreRequest} ecommerceV1WebhookStoreRequest
|
|
32649
|
+
* @param {*} [options] Override http request option.
|
|
32650
|
+
* @throws {RequiredError}
|
|
32651
|
+
*/
|
|
32652
|
+
createAnEcommerceWebhookV1(storeId: string, ecommerceV1WebhookStoreRequest: EcommerceV1WebhookStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1WebhookWebhookCreationResource> {
|
|
32653
|
+
return localVarFp.createAnEcommerceWebhookV1(storeId, ecommerceV1WebhookStoreRequest, options).then((request) => request(axios, basePath));
|
|
32654
|
+
},
|
|
32655
|
+
/**
|
|
32656
|
+
* Delete a subscription owned by your store, retaining delivery audit records.
|
|
32657
|
+
* @summary Delete an ecommerce webhook
|
|
32658
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32659
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
32660
|
+
* @param {*} [options] Override http request option.
|
|
32661
|
+
* @throws {RequiredError}
|
|
32662
|
+
*/
|
|
32663
|
+
deleteAnEcommerceWebhookV1(storeId: string, endpointId: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
32664
|
+
return localVarFp.deleteAnEcommerceWebhookV1(storeId, endpointId, options).then((request) => request(axios, basePath));
|
|
32665
|
+
},
|
|
32666
|
+
/**
|
|
32667
|
+
* Get a subscription owned by your store, without signing secrets.
|
|
32668
|
+
* @summary Get an ecommerce webhook
|
|
32669
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32670
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
32671
|
+
* @param {*} [options] Override http request option.
|
|
32672
|
+
* @throws {RequiredError}
|
|
32673
|
+
*/
|
|
32674
|
+
getAnEcommerceWebhookV1(storeId: string, endpointId: string, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1WebhookWebhookResource> {
|
|
32675
|
+
return localVarFp.getAnEcommerceWebhookV1(storeId, endpointId, options).then((request) => request(axios, basePath));
|
|
32676
|
+
},
|
|
32677
|
+
/**
|
|
32678
|
+
* List your store\'s subscriptions for external automation systems, without signing secrets.
|
|
32679
|
+
* @summary List ecommerce webhooks
|
|
32680
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32681
|
+
* @param {*} [options] Override http request option.
|
|
32682
|
+
* @throws {RequiredError}
|
|
32683
|
+
*/
|
|
32684
|
+
listEcommerceWebhooksV1(storeId: string, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1WebhookWebhookListResource> {
|
|
32685
|
+
return localVarFp.listEcommerceWebhooksV1(storeId, options).then((request) => request(axios, basePath));
|
|
32686
|
+
},
|
|
32687
|
+
/**
|
|
32688
|
+
* 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>`.
|
|
32689
|
+
* @summary Rotate an ecommerce webhook secret
|
|
32690
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32691
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
32692
|
+
* @param {*} [options] Override http request option.
|
|
32693
|
+
* @throws {RequiredError}
|
|
32694
|
+
*/
|
|
32695
|
+
rotateAnEcommerceWebhookSecretV1(storeId: string, endpointId: string, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1WebhookWebhookSecretResource> {
|
|
32696
|
+
return localVarFp.rotateAnEcommerceWebhookSecretV1(storeId, endpointId, options).then((request) => request(axios, basePath));
|
|
32697
|
+
},
|
|
32698
|
+
/**
|
|
32699
|
+
* 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>`.
|
|
32700
|
+
* @summary Update an ecommerce webhook
|
|
32701
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32702
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
32703
|
+
* @param {EcommerceV1WebhookUpdateRequest} ecommerceV1WebhookUpdateRequest
|
|
32704
|
+
* @param {*} [options] Override http request option.
|
|
32705
|
+
* @throws {RequiredError}
|
|
32706
|
+
*/
|
|
32707
|
+
updateAnEcommerceWebhookV1(storeId: string, endpointId: string, ecommerceV1WebhookUpdateRequest: EcommerceV1WebhookUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1WebhookWebhookResource> {
|
|
32708
|
+
return localVarFp.updateAnEcommerceWebhookV1(storeId, endpointId, ecommerceV1WebhookUpdateRequest, options).then((request) => request(axios, basePath));
|
|
32709
|
+
},
|
|
32710
|
+
};
|
|
32711
|
+
};
|
|
32712
|
+
|
|
32713
|
+
/**
|
|
32714
|
+
* EcommerceWebhooksApi - object-oriented interface
|
|
32715
|
+
* @export
|
|
32716
|
+
* @class EcommerceWebhooksApi
|
|
32717
|
+
* @extends {BaseAPI}
|
|
32718
|
+
*/
|
|
32719
|
+
export class EcommerceWebhooksApi extends BaseAPI {
|
|
32720
|
+
/**
|
|
32721
|
+
* 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>`.
|
|
32722
|
+
* @summary Create an ecommerce webhook
|
|
32723
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32724
|
+
* @param {EcommerceV1WebhookStoreRequest} ecommerceV1WebhookStoreRequest
|
|
32725
|
+
* @param {*} [options] Override http request option.
|
|
32726
|
+
* @throws {RequiredError}
|
|
32727
|
+
* @memberof EcommerceWebhooksApi
|
|
32728
|
+
*/
|
|
32729
|
+
public createAnEcommerceWebhookV1(storeId: string, ecommerceV1WebhookStoreRequest: EcommerceV1WebhookStoreRequest, options?: RawAxiosRequestConfig) {
|
|
32730
|
+
return EcommerceWebhooksApiFp(this.configuration).createAnEcommerceWebhookV1(storeId, ecommerceV1WebhookStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
32731
|
+
}
|
|
32732
|
+
|
|
32733
|
+
/**
|
|
32734
|
+
* Delete a subscription owned by your store, retaining delivery audit records.
|
|
32735
|
+
* @summary Delete an ecommerce webhook
|
|
32736
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32737
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
32738
|
+
* @param {*} [options] Override http request option.
|
|
32739
|
+
* @throws {RequiredError}
|
|
32740
|
+
* @memberof EcommerceWebhooksApi
|
|
32741
|
+
*/
|
|
32742
|
+
public deleteAnEcommerceWebhookV1(storeId: string, endpointId: string, options?: RawAxiosRequestConfig) {
|
|
32743
|
+
return EcommerceWebhooksApiFp(this.configuration).deleteAnEcommerceWebhookV1(storeId, endpointId, options).then((request) => request(this.axios, this.basePath));
|
|
32744
|
+
}
|
|
32745
|
+
|
|
32746
|
+
/**
|
|
32747
|
+
* Get a subscription owned by your store, without signing secrets.
|
|
32748
|
+
* @summary Get an ecommerce webhook
|
|
32749
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32750
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
32751
|
+
* @param {*} [options] Override http request option.
|
|
32752
|
+
* @throws {RequiredError}
|
|
32753
|
+
* @memberof EcommerceWebhooksApi
|
|
32754
|
+
*/
|
|
32755
|
+
public getAnEcommerceWebhookV1(storeId: string, endpointId: string, options?: RawAxiosRequestConfig) {
|
|
32756
|
+
return EcommerceWebhooksApiFp(this.configuration).getAnEcommerceWebhookV1(storeId, endpointId, options).then((request) => request(this.axios, this.basePath));
|
|
32757
|
+
}
|
|
32758
|
+
|
|
32759
|
+
/**
|
|
32760
|
+
* List your store\'s subscriptions for external automation systems, without signing secrets.
|
|
32761
|
+
* @summary List ecommerce webhooks
|
|
32762
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32763
|
+
* @param {*} [options] Override http request option.
|
|
32764
|
+
* @throws {RequiredError}
|
|
32765
|
+
* @memberof EcommerceWebhooksApi
|
|
32766
|
+
*/
|
|
32767
|
+
public listEcommerceWebhooksV1(storeId: string, options?: RawAxiosRequestConfig) {
|
|
32768
|
+
return EcommerceWebhooksApiFp(this.configuration).listEcommerceWebhooksV1(storeId, options).then((request) => request(this.axios, this.basePath));
|
|
32769
|
+
}
|
|
32770
|
+
|
|
32771
|
+
/**
|
|
32772
|
+
* 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>`.
|
|
32773
|
+
* @summary Rotate an ecommerce webhook secret
|
|
32774
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32775
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
32776
|
+
* @param {*} [options] Override http request option.
|
|
32777
|
+
* @throws {RequiredError}
|
|
32778
|
+
* @memberof EcommerceWebhooksApi
|
|
32779
|
+
*/
|
|
32780
|
+
public rotateAnEcommerceWebhookSecretV1(storeId: string, endpointId: string, options?: RawAxiosRequestConfig) {
|
|
32781
|
+
return EcommerceWebhooksApiFp(this.configuration).rotateAnEcommerceWebhookSecretV1(storeId, endpointId, options).then((request) => request(this.axios, this.basePath));
|
|
32782
|
+
}
|
|
32783
|
+
|
|
32784
|
+
/**
|
|
32785
|
+
* 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>`.
|
|
32786
|
+
* @summary Update an ecommerce webhook
|
|
32787
|
+
* @param {string} storeId ID of the store owned by your account.
|
|
32788
|
+
* @param {string} endpointId Webhook endpoint ID belonging to this store.
|
|
32789
|
+
* @param {EcommerceV1WebhookUpdateRequest} ecommerceV1WebhookUpdateRequest
|
|
32790
|
+
* @param {*} [options] Override http request option.
|
|
32791
|
+
* @throws {RequiredError}
|
|
32792
|
+
* @memberof EcommerceWebhooksApi
|
|
32793
|
+
*/
|
|
32794
|
+
public updateAnEcommerceWebhookV1(storeId: string, endpointId: string, ecommerceV1WebhookUpdateRequest: EcommerceV1WebhookUpdateRequest, options?: RawAxiosRequestConfig) {
|
|
32795
|
+
return EcommerceWebhooksApiFp(this.configuration).updateAnEcommerceWebhookV1(storeId, endpointId, ecommerceV1WebhookUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
32796
|
+
}
|
|
32797
|
+
}
|
|
32798
|
+
|
|
32799
|
+
|
|
32800
|
+
|
|
32018
32801
|
/**
|
|
32019
32802
|
* GPUCatalogApi - axios parameter creator
|
|
32020
32803
|
* @export
|