samva 0.26.0 → 0.28.0

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.
Files changed (107) hide show
  1. package/AGENTS.md +7 -0
  2. package/README.md +14 -7
  3. package/dist/client/sdk.gen.d.ts +322 -143
  4. package/dist/client/sdk.gen.js +1085 -332
  5. package/dist/client/types.gen.d.ts +1342 -479
  6. package/dist/effect/agents.d.ts +119 -0
  7. package/dist/effect/agents.js +29 -0
  8. package/dist/effect/analytics.d.ts +1 -1
  9. package/dist/effect/analytics.js +1 -1
  10. package/dist/effect/api-keys.d.ts +6 -6
  11. package/dist/effect/attachments.d.ts +1 -1
  12. package/dist/effect/brands.d.ts +2 -0
  13. package/dist/effect/campaigns.d.ts +275 -25
  14. package/dist/effect/campaigns.js +7 -1
  15. package/dist/effect/contact-groups.d.ts +9 -9
  16. package/dist/effect/contacts.d.ts +74 -81
  17. package/dist/effect/contacts.js +7 -3
  18. package/dist/effect/conversations.d.ts +14 -6
  19. package/dist/effect/email.d.ts +34 -34
  20. package/dist/effect/errors.d.ts +1 -1
  21. package/dist/effect/errors.js +2 -2
  22. package/dist/effect/extension-installations.d.ts +3 -3
  23. package/dist/effect/extensions.d.ts +6 -6
  24. package/dist/effect/generated/agents.d.ts +6 -28
  25. package/dist/effect/generated/agents.js +270 -0
  26. package/dist/effect/generated/analytics.d.ts +3 -3
  27. package/dist/effect/generated/analytics.js +1 -1
  28. package/dist/effect/generated/api-keys.d.ts +6 -6
  29. package/dist/effect/generated/api-keys.js +2 -2
  30. package/dist/effect/generated/attachments.d.ts +3 -3
  31. package/dist/effect/generated/attachments.js +1 -1
  32. package/dist/effect/generated/brands.d.ts +16 -0
  33. package/dist/effect/generated/campaigns.d.ts +1181 -302
  34. package/dist/effect/generated/campaigns.js +169 -36
  35. package/dist/effect/generated/contact-events.d.ts +3 -3
  36. package/dist/effect/generated/contact-events.js +1 -1
  37. package/dist/effect/generated/contact-groups.d.ts +9 -9
  38. package/dist/effect/generated/contact-groups.js +7 -7
  39. package/dist/effect/generated/contacts.d.ts +2063 -290
  40. package/dist/effect/generated/contacts.js +343 -75
  41. package/dist/effect/generated/conversations.d.ts +14 -6
  42. package/dist/effect/generated/conversations.js +6 -6
  43. package/dist/effect/generated/email.d.ts +55 -70
  44. package/dist/effect/generated/email.js +18 -21
  45. package/dist/effect/generated/extension-installations.d.ts +3 -3
  46. package/dist/effect/generated/extension-installations.js +1 -1
  47. package/dist/effect/generated/extensions.d.ts +6 -6
  48. package/dist/effect/generated/extensions.js +2 -2
  49. package/dist/effect/generated/index.d.ts +5 -3
  50. package/dist/effect/generated/journeys.d.ts +9 -9
  51. package/dist/effect/generated/journeys.js +3 -3
  52. package/dist/effect/generated/mailboxes.d.ts +466 -712
  53. package/dist/effect/generated/mailboxes.js +22 -14
  54. package/dist/effect/generated/messages.d.ts +53 -29
  55. package/dist/effect/generated/messages.js +9 -5
  56. package/dist/effect/generated/namespaces.d.ts +3 -3
  57. package/dist/effect/generated/namespaces.js +1 -1
  58. package/dist/effect/generated/operations.d.ts +3 -3
  59. package/dist/effect/generated/operations.js +1 -1
  60. package/dist/effect/generated/organizations.d.ts +0 -9
  61. package/dist/effect/generated/organizations.js +1 -4
  62. package/dist/effect/generated/scheduled-messages.d.ts +69 -20
  63. package/dist/effect/generated/scheduled-messages.js +22 -3
  64. package/dist/effect/generated/shared.d.ts +431 -177
  65. package/dist/effect/generated/shared.js +216 -108
  66. package/dist/effect/generated/subscriptions.d.ts +4 -7
  67. package/dist/effect/generated/subscriptions.js +3 -4
  68. package/dist/effect/generated/templates.d.ts +71 -407
  69. package/dist/effect/generated/templates.js +23 -23
  70. package/dist/effect/generated/topic-forms.d.ts +656 -0
  71. package/dist/effect/generated/topic-forms.js +145 -0
  72. package/dist/effect/generated/{unsubscribe-groups.d.ts → topics.d.ts} +640 -435
  73. package/dist/effect/generated/topics.js +267 -0
  74. package/dist/effect/generated/webhooks.d.ts +6 -6
  75. package/dist/effect/generated/webhooks.js +2 -2
  76. package/dist/effect/generated-metadata.d.ts +78 -24
  77. package/dist/effect/generated-metadata.js +61 -27
  78. package/dist/effect/index.d.ts +3 -1
  79. package/dist/effect/index.js +5 -3
  80. package/dist/effect/internal/operation.js +4 -3
  81. package/dist/effect/internal/send.d.ts +4 -4
  82. package/dist/effect/journeys.d.ts +119 -119
  83. package/dist/effect/mailboxes.d.ts +137 -121
  84. package/dist/effect/messages.d.ts +19 -11
  85. package/dist/effect/namespaces.d.ts +3 -3
  86. package/dist/effect/operations.d.ts +3 -3
  87. package/dist/effect/scheduled-messages.d.ts +6 -6
  88. package/dist/effect/subscriptions.d.ts +1 -2
  89. package/dist/effect/templates.d.ts +13 -13
  90. package/dist/effect/topic-forms.d.ts +30 -0
  91. package/dist/effect/topic-forms.js +21 -0
  92. package/dist/effect/topics.d.ts +94 -0
  93. package/dist/effect/topics.js +29 -0
  94. package/dist/effect/webhooks.d.ts +6 -6
  95. package/dist/index.js +2 -2
  96. package/dist/package.js +1 -1
  97. package/dist/promises/errors.gen.d.ts +65 -8
  98. package/dist/promises/errors.gen.js +139 -7
  99. package/dist/promises/index.d.ts +7 -3
  100. package/dist/promises/index.js +9 -5
  101. package/dist/promises/types.gen.d.ts +1 -1
  102. package/dist/service-map.d.ts +117 -23
  103. package/dist/service-map.js +71 -10
  104. package/package.json +17 -9
  105. package/dist/effect/generated/unsubscribe-groups.js +0 -284
  106. package/dist/effect/unsubscribe-groups.d.ts +0 -74
  107. package/dist/effect/unsubscribe-groups.js +0 -29
