@zernio/node 0.2.997 → 0.2.999

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.
@@ -3076,6 +3076,437 @@ export type CommentAutomationTemplateElement = {
3076
3076
  }>;
3077
3077
  };
3078
3078
 
3079
+ /**
3080
+ * An operation a store supports. Calling an operation outside this list answers 400 platform_not_supported.
3081
+ */
3082
+ export type CommerceCapability = 'products.read' | 'products.create' | 'products.update' | 'products.status' | 'products.price' | 'products.variants' | 'products.images' | 'products.images_remove' | 'collections.read' | 'collections.write' | 'metafields.read' | 'metafields.write' | 'pages.read' | 'pages.write' | 'inventory.read' | 'inventory.write' | 'channels.read' | 'channels.write' | 'discounts.read' | 'discounts.write' | 'navigation.read' | 'navigation.write' | 'metaobjects.read' | 'metaobjects.write' | 'markets.read' | 'markets.write' | 'marketing.write';
3083
+
3084
+ /**
3085
+ * A store kept in sync with an ad-platform product catalog.
3086
+ */
3087
+ export type CommerceCatalogSync = {
3088
+ id?: string;
3089
+ /**
3090
+ * The store SocialAccount id.
3091
+ */
3092
+ accountId?: string;
3093
+ catalogPlatform?: 'meta';
3094
+ /**
3095
+ * The Meta login account whose token writes to the catalog.
3096
+ */
3097
+ catalogAccountId?: string;
3098
+ catalogId?: string;
3099
+ runStatus?: 'pending' | 'running' | 'succeeded' | 'failed';
3100
+ lastRunStartedAt?: (string) | null;
3101
+ lastRunFinishedAt?: (string) | null;
3102
+ /**
3103
+ * Why the last run failed, or how many items Meta rejected in a run that otherwise succeeded. Null after a clean run.
3104
+ */
3105
+ lastError?: (string) | null;
3106
+ /**
3107
+ * Catalog items (one per variant) Meta accepted in the last full run.
3108
+ */
3109
+ itemsSent?: number;
3110
+ /**
3111
+ * Products the last full run could not list: not published to the online store or without an image.
3112
+ */
3113
+ itemsSkipped?: number;
3114
+ /**
3115
+ * Items the last full run removed because the store no longer has them.
3116
+ */
3117
+ itemsDeleted?: number;
3118
+ createdAt?: string;
3119
+ };
3120
+
3121
+ export type catalogPlatform = 'meta';
3122
+
3123
+ export type runStatus = 'pending' | 'running' | 'succeeded' | 'failed';
3124
+
3125
+ export type CommerceChannel = {
3126
+ id?: string;
3127
+ name?: string;
3128
+ };
3129
+
3130
+ /**
3131
+ * A product collection on a connected store.
3132
+ */
3133
+ export type CommerceCollection = {
3134
+ /**
3135
+ * Platform-native collection id.
3136
+ */
3137
+ id?: string;
3138
+ accountId?: string;
3139
+ platform?: 'shopify' | 'woocommerce';
3140
+ title?: string;
3141
+ handle?: (string) | null;
3142
+ descriptionHtml?: (string) | null;
3143
+ image?: (CommerceImage | null);
3144
+ sortOrder?: 'manual' | 'best_selling' | 'alpha_asc' | 'alpha_desc' | 'price_asc' | 'price_desc' | 'created' | 'created_desc' | 'most_relevant';
3145
+ /**
3146
+ * Updates a few seconds after a membership change.
3147
+ */
3148
+ productCount?: (number) | null;
3149
+ seo?: {
3150
+ title?: (string) | null;
3151
+ description?: (string) | null;
3152
+ };
3153
+ updatedAt?: (string) | null;
3154
+ platformData?: {
3155
+ [key: string]: unknown;
3156
+ } | null;
3157
+ };
3158
+
3159
+ export type platform4 = 'shopify' | 'woocommerce';
3160
+
3161
+ export type sortOrder = 'manual' | 'best_selling' | 'alpha_asc' | 'alpha_desc' | 'price_asc' | 'price_desc' | 'created' | 'created_desc' | 'most_relevant';
3162
+
3163
+ export type CommerceDiscount = {
3164
+ id?: string;
3165
+ accountId?: string;
3166
+ platform?: 'shopify';
3167
+ title?: string;
3168
+ method?: 'code' | 'automatic';
3169
+ type?: 'percentage' | 'fixed_amount' | 'free_shipping' | 'buy_x_get_y' | 'app';
3170
+ /**
3171
+ * The first 10 codes; codeCount has the total.
3172
+ */
3173
+ codes?: Array<(string)>;
3174
+ codeCount?: (number) | null;
3175
+ /**
3176
+ * Null for free shipping, buy-X-get-Y and app discounts.
3177
+ */
3178
+ value?: ({
3179
+ type?: 'percentage';
3180
+ percentage?: number;
3181
+ } | {
3182
+ type?: 'fixed_amount';
3183
+ amount?: CommerceMoney;
3184
+ appliesOnEachItem?: boolean;
3185
+ } | null);
3186
+ appliesTo?: {
3187
+ type?: 'all' | 'products' | 'collections';
3188
+ productIds?: Array<(string)>;
3189
+ variantIds?: Array<(string)>;
3190
+ collectionIds?: Array<(string)>;
3191
+ } | null;
3192
+ minimum?: {
3193
+ type?: 'subtotal' | 'quantity';
3194
+ amount?: CommerceMoney;
3195
+ quantity?: number;
3196
+ } | null;
3197
+ usageLimit?: (number) | null;
3198
+ oncePerCustomer?: boolean;
3199
+ usageCount?: number;
3200
+ startsAt?: string;
3201
+ endsAt?: (string) | null;
3202
+ status?: 'active' | 'scheduled' | 'expired';
3203
+ platformStatus?: string;
3204
+ summary?: string;
3205
+ platformData?: {
3206
+ [key: string]: unknown;
3207
+ } | null;
3208
+ };
3209
+
3210
+ export type platform5 = 'shopify';
3211
+
3212
+ export type method = 'code' | 'automatic';
3213
+
3214
+ export type type3 = 'percentage' | 'fixed_amount' | 'free_shipping' | 'buy_x_get_y' | 'app';
3215
+
3216
+ export type status10 = 'active' | 'scheduled' | 'expired';
3217
+
3218
+ export type CommerceImage = {
3219
+ /**
3220
+ * Media id, used to reorder or remove images. Null for collection images.
3221
+ */
3222
+ id?: (string) | null;
3223
+ url?: string;
3224
+ altText?: (string) | null;
3225
+ };
3226
+
3227
+ export type CommerceInventoryItem = {
3228
+ productId?: string;
3229
+ variantId?: string;
3230
+ sku?: (string) | null;
3231
+ /**
3232
+ * False when the platform does not count stock for the variant.
3233
+ */
3234
+ tracked?: boolean;
3235
+ levels?: Array<{
3236
+ locationId?: string;
3237
+ available?: (number) | null;
3238
+ onHand?: (number) | null;
3239
+ /**
3240
+ * Reserved for unfulfilled orders.
3241
+ */
3242
+ committed?: (number) | null;
3243
+ incoming?: (number) | null;
3244
+ }>;
3245
+ };
3246
+
3247
+ export type CommerceLocation = {
3248
+ id?: string;
3249
+ name?: string;
3250
+ isActive?: boolean;
3251
+ fulfillsOnlineOrders?: boolean;
3252
+ address?: {
3253
+ line1?: (string) | null;
3254
+ line2?: (string) | null;
3255
+ city?: (string) | null;
3256
+ region?: (string) | null;
3257
+ postalCode?: (string) | null;
3258
+ countryCode?: (string) | null;
3259
+ phone?: (string) | null;
3260
+ };
3261
+ };
3262
+
3263
+ export type CommerceMarket = {
3264
+ id?: string;
3265
+ name?: string;
3266
+ handle?: string;
3267
+ status?: 'active' | 'draft';
3268
+ type?: string;
3269
+ };
3270
+
3271
+ export type status11 = 'active' | 'draft';
3272
+
3273
+ export type CommerceMenu = {
3274
+ id?: string;
3275
+ handle?: string;
3276
+ title?: string;
3277
+ items?: Array<CommerceMenuItem>;
3278
+ };
3279
+
3280
+ export type CommerceMenuItem = {
3281
+ id?: (string) | null;
3282
+ title?: string;
3283
+ type?: 'frontpage' | 'collection' | 'collections' | 'product' | 'catalog' | 'page' | 'blog' | 'article' | 'search' | 'shop_policy' | 'http' | 'metaobject' | 'customer_account_page';
3284
+ url?: (string) | null;
3285
+ /**
3286
+ * The linked product, collection, page, blog, article or metaobject id.
3287
+ */
3288
+ resourceId?: (string) | null;
3289
+ items?: Array<CommerceMenuItem>;
3290
+ };
3291
+
3292
+ export type type4 = 'frontpage' | 'collection' | 'collections' | 'product' | 'catalog' | 'page' | 'blog' | 'article' | 'search' | 'shop_policy' | 'http' | 'metaobject' | 'customer_account_page';
3293
+
3294
+ export type CommerceMenuItemInput = {
3295
+ title: string;
3296
+ type: 'frontpage' | 'collection' | 'collections' | 'product' | 'catalog' | 'page' | 'blog' | 'article' | 'search' | 'shop_policy' | 'http' | 'metaobject' | 'customer_account_page';
3297
+ /**
3298
+ * For http items.
3299
+ */
3300
+ url?: string;
3301
+ /**
3302
+ * For product, collection, page, blog, article and metaobject items.
3303
+ */
3304
+ resourceId?: string;
3305
+ items?: Array<CommerceMenuItemInput>;
3306
+ };
3307
+
3308
+ export type CommerceMetafield = {
3309
+ namespace: string;
3310
+ key: string;
3311
+ /**
3312
+ * Platform value type, e.g. single_line_text_field, number_integer, json.
3313
+ */
3314
+ type: string;
3315
+ /**
3316
+ * The value serialized as a string, JSON for structured types.
3317
+ */
3318
+ value: string;
3319
+ };
3320
+
3321
+ export type CommerceMetaobject = {
3322
+ id?: string;
3323
+ type?: string;
3324
+ handle?: string;
3325
+ displayName?: string;
3326
+ fields?: Array<{
3327
+ key?: string;
3328
+ type?: string;
3329
+ value?: (string) | null;
3330
+ }>;
3331
+ };
3332
+
3333
+ export type CommerceMetaobjectDefinition = {
3334
+ id?: string;
3335
+ type?: string;
3336
+ name?: string;
3337
+ fields?: Array<{
3338
+ key?: string;
3339
+ name?: string;
3340
+ type?: string;
3341
+ required?: boolean;
3342
+ }>;
3343
+ };
3344
+
3345
+ /**
3346
+ * An exact amount of money. The amount is a decimal string so cents are never lost to floating point.
3347
+ */
3348
+ export type CommerceMoney = {
3349
+ amount: string;
3350
+ /**
3351
+ * ISO 4217 code. Never null: the store currency is filled in when the platform omits it.
3352
+ */
3353
+ currency: string;
3354
+ };
3355
+
3356
+ export type CommercePage = {
3357
+ id?: string;
3358
+ accountId?: string;
3359
+ platform?: 'shopify';
3360
+ title?: string;
3361
+ handle?: string;
3362
+ bodyHtml?: string;
3363
+ isPublished?: boolean;
3364
+ publishedAt?: (string) | null;
3365
+ createdAt?: (string) | null;
3366
+ updatedAt?: (string) | null;
3367
+ };
3368
+
3369
+ export type CommercePriceList = {
3370
+ id?: string;
3371
+ name?: string;
3372
+ currency?: string;
3373
+ };
3374
+
3375
+ /**
3376
+ * A product on a connected store, in the platform-neutral shape.
3377
+ */
3378
+ export type CommerceProduct = {
3379
+ /**
3380
+ * Platform-native product id.
3381
+ */
3382
+ id?: string;
3383
+ accountId?: string;
3384
+ platform?: 'shopify';
3385
+ title?: string;
3386
+ descriptionHtml?: (string) | null;
3387
+ /**
3388
+ * URL slug of the product.
3389
+ */
3390
+ handle?: (string) | null;
3391
+ vendor?: (string) | null;
3392
+ productType?: (string) | null;
3393
+ tags?: Array<(string)>;
3394
+ status?: CommerceProductStatus;
3395
+ /**
3396
+ * The raw status on the platform, e.g. ACTIVE on Shopify.
3397
+ */
3398
+ platformStatus?: string;
3399
+ featuredImage?: (CommerceImage | null);
3400
+ /**
3401
+ * First 20 images, in store order.
3402
+ */
3403
+ images?: Array<CommerceImage>;
3404
+ /**
3405
+ * Option axes (e.g. Size, Color) and their values.
3406
+ */
3407
+ options?: Array<{
3408
+ name?: string;
3409
+ values?: Array<(string)>;
3410
+ }>;
3411
+ /**
3412
+ * First 100 variants.
3413
+ */
3414
+ variants?: Array<CommerceVariant>;
3415
+ totalInventory?: (number) | null;
3416
+ /**
3417
+ * Public storefront URL; null while the product is not published.
3418
+ */
3419
+ url?: (string) | null;
3420
+ seo?: {
3421
+ title?: (string) | null;
3422
+ description?: (string) | null;
3423
+ };
3424
+ createdAt?: (string) | null;
3425
+ updatedAt?: (string) | null;
3426
+ publishedAt?: (string) | null;
3427
+ /**
3428
+ * Platform-only fields. Null when the platform has none.
3429
+ */
3430
+ platformData?: {
3431
+ [key: string]: unknown;
3432
+ } | null;
3433
+ };
3434
+
3435
+ /**
3436
+ * Zernio product status. The platform value is returned as platformStatus. Shopify: ACTIVE, DRAFT and ARCHIVED map to the same names; UNLISTED maps to inactive.
3437
+ */
3438
+ export type CommerceProductStatus = 'active' | 'draft' | 'pending_review' | 'rejected' | 'inactive' | 'archived' | 'deleted';
3439
+
3440
+ export type CommerceRedirect = {
3441
+ id?: string;
3442
+ path?: string;
3443
+ target?: string;
3444
+ };
3445
+
3446
+ export type CommerceStore = {
3447
+ /**
3448
+ * Zernio SocialAccount id of the store.
3449
+ */
3450
+ accountId: string;
3451
+ platform: 'shopify' | 'woocommerce';
3452
+ name: string;
3453
+ /**
3454
+ * The platform domain of the store, e.g. my-store.myshopify.com.
3455
+ */
3456
+ domain: string;
3457
+ /**
3458
+ * Public storefront URL.
3459
+ */
3460
+ url: (string) | null;
3461
+ /**
3462
+ * ISO 4217 code the store sells in.
3463
+ */
3464
+ currency: string;
3465
+ /**
3466
+ * ISO 3166-1 alpha-2 country of the store.
3467
+ */
3468
+ country: (string) | null;
3469
+ capabilities: Array<CommerceCapability>;
3470
+ /**
3471
+ * Capabilities the platform supports that this store has not granted yet.
3472
+ */
3473
+ missingCapabilities: Array<CommerceCapability>;
3474
+ /**
3475
+ * Shopify: a page in the Shopify admin where the store owner approves the permissions missingCapabilities need, on the existing install (no reinstall; they can revoke them later). Null when nothing is missing or the store cannot grant them this way (a store connected with its own custom-app token).
3476
+ */
3477
+ grantPermissionsUrl: (string) | null;
3478
+ };
3479
+
3480
+ /**
3481
+ * A purchasable variant of a product (one per option combination).
3482
+ */
3483
+ export type CommerceVariant = {
3484
+ /**
3485
+ * Platform-native variant id.
3486
+ */
3487
+ id?: string;
3488
+ /**
3489
+ * Option combination label, e.g. "S / Blue".
3490
+ */
3491
+ title?: string;
3492
+ sku?: (string) | null;
3493
+ barcode?: (string) | null;
3494
+ price?: CommerceMoney;
3495
+ /**
3496
+ * Strike-through price; null when the variant is not on sale.
3497
+ */
3498
+ compareAtPrice?: (CommerceMoney | null);
3499
+ /**
3500
+ * Units on hand; null when inventory is not tracked.
3501
+ */
3502
+ inventoryQuantity?: (number) | null;
3503
+ availableForSale?: (boolean) | null;
3504
+ options?: Array<{
3505
+ name?: string;
3506
+ value?: string;
3507
+ }>;
3508
+ };
3509
+
3079
3510
  /**
3080
3511
  * An OAuth client (AI assistant / MCP connector) authorized by the user and still
3081
3512
  * holding at least one live token.
@@ -3227,7 +3658,7 @@ export type ConversionDestination = {
3227
3658
  * For LinkedIn, `inactive` means the rule is soft-deleted (`enabled: false`).
3228
3659
  *
3229
3660
  */
