samva 0.52.0 → 0.53.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.
@@ -641,6 +641,7 @@ const WhatsAppReceivedReply = /* @__PURE__ */ (() => Schema.Struct({
641
641
  }).annotate({ identifier: "WhatsAppReceivedReply" }))();
642
642
  const WhatsAppReceivedFlowResponse = /* @__PURE__ */ (() => Schema.Struct({
643
643
  flowToken: Schema.Union([Schema.String, Schema.Null]),
644
+ submissionHandler: Schema.optionalKey(Schema.Literal("app")),
644
645
  response: Schema.Record(Schema.String, JsonValue),
645
646
  body: Schema.optionalKey(Schema.String)
646
647
  }).annotate({ identifier: "WhatsAppReceivedFlowResponse" }))();
@@ -784,6 +785,10 @@ const EmailSender = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({
784
785
  }), Schema.Null]).annotate({ identifier: "EmailSender" }))();
785
786
  const WhatsAppTextContent = /* @__PURE__ */ (() => Schema.Struct({ text: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(4096).annotate({ expected: "a string with at most 4096 code points" })).check(Schema.isMaxLength(4096).annotate({ expected: "a value with a length of at most 4096" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })) }).annotate({ identifier: "WhatsAppTextContent" }))();
786
787
  const WhatsAppTemplateData = /* @__PURE__ */ (() => Schema.Record(Schema.String, JsonValue).annotate({ identifier: "WhatsAppTemplateData" }))();
788
+ const JsonObject_1 = /* @__PURE__ */ (() => Schema.Record(Schema.String, JsonValue).annotate({
789
+ description: "Initial screen data for a navigate Flow button.",
790
+ identifier: "JsonObject_1"
791
+ }))();
787
792
  const WhatsAppImageLink = /* @__PURE__ */ (() => Schema.Struct({
788
793
  type: Schema.Literal("image"),
789
794
  caption: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
@@ -954,7 +959,10 @@ const ContactConsent = /* @__PURE__ */ (() => Schema.Struct({
954
959
  capturedAt: Schema.String,
955
960
  proof: Schema.Union([JsonObject, Schema.Null])
956
961
  }).annotate({ identifier: "ContactConsent" }))();
957
- const JourneyWebhookConfig = /* @__PURE__ */ (() => Schema.Struct({ data: Schema.optionalKey(JsonObject) }).annotate({ identifier: "JourneyWebhookConfig" }))();
962
+ const JourneyWebhookConfig = /* @__PURE__ */ (() => Schema.Struct({
963
+ data: Schema.optionalKey(JsonObject),
964
+ eventBindings: Schema.optionalKey(Schema.Record(Schema.String, Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isPattern(new globalThis.RegExp("^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$" }))).check(Schema.isPropertyNames(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))).annotate({ expected: "an object with property names matching the schema" })))
965
+ }).annotate({ identifier: "JourneyWebhookConfig" }))();
958
966
  const AccountLinks = /* @__PURE__ */ (() => Schema.Record(Schema.String, IntegrationAccountId).annotate({ identifier: "AccountLinks" }))();
