@zernio/node 0.2.998 → 0.2.1000
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/index.d.mts +106 -41
- package/dist/index.d.ts +106 -41
- package/dist/index.js +22 -1
- package/dist/index.mjs +22 -1
- package/package.json +1 -1
- package/src/client.ts +6 -0
- package/src/generated/sdk.gen.ts +36 -4
- package/src/generated/types.gen.ts +112 -41
|
@@ -92,7 +92,7 @@ export type Ad = {
|
|
|
92
92
|
*/
|
|
93
93
|
status?: (AdStatus);
|
|
94
94
|
/**
|
|
95
|
-
* The ad's own on/off switch as configured on the platform, independent of its parents: an ACTIVE ad under a paused ad set or campaign still reads ACTIVE here while `status` reads `paused`. Sources: Meta `configured_status`, TikTok ad `operation_status` (ENABLE -> ACTIVE, DISABLE -> PAUSED), ChatGPT (OpenAI) ad `status` (ACTIVE / PAUSED, plus ARCHIVED on OpenAI). On create it is read back from the platform, not copied from the request
|
|
95
|
+
* The ad's own on/off switch as configured on the platform, independent of its parents: an ACTIVE ad under a paused ad set or campaign still reads ACTIVE here while `status` reads `paused`. Sources: Meta `configured_status`, TikTok ad `operation_status` (ENABLE -> ACTIVE, DISABLE -> PAUSED), ChatGPT (OpenAI) ad `status` (ACTIVE / PAUSED, plus ARCHIVED on OpenAI). On create it is read back from the platform, not copied from the request: a `PAUSED` create pauses only the top-most object it creates, so an ad under a new paused campaign or ad set reads ACTIVE here with `status: paused`, and only an ad attached to an existing ad set reads PAUSED. Distinct from `status`, which is the ancestor-cascaded delivery status. Only present for Meta, TikTok and OpenAI ads created or synced after the field was added for that platform; null otherwise.
|
|
96
96
|
*/
|
|
97
97
|
configuredStatus?: (string) | null;
|
|
98
98
|
/**
|
|
@@ -4236,18 +4236,20 @@ export type CtwaAdRequestBody = {
|
|
|
4236
4236
|
*/
|
|
4237
4237
|
objective?: 'OUTCOME_ENGAGEMENT' | 'OUTCOME_SALES' | 'OUTCOME_LEADS';
|
|
4238
4238
|
/**
|
|
4239
|
-
*
|
|
4240
|
-
*
|
|
4239
|
+
* Defaults to `ACTIVE`. `PAUSED` pauses only the top-most object this
|
|
4240
|
+
* call creates: the new campaign (ad set and ads switched on), or, with
|
|
4241
|
+
* `adSetId`, the new ads themselves.
|
|
4241
4242
|
*
|
|
4242
4243
|
*/
|
|
4243
4244
|
status?: 'ACTIVE' | 'PAUSED';
|
|
4244
4245
|
/**
|
|
4245
4246
|
* Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults
|
|
4246
|
-
* to `
|
|
4247
|
-
*
|
|
4248
|
-
*
|
|
4249
|
-
* meaningful when a new campaign is being
|
|
4250
|
-
* alongside `adSetId` (the attach shape
|
|
4247
|
+
* to `status`. `PAUSED` holds the new campaign off while the ad set and
|
|
4248
|
+
* ads switch on (one resume call brings the whole hierarchy live);
|
|
4249
|
+
* `ACTIVE` with `status: PAUSED` switches the campaign on and pauses the
|
|
4250
|
+
* new ad set instead. Only meaningful when a new campaign is being
|
|
4251
|
+
* created; rejected with a 400 alongside `adSetId` (the attach shape
|
|
4252
|
+
* reuses an existing campaign).
|
|
4251
4253
|
*
|
|
4252
4254
|
*/
|
|
4253
4255
|
campaignStatus?: 'ACTIVE' | 'PAUSED';
|
|
@@ -4338,19 +4340,21 @@ export type advantageAudience = 0 | 1;
|
|
|
4338
4340
|
export type objective = 'OUTCOME_ENGAGEMENT' | 'OUTCOME_SALES' | 'OUTCOME_LEADS';
|
|
4339
4341
|
|
|
4340
4342
|
/**
|
|
4341
|
-
*
|
|
4342
|
-
*
|
|
4343
|
+
* Defaults to `ACTIVE`. `PAUSED` pauses only the top-most object this
|
|
4344
|
+
* call creates: the new campaign (ad set and ads switched on), or, with
|
|
4345
|
+
* `adSetId`, the new ads themselves.
|
|
4343
4346
|
*
|
|
4344
4347
|
*/
|
|
4345
4348
|
export type status13 = 'ACTIVE' | 'PAUSED';
|
|
4346
4349
|
|
|
4347
4350
|
/**
|
|
4348
4351
|
* Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults
|
|
4349
|
-
* to `
|
|
4350
|
-
*
|
|
4351
|
-
*
|
|
4352
|
-
* meaningful when a new campaign is being
|
|
4353
|
-
* alongside `adSetId` (the attach shape
|
|
4352
|
+
* to `status`. `PAUSED` holds the new campaign off while the ad set and
|
|
4353
|
+
* ads switch on (one resume call brings the whole hierarchy live);
|
|
4354
|
+
* `ACTIVE` with `status: PAUSED` switches the campaign on and pauses the
|
|
4355
|
+
* new ad set instead. Only meaningful when a new campaign is being
|
|
4356
|
+
* created; rejected with a 400 alongside `adSetId` (the attach shape
|
|
4357
|
+
* reuses an existing campaign).
|
|
4354
4358
|
*
|
|
4355
4359
|
*/
|
|
4356
4360
|
export type campaignStatus = 'ACTIVE' | 'PAUSED';
|
|
@@ -6251,6 +6255,31 @@ export type ImessageAudienceContact = {
|
|
|
6251
6255
|
} | null;
|
|
6252
6256
|
};
|
|
6253
6257
|
|
|
6258
|
+
export type ImessageSandboxContact = {
|
|
6259
|
+
id?: string;
|
|
6260
|
+
/**
|
|
6261
|
+
* Phone (E.164) or lowercase Apple ID email
|
|
6262
|
+
*/
|
|
6263
|
+
handle?: string;
|
|
6264
|
+
status?: 'pending' | 'active';
|
|
6265
|
+
/**
|
|
6266
|
+
* Send this from the handle to the sandbox line to activate it
|
|
6267
|
+
*/
|
|
6268
|
+
joinText?: string;
|
|
6269
|
+
/**
|
|
6270
|
+
* Opens Messages on the sandbox line with joinText prefilled
|
|
6271
|
+
*/
|
|
6272
|
+
joinLink?: string;
|
|
6273
|
+
activatedAt?: (string) | null;
|
|
6274
|
+
/**
|
|
6275
|
+
* Replies are allowed for 24 hours after this
|
|
6276
|
+
*/
|
|
6277
|
+
lastInboundAt?: (string) | null;
|
|
6278
|
+
createdAt?: string;
|
|
6279
|
+
};
|
|
6280
|
+
|
|
6281
|
+
export type status19 = 'pending' | 'active';
|
|
6282
|
+
|
|
6254
6283
|
/**
|
|
6255
6284
|
* An iMessage sender registered as an account on a profile.
|
|
6256
6285
|
*/
|
|
@@ -6318,7 +6347,7 @@ export type kind = 'phone' | 'email';
|
|
|
6318
6347
|
|
|
6319
6348
|
export type region = 'US' | 'GB';
|
|
6320
6349
|
|
|
6321
|
-
export type
|
|
6350
|
+
export type status20 = 'ordering' | 'activating' | 'active' | 'suspended' | 'canceled' | 'failed';
|
|
6322
6351
|
|
|
6323
6352
|
/**
|
|
6324
6353
|
* Attachment snapshot inside an edit-history entry.
|
|
@@ -6390,7 +6419,7 @@ export type InboxWebhookConversation = {
|
|
|
6390
6419
|
contactId?: string;
|
|
6391
6420
|
};
|
|
6392
6421
|
|
|
6393
|
-
export type
|
|
6422
|
+
export type status21 = 'active' | 'archived';
|
|
6394
6423
|
|
|
6395
6424
|
/**
|
|
6396
6425
|
* The conversation object included in conversation lifecycle webhook payloads (conversation.started, conversation.control_changed).
|
|
@@ -8107,7 +8136,7 @@ export type OwnedPhoneNumber = {
|
|
|
8107
8136
|
}>;
|
|
8108
8137
|
};
|
|
8109
8138
|
|
|
8110
|
-
export type
|
|
8139
|
+
export type status22 = 'pending_payment' | 'pending_regulatory' | 'regulatory_declined' | 'provisioning' | 'verifying' | 'active' | 'suspended' | 'releasing' | 'released';
|
|
8111
8140
|
|
|
8112
8141
|
export type metaVerificationStatus = 'pending' | 'code_requested' | 'verified' | 'expired';
|
|
8113
8142
|
|
|
@@ -8237,7 +8266,7 @@ export type PlatformAnalytics = {
|
|
|
8237
8266
|
errorMessage?: (string) | null;
|
|
8238
8267
|
};
|
|
8239
8268
|
|
|
8240
|
-
export type
|
|
8269
|
+
export type status23 = 'published' | 'failed';
|
|
8241
8270
|
|
|
8242
8271
|
/**
|
|
8243
8272
|
* Sync state of analytics for this platform
|
|
@@ -8637,7 +8666,7 @@ export type Product = {
|
|
|
8637
8666
|
publishedAt?: (string) | null;
|
|
8638
8667
|
};
|
|
8639
8668
|
|
|
8640
|
-
export type
|
|
8669
|
+
export type status24 = 'active' | 'draft' | 'archived';
|
|
8641
8670
|
|
|
8642
8671
|
export type ProductImage = {
|
|
8643
8672
|
url?: string;
|
|
@@ -8844,7 +8873,7 @@ export type RcsAgent = {
|
|
|
8844
8873
|
createdAt?: string;
|
|
8845
8874
|
};
|
|
8846
8875
|
|
|
8847
|
-
export type
|
|
8876
|
+
export type status25 = 'requested' | 'changes_requested' | 'brand_vetting' | 'agent_review' | 'testing' | 'launch_review' | 'launching' | 'live' | 'rejected' | 'deactivated';
|
|
8848
8877
|
|
|
8849
8878
|
export type useCase = 'MULTI_USE' | 'PROMOTIONAL' | 'TRANSACTIONAL' | 'OTP';
|
|
8850
8879
|
|
|
@@ -8896,7 +8925,7 @@ export type RcsBrand = RcsBrandInput & {
|
|
|
8896
8925
|
/**
|
|
8897
8926
|
* draft = not filed yet (still editable).
|
|
8898
8927
|
*/
|
|
8899
|
-
export type
|
|
8928
|
+
export type status26 = 'draft' | 'vetting' | 'verified' | 'rejected';
|
|
8900
8929
|
|
|
8901
8930
|
export type RcsBrandInput = {
|
|
8902
8931
|
displayName: string;
|
|
@@ -8983,7 +9012,7 @@ export type RcsCarrierApproval = {
|
|
|
8983
9012
|
|
|
8984
9013
|
export type scope2 = 'carrier' | 'hub' | 'bot';
|
|
8985
9014
|
|
|
8986
|
-
export type
|
|
9015
|
+
export type status27 = 'PENDING' | 'SUBMITTED' | 'APPROVED' | 'REJECTED';
|
|
8987
9016
|
|
|
8988
9017
|
/**
|
|
8989
9018
|
* Message content. `suggestions` (max 11) render as chips under the message.
|
|
@@ -10482,7 +10511,7 @@ export type UploadTokenResponse = {
|
|
|
10482
10511
|
status?: 'pending' | 'completed' | 'expired';
|
|
10483
10512
|
};
|
|
10484
10513
|
|
|
10485
|
-
export type
|
|
10514
|
+
export type status28 = 'pending' | 'completed' | 'expired';
|
|
10486
10515
|
|
|
10487
10516
|
export type UploadTokenStatusResponse = {
|
|
10488
10517
|
token?: string;
|
|
@@ -10981,7 +11010,7 @@ export type Verification = {
|
|
|
10981
11010
|
resend?: boolean;
|
|
10982
11011
|
};
|
|
10983
11012
|
|
|
10984
|
-
export type
|
|
11013
|
+
export type status29 = 'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed';
|
|
10985
11014
|
|
|
10986
11015
|
export type channel4 = 'sms';
|
|
10987
11016
|
|
|
@@ -11130,7 +11159,7 @@ export type WebhookLog = {
|
|
|
11130
11159
|
/**
|
|
11131
11160
|
* Delivery outcome
|
|
11132
11161
|
*/
|
|
11133
|
-
export type
|
|
11162
|
+
export type status30 = 'success' | 'failed';
|
|
11134
11163
|
|
|
11135
11164
|
/**
|
|
11136
11165
|
* Webhook payload for `account.ads.initial_sync_completed` events.
|
|
@@ -11242,7 +11271,7 @@ export type event = 'account.ads.initial_sync_completed';
|
|
|
11242
11271
|
/**
|
|
11243
11272
|
* Overall outcome of the initial sync.
|
|
11244
11273
|
*/
|
|
11245
|
-
export type
|
|
11274
|
+
export type status31 = 'success' | 'failure';
|
|
11246
11275
|
|
|
11247
11276
|
/**
|
|
11248
11277
|
* Stable category for UX branching. New values may be added; existing ones are
|
|
@@ -13313,7 +13342,7 @@ export type event25 = 'post.platform.published' | 'post.platform.failed' | 'post
|
|
|
13313
13342
|
/**
|
|
13314
13343
|
* Terminal status this event fires on. Matches the event suffix.
|
|
13315
13344
|
*/
|
|
13316
|
-
export type
|
|
13345
|
+
export type status32 = 'published' | 'failed' | 'deleted';
|
|
13317
13346
|
|
|
13318
13347
|
/**
|
|
13319
13348
|
* Webhook payload for reaction received events (WhatsApp, Telegram, Slack, Instagram, Facebook Messenger, TikTok)
|
|
@@ -13579,7 +13608,7 @@ export type platform16 = 'whatsapp';
|
|
|
13579
13608
|
/**
|
|
13580
13609
|
* Normalized from Meta's `decision` (REJECTED -> DECLINED, DEFERRED -> PENDING_REVIEW; the review is still open on DEFERRED, not a rejection).
|
|
13581
13610
|
*/
|
|
13582
|
-
export type
|
|
13611
|
+
export type status33 = 'APPROVED' | 'DECLINED' | 'PENDING_REVIEW';
|
|
13583
13612
|
|
|
13584
13613
|
/**
|
|
13585
13614
|
* Webhook payload for the `whatsapp.template.category_updated` event.
|
|
@@ -13728,7 +13757,7 @@ export type event33 = 'whatsapp.template.status_updated';
|
|
|
13728
13757
|
* request before the template is actually removed.
|
|
13729
13758
|
*
|
|
13730
13759
|
*/
|
|
13731
|
-
export type
|
|
13760
|
+
export type status34 = 'APPROVED' | 'REJECTED' | 'PENDING' | 'PAUSED' | 'DISABLED' | 'IN_APPEAL' | 'PENDING_DELETION';
|
|
13732
13761
|
|
|
13733
13762
|
export type WhatsAppBodyComponent = {
|
|
13734
13763
|
type: 'body';
|
|
@@ -13876,14 +13905,6 @@ export type WhatsAppSandboxSession = {
|
|
|
13876
13905
|
createdAt?: (string) | null;
|
|
13877
13906
|
};
|
|
13878
13907
|
|
|
13879
|
-
/**
|
|
13880
|
-
* `pending` until the phone replies to the activation template, then
|
|
13881
|
-
* `active`. Expired sessions are pruned by TTL and never appear in
|
|
13882
|
-
* list responses.
|
|
13883
|
-
*
|
|
13884
|
-
*/
|
|
13885
|
-
export type status34 = 'pending' | 'active';
|
|
13886
|
-
|
|
13887
13908
|
export type WhatsAppTemplateButton = {
|
|
13888
13909
|
type: 'quick_reply' | 'url' | 'phone_number' | 'otp' | 'copy_code' | 'flow' | 'mpm' | 'catalog';
|
|
13889
13910
|
/**
|
|
@@ -29595,6 +29616,56 @@ export type ListImessageAudienceError = (ErrorResponse | {
|
|
|
29595
29616
|
error?: string;
|
|
29596
29617
|
});
|
|
29597
29618
|
|
|
29619
|
+
export type ListImessageSandboxContactsResponse = ({
|
|
29620
|
+
sandbox?: {
|
|
29621
|
+
/**
|
|
29622
|
+
* Use as accountId to reply from the sandbox line
|
|
29623
|
+
*/
|
|
29624
|
+
accountId?: string;
|
|
29625
|
+
/**
|
|
29626
|
+
* The sandbox line to message
|
|
29627
|
+
*/
|
|
29628
|
+
handle?: string;
|
|
29629
|
+
contactLimit?: number;
|
|
29630
|
+
};
|
|
29631
|
+
contacts?: Array<ImessageSandboxContact>;
|
|
29632
|
+
});
|
|
29633
|
+
|
|
29634
|
+
export type ListImessageSandboxContactsError = ({
|
|
29635
|
+
error?: string;
|
|
29636
|
+
} | unknown);
|
|
29637
|
+
|
|
29638
|
+
export type AddImessageSandboxContactData = {
|
|
29639
|
+
body: {
|
|
29640
|
+
/**
|
|
29641
|
+
* Phone in international format (+15551234567) or an Apple ID email
|
|
29642
|
+
*/
|
|
29643
|
+
handle: string;
|
|
29644
|
+
};
|
|
29645
|
+
};
|
|
29646
|
+
|
|
29647
|
+
export type AddImessageSandboxContactResponse = ({
|
|
29648
|
+
contact?: ImessageSandboxContact;
|
|
29649
|
+
});
|
|
29650
|
+
|
|
29651
|
+
export type AddImessageSandboxContactError = (ErrorResponse | {
|
|
29652
|
+
error?: string;
|
|
29653
|
+
} | unknown);
|
|
29654
|
+
|
|
29655
|
+
export type RemoveImessageSandboxContactData = {
|
|
29656
|
+
path: {
|
|
29657
|
+
contactId: string;
|
|
29658
|
+
};
|
|
29659
|
+
};
|
|
29660
|
+
|
|
29661
|
+
export type RemoveImessageSandboxContactResponse = ({
|
|
29662
|
+
success?: boolean;
|
|
29663
|
+
});
|
|
29664
|
+
|
|
29665
|
+
export type RemoveImessageSandboxContactError = (ErrorResponse | {
|
|
29666
|
+
error?: string;
|
|
29667
|
+
} | unknown);
|
|
29668
|
+
|
|
29598
29669
|
export type SetImessageSubscriptionData = {
|
|
29599
29670
|
body: {
|
|
29600
29671
|
accountId: string;
|
|
@@ -44627,7 +44698,7 @@ export type BoostPostData = {
|
|
|
44627
44698
|
*/
|
|
44628
44699
|
leadGenFormId?: string;
|
|
44629
44700
|
/**
|
|
44630
|
-
*
|
|
44701
|
+
* Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default); PAUSED pauses only the top-most object this boost creates and switches everything below it on: a new campaign is held paused with its ad set and ad on (one PUT /v1/ads/campaigns/{campaignId}/status with `active` brings it live); into an existing campaign (TikTok `existingCampaignId`) the new ad set is held paused; attached to an existing ad set (`adSetId`) the new ad itself is paused. On LinkedIn the held campaign group is PAUSED, its campaign and creative ACTIVE. X has no per-ad switch, so its lowest level is the line item.
|
|
44631
44702
|
*/
|
|
44632
44703
|
status?: 'ACTIVE' | 'PAUSED';
|
|
44633
44704
|
/**
|
|
@@ -44965,11 +45036,11 @@ export type CreateStandaloneAdData = {
|
|
|
44965
45036
|
*/
|
|
44966
45037
|
budgetType?: 'daily' | 'lifetime';
|
|
44967
45038
|
/**
|
|
44968
|
-
*
|
|
45039
|
+
* Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default, back-compat); PAUSED pauses only the TOP-MOST object this call creates and switches everything below it on, so one resume of that object brings the new tree live and nothing that already existed is touched: a new campaign is held paused with its ad set and ad on; with `existingCampaignId` the new ad set is held paused with its ad on; with `adSetId` the new ad itself is paused. `campaignStatus: ACTIVE` with `status: PAUSED` moves the pause down to the new ad set. LinkedIn: a held campaign group is PAUSED with its campaign and creative ACTIVE; a new campaign in an existing group stays DRAFT. X has no per-ad switch, so its lowest level is the line item. Google Performance Max and Demand Gen accept PAUSED only (the campaign is created paused).
|
|
44969
45040
|
*/
|
|
44970
45041
|
status?: 'ACTIVE' | 'PAUSED';
|
|
44971
45042
|
/**
|
|
44972
|
-
* Meta, Google, and ChatGPT (OpenAI). Overrides `status` for the campaign
|
|
45043
|
+
* Meta, Google, and ChatGPT (OpenAI). Overrides `status` for the new campaign alone. `PAUSED` holds the campaign off with its ad set and ad on; `ACTIVE` with `status: PAUSED` switches the campaign on and holds the new ad set paused (its ad on). Omitted, it follows `status`.
|
|
44973
45044
|
*/
|
|
44974
45045
|
campaignStatus?: 'ACTIVE' | 'PAUSED';
|
|
44975
45046
|
/**
|