samva 0.45.1 → 0.46.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.
- package/AGENTS.md +7 -0
- package/README.md +24 -0
- package/dist/client/sdk.gen.d.ts +438 -5
- package/dist/client/sdk.gen.js +1544 -229
- package/dist/client/types.gen.d.ts +8120 -5616
- package/dist/effect/accounts.d.ts +50 -0
- package/dist/effect/accounts.js +22 -0
- package/dist/effect/agents.d.ts +9 -0
- package/dist/effect/agents.js +1 -1
- package/dist/effect/approval-requests.d.ts +42 -0
- package/dist/effect/approval-requests.js +18 -0
- package/dist/effect/campaigns.d.ts +160 -160
- package/dist/effect/generated/accounts.d.ts +1002 -0
- package/dist/effect/generated/accounts.js +198 -0
- package/dist/effect/generated/agents.d.ts +84 -0
- package/dist/effect/generated/agents.js +1 -0
- package/dist/effect/generated/approval-requests.d.ts +777 -0
- package/dist/effect/generated/approval-requests.js +135 -0
- package/dist/effect/generated/campaigns.d.ts +17 -17
- package/dist/effect/generated/campaigns.js +6 -6
- package/dist/effect/generated/conversations.d.ts +20 -20
- package/dist/effect/generated/conversations.js +10 -10
- package/dist/effect/generated/events.js +1 -1
- package/dist/effect/generated/index.d.ts +11 -1
- package/dist/effect/generated/integrations-catalog.d.ts +671 -0
- package/dist/effect/generated/integrations-catalog.js +217 -0
- package/dist/effect/generated/integrations.d.ts +1401 -0
- package/dist/effect/generated/integrations.js +246 -0
- package/dist/effect/generated/mailboxes.d.ts +8157 -4241
- package/dist/effect/generated/mailboxes.js +677 -52
- package/dist/effect/generated/messages.d.ts +8 -8
- package/dist/effect/generated/messages.js +4 -4
- package/dist/effect/generated/scheduled-messages.d.ts +50 -50
- package/dist/effect/generated/scheduled-messages.js +17 -17
- package/dist/effect/generated/shared.d.ts +661 -511
- package/dist/effect/generated/shared.js +212 -179
- package/dist/effect/generated/template-share-links.d.ts +733 -0
- package/dist/effect/generated/template-share-links.js +165 -0
- package/dist/effect/generated/templates.d.ts +39 -22
- package/dist/effect/generated/templates.js +19 -16
- package/dist/effect/generated-metadata.d.ts +248 -0
- package/dist/effect/generated-metadata.js +705 -555
- package/dist/effect/index.d.ts +5 -0
- package/dist/effect/index.js +6 -1
- package/dist/effect/integrations-catalog.d.ts +38 -0
- package/dist/effect/integrations-catalog.js +16 -0
- package/dist/effect/integrations.d.ts +165 -0
- package/dist/effect/integrations.js +24 -0
- package/dist/effect/mailboxes.d.ts +373 -191
- package/dist/effect/mailboxes.js +31 -1
- package/dist/effect/scheduled-messages.d.ts +350 -350
- package/dist/effect/template-share-links.d.ts +18 -0
- package/dist/effect/template-share-links.js +20 -0
- package/dist/effect/templates.d.ts +4 -3
- package/dist/index.js +2 -2
- package/dist/package.js +1 -1
- package/dist/promises/client.d.ts +11 -1
- package/dist/promises/client.js +13 -3
- package/dist/promises/errors.gen.d.ts +22 -2
- package/dist/promises/errors.gen.js +54 -1
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +203 -0
- package/dist/service-map.js +103 -0
- package/package.json +22 -2
|
@@ -226,6 +226,14 @@ export declare const ValidateEmailResponse: Schema.Struct<{
|
|
|
226
226
|
readonly hasText: Schema.Boolean;
|
|
227
227
|
}>;
|
|
228
228
|
}>;
|
|
229
|
+
export type MessageAddress = {
|
|
230
|
+
readonly address: string;
|
|
231
|
+
readonly contactId: ContactId | null;
|
|
232
|
+
};
|
|
233
|
+
export declare const MessageAddress: Schema.Struct<{
|
|
234
|
+
readonly address: Schema.String;
|
|
235
|
+
readonly contactId: Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>;
|
|
236
|
+
}>;
|
|
229
237
|
export type SubmissionCredential = {
|
|
230
238
|
readonly kind: "api_key";
|
|
231
239
|
readonly apiKeyId: ApiKeyId | null;
|
|
@@ -296,14 +304,6 @@ export declare const WhatsAppStoredMedia: Schema.Union<readonly [Schema.Struct<{
|
|
|
296
304
|
readonly caption: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
297
305
|
readonly filename: Schema.optionalKey<Schema.String>;
|
|
298
306
|
}>]>;
|
|
299
|
-
export type MessageAddress = {
|
|
300
|
-
readonly address: string;
|
|
301
|
-
readonly contactId: ContactId | null;
|
|
302
|
-
};
|
|
303
|
-
export declare const MessageAddress: Schema.Struct<{
|
|
304
|
-
readonly address: Schema.String;
|
|
305
|
-
readonly contactId: Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>;
|
|
306
|
-
}>;
|
|
307
307
|
export type WhatsAppStoredFlowMessage = {
|
|
308
308
|
readonly type: "flow";
|
|
309
309
|
readonly header?: WhatsAppTextHeader;
|
|
@@ -127,6 +127,10 @@ const ValidateEmailResponse = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
127
127
|
hasText: Schema.Boolean
|
|
128
128
|
})
|
|
129
129
|
}).annotate({ identifier: "ValidateEmailResponse" }))();
|
|
130
|
+
const MessageAddress = /* @__PURE__ */ (() => Schema.Struct({
|
|
131
|
+
address: Schema.String,
|
|
132
|
+
contactId: Schema.Union([ContactId, Schema.Null])
|
|
133
|
+
}).annotate({ identifier: "MessageAddress" }))();
|
|
130
134
|
const SubmissionCredential = /* @__PURE__ */ (() => Schema.Union([
|
|
131
135
|
Schema.Struct({
|
|
132
136
|
kind: Schema.Literal("api_key"),
|
|
@@ -186,10 +190,6 @@ const WhatsAppStoredMedia = /* @__PURE__ */ (() => Schema.Union([
|
|
|
186
190
|
filename: Schema.optionalKey(Schema.String)
|
|
187
191
|
})
|
|
188
192
|
]).annotate({ identifier: "WhatsAppStoredMedia" }))();
|
|
189
|
-
const MessageAddress = /* @__PURE__ */ (() => Schema.Struct({
|
|
190
|
-
address: Schema.String,
|
|
191
|
-
contactId: Schema.Union([ContactId, Schema.Null])
|
|
192
|
-
}).annotate({ identifier: "MessageAddress" }))();
|
|
193
193
|
const WhatsAppStoredFlowMessage = /* @__PURE__ */ (() => Schema.Struct({
|
|
194
194
|
type: Schema.Literal("flow"),
|
|
195
195
|
header: Schema.optionalKey(WhatsAppTextHeader),
|
|
@@ -32,6 +32,56 @@ export declare const SavedPhoneRecipient: Schema.Union<readonly [Schema.Struct<{
|
|
|
32
32
|
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
33
33
|
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
34
34
|
}>]>;
|
|
35
|
+
export type StoredSmsSendMessage = {
|
|
36
|
+
readonly conversationId?: ConversationId | null;
|
|
37
|
+
readonly metadata?: MessageMetadata;
|
|
38
|
+
readonly channel: "sms";
|
|
39
|
+
readonly to: ReadonlyArray<SavedPhoneRecipient>;
|
|
40
|
+
readonly sms: SmsContent;
|
|
41
|
+
};
|
|
42
|
+
export declare const StoredSmsSendMessage: Schema.Struct<{
|
|
43
|
+
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
44
|
+
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
|
|
45
|
+
readonly channel: Schema.Literal<"sms">;
|
|
46
|
+
readonly to: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
47
|
+
readonly contactId: Schema.brand<Schema.String, "ContactId">;
|
|
48
|
+
}>, Schema.Struct<{
|
|
49
|
+
readonly phone: Schema.String;
|
|
50
|
+
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
51
|
+
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
52
|
+
}>]>>;
|
|
53
|
+
readonly sms: Schema.Struct<{
|
|
54
|
+
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
55
|
+
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
56
|
+
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
57
|
+
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
|
|
58
|
+
}>;
|
|
59
|
+
}>;
|
|
60
|
+
export type SmsDispatchSendMessagePayload = {
|
|
61
|
+
readonly conversationId?: ConversationId | null;
|
|
62
|
+
readonly metadata?: MessageMetadata;
|
|
63
|
+
readonly channel: "sms";
|
|
64
|
+
readonly to: SmsRecipients;
|
|
65
|
+
readonly sms: SmsDispatchContent;
|
|
66
|
+
};
|
|
67
|
+
export declare const SmsDispatchSendMessagePayload: Schema.Struct<{
|
|
68
|
+
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
69
|
+
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
|
|
70
|
+
readonly channel: Schema.Literal<"sms">;
|
|
71
|
+
readonly to: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
72
|
+
readonly contactId: Schema.brand<Schema.String, "ContactId">;
|
|
73
|
+
}>, Schema.Struct<{
|
|
74
|
+
readonly phone: Schema.String;
|
|
75
|
+
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
76
|
+
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
77
|
+
}>]>>;
|
|
78
|
+
readonly sms: Schema.Struct<{
|
|
79
|
+
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
80
|
+
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
81
|
+
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
82
|
+
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
|
|
83
|
+
}>;
|
|
84
|
+
}>;
|
|
35
85
|
export type StoredEmailContent = {
|
|
36
86
|
readonly subject?: string | null;
|
|
37
87
|
readonly html?: string | null;
|
|
@@ -130,56 +180,6 @@ export declare const EmailDispatchContent: Schema.Struct<{
|
|
|
130
180
|
}>>;
|
|
131
181
|
readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
132
182
|
}>;
|
|
133
|
-
export type StoredSmsSendMessage = {
|
|
134
|
-
readonly conversationId?: ConversationId | null;
|
|
135
|
-
readonly metadata?: MessageMetadata;
|
|
136
|
-
readonly channel: "sms";
|
|
137
|
-
readonly to: ReadonlyArray<SavedPhoneRecipient>;
|
|
138
|
-
readonly sms: SmsContent;
|
|
139
|
-
};
|
|
140
|
-
export declare const StoredSmsSendMessage: Schema.Struct<{
|
|
141
|
-
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
142
|
-
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
|
|
143
|
-
readonly channel: Schema.Literal<"sms">;
|
|
144
|
-
readonly to: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
145
|
-
readonly contactId: Schema.brand<Schema.String, "ContactId">;
|
|
146
|
-
}>, Schema.Struct<{
|
|
147
|
-
readonly phone: Schema.String;
|
|
148
|
-
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
149
|
-
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
150
|
-
}>]>>;
|
|
151
|
-
readonly sms: Schema.Struct<{
|
|
152
|
-
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
153
|
-
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
154
|
-
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
155
|
-
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
|
|
156
|
-
}>;
|
|
157
|
-
}>;
|
|
158
|
-
export type SmsDispatchSendMessagePayload = {
|
|
159
|
-
readonly conversationId?: ConversationId | null;
|
|
160
|
-
readonly metadata?: MessageMetadata;
|
|
161
|
-
readonly channel: "sms";
|
|
162
|
-
readonly to: SmsRecipients;
|
|
163
|
-
readonly sms: SmsDispatchContent;
|
|
164
|
-
};
|
|
165
|
-
export declare const SmsDispatchSendMessagePayload: Schema.Struct<{
|
|
166
|
-
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
167
|
-
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
|
|
168
|
-
readonly channel: Schema.Literal<"sms">;
|
|
169
|
-
readonly to: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
170
|
-
readonly contactId: Schema.brand<Schema.String, "ContactId">;
|
|
171
|
-
}>, Schema.Struct<{
|
|
172
|
-
readonly phone: Schema.String;
|
|
173
|
-
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
174
|
-
readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
175
|
-
}>]>>;
|
|
176
|
-
readonly sms: Schema.Struct<{
|
|
177
|
-
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
178
|
-
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
179
|
-
readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
180
|
-
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
|
|
181
|
-
}>;
|
|
182
|
-
}>;
|
|
183
183
|
export type StoredEmailSendMessage = {
|
|
184
184
|
readonly conversationId?: ConversationId | null;
|
|
185
185
|
readonly metadata?: MessageMetadata;
|
|
@@ -17,6 +17,23 @@ const SavedPhoneRecipient = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({
|
|
|
17
17
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
18
18
|
displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
19
19
|
})]).annotate({ identifier: "SavedPhoneRecipient" }))();
|
|
20
|
+
const StoredSmsSendMessage = /* @__PURE__ */ (() => Schema.Struct({
|
|
21
|
+
conversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
|
|
22
|
+
metadata: Schema.optionalKey(MessageMetadata),
|
|
23
|
+
channel: Schema.Literal("sms"),
|
|
24
|
+
to: Schema.Array(SavedPhoneRecipient).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(1).annotate({ expected: "a value with a length of at most 1" })),
|
|
25
|
+
sms: SmsContent
|
|
26
|
+
}).annotate({ identifier: "StoredSmsSendMessage" }))();
|
|
27
|
+
const SmsDispatchSendMessagePayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
28
|
+
conversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
|
|
29
|
+
metadata: Schema.optionalKey(MessageMetadata),
|
|
30
|
+
channel: Schema.Literal("sms"),
|
|
31
|
+
to: SmsRecipients,
|
|
32
|
+
sms: SmsDispatchContent
|
|
33
|
+
}).annotate({
|
|
34
|
+
description: "The payload is accepted by the contract today and the endpoint answers 403 until the channel launches for your organization.",
|
|
35
|
+
identifier: "SmsDispatchSendMessagePayload"
|
|
36
|
+
}))();
|
|
20
37
|
const StoredEmailContent = /* @__PURE__ */ (() => Schema.Struct({
|
|
21
38
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
22
39
|
html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -55,23 +72,6 @@ const EmailDispatchContent = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
55
72
|
footer: Schema.optionalKey(EmailFooterOverride),
|
|
56
73
|
headers: Schema.optionalKey(Schema.Union([EmailCustomHeaders, Schema.Null]))
|
|
57
74
|
}).annotate({ identifier: "EmailDispatchContent" }))();
|
|
58
|
-
const StoredSmsSendMessage = /* @__PURE__ */ (() => Schema.Struct({
|
|
59
|
-
conversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
|
|
60
|
-
metadata: Schema.optionalKey(MessageMetadata),
|
|
61
|
-
channel: Schema.Literal("sms"),
|
|
62
|
-
to: Schema.Array(SavedPhoneRecipient).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(1).annotate({ expected: "a value with a length of at most 1" })),
|
|
63
|
-
sms: SmsContent
|
|
64
|
-
}).annotate({ identifier: "StoredSmsSendMessage" }))();
|
|
65
|
-
const SmsDispatchSendMessagePayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
66
|
-
conversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
|
|
67
|
-
metadata: Schema.optionalKey(MessageMetadata),
|
|
68
|
-
channel: Schema.Literal("sms"),
|
|
69
|
-
to: SmsRecipients,
|
|
70
|
-
sms: SmsDispatchContent
|
|
71
|
-
}).annotate({
|
|
72
|
-
description: "The payload is accepted by the contract today and the endpoint answers 403 until the channel launches for your organization.",
|
|
73
|
-
identifier: "SmsDispatchSendMessagePayload"
|
|
74
|
-
}))();
|
|
75
75
|
const StoredEmailSendMessage = /* @__PURE__ */ (() => Schema.Struct({
|
|
76
76
|
conversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
|
|
77
77
|
metadata: Schema.optionalKey(MessageMetadata),
|