@graph8/sdk 0.7.1 → 0.7.2
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/dist/index.d.mts +33 -15
- package/dist/index.d.ts +33 -15
- package/dist/index.js +34 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -15
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +33 -15
- package/dist/react.d.ts +33 -15
- package/dist/react.js +34 -15
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +34 -15
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2794,22 +2794,40 @@ declare const createSequencesClient: (apiKey: string, apiUrl?: string) => {
|
|
|
2794
2794
|
data: SequenceContactItem[];
|
|
2795
2795
|
pagination?: PaginationMeta;
|
|
2796
2796
|
}>;
|
|
2797
|
-
/**
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2797
|
+
/**
|
|
2798
|
+
* Add contacts to a sequence (V2 queuing). Live or drafted sequences only.
|
|
2799
|
+
* Pass `idempotencyKey` to make a retry safe — the same key returns the
|
|
2800
|
+
* first result instead of re-enrolling on a 5xx-then-success (A6).
|
|
2801
|
+
*/
|
|
2802
|
+
add(config: AddToSequenceConfig, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
2803
|
+
/**
|
|
2804
|
+
* Create a new sequence with optional steps + channels. Pass `idempotencyKey`
|
|
2805
|
+
* to make a retry safe — the same key returns the first result instead of
|
|
2806
|
+
* creating a duplicate sequence on a 5xx-then-success (A6).
|
|
2807
|
+
*/
|
|
2808
|
+
create(payload: SequenceCreateParams, idempotencyKey?: string): Promise<SequenceCreateResult>;
|
|
2801
2809
|
/** Update sequence metadata. Rejected (409) if sequence is in a transitional status. */
|
|
2802
2810
|
update(sequenceId: string, fields: SequenceUpdateParams): Promise<SequenceActionResult>;
|
|
2803
2811
|
/** Update a single step within a sequence. */
|
|
2804
2812
|
updateStep(sequenceId: string, stepId: string, fields: SequenceStepUpdateParams): Promise<SequenceActionResult>;
|
|
2805
2813
|
/** Soft-delete (archive) a sequence. */
|
|
2806
2814
|
delete(sequenceId: string): Promise<SequenceActionResult>;
|
|
2807
|
-
/**
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2815
|
+
/**
|
|
2816
|
+
* Run/start a DRAFTED sequence (V2 orchestration). Pass `idempotencyKey` to
|
|
2817
|
+
* make a retry safe — the same key won't re-trigger the run on a
|
|
2818
|
+
* 5xx-then-success (A6).
|
|
2819
|
+
*/
|
|
2820
|
+
run(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
2821
|
+
/**
|
|
2822
|
+
* Pause a live sequence. Pass `idempotencyKey` to make a retry safe — the
|
|
2823
|
+
* same key won't double-apply on a 5xx-then-success (A6).
|
|
2824
|
+
*/
|
|
2825
|
+
pause(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
2826
|
+
/**
|
|
2827
|
+
* Resume a paused sequence. Pass `idempotencyKey` to make a retry safe — the
|
|
2828
|
+
* same key won't double-apply on a 5xx-then-success (A6).
|
|
2829
|
+
*/
|
|
2830
|
+
resume(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
2813
2831
|
/** Read-only sequence preview with all steps + channels (no enrollment). */
|
|
2814
2832
|
preview(sequenceId: string): Promise<SequencePreview>;
|
|
2815
2833
|
/** Comprehensive analytics for a sequence. */
|
|
@@ -3206,14 +3224,14 @@ declare class G8 {
|
|
|
3206
3224
|
data: SequenceContactItem[];
|
|
3207
3225
|
pagination?: PaginationMeta;
|
|
3208
3226
|
}>;
|
|
3209
|
-
add(config: AddToSequenceConfig): Promise<SequenceActionResult>;
|
|
3210
|
-
create(payload: SequenceCreateParams): Promise<SequenceCreateResult>;
|
|
3227
|
+
add(config: AddToSequenceConfig, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
3228
|
+
create(payload: SequenceCreateParams, idempotencyKey?: string): Promise<SequenceCreateResult>;
|
|
3211
3229
|
update(sequenceId: string, fields: SequenceUpdateParams): Promise<SequenceActionResult>;
|
|
3212
3230
|
updateStep(sequenceId: string, stepId: string, fields: SequenceStepUpdateParams): Promise<SequenceActionResult>;
|
|
3213
3231
|
delete(sequenceId: string): Promise<SequenceActionResult>;
|
|
3214
|
-
run(sequenceId: string): Promise<SequenceActionResult>;
|
|
3215
|
-
pause(sequenceId: string): Promise<SequenceActionResult>;
|
|
3216
|
-
resume(sequenceId: string): Promise<SequenceActionResult>;
|
|
3232
|
+
run(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
3233
|
+
pause(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
3234
|
+
resume(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
3217
3235
|
preview(sequenceId: string): Promise<SequencePreview>;
|
|
3218
3236
|
analytics(sequenceId: string): Promise<SequenceAnalytics>;
|
|
3219
3237
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -2794,22 +2794,40 @@ declare const createSequencesClient: (apiKey: string, apiUrl?: string) => {
|
|
|
2794
2794
|
data: SequenceContactItem[];
|
|
2795
2795
|
pagination?: PaginationMeta;
|
|
2796
2796
|
}>;
|
|
2797
|
-
/**
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2797
|
+
/**
|
|
2798
|
+
* Add contacts to a sequence (V2 queuing). Live or drafted sequences only.
|
|
2799
|
+
* Pass `idempotencyKey` to make a retry safe — the same key returns the
|
|
2800
|
+
* first result instead of re-enrolling on a 5xx-then-success (A6).
|
|
2801
|
+
*/
|
|
2802
|
+
add(config: AddToSequenceConfig, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
2803
|
+
/**
|
|
2804
|
+
* Create a new sequence with optional steps + channels. Pass `idempotencyKey`
|
|
2805
|
+
* to make a retry safe — the same key returns the first result instead of
|
|
2806
|
+
* creating a duplicate sequence on a 5xx-then-success (A6).
|
|
2807
|
+
*/
|
|
2808
|
+
create(payload: SequenceCreateParams, idempotencyKey?: string): Promise<SequenceCreateResult>;
|
|
2801
2809
|
/** Update sequence metadata. Rejected (409) if sequence is in a transitional status. */
|
|
2802
2810
|
update(sequenceId: string, fields: SequenceUpdateParams): Promise<SequenceActionResult>;
|
|
2803
2811
|
/** Update a single step within a sequence. */
|
|
2804
2812
|
updateStep(sequenceId: string, stepId: string, fields: SequenceStepUpdateParams): Promise<SequenceActionResult>;
|
|
2805
2813
|
/** Soft-delete (archive) a sequence. */
|
|
2806
2814
|
delete(sequenceId: string): Promise<SequenceActionResult>;
|
|
2807
|
-
/**
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2815
|
+
/**
|
|
2816
|
+
* Run/start a DRAFTED sequence (V2 orchestration). Pass `idempotencyKey` to
|
|
2817
|
+
* make a retry safe — the same key won't re-trigger the run on a
|
|
2818
|
+
* 5xx-then-success (A6).
|
|
2819
|
+
*/
|
|
2820
|
+
run(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
2821
|
+
/**
|
|
2822
|
+
* Pause a live sequence. Pass `idempotencyKey` to make a retry safe — the
|
|
2823
|
+
* same key won't double-apply on a 5xx-then-success (A6).
|
|
2824
|
+
*/
|
|
2825
|
+
pause(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
2826
|
+
/**
|
|
2827
|
+
* Resume a paused sequence. Pass `idempotencyKey` to make a retry safe — the
|
|
2828
|
+
* same key won't double-apply on a 5xx-then-success (A6).
|
|
2829
|
+
*/
|
|
2830
|
+
resume(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
2813
2831
|
/** Read-only sequence preview with all steps + channels (no enrollment). */
|
|
2814
2832
|
preview(sequenceId: string): Promise<SequencePreview>;
|
|
2815
2833
|
/** Comprehensive analytics for a sequence. */
|
|
@@ -3206,14 +3224,14 @@ declare class G8 {
|
|
|
3206
3224
|
data: SequenceContactItem[];
|
|
3207
3225
|
pagination?: PaginationMeta;
|
|
3208
3226
|
}>;
|
|
3209
|
-
add(config: AddToSequenceConfig): Promise<SequenceActionResult>;
|
|
3210
|
-
create(payload: SequenceCreateParams): Promise<SequenceCreateResult>;
|
|
3227
|
+
add(config: AddToSequenceConfig, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
3228
|
+
create(payload: SequenceCreateParams, idempotencyKey?: string): Promise<SequenceCreateResult>;
|
|
3211
3229
|
update(sequenceId: string, fields: SequenceUpdateParams): Promise<SequenceActionResult>;
|
|
3212
3230
|
updateStep(sequenceId: string, stepId: string, fields: SequenceStepUpdateParams): Promise<SequenceActionResult>;
|
|
3213
3231
|
delete(sequenceId: string): Promise<SequenceActionResult>;
|
|
3214
|
-
run(sequenceId: string): Promise<SequenceActionResult>;
|
|
3215
|
-
pause(sequenceId: string): Promise<SequenceActionResult>;
|
|
3216
|
-
resume(sequenceId: string): Promise<SequenceActionResult>;
|
|
3232
|
+
run(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
3233
|
+
pause(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
3234
|
+
resume(sequenceId: string, idempotencyKey?: string): Promise<SequenceActionResult>;
|
|
3217
3235
|
preview(sequenceId: string): Promise<SequencePreview>;
|
|
3218
3236
|
analytics(sequenceId: string): Promise<SequenceAnalytics>;
|
|
3219
3237
|
};
|
package/dist/index.js
CHANGED
|
@@ -503,21 +503,30 @@ var createSequencesClient = (apiKey, apiUrl) => {
|
|
|
503
503
|
query: params
|
|
504
504
|
});
|
|
505
505
|
},
|
|
506
|
-
/**
|
|
507
|
-
|
|
506
|
+
/**
|
|
507
|
+
* Add contacts to a sequence (V2 queuing). Live or drafted sequences only.
|
|
508
|
+
* Pass `idempotencyKey` to make a retry safe — the same key returns the
|
|
509
|
+
* first result instead of re-enrolling on a 5xx-then-success (A6).
|
|
510
|
+
*/
|
|
511
|
+
async add(config, idempotencyKey) {
|
|
508
512
|
const resp = await request(
|
|
509
513
|
baseUrl,
|
|
510
514
|
`/api/v1/sequences/${config.sequenceId}/contacts`,
|
|
511
515
|
apiKey,
|
|
512
|
-
{ method: "POST", body: { contact_ids: config.contactIds, list_id: config.listId } }
|
|
516
|
+
{ method: "POST", body: { contact_ids: config.contactIds, list_id: config.listId }, idempotencyKey }
|
|
513
517
|
);
|
|
514
518
|
return resp.data ?? resp;
|
|
515
519
|
},
|
|
516
|
-
/**
|
|
517
|
-
|
|
520
|
+
/**
|
|
521
|
+
* Create a new sequence with optional steps + channels. Pass `idempotencyKey`
|
|
522
|
+
* to make a retry safe — the same key returns the first result instead of
|
|
523
|
+
* creating a duplicate sequence on a 5xx-then-success (A6).
|
|
524
|
+
*/
|
|
525
|
+
async create(payload, idempotencyKey) {
|
|
518
526
|
const resp = await request(baseUrl, "/api/v1/sequences", apiKey, {
|
|
519
527
|
method: "POST",
|
|
520
|
-
body: payload
|
|
528
|
+
body: payload,
|
|
529
|
+
idempotencyKey
|
|
521
530
|
});
|
|
522
531
|
return resp.data ?? resp;
|
|
523
532
|
},
|
|
@@ -546,33 +555,43 @@ var createSequencesClient = (apiKey, apiUrl) => {
|
|
|
546
555
|
});
|
|
547
556
|
return resp.data ?? resp;
|
|
548
557
|
},
|
|
549
|
-
/**
|
|
550
|
-
|
|
558
|
+
/**
|
|
559
|
+
* Run/start a DRAFTED sequence (V2 orchestration). Pass `idempotencyKey` to
|
|
560
|
+
* make a retry safe — the same key won't re-trigger the run on a
|
|
561
|
+
* 5xx-then-success (A6).
|
|
562
|
+
*/
|
|
563
|
+
async run(sequenceId, idempotencyKey) {
|
|
551
564
|
const resp = await request(
|
|
552
565
|
baseUrl,
|
|
553
566
|
`/api/v1/sequences/${sequenceId}/run`,
|
|
554
567
|
apiKey,
|
|
555
|
-
{ method: "POST" }
|
|
568
|
+
{ method: "POST", idempotencyKey }
|
|
556
569
|
);
|
|
557
570
|
return resp.data ?? resp;
|
|
558
571
|
},
|
|
559
|
-
/**
|
|
560
|
-
|
|
572
|
+
/**
|
|
573
|
+
* Pause a live sequence. Pass `idempotencyKey` to make a retry safe — the
|
|
574
|
+
* same key won't double-apply on a 5xx-then-success (A6).
|
|
575
|
+
*/
|
|
576
|
+
async pause(sequenceId, idempotencyKey) {
|
|
561
577
|
const resp = await request(
|
|
562
578
|
baseUrl,
|
|
563
579
|
`/api/v1/sequences/${sequenceId}/pause`,
|
|
564
580
|
apiKey,
|
|
565
|
-
{ method: "POST" }
|
|
581
|
+
{ method: "POST", idempotencyKey }
|
|
566
582
|
);
|
|
567
583
|
return resp.data ?? resp;
|
|
568
584
|
},
|
|
569
|
-
/**
|
|
570
|
-
|
|
585
|
+
/**
|
|
586
|
+
* Resume a paused sequence. Pass `idempotencyKey` to make a retry safe — the
|
|
587
|
+
* same key won't double-apply on a 5xx-then-success (A6).
|
|
588
|
+
*/
|
|
589
|
+
async resume(sequenceId, idempotencyKey) {
|
|
571
590
|
const resp = await request(
|
|
572
591
|
baseUrl,
|
|
573
592
|
`/api/v1/sequences/${sequenceId}/resume`,
|
|
574
593
|
apiKey,
|
|
575
|
-
{ method: "POST" }
|
|
594
|
+
{ method: "POST", idempotencyKey }
|
|
576
595
|
);
|
|
577
596
|
return resp.data ?? resp;
|
|
578
597
|
},
|