samva 0.22.1 → 0.23.1

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 (33) hide show
  1. package/dist/client/sdk.gen.d.ts +64 -57
  2. package/dist/client/sdk.gen.js +21 -2
  3. package/dist/client/types.gen.d.ts +203 -49
  4. package/dist/effect/generated/analytics.js +8 -8
  5. package/dist/effect/generated/api-keys.js +4 -4
  6. package/dist/effect/generated/attachments.js +3 -3
  7. package/dist/effect/generated/contact-groups.js +11 -11
  8. package/dist/effect/generated/contacts.js +16 -16
  9. package/dist/effect/generated/conversations.js +6 -6
  10. package/dist/effect/generated/custom-fields.js +5 -5
  11. package/dist/effect/generated/email.js +32 -32
  12. package/dist/effect/generated/events.js +4 -4
  13. package/dist/effect/generated/extension-installations.js +4 -4
  14. package/dist/effect/generated/extensions.js +1 -1
  15. package/dist/effect/generated/journeys.js +12 -12
  16. package/dist/effect/generated/mailboxes.js +10 -10
  17. package/dist/effect/generated/messages.js +4 -4
  18. package/dist/effect/generated/organizations.d.ts +116 -9
  19. package/dist/effect/generated/organizations.js +31 -6
  20. package/dist/effect/generated/shared.js +1 -1
  21. package/dist/effect/generated/templates.d.ts +37 -72
  22. package/dist/effect/generated/templates.js +121 -122
  23. package/dist/effect/generated/unsubscribe-groups.js +7 -7
  24. package/dist/effect/generated/webhooks.js +17 -17
  25. package/dist/effect/generated-metadata.d.ts +5 -0
  26. package/dist/effect/generated-metadata.js +1 -0
  27. package/dist/effect/organizations.d.ts +2 -0
  28. package/dist/effect/organizations.js +3 -1
  29. package/dist/package.js +1 -1
  30. package/dist/promises/types.gen.d.ts +1 -1
  31. package/dist/service-map.d.ts +4 -0
  32. package/dist/service-map.js +1 -0
  33. package/package.json +4 -4
