@getlatedev/node 0.2.1769 → 0.2.1771
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 +99 -2
- package/dist/index.d.ts +99 -2
- 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 +103 -1
|
@@ -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
|
*
|
|
@@ -64367,9 +64396,21 @@ export type ListBroadcastsResponse = ({
|
|
|
64367
64396
|
startedAt?: string;
|
|
64368
64397
|
completedAt?: string;
|
|
64369
64398
|
recipientCount?: number;
|
|
64399
|
+
/**
|
|
64400
|
+
* Recipients whose latest status is `sent`: the platform accepted the message and has not confirmed delivery yet. Each recipient counts once, under its latest status, so everyone the broadcast went out to is sentCount + deliveredCount + readCount.
|
|
64401
|
+
*/
|
|
64370
64402
|
sentCount?: number;
|
|
64403
|
+
/**
|
|
64404
|
+
* Recipients whose latest status is `delivered`, not read yet. Everyone it was delivered to is deliveredCount + readCount.
|
|
64405
|
+
*/
|
|
64371
64406
|
deliveredCount?: number;
|
|
64407
|
+
/**
|
|
64408
|
+
* Recipients whose latest status is `read`.
|
|
64409
|
+
*/
|
|
64372
64410
|
readCount?: number;
|
|
64411
|
+
/**
|
|
64412
|
+
* Recipients whose send failed.
|
|
64413
|
+
*/
|
|
64373
64414
|
failedCount?: number;
|
|
64374
64415
|
createdAt?: string;
|
|
64375
64416
|
}>;
|
|
@@ -64491,9 +64532,21 @@ export type GetBroadcastResponse = ({
|
|
|
64491
64532
|
startedAt?: string;
|
|
64492
64533
|
completedAt?: string;
|
|
64493
64534
|
recipientCount?: number;
|
|
64535
|
+
/**
|
|
64536
|
+
* Recipients whose latest status is `sent`: the platform accepted the message and has not confirmed delivery yet. Each recipient counts once, under its latest status, so everyone the broadcast went out to is sentCount + deliveredCount + readCount.
|
|
64537
|
+
*/
|
|
64494
64538
|
sentCount?: number;
|
|
64539
|
+
/**
|
|
64540
|
+
* Recipients whose latest status is `delivered`, not read yet. Everyone it was delivered to is deliveredCount + readCount.
|
|
64541
|
+
*/
|
|
64495
64542
|
deliveredCount?: number;
|
|
64543
|
+
/**
|
|
64544
|
+
* Recipients whose latest status is `read`.
|
|
64545
|
+
*/
|
|
64496
64546
|
readCount?: number;
|
|
64547
|
+
/**
|
|
64548
|
+
* Recipients whose send failed.
|
|
64549
|
+
*/
|
|
64497
64550
|
failedCount?: number;
|
|
64498
64551
|
createdAt?: string;
|
|
64499
64552
|
updatedAt?: string;
|
|
@@ -64696,7 +64749,7 @@ export type ListBroadcastRecipientsResponse = ({
|
|
|
64696
64749
|
hasMore?: boolean;
|
|
64697
64750
|
};
|
|
64698
64751
|
/**
|
|
64699
|
-
* Delivery totals across all recipients in the broadcast, independent of pagination and status filtering.
|
|
64752
|
+
* Delivery totals across all recipients in the broadcast, independent of pagination and status filtering. Each recipient counts once, under its latest status, so `sent + delivered + read` is everyone the broadcast went out to.
|
|
64700
64753
|
*/
|
|
64701
64754
|
summary?: {
|
|
64702
64755
|
total?: number;
|
|
@@ -67357,6 +67410,55 @@ export type GetAutomationRunError = (ErrorResponse | {
|
|
|
67357
67410
|
error?: string;
|
|
67358
67411
|
});
|
|
67359
67412
|
|
|
67413
|
+
export type TestAutomationData = {
|
|
67414
|
+
body?: {
|
|
67415
|
+
/**
|
|
67416
|
+
* The sample event, shaped by the automation's kind.
|
|
67417
|
+
*/
|
|
67418
|
+
event?: {
|
|
67419
|
+
[key: string]: unknown;
|
|
67420
|
+
};
|
|
67421
|
+
/**
|
|
67422
|
+
* A sequence's contact, a scheduled automation's post or an ad rule's object.
|
|
67423
|
+
*/
|
|
67424
|
+
subjectId?: string;
|
|
67425
|
+
};
|
|
67426
|
+
path: {
|
|
67427
|
+
automationId: string;
|
|
67428
|
+
};
|
|
67429
|
+
};
|
|
67430
|
+
|
|
67431
|
+
export type TestAutomationResponse = ({
|
|
67432
|
+
decision: AutomationTestDecision;
|
|
67433
|
+
});
|
|
67434
|
+
|
|
67435
|
+
export type TestAutomationError = ((ErrorResponse & {
|
|
67436
|
+
details?: AutomationProblems;
|
|
67437
|
+
}) | ErrorResponse | {
|
|
67438
|
+
error?: string;
|
|
67439
|
+
});
|
|
67440
|
+
|
|
67441
|
+
export type GetAutomationTestSampleData = {
|
|
67442
|
+
path: {
|
|
67443
|
+
automationId: string;
|
|
67444
|
+
};
|
|
67445
|
+
};
|
|
67446
|
+
|
|
67447
|
+
export type GetAutomationTestSampleResponse = ({
|
|
67448
|
+
kind: 'ad_rule' | 'event' | 'scheduled' | 'sequence' | 'comment' | 'workflow';
|
|
67449
|
+
sample: {
|
|
67450
|
+
event?: {
|
|
67451
|
+
[key: string]: unknown;
|
|
67452
|
+
};
|
|
67453
|
+
subjectId?: string;
|
|
67454
|
+
description: string;
|
|
67455
|
+
};
|
|
67456
|
+
});
|
|
67457
|
+
|
|
67458
|
+
export type GetAutomationTestSampleError = (ErrorResponse | {
|
|
67459
|
+
error?: string;
|
|
67460
|
+
});
|
|
67461
|
+
|
|
67360
67462
|
export type PreviewAutomationDraftData = {
|
|
67361
67463
|
body: AutomationDefinition;
|
|
67362
67464
|
query?: {
|