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
@@ -19,9 +19,9 @@ const ExtensionRunSummary = /* @__PURE__ */ Schema.Struct({
19
19
  Schema.Literal("mailbox.message.released"),
20
20
  Schema.Literal("mailbox.message.discarded")
21
21
  ]),
22
- attempt: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
22
+ attempt: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
23
23
  startedAt: Schema.String,
24
- durationMs: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
24
+ durationMs: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
25
25
  outcome: Schema.Union([
26
26
  Schema.Literal("succeeded"),
27
27
  Schema.Literal("failed"),
@@ -43,9 +43,9 @@ const ExtensionRun = /* @__PURE__ */ Schema.Struct({
43
43
  Schema.Literal("mailbox.message.released"),
44
44
  Schema.Literal("mailbox.message.discarded")
45
45
  ]),
46
- attempt: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
46
+ attempt: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
47
47
  startedAt: Schema.String,
48
- durationMs: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
48
+ durationMs: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
49
49
  outcome: Schema.Union([
50
50
  Schema.Literal("succeeded"),
51
51
  Schema.Literal("failed"),
@@ -4,7 +4,7 @@ import * as Schema from "effect/Schema";
4
4
  //#region src/effect/generated/extensions.ts
5
5
  const ExtensionBundle = /* @__PURE__ */ Schema.Struct({
6
6
  sha256: Schema.String,
7
- sizeBytes: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" }))
7
+ sizeBytes: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
8
8
  }).annotate({ identifier: "ExtensionBundle" });
9
9
  const ExtensionVersion = /* @__PURE__ */ Schema.Struct({
10
10
  id: ExtensionVersionId,
@@ -36,10 +36,10 @@ const JourneyRunStepOutcome = /* @__PURE__ */ Schema.Union([
36
36
  Schema.Literal("failed")
37
37
  ]).annotate({ identifier: "JourneyRunStepOutcome" });
38
38
  const JourneyRunCounts = /* @__PURE__ */ Schema.Struct({
39
- active: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
40
- paused: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
41
- exited: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
42
- failed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" }))
39
+ active: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
40
+ paused: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
41
+ exited: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
42
+ failed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
43
43
  }).annotate({ identifier: "JourneyRunCounts" });
44
44
  const JourneyRunTrigger = /* @__PURE__ */ Schema.Struct({
45
45
  eventId: Schema.String,
@@ -50,7 +50,7 @@ const JourneyListItem = /* @__PURE__ */ Schema.Struct({
50
50
  id: JourneyId,
51
51
  name: Schema.String,
52
52
  status: JourneyStatus,
53
- publishedVersion: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })), Schema.Null]),
53
+ publishedVersion: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })), Schema.Null]),
54
54
  publishedAt: Schema.Union([Schema.String, Schema.Null]),
55
55
  createdAt: Schema.String,
56
56
  updatedAt: Schema.String
@@ -61,8 +61,8 @@ const DeleteJourneyResponse = /* @__PURE__ */ Schema.Struct({
61
61
  }).annotate({ identifier: "DeleteJourneyResponse" });
62
62
  const JourneyNodeStats = /* @__PURE__ */ Schema.Struct({
63
63
  nodeId: JourneyNodeId,
64
- current: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
65
- entered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" }))
64
+ current: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
65
+ entered: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
66
66
  }).annotate({ identifier: "JourneyNodeStats" });
67
67
  const JourneyRunStep = /* @__PURE__ */ Schema.Struct({
68
68
  nodeId: JourneyNodeId,
@@ -77,7 +77,7 @@ const JourneyRunStep = /* @__PURE__ */ Schema.Struct({
77
77
  const JourneyRun = /* @__PURE__ */ Schema.Struct({
78
78
  id: JourneyRunId,
79
79
  journeyId: JourneyId,
80
- version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
80
+ version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
81
81
  contactId: ContactId,
82
82
  status: JourneyRunStatus,
83
83
  exitReason: Schema.Union([JourneyRunExitReason, Schema.Null]),
@@ -95,14 +95,14 @@ const JourneyPage = /* @__PURE__ */ Schema.Struct({
95
95
  }).annotate({ identifier: "JourneyPage" });
96
96
  const JourneyStats = /* @__PURE__ */ Schema.Struct({
97
97
  journeyId: JourneyId,
98
- version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
98
+ version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
99
99
  runs: JourneyRunCounts,
100
100
  nodes: Schema.Array(JourneyNodeStats)
101
101
  }).annotate({ identifier: "JourneyStats" });
102
102
  const JourneyRunDetail = /* @__PURE__ */ Schema.Struct({
103
103
  id: JourneyRunId,
104
104
  journeyId: JourneyId,
105
- version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
105
+ version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
106
106
  contactId: ContactId,
107
107
  status: JourneyRunStatus,
108
108
  exitReason: Schema.Union([JourneyRunExitReason, Schema.Null]),
@@ -125,14 +125,14 @@ const Journey = /* @__PURE__ */ Schema.Struct({
125
125
  status: JourneyStatus,
126
126
  revision: Schema.String,
127
127
  draft: JourneyDefinition,
128
- publishedVersion: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })), Schema.Null]),
128
+ publishedVersion: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })), Schema.Null]),
129
129
  publishedAt: Schema.Union([Schema.String, Schema.Null]),