@@ -252,6 +252,12 @@ export type Namespace = {
252
252
  export type NamespaceMetadata = {
253
253
  [key: string]: string;
254
254
  };
255
+ /**
256
+ * Your own labels for the namespace, such as the id of your customer it serves. Samva stores them and never reads them.
257
+ */
258
+ export type NamespaceMetadataWritable = {
259
+ [key: string]: string | undefined;
260
+ };
255
261
  export type UpdateNamespacePayload = {
256
262
  name?: string | null | undefined;
257
263
  metadata?: {
@@ -461,6 +467,9 @@ export type ConversationId = string;
461
467
  export type JsonObject = {
462
468
  [key: string]: JsonValue;
463
469
  };
470
+ export type JsonObjectWritable = {
471
+ [key: string]: JsonValueWritable | undefined;
472
+ };
464
473
  export type TemplateId = string;
465
474
  export type MailboxEndpointId = string;
466
475
  export type EmailAttachment = {
@@ -969,6 +978,9 @@ export type MailboxEndpoint = {
969
978
  export type MailboxMetadata = {
970
979
  [key: string]: string;
971
980
  };
981
+ export type MailboxMetadataWritable = {
982
+ [key: string]: string | undefined;
983
+ };
972
984
  export type MailboxStatus = "active" | "paused";
973
985
  export type UpdateMailboxEndpointPayload = {
974
986
  displayName?: string | null | null | undefined;
@@ -984,7 +996,7 @@ export type UpdateMailboxPayload = {
984
996
  metadata?: MailboxMetadataPatch | null | undefined;
985
997
  };
986
998
  export type MailboxMetadataPatch = {
987
- [key: string]: string | null;
999
+ [key: string]: string | null | undefined;
988
1000
  };
989
1001
  export type CreateMailboxPayload = {
990
1002
  namespaceId?: NamespaceId | null | undefined;
@@ -1184,6 +1196,10 @@ export type Organization = {
1184
1196
  billingAccountId: string;
1185
1197
  name: string;
1186
1198
  slug: string;
1199
+ /**
1200
+ * URL of the organization's avatar image, hosted by Samva. Null when no avatar is set.
1201
+ */
1202
+ avatarUrl: string | null;
1187
1203
  defaultRegion: PhoneRegion | null;
1188
1204
  timezone: string;
1189
1205
  plan: string;
@@ -1437,13 +1453,9 @@ export type RenderTemplatePublicationPayload = {
1437
1453
  export type RenderTimeZone = string;
1438
1454
  export type RenderLocale = string;
1439
1455
  export type BrandRenderedFooter = {
1440
- withUnsubscribe: BrandFooterBlock;
1441
- withoutUnsubscribe: BrandFooterBlock;
1442
- };
1443
- export type BrandFooterBlock = {
1444
1456
  html: string;
1445
1457
  text: string;
1446
- headCss?: string | null | undefined;
1458
+ headCss: string;
1447
1459
  };
1448
1460
  export type Template = {
1449
1461
  id: TemplateId;
@@ -1882,12 +1894,22 @@ export type JourneyDefinition = {
1882
1894
  goal?: JourneyGoal | undefined;
1883
1895
  reentry?: boolean | undefined;
1884
1896
  };
1897
+ export type JourneyDefinitionWritable = {
1898
+ trigger: JourneyTrigger;
1899
+ rootNodeId: JourneyNodeId;
1900
+ nodes: {
1901
+ [key: string]: JourneyNodeWritable | undefined;
1902
+ };
1903
+ goal?: JourneyGoal | undefined;
1904
+ reentry?: boolean | undefined;
1905
+ };
1885
1906
  export type JourneyGoal = {
1886
1907
  eventName: JourneyEventName;
1887
1908
  };
1888
1909
  export type JourneyEventName = JourneyCustomEventName | "contact.created" | "contact.tag_added" | "contact.joined_group";
1889
1910
  export type JourneyCustomEventName = string;
1890
1911
  export type JourneyNode = JourneySendEmailNode | JourneyWaitNode | JourneyWaitForEventNode | JourneyBranchNode | JourneyUpdateTagsNode | JourneyWebhookNode | JourneyExitNode;
1912
+ export type JourneyNodeWritable = JourneySendEmailNodeWritable | JourneyWaitNode | JourneyWaitForEventNode | JourneyBranchNode | JourneyUpdateTagsNode | JourneyWebhookNodeWritable | JourneyExitNode;
1891
1913
  export type JourneyExitNode = {
1892
1914
  type: "exit";
1893
1915
  config: JourneyEmptyConfig;
@@ -1901,12 +1923,20 @@ export type JourneyWebhookNode = {
1901
1923
  config: JourneyWebhookConfig;
1902
1924
  next: [JourneyNextEdge];
1903
1925
  };
1926
+ export type JourneyWebhookNodeWritable = {
1927
+ type: "webhook";
1928
+ config: JourneyWebhookConfigWritable;
1929
+ next: [JourneyNextEdge];
1930
+ };
1904
1931
  export type JourneyNextEdge = {
1905
1932
  nodeId: JourneyNodeId;
1906
1933
  };
1907
1934
  export type JourneyWebhookConfig = {
1908
1935
  data?: JsonObject | undefined;
1909
1936
  };
1937
+ export type JourneyWebhookConfigWritable = {
1938
+ data?: JsonObjectWritable | undefined;
1939
+ };
1910
1940
  export type JourneyUpdateTagsNode = {
1911
1941
  type: "update_tags";
1912
1942
  config: JourneyUpdateTagsConfig;
@@ -1993,11 +2023,21 @@ export type JourneySendEmailNode = {
1993
2023
  config: JourneySendEmailConfig;
1994
2024
  next: [JourneyNextEdge];
1995
2025
  };
2026
+ export type JourneySendEmailNodeWritable = {
2027
+ type: "send_email";
2028
+ config: JourneySendEmailConfigWritable;
2029
+ next: [JourneyNextEdge];
2030
+ };
1996
2031
  export type JourneySendEmailConfig = {
1997
2032
  template: TemplateId | string;
1998
2033
  senderId?: EmailSenderId | undefined;
1999
2034
  templateData?: JsonObject | undefined;
2000
2035
  };
2036
+ export type JourneySendEmailConfigWritable = {
2037
+ template: TemplateId | string;
2038
+ senderId?: EmailSenderId | undefined;
2039
+ templateData?: JsonObjectWritable | undefined;
2040
+ };
2001
2041
  export type EmailSenderId = string;
2002
2042
  export type JourneyTrigger = JourneyCustomEventTrigger | JourneyContactCreatedTrigger | JourneyTagAddedTrigger | JourneyGroupJoinedTrigger;
2003
2043
  export type JourneyGroupJoinedTrigger = {
@@ -2089,7 +2129,7 @@ export type BatchEventsPayload = {
2089
2129
  export type CreateEventPayload = {
2090
2130
  contact: ContactEventReference;
2091
2131
  name: string;
2092
- properties?: JsonObject | null | undefined;
2132
+ properties?: JsonObjectWritable | null | undefined;
2093
2133
  occurredAt?: string | null | undefined;
2094
2134
  idempotencyKey?: string | null | undefined;
2095
2135
  };
@@ -2155,9 +2195,21 @@ export type ContactProfile = {
2155
2195
  customFields?: ContactCustomFields | null | undefined;
2156
2196
  source?: "api" | "import" | "manual" | "form" | null | undefined;
2157
2197
  };
2198
+ export type ContactProfileWritable = {
2199
+ firstName?: string | null | undefined;
2200
+ lastName?: string | null | undefined;
2201
+ company?: string | null | undefined;
2202
+ jobTitle?: string | null | undefined;
2203
+ location?: ContactLocation | null | undefined;
2204
+ customFields?: ContactCustomFieldsWritable | null | undefined;
2205
+ source?: "api" | "import" | "manual" | "form" | null | undefined;
2206
+ };
2158
2207
  export type ContactCustomFields = {
2159
2208
  [key: string]: string | number | boolean | null;
2160
2209
  };
2210
+ export type ContactCustomFieldsWritable = {
2211
+ [key: string]: string | number | boolean | null | undefined;
2212
+ };
2161
2213
  export type ContactLocation = {
2162
2214
  country: string;
2163
2215
  state: string;
@@ -2204,7 +2256,7 @@ export type ContactProfileUpdate = {
2204
2256
  company?: string | null | null | undefined;
2205
2257
  jobTitle?: string | null | null | undefined;
2206
2258
  location?: ContactLocation | null | null | undefined;
2207
- customFields?: ContactCustomFields | null | undefined;
2259
+ customFields?: ContactCustomFieldsWritable | null | undefined;
2208
2260
  };
2209
2261
  export type ContactLookup = {
2210
2262
  type: "email";
@@ -2292,9 +2344,23 @@ export type ConversationContext = {
2292
2344
  workflowData?: UnknownRecord | null | undefined;
2293
2345
  } | null | undefined;
2294
2346
  };
2347
+ export type ConversationContextWritable = {
2348
+ customerData?: UnknownRecordWritable | null | undefined;
2349
+ previousConversations?: Array<string> | null | undefined;
2350
+ sessionVariables?: UnknownRecordWritable | null | undefined;
2351
+ workflowState?: {
2352
+ currentStep?: string | null | undefined;
2353
+ completedSteps?: Array<string> | null | undefined;
2354
+ pendingSteps?: Array<string> | null | undefined;
2355
+ workflowData?: UnknownRecordWritable | null | undefined;
2356
+ } | null | undefined;
2357
+ };
2295
2358
  export type UnknownRecord = {
2296
2359
  [key: string]: JsonValue;
2297
2360
  };
2361
+ export type UnknownRecordWritable = {
2362
+ [key: string]: JsonValueWritable | undefined;
2363
+ };
2298
2364
  export type ConversationContacts = {
2299
2365
  contactIds: [ContactId, ...Array<ContactId>];
2300
2366
  };
@@ -3006,6 +3072,9 @@ export type CampaignContent = {
3006
3072
  export type CampaignContentMetadata = {
3007
3073
  [key: string]: JsonValue;
3008
3074
  } | null;
3075
+ export type CampaignContentMetadataWritable = {
3076
+ [key: string]: JsonValueWritable | undefined;
3077
+ } | null;
3009
3078
  export type CampaignConversationRef = ConversationId | null | null;
3010
3079
  export type EmailContent = {
3011
3080
  subject?: string | null | undefined;
@@ -3028,6 +3097,27 @@ export type EmailContent = {
3028
3097
  tracking?: EmailTrackingOverrideV1 | undefined;
3029
3098
  footer?: EmailFooterOverride | undefined;
3030
3099
  };
3100
+ export type EmailContentWritable = {
3101
+ subject?: string | null | undefined;
3102
+ html?: string | null | undefined;
3103
+ text?: string | null | undefined;
3104
+ attachments?: EmailAttachments | undefined;
3105
+ publicationId?: TemplatePublicationId | undefined;
3106
+ inputContractId?: TemplateInputContractId | undefined;
3107
+ templateId?: TemplateId | null | undefined;
3108
+ templateSlug?: string | null | undefined;
3109
+ templateData?: TemplateDataWritable | undefined;
3110
+ locale?: RenderLocale | undefined;
3111
+ timeZone?: RenderTimeZone | undefined;
3112
+ inReplyToMessageId?: MessageId | null | undefined;
3113
+ replyTo?: ReplyToAddresses | undefined;
3114
+ /**
3115
+ * The unsubscribe group for this send. Omit to inherit the template group; null disables group inheritance for a direct send. Campaigns require a group.
3116
+ */
3117
+ unsubscribeGroupId?: UnsubscribeId | null | null | undefined;
3118
+ tracking?: EmailTrackingOverrideV1 | undefined;
3119
+ footer?: EmailFooterOverride | undefined;
3120
+ };
3031
3121
  export type EmailFooterOverride = {
3032
3122
  enabled?: boolean | null | undefined;
3033
3123
  };
@@ -3046,6 +3136,7 @@ export type EmailTrackingOverrideV1 = {
3046
3136
  };
3047
3137
  export type ReplyToAddresses = Array<string> | null | null;
3048
3138
  export type TemplateData = JsonObject | null;
3139
+ export type TemplateDataWritable = JsonObjectWritable | null;
3049
3140
  export type EmailAttachments = Array<EmailAttachment> | null;
3050
3141
  export type CampaignRunPage = {
3051
3142
  items: Array<CampaignRun>;
@@ -3086,7 +3177,7 @@ export type CampaignContentInput = {
3086
3177
  channel: "email";
3087
3178
  email: EmailDispatchContent;
3088
3179
  conversationId?: CampaignConversationRef | undefined;
3089
- metadata?: CampaignContentMetadata | undefined;
3180
+ metadata?: CampaignContentMetadataWritable | undefined;
3090
3181
  };
3091
3182
  export type EmailDispatchContent = {
3092
3183
  subject?: string | null | undefined;
@@ -3097,7 +3188,7 @@ export type EmailDispatchContent = {
3097
3188
  inputContractId?: TemplateInputContractId | undefined;
3098
3189
  templateId?: TemplateId | null | undefined;
3099
3190
  templateSlug?: string | null | undefined;
3100
- templateData?: TemplateData | undefined;
3191
+ templateData?: TemplateDataWritable | undefined;
3101
3192
  locale?: RenderLocale | undefined;
3102
3193
  timeZone?: RenderTimeZone | undefined;
3103
3194
  inReplyToMessageId?: MessageId | null | undefined;
@@ -3159,6 +3250,9 @@ export type SendMessagePayload = {
3159
3250
  export type MessageMetadata = {
3160
3251
  [key: string]: JsonValue;
3161
3252
  } | null;
3253
+ export type MessageMetadataWritable = {
3254
+ [key: string]: JsonValueWritable | undefined;
3255
+ } | null;
3162
3256
  export type EmailSendMessagePayload = {
3163
3257
  conversationId?: ConversationId | null | null | undefined;
3164
3258
  metadata?: MessageMetadata | undefined;
@@ -3190,7 +3284,7 @@ export type ScheduledMessagePage = {
3190
3284
  };
3191
3285
  export type DispatchSendMessagePayload = {
3192
3286
  conversationId?: ConversationId | null | null | undefined;
3193
- metadata?: MessageMetadata | undefined;
3287
+ metadata?: MessageMetadataWritable | undefined;
3194
3288
  channel: "email";
3195
3289
  to: EmailRecipients;
3196
3290
  cc?: EmailCcRecipients | undefined;
@@ -3364,6 +3458,9 @@ export type MessageSender = {
3364
3458
  export type JsonValue = string | number | boolean | null | Array<JsonValue> | {
3365
3459
  [key: string]: JsonValue;
3366
3460
  };
3461
+ export type JsonValueWritable = string | number | boolean | null | Array<JsonValueWritable> | {
3462
+ [key: string]: JsonValueWritable | undefined;
3463
+ };
3367
3464
  export type MessagesListData = {
3368
3465
  body?: never;
3369
3466
  path?: never;
@@ -3418,13 +3515,13 @@ export type MessagesListResponse = MessagesListResponses[keyof MessagesListRespo
3418
3515
  export type MessagesSendData = {
3419
3516
  body: {
3420
3517
  conversationId?: ConversationId | null | null | undefined;
3421
- metadata?: MessageMetadata | undefined;
3518
+ metadata?: MessageMetadataWritable | undefined;
3422
3519
  channel: "email";
3423
3520
  to: EmailRecipients;
3424
3521
  cc?: EmailCcRecipients | undefined;
3425
3522
  bcc?: EmailBccRecipients | undefined;
3426
3523
  from?: EmailSender | undefined;
3427
- email: EmailContent;
3524
+ email: EmailContentWritable;
3428
3525
  };
3429
3526
  headers?: {
3430
3527
  "idempotency-key"?: string | null | undefined;
@@ -3795,13 +3892,13 @@ export type MessagesGetEmailResponse = MessagesGetEmailResponses[keyof MessagesG
3795
3892
  export type MessagesValidateEmailData = {
3796
3893
  body: {
3797
3894
  conversationId?: ConversationId | null | null | undefined;
3798
- metadata?: MessageMetadata | undefined;
3895
+ metadata?: MessageMetadataWritable | undefined;
3799
3896
  channel: "email";
3800
3897
  to: EmailRecipients;
3801
3898
  cc?: EmailCcRecipients | undefined;
3802
3899
  bcc?: EmailBccRecipients | undefined;
3803
3900
  from?: EmailSender | undefined;
3804
- email: EmailContent;
3901
+ email: EmailContentWritable;
3805
3902
  };
3806
3903
  path?: never;
3807
3904
  query?: never;
@@ -7272,7 +7369,7 @@ export type EmailCreateForwardingRuleData = {
7272
7369
  priority?: number | null | undefined;
7273
7370
  isActive?: boolean | null | undefined;
7274
7371
  metadata?: {
7275
- [key: string]: JsonValue;
7372
+ [key: string]: JsonValueWritable | undefined;
7276
7373
  } | null | null | undefined;
7277
7374
  };
7278
7375
  path?: never;
@@ -7379,7 +7476,7 @@ export type EmailUpdateForwardingRuleData = {
7379
7476
  priority?: number | null | undefined;
7380
7477
  isActive?: boolean | null | undefined;
7381
7478
  metadata?: {
7382
- [key: string]: JsonValue;
7479
+ [key: string]: JsonValueWritable | undefined;
7383
7480
  } | null | null | undefined;
7384
7481
  };
7385
7482
  path: {
@@ -8270,8 +8367,8 @@ export type ConversationsCreateData = {
8270
8367
  priority?: number | null | undefined;
8271
8368
  urgency?: "low" | "medium" | "high" | "critical" | null | undefined;
8272
8369
  complexity?: "simple" | "moderate" | "complex" | null | undefined;
8273
- metadata?: JsonObject | null | undefined;
8274
- context?: ConversationContext | null | null | undefined;
8370
+ metadata?: JsonObjectWritable | null | undefined;
8371
+ context?: ConversationContextWritable | null | null | undefined;
8275
8372
  tags?: Array<string> | null | undefined;
8276
8373
  categories?: Array<string> | null | undefined;
8277
8374
  isTest?: boolean | null | undefined;
@@ -8366,8 +8463,8 @@ export type ConversationsUpdateData = {
8366
8463
  priority?: number | null | undefined;
8367
8464
  urgency?: "low" | "medium" | "high" | "critical" | null | undefined;
8368
8465
  complexity?: "simple" | "moderate" | "complex" | null | undefined;
8369
- context?: ConversationContext | null | null | undefined;
8370
- metadata?: JsonObject | null | undefined;
8466
+ context?: ConversationContextWritable | null | null | undefined;
8467
+ metadata?: JsonObjectWritable | null | undefined;
8371
8468
  isTest?: boolean | null | undefined;
8372
8469
  isInternal?: boolean | null | undefined;
8373
8470
  isPrivate?: boolean | null | undefined;
@@ -8865,13 +8962,13 @@ export type ContactsCreateData = {
8865
8962
  displayName?: string | null | null | undefined;
8866
8963
  avatar?: string | null | null | undefined;
8867
8964
  identities?: Array<ContactIdentityInput> | null | undefined;
8868
- profile?: ContactProfile | null | null | undefined;
8965
+ profile?: ContactProfileWritable | null | null | undefined;
8869
8966
  preferences?: ContactPreferences | null | null | undefined;
8870
8967
  tags?: Array<string> | null | undefined;
8871
8968
  status?: "active" | "paused" | "blocked" | "archived" | null | undefined;
8872
8969
  statusReason?: string | null | null | undefined;
8873
8970
  externalId?: string | null | null | undefined;
8874
- metadata?: JsonObject | null | null | undefined;
8971
+ metadata?: JsonObjectWritable | null | null | undefined;
8875
8972
  };
8876
8973
  path?: never;
8877
8974
  query?: never;
@@ -8981,7 +9078,7 @@ export type ContactsFindOrCreateData = {
8981
9078
  displayName?: string | null | null | undefined;
8982
9079
  avatar?: string | null | null | undefined;
8983
9080
  identities?: Array<ContactIdentityInput> | null | undefined;
8984
- profile?: ContactProfile | null | null | undefined;
9081
+ profile?: ContactProfileWritable | null | null | undefined;
8985
9082
  externalId?: string | null | null | undefined;
8986
9083
  } | null | undefined;
8987
9084
  };
@@ -9138,7 +9235,7 @@ export type ContactsUpdateData = {
9138
9235
  status?: "active" | "paused" | "blocked" | "archived" | null | undefined;
9139
9236
  statusReason?: string | null | null | undefined;
9140
9237
  externalId?: string | null | null | undefined;
9141
- metadata?: JsonObject | null | undefined;
9238
+ metadata?: JsonObjectWritable | null | undefined;
9142
9239
  };
9143
9240
  path: {
9144
9241
  id: ContactId;
@@ -9289,7 +9386,7 @@ export type ContactsSetConsentData = {
9289
9386
  */
9290
9387
  source: string;
9291
9388
  capturedAt: string;
9292
- proof?: JsonObject | null | undefined;
9389
+ proof?: JsonObjectWritable | null | undefined;
9293
9390
  };
9294
9391
  path: {
9295
9392
  id: ContactId;
@@ -9480,13 +9577,13 @@ export type ContactsBulkImportData = {
9480
9577
  displayName?: string | null | null | undefined;
9481
9578
  avatar?: string | null | null | undefined;
9482
9579
  identities?: Array<ContactIdentityInput> | null | undefined;
9483
- profile?: ContactProfile | null | null | undefined;
9580
+ profile?: ContactProfileWritable | null | null | undefined;
9484
9581
  preferences?: ContactPreferences | null | null | undefined;
9485
9582
  tags?: Array<string> | null | undefined;
9486
9583
  status?: "active" | "paused" | "blocked" | "archived" | null | undefined;
9487
9584
  statusReason?: string | null | null | undefined;
9488
9585
  externalId?: string | null | null | undefined;
9489
- metadata?: JsonObject | null | null | undefined;
9586
+ metadata?: JsonObjectWritable | null | null | undefined;
9490
9587
  }>;
9491
9588
  onConflict?: "skip" | "update" | null | undefined;
9492
9589
  };
@@ -9823,7 +9920,7 @@ export type EventsCreateData = {
9823
9920
  body: {
9824
9921
  contact: ContactEventReference;
9825
9922
  name: string;
9826
- properties?: JsonObject | null | undefined;
9923
+ properties?: JsonObjectWritable | null | undefined;
9827
9924
  occurredAt?: string | null | undefined;
9828
9925
  idempotencyKey?: string | null | undefined;
9829
9926
  };
@@ -10007,7 +10104,7 @@ export type JourneysListResponse = JourneysListResponses[keyof JourneysListRespo
10007
10104
  export type JourneysCreateData = {
10008
10105
  body: {
10009
10106
  name: JourneyName;
10010
- definition: JourneyDefinition;
10107
+ definition: JourneyDefinitionWritable;
10011
10108
  };
10012
10109
  path?: never;
10013
10110
  query?: never;
@@ -10194,7 +10291,7 @@ export type JourneysUpdateResponse = JourneysUpdateResponses[keyof JourneysUpdat
10194
10291
  export type JourneysReplaceDraftData = {
10195
10292
  body: {
10196
10293
  revision: string;
10197
- definition: JourneyDefinition;
10294
+ definition: JourneyDefinitionWritable;
10198
10295
  };
10199
10296
  path: {
10200
10297
  id: JourneyId;
@@ -10754,7 +10851,7 @@ export type ContactGroupsCreateData = {
10754
10851
  description?: string | null | null | undefined;
10755
10852
  type?: "static" | "dynamic" | "smart" | null | undefined;
10756
10853
  criteria?: {
10757
- [key: string]: JsonValue;
10854
+ [key: string]: JsonValueWritable | undefined;
10758
10855
  } | null | null | undefined;
10759
10856
  color?: "clay" | "sand" | "moss" | "sky" | "plum" | "rose" | null | null | undefined;
10760
10857
  icon?: string | null | null | undefined;
@@ -10927,7 +11024,7 @@ export type ContactGroupsUpdateData = {
10927
11024
  description?: string | null | null | undefined;
10928
11025
  type?: "static" | "dynamic" | "smart" | null | undefined;
10929
11026
  criteria?: {
10930
- [key: string]: JsonValue;
11027
+ [key: string]: JsonValueWritable | undefined;
10931
11028
  } | null | null | undefined;
10932
11029
  color?: "clay" | "sand" | "moss" | "sky" | "plum" | "rose" | null | null | undefined;
10933
11030
  icon?: string | null | null | undefined;
@@ -11188,7 +11285,7 @@ export type ContactGroupsPreviewData = {
11188
11285
  conditions?: Array<{
11189
11286
  field: string;
11190
11287
  operator: string;
11191
- value: JsonValue;
11288
+ value: JsonValueWritable;
11192
11289
  }> | null | undefined;
11193
11290
  };
11194
11291
  };
@@ -13202,6 +13299,7 @@ export type TemplatesDiffWorkspaceResponses = {
13202
13299
  assetChanges: Array<{
13203
13300
  path: string;
13204
13301
  status: "added" | "modified" | "deleted";
13302
+ digest: string | null;
13205
13303
  }>;
13206
13304
  };
13207
13305
  };
@@ -14013,6 +14111,8 @@ export type TemplatesRenderWorkspaceFixtureResponses = {
14013
14111
  start: number;
14014
14112
  end: number;
14015
14113
  }>;
14114
+ sentBytes: number;
14115
+ previewBytes: number;
14016
14116
  } | null;
14017
14117
  };
14018
14118
  };
@@ -14078,7 +14178,7 @@ export type TemplatesPublishResponses = {
14078
14178
  buildIdentity: string;
14079
14179
  manifest: {
14080
14180
  templateKey: string;
14081
- ir: {
14181
+ compiled: {
14082
14182
  version: number;
14083
14183
  digest: string;
14084
14184
  bytes: number;
@@ -14115,7 +14215,7 @@ export type TemplatesPublishResponses = {
14115
14215
  rendersFooter: "every" | "some" | "none";
14116
14216
  } | undefined;
14117
14217
  };
14118
- ir: {
14218
+ compiled: {
14119
14219
  key: string;
14120
14220
  digest: string;
14121
14221
  };
@@ -14232,7 +14332,7 @@ export type TemplatesGetPublicationResponses = {
14232
14332
  buildIdentity: string;
14233
14333
  manifest: {
14234
14334
  templateKey: string;
14235
- ir: {
14335
+ compiled: {
14236
14336
  version: number;
14237
14337
  digest: string;
14238
14338
  bytes: number;
@@ -14269,7 +14369,7 @@ export type TemplatesGetPublicationResponses = {
14269
14369
  rendersFooter: "every" | "some" | "none";
14270
14370
  } | undefined;
14271
14371
  };
14272
- ir: {
14372
+ compiled: {
14273
14373
  key: string;
14274
14374
  digest: string;
14275
14375
  };
@@ -14340,7 +14440,7 @@ export type TemplatesRenderPublicationData = {
14340
14440
  * The input to render with, validated against the publication's input schema.
14341
14441
  */
14342
14442
  data: {
14343
- [key: string]: JsonValue;
14443
+ [key: string]: JsonValueWritable | undefined;
14344
14444
  };
14345
14445
  locale?: RenderLocale | undefined;
14346
14446
  timeZone?: RenderTimeZone | undefined;
@@ -15163,7 +15263,7 @@ export type WebhooksCreateData = {
15163
15263
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | undefined;
15164
15264
  namespaceId?: NamespaceId | null | undefined;
15165
15265
  headers?: {
15166
- [key: string]: string;
15266
+ [key: string]: string | undefined;
15167
15267
  } | null | undefined;
15168
15268
  status?: "active" | "disabled" | null | undefined;
15169
15269
  };
@@ -15317,7 +15417,7 @@ export type WebhooksUpdateData = {
15317
15417
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | null | undefined;
15318
15418
  namespaceId?: NamespaceId | null | null | undefined;
15319
15419
  headers?: {
15320
- [key: string]: string;
15420
+ [key: string]: string | undefined;
15321
15421
  } | null | undefined;
15322
15422
  status?: "active" | "disabled" | null | undefined;
15323
15423
  };
@@ -15368,7 +15468,7 @@ export type WebhooksUpdateResponse = WebhooksUpdateResponses[keyof WebhooksUpdat
15368
15468
  export type WebhooksTestData = {
15369
15469
  body: {
15370
15470
  data?: {
15371
- [key: string]: JsonValue;
15471
+ [key: string]: JsonValueWritable | undefined;
15372
15472
  } | null | undefined;
15373
15473
  };
15374
15474
  path: {
@@ -15733,11 +15833,12 @@ export type OrganizationsUpdateData = {
15733
15833
  body: {
15734
15834
  name?: string | null | undefined;
15735
15835
  slug?: string | null | undefined;
15836
+ avatarUrl?: string | null | null | undefined;
15736
15837
  defaultRegion?: PhoneRegion | null | null | undefined;
15737
15838
  timezone?: IanaTimezone | null | undefined;
15738
15839
  isActive?: boolean | null | undefined;
15739
15840
  metadata?: {
15740
- [key: string]: JsonValue;
15841
+ [key: string]: JsonValueWritable | undefined;
15741
15842
  } | null | undefined;
15742
15843
  replyToDefault?: Array<string> | null | null | undefined;
15743
15844
  emailFooterEnabledDefault?: boolean | null | null | undefined;
@@ -15902,6 +16003,55 @@ export type OrganizationsGetTrustTierResponses = {
15902
16003
  };
15903
16004
  };
15904
16005
  export type OrganizationsGetTrustTierResponse = OrganizationsGetTrustTierResponses[keyof OrganizationsGetTrustTierResponses];
16006
+ export type OrganizationsCreateAvatarUploadData = {
16007
+ body?: never;
16008
+ path?: never;
16009
+ query?: never;
16010
+ url: "/v1/organizations/current/avatar-upload";
16011
+ };
16012
+ export type OrganizationsCreateAvatarUploadErrors = {
16013
+ /**
16014
+ * UnauthorizedError
16015
+ */
16016
+ 401: UnauthorizedError;
16017
+ /**
16018
+ * ForbiddenError
16019
+ */
16020
+ 403: ForbiddenError;
16021
+ /**
16022
+ * ValidationError
16023
+ */
16024
+ 422: ValidationError;
16025
+ /**
16026
+ * InternalError
16027
+ */
16028
+ 500: InternalError;
16029
+ /**
16030
+ * GatewayTimeoutError
16031
+ */
16032
+ 504: GatewayTimeoutError;
16033
+ };
16034
+ export type OrganizationsCreateAvatarUploadError = OrganizationsCreateAvatarUploadErrors[keyof OrganizationsCreateAvatarUploadErrors];
16035
+ export type OrganizationsCreateAvatarUploadResponses = {
16036
+ /**
16037
+ * Success
16038
+ */
16039
+ 200: {
16040
+ /**
16041
+ * The URL to PUT the image bytes to.
16042
+ */
16043
+ uploadUrl: string;
16044
+ /**
16045
+ * The largest image the upload accepts, in bytes.
16046
+ */
16047
+ maxBytes: number;
16048
+ /**
16049
+ * The image content types the upload accepts.
16050
+ */
16051
+ contentTypes: Array<string>;
16052
+ };
16053
+ };
16054
+ export type OrganizationsCreateAvatarUploadResponse = OrganizationsCreateAvatarUploadResponses[keyof OrganizationsCreateAvatarUploadResponses];
15905
16055
  export type OrganizationsGetUsageData = {
15906
16056
  body?: never;
15907
16057
  path?: never;
@@ -15948,10 +16098,14 @@ export type OrganizationsGetUsageResponses = {
15948
16098
  billing: {
15949
16099
  currency: string;
15950
16100
  planName: string | null;
15951
- includedEmails: number | null;
15952
- usedEmails: number | null;
15953
- overageEmails: number | null;
16101
+ includedCredits: number | null;
16102
+ usedCredits: number | null;
16103
+ overageCredits: number | null;
15954
16104
  overageCost: number | null;
16105
+ includedAiCredits: number | null;
16106
+ usedAiCredits: number | null;
16107
+ overageAiCredits: number | null;
16108
+ overageAiCost: number | null;
15955
16109
  };
15956
16110
  };
15957
16111
  };
@@ -16505,7 +16659,7 @@ export type MailboxesCreateData = {
16505
16659
  endpoint: CreateMailboxEndpointPayload;
16506
16660
  name: string;
16507
16661
  slug?: string | null | undefined;
16508
- metadata?: MailboxMetadata | null | undefined;
16662
+ metadata?: MailboxMetadataWritable | null | undefined;
16509
16663
  };
16510
16664
  path?: never;
16511
16665
  query?: never;
@@ -19490,7 +19644,7 @@ export type NamespacesListResponse = NamespacesListResponses[keyof NamespacesLis
19490
19644
  export type NamespacesCreateData = {
19491
19645
  body: {
19492
19646
  name: string;
19493
- metadata?: NamespaceMetadata | null | undefined;
19647
+ metadata?: NamespaceMetadataWritable | null | undefined;
19494
19648
  };
19495
19649
  path?: never;
19496
19650
  query?: never;
@@ -19622,7 +19776,7 @@ export type NamespacesUpdateData = {
19622
19776
  body: {
19623
19777
  name?: string | null | undefined;
19624
19778
  metadata?: {
19625
- [key: string]: string | null;
19779
+ [key: string]: string | null | undefined;
19626
19780
  } | null | undefined;
19627
19781
  };
19628
19782
  path: {