3230
- export type status10 = 'active' | 'inactive';
3661
+ export type status12 = 'active' | 'inactive';
3231
3662
 
3232
3663
  /**
3233
3664
  * A single conversion event to relay to the ad platform. All PII fields
@@ -3911,7 +4342,7 @@ export type objective = 'OUTCOME_ENGAGEMENT' | 'OUTCOME_SALES' | 'OUTCOME_LEADS'
3911
4342
  * newly created ad(s) after Meta accepts them.
3912
4343
  *
3913
4344
  */
3914
- export type status11 = 'ACTIVE' | 'PAUSED';
4345
+ export type status13 = 'ACTIVE' | 'PAUSED';
3915
4346
 
3916
4347
  /**
3917
4348
  * Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults
@@ -4283,7 +4714,7 @@ export type privacy_level = 2;
4283
4714
  /**
4284
4715
  * 1=SCHEDULED, 2=ACTIVE, 3=COMPLETED, 4=CANCELED
4285
4716
  */
4286
- export type status12 = 1 | 2 | 3 | 4;
4717
+ export type status14 = 1 | 2 | 3 | 4;
4287
4718
 
4288
4719
  /**
4289
4720
  * 1=STAGE_INSTANCE, 2=VOICE, 3=EXTERNAL
@@ -4317,7 +4748,7 @@ export type DmButton = {
4317
4748
  phone?: string;
4318
4749
  };
4319
4750
 
4320
- export type type3 = 'url' | 'postback' | 'phone';
4751
+ export type type5 = 'url' | 'postback' | 'phone';
4321
4752
 
4322
4753
  /**
4323
4754
  * Canonical error envelope. `error` is the human-readable message; `type`,
@@ -4438,7 +4869,7 @@ export type ErrorResponse = {
4438
4869
  /**
4439
4870
  * Error class for programmatic handling.
4440
4871
  */
4441
- export type type4 = 'invalid_request_error' | 'authentication_error' | 'permission_error' | 'not_found' | 'rate_limit_error' | 'platform_error' | 'api_error';
4872
+ export type type6 = 'invalid_request_error' | 'authentication_error' | 'permission_error' | 'not_found' | 'rate_limit_error' | 'platform_error' | 'api_error';
4442
4873
 
4443
4874
  /**
4444
4875
  * Meta ad create failures only. The step that failed: `media` (image/video download or upload), `campaign`, `adset`, `creative`, `ad` (the ad POST itself, where Meta's code 31 / 3858385 hold and 100 / 1359188 payment rejections land), `activation` (switching the created objects on), or `other` (a read or check before any write).
@@ -4479,7 +4910,7 @@ export type ExternalPostMediaItem = {
4479
4910
  unavailableReason?: 'platform_withheld';
4480
4911
  };
4481
4912
 
4482
- export type type5 = 'image' | 'video';
4913
+ export type type7 = 'image' | 'video';
4483
4914
 
4484
4915
  /**
4485
4916
  * unavailable means the media file could not be retrieved (url is null or, for LinkedIn videos, a cover image standing in for the file). available or absent means the file is available at url (older synced items omit the field).
@@ -4811,7 +5242,7 @@ export type FeedbackReceipt = {
4811
5242
  duplicate?: boolean;
4812
5243
  };
4813
5244
 
4814
- export type status13 = 'received';
5245
+ export type status15 = 'received';
4815
5246
 
4816
5247
  export type FollowerStatsResponse = {
4817
5248
  accounts?: Array<AccountWithFollowerStats>;
@@ -4936,7 +5367,7 @@ export type GoogleAdLabel = {
4936
5367
  description?: (string) | null;
4937
5368
  };
4938
5369
 
4939
- export type status14 = 'ENABLED' | 'REMOVED' | 'UNKNOWN';
5370
+ export type status16 = 'ENABLED' | 'REMOVED' | 'UNKNOWN';
4940
5371
 
4941
5372
  /**
4942
5373
  * At least one id across the four target lists. Up to 1000 ids per list.
@@ -5034,7 +5465,7 @@ export type GoogleAdsManagerLink = {
5034
5465
  /**
5035
5466
  * Status the link has after this call.
5036
5467
  */
5037
- export type status15 = 'PENDING' | 'ACTIVE' | 'REFUSED' | 'CANCELED' | 'INACTIVE';
5468
+ export type status17 = 'PENDING' | 'ACTIVE' | 'REFUSED' | 'CANCELED' | 'INACTIVE';
5038
5469
 
5039
5470
  /**
5040
5471
  * Link one asset to the asset group. Send exactly one of asset (an existing asset), text, imageUrl or youtubeVideoId (new content, created in the same request).
@@ -5206,7 +5637,7 @@ export type topicType = 'STANDARD' | 'EVENT' | 'OFFER';
5206
5637
  /**
5207
5638
  * Button action type: LEARN_MORE, BOOK, ORDER, SHOP, SIGN_UP, CALL
5208
5639
  */
5209
- export type type6 = 'LEARN_MORE' | 'BOOK' | 'ORDER' | 'SHOP' | 'SIGN_UP' | 'CALL';
5640
+ export type type8 = 'LEARN_MORE' | 'BOOK' | 'ORDER' | 'SHOP' | 'SIGN_UP' | 'CALL';
5210
5641
 
5211
5642
  /**
5212
5643
  * A Google Business Profile review, as returned by every gmb-reviews read endpoint.
@@ -5524,7 +5955,7 @@ export type GoogleListingGroupFilterNode = {
5524
5955
  } | null;
5525
5956
  };
5526
5957
 
5527
- export type type7 = 'SUBDIVISION' | 'UNIT_INCLUDED' | 'UNIT_EXCLUDED';
5958
+ export type type9 = 'SUBDIVISION' | 'UNIT_INCLUDED' | 'UNIT_EXCLUDED';
5528
5959
 
5529
5960
  export type GoogleListingGroupNode = {
5530
5961
  dimension: GoogleListingGroupDimension;
@@ -5755,7 +6186,7 @@ export type GoogleRecommendationResult = {
5755
6186
  error?: string;
5756
6187
  };
5757
6188
 
5758
- export type status16 = 'applied' | 'dismissed' | 'failed';
6189
+ export type status18 = 'applied' | 'dismissed' | 'failed';
5759
6190
 
5760
6191
  export type GoogleRsaDescription = {
5761
6192
  text: string;
@@ -5820,6 +6251,31 @@ export type ImessageAudienceContact = {
5820
6251
  } | null;
5821
6252
  };
5822
6253
 
6254
+ export type ImessageSandboxContact = {
6255
+ id?: string;
6256
+ /**
6257
+ * Phone (E.164) or lowercase Apple ID email
6258
+ */
6259
+ handle?: string;
6260
+ status?: 'pending' | 'active';
6261
+ /**
6262
+ * Send this from the handle to the sandbox line to activate it
6263
+ */
6264
+ joinText?: string;
6265
+ /**
6266
+ * Opens Messages on the sandbox line with joinText prefilled
6267
+ */
6268
+ joinLink?: string;
6269
+ activatedAt?: (string) | null;
6270
+ /**
6271
+ * Replies are allowed for 24 hours after this
6272
+ */
6273
+ lastInboundAt?: (string) | null;
6274
+ createdAt?: string;
6275
+ };
6276
+
6277
+ export type status19 = 'pending' | 'active';
6278
+
5823
6279
  /**
5824
6280
  * An iMessage sender registered as an account on a profile.
5825
6281
  */
@@ -5850,7 +6306,7 @@ export type ImessageSender = {
5850
6306
  isActive?: boolean;
5851
6307
  };
5852
6308
 
5853
- export type platform4 = 'imessage';
6309
+ export type platform6 = 'imessage';
5854
6310
 
5855
6311
  /**
5856
6312
  * A provisioned iMessage sender order and its lifecycle. Activation is asynchronous: poll GET /v1/imessage/senders/{senderId} or subscribe to account.connected.
@@ -5887,7 +6343,7 @@ export type kind = 'phone' | 'email';
5887
6343
 
5888
6344
  export type region = 'US' | 'GB';
5889
6345
 
5890
- export type status17 = 'ordering' | 'activating' | 'active' | 'suspended' | 'canceled' | 'failed';
6346
+ export type status20 = 'ordering' | 'activating' | 'active' | 'suspended' | 'canceled' | 'failed';
5891
6347
 
5892
6348
  /**
5893
6349
  * Attachment snapshot inside an edit-history entry.
@@ -5959,7 +6415,7 @@ export type InboxWebhookConversation = {
5959
6415
  contactId?: string;
5960
6416
  };
5961
6417
 
5962
- export type status18 = 'active' | 'archived';
6418
+ export type status21 = 'active' | 'archived';
5963
6419
 
5964
6420
  /**
5965
6421
  * The conversation object included in conversation lifecycle webhook payloads (conversation.started, conversation.control_changed).
@@ -5997,7 +6453,7 @@ export type InboxWebhookConversationDetail = {
5997
6453
  contactId?: string;
5998
6454
  };
5999
6455
 
6000
- export type platform5 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms' | 'rcs' | 'slack' | 'tiktok' | 'imessage';
6456
+ export type platform7 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'sms' | 'rcs' | 'slack' | 'tiktok' | 'imessage';
6001
6457
 
6002
6458
  /**
6003
6459
  * The message object included in inbox webhook payloads.
@@ -6113,7 +6569,7 @@ export type InboxWebhookMessage = {
6113
6569
  isRead: boolean;
6114
6570
  };
6115
6571
 
6116
- export type platform6 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'sms';
6572
+ export type platform8 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'sms';
6117
6573
 
6118
6574
  export type direction2 = 'incoming' | 'outgoing';
6119
6575
 
@@ -6241,7 +6697,7 @@ export type InstagramAccountInsightsResponse = {
6241
6697
  /**
6242
6698
  * Platform that served this response.
6243
6699
  */
6244
- export type platform7 = 'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'tiktok';
6700
+ export type platform9 = 'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'tiktok';
6245
6701
 
6246
6702
  export type metricType = 'time_series' | 'total_value';
6247
6703
 
@@ -7025,7 +7481,7 @@ export type MediaItem = {
7025
7481
  tiktokProcessed?: boolean;
7026
7482
  };
7027
7483
 
7028
- export type type8 = 'image' | 'video' | 'gif' | 'document';
7484
+ export type type10 = 'image' | 'video' | 'gif' | 'document';
7029
7485
 
7030
7486
  export type MediaUploadResponse = {
7031
7487
  files?: Array<UploadedFile>;
@@ -7676,7 +8132,7 @@ export type OwnedPhoneNumber = {
7676
8132
  }>;
7677
8133
  };
7678
8134
 