@@ -80,6 +80,10 @@ const SamvaErrorMetadata = {
80
80
  categories: ["transient"],
81
81
  retryable: true
82
82
  },
83
+ TemplateSourceError: {
84
+ categories: ["validation"],
85
+ retryable: false
86
+ },
83
87
  UnauthorizedError: {
84
88
  categories: ["auth"],
85
89
  retryable: false
@@ -570,41 +574,61 @@ const operationMetadata95 = {
570
574
  paginated: false
571
575
  };
572
576
  const operationMetadata96 = {
573
- group: "Unsubscribe Groups",
577
+ group: "Topics",
574
578
  method: "GET",
575
579
  paginated: false
576
580
  };
577
581
  const operationMetadata97 = {
578
- group: "Unsubscribe Groups",
582
+ group: "Topics",
579
583
  method: "POST",
580
584
  paginated: false
581
585
  };
582
586
  const operationMetadata98 = {
583
- group: "Unsubscribe Groups",
587
+ group: "Topics",
584
588
  method: "DELETE",
585
589
  paginated: false
586
590
  };
587
591
  const operationMetadata99 = {
588
- group: "Unsubscribe Groups",
592
+ group: "Topics",
589
593
  method: "PATCH",
590
594
  paginated: false
591
595
  };
592
596
  const operationMetadata100 = {
593
- group: "Unsubscribe Groups",
597
+ group: "Topic forms",
594
598
  method: "GET",
595
- paginated: true
599
+ paginated: false
596
600
  };
597
601
  const operationMetadata101 = {
602
+ group: "Topic forms",
603
+ method: "POST",
604
+ paginated: false
605
+ };
606
+ const operationMetadata102 = {
607
+ group: "Topic forms",
608
+ method: "DELETE",
609
+ paginated: false
610
+ };
611
+ const operationMetadata103 = {
612
+ group: "Topic forms",
613
+ method: "PATCH",
614
+ paginated: false
615
+ };
616
+ const operationMetadata104 = {
617
+ group: "Topics",
618
+ method: "GET",
619
+ paginated: true
620
+ };
621
+ const operationMetadata105 = {
598
622
  group: "Webhooks",
599
623
  method: "GET",
600
624
  paginated: true
601
625
  };
602
- const operationMetadata102 = {
626
+ const operationMetadata106 = {
603
627
  group: "Webhooks",
604
628
  method: "POST",
605
629
  paginated: false
606
630
  };
607
- const operationMetadata103 = {
631
+ const operationMetadata107 = {
608
632
  group: "Webhooks",
609
633
  method: "GET",
610
634
  paginated: false
@@ -654,7 +678,10 @@ const SamvaOperations = {
654
678
  campaignsCancelRun: operationMetadata19,
655
679
  campaignsPauseRun: operationMetadata19,
656
680
  campaignsListRecipients: operationMetadata18,
681
+ campaignsGetRunReport: operationMetadata20,
657
682
  campaignsResumeRun: operationMetadata19,
683
+ campaignsPreview: operationMetadata19,
684
+ campaignsSendTest: operationMetadata19,
658
685
  contactGroupsList: operationMetadata22,
659
686
  contactGroupsCreate: operationMetadata23,
660
687
  contactGroupsGetById: operationMetadata24,
@@ -680,12 +707,14 @@ const SamvaOperations = {
680
707
  contactsAddTags: operationMetadata28,
681
708
  contactsRemoveTags: operationMetadata30,
682
709
  contactsBulkDelete: operationMetadata28,
683
- contactsBulkImport: operationMetadata28,
684
710
  contactsBulkUpdateStatus: operationMetadata28,
685
711
  contactsBulkUpdateTags: operationMetadata28,
686
712
  contactsExport: operationMetadata28,
687
713
  contactsFind: operationMetadata28,
688
714
  contactsFindOrCreate: operationMetadata28,
715
+ contactsStartImport: operationMetadata28,
716
+ contactsGetImportJob: operationMetadata29,
717
+ contactsPlanImport: operationMetadata28,
689
718
  conversationsList: operationMetadata34,
690
719
  conversationsCreate: operationMetadata35,
691
720
  conversationsGetById: operationMetadata36,
@@ -930,18 +959,23 @@ const SamvaOperations = {
930
959
  templatesCreateFamilyFromTemplate: operationMetadata91,
931
960
  templatesCreateFromWebsite: operationMetadata91,
932
961
  templatesAddEntry: operationMetadata91,
933
- unsubscribeList: operationMetadata96,
934
- unsubscribeCreate: operationMetadata97,
935
- unsubscribeRemove: operationMetadata98,
936
- unsubscribeUpdate: operationMetadata99,
937
- unsubscribeSetDefault: operationMetadata97,
938
- unsubscribeListMembers: operationMetadata100,
939
- unsubscribeAddMembers: operationMetadata97,
940
- unsubscribeRemoveMembers: operationMetadata98,
941
- unsubscribeCheckSubscription: operationMetadata96,
942
- webhooksList: operationMetadata101,
943
- webhooksCreate: operationMetadata102,
944
- webhooksGet: operationMetadata103,
962
+ topicsList: operationMetadata96,
963
+ topicsCreate: operationMetadata97,
964
+ topicsGet: operationMetadata96,
965
+ topicsRemove: operationMetadata98,
966
+ topicsUpdate: operationMetadata99,
967
+ topicsSetDefault: operationMetadata97,
968
+ topicFormsList: operationMetadata100,
969
+ topicFormsCreate: operationMetadata101,
970
+ topicFormsGet: operationMetadata100,
971
+ topicFormsRemove: operationMetadata102,
972
+ topicFormsUpdate: operationMetadata103,
973
+ topicsListSubscriptions: operationMetadata104,
974
+ topicsSetSubscriptions: operationMetadata97,
975
+ topicsCheckSubscription: operationMetadata96,
976
+ webhooksList: operationMetadata105,
977
+ webhooksCreate: operationMetadata106,
978
+ webhooksGet: operationMetadata107,
945
979
  webhooksRemove: {
946
980
  group: "Webhooks",
947
981
  method: "DELETE",
@@ -952,12 +986,12 @@ const SamvaOperations = {
952
986
  method: "PATCH",
953
987
  paginated: false
954
988
  },
955
- webhooksRetryDelivery: operationMetadata102,
956
- webhooksGetLogs: operationMetadata101,
957
- webhooksRegenerateSecret: operationMetadata102,
958
- webhooksGetSecret: operationMetadata103,
959
- webhooksGetStats: operationMetadata103,
960
- webhooksTest: operationMetadata102,
989
+ webhooksRetryDelivery: operationMetadata106,
990
+ webhooksGetLogs: operationMetadata105,
991
+ webhooksRegenerateSecret: operationMetadata106,
992
+ webhooksGetSecret: operationMetadata107,
993
+ webhooksGetStats: operationMetadata107,
994
+ webhooksTest: operationMetadata106,
961
995
  whoamiGet: {
962
996
  group: "Whoami",
963
997
  method: "GET",
@@ -16,6 +16,7 @@
16
16
  * }).pipe(Effect.provide(Client.layerFetch({ apiKey: "<samva-api-key>" })));
17
17
  * ```
18
18
  */
19
+ export * as Agents from "./agents";
19
20
  export * as Analytics from "./analytics";
20
21
  export * as ApiKeys from "./api-keys";
21
22
  export * as Attachments from "./attachments";
@@ -42,7 +43,8 @@ export * as Retry from "./retry";
42
43
  export * as ScheduledMessages from "./scheduled-messages";
43
44
  export * as Subscriptions from "./subscriptions";
44
45
  export * as Templates from "./templates";
45
- export * as UnsubscribeGroups from "./unsubscribe-groups";
46
+ export * as Topics from "./topics";
47
+ export * as TopicForms from "./topic-forms";
46
48
  export * as Webhooks from "./webhooks";
47
49
  export * as Whoami from "./whoami";
48
50
  export * from "./errors";
@@ -1,7 +1,8 @@
1
1
  import { MediaUploadError } from "../inline-attachments.js";
2
- import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, UnauthorizedError, ValidationError } from "./generated/shared.js";
2
+ import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, TemplateSourceError, UnauthorizedError, ValidationError } from "./generated/shared.js";
3
3
  import { catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError } from "./categories.js";
4
4
  import { retry_exports } from "./retry.js";
5
+ import { agents_exports } from "./agents.js";
5
6
  import { analytics_exports } from "./analytics.js";
6
7
  import { api_keys_exports } from "./api-keys.js";
7
8
  import { attachments_exports } from "./attachments.js";
@@ -27,7 +28,8 @@ import { organizations_exports } from "./organizations.js";
27
28
  import { scheduled_messages_exports } from "./scheduled-messages.js";
28
29
  import { subscriptions_exports } from "./subscriptions.js";
29
30
  import { templates_exports } from "./templates.js";
30
- import { unsubscribe_groups_exports } from "./unsubscribe-groups.js";
31
+ import { topics_exports } from "./topics.js";
32
+ import { topic_forms_exports } from "./topic-forms.js";
31
33
  import { webhooks_exports } from "./webhooks.js";
32
34
  import { whoami_exports } from "./whoami.js";
33
- export { analytics_exports as Analytics, AnalyticsQueryError, api_keys_exports as ApiKeys, attachments_exports as Attachments, BillingProviderError, BrandAddressRequiredError, brands_exports as Brands, CampaignFooterRequiredError, campaigns_exports as Campaigns, client_exports as Client, ConflictError, contact_groups_exports as ContactGroups, contacts_exports as Contacts, conversations_exports as Conversations, custom_fields_exports as CustomFields, DeliveryUnavailableError, email_exports as Email, EmailChannelError, events_exports as Events, extension_installations_exports as ExtensionInstallations, extensions_exports as Extensions, ExternalServiceError, feedback_exports as Feedback, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, journeys_exports as Journeys, MailboxSendConflictError, MailboxSendRefusedError, mailboxes_exports as Mailboxes, media_exports as Media, MediaUploadError, messages_exports as Messages, namespaces_exports as Namespaces, OnboardingReviewRequiredError, operations_exports as Operations, organizations_exports as Organizations, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, retry_exports as Retry, scheduled_messages_exports as ScheduledMessages, SenderNotReadyError, subscriptions_exports as Subscriptions, templates_exports as Templates, UnauthorizedError, unsubscribe_groups_exports as UnsubscribeGroups, ValidationError, webhooks_exports as Webhooks, whoami_exports as Whoami, catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError };
35
+ export { agents_exports as Agents, analytics_exports as Analytics, AnalyticsQueryError, api_keys_exports as ApiKeys, attachments_exports as Attachments, BillingProviderError, BrandAddressRequiredError, brands_exports as Brands, CampaignFooterRequiredError, campaigns_exports as Campaigns, client_exports as Client, ConflictError, contact_groups_exports as ContactGroups, contacts_exports as Contacts, conversations_exports as Conversations, custom_fields_exports as CustomFields, DeliveryUnavailableError, email_exports as Email, EmailChannelError, events_exports as Events, extension_installations_exports as ExtensionInstallations, extensions_exports as Extensions, ExternalServiceError, feedback_exports as Feedback, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, journeys_exports as Journeys, MailboxSendConflictError, MailboxSendRefusedError, mailboxes_exports as Mailboxes, media_exports as Media, MediaUploadError, messages_exports as Messages, namespaces_exports as Namespaces, OnboardingReviewRequiredError, operations_exports as Operations, organizations_exports as Organizations, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, retry_exports as Retry, scheduled_messages_exports as ScheduledMessages, SenderNotReadyError, subscriptions_exports as Subscriptions, TemplateSourceError, templates_exports as Templates, topic_forms_exports as TopicForms, topics_exports as Topics, UnauthorizedError, ValidationError, webhooks_exports as Webhooks, whoami_exports as Whoami, catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError };
@@ -7,6 +7,7 @@ import { Effect, Predicate } from "effect";
7
7
  //#region src/effect/internal/operation.ts
8
8
  const READ_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD"]);
9
9
  const MODULE_NAMES = {
10
+ agents: "Agents",
10
11
  analytics: "Analytics",
11
12
  apiKeys: "ApiKeys",
12
13
  attachments: "Attachments",
@@ -27,7 +28,7 @@ const MODULE_NAMES = {
27
28
  organizations: "Organizations",
28
29
  scheduledMessages: "ScheduledMessages",
29
30
  templates: "Templates",
30
- unsubscribe: "UnsubscribeGroups",
31
+ topics: "Topics",
31
32
  webhooks: "Webhooks",
32
33
  whoami: "Whoami"
33
34
  };
@@ -49,8 +50,8 @@ const adapt = (operationName, rawCall, input) => {
49
50
  const descriptor = SDK_OPERATION_CALLS[operationName];
50
51
  const call = READ_METHODS.has(SamvaOperations[operationName].method) ? (request) => withRetry(rawCall(request)) : rawCall;
51
52
  if (descriptor.kind === "none") return call();
52
- if (descriptor.kind === "params") return call({ query: stripUndefined(input) });
53
- if (descriptor.kind === "payload") return call({ payload: stripUndefined(input) });
53
+ if (descriptor.kind === "params") return call({ query: stripUndefined(input === void 0 ? {} : input) });
54
+ if (descriptor.kind === "payload") return call({ payload: stripUndefined(input === void 0 ? {} : input) });
54
55
  if (descriptor.kind === "idempotentPayload") {
55
56
  const { idempotencyKey, ...payload } = input;
56
57
  return call({
@@ -40,8 +40,8 @@ export declare const sendMessage: (input: MessageSendInput, options?: SendOption
40
40
  readonly reviewExpectedAt: string | null;
41
41
  readonly skippedRecipients: readonly {
42
42
  readonly address: string;
43
- readonly reason: "bounce" | "complaint" | "group-unsubscribe" | "manual" | "unsubscribe";
44
- readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
43
+ readonly reason: "bounce" | "complaint" | "manual" | "topic-unsubscribe" | "unsubscribe";
44
+ readonly topicId?: (string & import("effect/Brand").Brand<"TopicId">) | null;
45
45
  }[];
46
46
  readonly createdAt: string;
47
47
  }, UploadFailure, Service>;
@@ -52,8 +52,8 @@ export declare const sendEmail: (input: EmailSendInput, options?: SendOptions |
52
52
  readonly reviewExpectedAt: string | null;
53
53
  readonly skippedRecipients: readonly {
54
54
  readonly address: string;
55
- readonly reason: "bounce" | "complaint" | "group-unsubscribe" | "manual" | "unsubscribe";
56
- readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
55
+ readonly reason: "bounce" | "complaint" | "manual" | "topic-unsubscribe" | "unsubscribe";
56
+ readonly topicId?: (string & import("effect/Brand").Brand<"TopicId">) | null;
57
57
  }[];
58
58
  readonly createdAt: string;
59
59
  }, UploadFailure, Service>;
@@ -1,11 +1,11 @@
1
1
  export declare const list: ((input?: {
2
2
  readonly status?: "active" | "archived" | "draft" | "paused" | null | undefined;
3
- readonly limit?: string | null | undefined;
3
+ readonly limit?: number | null | undefined;
4
4
  readonly cursor?: string | null | undefined;
5
5
  } | undefined) => import("./internal/operation").OperationResult<"journeysList">) & {
6
6
  readonly pages: (input?: {
7
7
  readonly status?: "active" | "archived" | "draft" | "paused" | null | undefined;
8
- readonly limit?: string | null | undefined;
8
+ readonly limit?: number | null | undefined;
9
9
  readonly cursor?: string | null | undefined;
10
10
  } | undefined) => import("effect/Stream").Stream<{
11
11
  readonly items: readonly {
@@ -21,7 +21,7 @@ export declare const list: ((input?: {
21
21
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
22
22
  readonly items: (input?: {
23
23
  readonly status?: "active" | "archived" | "draft" | "paused" | null | undefined;
24
- readonly limit?: string | null | undefined;
24
+ readonly limit?: number | null | undefined;
25
25
  readonly cursor?: string | null | undefined;
26
26
  } | undefined) => import("effect/Stream").Stream<{
27
27
  readonly id: string & import("effect/Brand").Brand<"JourneyId">;
@@ -37,6 +37,9 @@ export declare const create: (input: {
37
37
  readonly name: string;
38
38
  readonly definition: {
39
39
  readonly trigger: {
40
+ readonly type: "event";
41
+ readonly eventName: string;
42
+ } | {
40
43
  readonly type: "contact.created";
41
44
  } | {
42
45
  readonly type: "contact.tag_added";
@@ -44,19 +47,10 @@ export declare const create: (input: {
44
47
  } | {
45
48
  readonly type: "contact.joined_group";
46
49
  readonly groupId: string;
47
- } | {
48
- readonly type: "event";
49
- readonly eventName: string;
50
50
  };
51
51
  readonly rootNodeId: string;
52
52
  readonly nodes: {
53
53
  readonly [x: string]: {
54
- readonly type: "exit";
55
- readonly config: {
56
- readonly [x: string]: undefined;
57
- };
58
- readonly next: readonly never[];
59
- } | {
60
54
  readonly type: "send_email";
61
55
  readonly config: {
62
56
  readonly template: string;
@@ -100,49 +94,6 @@ export declare const create: (input: {
100
94
  readonly next: readonly {
101
95
  readonly nodeId: string;
102
96
  }[];
103
- } | {
104
- readonly type: "update_tags";
105
- readonly config: {
106
- readonly add: readonly string[];
107
- readonly remove: readonly string[];
108
- };
109
- readonly next: readonly {
110
- readonly nodeId: string;
111
- }[];
112
- } | {
113
- readonly type: "webhook";
114
- readonly config: {
115
- readonly data?: {
116
- readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | any | {
117
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
118
- } | null)[] | {
119
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
120
- } | null)[] | {
121
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
122
- } | null)[] | {
123
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
124
- } | null)[] | {
125
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
126
- } | null)[] | {
127
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
128
- } | null)[] | {
129
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
130
- } | null)[] | {
131
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
132
- } | null)[] | {
133
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
134
- } | null)[] | {
135
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
136
- } | null)[] | {
137
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
138
- } | null)[] | {
139
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
140
- } | null | undefined;
141
- } | undefined;
142
- };
143
- readonly next: readonly {
144
- readonly nodeId: string;
145
- }[];
146
97
  } | {
147
98
  readonly type: "wait_for_event";
148
99
  readonly config: {
@@ -166,10 +117,6 @@ export declare const create: (input: {
166
117
  readonly type: "tag";
167
118
  readonly tag: string;
168
119
  readonly present: boolean;
169
- } | {
170
- readonly type: "event";
171
- readonly eventName: string;
172
- readonly occurred: boolean;
173
120
  } | {
174
121
  readonly type: "property";
175
122
  readonly field: "displayName" | "externalId" | "name" | "profile.company" | "profile.firstName" | "profile.jobTitle" | "profile.lastName" | "profile.location.city" | "profile.location.country" | "profile.location.state" | "profile.location.timezone" | "profile.source" | "status";
@@ -200,9 +147,62 @@ export declare const create: (input: {
200
147
  } | {
201
148
  readonly operator: "exists" | "not_exists";
202
149
  };
150
+ } | {
151
+ readonly type: "event";
152
+ readonly eventName: string;
153
+ readonly occurred: boolean;
203
154
  })[];
204
155
  } | undefined;
205
156
  }[];
157
+ } | {
158
+ readonly type: "update_tags";
159
+ readonly config: {
160
+ readonly add: readonly string[];
161
+ readonly remove: readonly string[];
162
+ };
163
+ readonly next: readonly {
164
+ readonly nodeId: string;
165
+ }[];
166
+ } | {
167
+ readonly type: "webhook";
168
+ readonly config: {
169
+ readonly data?: {
170
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | any | {
171
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
172
+ } | null)[] | {
173
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
174
+ } | null)[] | {
175
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
176
+ } | null)[] | {
177
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
178
+ } | null)[] | {
179
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
180
+ } | null)[] | {
181
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
182
+ } | null)[] | {
183
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
184
+ } | null)[] | {
185
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
186
+ } | null)[] | {
187
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
188
+ } | null)[] | {
189
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
190
+ } | null)[] | {
191
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
192
+ } | null)[] | {
193
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
194
+ } | null | undefined;
195
+ } | undefined;
196
+ };
197
+ readonly next: readonly {
198
+ readonly nodeId: string;
199
+ }[];
200
+ } | {
201
+ readonly type: "exit";
202
+ readonly config: {
203
+ readonly [x: string]: undefined;
204
+ };
205
+ readonly next: readonly never[];
206
206
  } | undefined;
207
207
  };
208
208
  readonly goal?: {
@@ -226,6 +226,9 @@ export declare const replaceDraft: (input: {
226
226
  readonly revision: string;
227
227
  readonly definition: {
228
228
  readonly trigger: {
229
+ readonly type: "event";
230
+ readonly eventName: string;
231
+ } | {
229
232
  readonly type: "contact.created";
230
233
  } | {
231
234
  readonly type: "contact.tag_added";
@@ -233,19 +236,10 @@ export declare const replaceDraft: (input: {
233
236
  } | {
234
237
  readonly type: "contact.joined_group";
235
238
  readonly groupId: string;
236
- } | {
237
- readonly type: "event";
238
- readonly eventName: string;
239
239
  };
240
240
  readonly rootNodeId: string;
241
241
  readonly nodes: {
242
242
  readonly [x: string]: {
243
- readonly type: "exit";
244
- readonly config: {
245
- readonly [x: string]: undefined;
246
- };
247
- readonly next: readonly never[];
248
- } | {
249
243
  readonly type: "send_email";
250
244
  readonly config: {
251
245
  readonly template: string;
@@ -289,49 +283,6 @@ export declare const replaceDraft: (input: {
289
283
  readonly next: readonly {
290
284
  readonly nodeId: string;
291
285
  }[];
292
- } | {
293
- readonly type: "update_tags";
294
- readonly config: {
295
- readonly add: readonly string[];
296
- readonly remove: readonly string[];
297
- };
298
- readonly next: readonly {
299
- readonly nodeId: string;
300
- }[];
301
- } | {
302
- readonly type: "webhook";
303
- readonly config: {
304
- readonly data?: {
305
- readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | any | {
306
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
307
- } | null)[] | {
308
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
309
- } | null)[] | {
310
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
311
- } | null)[] | {
312
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
313
- } | null)[] | {
314
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
315
- } | null)[] | {
316
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
317
- } | null)[] | {
318
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
319
- } | null)[] | {
320
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
321
- } | null)[] | {
322
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
323
- } | null)[] | {
324
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
325
- } | null)[] | {
326
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
327
- } | null)[] | {
328
- readonly [x: string]: string | number | boolean | any | any | null | undefined;
329
- } | null | undefined;
330
- } | undefined;
331
- };
332
- readonly next: readonly {
333
- readonly nodeId: string;
334
- }[];
335
286
  } | {
336
287
  readonly type: "wait_for_event";
337
288
  readonly config: {
@@ -355,10 +306,6 @@ export declare const replaceDraft: (input: {
355
306
  readonly type: "tag";
356
307
  readonly tag: string;
357
308
  readonly present: boolean;
358
- } | {
359
- readonly type: "event";
360
- readonly eventName: string;
361
- readonly occurred: boolean;
362
309
  } | {
363
310
  readonly type: "property";
364
311
  readonly field: "displayName" | "externalId" | "name" | "profile.company" | "profile.firstName" | "profile.jobTitle" | "profile.lastName" | "profile.location.city" | "profile.location.country" | "profile.location.state" | "profile.location.timezone" | "profile.source" | "status";
@@ -389,9 +336,62 @@ export declare const replaceDraft: (input: {
389
336
  } | {
390
337
  readonly operator: "exists" | "not_exists";
391
338
  };
339
+ } | {
340
+ readonly type: "event";
341
+ readonly eventName: string;
342
+ readonly occurred: boolean;
392
343
  })[];
393
344
  } | undefined;
394
345
  }[];
346
+ } | {
347
+ readonly type: "update_tags";
348
+ readonly config: {
349
+ readonly add: readonly string[];
350
+ readonly remove: readonly string[];
351
+ };
352
+ readonly next: readonly {
353
+ readonly nodeId: string;
354
+ }[];
355
+ } | {
356
+ readonly type: "webhook";
357
+ readonly config: {
358
+ readonly data?: {
359
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | any | {
360
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
361
+ } | null)[] | {
362
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
363
+ } | null)[] | {
364
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
365
+ } | null)[] | {
366
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
367
+ } | null)[] | {
368
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
369
+ } | null)[] | {
370
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
371
+ } | null)[] | {
372
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
373
+ } | null)[] | {
374
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
375
+ } | null)[] | {
376
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
377
+ } | null)[] | {
378
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
379
+ } | null)[] | {
380
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
381
+ } | null)[] | {
382
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
383
+ } | null | undefined;
384
+ } | undefined;
385
+ };
386
+ readonly next: readonly {
387
+ readonly nodeId: string;
388
+ }[];
389
+ } | {
390
+ readonly type: "exit";
391
+ readonly config: {
392
+ readonly [x: string]: undefined;
393
+ };
394
+ readonly next: readonly never[];
395
395
  } | undefined;
396
396
  };
397
397
  readonly goal?: {
@@ -419,20 +419,20 @@ export declare const getVersion: (input: {
419
419
  }) => import("./internal/operation").OperationResult<"journeysGetVersion">;
420
420
  export declare const stats: (input: {
421
421
  readonly id: string;
422
- readonly version?: string | null | undefined;
422
+ readonly version?: number | null | undefined;
423
423
  }) => import("./internal/operation").OperationResult<"journeysStats">;
424
424
  export declare const listRuns: ((input: {
425
425
  readonly id: string;
426
426
  readonly status?: "active" | "exited" | "failed" | "paused" | null | undefined;
427
427
  readonly contactId?: string | null | undefined;
428
- readonly limit?: string | null | undefined;
428
+ readonly limit?: number | null | undefined;
429
429
  readonly cursor?: string | null | undefined;
430
430
  }) => import("./internal/operation").OperationResult<"journeysListRuns">) & {
431
431
  readonly pages: (input: {
432
432
  readonly id: string;
433
433
  readonly status?: "active" | "exited" | "failed" | "paused" | null | undefined;
434
434
  readonly contactId?: string | null | undefined;
435
- readonly limit?: string | null | undefined;
435
+ readonly limit?: number | null | undefined;
436
436
  readonly cursor?: string | null | undefined;
437
437
  }) => import("effect/Stream").Stream<{
438
438
  readonly items: readonly {
@@ -462,7 +462,7 @@ export declare const listRuns: ((input: {
462
462
  readonly id: string;
463
463
  readonly status?: "active" | "exited" | "failed" | "paused" | null | undefined;
464
464
  readonly contactId?: string | null | undefined;
465
- readonly limit?: string | null | undefined;
465
+ readonly limit?: number | null | undefined;
466
466
  readonly cursor?: string | null | undefined;
467
467
  }) => import("effect/Stream").Stream<{
468
468
  readonly id: string & import("effect/Brand").Brand<"JourneyRunId">;