130
130
  createdAt: Schema.String,
131
131
  updatedAt: Schema.String
132
132
  }).annotate({ identifier: "Journey" });
133
133
  const JourneyVersion = /* @__PURE__ */ Schema.Struct({
134
134
  journeyId: JourneyId,
135
- version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
135
+ version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
136
136
  definition: JourneyDefinition,
137
137
  publishedAt: Schema.String
138
138
  }).annotate({ identifier: "JourneyVersion" });
@@ -47,7 +47,7 @@ const MailboxAgentActivity = /* @__PURE__ */ Schema.Struct({
47
47
  Schema.Literal("call"),
48
48
  Schema.Literal("extensionRequest")
49
49
  ]),
50
- count: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
50
+ count: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
51
51
  })),
52
52
  byState: Schema.Array(Schema.Struct({
53
53
  state: Schema.Union([
@@ -66,7 +66,7 @@ const MailboxAgentActivity = /* @__PURE__ */ Schema.Struct({
66
66
  Schema.Literal("notSent"),
67
67
  Schema.Literal("uncertain")
68
68
  ]),
69
- count: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
69
+ count: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
70
70
  }))
71
71
  }),
72
72
  events: Schema.Struct({ byType: Schema.Array(Schema.Struct({
@@ -86,9 +86,9 @@ const MailboxAgentActivity = /* @__PURE__ */ Schema.Struct({
86
86
  Schema.Literal("action.executed"),
87
87
  Schema.Literal("action.failed")
88
88
  ]),
89
- count: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
89
+ count: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
90
90
  })) }),
91
- pendingApprovals: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
91
+ pendingApprovals: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
92
92
  }).annotate({ identifier: "MailboxAgentActivity" });
93
93
  const MailboxDraftState = /* @__PURE__ */ Schema.Union([
94
94
  Schema.Literal("saved"),
@@ -276,8 +276,8 @@ const MailboxEvent = /* @__PURE__ */ Schema.Struct({
276
276
  }).annotate({ identifier: "MailboxEvent" });
277
277
  const MailboxFolderCount = /* @__PURE__ */ Schema.Struct({
278
278
  folder: MailboxThreadFolder,
279
- count: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
280
- unreadCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
279
+ count: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
280
+ unreadCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
281
281
  }).annotate({ identifier: "MailboxFolderCount" });
282
282
  const MailboxGrant = /* @__PURE__ */ Schema.Struct({
283
283
  id: MailboxGrantId,
@@ -372,7 +372,7 @@ const MailboxMessage = /* @__PURE__ */ Schema.Struct({
372
372
  id: AttachmentId,
373
373
  filename: Schema.String,
374
374
  contentType: Schema.String,
375
- size: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
375
+ size: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
376
376
  isInline: Schema.Boolean
377
377
  }))
378
378
  }).annotate({ identifier: "MailboxMessage" });
@@ -392,7 +392,7 @@ const MailboxThreadSummary = /* @__PURE__ */ Schema.Struct({
392
392
  subject: Schema.Union([Schema.String, Schema.Null]),
393
393
  preview: Schema.Union([Schema.String, Schema.Null]),
394
394
  from: Schema.Union([MailboxThreadSender, Schema.Null]),
395
- messageCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
395
+ messageCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
396
396
  hasAttachments: Schema.Boolean,
397
397
  hasDraft: Schema.Boolean,
398
398
  folder: MailboxThreadFolder,
@@ -419,7 +419,7 @@ const MailboxThread = /* @__PURE__ */ Schema.Struct({
419
419
  subject: Schema.Union([Schema.String, Schema.Null]),
420
420
  preview: Schema.Union([Schema.String, Schema.Null]),
421
421
  from: Schema.Union([MailboxThreadSender, Schema.Null]),
422
- messageCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
422
+ messageCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
423
423
  hasAttachments: Schema.Boolean,
424
424
  hasDraft: Schema.Boolean,
425
425
  folder: MailboxThreadFolder,
@@ -455,7 +455,7 @@ const MailboxNote = /* @__PURE__ */ Schema.Struct({
455
455
  }).annotate({ identifier: "MailboxNote" });
456
456
  const MailboxSendSnapshot = /* @__PURE__ */ Schema.Struct({
457
457
  channel: Schema.Literal("email"),
458
- draftRevision: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
458
+ draftRevision: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })),
459
459
  from: Schema.String,
460
460
  fromName: Schema.Union([Schema.String, Schema.Null]),
461
461
  to: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]),
@@ -54,7 +54,7 @@ const ValidateEmailResponse = /* @__PURE__ */ Schema.Struct({
54
54
  email: Schema.String,
55
55
  name: Schema.Union([Schema.String, Schema.Null])
56
56
  }),
57
- recipientCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
57
+ recipientCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
58
58
  content: Schema.Struct({
59
59
  source: Schema.Union([Schema.Literal("inline"), Schema.Literal("template")]),
60
60
  subject: Schema.String,
@@ -423,7 +423,7 @@ const MessagesGetEmail200 = /* @__PURE__ */ Schema.Struct({
423
423
  messageIdHeader: Schema.String,
424
424
  inReplyTo: Schema.Union([Schema.String, Schema.Null]),
425
425
  references: Schema.Union([Schema.Array(Schema.String), Schema.Null]),
426
- threadPosition: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })), Schema.Null]),
426
+ threadPosition: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })), Schema.Null]),
427
427
  newContent: Schema.Union([Schema.String, Schema.Null]),