7679
- export type status19 = 'pending_payment' | 'pending_regulatory' | 'regulatory_declined' | 'provisioning' | 'verifying' | 'active' | 'suspended' | 'releasing' | 'released';
8135
+ export type status22 = 'pending_payment' | 'pending_regulatory' | 'regulatory_declined' | 'provisioning' | 'verifying' | 'active' | 'suspended' | 'releasing' | 'released';
7680
8136
 
7681
8137
  export type metaVerificationStatus = 'pending' | 'code_requested' | 'verified' | 'expired';
7682
8138
 
@@ -7806,7 +8262,7 @@ export type PlatformAnalytics = {
7806
8262
  errorMessage?: (string) | null;
7807
8263
  };
7808
8264
 
7809
- export type status20 = 'published' | 'failed';
8265
+ export type status23 = 'published' | 'failed';
7810
8266
 
7811
8267
  /**
7812
8268
  * Sync state of analytics for this platform
@@ -7935,7 +8391,7 @@ export type PortfolioBidStrategy = {
7935
8391
  targetRoas?: (number) | null;
7936
8392
  };
7937
8393
 
7938
- export type type9 = 'TARGET_CPA' | 'TARGET_ROAS' | 'MAXIMIZE_CONVERSIONS' | 'MAXIMIZE_CONVERSION_VALUE';
8394
+ export type type11 = 'TARGET_CPA' | 'TARGET_ROAS' | 'MAXIMIZE_CONVERSIONS' | 'MAXIMIZE_CONVERSION_VALUE';
7939
8395
 
7940
8396
  export type Post = {
7941
8397
  _id?: string;
@@ -8206,9 +8662,7 @@ export type Product = {
8206
8662
  publishedAt?: (string) | null;
8207
8663
  };
8208
8664
 
8209
- export type platform8 = 'shopify';
8210
-
8211
- export type status21 = 'active' | 'draft' | 'archived';
8665
+ export type status24 = 'active' | 'draft' | 'archived';
8212
8666
 
8213
8667
  export type ProductImage = {
8214
8668
  url?: string;
@@ -8415,7 +8869,7 @@ export type RcsAgent = {
8415
8869
  createdAt?: string;
8416
8870
  };
8417
8871
 
8418
- export type status22 = 'requested' | 'changes_requested' | 'brand_vetting' | 'agent_review' | 'testing' | 'launch_review' | 'launching' | 'live' | 'rejected' | 'deactivated';
8872
+ export type status25 = 'requested' | 'changes_requested' | 'brand_vetting' | 'agent_review' | 'testing' | 'launch_review' | 'launching' | 'live' | 'rejected' | 'deactivated';
8419
8873
 
8420
8874
  export type useCase = 'MULTI_USE' | 'PROMOTIONAL' | 'TRANSACTIONAL' | 'OTP';
8421
8875
 
@@ -8467,7 +8921,7 @@ export type RcsBrand = RcsBrandInput & {
8467
8921
  /**
8468
8922
  * draft = not filed yet (still editable).
8469
8923
  */
8470
- export type status23 = 'draft' | 'vetting' | 'verified' | 'rejected';
8924
+ export type status26 = 'draft' | 'vetting' | 'verified' | 'rejected';
8471
8925
 