959
967
  const ContactEvent = /* @__PURE__ */ (() => Schema.Struct({
960
968
  id: Schema.String,
@@ -969,17 +977,26 @@ const ContactEventReference = /* @__PURE__ */ (() => Schema.Union([
969
977
  Schema.Struct({
970
978
  id: ContactId,
971
979
  externalId: Schema.optionalKey(Schema.Never),
972
- email: Schema.optionalKey(Schema.Never)
980
+ email: Schema.optionalKey(Schema.Never),
981
+ phone: Schema.optionalKey(Schema.Never)
973
982
  }),
974
983
  Schema.Struct({
975
984
  externalId: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
976
985
  id: Schema.optionalKey(Schema.Never),
977
- email: Schema.optionalKey(Schema.Never)
986
+ email: Schema.optionalKey(Schema.Never),
987
+ phone: Schema.optionalKey(Schema.Never)
978
988
  }),
979
989
  Schema.Struct({
980
990
  email: Schema.String,
981
991
  id: Schema.optionalKey(Schema.Never),
982
- externalId: Schema.optionalKey(Schema.Never)
992
+ externalId: Schema.optionalKey(Schema.Never),
993
+ phone: Schema.optionalKey(Schema.Never)
994
+ }),
995
+ Schema.Struct({
996
+ phone: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^\\+[1-9]\\d{1,14}$", "u")).annotate({ expected: "a string matching the RegExp ^\\+[1-9]\\d{1,14}$" })),
997
+ id: Schema.optionalKey(Schema.Never),
998
+ externalId: Schema.optionalKey(Schema.Never),
999
+ email: Schema.optionalKey(Schema.Never)
983
1000
  })
984
1001
  ]).annotate({ identifier: "ContactEventReference" }))();
985
1002
  const EmailRecipient = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({ contactId: ContactId }), Schema.Struct({
@@ -1403,7 +1420,8 @@ const JourneySendEmailConfig = /* @__PURE__ */ (() => Schema.Struct({
1403
1420
  template: Schema.Union([TemplateId, Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$" }))]),
1404
1421
  publicationId: Schema.optionalKey(TemplatePublicationId),
1405
1422
  senderId: Schema.optionalKey(EmailSenderId),
1406
- templateData: Schema.optionalKey(JsonObject)
1423
+ templateData: Schema.optionalKey(JsonObject),
1424
+ eventBindings: Schema.optionalKey(Schema.Record(Schema.String, Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isPattern(new globalThis.RegExp("^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$" }))).check(Schema.isPropertyNames(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))).annotate({ expected: "an object with property names matching the schema" })))
1407
1425
  }).annotate({ identifier: "JourneySendEmailConfig" }))();
1408
1426
  const SendFeedback = /* @__PURE__ */ (() => Schema.Struct({
1409
1427
  message: Schema.String.annotate({ description: "What happened and what you expected, in plain language (at most 4000 characters)." }).check(Schema.isMaxCodePoints(4e3).annotate({ expected: "a string with at most 4000 code points" })).check(Schema.isPattern(new globalThis.RegExp("\\S", "u")).annotate({ expected: "a string matching the RegExp \\S" })).check(Schema.isMaxLength(4e3).annotate({ expected: "a value with a length of at most 4000" })),
@@ -1553,12 +1571,14 @@ const MailboxSendOutcome = /* @__PURE__ */ (() => Schema.Struct({
1553
1571
  const WhatsAppTemplateIdContent = /* @__PURE__ */ (() => Schema.Struct({
1554
1572
  templateId: TemplateId,
1555
1573
  templateData: Schema.optionalKey(WhatsAppTemplateData),
1556
- flowToken: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
1574
+ flowToken: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
1575
+ flowActionData: Schema.optionalKey(JsonObject_1)
1557
1576
  }).annotate({ identifier: "WhatsAppTemplateIdContent" }))();
1558
1577
  const WhatsAppTemplateSlugContent = /* @__PURE__ */ (() => Schema.Struct({
1559
1578
  templateSlug: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9]+(?:-[a-z0-9]+)*$" })),
1560
1579
  templateData: Schema.optionalKey(WhatsAppTemplateData),
1561
- flowToken: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
1580
+ flowToken: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
1581
+ flowActionData: Schema.optionalKey(JsonObject_1)
1562
1582
  }).annotate({ identifier: "WhatsAppTemplateSlugContent" }))();
1563
1583
  const WhatsAppLocationContent = /* @__PURE__ */ (() => Schema.Struct({ location: WhatsAppLocation }).annotate({ identifier: "WhatsAppLocationContent" }))();
1564
1584
  const WhatsAppContactsContent = /* @__PURE__ */ (() => Schema.Struct({ contacts: Schema.Array(WhatsAppContactCard).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(257).annotate({ expected: "a value with a length of at most 257" })) }).annotate({ identifier: "WhatsAppContactsContent" }))();
@@ -1789,6 +1809,10 @@ const JourneyTrigger = /* @__PURE__ */ (() => Schema.Union([
1789
1809
  ]).annotate({ identifier: "JourneyTrigger" }))();
1790
1810
  const JourneyWaitForEventConfig = /* @__PURE__ */ (() => Schema.Struct({
1791
1811
  eventName: JourneyEventName,
1812
+ correlation: Schema.optionalKey(Schema.Struct({
1813
+ eventProperty: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isPattern(new globalThis.RegExp("^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$" })),
1814
+ entryProperty: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isPattern(new globalThis.RegExp("^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$" }))
1815
+ })),
1792
1816
  timeoutSeconds: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(7776e3).annotate({ expected: "a value less than or equal to 7776000" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" }))
1793
1817
  }).annotate({ identifier: "JourneyWaitForEventConfig" }))();
1794
1818
  const JourneyEventPredicate = /* @__PURE__ */ (() => Schema.Struct({
@@ -1827,6 +1851,11 @@ const JourneyCustomFieldPredicate = /* @__PURE__ */ (() => Schema.Struct({
1827
1851
  key: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
1828
1852
  comparison: JourneyComparison
1829
1853
  }).annotate({ identifier: "JourneyCustomFieldPredicate" }))();
1854
+ const JourneyEntryEventPropertyPredicate = /* @__PURE__ */ (() => Schema.Struct({
1855
+ type: Schema.Literal("entry_event_property"),
1856
+ property: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isPattern(new globalThis.RegExp("^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$" })),
1857
+ comparison: JourneyComparison
1858
+ }).annotate({ identifier: "JourneyEntryEventPropertyPredicate" }))();
1830
1859
  const WhatsAppListMessage = /* @__PURE__ */ (() => Schema.Struct({
1831
1860
  type: Schema.Literal("list"),
1832
1861
  header: Schema.optionalKey(WhatsAppTextHeader),
@@ -1980,7 +2009,8 @@ const JourneySendWhatsAppConfig = /* @__PURE__ */ (() => Schema.Struct({
1980
2009
  registrationId: TemplateRegistrationId,
1981
2010
  templateChannelVariantId: TemplateChannelVariantId
1982
2011
  })),
1983
- eventBindings: Schema.optionalKey(Schema.Record(Schema.String, Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isPattern(new globalThis.RegExp("^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$" }))).check(Schema.isPropertyNames(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))).annotate({ expected: "an object with property names matching the schema" })))
2012
+ eventBindings: Schema.optionalKey(Schema.Record(Schema.String, Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isPattern(new globalThis.RegExp("^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$" }))).check(Schema.isPropertyNames(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))).annotate({ expected: "an object with property names matching the schema" }))),
2013
+ flowActionDataBinding: Schema.optionalKey(Schema.String.annotate({ description: "Entry-event property path to the JSON object that initializes a navigate Flow button." }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isPattern(new globalThis.RegExp("^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$" })))
1984
2014
  }).annotate({ identifier: "JourneySendWhatsAppConfig" }))();
1985
2015
  const JourneyWaitForEventNode = /* @__PURE__ */ (() => Schema.Struct({
1986
2016
  type: Schema.Literal("wait_for_event"),
@@ -1991,7 +2021,8 @@ const JourneyPredicate = /* @__PURE__ */ (() => Schema.Union([
1991
2021
  JourneyTagPredicate,
1992
2022
  JourneyPropertyPredicate,
1993
2023
  JourneyCustomFieldPredicate,
1994
- JourneyEventPredicate
2024
+ JourneyEventPredicate,
2025
+ JourneyEntryEventPropertyPredicate
1995
2026
  ]).annotate({ identifier: "JourneyPredicate" }))();
1996
2027
  var MailboxSendRefusedError = class extends Schema.TaggedError()("MailboxSendRefusedError", Schema.Struct({
1997
2028
  message: Schema.String,
@@ -2119,6 +2150,7 @@ const AgentModuleBundle = /* @__PURE__ */ (() => Schema.Struct({
2119
2150
  manifest: AgentModuleManifest
2120
2151
  }).annotate({ identifier: "AgentModuleBundle" }))();
2121
2152
  const WhatsAppMessageContent = /* @__PURE__ */ (() => Schema.Struct({
2153
+ appHandlesFlowSubmission: Schema.optionalKey(Schema.Literal(true)),
2122
2154
  text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2123
2155
  template: Schema.optionalKey(Schema.Union([Schema.Struct({
2124
2156
  name: Schema.String,
@@ -2162,7 +2194,10 @@ const WhatsAppMessageContent = /* @__PURE__ */ (() => Schema.Struct({
2162
2194
  }), Schema.Null])),
2163
2195
  video: Schema.optionalKey(Schema.Union([Schema.Struct({ link: Schema.String }), Schema.Null])),
2164
2196
  coupon_code: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2165
- action: Schema.optionalKey(Schema.Union([Schema.Struct({ flow_token: Schema.String }), Schema.Null]))
2197
+ action: Schema.optionalKey(Schema.Union([Schema.Struct({
2198
+ flow_token: Schema.String,
2199
+ flow_action_data: Schema.optionalKey(JsonObject)
2200
+ }), Schema.Null]))
2166
2201
  }))
2167
2202
  }))
2168
2203
  }), Schema.Null])),
@@ -2245,10 +2280,13 @@ const JourneyDefinition = /* @__PURE__ */ (() => Schema.Struct({
2245
2280
  nodes: Schema.Record(Schema.String, JourneyNode).check(Schema.isMinProperties(1).annotate({ expected: "a value with at least 1 entry" })).check(Schema.isMaxProperties(200).annotate({ expected: "a value with at most 200 entries" })),
2246
2281
  goal: Schema.optionalKey(JourneyGoal),
2247
2282
  reentry: Schema.optionalKey(Schema.Boolean),
2248
- enrollment: Schema.optionalKey(Schema.Struct({
2283
+ enrollment: Schema.optionalKey(Schema.Union([Schema.Struct({
2249
2284
  type: Schema.Literal("shopify_order"),
2250
2285
  shop: ShopifyShop
2251
- }))
2286
+ }), Schema.Struct({
2287
+ type: Schema.Literal("event_property"),
2288
+ property: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isPattern(new globalThis.RegExp("^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^[a-zA-Z0-9_]+(?:\\.[a-zA-Z0-9_]+)*$" }))
2289
+ })]))
2252
2290
  }).annotate({ identifier: "JourneyDefinition" }))();
2253
2291
  const __recursive_JsonValue = Schema.Union([
2254
2292
  Schema.String,
@@ -2263,6 +2301,6 @@ const ApiKeySecurity = HttpApiSecurity.apiKey({
2263
2301
  in: "header"
2264
2302
  });
2265
2303
  var ApiKeySecurityMiddleware = class extends HttpApiMiddleware.Service()("apiKey security", { security: { apiKey: ApiKeySecurity } }) {};
2266
- export { AccountLinks, AccountStatus, AgentDefinition, AgentId, AgentIntegrationGrant, AgentModel, AgentModelChoice, AgentModuleBundle, AgentModuleManifest, AgentModuleTool, AgentName, AgentReasoning, AgentSetupJob, AgentToolScope, AnalyticsQueryError, AnswerWithoutApproval, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandSocialLink, CampaignAudience, CampaignContentInput, CampaignContentMetadata, CampaignConversationRef, CampaignEmailInput, CampaignFooterRequiredError, CampaignFromInput, CampaignId, CampaignLatestRun, CampaignReplyMailbox, CampaignRunId, CatalogModelId, ClockTime, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxChatDraftPayload, CreateMailboxEmailDraftPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, CredentialsError, DeliveryErrorDetails, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCampaignContentInput, EmailCcRecipients, EmailChannelError, EmailContent, EmailCustomHeaders, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSendMessagePayload, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionInstallationId, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, IntegrationAccountId, IntegrationId, IntegrationKey, IntegrationReturnTo, IntegrationStatus, IntegrationTool, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyId, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneySendWhatsAppConfig, JourneyStatus, JourneyStringComparison, JourneyTagAddedTrigger, JourneyTagPredicate, JourneyTrigger, JourneyUpdateTagsConfig, JourneyUpdateTagsNode, JourneyWaitConfig, JourneyWaitEventEdge, JourneyWaitForEventConfig, JourneyWaitForEventNode, JourneyWaitNode, JourneyWebhookConfig, JourneyWebhookNode, JsonObject, JsonValue, KnowledgeSourceId, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxSendConflictError, MailboxSendError, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MalformedRequestError, MediaId, MessageContent, MessageDeliveryId, MessageId, MessageMetadata, MessagePage, MessageSummary, MonthlySpendCapDollars, NamespaceId, NamespaceMetadata, NamespacePortalLinkMetadata, NamespaceResourceType, NewsletterId, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, PolicyConfiguration, PolicyDecider, PolicyDecisionId, PolicyEffect, PolicyRequirement, PolicyReviewRound, PolicyRule, PolicyRuleMatch, PolicySubject, PolicyVersion, RateLimitedError, RecipeSetupReferences, RenderLocale, RenderTimeZone, ReplyMailboxChatPayload, ReplyMailboxEmailPayload, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SendMailboxChatPayload, SendMailboxEmailPayload, SenderNotReadyError, SendsSeries, ServiceUnavailableError, ShareLinkUnavailable, ShopifyShop, SkippedRecipient, SlugTaken, SmsCampaignContentInput, SmsContent, SmsDispatchContent, SmsMessageContent, SmsRecipient, SmsRecipients, SmsSendMessagePayload, SmsTemplateData, StoredEmailAttachments, StoredReplyToAddresses, SubmissionClient, SuccessResponse, TemplateChannelVariantId, TemplateData, TemplateFamilyId, TemplateFromDefaultInput, TemplateId, TemplateInUseError, TemplateInputContractId, TemplateProjectId, TemplatePublicationId, TemplateRegistrationApproval, TemplateRegistrationId, TemplateSourceError, TemplateTrackingDefault, TestWebhookPayload, TimeZone, TopicContactByEmail, TopicContactById, TopicContactByPhone, TopicContactRef, TopicId, UnauthorizedError, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, WebhookEndpointId, Weekday, WhatsAppAudio, WhatsAppAudioLink, WhatsAppAudioUpload, WhatsAppBusinessAccountId, WhatsAppButtonsMessage, WhatsAppCampaignContentInput, WhatsAppChannelError, WhatsAppContactCard, WhatsAppContactsContent, WhatsAppContent, WhatsAppCtaUrlMessage, WhatsAppDocument, WhatsAppDocumentHeader, WhatsAppDocumentHeaderLink, WhatsAppDocumentHeaderUpload, WhatsAppDocumentLink, WhatsAppDocumentUpload, WhatsAppFlowId, WhatsAppFlowMessage, WhatsAppFlowVersionId, WhatsAppImage, WhatsAppImageHeader, WhatsAppImageHeaderLink, WhatsAppImageHeaderUpload, WhatsAppImageLink, WhatsAppImageUpload, WhatsAppInteractive, WhatsAppInteractiveContent, WhatsAppInteractiveHeader, WhatsAppJourneySendNode, WhatsAppListMessage, WhatsAppListRow, WhatsAppListSection, WhatsAppLocation, WhatsAppLocationContent, WhatsAppMediaContent, WhatsAppMessageContent, WhatsAppMessageReference, WhatsAppOutboundMedia, WhatsAppReaction, WhatsAppReactionContent, WhatsAppReceivedFlowResponse, WhatsAppReceivedReply, WhatsAppRecipient, WhatsAppRecipients, WhatsAppReplyButton, WhatsAppSendMessagePayload, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkMetadata, WhatsAppSetupLinkRedirectUrl, WhatsAppSetupLinkUnavailableError, WhatsAppSticker, WhatsAppStickerLink, WhatsAppStickerUpload, WhatsAppStoredContactCard, WhatsAppStoredFlowMessage, WhatsAppStoredInteractive, WhatsAppStoredLocation, WhatsAppStoredMedia, WhatsAppStoredReaction, WhatsAppStructuredContent, WhatsAppTemplateBinding, WhatsAppTemplateBindings, WhatsAppTemplateContactBinding, WhatsAppTemplateCustomFieldBinding, WhatsAppTemplateData, WhatsAppTemplateDispatch, WhatsAppTemplateDispatchData, WhatsAppTemplateIdContent, WhatsAppTemplateSlugContent, WhatsAppTextContent, WhatsAppTextHeader, WhatsAppVideo, WhatsAppVideoHeader, WhatsAppVideoHeaderLink, WhatsAppVideoHeaderUpload, WhatsAppVideoLink, WhatsAppVideoUpload, WorkingHours, WorkingHoursRange, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, NonEmptySensitiveString as __SamvaRuntimeNonEmptySensitiveString, SensitiveString as __SamvaRuntimeSensitiveString };
2304
+ export { AccountLinks, AccountStatus, AgentDefinition, AgentId, AgentIntegrationGrant, AgentModel, AgentModelChoice, AgentModuleBundle, AgentModuleManifest, AgentModuleTool, AgentName, AgentReasoning, AgentSetupJob, AgentToolScope, AnalyticsQueryError, AnswerWithoutApproval, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandSocialLink, CampaignAudience, CampaignContentInput, CampaignContentMetadata, CampaignConversationRef, CampaignEmailInput, CampaignFooterRequiredError, CampaignFromInput, CampaignId, CampaignLatestRun, CampaignReplyMailbox, CampaignRunId, CatalogModelId, ClockTime, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxChatDraftPayload, CreateMailboxEmailDraftPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, CredentialsError, DeliveryErrorDetails, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCampaignContentInput, EmailCcRecipients, EmailChannelError, EmailContent, EmailCustomHeaders, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSendMessagePayload, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionInstallationId, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, IntegrationAccountId, IntegrationId, IntegrationKey, IntegrationReturnTo, IntegrationStatus, IntegrationTool, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEntryEventPropertyPredicate, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyId, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneySendWhatsAppConfig, JourneyStatus, JourneyStringComparison, JourneyTagAddedTrigger, JourneyTagPredicate, JourneyTrigger, JourneyUpdateTagsConfig, JourneyUpdateTagsNode, JourneyWaitConfig, JourneyWaitEventEdge, JourneyWaitForEventConfig, JourneyWaitForEventNode, JourneyWaitNode, JourneyWebhookConfig, JourneyWebhookNode, JsonObject, JsonObject_1, JsonValue, KnowledgeSourceId, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxSendConflictError, MailboxSendError, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MalformedRequestError, MediaId, MessageContent, MessageDeliveryId, MessageId, MessageMetadata, MessagePage, MessageSummary, MonthlySpendCapDollars, NamespaceId, NamespaceMetadata, NamespacePortalLinkMetadata, NamespaceResourceType, NewsletterId, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, PolicyConfiguration, PolicyDecider, PolicyDecisionId, PolicyEffect, PolicyRequirement, PolicyReviewRound, PolicyRule, PolicyRuleMatch, PolicySubject, PolicyVersion, RateLimitedError, RecipeSetupReferences, RenderLocale, RenderTimeZone, ReplyMailboxChatPayload, ReplyMailboxEmailPayload, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SendMailboxChatPayload, SendMailboxEmailPayload, SenderNotReadyError, SendsSeries, ServiceUnavailableError, ShareLinkUnavailable, ShopifyShop, SkippedRecipient, SlugTaken, SmsCampaignContentInput, SmsContent, SmsDispatchContent, SmsMessageContent, SmsRecipient, SmsRecipients, SmsSendMessagePayload, SmsTemplateData, StoredEmailAttachments, StoredReplyToAddresses, SubmissionClient, SuccessResponse, TemplateChannelVariantId, TemplateData, TemplateFamilyId, TemplateFromDefaultInput, TemplateId, TemplateInUseError, TemplateInputContractId, TemplateProjectId, TemplatePublicationId, TemplateRegistrationApproval, TemplateRegistrationId, TemplateSourceError, TemplateTrackingDefault, TestWebhookPayload, TimeZone, TopicContactByEmail, TopicContactById, TopicContactByPhone, TopicContactRef, TopicId, UnauthorizedError, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, WebhookEndpointId, Weekday, WhatsAppAudio, WhatsAppAudioLink, WhatsAppAudioUpload, WhatsAppBusinessAccountId, WhatsAppButtonsMessage, WhatsAppCampaignContentInput, WhatsAppChannelError, WhatsAppContactCard, WhatsAppContactsContent, WhatsAppContent, WhatsAppCtaUrlMessage, WhatsAppDocument, WhatsAppDocumentHeader, WhatsAppDocumentHeaderLink, WhatsAppDocumentHeaderUpload, WhatsAppDocumentLink, WhatsAppDocumentUpload, WhatsAppFlowId, WhatsAppFlowMessage, WhatsAppFlowVersionId, WhatsAppImage, WhatsAppImageHeader, WhatsAppImageHeaderLink, WhatsAppImageHeaderUpload, WhatsAppImageLink, WhatsAppImageUpload, WhatsAppInteractive, WhatsAppInteractiveContent, WhatsAppInteractiveHeader, WhatsAppJourneySendNode, WhatsAppListMessage, WhatsAppListRow, WhatsAppListSection, WhatsAppLocation, WhatsAppLocationContent, WhatsAppMediaContent, WhatsAppMessageContent, WhatsAppMessageReference, WhatsAppOutboundMedia, WhatsAppReaction, WhatsAppReactionContent, WhatsAppReceivedFlowResponse, WhatsAppReceivedReply, WhatsAppRecipient, WhatsAppRecipients, WhatsAppReplyButton, WhatsAppSendMessagePayload, WhatsAppServiceWindowClosedError, WhatsAppSetupLinkMetadata, WhatsAppSetupLinkRedirectUrl, WhatsAppSetupLinkUnavailableError, WhatsAppSticker, WhatsAppStickerLink, WhatsAppStickerUpload, WhatsAppStoredContactCard, WhatsAppStoredFlowMessage, WhatsAppStoredInteractive, WhatsAppStoredLocation, WhatsAppStoredMedia, WhatsAppStoredReaction, WhatsAppStructuredContent, WhatsAppTemplateBinding, WhatsAppTemplateBindings, WhatsAppTemplateContactBinding, WhatsAppTemplateCustomFieldBinding, WhatsAppTemplateData, WhatsAppTemplateDispatch, WhatsAppTemplateDispatchData, WhatsAppTemplateIdContent, WhatsAppTemplateSlugContent, WhatsAppTextContent, WhatsAppTextHeader, WhatsAppVideo, WhatsAppVideoHeader, WhatsAppVideoHeaderLink, WhatsAppVideoHeaderUpload, WhatsAppVideoLink, WhatsAppVideoUpload, WorkingHours, WorkingHoursRange, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, NonEmptySensitiveString as __SamvaRuntimeNonEmptySensitiveString, SensitiveString as __SamvaRuntimeSensitiveString };
2267
2305
 
2268
2306
  //# sourceMappingURL=shared.js.map
@@ -1,7 +1,7 @@
1
1
  import type * as EffectBrand from "effect/Brand";
2
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
- import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateProjectId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError, WhatsAppFlowId, WhatsAppFlowVersionId, __SamvaRuntimeSensitiveString } from "./shared.js";
4
+ import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateProjectId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError, WhatsAppFlowId, WhatsAppFlowVersionId, __SamvaRuntimeSensitiveString } from "./shared.js";
5
5
  export type WhatsAppFlowEndpoint = {
6
6
  readonly url: string;
7
7
  readonly updatedAt: string;
@@ -134,6 +134,7 @@ export type WhatsAppFlow = {
134
134
  readonly handle: string;
135
135
  readonly path: string;
136
136
  readonly categories: ReadonlyArray<"SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER">;
137
+ readonly submissionHandler?: "agent" | "app";
137
138
  readonly endpoint: WhatsAppFlowEndpoint | null;
138
139
  readonly currentVersion: WhatsAppFlowVersion | null;
139
140
  readonly createdAt: string;
@@ -145,6 +146,7 @@ export declare const WhatsAppFlow: Schema.Struct<{
145
146
  readonly handle: Schema.String;
146
147
  readonly path: Schema.String;
147
148
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
149
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
148
150
  readonly endpoint: Schema.Union<readonly [Schema.Struct<{
149
151
  readonly url: Schema.String;
150
152
  readonly updatedAt: Schema.String;
@@ -222,6 +224,7 @@ export declare const WhatsAppFlowList: Schema.Struct<{
222
224
  readonly handle: Schema.String;
223
225
  readonly path: Schema.String;
224
226
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
227
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
225
228
  readonly endpoint: Schema.Union<readonly [Schema.Struct<{
226
229
  readonly url: Schema.String;
227
230
  readonly updatedAt: Schema.String;
@@ -249,6 +252,7 @@ export declare const WhatsappFlowsList200: Schema.Struct<{
249
252
  readonly handle: Schema.String;
250
253
  readonly path: Schema.String;
251
254
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
255
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
252
256
  readonly endpoint: Schema.Union<readonly [Schema.Struct<{
253
257
  readonly url: Schema.String;
254
258
  readonly updatedAt: Schema.String;
@@ -284,11 +288,13 @@ export type WhatsappFlowsCreateRequestJson = {
284
288
  readonly projectId: TemplateProjectId;
285
289
  readonly handle: string;
286
290
  readonly categories: ReadonlyArray<"SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER">;
291
+ readonly submissionHandler?: "agent" | "app";
287
292
  };
288
293
  export declare const WhatsappFlowsCreateRequestJson: Schema.Struct<{
289
294
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
290
295
  readonly handle: Schema.String;
291
296
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
297
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
292
298
  }>;
293
299
  export type WhatsappFlowsCreate201 = WhatsAppFlow;
294
300
  export declare const WhatsappFlowsCreate201: Schema.Struct<{
@@ -297,6 +303,7 @@ export declare const WhatsappFlowsCreate201: Schema.Struct<{
297
303
  readonly handle: Schema.String;
298
304
  readonly path: Schema.String;
299
305
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
306
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
300
307
  readonly endpoint: Schema.Union<readonly [Schema.Struct<{
301
308
  readonly url: Schema.String;
302
309
  readonly updatedAt: Schema.String;
@@ -344,6 +351,7 @@ export declare const WhatsappFlowsGet200: Schema.Struct<{
344
351
  readonly handle: Schema.String;
345
352
  readonly path: Schema.String;
346
353
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
354
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
347
355
  readonly endpoint: Schema.Union<readonly [Schema.Struct<{
348
356
  readonly url: Schema.String;
349
357
  readonly updatedAt: Schema.String;
@@ -587,11 +595,15 @@ export declare const WhatsappFlowsRecordVersionPathParams: Schema.Struct<{
587
595
  export type WhatsappFlowsRecordVersionRequestJson = {
588
596
  readonly commitSha: string;
589
597
  readonly expectedWorkspaceRevision: string;
598
+ } | {
599
+ readonly flowJson: JsonObject;
590
600
  };
591
- export declare const WhatsappFlowsRecordVersionRequestJson: Schema.Struct<{
601
+ export declare const WhatsappFlowsRecordVersionRequestJson: Schema.Union<readonly [Schema.Struct<{
592
602
  readonly commitSha: Schema.String;
593
603
  readonly expectedWorkspaceRevision: Schema.String;
594
- }>;
604
+ }>, Schema.Struct<{
605
+ readonly flowJson: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>;
606
+ }>]>;
595
607
  export type WhatsappFlowsRecordVersion201 = WhatsAppFlowVersion;
596
608
  export declare const WhatsappFlowsRecordVersion201: Schema.Struct<{
597
609
  readonly id: Schema.brand<Schema.String, "WhatsAppFlowVersionId">;
@@ -655,12 +667,14 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
655
667
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
656
668
  readonly handle: Schema.String;
657
669
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
670
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
658
671
  }>>, never, Schema.toCodecJson<Schema.Struct<{
659
672
  readonly id: Schema.brand<Schema.String, "WhatsAppFlowId">;
660
673
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
661
674
  readonly handle: Schema.String;
662
675
  readonly path: Schema.String;
663
676
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
677
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
664
678
  readonly endpoint: Schema.Union<readonly [Schema.Struct<{
665
679
  readonly url: Schema.String;
666
680
  readonly updatedAt: Schema.String;
@@ -806,6 +820,7 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
806
820
  readonly handle: Schema.String;
807
821
  readonly path: Schema.String;
808
822
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
823
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
809
824
  readonly endpoint: Schema.Union<readonly [Schema.Struct<{
810
825
  readonly url: Schema.String;
811
826
  readonly updatedAt: Schema.String;
@@ -930,6 +945,7 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
930
945
  readonly handle: Schema.String;
931
946
  readonly path: Schema.String;
932
947
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
948
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
933
949
  readonly endpoint: Schema.Union<readonly [Schema.Struct<{
934
950
  readonly url: Schema.String;
935
951
  readonly updatedAt: Schema.String;
@@ -1275,10 +1291,12 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
1275
1291
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1276
1292
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"whatsappFlowsRecordVersion", "POST", "/v1/whatsapp/flows/:id/versions", Schema.toCodecStringTree<Schema.Struct<{
1277
1293
  readonly id: Schema.brand<Schema.String, "WhatsAppFlowId">;
1278
- }>>, never, Schema.toCodecJson<Schema.Struct<{
1294
+ }>>, never, Schema.toCodecJson<Schema.Union<readonly [Schema.Struct<{
1279
1295
  readonly commitSha: Schema.String;
1280
1296
  readonly expectedWorkspaceRevision: Schema.String;
1281
- }>>, never, Schema.toCodecJson<Schema.Struct<{
1297
+ }>, Schema.Struct<{
1298
+ readonly flowJson: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>;
1299
+ }>]>>, never, Schema.toCodecJson<Schema.Struct<{
1282
1300
  readonly id: Schema.brand<Schema.String, "WhatsAppFlowVersionId">;
1283
1301
  readonly flowId: Schema.brand<Schema.String, "WhatsAppFlowId">;
1284
1302
  readonly number: Schema.Finite;
@@ -1,5 +1,5 @@
1
1
  import { SensitiveString } from "../runtime.js";
2
- import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateProjectId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError, WhatsAppFlowId, WhatsAppFlowVersionId } from "./shared.js";
2
+ import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateProjectId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError, WhatsAppFlowId, WhatsAppFlowVersionId } from "./shared.js";
3
3
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
4
4
  import * as Schema from "effect/Schema";
5
5
  // src/effect/generated/whats-app-flows.ts
@@ -84,6 +84,7 @@ const WhatsAppFlow = /* @__PURE__ */ (() => Schema.Struct({
84
84
  Schema.Literal("SURVEY"),
85
85
  Schema.Literal("OTHER")
86
86
  ])),
87
+ submissionHandler: Schema.optionalKey(Schema.Union([Schema.Literal("agent"), Schema.Literal("app")])),
87
88
  endpoint: Schema.Union([WhatsAppFlowEndpoint, Schema.Null]),
88
89
  currentVersion: Schema.Union([WhatsAppFlowVersion, Schema.Null]),
89
90
  createdAt: Schema.String,
@@ -111,7 +112,8 @@ const WhatsappFlowsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
111
112
  Schema.Literal("CUSTOMER_SUPPORT"),
112
113
  Schema.Literal("SURVEY"),
113
114
  Schema.Literal("OTHER")
114
- ])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
115
+ ])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
116
+ submissionHandler: Schema.optionalKey(Schema.Union([Schema.Literal("agent"), Schema.Literal("app")]))
115
117
  }))();
116
118
  const WhatsappFlowsCreate201 = WhatsAppFlow;
117
119
  const WhatsappFlowsCreate400 = MalformedRequestError;
@@ -181,10 +183,10 @@ const WhatsappFlowsListVersions422 = ValidationError;
181
183
  const WhatsappFlowsListVersions500 = InternalError;
182
184
  const WhatsappFlowsListVersions504 = GatewayTimeoutError;
183
185
  const WhatsappFlowsRecordVersionPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: WhatsAppFlowId }))();
184
- const WhatsappFlowsRecordVersionRequestJson = /* @__PURE__ */ (() => Schema.Struct({
186
+ const WhatsappFlowsRecordVersionRequestJson = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({
185
187
  commitSha: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
186
188
  expectedWorkspaceRevision: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
187
- }))();
189
+ }), Schema.Struct({ flowJson: JsonObject })]))();
188
190
  const WhatsappFlowsRecordVersion201 = WhatsAppFlowVersion;
189
191
  const WhatsappFlowsRecordVersion400 = MalformedRequestError;
190
192
  const WhatsappFlowsRecordVersion401 = UnauthorizedError;
@@ -215,7 +217,7 @@ var WhatsAppFlowsGroup = class extends HttpApiGroup.make("WhatsApp flows").add(H
215
217
  WhatsappFlowsList500,
216
218
  WhatsappFlowsList504.pipe(HttpApiSchema.status(504))
217
219
  ]
218
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.list").annotate(OpenApi.Summary, "List flows").annotate(OpenApi.Description, "Returns the organization's flows, newest first, each with its current version."), HttpApiEndpoint.post("whatsappFlowsCreate", "/v1/whatsapp/flows", {
220
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.list").annotate(OpenApi.Summary, "List flows").annotate(OpenApi.Description, "Returns flows visible to the caller, newest first, each with its current version."), HttpApiEndpoint.post("whatsappFlowsCreate", "/v1/whatsapp/flows", {
219
221
  payload: WhatsappFlowsCreateRequestJson,
220
222
  success: WhatsappFlowsCreate201.pipe(HttpApiSchema.status(201)),
221
223
  error: [
@@ -228,7 +230,7 @@ var WhatsAppFlowsGroup = class extends HttpApiGroup.make("WhatsApp flows").add(H
228
230
  WhatsappFlowsCreate500,
229
231
  WhatsappFlowsCreate504.pipe(HttpApiSchema.status(504))
230
232
  ]
231
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.create").annotate(OpenApi.Summary, "Create a flow").annotate(OpenApi.Description, "Creates a WhatsApp flow whose versions read `flows/<handle>.json` in the template project. The handle is unique in the organization; the categories are Meta's and go with every version to Meta."), HttpApiEndpoint.get("whatsappFlowsGet", "/v1/whatsapp/flows/:id", {
233
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.create").annotate(OpenApi.Summary, "Create a flow").annotate(OpenApi.Description, "Creates a WhatsApp flow whose versions read `flows/<handle>.json` in the template project. The handle is unique in its namespace or at organization level; the categories are Meta's and go with every version to Meta."), HttpApiEndpoint.get("whatsappFlowsGet", "/v1/whatsapp/flows/:id", {
232
234
  params: WhatsappFlowsGetPathParams,
233
235
  success: WhatsappFlowsGet200,
234
236
  error: [
@@ -319,7 +321,7 @@ var WhatsAppFlowsGroup = class extends HttpApiGroup.make("WhatsApp flows").add(H
319
321
  WhatsappFlowsRecordVersion503.pipe(HttpApiSchema.status(503)),
320
322
  WhatsappFlowsRecordVersion504.pipe(HttpApiSchema.status(504))
321
323
  ]
322
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.recordVersion").annotate(OpenApi.Summary, "Record a flow version").annotate(OpenApi.Description, "Reads the flow's file at a commit on the project's default branch, checks it is Flow JSON Samva sends, and records it as the flow's current version. The same content returns the version that already recorded it."), HttpApiEndpoint.post("whatsappFlowsRotateEncryptionKey", "/v1/whatsapp/flows/encryption-key/rotate", {
324
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.recordVersion").annotate(OpenApi.Summary, "Record a flow version").annotate(OpenApi.Description, "Supply Flow JSON to commit the flow's file and record its version, or name a commit and workspace revision to record a file already on the project's default branch. The same content returns the version that already recorded it."), HttpApiEndpoint.post("whatsappFlowsRotateEncryptionKey", "/v1/whatsapp/flows/encryption-key/rotate", {
323
325
  payload: WhatsappFlowsRotateEncryptionKeyRequestJson,
324
326
  success: WhatsappFlowsRotateEncryptionKey200,
325
327
  error: [
@@ -1,15 +1,18 @@
1
1
  export declare const list: ((input?: {
2
+ readonly namespaceId?: string | undefined;
2
3
  readonly status?: "active" | "archived" | "draft" | "paused" | undefined;
3
4
  readonly limit?: number | null | undefined;
4
5
  readonly cursor?: string | undefined;
5
6
  } | undefined, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysList">) & {
6
7
  readonly pages: (input?: {
8
+ readonly namespaceId?: string | undefined;
7
9
  readonly status?: "active" | "archived" | "draft" | "paused" | undefined;
8
10
  readonly limit?: number | null | undefined;
9
11
  readonly cursor?: string | undefined;
10
12
  } | undefined) => import("effect/Stream").Stream<{
11
13
  readonly items: readonly {
12
14
  readonly id: string & import("effect/Brand").Brand<"JourneyId">;
15
+ readonly namespaceId?: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
13
16
  readonly name: string;
14
17
  readonly status: "active" | "archived" | "draft" | "paused";
15
18
  readonly publishedVersion: number | null;
@@ -20,11 +23,13 @@ export declare const list: ((input?: {
20
23
  readonly nextCursor: string | null;
21
24
  }, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
22
25
  readonly items: (input?: {
26
+ readonly namespaceId?: string | undefined;
23
27
  readonly status?: "active" | "archived" | "draft" | "paused" | undefined;
24
28
  readonly limit?: number | null | undefined;
25
29
  readonly cursor?: string | undefined;
26
30
  } | undefined) => import("effect/Stream").Stream<{
27
31
  readonly id: string & import("effect/Brand").Brand<"JourneyId">;
32
+ readonly namespaceId?: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
28
33
  readonly name: string;
29
34
  readonly status: "active" | "archived" | "draft" | "paused";
30
35
  readonly publishedVersion: number | null;
@@ -35,6 +40,7 @@ export declare const list: ((input?: {
35
40
  };
36
41
  export declare const create: (input: {
37
42
  readonly name: string;
43
+ readonly namespaceId?: string | undefined;
38
44
  readonly definition: {
39
45
  readonly trigger: {
40
46
  readonly type: "event";
@@ -83,6 +89,9 @@ export declare const create: (input: {
83
89
  readonly [x: string]: string | number | boolean | any | any | null | undefined;
84
90
  } | null | undefined;
85
91
  } | undefined;
92
+ readonly eventBindings?: {
93
+ readonly [x: string]: string | undefined;
94
+ } | undefined;
86
95
  };
87
96
  readonly next: readonly {
88
97
  readonly nodeId: string;
@@ -133,6 +142,7 @@ export declare const create: (input: {
133
142
  readonly eventBindings?: {
134
143
  readonly [x: string]: string | undefined;
135
144
  } | undefined;
145
+ readonly flowActionDataBinding?: string | undefined;
136
146
  };
137
147
  readonly next: readonly {
138
148
  readonly nodeId: string;
@@ -149,6 +159,10 @@ export declare const create: (input: {
149
159
  readonly type: "wait_for_event";
150
160
  readonly config: {
151
161
  readonly eventName: string;
162
+ readonly correlation?: {
163
+ readonly eventProperty: string;
164
+ readonly entryProperty: string;
165
+ } | undefined;
152
166
  readonly timeoutSeconds: number;
153
167
  };
154
168
  readonly next: readonly {
@@ -202,6 +216,21 @@ export declare const create: (input: {
202
216
  readonly type: "event";
203
217
  readonly eventName: string;
204
218
  readonly occurred: boolean;
219
+ } | {
220
+ readonly type: "entry_event_property";
221
+ readonly property: string;
222
+ readonly comparison: {
223
+ readonly operator: "eq" | "neq";
224
+ readonly value: string | number | boolean | null;
225
+ } | {
226
+ readonly operator: "gt" | "gte" | "lt" | "lte";
227
+ readonly value: number;
228
+ } | {
229
+ readonly operator: "contains" | "ends_with" | "not_contains" | "starts_with";
230
+ readonly value: string;
231
+ } | {
232
+ readonly operator: "exists" | "not_exists";
233
+ };
205
234
  })[];
206
235
  } | undefined;
207
236
  }[];
@@ -244,6 +273,9 @@ export declare const create: (input: {
244
273
  readonly [x: string]: string | number | boolean | any | any | null | undefined;
245
274
  } | null | undefined;
246
275
  } | undefined;
276
+ readonly eventBindings?: {
277
+ readonly [x: string]: string | undefined;
278
+ } | undefined;
247
279
  };
248
280
  readonly next: readonly {
249
281
  readonly nodeId: string;
@@ -263,6 +295,9 @@ export declare const create: (input: {
263
295
  readonly enrollment?: {
264
296
  readonly type: "shopify_order";
265
297
  readonly shop: string;
298
+ } | {
299
+ readonly type: "event_property";
300
+ readonly property: string;
266
301
  } | undefined;
267
302
  };
268
303
  }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysCreate">;
@@ -327,6 +362,9 @@ export declare const replaceDraft: (input: {
327
362
  readonly [x: string]: string | number | boolean | any | any | null | undefined;
328
363
  } | null | undefined;
329
364
  } | undefined;
365
+ readonly eventBindings?: {
366
+ readonly [x: string]: string | undefined;
367
+ } | undefined;
330
368
  };
331
369
  readonly next: readonly {
332
370
  readonly nodeId: string;
@@ -377,6 +415,7 @@ export declare const replaceDraft: (input: {
377
415
  readonly eventBindings?: {
378
416
  readonly [x: string]: string | undefined;
379
417
  } | undefined;
418
+ readonly flowActionDataBinding?: string | undefined;
380
419
  };
381
420
  readonly next: readonly {
382
421
  readonly nodeId: string;
@@ -393,6 +432,10 @@ export declare const replaceDraft: (input: {
393
432
  readonly type: "wait_for_event";
394
433
  readonly config: {
395
434
  readonly eventName: string;
435
+ readonly correlation?: {
436
+ readonly eventProperty: string;
437
+ readonly entryProperty: string;
438
+ } | undefined;
396
439
  readonly timeoutSeconds: number;
397
440
  };
398
441
  readonly next: readonly {
@@ -446,6 +489,21 @@ export declare const replaceDraft: (input: {
446
489
  readonly type: "event";
447
490
  readonly eventName: string;
448
491
  readonly occurred: boolean;
492
+ } | {
493
+ readonly type: "entry_event_property";
494
+ readonly property: string;
495
+ readonly comparison: {
496
+ readonly operator: "eq" | "neq";
497
+ readonly value: string | number | boolean | null;
498
+ } | {
499
+ readonly operator: "gt" | "gte" | "lt" | "lte";
500
+ readonly value: number;
501
+ } | {
502
+ readonly operator: "contains" | "ends_with" | "not_contains" | "starts_with";
503
+ readonly value: string;
504
+ } | {
505
+ readonly operator: "exists" | "not_exists";
506
+ };
449
507
  })[];
450
508
  } | undefined;
451
509
  }[];
@@ -488,6 +546,9 @@ export declare const replaceDraft: (input: {
488
546
  readonly [x: string]: string | number | boolean | any | any | null | undefined;
489
547
  } | null | undefined;
490
548
  } | undefined;
549
+ readonly eventBindings?: {
550
+ readonly [x: string]: string | undefined;
551
+ } | undefined;
491
552
  };
492
553
  readonly next: readonly {
493
554
  readonly nodeId: string;
@@ -507,6 +568,9 @@ export declare const replaceDraft: (input: {
507
568
  readonly enrollment?: {
508
569
  readonly type: "shopify_order";
509
570
  readonly shop: string;
571
+ } | {
572
+ readonly type: "event_property";
573
+ readonly property: string;
510
574
  } | undefined;
511
575
  };
512
576
  }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysReplaceDraft">;
@@ -547,6 +611,7 @@ export declare const listRuns: ((input: {
547
611
  }) => import("effect/Stream").Stream<{
548
612
  readonly items: readonly {
549
613
  readonly id: string & import("effect/Brand").Brand<"JourneyRunId">;
614
+ readonly namespaceId?: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
550
615
  readonly journeyId: string & import("effect/Brand").Brand<"JourneyId">;
551
616
  readonly version: number;
552
617
  readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
@@ -576,6 +641,7 @@ export declare const listRuns: ((input: {
576
641
  readonly cursor?: string | undefined;
577
642
  }) => import("effect/Stream").Stream<{
578
643
  readonly id: string & import("effect/Brand").Brand<"JourneyRunId">;
644
+ readonly namespaceId?: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
579
645
  readonly journeyId: string & import("effect/Brand").Brand<"JourneyId">;
580
646
  readonly version: number;
581
647
  readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
@@ -1127,6 +1127,7 @@ export declare const getThreadContent: ((input: {
1127
1127
  } | null;
1128
1128
  readonly summary: string | null;
1129
1129
  readonly contextMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1130
+ readonly flowSubmissionHandledBy?: "app";
1130
1131
  })[];
1131
1132
  readonly nextCursor: string | null;
1132
1133
  }, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
@@ -1231,6 +1232,7 @@ export declare const getThreadContent: ((input: {
1231
1232
  } | null;
1232
1233
  readonly summary: string | null;
1233
1234
  readonly contextMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1235
+ readonly flowSubmissionHandledBy?: "app";
1234
1236
  }, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
1235
1237
  };
1236
1238
  export declare const listThreadNotes: ((input: {