@zernio/node 0.2.798 → 0.2.800

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.
@@ -6477,6 +6477,101 @@ export type PostUpdateResponse = {
6477
6477
  warnings?: Array<(string)>;
6478
6478
  };
6479
6479
 
6480
+ /**
6481
+ * A product on the connected platform with its variants, options and images. All data lives on the platform; Zernio proxies it and stores nothing.
6482
+ */
6483
+ export type Product = {
6484
+ /**
6485
+ * Platform-native product id (numeric string for Shopify).
6486
+ */
6487
+ id?: string;
6488
+ platform?: 'shopify';
6489
+ title?: string;
6490
+ /**
6491
+ * URL slug of the product.
6492
+ */
6493
+ handle?: string;
6494
+ /**
6495
+ * Product description as HTML.
6496
+ */
6497
+ descriptionHtml?: (string) | null;
6498
+ vendor?: (string) | null;
6499
+ /**
6500
+ * Free-text product type as set on the store.
6501
+ */
6502
+ productType?: (string) | null;
6503
+ tags?: Array<(string)>;
6504
+ status?: 'active' | 'draft' | 'archived';
6505
+ featuredImage?: (ProductImage | null);
6506
+ /**
6507
+ * First 20 images in the product media, in store order.
6508
+ */
6509
+ images?: Array<ProductImage>;
6510
+ /**
6511
+ * Option axes (e.g. Size, Color) and their values.
6512
+ */
6513
+ options?: Array<{
6514
+ name?: string;
6515
+ values?: Array<(string)>;
6516
+ }>;
6517
+ /**
6518
+ * First 100 variants.
6519
+ */
6520
+ variants?: Array<ProductVariant>;
6521
+ seo?: {
6522
+ title?: (string) | null;
6523
+ description?: (string) | null;
6524
+ };
6525
+ totalInventory?: (number) | null;
6526
+ /**
6527
+ * Public storefront URL; null while the product is not published to the online store.
6528
+ */
6529
+ onlineStoreUrl?: (string) | null;
6530
+ createdAt?: (string) | null;
6531
+ updatedAt?: (string) | null;
6532
+ publishedAt?: (string) | null;
6533
+ };
6534
+
6535
+ export type status13 = 'active' | 'draft' | 'archived';
6536
+
6537
+ export type ProductImage = {
6538
+ url?: string;
6539
+ altText?: (string) | null;
6540
+ };
6541
+
6542
+ /**
6543
+ * A purchasable variant of a product (one per option combination).
6544
+ */
6545
+ export type ProductVariant = {
6546
+ /**
6547
+ * Platform-native variant id (numeric string for Shopify).
6548
+ */
6549
+ id?: string;
6550
+ /**
6551
+ * Option combination label, e.g. "S / Blue".
6552
+ */
6553
+ title?: string;
6554
+ sku?: (string) | null;
6555
+ barcode?: (string) | null;
6556
+ /**
6557
+ * Decimal amount in the store currency, e.g. "19.90".
6558
+ */
6559
+ price?: string;
6560
+ /**
6561
+ * Strike-through price; null when the variant is not on sale.
6562
+ */
6563
+ compareAtPrice?: (string) | null;
6564
+ /**
6565
+ * Units on hand across locations; null when inventory is not tracked.
6566
+ */
6567
+ inventoryQuantity?: (number) | null;
6568
+ availableForSale?: boolean;
6569
+ selectedOptions?: Array<{
6570
+ name?: string;
6571
+ value?: string;
6572
+ }>;
6573
+ };
6574
+
6480
6575
  export type Profile = {
6481
6576
  _id?: string;
6482
6577
  userId?: string;
@@ -7681,7 +7776,7 @@ export type UploadTokenResponse = {
7681
7776
  status?: 'pending' | 'completed' | 'expired';
7682
7777
  };
7683
7778
 
7684
- export type status13 = 'pending' | 'completed' | 'expired';
7779
+ export type status14 = 'pending' | 'completed' | 'expired';
7685
7780
 
7686
7781
  export type UploadTokenStatusResponse = {
7687
7782
  token?: string;
@@ -8156,7 +8251,7 @@ export type Verification = {
8156
8251
  resend?: boolean;
8157
8252
  };
8158
8253
 
8159
- export type status14 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
8254
+ export type status15 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
8160
8255
 
8161
8256
  export type channel3 = 'sms';
8162
8257
 
@@ -8275,7 +8370,7 @@ export type WebhookLog = {
8275
8370
  /**
8276
8371
  * Delivery outcome
8277
8372
  */
8278
- export type status15 = 'success' | 'failed';
8373
+ export type status16 = 'success' | 'failed';
8279
8374
 
8280
8375
  /**
8281
8376
  * Webhook payload for `account.ads.initial_sync_completed` events.
@@ -8387,7 +8482,7 @@ export type event = 'account.ads.initial_sync_completed';
8387
8482
  /**
8388
8483
  * Overall outcome of the initial sync.
8389
8484
  */
8390
- export type status16 = 'success' | 'failure';
8485
+ export type status17 = 'success' | 'failure';
8391
8486
 
8392
8487
  /**
8393
8488
  * Stable category for UX branching. New values may be added; existing ones are
@@ -10257,7 +10352,7 @@ export type event22 = 'post.platform.published' | 'post.platform.failed' | 'post
10257
10352
  /**
10258
10353
  * Terminal status this event fires on. Matches the event suffix.
10259
10354
  */
10260
- export type status17 = 'published' | 'failed' | 'deleted';
10355
+ export type status18 = 'published' | 'failed' | 'deleted';
10261
10356
 
10262
10357
  /**
10263
10358
  * Webhook payload for reaction received events (WhatsApp, Telegram, Slack, Instagram, Facebook Messenger)
@@ -10522,7 +10617,7 @@ export type platform13 = 'whatsapp';
10522
10617
  /**
10523
10618
  * Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
10524
10619
  */
10525
- export type status18 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
10620
+ export type status19 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
10526
10621
 
10527
10622
  /**
10528
10623
  * Webhook payload for the `whatsapp.template.category_updated` event.
@@ -10671,7 +10766,7 @@ export type event30 = 'whatsapp.template.status_updated';
10671
10766
  * request before the template is actually removed.
10672
10767
  *
10673
10768
  */
10674
- export type status19 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
10769
+ export type status20 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
10675
10770
 
10676
10771
  export type WhatsAppBodyComponent = {
10677
10772
  type: 'body';
@@ -10820,7 +10915,7 @@ export type WhatsAppSandboxSession = {
10820
10915
  * list responses.
10821
10916
  *
10822
10917
  */
10823
- export type status20 = 'pending' | 'active';
10918
+ export type status21 = 'pending' | 'active';
10824
10919
 
10825
10920
  export type WhatsAppTemplateButton = {
10826
10921
  type: 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
@@ -10978,7 +11073,7 @@ export type WorkflowExecutionEvent = {
10978
11073
 
10979
11074
  export type action2 = 'execution_started' | 'execution_completed' | 'execution_exited' | 'execution_paused' | 'execution_resumed' | 'node_started' | 'node_completed' | 'node_failed' | 'node_skipped';
10980
11075
 
10981
- export type status21 = 'success' | 'failed' | 'pending';
11076
+ export type status22 = 'success' | 'failed' | 'pending';
10982
11077
 
10983
11078
  /**
10984
11079
  * A node in a workflow graph. `config` shape depends on `type`.
@@ -15372,6 +15467,10 @@ export type ConnectAdsData = {
15372
15467
  * Business login only. Facebook Page ID to select from the token grants for ad creatives and lead forms.
15373
15468
  */
15374
15469
  pageId?: string;
15470
+ /**
15471
+ * Business login only. Ad-account permission the connection's system user will hold. `full` asks the owner for Full control (MANAGE; required to create pixels and other account-level assets through Zernio). `advertise` asks for Manage campaigns (ADVERTISE), enough for campaigns, ad sets, creatives, ads, media and reporting, for owners who will not grant billing-level control to an integration. Either way Meta only lets a business admin complete the grant. 503 if the advertise configuration is not set up.
15472
+ */
15473
+ permissionLevel?: 'full' | 'advertise';
15375
15474
  /**
15376
15475
  * Your Zernio profile ID
15377
15476
  */
@@ -43162,6 +43261,135 @@ export type DeleteBlogArticleError = (ErrorResponse | {
43162
43261
  error?: string;
43163
43262
  } | unknown);
43164
43263
 
43264
+ export type ListProductsData = {
43265
+ path: {
43266
+ /**
43267
+ * Connected Shopify SocialAccount id.
43268
+ */
43269
+ accountId: string;
43270
+ };
43271
+ query?: {
43272
+ /**
43273
+ * Opaque cursor from a previous response. Omit for the first page.
43274
+ */
43275
+ cursor?: string;
43276
+ /**
43277
+ * Page size (1-50).
43278
+ */
43279
+ limit?: number;
43280
+ /**
43281
+ * Platform product search syntax, passed through verbatim (Shopify: title, vendor, product_type, tag, sku, handle, created_at, updated_at, ...).
43282
+ */
43283
+ query?: string;
43284
+ /**
43285
+ * Only products in this status.
43286
+ */
43287
+ status?: 'active' | 'draft' | 'archived';
43288
+ };
43289
+ };
43290
+
43291
+ export type ListProductsResponse = ({
43292
+ platform?: 'shopify';
43293
+ products?: Array<Product>;
43294
+ /**
43295
+ * Cursor for the next page; null when there are no more pages.
43296
+ */
43297
+ nextCursor?: (string) | null;
43298
+ });
43299
+
43300
+ export type ListProductsError = (ErrorResponse | {
43301
+ error?: string;
43302
+ } | unknown);
43303
+
43304
+ export type GetProductData = {
43305
+ path: {
43306
+ /**
43307
+ * Connected Shopify SocialAccount id.
43308
+ */
43309
+ accountId: string;
43310
+ /**
43311
+ * Platform-native numeric product id. Non-numeric values return 400.
43312
+ */
43313
+ productId: string;
43314
+ };
43315
+ };
43316
+
43317
+ export type GetProductResponse = ({
43318
+ platform?: 'shopify';
43319
+ product?: Product;
43320
+ });
43321
+
43322
+ export type GetProductError = (ErrorResponse | {
43323
+ error?: string;
43324
+ } | unknown);
43325
+
43326
+ export type UpdateProductData = {
43327
+ body: {
43328
+ title?: string;
43329
+ /**
43330
+ * Product description as HTML.
43331
+ */
43332
+ descriptionHtml?: string;
43333
+ /**
43334
+ * URL slug of the product.
43335
+ */
43336
+ handle?: string;
43337
+ vendor?: string;
43338
+ productType?: string;
43339
+ /**
43340
+ * Replaces the full tag list.
43341
+ */
43342
+ tags?: Array<(string)>;
43343
+ /**
43344
+ * archived hides the product everywhere; draft keeps it editable but unpublished.
43345
+ */
43346
+ status?: 'active' | 'draft' | 'archived';
43347
+ /**
43348
+ * Search-engine title and description overrides.
43349
+ */
43350
+ seo?: {
43351
+ title?: string;
43352
+ description?: string;
43353
+ };
43354
+ /**
43355
+ * Price changes per variant. Only the listed variants change.
43356
+ */
43357
+ variants?: Array<{
43358
+ /**
43359
+ * Variant id from the product response.
43360
+ */
43361
+ id: string;
43362
+ /**
43363
+ * Decimal amount in the store currency. Numbers are formatted to two decimals.
43364
+ */
43365
+ price?: (number | string);
43366
+ /**
43367
+ * Strike-through price. Send null to remove it.
43368
+ */
43369
+ compareAtPrice?: (number | string | null);
43370
+ }>;
43371
+ };
43372
+ path: {
43373
+ /**
43374
+ * Connected Shopify SocialAccount id.
43375
+ */
43376
+ accountId: string;
43377
+ /**
43378
+ * Platform-native numeric product id. Non-numeric values return 400.
43379
+ */
43380
+ productId: string;
43381
+ };
43382
+ };
43383
+
43384
+ export type UpdateProductResponse = ({
43385
+ platform?: 'shopify';
43386
+ product?: Product;
43387
+ });
43388
+
43389
+ export type UpdateProductError = (ErrorResponse | {
43390
+ error?: string;
43391
+ } | unknown);
43392
+
43165
43393
  export type CreateVerificationData = {
43166
43394
  body: {
43167
43395
  /**