8472
8926
  export type RcsBrandInput = {
8473
8927
  displayName: string;
@@ -8554,7 +9008,7 @@ export type RcsCarrierApproval = {
8554
9008
 
8555
9009
  export type scope2 = 'carrier' | 'hub' | 'bot';
8556
9010
 
8557
- export type status24 = 'PENDING' | 'SUBMITTED' | 'APPROVED' | 'REJECTED';
9011
+ export type status27 = 'PENDING' | 'SUBMITTED' | 'APPROVED' | 'REJECTED';
8558
9012
 
8559
9013
  /**
8560
9014
  * Message content. `suggestions` (max 11) render as chips under the message.
@@ -8580,7 +9034,7 @@ export type RcsContent = {
8580
9034
  suggestions?: Array<RcsSuggestion>;
8581
9035
  };
8582
9036
 
8583
- export type type10 = 'text';
9037
+ export type type12 = 'text';
8584
9038
 
8585
9039
  export type orientation = 'VERTICAL' | 'HORIZONTAL';
8586
9040
 
@@ -8693,7 +9147,7 @@ export type RcsSuggestion = {
8693
9147
  postbackData?: string;
8694
9148
  };
8695
9149
 
8696
- export type type11 = 'reply';
9150
+ export type type13 = 'reply';
8697
9151
 
8698
9152
  export type application = 'BROWSER' | 'WEBVIEW';
8699
9153
 
@@ -8957,7 +9411,7 @@ export type ReviewWebhookReview = {
8957
9411
  /**
8958
9412
  * Platform the review originated on. Currently Google Business Profile only.
8959
9413
  */
8960
- export type platform9 = 'googlebusiness';
9414
+ export type platform10 = 'googlebusiness';
8961
9415
 
8962
9416
  /**
8963
9417
  * A Meta Reach & Frequency prediction. Money values in whole units of the ad account currency.
@@ -9163,7 +9617,7 @@ export type SocialAccount = {
9163
9617
  };
9164
9618
  };
9165
9619
 
9166
- export type platform10 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'sms' | 'phone' | 'rcs';
9620
+ export type platform11 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'sms' | 'phone' | 'rcs';
9167
9621
 
9168
9622
  /**
9169
9623
  * A tracking tag's install on a connected store: a Shopify web pixel, or a Custom HTML widget on a WordPress site. Fields marked Shopify or WordPress are present only for that platform.
@@ -9238,7 +9692,7 @@ export type StorePixelInstall = {
9238
9692
  /**
9239
9693
  * WordPress only.
9240
9694
  */
9241
- export type method = 'wordpress_widget';
9695
+ export type method2 = 'wordpress_widget';
9242
9696
 
9243
9697
  /**
9244
9698
  * Normalized, platform-agnostic ad-targeting spec. Every field is optional, an
@@ -9805,7 +10259,7 @@ export type TrackingTag = {
9805
10259
  autoTagging?: boolean;
9806
10260
  };
9807
10261
 
9808
- export type platform11 = 'metaads' | 'openaiads' | 'tiktokads' | 'googleads' | 'xads' | 'linkedinads' | 'pinterestads';
10262
+ export type platform12 = 'metaads' | 'openaiads' | 'tiktokads' | 'googleads' | 'xads' | 'linkedinads' | 'pinterestads';
9809
10263
 
9810
10264
  /**
9811
10265
  * Platform-native flavor of the tag (Meta: `pixel`).
@@ -10044,7 +10498,7 @@ export type UploadedFile = {
10044
10498
  mimeType?: string;
10045
10499
  };
10046
10500
 
10047
- export type type12 = 'image' | 'video' | 'document';
10501
+ export type type14 = 'image' | 'video' | 'document';
10048
10502
 
10049
10503
  export type UploadTokenResponse = {
10050
10504
  token?: string;
@@ -10053,7 +10507,7 @@ export type UploadTokenResponse = {
10053
10507
  status?: 'pending' | 'completed' | 'expired';
10054
10508
  };
10055
10509
 
10056
- export type status25 = 'pending' | 'completed' | 'expired';
10510
+ export type status28 = 'pending' | 'completed' | 'expired';
10057
10511
 
10058
10512
  export type UploadTokenStatusResponse = {
10059
10513
  token?: string;
@@ -10552,7 +11006,7 @@ export type Verification = {
10552
11006
  resend?: boolean;
10553
11007
  };
10554
11008
 
10555
- export type status26 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
11009
+ export type status29 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
10556
11010
 
10557
11011
  export type channel4 = 'sms';
10558
11012
 
@@ -10579,7 +11033,7 @@ export type Webhook = {
10579
11033
  /**
10580
11034
  * Events subscribed to
10581
11035
  */
10582
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated')>;
11036
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted')>;
10583
11037
  /**
10584
11038
  * Whether webhook delivery is enabled
10585
11039
  */
@@ -10701,7 +11155,7 @@ export type WebhookLog = {
10701
11155
  /**
10702
11156
  * Delivery outcome
10703
11157
  */
10704
- export type status27 = 'success' | 'failed';
11158
+ export type status30 = 'success' | 'failed';
10705
11159
 
10706
11160
  /**
10707
11161
  * Webhook payload for `account.ads.initial_sync_completed` events.
@@ -10813,7 +11267,7 @@ export type event = 'account.ads.initial_sync_completed';
10813
11267
  /**
10814
11268
  * Overall outcome of the initial sync.
10815
11269
  */
10816
- export type status28 = 'success' | 'failure';
11270
+ export type status31 = 'success' | 'failure';
10817
11271
 
10818
11272
  /**
10819
11273
  * Stable category for UX branching. New values may be added; existing ones are
@@ -11528,7 +11982,46 @@ export type WebhookPayloadComment = {
11528
11982
 
11529
11983
  export type event12 = 'comment.received';
11530
11984
 
11531
- export type platform12 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
11985
+ export type platform13 = 'instagram' | 'facebook' | 'threads' | 'youtube' | 'linkedin' | 'bluesky' | 'reddit' | 'tiktok';
11986
+
11987
+ export type WebhookPayloadCommerceProduct = {
11988
+ id?: string;
11989
+ event?: 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted';
11990
+ /**
11991
+ * UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
11992
+ */
11993
+ timestamp?: string;
11994
+ store?: {
11995
+ /**
11996
+ * Zernio SocialAccount id of the store.
11997
+ */
11998
+ accountId?: string;
11999
+ platform?: 'shopify' | 'woocommerce';
12000
+ /**
12001
+ * The platform id of the shop.
12002
+ */
12003
+ shopId?: (string) | null;
12004
+ };
12005
+ resource?: {
12006
+ type?: 'product';
12007
+ /**
12008
+ * Platform-native product id.
12009
+ */
12010
+ id?: string;
12011
+ /**
12012
+ * Zernio product status; null on delete.
12013
+ */
12014
+ status?: (CommerceProductStatus | null);
12015
+ /**
12016
+ * Raw platform status, e.g. ACTIVE; null on delete.
12017
+ */
12018
+ platformStatus?: (string) | null;
12019
+ };
12020
+ };
12021
+
12022
+ export type event13 = 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted';
12023
+
12024
+ export type type15 = 'product';
11532
12025
 
11533
12026
  /**
11534
12027
  * WhatsApp only. Who answers a conversation changed: Meta Business Agent took it over,
@@ -11564,7 +12057,7 @@ export type WebhookPayloadConversationControlChanged = {
11564
12057
  timestamp: string;
11565
12058
  };
11566
12059
 
11567
- export type event13 = 'conversation.control_changed';
12060
+ export type event14 = 'conversation.control_changed';
11568
12061
 
11569
12062
  /**
11570
12063
  * Who answers now. ai_agent: Meta Business Agent; app: you; other: another partner app on the number.
@@ -11601,7 +12094,7 @@ export type WebhookPayloadConversationStarted = {
11601
12094
  timestamp: string;
11602
12095
  };
11603
12096
 
11604
- export type event14 = 'conversation.started';
12097
+ export type event15 = 'conversation.started';
11605
12098
 
11606
12099
  /**
11607
12100
  * Webhook payload for post.external.created / post.external.updated /
@@ -11633,7 +12126,7 @@ export type WebhookPayloadExternalPost = {
11633
12126
  timestamp: string;
11634
12127
  };
11635
12128
 
11636
- export type event15 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
12129
+ export type event16 = 'post.external.created' | 'post.external.updated' | 'post.external.deleted';
11637
12130
 
11638
12131
  /**
11639
12132
  * Webhook payload for lead.received events (Meta Lead Gen / Instant Forms).
@@ -11704,9 +12197,9 @@ export type WebhookPayloadLead = {
11704
12197
  timestamp: string;
11705
12198
  };
11706
12199
 
11707
- export type event16 = 'lead.received';
12200
+ export type event17 = 'lead.received';
11708
12201
 
11709
- export type platform13 = 'facebook';
12202
+ export type platform14 = 'facebook';
11710
12203
 
11711
12204
  /**
11712
12205
  * Webhook payload for message received events
@@ -12242,7 +12735,7 @@ export type WebhookPayloadMessage = {
12242
12735
  timestamp: string;
12243
12736
  };
12244
12737
 
12245
- export type event17 = 'message.received';
12738
+ export type event18 = 'message.received';
12246
12739
 
12247
12740
  /**
12248
12741
  * Which Zernio surface produced the message. Always present and
@@ -12303,7 +12796,7 @@ export type WebhookPayloadMessageDeleted = {
12303
12796
  timestamp: string;
12304
12797
  };
12305
12798
 
12306
- export type event18 = 'message.deleted';
12799
+ export type event19 = 'message.deleted';
12307
12800
 
12308
12801
  /**
12309
12802
  * Shared payload for message.delivered, message.read, and
@@ -12363,7 +12856,7 @@ export type WebhookPayloadMessageDeliveryStatus = {
12363
12856
  timestamp: string;
12364
12857
  };
12365
12858
 
12366
- export type event19 = 'message.delivered' | 'message.read' | 'message.failed';
12859
+ export type event20 = 'message.delivered' | 'message.read' | 'message.failed';
12367
12860
 
12368
12861
  /**
12369
12862
  * Webhook payload for message.edited events. Fires when the sender
@@ -12401,7 +12894,7 @@ export type WebhookPayloadMessageEdited = {
12401
12894
  timestamp: string;
12402
12895
  };
12403
12896
 
12404
- export type event20 = 'message.edited';
12897
+ export type event21 = 'message.edited';
12405
12898
 
12406
12899
  /**
12407
12900
  * Webhook payload for message sent events (fired when a message is sent via the API, or from the WhatsApp Business app on Coexistence numbers)
@@ -12617,12 +13110,12 @@ export type WebhookPayloadMessageSent = {
12617
13110
  timestamp: string;
12618
13111
  };
12619
13112
 
12620
- export type event21 = 'message.sent';
13113
+ export type event22 = 'message.sent';
12621
13114
 
12622
13115
  /**
12623
13116
  * Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
12624
13117
  */
12625
- export type platform14 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack' | 'tiktok' | 'imessage';
13118
+ export type platform15 = 'instagram' | 'facebook' | 'telegram' | 'whatsapp' | 'twitter' | 'reddit' | 'bluesky' | 'slack' | 'tiktok' | 'imessage';
12626
13119
 
12627
13120
  /**
12628
13121
  * WhatsApp send origin. whatsapp_business_app when sent from the WhatsApp Business phone app on a Coexistence number; cloud_api when sent through Zernio (dashboard, API, or broadcasts); meta_business_agent when Meta Business Agent answered on the number. Absent on non-WhatsApp platforms. Says where WhatsApp saw the send come from, not which Zernio surface produced it: read sentVia for that.
@@ -12671,7 +13164,7 @@ export type WebhookPayloadPhoneNumberStockAvailable = {
12671
13164
  timestamp: string;
12672
13165
  };
12673
13166
 
12674
- export type event22 = 'phone_number.stock_available';
13167
+ export type event23 = 'phone_number.stock_available';
12675
13168
 
12676
13169
  /**
12677
13170
  * Webhook payload for post events
@@ -12721,7 +13214,7 @@ export type WebhookPayloadPost = {
12721
13214
  timestamp: string;
12722
13215
  };
12723
13216
 
12724
- export type event23 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
13217
+ export type event24 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled';
12725
13218
 
12726
13219
  /**
12727
13220
  * Webhook payload for the per-platform terminal events
@@ -12840,12 +13333,12 @@ export type WebhookPayloadPostPlatform = {
12840
13333
  timestamp: string;
12841
13334
  };
12842
13335
 
12843
- export type event24 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
13336
+ export type event25 = 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved';
12844
13337
 
12845
13338
  /**
12846
13339
  * Terminal status this event fires on. Matches the event suffix.
12847
13340
  */
12848
- export type status29 = 'published' | 'failed' | 'deleted';
13341
+ export type status32 = 'published' | 'failed' | 'deleted';
12849
13342
 
12850
13343
  /**
12851
13344
  * Webhook payload for reaction received events (WhatsApp, Telegram, Slack, Instagram, Facebook Messenger, TikTok)
@@ -12900,7 +13393,7 @@ export type WebhookPayloadReaction = {
12900
13393
  timestamp: string;
12901
13394
  };
12902
13395
 
12903
- export type event25 = 'reaction.received';
13396
+ export type event26 = 'reaction.received';
12904
13397
 
12905
13398
  export type action = 'added' | 'removed';
12906
13399
 
@@ -12974,7 +13467,7 @@ export type WebhookPayloadReferral = {
12974
13467
  timestamp: string;
12975
13468
  };
12976
13469
 
12977
- export type event26 = 'referral.received';
13470
+ export type event27 = 'referral.received';
12978
13471
 
12979
13472
  /**
12980
13473
  * Webhook payload for the review.new event (new review posted on a connected account).
@@ -13001,7 +13494,7 @@ export type WebhookPayloadReviewNew = {
13001
13494
  timestamp: string;
13002
13495
  };
13003
13496
 
13004
- export type event27 = 'review.new';
13497
+ export type event28 = 'review.new';
13005
13498
 
13006
13499
  /**
13007
13500
  * Webhook payload for the review.updated event. Fired when the reviewer edits their
@@ -13034,7 +13527,7 @@ export type WebhookPayloadReviewUpdated = {
13034
13527
  timestamp: string;
13035
13528
  };
13036
13529
 
13037
- export type event28 = 'review.updated';
13530
+ export type event29 = 'review.updated';
13038
13531
 
13039
13532
  /**
13040
13533
  * Webhook payload for test deliveries
@@ -13055,7 +13548,7 @@ export type WebhookPayloadTest = {
13055
13548
  timestamp: string;
13056
13549
  };
13057
13550
 
13058
- export type event29 = 'webhook.test';
13551
+ export type event30 = 'webhook.test';
13059
13552
 
13060
13553
  /**
13061
13554
  * Webhook payload for the `whatsapp.account.name_status_updated` event.
@@ -13104,14 +13597,14 @@ export type WebhookPayloadWhatsAppAccountNameStatusUpdated = {
13104
13597
  timestamp: string;
13105
13598
  };
13106
13599
 
13107
- export type event30 = 'whatsapp.account.name_status_updated';
13600
+ export type event31 = 'whatsapp.account.name_status_updated';
13108
13601
 
13109
- export type platform15 = 'whatsapp';
13602
+ export type platform16 = 'whatsapp';
13110
13603
 
13111
13604
  /**
13112
13605
  * Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
13113
13606
  */
13114
- export type status30 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
13607
+ export type status33 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
13115
13608
 
13116
13609
  /**
13117
13610
  * Webhook payload for the `whatsapp.template.category_updated` event.
@@ -13175,7 +13668,7 @@ export type WebhookPayloadWhatsAppTemplateCategoryUpdated = {
13175
13668
  timestamp: string;
13176
13669
  };
13177
13670
 
13178
- export type event31 = 'whatsapp.template.category_updated';
13671
+ export type event32 = 'whatsapp.template.category_updated';
13179
13672
 
13180
13673
  /**
13181
13674
  * `scheduled` is Meta's 24h advance notice of an upcoming
@@ -13252,7 +13745,7 @@ export type WebhookPayloadWhatsAppTemplateStatusUpdated = {
13252
13745
  timestamp: string;
13253
13746
  };
13254
13747
 
13255
- export type event32 = 'whatsapp.template.status_updated';
13748
+ export type event33 = 'whatsapp.template.status_updated';
13256
13749
 
13257
13750
  /**
13258
13751
  * New status. Forwarded verbatim from Meta's `event` field.
@@ -13260,7 +13753,7 @@ export type event32 = 'whatsapp.template.status_updated';
13260
13753
  * request before the template is actually removed.
13261
13754
  *
13262
13755
  */
13263
- export type status31 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
13756
+ export type status34 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
13264
13757
 
13265
13758
  export type WhatsAppBodyComponent = {
13266
13759
  type: 'body';
@@ -13408,14 +13901,6 @@ export type WhatsAppSandboxSession = {
13408
13901
  createdAt?: (string) | null;
13409
13902
  };
13410
13903
 
13411
- /**
13412
- * `pending` until the phone replies to the activation template, then
13413
- * `active`. Expired sessions are pruned by TTL and never appear in
13414
- * list responses.
13415
- *
13416
- */
13417
- export type status32 = 'pending' | 'active';
13418
-
13419
13904
  export type WhatsAppTemplateButton = {
13420
13905
  type: 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
13421
13906
  /**
@@ -13448,7 +13933,7 @@ export type WhatsAppTemplateButton = {
13448
13933
  navigate_screen?: string;
13449
13934
  };
13450
13935
 
13451
- export type type13 = 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
13936
+ export type type16 = 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
13452
13937
 
13453
13938
  /**
13454
13939
  * Required when type is otp
@@ -13490,7 +13975,7 @@ export type WhatsAppTemplateLookupError = {
13490
13975
  };
13491
13976
  };
13492
13977
 
13493
- export type type14 = 'platform_error';
13978
+ export type type17 = 'platform_error';
13494
13979
 
13495
13980
  export type code = 'platform_api_error';
13496
13981
 
@@ -13572,7 +14057,7 @@ export type WorkflowExecutionEvent = {
13572
14057
 
13573
14058
  export type action2 = 'execution_started' | 'execution_completed' | 'execution_exited' | 'execution_paused' | 'execution_resumed' | 'node_started' | 'node_completed' | 'node_failed' | 'node_skipped';
13574
14059
 
13575
- export type status33 = 'success' | 'failed' | 'pending';
14060
+ export type status35 = 'success' | 'failed' | 'pending';
13576
14061
 
13577
14062
  /**
13578
14063
  * A node in a workflow graph. `config` shape depends on `type`.
@@ -13649,7 +14134,7 @@ export type WorkflowNode = {
13649
14134
  * integrations (webhook, ai, handoff, start_call).
13650
14135
  *
13651
14136
  */
13652
- export type type15 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
14137
+ export type type18 = 'trigger' | 'send_message' | 'wait_for_reply' | 'condition' | 'set_variable' | 'delay' | 'webhook' | 'ai' | 'handoff' | 'start_call' | 'a_b_split' | 'set_field' | 'enroll_sequence' | 'add_tag' | 'remove_tag' | 'end';
13653
14138
 
13654
14139
  /**
13655
14140
  * A single X API operation with its per-call price and the Zernio platform methods that trigger it.
@@ -13785,7 +14270,7 @@ export type XArticleBlock = {
13785
14270
  entity_ranges?: Array<XArticleEntityRange>;
13786
14271
  };
13787
14272
 
13788
- export type type16 = 'unstyled' | 'header-one' | 'header-two' | 'header-three' | 'unordered-list-item' | 'ordered-list-item' | 'blockquote' | 'atomic';
14273
+ export type type19 = 'unstyled' | 'header-one' | 'header-two' | 'header-three' | 'unordered-list-item' | 'ordered-list-item' | 'blockquote' | 'atomic';
13789
14274
 
13790
14275
  /**
13791
14276
  * X's snake_case content-state shape. Standard DraftJS camelCase fields such as entityMap, inlineStyleRanges, and entityRanges are rejected.
@@ -13864,7 +14349,7 @@ export type XArticleEntity = {
13864
14349
 
13865
14350
  export type mutability = 'immutable' | 'mutable' | 'segmented';
13866
14351
 
13867
- export type type17 = 'divider' | 'latex';
14352
+ export type type20 = 'divider' | 'latex';
13868
14353
 
13869
14354
  /**
13870
14355
  * The referenced entity must exist, and offset plus length must not exceed the containing block's text length.
@@ -23904,7 +24389,7 @@ export type CreateWebhookSettingsData = {
23904
24389
  /**
23905
24390
  * Events to subscribe to (at least one required)
23906
24391
  */
23907
- events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated')>;
24392
+ events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted')>;
23908
24393
  /**
23909
24394
  * Enable or disable webhook delivery. Defaults to `true` when omitted.
23910
24395
  */
@@ -23972,7 +24457,7 @@ export type UpdateWebhookSettingsData = {
23972
24457
  /**
23973
24458
  * Events to subscribe to. Must contain at least one event if provided.
23974
24459
  */
23975
- events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated')>;
24460
+ events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'post.platform.published' | 'post.platform.failed' | 'post.platform.deleted' | 'post.tiktok.url_resolved' | 'post.external.created' | 'post.external.updated' | 'post.external.deleted' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'account.ads.sync_failed' | 'account.ads.sync_recovered' | 'analytics.synced' | 'message.received' | 'conversation.started' | 'conversation.control_changed' | 'call.received' | 'call.ended' | 'call.failed' | 'call.permission_request' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'reaction.received' | 'referral.received' | 'comment.received' | 'review.new' | 'review.updated' | 'lead.received' | 'ad.status_changed' | 'whatsapp.template.status_updated' | 'whatsapp.template.category_updated' | 'whatsapp.account.name_status_updated' | 'whatsapp.automatic_event' | 'whatsapp.number.activated' | 'whatsapp.number.declined' | 'whatsapp.number.action_required' | 'whatsapp.number.verification_required' | 'whatsapp.number.suspended' | 'whatsapp.number.reactivated' | 'whatsapp.number.released' | 'whatsapp.number.kyc_submitted' | 'phone_number.stock_available' | 'verification.approved' | 'verification.failed' | 'sms.registration.action_required' | 'sms.registration.status_updated' | 'branded_calling.identity.status_updated' | 'branded_calling.identity.action_required' | 'branded_calling.number.status_updated' | 'rcs.agent.status_updated' | 'commerce.product.created' | 'commerce.product.updated' | 'commerce.product.deleted')>;
23976
24461
  /**
23977
24462
  * Enable or disable webhook delivery
23978
24463
  */
@@ -29127,6 +29612,56 @@ export type ListImessageAudienceError = (ErrorResponse | {
29127
29612
  error?: string;
29128
29613
  });
29129
29614
 
29615
+ export type ListImessageSandboxContactsResponse = ({
29616
+ sandbox?: {
29617
+ /**
29618
+ * Use as accountId to reply from the sandbox line
29619
+ */
29620
+ accountId?: string;
29621
+ /**
29622
+ * The sandbox line to message
29623
+ */
29624
+ handle?: string;
29625
+ contactLimit?: number;
29626
+ };
29627
+ contacts?: Array<ImessageSandboxContact>;
29628
+ });
29629
+
29630
+ export type ListImessageSandboxContactsError = ({
29631
+ error?: string;
29632
+ } | unknown);
29633
+
29634
+ export type AddImessageSandboxContactData = {
29635
+ body: {
29636
+ /**
29637
+ * Phone in international format (+15551234567) or an Apple ID email
29638
+ */
29639
+ handle: string;
29640
+ };
29641
+ };
29642
+
29643
+ export type AddImessageSandboxContactResponse = ({
29644
+ contact?: ImessageSandboxContact;
29645
+ });
29646
+
29647
+ export type AddImessageSandboxContactError = (ErrorResponse | {
29648
+ error?: string;
29649
+ } | unknown);
29650
+
29651
+ export type RemoveImessageSandboxContactData = {
29652
+ path: {
29653
+ contactId: string;
29654
+ };
29655
+ };
29656
+
29657
+ export type RemoveImessageSandboxContactResponse = ({
29658
+ success?: boolean;
29659
+ });
29660
+
29661
+ export type RemoveImessageSandboxContactError = (ErrorResponse | {
29662
+ error?: string;
29663
+ } | unknown);
29664
+
29130
29665
  export type SetImessageSubscriptionData = {
29131
29666
  body: {
29132
29667
  accountId: string;
@@ -50816,6 +51351,1814 @@ export type UpdateProductError = (ErrorResponse | {
50816
51351
  error?: string;
50817
51352
  } | unknown);
50818
51353
 
51354
+ export type GetCommerceStoreData = {
51355
+ query: {
51356
+ /**
51357
+ * Connected store SocialAccount id.
51358
+ */
51359
+ accountId: string;
51360
+ };
51361
+ };
51362
+
51363
+ export type GetCommerceStoreResponse = ({
51364
+ store?: CommerceStore;
51365
+ });
51366
+
51367
+ export type GetCommerceStoreError = (ErrorResponse | {
51368
+ error?: string;
51369
+ } | unknown);
51370
+
51371
+ export type ListCommerceProductsData = {
51372
+ query: {
51373
+ /**
51374
+ * Connected store SocialAccount id.
51375
+ */
51376
+ accountId: string;
51377
+ /**
51378
+ * Only products in this collection.
51379
+ */
51380
+ collectionId?: string;
51381
+ /**
51382
+ * Opaque cursor from a previous response. Omit for the first page.
51383
+ */
51384
+ cursor?: string;
51385
+ limit?: number;
51386
+ /**
51387
+ * Platform product search syntax (Shopify: title, vendor, product_type, tag, sku, handle, ...).
51388
+ */
51389
+ query?: string;
51390
+ status?: CommerceProductStatus;
51391
+ };
51392
+ };
51393
+
51394
+ export type ListCommerceProductsResponse = ({
51395
+ products?: Array<CommerceProduct>;
51396
+ nextCursor?: (string) | null;
51397
+ });
51398
+
51399
+ export type ListCommerceProductsError = (ErrorResponse | {
51400
+ error?: string;
51401
+ } | unknown);
51402
+
51403
+ export type CreateCommerceProductData = {
51404
+ body: {
51405
+ accountId: string;
51406
+ title: string;
51407
+ descriptionHtml?: string;
51408
+ handle?: string;
51409
+ vendor?: string;
51410
+ productType?: string;
51411
+ tags?: Array<(string)>;
51412
+ seo?: {
51413
+ title?: string;
51414
+ description?: string;
51415
+ };
51416
+ status?: 'draft' | 'active';
51417
+ images?: Array<{
51418
+ url: string;
51419
+ altText?: string;
51420
+ }>;
51421
+ options?: Array<{
51422
+ name: string;
51423
+ values: Array<(string)>;
51424
+ }>;
51425
+ variants: Array<{
51426
+ sku?: string;
51427
+ /**
51428
+ * Decimal amount in the store currency.
51429
+ */
51430
+ price: (number | string);
51431
+ compareAtPrice?: (number | string | null);
51432
+ /**
51433
+ * One value per product option, e.g. [{ name: Size, value: M }].
51434
+ */
51435
+ options?: Array<{
51436
+ name: string;
51437
+ value: string;
51438
+ }>;
51439
+ }>;
51440
+ };
51441
+ };
51442
+
51443
+ export type CreateCommerceProductResponse = ({
51444
+ product?: CommerceProduct;
51445
+ });
51446
+
51447
+ export type CreateCommerceProductError = (ErrorResponse | {
51448
+ error?: string;
51449
+ } | unknown);
51450
+
51451
+ export type ChangeCommerceProductStateData = {
51452
+ body: {
51453
+ accountId: string;
51454
+ productIds: Array<(string)>;
51455
+ action: 'activate' | 'deactivate' | 'archive' | 'delete';
51456
+ };
51457
+ };
51458
+
51459
+ export type ChangeCommerceProductStateResponse = ({
51460
+ action?: 'activate' | 'deactivate' | 'archive' | 'delete';
51461
+ succeeded?: Array<(string)>;
51462
+ failed?: Array<{
51463
+ productId?: string;
51464
+ message?: string;
51465
+ }>;
51466
+ });
51467
+
51468
+ export type ChangeCommerceProductStateError = (ErrorResponse | {
51469
+ error?: string;
51470
+ } | unknown);
51471
+
51472
+ export type GetCommerceProductData = {
51473
+ path: {
51474
+ /**
51475
+ * Platform-native product id.
51476
+ */
51477
+ productId: string;
51478
+ };
51479
+ query: {
51480
+ /**
51481
+ * Connected store SocialAccount id.
51482
+ */
51483
+ accountId: string;
51484
+ };
51485
+ };
51486
+
51487
+ export type GetCommerceProductResponse = ({
51488
+ product?: CommerceProduct;
51489
+ });
51490
+
51491
+ export type GetCommerceProductError = (ErrorResponse | {
51492
+ error?: string;
51493
+ } | unknown);
51494
+
51495
+ export type UpdateCommerceProductData = {
51496
+ body: {
51497
+ accountId: string;
51498
+ title?: string;
51499
+ descriptionHtml?: string;
51500
+ handle?: string;
51501
+ vendor?: string;
51502
+ productType?: string;
51503
+ tags?: Array<(string)>;
51504
+ seo?: {
51505
+ title?: string;
51506
+ description?: string;
51507
+ };
51508
+ };
51509
+ path: {
51510
+ /**
51511
+ * Platform-native product id.
51512
+ */
51513
+ productId: string;
51514
+ };
51515
+ };
51516
+
51517
+ export type UpdateCommerceProductResponse = ({
51518
+ product?: CommerceProduct;
51519
+ });
51520
+
51521
+ export type UpdateCommerceProductError = (ErrorResponse | {
51522
+ error?: string;
51523
+ } | unknown);
51524
+
51525
+ export type UpdateCommerceProductPricesData = {
51526
+ body: {
51527
+ accountId: string;
51528
+ variants: Array<{
51529
+ /**
51530
+ * Variant id from the product response.
51531
+ */
51532
+ id: string;
51533
+ price?: (number | string);
51534
+ compareAtPrice?: (number | string | null);
51535
+ }>;
51536
+ };
51537
+ path: {
51538
+ /**
51539
+ * Platform-native product id.
51540
+ */
51541
+ productId: string;
51542
+ };
51543
+ };
51544
+
51545
+ export type UpdateCommerceProductPricesResponse = ({
51546
+ product?: CommerceProduct;
51547
+ });
51548
+
51549
+ export type UpdateCommerceProductPricesError = (ErrorResponse | {
51550
+ error?: string;
51551
+ } | unknown);
51552
+
51553
+ export type ListCommerceCollectionsData = {
51554
+ query: {
51555
+ /**
51556
+ * Connected store SocialAccount id.
51557
+ */
51558
+ accountId: string;
51559
+ cursor?: string;
51560
+ limit?: number;
51561
+ /**
51562
+ * Platform collection search syntax (Shopify: title, handle, collection_type, ...).
51563
+ */
51564
+ query?: string;
51565
+ };
51566
+ };
51567
+
51568
+ export type ListCommerceCollectionsResponse = ({
51569
+ collections?: Array<CommerceCollection>;
51570
+ nextCursor?: (string) | null;
51571
+ });
51572
+
51573
+ export type ListCommerceCollectionsError = (ErrorResponse | {
51574
+ error?: string;
51575
+ } | unknown);
51576
+
51577
+ export type CreateCommerceCollectionData = {
51578
+ body: {
51579
+ accountId: string;
51580
+ title: string;
51581
+ descriptionHtml?: string;
51582
+ handle?: string;
51583
+ sortOrder?: 'manual' | 'best_selling' | 'alpha_asc' | 'alpha_desc' | 'price_asc' | 'price_desc' | 'created' | 'created_desc' | 'most_relevant';
51584
+ seo?: {
51585
+ title?: string;
51586
+ description?: string;
51587
+ };
51588
+ image?: {
51589
+ url: string;
51590
+ altText?: string;
51591
+ };
51592
+ productIds?: Array<(string)>;
51593
+ };
51594
+ };
51595
+
51596
+ export type CreateCommerceCollectionResponse = ({
51597
+ collection?: CommerceCollection;
51598
+ });
51599
+
51600
+ export type CreateCommerceCollectionError = (ErrorResponse | {
51601
+ error?: string;
51602
+ } | unknown);
51603
+
51604
+ export type GetCommerceCollectionData = {
51605
+ path: {
51606
+ /**
51607
+ * Platform-native collection id.
51608
+ */
51609
+ collectionId: string;
51610
+ };
51611
+ query: {
51612
+ /**
51613
+ * Connected store SocialAccount id.
51614
+ */
51615
+ accountId: string;
51616
+ };
51617
+ };
51618
+
51619
+ export type GetCommerceCollectionResponse = ({
51620
+ collection?: CommerceCollection;
51621
+ });
51622
+
51623
+ export type GetCommerceCollectionError = (ErrorResponse | {
51624
+ error?: string;
51625
+ } | unknown);
51626
+
51627
+ export type UpdateCommerceCollectionData = {
51628
+ body: {
51629
+ accountId: string;
51630
+ title?: string;
51631
+ descriptionHtml?: string;
51632
+ handle?: string;
51633
+ sortOrder?: 'manual' | 'best_selling' | 'alpha_asc' | 'alpha_desc' | 'price_asc' | 'price_desc' | 'created' | 'created_desc' | 'most_relevant';
51634
+ seo?: {
51635
+ title?: string;
51636
+ description?: string;
51637
+ };
51638
+ image?: {
51639
+ url: string;
51640
+ altText?: string;
51641
+ };
51642
+ };
51643
+ path: {
51644
+ /**
51645
+ * Platform-native collection id.
51646
+ */
51647
+ collectionId: string;
51648
+ };
51649
+ };
51650
+
51651
+ export type UpdateCommerceCollectionResponse = ({
51652
+ collection?: CommerceCollection;
51653
+ });
51654
+
51655
+ export type UpdateCommerceCollectionError = (ErrorResponse | {
51656
+ error?: string;
51657
+ } | unknown);
51658
+
51659
+ export type DeleteCommerceCollectionData = {
51660
+ path: {
51661
+ /**
51662
+ * Platform-native collection id.
51663
+ */
51664
+ collectionId: string;
51665
+ };
51666
+ query: {
51667
+ /**
51668
+ * Connected store SocialAccount id.
51669
+ */
51670
+ accountId: string;
51671
+ };
51672
+ };
51673
+
51674
+ export type DeleteCommerceCollectionResponse = ({
51675
+ deleted?: boolean;
51676
+ collectionId?: string;
51677
+ });
51678
+
51679
+ export type DeleteCommerceCollectionError = (ErrorResponse | {
51680
+ error?: string;
51681
+ } | unknown);
51682
+
51683
+ export type ChangeCommerceCollectionProductsData = {
51684
+ body: {
51685
+ accountId: string;
51686
+ add?: Array<(string)>;
51687
+ remove?: Array<(string)>;
51688
+ };
51689
+ path: {
51690
+ /**
51691
+ * Platform-native collection id.
51692
+ */
51693
+ collectionId: string;
51694
+ };
51695
+ };
51696
+
51697
+ export type ChangeCommerceCollectionProductsResponse = ({
51698
+ collection?: CommerceCollection;
51699
+ pending?: boolean;
51700
+ });
51701
+
51702
+ export type ChangeCommerceCollectionProductsError = (ErrorResponse | {
51703
+ error?: string;
51704
+ } | unknown);
51705
+
51706
+ export type CreateCommerceProductVariantsData = {
51707
+ body: {
51708
+ accountId: string;
51709
+ variants: Array<{
51710
+ sku?: string;
51711
+ price: (number | string);
51712
+ compareAtPrice?: (number | string | null);
51713
+ options?: Array<{
51714
+ name?: string;
51715
+ value?: string;
51716
+ }>;
51717
+ }>;
51718
+ };
51719
+ path: {
51720
+ /**
51721
+ * Platform-native id.
51722
+ */
51723
+ productId: string;
51724
+ };
51725
+ };
51726
+
51727
+ export type CreateCommerceProductVariantsResponse = ({
51728
+ product?: CommerceProduct;
51729
+ });
51730
+
51731
+ export type CreateCommerceProductVariantsError = (ErrorResponse | {
51732
+ error?: string;
51733
+ } | unknown);
51734
+
51735
+ export type DeleteCommerceProductVariantsData = {
51736
+ path: {
51737
+ /**
51738
+ * Platform-native id.
51739
+ */
51740
+ productId: string;
51741
+ };
51742
+ query: {
51743
+ /**
51744
+ * Connected store SocialAccount id.
51745
+ */
51746
+ accountId: string;
51747
+ /**
51748
+ * Comma-separated ids.
51749
+ */
51750
+ variantIds: string;
51751
+ };
51752
+ };
51753
+
51754
+ export type DeleteCommerceProductVariantsResponse = ({
51755
+ product?: CommerceProduct;
51756
+ });
51757
+
51758
+ export type DeleteCommerceProductVariantsError = (ErrorResponse | {
51759
+ error?: string;
51760
+ } | unknown);
51761
+
51762
+ export type CreateCommerceProductOptionsData = {
51763
+ body: {
51764
+ accountId: string;
51765
+ options: Array<{
51766
+ name: string;
51767
+ values: Array<(string)>;
51768
+ }>;
51769
+ createVariants?: boolean;
51770
+ };
51771
+ path: {
51772
+ /**
51773
+ * Platform-native id.
51774
+ */
51775
+ productId: string;
51776
+ };
51777
+ };
51778
+
51779
+ export type CreateCommerceProductOptionsResponse = ({
51780
+ product?: CommerceProduct;
51781
+ });
51782
+
51783
+ export type CreateCommerceProductOptionsError = (ErrorResponse | {
51784
+ error?: string;
51785
+ } | unknown);
51786
+
51787
+ export type DeleteCommerceProductOptionsData = {
51788
+ path: {
51789
+ /**
51790
+ * Platform-native id.
51791
+ */
51792
+ productId: string;
51793
+ };
51794
+ query: {
51795
+ /**
51796
+ * Connected store SocialAccount id.
51797
+ */
51798
+ accountId: string;
51799
+ /**
51800
+ * Comma-separated option names.
51801
+ */
51802
+ names: string;
51803
+ };
51804
+ };
51805
+
51806
+ export type DeleteCommerceProductOptionsResponse = ({
51807
+ product?: CommerceProduct;
51808
+ });
51809
+
51810
+ export type DeleteCommerceProductOptionsError = (ErrorResponse | {
51811
+ error?: string;
51812
+ } | unknown);
51813
+
51814
+ export type AddCommerceProductImagesData = {
51815
+ body: {
51816
+ accountId: string;
51817
+ images: Array<{
51818
+ url: string;
51819
+ altText?: string;
51820
+ }>;
51821
+ };
51822
+ path: {
51823
+ /**
51824
+ * Platform-native id.
51825
+ */
51826
+ productId: string;
51827
+ };
51828
+ };
51829
+
51830
+ export type AddCommerceProductImagesResponse = ({
51831
+ product?: CommerceProduct;
51832
+ });
51833
+
51834
+ export type AddCommerceProductImagesError = (ErrorResponse | {
51835
+ error?: string;
51836
+ } | unknown);
51837
+
51838
+ export type RemoveCommerceProductImagesData = {
51839
+ path: {
51840
+ /**
51841
+ * Platform-native id.
51842
+ */
51843
+ productId: string;
51844
+ };
51845
+ query: {
51846
+ /**
51847
+ * Connected store SocialAccount id.
51848
+ */
51849
+ accountId: string;
51850
+ /**
51851
+ * Comma-separated ids.
51852
+ */
51853
+ imageIds: string;
51854
+ };
51855
+ };
51856
+
51857
+ export type RemoveCommerceProductImagesResponse = ({
51858
+ product?: CommerceProduct;
51859
+ });
51860
+
51861
+ export type RemoveCommerceProductImagesError = (ErrorResponse | {
51862
+ error?: string;
51863
+ } | unknown);
51864
+
51865
+ export type ReorderCommerceProductImagesData = {
51866
+ body: {
51867
+ accountId: string;
51868
+ imageIds: Array<(string)>;
51869
+ };
51870
+ path: {
51871
+ /**
51872
+ * Platform-native id.
51873
+ */
51874
+ productId: string;
51875
+ };
51876
+ };
51877
+
51878
+ export type ReorderCommerceProductImagesResponse = ({
51879
+ pending?: boolean;
51880
+ });
51881
+
51882
+ export type ReorderCommerceProductImagesError = (ErrorResponse | {
51883
+ error?: string;
51884
+ } | unknown);
51885
+
51886
+ export type DuplicateCommerceProductData = {
51887
+ body: {
51888
+ accountId: string;
51889
+ title: string;
51890
+ status?: 'draft' | 'active';
51891
+ includeImages?: boolean;
51892
+ };
51893
+ path: {
51894
+ /**
51895
+ * Platform-native id.
51896
+ */
51897
+ productId: string;
51898
+ };
51899
+ };
51900
+
51901
+ export type DuplicateCommerceProductResponse = ({
51902
+ product?: CommerceProduct;
51903
+ });
51904
+
51905
+ export type DuplicateCommerceProductError = (ErrorResponse | {
51906
+ error?: string;
51907
+ } | unknown);
51908
+
51909
+ export type ListProductMetafieldsData = {
51910
+ path: {
51911
+ /**
51912
+ * Platform-native id.
51913
+ */
51914
+ productId: string;
51915
+ };
51916
+ query: {
51917
+ /**
51918
+ * Connected store SocialAccount id.
51919
+ */
51920
+ accountId: string;
51921
+ };
51922
+ };
51923
+
51924
+ export type ListProductMetafieldsResponse = ({
51925
+ metafields?: Array<CommerceMetafield>;
51926
+ });
51927
+
51928
+ export type ListProductMetafieldsError = (ErrorResponse | {
51929
+ error?: string;
51930
+ } | unknown);
51931
+
51932
+ export type SetProductMetafieldsData = {
51933
+ body: {
51934
+ accountId: string;
51935
+ metafields: Array<CommerceMetafield>;
51936
+ };
51937
+ path: {
51938
+ /**
51939
+ * Platform-native id.
51940
+ */
51941
+ productId: string;
51942
+ };
51943
+ };
51944
+
51945
+ export type SetProductMetafieldsResponse = ({
51946
+ metafields?: Array<CommerceMetafield>;
51947
+ });
51948
+
51949
+ export type SetProductMetafieldsError = (ErrorResponse | {
51950
+ error?: string;
51951
+ } | unknown);
51952
+
51953
+ export type DeleteProductMetafieldsData = {
51954
+ path: {
51955
+ /**
51956
+ * Platform-native id.
51957
+ */
51958
+ productId: string;
51959
+ };
51960
+ query: {
51961
+ /**
51962
+ * Connected store SocialAccount id.
51963
+ */
51964
+ accountId: string;
51965
+ /**
51966
+ * Comma-separated namespace.key pairs.
51967
+ */
51968
+ keys: string;
51969
+ };
51970
+ };
51971
+
51972
+ export type DeleteProductMetafieldsResponse = ({
51973
+ deleted?: number;
51974
+ });
51975
+
51976
+ export type DeleteProductMetafieldsError = (ErrorResponse | {
51977
+ error?: string;
51978
+ } | unknown);
51979
+
51980
+ export type ChangeProductChannelsData = {
51981
+ body: {
51982
+ accountId: string;
51983
+ /**
51984
+ * Channel ids from GET /v1/commerce/channels.
51985
+ */
51986
+ publish?: Array<(string)>;
51987
+ unpublish?: Array<(string)>;
51988
+ };
51989
+ path: {
51990
+ /**
51991
+ * Platform-native id.
51992
+ */
51993
+ productId: string;
51994
+ };
51995
+ };
51996
+
51997
+ export type ChangeProductChannelsResponse = ({
51998
+ productId?: string;
51999
+ published?: Array<(string)>;
52000
+ unpublished?: Array<(string)>;
52001
+ });
52002
+
52003
+ export type ChangeProductChannelsError = (ErrorResponse | {
52004
+ error?: string;
52005
+ } | unknown);
52006
+
52007
+ export type ListCollectionMetafieldsData = {
52008
+ path: {
52009
+ /**
52010
+ * Platform-native id.
52011
+ */
52012
+ collectionId: string;
52013
+ };
52014
+ query: {
52015
+ /**
52016
+ * Connected store SocialAccount id.
52017
+ */
52018
+ accountId: string;
52019
+ };
52020
+ };
52021
+
52022
+ export type ListCollectionMetafieldsResponse = ({
52023
+ metafields?: Array<CommerceMetafield>;
52024
+ });
52025
+
52026
+ export type ListCollectionMetafieldsError = (ErrorResponse | {
52027
+ error?: string;
52028
+ } | unknown);
52029
+
52030
+ export type SetCollectionMetafieldsData = {
52031
+ body: {
52032
+ accountId: string;
52033
+ metafields: Array<CommerceMetafield>;
52034
+ };
52035
+ path: {
52036
+ /**
52037
+ * Platform-native id.
52038
+ */
52039
+ collectionId: string;
52040
+ };
52041
+ };
52042
+
52043
+ export type SetCollectionMetafieldsResponse = ({
52044
+ metafields?: Array<CommerceMetafield>;
52045
+ });
52046
+
52047
+ export type SetCollectionMetafieldsError = (ErrorResponse | {
52048
+ error?: string;
52049
+ } | unknown);
52050
+
52051
+ export type DeleteCollectionMetafieldsData = {
52052
+ path: {
52053
+ /**
52054
+ * Platform-native id.
52055
+ */
52056
+ collectionId: string;
52057
+ };
52058
+ query: {
52059
+ /**
52060
+ * Connected store SocialAccount id.
52061
+ */
52062
+ accountId: string;
52063
+ /**
52064
+ * Comma-separated namespace.key pairs.
52065
+ */
52066
+ keys: string;
52067
+ };
52068
+ };
52069
+
52070
+ export type DeleteCollectionMetafieldsResponse = ({
52071
+ deleted?: number;
52072
+ });
52073
+
52074
+ export type DeleteCollectionMetafieldsError = (ErrorResponse | {
52075
+ error?: string;
52076
+ } | unknown);
52077
+
52078
+ export type ChangeCollectionChannelsData = {
52079
+ body: {
52080
+ accountId: string;
52081
+ /**
52082
+ * Channel ids from GET /v1/commerce/channels.
52083
+ */
52084
+ publish?: Array<(string)>;
52085
+ unpublish?: Array<(string)>;
52086
+ };
52087
+ path: {
52088
+ /**
52089
+ * Platform-native id.
52090
+ */
52091
+ collectionId: string;
52092
+ };
52093
+ };
52094
+
52095
+ export type ChangeCollectionChannelsResponse = ({
52096
+ collectionId?: string;
52097
+ published?: Array<(string)>;
52098
+ unpublished?: Array<(string)>;
52099
+ });
52100
+
52101
+ export type ChangeCollectionChannelsError = (ErrorResponse | {
52102
+ error?: string;
52103
+ } | unknown);
52104
+
52105
+ export type ChangeCommerceProductTagsData = {
52106
+ body: {
52107
+ accountId: string;
52108
+ productIds: Array<(string)>;
52109
+ add?: Array<(string)>;
52110
+ remove?: Array<(string)>;
52111
+ };
52112
+ };
52113
+
52114
+ export type ChangeCommerceProductTagsResponse = ({
52115
+ succeeded?: Array<(string)>;
52116
+ failed?: Array<{
52117
+ id?: string;
52118
+ message?: string;
52119
+ }>;
52120
+ });
52121
+
52122
+ export type ChangeCommerceProductTagsError = (ErrorResponse | {
52123
+ error?: string;
52124
+ } | unknown);
52125
+
52126
+ export type ReorderCommerceCollectionProductsData = {
52127
+ body: {
52128
+ accountId: string;
52129
+ moves: Array<{
52130
+ productId: string;
52131
+ position: number;
52132
+ }>;
52133
+ };
52134
+ path: {
52135
+ /**
52136
+ * Platform-native id.
52137
+ */
52138
+ collectionId: string;
52139
+ };
52140
+ };
52141
+
52142
+ export type ReorderCommerceCollectionProductsResponse = ({
52143
+ pending?: boolean;
52144
+ });
52145
+
52146
+ export type ReorderCommerceCollectionProductsError = (ErrorResponse | {
52147
+ error?: string;
52148
+ } | unknown);
52149
+
52150
+ export type ListCommercePagesData = {
52151
+ query: {
52152
+ /**
52153
+ * Connected store SocialAccount id.
52154
+ */
52155
+ accountId: string;
52156
+ cursor?: string;
52157
+ limit?: number;
52158
+ /**
52159
+ * Platform search syntax, passed through.
52160
+ */
52161
+ query?: string;
52162
+ };
52163
+ };
52164
+
52165
+ export type ListCommercePagesResponse = ({
52166
+ pages?: Array<CommercePage>;
52167
+ nextCursor?: (string) | null;
52168
+ });
52169
+
52170
+ export type ListCommercePagesError = (ErrorResponse | {
52171
+ error?: string;
52172
+ } | unknown);
52173
+
52174
+ export type CreateCommercePageData = {
52175
+ body: {
52176
+ accountId: string;
52177
+ title: string;
52178
+ handle?: string;
52179
+ bodyHtml?: string;
52180
+ isPublished?: boolean;
52181
+ };
52182
+ };
52183
+
52184
+ export type CreateCommercePageResponse = ({
52185
+ page?: CommercePage;
52186
+ });
52187
+
52188
+ export type CreateCommercePageError = (ErrorResponse | {
52189
+ error?: string;
52190
+ } | unknown);
52191
+
52192
+ export type GetCommercePageData = {
52193
+ path: {
52194
+ /**
52195
+ * Platform-native id.
52196
+ */
52197
+ pageId: string;
52198
+ };
52199
+ query: {
52200
+ /**
52201
+ * Connected store SocialAccount id.
52202
+ */
52203
+ accountId: string;
52204
+ };
52205
+ };
52206
+
52207
+ export type GetCommercePageResponse = ({
52208
+ page?: CommercePage;
52209
+ });
52210
+
52211
+ export type GetCommercePageError = (ErrorResponse | {
52212
+ error?: string;
52213
+ } | unknown);
52214
+
52215
+ export type UpdateCommercePageData = {
52216
+ body: {
52217
+ accountId: string;
52218
+ title?: string;
52219
+ handle?: string;
52220
+ bodyHtml?: string;
52221
+ isPublished?: boolean;
52222
+ };
52223
+ path: {
52224
+ /**
52225
+ * Platform-native id.
52226
+ */
52227
+ pageId: string;
52228
+ };
52229
+ };
52230
+
52231
+ export type UpdateCommercePageResponse = ({
52232
+ page?: CommercePage;
52233
+ });
52234
+
52235
+ export type UpdateCommercePageError = (ErrorResponse | {
52236
+ error?: string;
52237
+ } | unknown);
52238
+
52239
+ export type DeleteCommercePageData = {
52240
+ path: {
52241
+ /**
52242
+ * Platform-native id.
52243
+ */
52244
+ pageId: string;
52245
+ };
52246
+ query: {
52247
+ /**
52248
+ * Connected store SocialAccount id.
52249
+ */
52250
+ accountId: string;
52251
+ };
52252
+ };
52253
+
52254
+ export type DeleteCommercePageResponse = ({
52255
+ deleted?: boolean;
52256
+ pageId?: string;
52257
+ });
52258
+
52259
+ export type DeleteCommercePageError = (ErrorResponse | {
52260
+ error?: string;
52261
+ } | unknown);
52262
+
52263
+ export type ListCommerceLocationsData = {
52264
+ query: {
52265
+ /**
52266
+ * Connected store SocialAccount id.
52267
+ */
52268
+ accountId: string;
52269
+ };
52270
+ };
52271
+
52272
+ export type ListCommerceLocationsResponse = ({
52273
+ locations?: Array<CommerceLocation>;
52274
+ });
52275
+
52276
+ export type ListCommerceLocationsError = (ErrorResponse | {
52277
+ error?: string;
52278
+ } | unknown);
52279
+
52280
+ export type ListCommerceInventoryData = {
52281
+ query: {
52282
+ /**
52283
+ * Connected store SocialAccount id.
52284
+ */
52285
+ accountId: string;
52286
+ productId: string;
52287
+ };
52288
+ };
52289
+
52290
+ export type ListCommerceInventoryResponse = ({
52291
+ inventory?: Array<CommerceInventoryItem>;
52292
+ });
52293
+
52294
+ export type ListCommerceInventoryError = (ErrorResponse | {
52295
+ error?: string;
52296
+ } | unknown);
52297
+
52298
+ export type ChangeCommerceInventoryData = {
52299
+ body: {
52300
+ accountId: string;
52301
+ mode?: 'set' | 'adjust';
52302
+ changes: Array<{
52303
+ variantId: string;
52304
+ locationId: string;
52305
+ quantity: number;
52306
+ }>;
52307
+ };
52308
+ path: {
52309
+ /**
52310
+ * Platform-native id.
52311
+ */
52312
+ productId: string;
52313
+ };
52314
+ };
52315
+
52316
+ export type ChangeCommerceInventoryResponse = ({
52317
+ inventory?: Array<CommerceInventoryItem>;
52318
+ });
52319
+
52320
+ export type ChangeCommerceInventoryError = (ErrorResponse | {
52321
+ error?: string;
52322
+ } | unknown);
52323
+
52324
+ export type ListCommerceChannelsData = {
52325
+ query: {
52326
+ /**
52327
+ * Connected store SocialAccount id.
52328
+ */
52329
+ accountId: string;
52330
+ };
52331
+ };
52332
+
52333
+ export type ListCommerceChannelsResponse = ({
52334
+ channels?: Array<CommerceChannel>;
52335
+ });
52336
+
52337
+ export type ListCommerceChannelsError = (ErrorResponse | {
52338
+ error?: string;
52339
+ } | unknown);
52340
+
52341
+ export type ListCommerceDiscountsData = {
52342
+ query: {
52343
+ /**
52344
+ * Connected store SocialAccount id.
52345
+ */
52346
+ accountId: string;
52347
+ cursor?: string;
52348
+ limit?: number;
52349
+ /**
52350
+ * Platform search syntax, passed through.
52351
+ */
52352
+ query?: string;
52353
+ };
52354
+ };
52355
+
52356
+ export type ListCommerceDiscountsResponse = ({
52357
+ discounts?: Array<CommerceDiscount>;
52358
+ nextCursor?: (string) | null;
52359
+ });
52360
+
52361
+ export type ListCommerceDiscountsError = (ErrorResponse | {
52362
+ error?: string;
52363
+ } | unknown);
52364
+
52365
+ export type CreateCommerceDiscountData = {
52366
+ body: {
52367
+ accountId: string;
52368
+ title: string;
52369
+ method: 'code' | 'automatic';
52370
+ type: 'percentage' | 'fixed_amount' | 'free_shipping';
52371
+ /**
52372
+ * Required for method code.
52373
+ */
52374
+ code?: string;
52375
+ /**
52376
+ * For type percentage, e.g. 15 for 15%.
52377
+ */
52378
+ percentage?: number;
52379
+ /**
52380
+ * For type fixed_amount, a decimal in the store currency.
52381
+ */
52382
+ amount?: string;
52383
+ /**
52384
+ * fixed_amount only: take the amount off each item instead of once per order.
52385
+ */
52386
+ appliesOnEachItem?: boolean;
52387
+ /**
52388
+ * Minimum order subtotal, a decimal in the store currency.
52389
+ */
52390
+ minimumSubtotal?: (string) | null;
52391
+ minimumQuantity?: (number) | null;
52392
+ /**
52393
+ * Code discounts only: total uses allowed.
52394
+ */
52395
+ usageLimit?: (number) | null;
52396
+ /**
52397
+ * Code discounts only.
52398
+ */
52399
+ oncePerCustomer?: boolean;
52400
+ /**
52401
+ * Defaults to now.
52402
+ */
52403
+ startsAt?: string;
52404
+ endsAt?: (string) | null;
52405
+ productIds?: Array<(string)>;
52406
+ collectionIds?: Array<(string)>;
52407
+ };
52408
+ };
52409
+
52410
+ export type CreateCommerceDiscountResponse = ({
52411
+ discount?: CommerceDiscount;
52412
+ });
52413
+
52414
+ export type CreateCommerceDiscountError = (ErrorResponse | {
52415
+ error?: string;
52416
+ } | unknown);
52417
+
52418
+ export type GetCommerceDiscountData = {
52419
+ path: {
52420
+ /**
52421
+ * Platform-native id.
52422
+ */
52423
+ discountId: string;
52424
+ };
52425
+ query: {
52426
+ /**
52427
+ * Connected store SocialAccount id.
52428
+ */
52429
+ accountId: string;
52430
+ };
52431
+ };
52432
+
52433
+ export type GetCommerceDiscountResponse = ({
52434
+ discount?: CommerceDiscount;
52435
+ });
52436
+
52437
+ export type GetCommerceDiscountError = (ErrorResponse | {
52438
+ error?: string;
52439
+ } | unknown);
52440
+
52441
+ export type UpdateCommerceDiscountData = {
52442
+ body: {
52443
+ accountId: string;
52444
+ title?: string;
52445
+ /**
52446
+ * Required for method code.
52447
+ */
52448
+ code?: string;
52449
+ /**
52450
+ * For type percentage, e.g. 15 for 15%.
52451
+ */
52452
+ percentage?: number;
52453
+ /**
52454
+ * For type fixed_amount, a decimal in the store currency.
52455
+ */
52456
+ amount?: string;
52457
+ /**
52458
+ * fixed_amount only: take the amount off each item instead of once per order.
52459
+ */
52460
+ appliesOnEachItem?: boolean;
52461
+ /**
52462
+ * Minimum order subtotal, a decimal in the store currency.
52463
+ */
52464
+ minimumSubtotal?: (string) | null;
52465
+ minimumQuantity?: (number) | null;
52466
+ /**
52467
+ * Code discounts only: total uses allowed.
52468
+ */
52469
+ usageLimit?: (number) | null;
52470
+ /**
52471
+ * Code discounts only.
52472
+ */
52473
+ oncePerCustomer?: boolean;
52474
+ /**
52475
+ * Defaults to now.
52476
+ */
52477
+ startsAt?: string;
52478
+ endsAt?: (string) | null;
52479
+ };
52480
+ path: {
52481
+ /**
52482
+ * Platform-native id.
52483
+ */
52484
+ discountId: string;
52485
+ };
52486
+ };
52487
+
52488
+ export type UpdateCommerceDiscountResponse = ({
52489
+ discount?: CommerceDiscount;
52490
+ });
52491
+
52492
+ export type UpdateCommerceDiscountError = (ErrorResponse | {
52493
+ error?: string;
52494
+ } | unknown);
52495
+
52496
+ export type DeleteCommerceDiscountData = {
52497
+ path: {
52498
+ /**
52499
+ * Platform-native id.
52500
+ */
52501
+ discountId: string;
52502
+ };
52503
+ query: {
52504
+ /**
52505
+ * Connected store SocialAccount id.
52506
+ */
52507
+ accountId: string;
52508
+ };
52509
+ };
52510
+
52511
+ export type DeleteCommerceDiscountResponse = ({
52512
+ deleted?: boolean;
52513
+ discountId?: string;
52514
+ });
52515
+
52516
+ export type DeleteCommerceDiscountError = (ErrorResponse | {
52517
+ error?: string;
52518
+ } | unknown);
52519
+
52520
+ export type SetCommerceDiscountActiveData = {
52521
+ body: {
52522
+ accountId: string;
52523
+ active: boolean;
52524
+ };
52525
+ path: {
52526
+ /**
52527
+ * Platform-native id.
52528
+ */
52529
+ discountId: string;
52530
+ };
52531
+ };
52532
+
52533
+ export type SetCommerceDiscountActiveResponse = ({
52534
+ discount?: CommerceDiscount;
52535
+ });
52536
+
52537
+ export type SetCommerceDiscountActiveError = (ErrorResponse | {
52538
+ error?: string;
52539
+ } | unknown);
52540
+
52541
+ export type AddCommerceDiscountCodesData = {
52542
+ body: {
52543
+ accountId: string;
52544
+ codes: Array<(string)>;
52545
+ };
52546
+ path: {
52547
+ /**
52548
+ * Platform-native id.
52549
+ */
52550
+ discountId: string;
52551
+ };
52552
+ };
52553
+
52554
+ export type AddCommerceDiscountCodesResponse = ({
52555
+ pending?: boolean;
52556
+ });
52557
+
52558
+ export type AddCommerceDiscountCodesError = (ErrorResponse | {
52559
+ error?: string;
52560
+ } | unknown);
52561
+
52562
+ export type ListCommerceRedirectsData = {
52563
+ query: {
52564
+ /**
52565
+ * Connected store SocialAccount id.
52566
+ */
52567
+ accountId: string;
52568
+ cursor?: string;
52569
+ limit?: number;
52570
+ /**
52571
+ * Platform search syntax, passed through.
52572
+ */
52573
+ query?: string;
52574
+ };
52575
+ };
52576
+
52577
+ export type ListCommerceRedirectsResponse = ({
52578
+ redirects?: Array<CommerceRedirect>;
52579
+ nextCursor?: (string) | null;
52580
+ });
52581
+
52582
+ export type ListCommerceRedirectsError = (ErrorResponse | {
52583
+ error?: string;
52584
+ } | unknown);
52585
+
52586
+ export type CreateCommerceRedirectData = {
52587
+ body: {
52588
+ accountId: string;
52589
+ /**
52590
+ * The old path, starting with /.
52591
+ */
52592
+ path: string;
52593
+ /**
52594
+ * Where to send visitors: a path or a full URL.
52595
+ */
52596
+ target: string;
52597
+ };
52598
+ };
52599
+
52600
+ export type CreateCommerceRedirectResponse = ({
52601
+ redirect?: CommerceRedirect;
52602
+ });
52603
+
52604
+ export type CreateCommerceRedirectError = (ErrorResponse | {
52605
+ error?: string;
52606
+ } | unknown);
52607
+
52608
+ export type UpdateCommerceRedirectData = {
52609
+ body: {
52610
+ accountId: string;
52611
+ path?: string;
52612
+ target?: string;
52613
+ };
52614
+ path: {
52615
+ /**
52616
+ * Platform-native id.
52617
+ */
52618
+ redirectId: string;
52619
+ };
52620
+ };
52621
+
52622
+ export type UpdateCommerceRedirectResponse = ({
52623
+ redirect?: CommerceRedirect;
52624
+ });
52625
+
52626
+ export type UpdateCommerceRedirectError = (ErrorResponse | {
52627
+ error?: string;
52628
+ } | unknown);
52629
+
52630
+ export type DeleteCommerceRedirectData = {
52631
+ path: {
52632
+ /**
52633
+ * Platform-native id.
52634
+ */
52635
+ redirectId: string;
52636
+ };
52637
+ query: {
52638
+ /**
52639
+ * Connected store SocialAccount id.
52640
+ */
52641
+ accountId: string;
52642
+ };
52643
+ };
52644
+
52645
+ export type DeleteCommerceRedirectResponse = ({
52646
+ deleted?: boolean;
52647
+ redirectId?: string;
52648
+ });
52649
+
52650
+ export type DeleteCommerceRedirectError = (ErrorResponse | {
52651
+ error?: string;
52652
+ } | unknown);
52653
+
52654
+ export type ListCommerceMenusData = {
52655
+ query: {
52656
+ /**
52657
+ * Connected store SocialAccount id.
52658
+ */
52659
+ accountId: string;
52660
+ };
52661
+ };
52662
+
52663
+ export type ListCommerceMenusResponse = ({
52664
+ menus?: Array<CommerceMenu>;
52665
+ });
52666
+
52667
+ export type ListCommerceMenusError = (ErrorResponse | {
52668
+ error?: string;
52669
+ } | unknown);
52670
+
52671
+ export type CreateCommerceMenuData = {
52672
+ body: {
52673
+ accountId: string;
52674
+ title: string;
52675
+ handle: string;
52676
+ items: Array<CommerceMenuItemInput>;
52677
+ };
52678
+ };
52679
+
52680
+ export type CreateCommerceMenuResponse = ({
52681
+ menu?: CommerceMenu;
52682
+ });
52683
+
52684
+ export type CreateCommerceMenuError = (ErrorResponse | {
52685
+ error?: string;
52686
+ } | unknown);
52687
+
52688
+ export type GetCommerceMenuData = {
52689
+ path: {
52690
+ /**
52691
+ * Platform-native id.
52692
+ */
52693
+ menuId: string;
52694
+ };
52695
+ query: {
52696
+ /**
52697
+ * Connected store SocialAccount id.
52698
+ */
52699
+ accountId: string;
52700
+ };
52701
+ };
52702
+
52703
+ export type GetCommerceMenuResponse = ({
52704
+ menu?: CommerceMenu;
52705
+ });
52706
+
52707
+ export type GetCommerceMenuError = (ErrorResponse | {
52708
+ error?: string;
52709
+ } | unknown);
52710
+
52711
+ export type UpdateCommerceMenuData = {
52712
+ body: {
52713
+ accountId: string;
52714
+ title: string;
52715
+ handle?: string;
52716
+ items: Array<CommerceMenuItemInput>;
52717
+ };
52718
+ path: {
52719
+ /**
52720
+ * Platform-native id.
52721
+ */
52722
+ menuId: string;
52723
+ };
52724
+ };
52725
+
52726
+ export type UpdateCommerceMenuResponse = ({
52727
+ menu?: CommerceMenu;
52728
+ });
52729
+
52730
+ export type UpdateCommerceMenuError = (ErrorResponse | {
52731
+ error?: string;
52732
+ } | unknown);
52733
+
52734
+ export type DeleteCommerceMenuData = {
52735
+ path: {
52736
+ /**
52737
+ * Platform-native id.
52738
+ */
52739
+ menuId: string;
52740
+ };
52741
+ query: {
52742
+ /**
52743
+ * Connected store SocialAccount id.
52744
+ */
52745
+ accountId: string;
52746
+ };
52747
+ };
52748
+
52749
+ export type DeleteCommerceMenuResponse = ({
52750
+ deleted?: boolean;
52751
+ menuId?: string;
52752
+ });
52753
+
52754
+ export type DeleteCommerceMenuError = (ErrorResponse | {
52755
+ error?: string;
52756
+ } | unknown);
52757
+
52758
+ export type ListCommerceMetaobjectDefinitionsData = {
52759
+ query: {
52760
+ /**
52761
+ * Connected store SocialAccount id.
52762
+ */
52763
+ accountId: string;
52764
+ };
52765
+ };
52766
+
52767
+ export type ListCommerceMetaobjectDefinitionsResponse = ({
52768
+ definitions?: Array<CommerceMetaobjectDefinition>;
52769
+ });
52770
+
52771
+ export type ListCommerceMetaobjectDefinitionsError = (ErrorResponse | {
52772
+ error?: string;
52773
+ } | unknown);
52774
+
52775
+ export type ListCommerceMetaobjectsData = {
52776
+ query: {
52777
+ /**
52778
+ * Connected store SocialAccount id.
52779
+ */
52780
+ accountId: string;
52781
+ cursor?: string;
52782
+ limit?: number;
52783
+ /**
52784
+ * Definition type from GET /v1/commerce/metaobject-definitions.
52785
+ */
52786
+ type: string;
52787
+ };
52788
+ };
52789
+
52790
+ export type ListCommerceMetaobjectsResponse = ({
52791
+ metaobjects?: Array<CommerceMetaobject>;
52792
+ nextCursor?: (string) | null;
52793
+ });
52794
+
52795
+ export type ListCommerceMetaobjectsError = (ErrorResponse | {
52796
+ error?: string;
52797
+ } | unknown);
52798
+
52799
+ export type CreateCommerceMetaobjectData = {
52800
+ body: {
52801
+ accountId: string;
52802
+ type: string;
52803
+ handle?: string;
52804
+ fields: Array<{
52805
+ key: string;
52806
+ value: string;
52807
+ }>;
52808
+ };
52809
+ };
52810
+
52811
+ export type CreateCommerceMetaobjectResponse = ({
52812
+ metaobject?: CommerceMetaobject;
52813
+ });
52814
+
52815
+ export type CreateCommerceMetaobjectError = (ErrorResponse | {
52816
+ error?: string;
52817
+ } | unknown);
52818
+
52819
+ export type GetCommerceMetaobjectData = {
52820
+ path: {
52821
+ /**
52822
+ * Platform-native id.
52823
+ */
52824
+ metaobjectId: string;
52825
+ };
52826
+ query: {
52827
+ /**
52828
+ * Connected store SocialAccount id.
52829
+ */
52830
+ accountId: string;
52831
+ };
52832
+ };
52833
+
52834
+ export type GetCommerceMetaobjectResponse = ({
52835
+ metaobject?: CommerceMetaobject;
52836
+ });
52837
+
52838
+ export type GetCommerceMetaobjectError = (ErrorResponse | {
52839
+ error?: string;
52840
+ } | unknown);
52841
+
52842
+ export type UpdateCommerceMetaobjectData = {
52843
+ body: {
52844
+ accountId: string;
52845
+ handle?: string;
52846
+ fields: Array<{
52847
+ key: string;
52848
+ value: string;
52849
+ }>;
52850
+ };
52851
+ path: {
52852
+ /**
52853
+ * Platform-native id.
52854
+ */
52855
+ metaobjectId: string;
52856
+ };
52857
+ };
52858
+
52859
+ export type UpdateCommerceMetaobjectResponse = ({
52860
+ metaobject?: CommerceMetaobject;
52861
+ });
52862
+
52863
+ export type UpdateCommerceMetaobjectError = (ErrorResponse | {
52864
+ error?: string;
52865
+ } | unknown);
52866
+
52867
+ export type DeleteCommerceMetaobjectData = {
52868
+ path: {
52869
+ /**
52870
+ * Platform-native id.
52871
+ */
52872
+ metaobjectId: string;
52873
+ };
52874
+ query: {
52875
+ /**
52876
+ * Connected store SocialAccount id.
52877
+ */
52878
+ accountId: string;
52879
+ };
52880
+ };
52881
+
52882
+ export type DeleteCommerceMetaobjectResponse = ({
52883
+ deleted?: boolean;
52884
+ metaobjectId?: string;
52885
+ });
52886
+
52887
+ export type DeleteCommerceMetaobjectError = (ErrorResponse | {
52888
+ error?: string;
52889
+ } | unknown);
52890
+
52891
+ export type ListCommerceMarketsData = {
52892
+ query: {
52893
+ /**
52894
+ * Connected store SocialAccount id.
52895
+ */
52896
+ accountId: string;
52897
+ };
52898
+ };
52899
+
52900
+ export type ListCommerceMarketsResponse = ({
52901
+ markets?: Array<CommerceMarket>;
52902
+ });
52903
+
52904
+ export type ListCommerceMarketsError = (ErrorResponse | {
52905
+ error?: string;
52906
+ } | unknown);
52907
+
52908
+ export type ListCommercePriceListsData = {
52909
+ query: {
52910
+ /**
52911
+ * Connected store SocialAccount id.
52912
+ */
52913
+ accountId: string;
52914
+ };
52915
+ };
52916
+
52917
+ export type ListCommercePriceListsResponse = ({
52918
+ priceLists?: Array<CommercePriceList>;
52919
+ });
52920
+
52921
+ export type ListCommercePriceListsError = (ErrorResponse | {
52922
+ error?: string;
52923
+ } | unknown);
52924
+
52925
+ export type SetCommercePriceListPricesData = {
52926
+ body: {
52927
+ accountId: string;
52928
+ prices: Array<{
52929
+ variantId: string;
52930
+ /**
52931
+ * Decimal in the price list currency.
52932
+ */
52933
+ price: string;
52934
+ compareAtPrice?: (string) | null;
52935
+ }>;
52936
+ };
52937
+ path: {
52938
+ /**
52939
+ * Platform-native id.
52940
+ */
52941
+ priceListId: string;
52942
+ };
52943
+ };
52944
+
52945
+ export type SetCommercePriceListPricesResponse = ({
52946
+ priceListId?: string;
52947
+ updated?: number;
52948
+ });
52949
+
52950
+ export type SetCommercePriceListPricesError = (ErrorResponse | {
52951
+ error?: string;
52952
+ } | unknown);
52953
+
52954
+ export type DeleteCommercePriceListPricesData = {
52955
+ path: {
52956
+ /**
52957
+ * Platform-native id.
52958
+ */
52959
+ priceListId: string;
52960
+ };
52961
+ query: {
52962
+ /**
52963
+ * Connected store SocialAccount id.
52964
+ */
52965
+ accountId: string;
52966
+ /**
52967
+ * Comma-separated ids.
52968
+ */
52969
+ variantIds: string;
52970
+ };
52971
+ };
52972
+
52973
+ export type DeleteCommercePriceListPricesResponse = ({
52974
+ priceListId?: string;
52975
+ deleted?: number;
52976
+ });
52977
+
52978
+ export type DeleteCommercePriceListPricesError = (ErrorResponse | {
52979
+ error?: string;
52980
+ } | unknown);
52981
+
52982
+ export type UpsertCommerceMarketingActivityData = {
52983
+ body: {
52984
+ accountId: string;
52985
+ remoteId: string;
52986
+ title: string;
52987
+ url: string;
52988
+ previewImageUrl?: string;
52989
+ utm?: {
52990
+ campaign: string;
52991
+ source: string;
52992
+ medium: string;
52993
+ };
52994
+ tactic: 'ad' | 'post' | 'message' | 'newsletter' | 'link' | 'affiliate' | 'retargeting' | 'loyalty' | 'seo';
52995
+ channel: 'social' | 'search' | 'display' | 'email' | 'referral';
52996
+ status: 'active' | 'inactive' | 'paused' | 'scheduled';
52997
+ budget?: {
52998
+ type: 'daily' | 'lifetime';
52999
+ /**
53000
+ * Decimal in the store currency.
53001
+ */
53002
+ amount: string;
53003
+ };
53004
+ /**
53005
+ * Decimal in the store currency.
53006
+ */
53007
+ adSpend?: string;
53008
+ startedAt?: string;
53009
+ endedAt?: string;
53010
+ };
53011
+ };
53012
+
53013
+ export type UpsertCommerceMarketingActivityResponse = ({
53014
+ marketingActivity?: {
53015
+ id?: string;
53016
+ remoteId?: string;
53017
+ };
53018
+ });
53019
+
53020
+ export type UpsertCommerceMarketingActivityError = (ErrorResponse | {
53021
+ error?: string;
53022
+ } | unknown);
53023
+
53024
+ export type DeleteCommerceMarketingActivityData = {
53025
+ path: {
53026
+ /**
53027
+ * The remoteId given when recording it.
53028
+ */
53029
+ remoteId: string;
53030
+ };
53031
+ query: {
53032
+ /**
53033
+ * Connected store SocialAccount id.
53034
+ */
53035
+ accountId: string;
53036
+ };
53037
+ };
53038
+
53039
+ export type DeleteCommerceMarketingActivityResponse = ({
53040
+ deleted?: boolean;
53041
+ remoteId?: string;
53042
+ });
53043
+
53044
+ export type DeleteCommerceMarketingActivityError = (ErrorResponse | {
53045
+ error?: string;
53046
+ } | unknown);
53047
+
53048
+ export type AddCommerceMarketingEngagementData = {
53049
+ body: {
53050
+ accountId: string;
53051
+ date: string;
53052
+ impressions?: number;
53053
+ views?: number;
53054
+ clicks?: number;
53055
+ shares?: number;
53056
+ likes?: number;
53057
+ comments?: number;
53058
+ /**
53059
+ * Decimal in the store currency.
53060
+ */
53061
+ adSpend?: string;
53062
+ };
53063
+ path: {
53064
+ /**
53065
+ * The remoteId given when recording it.
53066
+ */
53067
+ remoteId: string;
53068
+ };
53069
+ };
53070
+
53071
+ export type AddCommerceMarketingEngagementResponse = ({
53072
+ remoteId?: string;
53073
+ recorded?: boolean;
53074
+ });
53075
+
53076
+ export type AddCommerceMarketingEngagementError = (ErrorResponse | {
53077
+ error?: string;
53078
+ } | unknown);
53079
+
53080
+ export type ListCommerceCatalogSyncsData = {
53081
+ query: {
53082
+ /**
53083
+ * Connected store SocialAccount id.
53084
+ */
53085
+ accountId: string;
53086
+ };
53087
+ };
53088
+
53089
+ export type ListCommerceCatalogSyncsResponse = ({
53090
+ catalogSyncs?: Array<CommerceCatalogSync>;
53091
+ });
53092
+
53093
+ export type ListCommerceCatalogSyncsError = (ErrorResponse | {
53094
+ error?: string;
53095
+ } | unknown);
53096
+
53097
+ export type CreateCommerceCatalogSyncData = {
53098
+ body: {
53099
+ /**
53100
+ * The store SocialAccount id.
53101
+ */
53102
+ accountId: string;
53103
+ catalogAccountId: string;
53104
+ /**
53105
+ * Meta product catalog id.
53106
+ */
53107
+ catalogId: string;
53108
+ };
53109
+ };
53110
+
53111
+ export type CreateCommerceCatalogSyncResponse = ({
53112
+ catalogSync?: CommerceCatalogSync;
53113
+ });
53114
+
53115
+ export type CreateCommerceCatalogSyncError = (ErrorResponse | {
53116
+ error?: string;
53117
+ } | unknown);
53118
+
53119
+ export type GetCommerceCatalogSyncData = {
53120
+ path: {
53121
+ syncId: string;
53122
+ };
53123
+ };
53124
+
53125
+ export type GetCommerceCatalogSyncResponse = ({
53126
+ catalogSync?: CommerceCatalogSync;
53127
+ });
53128
+
53129
+ export type GetCommerceCatalogSyncError = (ErrorResponse | {
53130
+ error?: string;
53131
+ } | unknown);
53132
+
53133
+ export type DeleteCommerceCatalogSyncData = {
53134
+ path: {
53135
+ syncId: string;
53136
+ };
53137
+ };
53138
+
53139
+ export type DeleteCommerceCatalogSyncResponse = ({
53140
+ deleted?: boolean;
53141
+ syncId?: string;
53142
+ });
53143
+
53144
+ export type DeleteCommerceCatalogSyncError = (ErrorResponse | {
53145
+ error?: string;
53146
+ } | unknown);
53147
+
53148
+ export type RunCommerceCatalogSyncData = {
53149
+ path: {
53150
+ syncId: string;
53151
+ };
53152
+ };
53153
+
53154
+ export type RunCommerceCatalogSyncResponse = ({
53155
+ catalogSync?: CommerceCatalogSync;
53156
+ });
53157
+
53158
+ export type RunCommerceCatalogSyncError = (ErrorResponse | {
53159
+ error?: string;
53160
+ } | unknown);
53161
+
50819
53162
  export type CreateVerificationData = {
50820
53163
  body: {
50821
53164
  /**