@getlatedev/node 0.2.1770 → 0.2.1772
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/index.d.mts +81 -5
- package/dist/index.d.ts +81 -5
- package/dist/index.js +15 -1
- package/dist/index.mjs +15 -1
- package/package.json +1 -1
- package/src/client.ts +4 -0
- package/src/generated/sdk.gen.ts +36 -1
- package/src/generated/types.gen.ts +85 -4
|
@@ -5831,6 +5831,35 @@ export type AutomationTemplateTargetResult = {
|
|
|
5831
5831
|
|
|
5832
5832
|
export type status11 = 'created' | 'failed';
|
|
5833
5833
|
|
|
5834
|
+
/**
|
|
5835
|
+
* What the automation would do with the sample, decided by the code its live runs use.
|
|
5836
|
+
*/
|
|
5837
|
+
export type AutomationTestDecision = {
|
|
5838
|
+
wouldRun: boolean;
|
|
5839
|
+
/**
|
|
5840
|
+
* Why it would not run: keyword_miss, keyword_excluded, other_post, trigger_miss, not_first_message, account_not_listened, filter_miss, no_match, subject_not_matched, post_not_matched, no_accounts, no_subscribed_channel, unsubscribed, already_enrolled, runs_paused, paused or draft.
|
|
5841
|
+
*/
|
|
5842
|
+
reason?: string;
|
|
5843
|
+
/**
|
|
5844
|
+
* What the sample met, such as a keyword, a filter condition, the trigger, a post or an ad.
|
|
5845
|
+
*/
|
|
5846
|
+
matched: Array<{
|
|
5847
|
+
type: string;
|
|
5848
|
+
value: string;
|
|
5849
|
+
}>;
|
|
5850
|
+
/**
|
|
5851
|
+
* The steps it would take, in order. A flow lists its first steps up to the first branch.
|
|
5852
|
+
*/
|
|
5853
|
+
plannedSteps: Array<{
|
|
5854
|
+
type: string;
|
|
5855
|
+
summary: string;
|
|
5856
|
+
}>;
|
|
5857
|
+
/**
|
|
5858
|
+
* A scheduled automation's next check.
|
|
5859
|
+
*/
|
|
5860
|
+
nextRunAt?: (string) | null;
|
|
5861
|
+
};
|
|
5862
|
+
|
|
5834
5863
|
/**
|
|
5835
5864
|
* When the automation runs. Its shape decides the kind:
|
|
5836
5865
|
*
|
|
@@ -55124,17 +55153,20 @@ export type ReplyToInboxPostData = {
|
|
|
55124
55153
|
*/
|
|
55125
55154
|
message: string;
|
|
55126
55155
|
/**
|
|
55127
|
-
* (Facebook, Bluesky, LinkedIn and
|
|
55156
|
+
* (Facebook, Bluesky, LinkedIn, Threads and X) URL of an image to attach to the comment or reply. The URL must be publicly fetchable. Returns 400 for other platforms.
|
|
55128
55157
|
*/
|
|
55129
55158
|
attachmentUrl?: string;
|
|
55130
55159
|
/**
|
|
55131
|
-
* (Facebook and
|
|
55160
|
+
* (Facebook, Threads and X, optional) How `attachmentUrl` is published. Requires `attachmentUrl`; returns 400 on other platforms.
|
|
55132
55161
|
*
|
|
55133
|
-
* - Omitted: a GIF is detected and posted animated. Detection uses GIPHY links (page, media, embed, sticker; `gph.is` on Threads), `.gif` paths, and an `image/gif` response on Threads.
|
|
55162
|
+
* - Omitted: a GIF is detected and posted animated. Detection uses GIPHY links (page, media, embed, sticker; `gph.is` on Threads and X), `.gif` paths, and an `image/gif` response on Threads and X.
|
|
55134
55163
|
* - `image`: forces a still photo. Threads converts a GIF or WebP to JPEG or PNG.
|
|
55135
55164
|
* - `gif`: forces an animated GIF.
|
|
55136
55165
|
* - Threads GIFs must come from GIPHY, otherwise the request returns 400 `invalid_field_value`.
|
|
55137
|
-
* - Facebook
|
|
55166
|
+
* - Facebook and X get a GIPHY link as their direct GIF.
|
|
55167
|
+
* - X takes one image or GIF from any host, and returns 400 for video or HTML URLs.
|
|
55168
|
+
* - On X, images over 5 MB are compressed and a GIF over 15 MB posts as a still image.
|
|
55169
|
+
* - On X, a GIF always posts animated, even with `attachmentType: image`.
|
|
55138
55170
|
*
|
|
55139
55171
|
*/
|
|
55140
55172
|
attachmentType?: 'image' | 'gif';
|
|
@@ -67381,6 +67413,55 @@ export type GetAutomationRunError = (ErrorResponse | {
|
|
|
67381
67413
|
error?: string;
|
|
67382
67414
|
});
|
|
67383
67415
|
|
|
67416
|
+
export type TestAutomationData = {
|
|
67417
|
+
body?: {
|
|
67418
|
+
/**
|
|
67419
|
+
* The sample event, shaped by the automation's kind.
|
|
67420
|
+
*/
|
|
67421
|
+
event?: {
|
|
67422
|
+
[key: string]: unknown;
|
|
67423
|
+
};
|
|
67424
|
+
/**
|
|
67425
|
+
* A sequence's contact, a scheduled automation's post or an ad rule's object.
|
|
67426
|
+
*/
|
|
67427
|
+
subjectId?: string;
|
|
67428
|
+
};
|
|
67429
|
+
path: {
|
|
67430
|
+
automationId: string;
|
|
67431
|
+
};
|
|
67432
|
+
};
|
|
67433
|
+
|
|
67434
|
+
export type TestAutomationResponse = ({
|
|
67435
|
+
decision: AutomationTestDecision;
|
|
67436
|
+
});
|
|
67437
|
+
|
|
67438
|
+
export type TestAutomationError = ((ErrorResponse & {
|
|
67439
|
+
details?: AutomationProblems;
|
|
67440
|
+
}) | ErrorResponse | {
|
|
67441
|
+
error?: string;
|
|
67442
|
+
});
|
|
67443
|
+
|
|
67444
|
+
export type GetAutomationTestSampleData = {
|
|
67445
|
+
path: {
|
|
67446
|
+
automationId: string;
|
|
67447
|
+
};
|
|
67448
|
+
};
|
|
67449
|
+
|
|
67450
|
+
export type GetAutomationTestSampleResponse = ({
|
|
67451
|
+
kind: 'ad_rule' | 'event' | 'scheduled' | 'sequence' | 'comment' | 'workflow';
|
|
67452
|
+
sample: {
|
|
67453
|
+
event?: {
|
|
67454
|
+
[key: string]: unknown;
|
|
67455
|
+
};
|
|
67456
|
+
subjectId?: string;
|
|
67457
|
+
description: string;
|
|
67458
|
+
};
|
|
67459
|
+
});
|
|
67460
|
+
|
|
67461
|
+
export type GetAutomationTestSampleError = (ErrorResponse | {
|
|
67462
|
+
error?: string;
|
|
67463
|
+
});
|
|
67464
|
+
|
|
67384
67465
|
export type PreviewAutomationDraftData = {
|
|
67385
67466
|
body: AutomationDefinition;
|
|
67386
67467
|
query?: {
|