hostinger-api-sdk 3.4.1 → 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 +869 -268
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +505 -96
- package/dist/api.js +551 -173
- 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 -96
- package/dist/esm/api.js +534 -160
- 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/{VPSV1PublicKeyAttachRequest.md → EcommerceV1WebhookWebhookResource.md} +5 -5
- package/docs/EcommerceV1WebhookWebhookSecretResource.md +22 -0
- package/docs/EcommerceWebhooksApi.md +362 -0
- package/docs/VPSPublicKeysApi.md +0 -59
- package/docs/VPSVirtualMachineApi.md +0 -57
- 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
|
|
@@ -18166,19 +18432,6 @@ export interface VPSV1PostInstallScriptStoreRequest {
|
|
|
18166
18432
|
*/
|
|
18167
18433
|
'content': string;
|
|
18168
18434
|
}
|
|
18169
|
-
/**
|
|
18170
|
-
*
|
|
18171
|
-
* @export
|
|
18172
|
-
* @interface VPSV1PublicKeyAttachRequest
|
|
18173
|
-
*/
|
|
18174
|
-
export interface VPSV1PublicKeyAttachRequest {
|
|
18175
|
-
/**
|
|
18176
|
-
* Public Key IDs to attach
|
|
18177
|
-
* @type {Array<number>}
|
|
18178
|
-
* @memberof VPSV1PublicKeyAttachRequest
|
|
18179
|
-
*/
|
|
18180
|
-
'ids': Array<number>;
|
|
18181
|
-
}
|
|
18182
18435
|
/**
|
|
18183
18436
|
*
|
|
18184
18437
|
* @export
|
|
@@ -31821,14 +32074,401 @@ export const EcommerceStoresApiAxiosParamCreator = function (configuration?: Con
|
|
|
31821
32074
|
};
|
|
31822
32075
|
},
|
|
31823
32076
|
/**
|
|
31824
|
-
* Retrieve the stores associated with your account.
|
|
31825
|
-
* @summary Get stores
|
|
31826
|
-
* @param {number} [page] Page number
|
|
32077
|
+
* Retrieve the stores associated with your account.
|
|
32078
|
+
* @summary Get stores
|
|
32079
|
+
* @param {number} [page] Page number
|
|
32080
|
+
* @param {*} [options] Override http request option.
|
|
32081
|
+
* @throws {RequiredError}
|
|
32082
|
+
*/
|
|
32083
|
+
getStoresV1: async (page?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
32084
|
+
const localVarPath = `/api/ecommerce/v1/stores`;
|
|
32085
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
32086
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
32087
|
+
let baseOptions;
|
|
32088
|
+
if (configuration) {
|
|
32089
|
+
baseOptions = configuration.baseOptions;
|
|
32090
|
+
}
|
|
32091
|
+
|
|
32092
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
32093
|
+
const localVarHeaderParameter = {} as any;
|
|
32094
|
+
const localVarQueryParameter = {} as any;
|
|
32095
|
+
|
|
32096
|
+
// authentication apiToken required
|
|
32097
|
+
// http bearer authentication required
|
|
32098
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
32099
|
+
|
|
32100
|
+
if (page !== undefined) {
|
|
32101
|
+
localVarQueryParameter['page'] = page;
|
|
32102
|
+
}
|
|
32103
|
+
|
|
32104
|
+
|
|
32105
|
+
|
|
32106
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
32107
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
32108
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
32109
|
+
|
|
32110
|
+
return {
|
|
32111
|
+
url: toPathString(localVarUrlObj),
|
|
32112
|
+
options: localVarRequestOptions,
|
|
32113
|
+
};
|
|
32114
|
+
},
|
|
32115
|
+
}
|
|
32116
|
+
};
|
|
32117
|
+
|
|
32118
|
+
/**
|
|
32119
|
+
* EcommerceStoresApi - functional programming interface
|
|
32120
|
+
* @export
|
|
32121
|
+
*/
|
|
32122
|
+
export const EcommerceStoresApiFp = function(configuration?: Configuration) {
|
|
32123
|
+
const localVarAxiosParamCreator = EcommerceStoresApiAxiosParamCreator(configuration)
|
|
32124
|
+
return {
|
|
32125
|
+
/**
|
|
32126
|
+
* Create a new store for your account. A primary sales channel is created alongside the store.
|
|
32127
|
+
* @summary Create store
|
|
32128
|
+
* @param {EcommerceV1StoreStoreRequest} ecommerceV1StoreStoreRequest
|
|
32129
|
+
* @param {*} [options] Override http request option.
|
|
32130
|
+
* @throws {RequiredError}
|
|
32131
|
+
*/
|
|
32132
|
+
async createStoreV1(ecommerceV1StoreStoreRequest: EcommerceV1StoreStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1StoreStoreCreationResource>> {
|
|
32133
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createStoreV1(ecommerceV1StoreStoreRequest, options);
|
|
32134
|
+
const localVarOperationServerBasePath = operationServerMap['EcommerceStoresApi.createStoreV1']?.[0]?.url;
|
|
32135
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
32136
|
+
},
|
|
32137
|
+
/**
|
|
32138
|
+
* Soft-delete a store owned by your account. The underlying store data is preserved; only the store is marked as deleted.
|
|
32139
|
+
* @summary Delete store
|
|
32140
|
+
* @param {string} storeId The ID of the store to delete.
|
|
32141
|
+
* @param {*} [options] Override http request option.
|
|
32142
|
+
* @throws {RequiredError}
|
|
32143
|
+
*/
|
|
32144
|
+
async deleteStoreV1(storeId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1StoreStoreDeleteResource>> {
|
|
32145
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteStoreV1(storeId, options);
|
|
32146
|
+
const localVarOperationServerBasePath = operationServerMap['EcommerceStoresApi.deleteStoreV1']?.[0]?.url;
|
|
32147
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
32148
|
+
},
|
|
32149
|
+
/**
|
|
32150
|
+
* Get a store\'s readiness metadata: whether payment methods and shipping are configured, plus its default currency. Useful to verify prerequisites before building a storefront.
|
|
32151
|
+
* @summary Get store metadata
|
|
32152
|
+
* @param {string} storeId The ID of the store to read metadata for.
|
|
32153
|
+
* @param {*} [options] Override http request option.
|
|
32154
|
+
* @throws {RequiredError}
|
|
32155
|
+
*/
|
|
32156
|
+
async getStoreMetadataV1(storeId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1StoreStoreMetadataResource>> {
|
|
32157
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getStoreMetadataV1(storeId, options);
|
|
32158
|
+
const localVarOperationServerBasePath = operationServerMap['EcommerceStoresApi.getStoreMetadataV1']?.[0]?.url;
|
|
32159
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
32160
|
+
},
|
|
32161
|
+
/**
|
|
32162
|
+
* Retrieve the stores associated with your account.
|
|
32163
|
+
* @summary Get stores
|
|
32164
|
+
* @param {number} [page] Page number
|
|
32165
|
+
* @param {*} [options] Override http request option.
|
|
32166
|
+
* @throws {RequiredError}
|
|
32167
|
+
*/
|
|
32168
|
+
async getStoresV1(page?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceGetStoresV1200Response>> {
|
|
32169
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getStoresV1(page, options);
|
|
32170
|
+
const localVarOperationServerBasePath = operationServerMap['EcommerceStoresApi.getStoresV1']?.[0]?.url;
|
|
32171
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
32172
|
+
},
|
|
32173
|
+
}
|
|
32174
|
+
};
|
|
32175
|
+
|
|
32176
|
+
/**
|
|
32177
|
+
* EcommerceStoresApi - factory interface
|
|
32178
|
+
* @export
|
|
32179
|
+
*/
|
|
32180
|
+
export const EcommerceStoresApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
32181
|
+
const localVarFp = EcommerceStoresApiFp(configuration)
|
|
32182
|
+
return {
|
|
32183
|
+
/**
|
|
32184
|
+
* Create a new store for your account. A primary sales channel is created alongside the store.
|
|
32185
|
+
* @summary Create store
|
|
32186
|
+
* @param {EcommerceV1StoreStoreRequest} ecommerceV1StoreStoreRequest
|
|
32187
|
+
* @param {*} [options] Override http request option.
|
|
32188
|
+
* @throws {RequiredError}
|
|
32189
|
+
*/
|
|
32190
|
+
createStoreV1(ecommerceV1StoreStoreRequest: EcommerceV1StoreStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1StoreStoreCreationResource> {
|
|
32191
|
+
return localVarFp.createStoreV1(ecommerceV1StoreStoreRequest, options).then((request) => request(axios, basePath));
|
|
32192
|
+
},
|
|
32193
|
+
/**
|
|
32194
|
+
* Soft-delete a store owned by your account. The underlying store data is preserved; only the store is marked as deleted.
|
|
32195
|
+
* @summary Delete store
|
|
32196
|
+
* @param {string} storeId The ID of the store to delete.
|
|
32197
|
+
* @param {*} [options] Override http request option.
|
|
32198
|
+
* @throws {RequiredError}
|
|
32199
|
+
*/
|
|
32200
|
+
deleteStoreV1(storeId: string, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1StoreStoreDeleteResource> {
|
|
32201
|
+
return localVarFp.deleteStoreV1(storeId, options).then((request) => request(axios, basePath));
|
|
32202
|
+
},
|
|
32203
|
+
/**
|
|
32204
|
+
* Get a store\'s readiness metadata: whether payment methods and shipping are configured, plus its default currency. Useful to verify prerequisites before building a storefront.
|
|
32205
|
+
* @summary Get store metadata
|
|
32206
|
+
* @param {string} storeId The ID of the store to read metadata for.
|
|
32207
|
+
* @param {*} [options] Override http request option.
|
|
32208
|
+
* @throws {RequiredError}
|
|
32209
|
+
*/
|
|
32210
|
+
getStoreMetadataV1(storeId: string, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1StoreStoreMetadataResource> {
|
|
32211
|
+
return localVarFp.getStoreMetadataV1(storeId, options).then((request) => request(axios, basePath));
|
|
32212
|
+
},
|
|
32213
|
+
/**
|
|
32214
|
+
* Retrieve the stores associated with your account.
|
|
32215
|
+
* @summary Get stores
|
|
32216
|
+
* @param {number} [page] Page number
|
|
32217
|
+
* @param {*} [options] Override http request option.
|
|
32218
|
+
* @throws {RequiredError}
|
|
32219
|
+
*/
|
|
32220
|
+
getStoresV1(page?: number, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceGetStoresV1200Response> {
|
|
32221
|
+
return localVarFp.getStoresV1(page, options).then((request) => request(axios, basePath));
|
|
32222
|
+
},
|
|
32223
|
+
};
|
|
32224
|
+
};
|
|
32225
|
+
|
|
32226
|
+
/**
|
|
32227
|
+
* EcommerceStoresApi - object-oriented interface
|
|
32228
|
+
* @export
|
|
32229
|
+
* @class EcommerceStoresApi
|
|
32230
|
+
* @extends {BaseAPI}
|
|
32231
|
+
*/
|
|
32232
|
+
export class EcommerceStoresApi extends BaseAPI {
|
|
32233
|
+
/**
|
|
32234
|
+
* Create a new store for your account. A primary sales channel is created alongside the store.
|
|
32235
|
+
* @summary Create store
|
|
32236
|
+
* @param {EcommerceV1StoreStoreRequest} ecommerceV1StoreStoreRequest
|
|
32237
|
+
* @param {*} [options] Override http request option.
|
|
32238
|
+
* @throws {RequiredError}
|
|
32239
|
+
* @memberof EcommerceStoresApi
|
|
32240
|
+
*/
|
|
32241
|
+
public createStoreV1(ecommerceV1StoreStoreRequest: EcommerceV1StoreStoreRequest, options?: RawAxiosRequestConfig) {
|
|
32242
|
+
return EcommerceStoresApiFp(this.configuration).createStoreV1(ecommerceV1StoreStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
32243
|
+
}
|
|
32244
|
+
|
|
32245
|
+
/**
|
|
32246
|
+
* Soft-delete a store owned by your account. The underlying store data is preserved; only the store is marked as deleted.
|
|
32247
|
+
* @summary Delete store
|
|
32248
|
+
* @param {string} storeId The ID of the store to delete.
|
|
32249
|
+
* @param {*} [options] Override http request option.
|
|
32250
|
+
* @throws {RequiredError}
|
|
32251
|
+
* @memberof EcommerceStoresApi
|
|
32252
|
+
*/
|
|
32253
|
+
public deleteStoreV1(storeId: string, options?: RawAxiosRequestConfig) {
|
|
32254
|
+
return EcommerceStoresApiFp(this.configuration).deleteStoreV1(storeId, options).then((request) => request(this.axios, this.basePath));
|
|
32255
|
+
}
|
|
32256
|
+
|
|
32257
|
+
/**
|
|
32258
|
+
* Get a store\'s readiness metadata: whether payment methods and shipping are configured, plus its default currency. Useful to verify prerequisites before building a storefront.
|
|
32259
|
+
* @summary Get store metadata
|
|
32260
|
+
* @param {string} storeId The ID of the store to read metadata for.
|
|
32261
|
+
* @param {*} [options] Override http request option.
|
|
32262
|
+
* @throws {RequiredError}
|
|
32263
|
+
* @memberof EcommerceStoresApi
|
|
32264
|
+
*/
|
|
32265
|
+
public getStoreMetadataV1(storeId: string, options?: RawAxiosRequestConfig) {
|
|
32266
|
+
return EcommerceStoresApiFp(this.configuration).getStoreMetadataV1(storeId, options).then((request) => request(this.axios, this.basePath));
|
|
32267
|
+
}
|
|
32268
|
+
|
|
32269
|
+
/**
|
|
32270
|
+
* Retrieve the stores associated with your account.
|
|
32271
|
+
* @summary Get stores
|
|
32272
|
+
* @param {number} [page] Page number
|
|
32273
|
+
* @param {*} [options] Override http request option.
|
|
32274
|
+
* @throws {RequiredError}
|
|
32275
|
+
* @memberof EcommerceStoresApi
|
|
32276
|
+
*/
|
|
32277
|
+
public getStoresV1(page?: number, options?: RawAxiosRequestConfig) {
|
|
32278
|
+
return EcommerceStoresApiFp(this.configuration).getStoresV1(page, options).then((request) => request(this.axios, this.basePath));
|
|
32279
|
+
}
|
|
32280
|
+
}
|
|
32281
|
+
|
|
32282
|
+
|
|
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.
|
|
31827
32461
|
* @param {*} [options] Override http request option.
|
|
31828
32462
|
* @throws {RequiredError}
|
|
31829
32463
|
*/
|
|
31830
|
-
|
|
31831
|
-
|
|
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));
|
|
31832
32472
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
31833
32473
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
31834
32474
|
let baseOptions;
|
|
@@ -31836,7 +32476,7 @@ export const EcommerceStoresApiAxiosParamCreator = function (configuration?: Con
|
|
|
31836
32476
|
baseOptions = configuration.baseOptions;
|
|
31837
32477
|
}
|
|
31838
32478
|
|
|
31839
|
-
const localVarRequestOptions = { method: '
|
|
32479
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
31840
32480
|
const localVarHeaderParameter = {} as any;
|
|
31841
32481
|
const localVarQueryParameter = {} as any;
|
|
31842
32482
|
|
|
@@ -31844,15 +32484,59 @@ export const EcommerceStoresApiAxiosParamCreator = function (configuration?: Con
|
|
|
31844
32484
|
// http bearer authentication required
|
|
31845
32485
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
31846
32486
|
|
|
31847
|
-
|
|
31848
|
-
|
|
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;
|
|
31849
32522
|
}
|
|
31850
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
|
+
|
|
31851
32532
|
|
|
31852
32533
|
|
|
32534
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
32535
|
+
|
|
31853
32536
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
31854
32537
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
31855
32538
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
32539
|
+
localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1WebhookUpdateRequest, localVarRequestOptions, configuration)
|
|
31856
32540
|
|
|
31857
32541
|
return {
|
|
31858
32542
|
url: toPathString(localVarUrlObj),
|
|
@@ -31863,166 +32547,252 @@ export const EcommerceStoresApiAxiosParamCreator = function (configuration?: Con
|
|
|
31863
32547
|
};
|
|
31864
32548
|
|
|
31865
32549
|
/**
|
|
31866
|
-
*
|
|
32550
|
+
* EcommerceWebhooksApi - functional programming interface
|
|
31867
32551
|
* @export
|
|
31868
32552
|
*/
|
|
31869
|
-
export const
|
|
31870
|
-
const localVarAxiosParamCreator =
|
|
32553
|
+
export const EcommerceWebhooksApiFp = function(configuration?: Configuration) {
|
|
32554
|
+
const localVarAxiosParamCreator = EcommerceWebhooksApiAxiosParamCreator(configuration)
|
|
31871
32555
|
return {
|
|
31872
32556
|
/**
|
|
31873
|
-
* Create
|
|
31874
|
-
* @summary Create
|
|
31875
|
-
* @param {
|
|
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
|
|
31876
32561
|
* @param {*} [options] Override http request option.
|
|
31877
32562
|
* @throws {RequiredError}
|
|
31878
32563
|
*/
|
|
31879
|
-
async
|
|
31880
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
31881
|
-
const localVarOperationServerBasePath = operationServerMap['
|
|
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;
|
|
31882
32567
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31883
32568
|
},
|
|
31884
32569
|
/**
|
|
31885
|
-
*
|
|
31886
|
-
* @summary Delete
|
|
31887
|
-
* @param {string} storeId
|
|
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.
|
|
31888
32574
|
* @param {*} [options] Override http request option.
|
|
31889
32575
|
* @throws {RequiredError}
|
|
31890
32576
|
*/
|
|
31891
|
-
async
|
|
31892
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
31893
|
-
const localVarOperationServerBasePath = operationServerMap['
|
|
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;
|
|
31894
32580
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31895
32581
|
},
|
|
31896
32582
|
/**
|
|
31897
|
-
* Get a
|
|
31898
|
-
* @summary Get
|
|
31899
|
-
* @param {string} storeId
|
|
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.
|
|
31900
32587
|
* @param {*} [options] Override http request option.
|
|
31901
32588
|
* @throws {RequiredError}
|
|
31902
32589
|
*/
|
|
31903
|
-
async
|
|
31904
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
31905
|
-
const localVarOperationServerBasePath = operationServerMap['
|
|
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;
|
|
31906
32593
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31907
32594
|
},
|
|
31908
32595
|
/**
|
|
31909
|
-
*
|
|
31910
|
-
* @summary
|
|
31911
|
-
* @param {
|
|
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.
|
|
31912
32599
|
* @param {*} [options] Override http request option.
|
|
31913
32600
|
* @throws {RequiredError}
|
|
31914
32601
|
*/
|
|
31915
|
-
async
|
|
31916
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
31917
|
-
const localVarOperationServerBasePath = operationServerMap['
|
|
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;
|
|
31918
32632
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31919
32633
|
},
|
|
31920
32634
|
}
|
|
31921
32635
|
};
|
|
31922
32636
|
|
|
31923
32637
|
/**
|
|
31924
|
-
*
|
|
32638
|
+
* EcommerceWebhooksApi - factory interface
|
|
31925
32639
|
* @export
|
|
31926
32640
|
*/
|
|
31927
|
-
export const
|
|
31928
|
-
const localVarFp =
|
|
32641
|
+
export const EcommerceWebhooksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
32642
|
+
const localVarFp = EcommerceWebhooksApiFp(configuration)
|
|
31929
32643
|
return {
|
|
31930
32644
|
/**
|
|
31931
|
-
* Create
|
|
31932
|
-
* @summary Create
|
|
31933
|
-
* @param {
|
|
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
|
|
31934
32649
|
* @param {*} [options] Override http request option.
|
|
31935
32650
|
* @throws {RequiredError}
|
|
31936
32651
|
*/
|
|
31937
|
-
|
|
31938
|
-
return localVarFp.
|
|
32652
|
+
createAnEcommerceWebhookV1(storeId: string, ecommerceV1WebhookStoreRequest: EcommerceV1WebhookStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1WebhookWebhookCreationResource> {
|
|
32653
|
+
return localVarFp.createAnEcommerceWebhookV1(storeId, ecommerceV1WebhookStoreRequest, options).then((request) => request(axios, basePath));
|
|
31939
32654
|
},
|
|
31940
32655
|
/**
|
|
31941
|
-
*
|
|
31942
|
-
* @summary Delete
|
|
31943
|
-
* @param {string} storeId
|
|
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.
|
|
31944
32660
|
* @param {*} [options] Override http request option.
|
|
31945
32661
|
* @throws {RequiredError}
|
|
31946
32662
|
*/
|
|
31947
|
-
|
|
31948
|
-
return localVarFp.
|
|
32663
|
+
deleteAnEcommerceWebhookV1(storeId: string, endpointId: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
32664
|
+
return localVarFp.deleteAnEcommerceWebhookV1(storeId, endpointId, options).then((request) => request(axios, basePath));
|
|
31949
32665
|
},
|
|
31950
32666
|
/**
|
|
31951
|
-
* Get a
|
|
31952
|
-
* @summary Get
|
|
31953
|
-
* @param {string} storeId
|
|
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.
|
|
31954
32671
|
* @param {*} [options] Override http request option.
|
|
31955
32672
|
* @throws {RequiredError}
|
|
31956
32673
|
*/
|
|
31957
|
-
|
|
31958
|
-
return localVarFp.
|
|
32674
|
+
getAnEcommerceWebhookV1(storeId: string, endpointId: string, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1WebhookWebhookResource> {
|
|
32675
|
+
return localVarFp.getAnEcommerceWebhookV1(storeId, endpointId, options).then((request) => request(axios, basePath));
|
|
31959
32676
|
},
|
|
31960
32677
|
/**
|
|
31961
|
-
*
|
|
31962
|
-
* @summary
|
|
31963
|
-
* @param {
|
|
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.
|
|
31964
32681
|
* @param {*} [options] Override http request option.
|
|
31965
32682
|
* @throws {RequiredError}
|
|
31966
32683
|
*/
|
|
31967
|
-
|
|
31968
|
-
return localVarFp.
|
|
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));
|
|
31969
32709
|
},
|
|
31970
32710
|
};
|
|
31971
32711
|
};
|
|
31972
32712
|
|
|
31973
32713
|
/**
|
|
31974
|
-
*
|
|
32714
|
+
* EcommerceWebhooksApi - object-oriented interface
|
|
31975
32715
|
* @export
|
|
31976
|
-
* @class
|
|
32716
|
+
* @class EcommerceWebhooksApi
|
|
31977
32717
|
* @extends {BaseAPI}
|
|
31978
32718
|
*/
|
|
31979
|
-
export class
|
|
32719
|
+
export class EcommerceWebhooksApi extends BaseAPI {
|
|
31980
32720
|
/**
|
|
31981
|
-
* Create
|
|
31982
|
-
* @summary Create
|
|
31983
|
-
* @param {
|
|
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
|
|
31984
32725
|
* @param {*} [options] Override http request option.
|
|
31985
32726
|
* @throws {RequiredError}
|
|
31986
|
-
* @memberof
|
|
32727
|
+
* @memberof EcommerceWebhooksApi
|
|
31987
32728
|
*/
|
|
31988
|
-
public
|
|
31989
|
-
return
|
|
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));
|
|
31990
32731
|
}
|
|
31991
32732
|
|
|
31992
32733
|
/**
|
|
31993
|
-
*
|
|
31994
|
-
* @summary Delete
|
|
31995
|
-
* @param {string} storeId
|
|
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.
|
|
31996
32738
|
* @param {*} [options] Override http request option.
|
|
31997
32739
|
* @throws {RequiredError}
|
|
31998
|
-
* @memberof
|
|
32740
|
+
* @memberof EcommerceWebhooksApi
|
|
31999
32741
|
*/
|
|
32000
|
-
public
|
|
32001
|
-
return
|
|
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));
|
|
32002
32744
|
}
|
|
32003
32745
|
|
|
32004
32746
|
/**
|
|
32005
|
-
* Get a
|
|
32006
|
-
* @summary Get
|
|
32007
|
-
* @param {string} storeId
|
|
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.
|
|
32008
32751
|
* @param {*} [options] Override http request option.
|
|
32009
32752
|
* @throws {RequiredError}
|
|
32010
|
-
* @memberof
|
|
32753
|
+
* @memberof EcommerceWebhooksApi
|
|
32011
32754
|
*/
|
|
32012
|
-
public
|
|
32013
|
-
return
|
|
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));
|
|
32014
32757
|
}
|
|
32015
32758
|
|
|
32016
32759
|
/**
|
|
32017
|
-
*
|
|
32018
|
-
* @summary
|
|
32019
|
-
* @param {
|
|
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.
|
|
32020
32763
|
* @param {*} [options] Override http request option.
|
|
32021
32764
|
* @throws {RequiredError}
|
|
32022
|
-
* @memberof
|
|
32765
|
+
* @memberof EcommerceWebhooksApi
|
|
32023
32766
|
*/
|
|
32024
|
-
public
|
|
32025
|
-
return
|
|
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));
|
|
32026
32796
|
}
|
|
32027
32797
|
}
|
|
32028
32798
|
|
|
@@ -54951,51 +55721,6 @@ export class VPSPostInstallScriptsApi extends BaseAPI {
|
|
|
54951
55721
|
*/
|
|
54952
55722
|
export const VPSPublicKeysApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
54953
55723
|
return {
|
|
54954
|
-
/**
|
|
54955
|
-
* Deprecated: use `POST /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys` instead. Attach existing public keys from your account to a specified virtual machine. Multiple keys can be attached to a single virtual machine. Use this endpoint to enable SSH key authentication for VPS instances.
|
|
54956
|
-
* @summary Attach public key
|
|
54957
|
-
* @param {number} virtualMachineId Virtual Machine ID
|
|
54958
|
-
* @param {VPSV1PublicKeyAttachRequest} vPSV1PublicKeyAttachRequest
|
|
54959
|
-
* @param {*} [options] Override http request option.
|
|
54960
|
-
* @deprecated
|
|
54961
|
-
* @throws {RequiredError}
|
|
54962
|
-
*/
|
|
54963
|
-
attachPublicKeyV1: async (virtualMachineId: number, vPSV1PublicKeyAttachRequest: VPSV1PublicKeyAttachRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
54964
|
-
// verify required parameter 'virtualMachineId' is not null or undefined
|
|
54965
|
-
assertParamExists('attachPublicKeyV1', 'virtualMachineId', virtualMachineId)
|
|
54966
|
-
// verify required parameter 'vPSV1PublicKeyAttachRequest' is not null or undefined
|
|
54967
|
-
assertParamExists('attachPublicKeyV1', 'vPSV1PublicKeyAttachRequest', vPSV1PublicKeyAttachRequest)
|
|
54968
|
-
const localVarPath = `/api/vps/v1/public-keys/attach/{virtualMachineId}`
|
|
54969
|
-
.replace(`{${"virtualMachineId"}}`, encodePathParam('virtualMachineId', virtualMachineId));
|
|
54970
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
54971
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
54972
|
-
let baseOptions;
|
|
54973
|
-
if (configuration) {
|
|
54974
|
-
baseOptions = configuration.baseOptions;
|
|
54975
|
-
}
|
|
54976
|
-
|
|
54977
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
54978
|
-
const localVarHeaderParameter = {} as any;
|
|
54979
|
-
const localVarQueryParameter = {} as any;
|
|
54980
|
-
|
|
54981
|
-
// authentication apiToken required
|
|
54982
|
-
// http bearer authentication required
|
|
54983
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
54984
|
-
|
|
54985
|
-
|
|
54986
|
-
|
|
54987
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
54988
|
-
|
|
54989
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
54990
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
54991
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
54992
|
-
localVarRequestOptions.data = serializeDataIfNeeded(vPSV1PublicKeyAttachRequest, localVarRequestOptions, configuration)
|
|
54993
|
-
|
|
54994
|
-
return {
|
|
54995
|
-
url: toPathString(localVarUrlObj),
|
|
54996
|
-
options: localVarRequestOptions,
|
|
54997
|
-
};
|
|
54998
|
-
},
|
|
54999
55724
|
/**
|
|
55000
55725
|
* Deprecated: account-level public keys have no direct replacement. Root SSH keys are now managed per virtual machine via `POST /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys`. Add a new public key to your account. Use this endpoint to register SSH keys for VPS authentication.
|
|
55001
55726
|
* @summary Create public key
|
|
@@ -55126,20 +55851,6 @@ export const VPSPublicKeysApiAxiosParamCreator = function (configuration?: Confi
|
|
|
55126
55851
|
export const VPSPublicKeysApiFp = function(configuration?: Configuration) {
|
|
55127
55852
|
const localVarAxiosParamCreator = VPSPublicKeysApiAxiosParamCreator(configuration)
|
|
55128
55853
|
return {
|
|
55129
|
-
/**
|
|
55130
|
-
* Deprecated: use `POST /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys` instead. Attach existing public keys from your account to a specified virtual machine. Multiple keys can be attached to a single virtual machine. Use this endpoint to enable SSH key authentication for VPS instances.
|
|
55131
|
-
* @summary Attach public key
|
|
55132
|
-
* @param {number} virtualMachineId Virtual Machine ID
|
|
55133
|
-
* @param {VPSV1PublicKeyAttachRequest} vPSV1PublicKeyAttachRequest
|
|
55134
|
-
* @param {*} [options] Override http request option.
|
|
55135
|
-
* @deprecated
|
|
55136
|
-
* @throws {RequiredError}
|
|
55137
|
-
*/
|
|
55138
|
-
async attachPublicKeyV1(virtualMachineId: number, vPSV1PublicKeyAttachRequest: VPSV1PublicKeyAttachRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VPSV1ActionActionResource>> {
|
|
55139
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.attachPublicKeyV1(virtualMachineId, vPSV1PublicKeyAttachRequest, options);
|
|
55140
|
-
const localVarOperationServerBasePath = operationServerMap['VPSPublicKeysApi.attachPublicKeyV1']?.[0]?.url;
|
|
55141
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
55142
|
-
},
|
|
55143
55854
|
/**
|
|
55144
55855
|
* Deprecated: account-level public keys have no direct replacement. Root SSH keys are now managed per virtual machine via `POST /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys`. Add a new public key to your account. Use this endpoint to register SSH keys for VPS authentication.
|
|
55145
55856
|
* @summary Create public key
|
|
@@ -55189,18 +55900,6 @@ export const VPSPublicKeysApiFp = function(configuration?: Configuration) {
|
|
|
55189
55900
|
export const VPSPublicKeysApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
55190
55901
|
const localVarFp = VPSPublicKeysApiFp(configuration)
|
|
55191
55902
|
return {
|
|
55192
|
-
/**
|
|
55193
|
-
* Deprecated: use `POST /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys` instead. Attach existing public keys from your account to a specified virtual machine. Multiple keys can be attached to a single virtual machine. Use this endpoint to enable SSH key authentication for VPS instances.
|
|
55194
|
-
* @summary Attach public key
|
|
55195
|
-
* @param {number} virtualMachineId Virtual Machine ID
|
|
55196
|
-
* @param {VPSV1PublicKeyAttachRequest} vPSV1PublicKeyAttachRequest
|
|
55197
|
-
* @param {*} [options] Override http request option.
|
|
55198
|
-
* @deprecated
|
|
55199
|
-
* @throws {RequiredError}
|
|
55200
|
-
*/
|
|
55201
|
-
attachPublicKeyV1(virtualMachineId: number, vPSV1PublicKeyAttachRequest: VPSV1PublicKeyAttachRequest, options?: RawAxiosRequestConfig): AxiosPromise<VPSV1ActionActionResource> {
|
|
55202
|
-
return localVarFp.attachPublicKeyV1(virtualMachineId, vPSV1PublicKeyAttachRequest, options).then((request) => request(axios, basePath));
|
|
55203
|
-
},
|
|
55204
55903
|
/**
|
|
55205
55904
|
* Deprecated: account-level public keys have no direct replacement. Root SSH keys are now managed per virtual machine via `POST /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys`. Add a new public key to your account. Use this endpoint to register SSH keys for VPS authentication.
|
|
55206
55905
|
* @summary Create public key
|
|
@@ -55244,20 +55943,6 @@ export const VPSPublicKeysApiFactory = function (configuration?: Configuration,
|
|
|
55244
55943
|
* @extends {BaseAPI}
|
|
55245
55944
|
*/
|
|
55246
55945
|
export class VPSPublicKeysApi extends BaseAPI {
|
|
55247
|
-
/**
|
|
55248
|
-
* Deprecated: use `POST /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys` instead. Attach existing public keys from your account to a specified virtual machine. Multiple keys can be attached to a single virtual machine. Use this endpoint to enable SSH key authentication for VPS instances.
|
|
55249
|
-
* @summary Attach public key
|
|
55250
|
-
* @param {number} virtualMachineId Virtual Machine ID
|
|
55251
|
-
* @param {VPSV1PublicKeyAttachRequest} vPSV1PublicKeyAttachRequest
|
|
55252
|
-
* @param {*} [options] Override http request option.
|
|
55253
|
-
* @deprecated
|
|
55254
|
-
* @throws {RequiredError}
|
|
55255
|
-
* @memberof VPSPublicKeysApi
|
|
55256
|
-
*/
|
|
55257
|
-
public attachPublicKeyV1(virtualMachineId: number, vPSV1PublicKeyAttachRequest: VPSV1PublicKeyAttachRequest, options?: RawAxiosRequestConfig) {
|
|
55258
|
-
return VPSPublicKeysApiFp(this.configuration).attachPublicKeyV1(virtualMachineId, vPSV1PublicKeyAttachRequest, options).then((request) => request(this.axios, this.basePath));
|
|
55259
|
-
}
|
|
55260
|
-
|
|
55261
55946
|
/**
|
|
55262
55947
|
* Deprecated: account-level public keys have no direct replacement. Root SSH keys are now managed per virtual machine via `POST /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys`. Add a new public key to your account. Use this endpoint to register SSH keys for VPS authentication.
|
|
55263
55948
|
* @summary Create public key
|
|
@@ -56098,50 +56783,6 @@ export class VPSSnapshotsApi extends BaseAPI {
|
|
|
56098
56783
|
*/
|
|
56099
56784
|
export const VPSVirtualMachineApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
56100
56785
|
return {
|
|
56101
|
-
/**
|
|
56102
|
-
* Deprecated: use `GET /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys` instead. Retrieve public keys attached to a specified virtual machine. Use this endpoint to view SSH keys configured for specific VPS instances.
|
|
56103
|
-
* @summary Get attached public keys
|
|
56104
|
-
* @param {number} virtualMachineId Virtual Machine ID
|
|
56105
|
-
* @param {number} [page] Page number
|
|
56106
|
-
* @param {*} [options] Override http request option.
|
|
56107
|
-
* @deprecated
|
|
56108
|
-
* @throws {RequiredError}
|
|
56109
|
-
*/
|
|
56110
|
-
getAttachedPublicKeysV1: async (virtualMachineId: number, page?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
56111
|
-
// verify required parameter 'virtualMachineId' is not null or undefined
|
|
56112
|
-
assertParamExists('getAttachedPublicKeysV1', 'virtualMachineId', virtualMachineId)
|
|
56113
|
-
const localVarPath = `/api/vps/v1/virtual-machines/{virtualMachineId}/public-keys`
|
|
56114
|
-
.replace(`{${"virtualMachineId"}}`, encodePathParam('virtualMachineId', virtualMachineId));
|
|
56115
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
56116
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
56117
|
-
let baseOptions;
|
|
56118
|
-
if (configuration) {
|
|
56119
|
-
baseOptions = configuration.baseOptions;
|
|
56120
|
-
}
|
|
56121
|
-
|
|
56122
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
56123
|
-
const localVarHeaderParameter = {} as any;
|
|
56124
|
-
const localVarQueryParameter = {} as any;
|
|
56125
|
-
|
|
56126
|
-
// authentication apiToken required
|
|
56127
|
-
// http bearer authentication required
|
|
56128
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
56129
|
-
|
|
56130
|
-
if (page !== undefined) {
|
|
56131
|
-
localVarQueryParameter['page'] = page;
|
|
56132
|
-
}
|
|
56133
|
-
|
|
56134
|
-
|
|
56135
|
-
|
|
56136
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
56137
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
56138
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
56139
|
-
|
|
56140
|
-
return {
|
|
56141
|
-
url: toPathString(localVarUrlObj),
|
|
56142
|
-
options: localVarRequestOptions,
|
|
56143
|
-
};
|
|
56144
|
-
},
|
|
56145
56786
|
/**
|
|
56146
56787
|
* Retrieve historical metrics for a specified virtual machine. It includes the following metrics: - CPU usage - Memory usage - Disk usage - Network usage - Uptime Use this endpoint to monitor VPS performance and resource utilization over time.
|
|
56147
56788
|
* @summary Get metrics
|
|
@@ -56736,20 +57377,6 @@ export const VPSVirtualMachineApiAxiosParamCreator = function (configuration?: C
|
|
|
56736
57377
|
export const VPSVirtualMachineApiFp = function(configuration?: Configuration) {
|
|
56737
57378
|
const localVarAxiosParamCreator = VPSVirtualMachineApiAxiosParamCreator(configuration)
|
|
56738
57379
|
return {
|
|
56739
|
-
/**
|
|
56740
|
-
* Deprecated: use `GET /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys` instead. Retrieve public keys attached to a specified virtual machine. Use this endpoint to view SSH keys configured for specific VPS instances.
|
|
56741
|
-
* @summary Get attached public keys
|
|
56742
|
-
* @param {number} virtualMachineId Virtual Machine ID
|
|
56743
|
-
* @param {number} [page] Page number
|
|
56744
|
-
* @param {*} [options] Override http request option.
|
|
56745
|
-
* @deprecated
|
|
56746
|
-
* @throws {RequiredError}
|
|
56747
|
-
*/
|
|
56748
|
-
async getAttachedPublicKeysV1(virtualMachineId: number, page?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VPSV1PublicKeyListResponse>> {
|
|
56749
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getAttachedPublicKeysV1(virtualMachineId, page, options);
|
|
56750
|
-
const localVarOperationServerBasePath = operationServerMap['VPSVirtualMachineApi.getAttachedPublicKeysV1']?.[0]?.url;
|
|
56751
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
56752
|
-
},
|
|
56753
57380
|
/**
|
|
56754
57381
|
* Retrieve historical metrics for a specified virtual machine. It includes the following metrics: - CPU usage - Memory usage - Disk usage - Network usage - Uptime Use this endpoint to monitor VPS performance and resource utilization over time.
|
|
56755
57382
|
* @summary Get metrics
|
|
@@ -56935,18 +57562,6 @@ export const VPSVirtualMachineApiFp = function(configuration?: Configuration) {
|
|
|
56935
57562
|
export const VPSVirtualMachineApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
56936
57563
|
const localVarFp = VPSVirtualMachineApiFp(configuration)
|
|
56937
57564
|
return {
|
|
56938
|
-
/**
|
|
56939
|
-
* Deprecated: use `GET /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys` instead. Retrieve public keys attached to a specified virtual machine. Use this endpoint to view SSH keys configured for specific VPS instances.
|
|
56940
|
-
* @summary Get attached public keys
|
|
56941
|
-
* @param {number} virtualMachineId Virtual Machine ID
|
|
56942
|
-
* @param {number} [page] Page number
|
|
56943
|
-
* @param {*} [options] Override http request option.
|
|
56944
|
-
* @deprecated
|
|
56945
|
-
* @throws {RequiredError}
|
|
56946
|
-
*/
|
|
56947
|
-
getAttachedPublicKeysV1(virtualMachineId: number, page?: number, options?: RawAxiosRequestConfig): AxiosPromise<VPSV1PublicKeyListResponse> {
|
|
56948
|
-
return localVarFp.getAttachedPublicKeysV1(virtualMachineId, page, options).then((request) => request(axios, basePath));
|
|
56949
|
-
},
|
|
56950
57565
|
/**
|
|
56951
57566
|
* Retrieve historical metrics for a specified virtual machine. It includes the following metrics: - CPU usage - Memory usage - Disk usage - Network usage - Uptime Use this endpoint to monitor VPS performance and resource utilization over time.
|
|
56952
57567
|
* @summary Get metrics
|
|
@@ -57104,20 +57719,6 @@ export const VPSVirtualMachineApiFactory = function (configuration?: Configurati
|
|
|
57104
57719
|
* @extends {BaseAPI}
|
|
57105
57720
|
*/
|
|
57106
57721
|
export class VPSVirtualMachineApi extends BaseAPI {
|
|
57107
|
-
/**
|
|
57108
|
-
* Deprecated: use `GET /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys` instead. Retrieve public keys attached to a specified virtual machine. Use this endpoint to view SSH keys configured for specific VPS instances.
|
|
57109
|
-
* @summary Get attached public keys
|
|
57110
|
-
* @param {number} virtualMachineId Virtual Machine ID
|
|
57111
|
-
* @param {number} [page] Page number
|
|
57112
|
-
* @param {*} [options] Override http request option.
|
|
57113
|
-
* @deprecated
|
|
57114
|
-
* @throws {RequiredError}
|
|
57115
|
-
* @memberof VPSVirtualMachineApi
|
|
57116
|
-
*/
|
|
57117
|
-
public getAttachedPublicKeysV1(virtualMachineId: number, page?: number, options?: RawAxiosRequestConfig) {
|
|
57118
|
-
return VPSVirtualMachineApiFp(this.configuration).getAttachedPublicKeysV1(virtualMachineId, page, options).then((request) => request(this.axios, this.basePath));
|
|
57119
|
-
}
|
|
57120
|
-
|
|
57121
57722
|
/**
|
|
57122
57723
|
* Retrieve historical metrics for a specified virtual machine. It includes the following metrics: - CPU usage - Memory usage - Disk usage - Network usage - Uptime Use this endpoint to monitor VPS performance and resource utilization over time.
|
|
57123
57724
|
* @summary Get metrics
|