428
428
  quotedContent: Schema.Union([Schema.String, Schema.Null]),
429
429
  hasQuotedContent: Schema.Boolean,
@@ -474,12 +474,12 @@ const MessagesGetEmail200 = /* @__PURE__ */ Schema.Struct({
474
474
  parsingErrors: Schema.Union([Schema.Array(Schema.String), Schema.Null]),
475
475
  parsingDuration: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })), Schema.Null]),
476
476
  hasAttachments: Schema.Boolean,
477
- attachmentCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
477
+ attachmentCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
478
478
  attachments: Schema.Array(Schema.Struct({
479
479
  id: AttachmentId,
480
480
  filename: Schema.String,
481
481
  contentType: Schema.String,
482
- size: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
482
+ size: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
483
483
  isInline: Schema.Boolean,
484
484
  contentId: Schema.Union([Schema.String, Schema.Null])
485
485
  })),
@@ -8,6 +8,7 @@ export type Organization = {
8
8
  readonly billingAccountId: string;
9
9
  readonly name: string;
10
10
  readonly slug: string;
11
+ readonly avatarUrl: string | null;
11
12
  readonly defaultRegion: PhoneRegion | null;
12
13
  readonly timezone: string;
13
14
  readonly plan: string;
@@ -33,6 +34,7 @@ export declare const Organization: Schema.Struct<{
33
34
  readonly billingAccountId: Schema.String;
34
35
  readonly name: Schema.String;
35
36
  readonly slug: Schema.String;
37
+ readonly avatarUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
36
38
  readonly defaultRegion: Schema.Union<readonly [Schema.String, Schema.Null]>;
37
39
  readonly timezone: Schema.String;
38
40
  readonly plan: Schema.String;
@@ -63,6 +65,7 @@ export declare const OrganizationsCreate200: Schema.Struct<{
63
65
  readonly billingAccountId: Schema.String;
64
66
  readonly name: Schema.String;
65
67
  readonly slug: Schema.String;
68
+ readonly avatarUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
66
69
  readonly defaultRegion: Schema.Union<readonly [Schema.String, Schema.Null]>;
67
70
  readonly timezone: Schema.String;
68
71
  readonly plan: Schema.String;
@@ -101,6 +104,7 @@ export declare const OrganizationsGet200: Schema.Struct<{
101
104
  readonly billingAccountId: Schema.String;
102
105
  readonly name: Schema.String;
103
106
  readonly slug: Schema.String;
107
+ readonly avatarUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
104
108
  readonly defaultRegion: Schema.Union<readonly [Schema.String, Schema.Null]>;
105
109
  readonly timezone: Schema.String;
106
110
  readonly plan: Schema.String;
@@ -134,6 +138,7 @@ export declare const OrganizationsGet504: typeof GatewayTimeoutError;
134
138
  export type OrganizationsUpdateRequestJson = {
135
139
  readonly name?: string | null;
136
140
  readonly slug?: string | null;
141
+ readonly avatarUrl?: string | null | null;
137
142
  readonly defaultRegion?: PhoneRegion | null | null;
138
143
  readonly timezone?: IanaTimezone | null;
139
144
  readonly isActive?: boolean | null;
@@ -146,6 +151,7 @@ export type OrganizationsUpdateRequestJson = {
146
151
  export declare const OrganizationsUpdateRequestJson: Schema.Struct<{
147
152
  readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
148
153
  readonly slug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
154
+ readonly avatarUrl: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
149
155
  readonly defaultRegion: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
150
156
  readonly timezone: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
151
157
  readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
@@ -159,6 +165,7 @@ export declare const OrganizationsUpdate200: Schema.Struct<{
159
165
  readonly billingAccountId: Schema.String;
160
166
  readonly name: Schema.String;
161
167
  readonly slug: Schema.String;
168
+ readonly avatarUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
162
169
  readonly defaultRegion: Schema.Union<readonly [Schema.String, Schema.Null]>;
163
170
  readonly timezone: Schema.String;
164
171
  readonly plan: Schema.String;
@@ -189,6 +196,26 @@ export type OrganizationsUpdate500 = InternalError;
189
196
  export declare const OrganizationsUpdate500: typeof InternalError;
190
197
  export type OrganizationsUpdate504 = GatewayTimeoutError;
191
198
  export declare const OrganizationsUpdate504: typeof GatewayTimeoutError;
199
+ export type OrganizationsCreateAvatarUpload200 = {
200
+ readonly uploadUrl: string;
201
+ readonly maxBytes: number;
202
+ readonly contentTypes: ReadonlyArray<string>;
203
+ };
204
+ export declare const OrganizationsCreateAvatarUpload200: Schema.Struct<{
205
+ readonly uploadUrl: Schema.String;
206
+ readonly maxBytes: Schema.Finite;
207
+ readonly contentTypes: Schema.$Array<Schema.String>;
208
+ }>;
209
+ export type OrganizationsCreateAvatarUpload401 = UnauthorizedError;
210
+ export declare const OrganizationsCreateAvatarUpload401: typeof UnauthorizedError;
211
+ export type OrganizationsCreateAvatarUpload403 = ForbiddenError;
212
+ export declare const OrganizationsCreateAvatarUpload403: typeof ForbiddenError;
213
+ export type OrganizationsCreateAvatarUpload422 = ValidationError;
214
+ export declare const OrganizationsCreateAvatarUpload422: typeof ValidationError;
215
+ export type OrganizationsCreateAvatarUpload500 = InternalError;
216
+ export declare const OrganizationsCreateAvatarUpload500: typeof InternalError;
217
+ export type OrganizationsCreateAvatarUpload504 = GatewayTimeoutError;
218
+ export declare const OrganizationsCreateAvatarUpload504: typeof GatewayTimeoutError;
192
219
  export type OrganizationsGetProfile200 = {
193
220
  readonly id: string;
194
221
  readonly name: string;
@@ -361,10 +388,14 @@ export type OrganizationsGetUsage200 = {
361
388
  readonly billing: {
362
389
  readonly currency: string;
363
390
  readonly planName: string | null;
364
- readonly includedEmails: number | null;
365
- readonly usedEmails: number | null;
366
- readonly overageEmails: number | null;
391
+ readonly includedCredits: number | null;
392
+ readonly usedCredits: number | null;
393
+ readonly overageCredits: number | null;
367
394
  readonly overageCost: number | null;
395
+ readonly includedAiCredits: number | null;
396
+ readonly usedAiCredits: number | null;
397
+ readonly overageAiCredits: number | null;
398
+ readonly overageAiCost: number | null;
368
399
  };
369
400
  };
370
401
  export declare const OrganizationsGetUsage200: Schema.Struct<{
@@ -377,10 +408,14 @@ export declare const OrganizationsGetUsage200: Schema.Struct<{
377
408
  readonly billing: Schema.Struct<{
378
409
  readonly currency: Schema.String;
379
410
  readonly planName: Schema.Union<readonly [Schema.String, Schema.Null]>;
380
- readonly includedEmails: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
381
- readonly usedEmails: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
382
- readonly overageEmails: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
411
+ readonly includedCredits: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
412
+ readonly usedCredits: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
413
+ readonly overageCredits: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
383
414
  readonly overageCost: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
415
+ readonly includedAiCredits: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
416
+ readonly usedAiCredits: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
417
+ readonly overageAiCredits: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
418
+ readonly overageAiCost: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
384
419
  }>;
385
420
  }>;
386
421
  export type OrganizationsGetUsage401 = UnauthorizedError;
@@ -400,6 +435,7 @@ declare const OrganizationsGroup_base: HttpApiGroup.HttpApiGroup<"Organizations"
400
435
  readonly billingAccountId: Schema.String;
401
436
  readonly name: Schema.String;
402
437
  readonly slug: Schema.String;
438
+ readonly avatarUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
403
439
  readonly defaultRegion: Schema.Union<readonly [Schema.String, Schema.Null]>;
404
440
  readonly timezone: Schema.String;
405
441
  readonly plan: Schema.String;
@@ -513,6 +549,70 @@ declare const OrganizationsGroup_base: HttpApiGroup.HttpApiGroup<"Organizations"
513
549
  readonly _tag: Schema.tag<"ValidationError">;
514
550
  readonly message: Schema.String;
515
551
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
552
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationsCreateAvatarUpload", "POST", "/v1/organizations/current/avatar-upload", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
553
+ readonly uploadUrl: Schema.String;
554
+ readonly maxBytes: Schema.Finite;
555
+ readonly contentTypes: Schema.$Array<Schema.String>;
556
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
557
+ readonly _tag: "ForbiddenError";
558
+ readonly message: string;
559
+ }, readonly [Schema.Struct<{
560
+ readonly _tag: Schema.tag<"ForbiddenError">;
561
+ readonly message: Schema.String;
562
+ }>], {
563
+ readonly _tag: "ForbiddenError";
564
+ readonly message: string;
565
+ }>, Schema.Struct<{
566
+ readonly _tag: Schema.tag<"ForbiddenError">;
567
+ readonly message: Schema.String;
568
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
569
+ readonly _tag: "GatewayTimeoutError";
570
+ readonly message: string;
571
+ readonly retryAfterSeconds: number;
572
+ }, readonly [Schema.Struct<{
573
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
574
+ readonly message: Schema.String;
575
+ readonly retryAfterSeconds: Schema.Finite;
576
+ }>], {
577
+ readonly _tag: "GatewayTimeoutError";
578
+ readonly message: string;
579
+ readonly retryAfterSeconds: number;
580
+ }>, Schema.Struct<{
581
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
582
+ readonly message: Schema.String;
583
+ readonly retryAfterSeconds: Schema.Finite;
584
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
585
+ readonly _tag: "UnauthorizedError";
586
+ readonly message: string;
587
+ }, readonly [Schema.Struct<{
588
+ readonly _tag: Schema.tag<"UnauthorizedError">;
589
+ readonly message: Schema.String;
590
+ }>], {
591
+ readonly _tag: "UnauthorizedError";
592
+ readonly message: string;
593
+ }>, Schema.Struct<{
594
+ readonly _tag: Schema.tag<"UnauthorizedError">;
595
+ readonly message: Schema.String;
596
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
597
+ readonly _tag: "ValidationError";
598
+ readonly message: string;
599
+ readonly fields?: {
600
+ readonly [x: string]: readonly string[];
601
+ } | null;
602
+ }, readonly [Schema.Struct<{
603
+ readonly _tag: Schema.tag<"ValidationError">;
604
+ readonly message: Schema.String;
605
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
606
+ }>], {
607
+ readonly _tag: "ValidationError";
608
+ readonly message: string;
609
+ readonly fields?: {
610
+ readonly [x: string]: readonly string[];
611
+ } | null;
612
+ }>, Schema.Struct<{
613
+ readonly _tag: Schema.tag<"ValidationError">;
614
+ readonly message: Schema.String;
615
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
516
616
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationsDelete", "POST", "/v1/organizations/deletion-operations", never, never, Schema.toCodecJson<Schema.Struct<{
517
617
  readonly confirmationName: Schema.String;
518
618
  }>>, Schema.toCodecStringTree<Schema.Struct<{
@@ -636,6 +736,7 @@ declare const OrganizationsGroup_base: HttpApiGroup.HttpApiGroup<"Organizations"
636
736
  readonly billingAccountId: Schema.String;
637
737
  readonly name: Schema.String;
638
738
  readonly slug: Schema.String;
739
+ readonly avatarUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
639
740
  readonly defaultRegion: Schema.Union<readonly [Schema.String, Schema.Null]>;
640
741
  readonly timezone: Schema.String;
641
742
  readonly plan: Schema.String;
@@ -931,10 +1032,14 @@ declare const OrganizationsGroup_base: HttpApiGroup.HttpApiGroup<"Organizations"
931
1032
  readonly billing: Schema.Struct<{
932
1033
  readonly currency: Schema.String;
933
1034
  readonly planName: Schema.Union<readonly [Schema.String, Schema.Null]>;
934
- readonly includedEmails: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
935
- readonly usedEmails: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
936
- readonly overageEmails: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
1035
+ readonly includedCredits: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
1036
+ readonly usedCredits: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
1037
+ readonly overageCredits: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
937
1038
  readonly overageCost: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
1039
+ readonly includedAiCredits: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
1040
+ readonly usedAiCredits: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
1041
+ readonly overageAiCredits: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
1042
+ readonly overageAiCost: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
938
1043
  }>;
939
1044
  }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
940
1045
  readonly _tag: "ForbiddenError";
@@ -999,6 +1104,7 @@ declare const OrganizationsGroup_base: HttpApiGroup.HttpApiGroup<"Organizations"
999
1104
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"organizationsUpdate", "PATCH", "/v1/organizations/current", never, never, Schema.toCodecJson<Schema.Struct<{
1000
1105
  readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1001
1106
  readonly slug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1107
+ readonly avatarUrl: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
1002
1108
  readonly defaultRegion: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
1003
1109
  readonly timezone: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1004
1110
  readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
@@ -1010,6 +1116,7 @@ declare const OrganizationsGroup_base: HttpApiGroup.HttpApiGroup<"Organizations"
1010
1116
  readonly billingAccountId: Schema.String;
1011
1117
  readonly name: Schema.String;
1012
1118
  readonly slug: Schema.String;
1119
+ readonly avatarUrl: Schema.Union<readonly [Schema.String, Schema.Null]>;
1013
1120
  readonly defaultRegion: Schema.Union<readonly [Schema.String, Schema.Null]>;
1014
1121
  readonly timezone: Schema.String;
1015
1122
  readonly plan: Schema.String;
@@ -11,6 +11,7 @@ const Organization = /* @__PURE__ */ Schema.Struct({
11
11
  billingAccountId: Schema.String,
12
12
  name: Schema.String,
13
13
  slug: Schema.String,
14
+ avatarUrl: Schema.Union([Schema.String, Schema.Null]).annotate({ description: "URL of the organization's avatar image, hosted by Samva. Null when no avatar is set." }),
14
15
  defaultRegion: Schema.Union([PhoneRegion, Schema.Null]),
15
16
  timezone: Schema.String,
16
17
  plan: Schema.String,
@@ -48,6 +49,7 @@ const OrganizationsGet504 = GatewayTimeoutError;
48
49
  const OrganizationsUpdateRequestJson = /* @__PURE__ */ Schema.Struct({
49
50
  name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
50
51
  slug: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
52
+ avatarUrl: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]).annotate({ description: "The `src` returned by an avatar upload (see `POST /v1/organizations/current/avatar-upload`). Null removes the avatar." }), Schema.Null])),
51
53
  defaultRegion: Schema.optionalKey(Schema.Union([Schema.Union([PhoneRegion, Schema.Null]), Schema.Null])),
52
54
  timezone: Schema.optionalKey(Schema.Union([IanaTimezone, Schema.Null])),
53
55
  isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
@@ -62,6 +64,16 @@ const OrganizationsUpdate404 = ResourceNotFoundError;
62
64
  const OrganizationsUpdate422 = ValidationError;
63
65
  const OrganizationsUpdate500 = InternalError;
64
66
  const OrganizationsUpdate504 = GatewayTimeoutError;
67
+ const OrganizationsCreateAvatarUpload200 = /* @__PURE__ */ Schema.Struct({
68
+ uploadUrl: Schema.String.annotate({ description: "The URL to PUT the image bytes to." }),
69
+ maxBytes: Schema.Finite.annotate({ description: "The largest image the upload accepts, in bytes." }).check(Schema.isFinite().annotate({ expected: "a finite number" })),
70
+ contentTypes: Schema.Array(Schema.String).annotate({ description: "The image content types the upload accepts." })
71
+ });
72
+ const OrganizationsCreateAvatarUpload401 = UnauthorizedError;
73
+ const OrganizationsCreateAvatarUpload403 = ForbiddenError;
74
+ const OrganizationsCreateAvatarUpload422 = ValidationError;
75
+ const OrganizationsCreateAvatarUpload500 = InternalError;
76
+ const OrganizationsCreateAvatarUpload504 = GatewayTimeoutError;
65
77
  const OrganizationsGetProfile200 = /* @__PURE__ */ Schema.Struct({
66
78
  id: Schema.String.annotate({ description: "Opaque identity for your organization membership" }),
67
79
  name: Schema.String.annotate({ description: "Your display name" }),
@@ -142,10 +154,14 @@ const OrganizationsGetUsage200 = /* @__PURE__ */ Schema.Struct({
142
154
  billing: Schema.Struct({
143
155
  currency: Schema.String,
144
156
  planName: Schema.Union([Schema.String, Schema.Null]),
145
- includedEmails: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
146
- usedEmails: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
147
- overageEmails: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
148
- overageCost: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])
157
+ includedCredits: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
158
+ usedCredits: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
159
+ overageCredits: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
160
+ overageCost: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
161
+ includedAiCredits: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
162
+ usedAiCredits: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
163
+ overageAiCredits: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
164
+ overageAiCost: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])
149
165
  })
150
166
  });
151
167
  const OrganizationsGetUsage401 = UnauthorizedError;
@@ -186,7 +202,16 @@ var OrganizationsGroup = class extends HttpApiGroup.make("Organizations").add(Ht
186
202
  OrganizationsUpdate500,
187
203
  OrganizationsUpdate504.pipe(HttpApiSchema.status(504))
188
204
  ]
189
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "organizations.update").annotate(OpenApi.Summary, "Update the current organization").annotate(OpenApi.Description, "Updates the current organization's profile, regional defaults, and reply-to default and returns the saved organization. `metadata` is merged into the stored value; every other field is replaced."), HttpApiEndpoint.get("organizationsGetProfile", "/v1/organizations/current/profile", {
205
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "organizations.update").annotate(OpenApi.Summary, "Update the current organization").annotate(OpenApi.Description, "Updates the current organization's profile, avatar, regional defaults, and reply-to default and returns the saved organization. `avatarUrl` accepts only the `src` returned by an avatar upload, and null removes the avatar. `metadata` is merged into the stored value; every other field is replaced."), HttpApiEndpoint.post("organizationsCreateAvatarUpload", "/v1/organizations/current/avatar-upload", {
206
+ success: OrganizationsCreateAvatarUpload200,
207
+ error: [
208
+ OrganizationsCreateAvatarUpload401.pipe(HttpApiSchema.status(401)),
209
+ OrganizationsCreateAvatarUpload403.pipe(HttpApiSchema.status(403)),
210
+ OrganizationsCreateAvatarUpload422.pipe(HttpApiSchema.status(422)),
211
+ OrganizationsCreateAvatarUpload500,
212
+ OrganizationsCreateAvatarUpload504.pipe(HttpApiSchema.status(504))
213
+ ]
214
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "organizations.createAvatarUpload").annotate(OpenApi.Summary, "Get the organization avatar upload URL").annotate(OpenApi.Description, "Returns where to upload the organization avatar. PUT the png, jpeg, or webp bytes (at most `maxBytes`) to `uploadUrl` with the same credential and a matching `Content-Type`; the response is `{ src }`. Then send `PATCH /v1/organizations/current` with `{ avatarUrl: src }`."), HttpApiEndpoint.get("organizationsGetProfile", "/v1/organizations/current/profile", {
190
215
  success: OrganizationsGetProfile200,
191
216
  error: [
192
217
  OrganizationsGetProfile401.pipe(HttpApiSchema.status(401)),
@@ -230,6 +255,6 @@ var OrganizationsGroup = class extends HttpApiGroup.make("Organizations").add(Ht
230
255
  ]
231
256
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "organizations.getUsage").annotate(OpenApi.Summary, "Get organization usage").annotate(OpenApi.Description, "Returns usage statistics for the current organization between `after` and `before`, which default to the current calendar month so far. `usage.periodStart` and `usage.periodEnd` echo the window counted.")).annotate(OpenApi.Description, "Organization management and usage statistics") {};
232
257
  //#endregion
233
- export { Organization, OrganizationsCreate200, OrganizationsCreate401, OrganizationsCreate402, OrganizationsCreate403, OrganizationsCreate422, OrganizationsCreate500, OrganizationsCreate502, OrganizationsCreate504, OrganizationsCreateRequestJson, OrganizationsDelete202, OrganizationsDelete401, OrganizationsDelete403, OrganizationsDelete409, OrganizationsDelete422, OrganizationsDelete500, OrganizationsDelete504, OrganizationsDeleteHeaders, OrganizationsDeleteRequestJson, OrganizationsGet200, OrganizationsGet401, OrganizationsGet403, OrganizationsGet404, OrganizationsGet422, OrganizationsGet500, OrganizationsGet504, OrganizationsGetProfile200, OrganizationsGetProfile401, OrganizationsGetProfile403, OrganizationsGetProfile422, OrganizationsGetProfile500, OrganizationsGetProfile504, OrganizationsGetTrustTier200, OrganizationsGetTrustTier401, OrganizationsGetTrustTier403, OrganizationsGetTrustTier404, OrganizationsGetTrustTier422, OrganizationsGetTrustTier500, OrganizationsGetTrustTier502, OrganizationsGetTrustTier504, OrganizationsGetUsage200, OrganizationsGetUsage401, OrganizationsGetUsage403, OrganizationsGetUsage422, OrganizationsGetUsage500, OrganizationsGetUsage504, OrganizationsGetUsageQuery, OrganizationsGroup, OrganizationsUpdate200, OrganizationsUpdate401, OrganizationsUpdate403, OrganizationsUpdate404, OrganizationsUpdate422, OrganizationsUpdate500, OrganizationsUpdate504, OrganizationsUpdateRequestJson, PhoneRegion };
258
+ export { Organization, OrganizationsCreate200, OrganizationsCreate401, OrganizationsCreate402, OrganizationsCreate403, OrganizationsCreate422, OrganizationsCreate500, OrganizationsCreate502, OrganizationsCreate504, OrganizationsCreateAvatarUpload200, OrganizationsCreateAvatarUpload401, OrganizationsCreateAvatarUpload403, OrganizationsCreateAvatarUpload422, OrganizationsCreateAvatarUpload500, OrganizationsCreateAvatarUpload504, OrganizationsCreateRequestJson, OrganizationsDelete202, OrganizationsDelete401, OrganizationsDelete403, OrganizationsDelete409, OrganizationsDelete422, OrganizationsDelete500, OrganizationsDelete504, OrganizationsDeleteHeaders, OrganizationsDeleteRequestJson, OrganizationsGet200, OrganizationsGet401, OrganizationsGet403, OrganizationsGet404, OrganizationsGet422, OrganizationsGet500, OrganizationsGet504, OrganizationsGetProfile200, OrganizationsGetProfile401, OrganizationsGetProfile403, OrganizationsGetProfile422, OrganizationsGetProfile500, OrganizationsGetProfile504, OrganizationsGetTrustTier200, OrganizationsGetTrustTier401, OrganizationsGetTrustTier403, OrganizationsGetTrustTier404, OrganizationsGetTrustTier422, OrganizationsGetTrustTier500, OrganizationsGetTrustTier502, OrganizationsGetTrustTier504, OrganizationsGetUsage200, OrganizationsGetUsage401, OrganizationsGetUsage403, OrganizationsGetUsage422, OrganizationsGetUsage500, OrganizationsGetUsage504, OrganizationsGetUsageQuery, OrganizationsGroup, OrganizationsUpdate200, OrganizationsUpdate401, OrganizationsUpdate403, OrganizationsUpdate404, OrganizationsUpdate422, OrganizationsUpdate500, OrganizationsUpdate504, OrganizationsUpdateRequestJson, PhoneRegion };
234
259
 
235
260
  //# sourceMappingURL=organizations.js.map
@@ -147,7 +147,7 @@ const ContactGroupId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @
147
147
  expected: "a string matching the RegExp ^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$",
148
148
  identifier: "ContactGroupId"
149
149
  })).pipe(Schema.brand("ContactGroupId"));
150
- const SendsSeries = /* @__PURE__ */ Schema.Array(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))).annotate({
150
+ const SendsSeries = /* @__PURE__ */ Schema.Array(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))).annotate({
151
151
  description: "Daily email sends for the last 14 calendar days in the organization's own timezone, oldest first and zero-filled. Always fourteen entries; an entity that has never sent reports fourteen zeroes.",
152
152
  identifier: "SendsSeries"
153
153
  });