@getlatedev/node 0.2.1276 → 0.2.1278
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 +1 -0
- package/dist/index.d.mts +199 -56
- package/dist/index.d.ts +199 -56
- package/dist/index.js +10 -1
- package/dist/index.mjs +10 -1
- package/package.json +1 -1
- package/src/client.ts +4 -0
- package/src/generated/sdk.gen.ts +20 -1
- package/src/generated/types.gen.ts +203 -55
|
@@ -4135,6 +4135,7 @@ export type CommerceOrder = {
|
|
|
4135
4135
|
billingAddress?: (CommerceAddress | null);
|
|
4136
4136
|
shippingAddress?: (CommerceAddress | null);
|
|
4137
4137
|
buyerNote?: (string) | null;
|
|
4138
|
+
attribution?: CommerceOrderAttribution;
|
|
4138
4139
|
lineItems?: Array<{
|
|
4139
4140
|
id?: string;
|
|
4140
4141
|
/**
|
|
@@ -4200,6 +4201,31 @@ export type CommerceOrder = {
|
|
|
4200
4201
|
} | null;
|
|
4201
4202
|
};
|
|
4202
4203
|
|
|
4204
|
+
/**
|
|
4205
|
+
* Where the order came from. Shopify reads it from the customer journey, WooCommerce from its order attribution (WooCommerce 8.5+ with the feature on, orders placed after it was turned on).
|
|
4206
|
+
*/
|
|
4207
|
+
export type CommerceOrderAttribution = {
|
|
4208
|
+
/**
|
|
4209
|
+
* False while Shopify is still attributing a new order. No webhook fires when it becomes true, so read the order again later. Always true on WooCommerce.
|
|
4210
|
+
*/
|
|
4211
|
+
ready?: boolean;
|
|
4212
|
+
/**
|
|
4213
|
+
* The first session before the order. Shopify only; WooCommerce records the last session alone.
|
|
4214
|
+
*/
|
|
4215
|
+
firstVisit?: (CommerceOrderVisit | null);
|
|
4216
|
+
/**
|
|
4217
|
+
* The last session before the order.
|
|
4218
|
+
*/
|
|
4219
|
+
lastVisit?: (CommerceOrderVisit | null);
|
|
4220
|
+
/**
|
|
4221
|
+
* Shopify cart and note attributes, or WooCommerce public order meta.
|
|
4222
|
+
*/
|
|
4223
|
+
customAttributes?: Array<{
|
|
4224
|
+
key?: string;
|
|
4225
|
+
value?: string;
|
|
4226
|
+
}>;
|
|
4227
|
+
};
|
|
4228
|
+
|
|
4203
4229
|
/**
|
|
4204
4230
|
* A shipping or fee line.
|
|
4205
4231
|
*/
|
|
@@ -4219,6 +4245,39 @@ export type CommerceOrderChargeLine = {
|
|
|
4219
4245
|
*/
|
|
4220
4246
|
export type CommerceOrderStatus = 'pending_payment' | 'on_hold' | 'awaiting_fulfillment' | 'partially_fulfilled' | 'in_transit' | 'delivered' | 'completed' | 'cancelled';
|
|
4221
4247
|
|
|
4248
|
+
/**
|
|
4249
|
+
* A store session that led to the order.
|
|
4250
|
+
*/
|
|
4251
|
+
export type CommerceOrderVisit = {
|
|
4252
|
+
/**
|
|
4253
|
+
* Null on WooCommerce, which records the session start without a timezone.
|
|
4254
|
+
*/
|
|
4255
|
+
occurredAt?: (string) | null;
|
|
4256
|
+
/**
|
|
4257
|
+
* The first page of the session, with its query string.
|
|
4258
|
+
*/
|
|
4259
|
+
landingUrl?: (string) | null;
|
|
4260
|
+
referrerUrl?: (string) | null;
|
|
4261
|
+
/**
|
|
4262
|
+
* Where the visit came from, as the platform names it.
|
|
4263
|
+
*/
|
|
4264
|
+
source?: (string) | null;
|
|
4265
|
+
/**
|
|
4266
|
+
* Shopify marketing tactic (e.g. SOCIAL, AD, SEARCH) or WooCommerce source type (utm, organic, referral, typein, admin).
|
|
4267
|
+
*/
|
|
4268
|
+
sourceType?: (string) | null;
|
|
4269
|
+
/**
|
|
4270
|
+
* Null when the landing URL carried no UTM parameters.
|
|
4271
|
+
*/
|
|
4272
|
+
utm?: {
|
|
4273
|
+
source?: (string) | null;
|
|
4274
|
+
medium?: (string) | null;
|
|
4275
|
+
campaign?: (string) | null;
|
|
4276
|
+
term?: (string) | null;
|
|
4277
|
+
content?: (string) | null;
|
|
4278
|
+
} | null;
|
|
4279
|
+
};
|
|
4280
|
+
|
|
4222
4281
|
export type CommercePage = {
|
|
4223
4282
|
id?: string;
|
|
4224
4283
|
accountId?: string;
|
|
@@ -12274,6 +12333,71 @@ export type TikTokReviewRejection = {
|
|
|
12274
12333
|
} | null;
|
|
12275
12334
|
};
|
|
12276
12335
|
|
|
12336
|
+
/**
|
|
12337
|
+
* The ad-level verdict of a Smart+ ad (`smart_plus_ad_review_infos`). Null when TikTok returned none.
|
|
12338
|
+
*/
|
|
12339
|
+
export type TikTokSmartPlusAdLevelReview = {
|
|
12340
|
+
reviewStatus?: TikTokSmartPlusReviewStatus;
|
|
12341
|
+
/**
|
|
12342
|
+
* TikTok `review_status`, verbatim.
|
|
12343
|
+
*/
|
|
12344
|
+
rawReviewStatus?: (string) | null;
|
|
12345
|
+
/**
|
|
12346
|
+
* Every distinct reason across `rejections`.
|
|
12347
|
+
*/
|
|
12348
|
+
rejectReasons?: Array<(string)>;
|
|
12349
|
+
/**
|
|
12350
|
+
* Location codes that passed the review.
|
|
12351
|
+
*/
|
|
12352
|
+
passedLocations?: Array<(string)>;
|
|
12353
|
+
/**
|
|
12354
|
+
* TikTok `appeal_status`, verbatim: NOT_APPEALED, APPEALING, APPEAL_SUCCESSFUL, APPEAL_FAILED, APPEAL_DONE.
|
|
12355
|
+
*/
|
|
12356
|
+
appealStatus?: (string) | null;
|
|
12357
|
+
appealRejectReasons?: Array<(string)>;
|
|
12358
|
+
rejections?: Array<TikTokReviewRejection>;
|
|
12359
|
+
} | null;
|
|
12360
|
+
|
|
12361
|
+
/**
|
|
12362
|
+
* The verdict of one creative of a Smart+ ad (`material_review_infos`).
|
|
12363
|
+
*/
|
|
12364
|
+
export type TikTokSmartPlusMaterialReview = {
|
|
12365
|
+
/**
|
|
12366
|
+
* TikTok `ad_material_id` of the creative inside this ad.
|
|
12367
|
+
*/
|
|
12368
|
+
adMaterialId?: string;
|
|
12369
|
+
/**
|
|
12370
|
+
* Null for a creative TikTok added on its own or a carousel image.
|
|
12371
|
+
*/
|
|
12372
|
+
materialType?: ('spark_post' | 'video' | 'carousel' | 'catalog_carousel') | null;
|
|
12373
|
+
/**
|
|
12374
|
+
* The TikTok post id when the creative is a Spark post.
|
|
12375
|
+
*/
|
|
12376
|
+
tiktokItemId?: (string) | null;
|
|
12377
|
+
videoId?: (string) | null;
|
|
12378
|
+
name?: (string) | null;
|
|
12379
|
+
/**
|
|
12380
|
+
* TikTok `material_operation_status`: ENABLE or DISABLE.
|
|
12381
|
+
*/
|
|
12382
|
+
operationStatus?: (string) | null;
|
|
12383
|
+
reviewStatus?: TikTokSmartPlusReviewStatus;
|
|
12384
|
+
/**
|
|
12385
|
+
* TikTok `review_status`, verbatim.
|
|
12386
|
+
*/
|
|
12387
|
+
rawReviewStatus?: (string) | null;
|
|
12388
|
+
/**
|
|
12389
|
+
* Every distinct reason across `rejections`. Empty when approved.
|
|
12390
|
+
*/
|
|
12391
|
+
rejectReasons?: Array<(string)>;
|
|
12392
|
+
passedLocations?: Array<(string)>;
|
|
12393
|
+
rejections?: Array<TikTokReviewRejection>;
|
|
12394
|
+
};
|
|
12395
|
+
|
|
12396
|
+
/**
|
|
12397
|
+
* Null for a creative TikTok added on its own or a carousel image.
|
|
12398
|
+
*/
|
|
12399
|
+
export type materialType = 'spark_post' | 'video' | 'carousel' | 'catalog_carousel';
|
|
12400
|
+
|
|
12277
12401
|
/**
|
|
12278
12402
|
* TikTok `review_status` normalized: ALL_AVAILABLE -> approved, PART_AVAILABLE -> partially_approved (delivers in part of the targeted locations), UNAVAILABLE -> rejected, anything else or missing -> unknown (see `rawReviewStatus`).
|
|
12279
12403
|
*/
|
|
@@ -45477,64 +45601,11 @@ export type GetTikTokSmartPlusAdReviewResponse = ({
|
|
|
45477
45601
|
* The TikTok Smart+ ad whose review this is.
|
|
45478
45602
|
*/
|
|
45479
45603
|
smartPlusAdId?: string;
|
|
45480
|
-
|
|
45481
|
-
* The ad-level verdict (`smart_plus_ad_review_infos`). Null when TikTok returned none.
|
|
45482
|
-
*/
|
|
45483
|
-
review?: {
|
|
45484
|
-
reviewStatus?: TikTokSmartPlusReviewStatus;
|
|
45485
|
-
/**
|
|
45486
|
-
* TikTok `review_status`, verbatim.
|
|
45487
|
-
*/
|
|
45488
|
-
rawReviewStatus?: (string) | null;
|
|
45489
|
-
/**
|
|
45490
|
-
* Every distinct reason across `rejections`.
|
|
45491
|
-
*/
|
|
45492
|
-
rejectReasons?: Array<(string)>;
|
|
45493
|
-
/**
|
|
45494
|
-
* Location codes that passed the review.
|
|
45495
|
-
*/
|
|
45496
|
-
passedLocations?: Array<(string)>;
|
|
45497
|
-
/**
|
|
45498
|
-
* TikTok `appeal_status`, verbatim: NOT_APPEALED, APPEALING, APPEAL_SUCCESSFUL, APPEAL_FAILED, APPEAL_DONE.
|
|
45499
|
-
*/
|
|
45500
|
-
appealStatus?: (string) | null;
|
|
45501
|
-
appealRejectReasons?: Array<(string)>;
|
|
45502
|
-
rejections?: Array<TikTokReviewRejection>;
|
|
45503
|
-
} | null;
|
|
45604
|
+
review?: TikTokSmartPlusAdLevelReview;
|
|
45504
45605
|
/**
|
|
45505
45606
|
* One entry per creative TikTok reviewed (`material_review_infos`).
|
|
45506
45607
|
*/
|
|
45507
|
-
materials?: Array<
|
|
45508
|
-
/**
|
|
45509
|
-
* TikTok `ad_material_id` of the creative inside this ad.
|
|
45510
|
-
*/
|
|
45511
|
-
adMaterialId?: string;
|
|
45512
|
-
/**
|
|
45513
|
-
* Null for a creative TikTok added on its own or a carousel image.
|
|
45514
|
-
*/
|
|
45515
|
-
materialType?: ('spark_post' | 'video' | 'carousel' | 'catalog_carousel') | null;
|
|
45516
|
-
/**
|
|
45517
|
-
* The TikTok post id when the creative is a Spark post.
|
|
45518
|
-
*/
|
|
45519
|
-
tiktokItemId?: (string) | null;
|
|
45520
|
-
videoId?: (string) | null;
|
|
45521
|
-
name?: (string) | null;
|
|
45522
|
-
/**
|
|
45523
|
-
* TikTok `material_operation_status`: ENABLE or DISABLE.
|
|
45524
|
-
*/
|
|
45525
|
-
operationStatus?: (string) | null;
|
|
45526
|
-
reviewStatus?: TikTokSmartPlusReviewStatus;
|
|
45527
|
-
/**
|
|
45528
|
-
* TikTok `review_status`, verbatim.
|
|
45529
|
-
*/
|
|
45530
|
-
rawReviewStatus?: (string) | null;
|
|
45531
|
-
/**
|
|
45532
|
-
* Every distinct reason across `rejections`. Empty when approved.
|
|
45533
|
-
*/
|
|
45534
|
-
rejectReasons?: Array<(string)>;
|
|
45535
|
-
passedLocations?: Array<(string)>;
|
|
45536
|
-
rejections?: Array<TikTokReviewRejection>;
|
|
45537
|
-
}>;
|
|
45608
|
+
materials?: Array<TikTokSmartPlusMaterialReview>;
|
|
45538
45609
|
/**
|
|
45539
45610
|
* When the verdict was read from TikTok.
|
|
45540
45611
|
*/
|
|
@@ -46633,6 +46704,83 @@ export type GetTikTokSmartPlusMaterialReportResponse = ({
|
|
|
46633
46704
|
|
|
46634
46705
|
export type GetTikTokSmartPlusMaterialReportError = (ErrorResponse | unknown);
|
|
46635
46706
|
|
|
46707
|
+
export type ListTikTokSmartPlusReviewsData = {
|
|
46708
|
+
query: {
|
|
46709
|
+
/**
|
|
46710
|
+
* A tiktok or tiktokads account ID
|
|
46711
|
+
*/
|
|
46712
|
+
accountId: string;
|
|
46713
|
+
/**
|
|
46714
|
+
* TikTok advertiser ID
|
|
46715
|
+
*/
|
|
46716
|
+
adAccountId: string;
|
|
46717
|
+
/**
|
|
46718
|
+
* Also return Smart+ ads deleted on TikTok (listed with `primary_status: STATUS_ALL`).
|
|
46719
|
+
*/
|
|
46720
|
+
includeDeleted?: boolean;
|
|
46721
|
+
page?: number;
|
|
46722
|
+
pageSize?: number;
|
|
46723
|
+
};
|
|
46724
|
+
};
|
|
46725
|
+
|
|
46726
|
+
export type ListTikTokSmartPlusReviewsResponse = ({
|
|
46727
|
+
adAccountId?: string;
|
|
46728
|
+
includeDeleted?: boolean;
|
|
46729
|
+
page?: number;
|
|
46730
|
+
pageSize?: number;
|
|
46731
|
+
totalPages?: number;
|
|
46732
|
+
/**
|
|
46733
|
+
* Smart+ ads of the advertiser across all pages.
|
|
46734
|
+
*/
|
|
46735
|
+
totalSmartPlusAds?: number;
|
|
46736
|
+
items?: Array<{
|
|
46737
|
+
smartPlusAdId?: string;
|
|
46738
|
+
adGroupId?: (string) | null;
|
|
46739
|
+
campaignId?: (string) | null;
|
|
46740
|
+
review?: TikTokSmartPlusAdLevelReview;
|
|
46741
|
+
/**
|
|
46742
|
+
* One entry per creative TikTok reviewed (`material_review_infos`).
|
|
46743
|
+
*/
|
|
46744
|
+
materials?: Array<TikTokSmartPlusMaterialReview>;
|
|
46745
|
+
/**
|
|
46746
|
+
* When the verdict was read from TikTok.
|
|
46747
|
+
*/
|
|
46748
|
+
readAt?: string;
|
|
46749
|
+
}>;
|
|
46750
|
+
/**
|
|
46751
|
+
* Smart+ ads of this page whose review TikTok refused on its own (for example an ad deleted on TikTok since the listing was cached). Zernio splits a refused batch in halves (at most 16 extra calls per page), so the other ads of the batch are still read; ads left unresolved by that cap carry the batch error. Empty when none.
|
|
46752
|
+
*/
|
|
46753
|
+
failedSmartPlusAds?: Array<{
|
|
46754
|
+
smartPlusAdId?: string;
|
|
46755
|
+
adGroupId?: (string) | null;
|
|
46756
|
+
campaignId?: (string) | null;
|
|
46757
|
+
error?: {
|
|
46758
|
+
/**
|
|
46759
|
+
* TikTok's error code, verbatim.
|
|
46760
|
+
*/
|
|
46761
|
+
tiktokCode?: (number) | null;
|
|
46762
|
+
/**
|
|
46763
|
+
* TikTok's error message, verbatim.
|
|
46764
|
+
*/
|
|
46765
|
+
message?: string;
|
|
46766
|
+
};
|
|
46767
|
+
}>;
|
|
46768
|
+
/**
|
|
46769
|
+
* True when some Smart+ ads of this page could not be read because of TikTok's review quota.
|
|
46770
|
+
*/
|
|
46771
|
+
incomplete?: boolean;
|
|
46772
|
+
/**
|
|
46773
|
+
* Smart+ ads of this page still to read. Empty when complete.
|
|
46774
|
+
*/
|
|
46775
|
+
pendingSmartPlusAdIds?: Array<(string)>;
|
|
46776
|
+
/**
|
|
46777
|
+
* Seconds to wait before reading this page again. Null when complete.
|
|
46778
|
+
*/
|
|
46779
|
+
retryAfterSeconds?: (number) | null;
|
|
46780
|
+
});
|
|
46781
|
+
|
|
46782
|
+
export type ListTikTokSmartPlusReviewsError = (ErrorResponse | unknown);
|
|
46783
|
+
|
|
46636
46784
|
export type ListAdsInstagramAccountsData = {
|
|
46637
46785
|
query: {
|
|
46638
46786
|
/**
|