samva 0.22.0 → 0.22.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.
- package/README.md +1 -1
- package/dist/effect/analytics.d.ts +6 -41
- package/dist/effect/api-keys.d.ts +8 -236
- package/dist/effect/attachments.d.ts +4 -43
- package/dist/effect/brands.d.ts +6 -155
- package/dist/effect/campaigns.d.ts +12 -868
- package/dist/effect/contact-groups.d.ts +10 -135
- package/dist/effect/contacts.d.ts +21 -727
- package/dist/effect/conversations.d.ts +13 -681
- package/dist/effect/custom-fields.d.ts +4 -44
- package/dist/effect/email.d.ts +61 -1299
- package/dist/effect/events.d.ts +2 -32
- package/dist/effect/extension-installations.d.ts +9 -213
- package/dist/effect/extensions.d.ts +5 -95
- package/dist/effect/feedback.d.ts +1 -4
- package/dist/effect/internal/client.d.ts +5 -1
- package/dist/effect/internal/operation.d.ts +3 -3
- package/dist/effect/internal/send.d.ts +3 -3
- package/dist/effect/journeys.d.ts +167 -1836
- package/dist/effect/mailboxes.d.ts +60 -2362
- package/dist/effect/media.d.ts +5 -66
- package/dist/effect/messages.d.ts +9 -264
- package/dist/effect/namespaces.d.ts +8 -55
- package/dist/effect/operations.d.ts +3 -84
- package/dist/effect/organizations.d.ts +7 -161
- package/dist/effect/scheduled-messages.d.ts +5 -401
- package/dist/effect/subscriptions.d.ts +1 -4
- package/dist/effect/templates.d.ts +34 -1506
- package/dist/effect/unsubscribe-groups.d.ts +9 -70
- package/dist/effect/webhooks.d.ts +11 -141
- package/dist/effect/whoami.d.ts +1 -46
- package/dist/package.js +1 -1
- package/package.json +7 -7
package/dist/effect/events.d.ts
CHANGED
|
@@ -43,17 +43,7 @@ export declare const create: (input: {
|
|
|
43
43
|
} | null | undefined;
|
|
44
44
|
readonly occurredAt?: string | null | undefined;
|
|
45
45
|
readonly idempotencyKey?: string | null | undefined;
|
|
46
|
-
}) => import("
|
|
47
|
-
readonly id: string;
|
|
48
|
-
readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
|
|
49
|
-
readonly name: string;
|
|
50
|
-
readonly source: "api" | "samva";
|
|
51
|
-
readonly properties: {
|
|
52
|
-
readonly [x: string]: import("./generated").JsonValue;
|
|
53
|
-
};
|
|
54
|
-
readonly occurredAt: string;
|
|
55
|
-
readonly recordedAt: string;
|
|
56
|
-
}, import("./errors").BillingProviderError | import("./errors").ConflictError | import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").PaymentRequiredError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
46
|
+
}) => import("./internal/operation").OperationResult<"eventsCreate">;
|
|
57
47
|
export declare const batch: (input: {
|
|
58
48
|
readonly events: readonly {
|
|
59
49
|
readonly contact: {
|
|
@@ -98,24 +88,4 @@ export declare const batch: (input: {
|
|
|
98
88
|
readonly occurredAt?: string | null | undefined;
|
|
99
89
|
readonly idempotencyKey?: string | null | undefined;
|
|
100
90
|
}[];
|
|
101
|
-
}) => import("
|
|
102
|
-
readonly total: number;
|
|
103
|
-
readonly accepted: number;
|
|
104
|
-
readonly errors: number;
|
|
105
|
-
readonly results: readonly {
|
|
106
|
-
readonly index: number;
|
|
107
|
-
readonly status: "accepted" | "error";
|
|
108
|
-
readonly event?: {
|
|
109
|
-
readonly id: string;
|
|
110
|
-
readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
|
|
111
|
-
readonly name: string;
|
|
112
|
-
readonly source: "api" | "samva";
|
|
113
|
-
readonly properties: {
|
|
114
|
-
readonly [x: string]: import("./generated").JsonValue;
|
|
115
|
-
};
|
|
116
|
-
readonly occurredAt: string;
|
|
117
|
-
readonly recordedAt: string;
|
|
118
|
-
} | null;
|
|
119
|
-
readonly error?: string | null;
|
|
120
|
-
}[];
|
|
121
|
-
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
91
|
+
}) => import("./internal/operation").OperationResult<"eventsBatch">;
|
|
@@ -3,22 +3,7 @@ export declare const list: ((input?: {
|
|
|
3
3
|
readonly cursor?: string | null | undefined;
|
|
4
4
|
readonly after?: string | null | undefined;
|
|
5
5
|
readonly before?: string | null | undefined;
|
|
6
|
-
} | undefined) => import("
|
|
7
|
-
readonly items: readonly {
|
|
8
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionInstallationId">;
|
|
9
|
-
readonly extensionId: string & import("effect/Brand").Brand<"ExtensionId">;
|
|
10
|
-
readonly name: string;
|
|
11
|
-
readonly displayName: string;
|
|
12
|
-
readonly version: {
|
|
13
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
|
|
14
|
-
readonly version: string;
|
|
15
|
-
};
|
|
16
|
-
readonly runtime: "hosted" | "webhook";
|
|
17
|
-
readonly status: "active" | "disabled";
|
|
18
|
-
readonly createdAt: string;
|
|
19
|
-
}[];
|
|
20
|
-
readonly nextCursor: string | null;
|
|
21
|
-
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>) & {
|
|
6
|
+
} | undefined) => import("./internal/operation").OperationResult<"extensionInstallationsList">) & {
|
|
22
7
|
readonly pages: (input?: {
|
|
23
8
|
readonly limit?: string | null | undefined;
|
|
24
9
|
readonly cursor?: string | null | undefined;
|
|
@@ -67,218 +52,29 @@ export declare const install: (input: {
|
|
|
67
52
|
readonly permissions?: readonly ("quarantine.read" | "read" | "send" | "update")[] | null | undefined;
|
|
68
53
|
readonly sendMode?: "approval" | "send" | null | undefined;
|
|
69
54
|
readonly webhookUrl?: string | null | undefined;
|
|
70
|
-
}) => import("
|
|
71
|
-
readonly installation: {
|
|
72
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionInstallationId">;
|
|
73
|
-
readonly extensionId: string & import("effect/Brand").Brand<"ExtensionId">;
|
|
74
|
-
readonly name: string;
|
|
75
|
-
readonly displayName: string;
|
|
76
|
-
readonly version: {
|
|
77
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
|
|
78
|
-
readonly version: string;
|
|
79
|
-
};
|
|
80
|
-
readonly runtime: "hosted" | "webhook";
|
|
81
|
-
readonly status: "active" | "disabled";
|
|
82
|
-
readonly createdAt: string;
|
|
83
|
-
readonly events: readonly ("mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.discarded" | "mailbox.message.quarantined" | "mailbox.message.received" | "mailbox.message.released" | "mailbox.message.sent")[];
|
|
84
|
-
readonly permissions: readonly ("quarantine.read" | "read" | "send" | "update")[];
|
|
85
|
-
readonly sendMode: "approval" | "send";
|
|
86
|
-
readonly scope: {
|
|
87
|
-
readonly mailboxIds: readonly (string & import("effect/Brand").Brand<"MailboxId">)[] | null;
|
|
88
|
-
readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
|
|
89
|
-
};
|
|
90
|
-
readonly webhook: {
|
|
91
|
-
readonly endpointId: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
92
|
-
readonly url: string;
|
|
93
|
-
} | null;
|
|
94
|
-
readonly updatedAt: string;
|
|
95
|
-
readonly disabledAt: string | null;
|
|
96
|
-
};
|
|
97
|
-
readonly credentials: {
|
|
98
|
-
readonly apiKey: import("effect/Redacted").Redacted<string>;
|
|
99
|
-
readonly webhookSecret: import("effect/Redacted").Redacted<string>;
|
|
100
|
-
} | null;
|
|
101
|
-
}, import("./errors").ConflictError | import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
55
|
+
}) => import("./internal/operation").OperationResult<"extensionInstallationsInstall">;
|
|
102
56
|
export declare const upgrade: (input: {
|
|
103
57
|
readonly id: string;
|
|
104
58
|
readonly version?: string | null | undefined;
|
|
105
59
|
readonly acceptPermissions?: readonly ("event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.discarded" | "event:mailbox.message.quarantined" | "event:mailbox.message.received" | "event:mailbox.message.released" | "event:mailbox.message.sent" | "permission:quarantine.read" | "permission:read" | "permission:send" | "permission:update")[] | null | undefined;
|
|
106
60
|
readonly dryRun?: boolean | null | undefined;
|
|
107
|
-
}) => import("
|
|
108
|
-
readonly installation: {
|
|
109
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionInstallationId">;
|
|
110
|
-
readonly extensionId: string & import("effect/Brand").Brand<"ExtensionId">;
|
|
111
|
-
readonly name: string;
|
|
112
|
-
readonly displayName: string;
|
|
113
|
-
readonly version: {
|
|
114
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
|
|
115
|
-
readonly version: string;
|
|
116
|
-
};
|
|
117
|
-
readonly runtime: "hosted" | "webhook";
|
|
118
|
-
readonly status: "active" | "disabled";
|
|
119
|
-
readonly createdAt: string;
|
|
120
|
-
readonly events: readonly ("mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.discarded" | "mailbox.message.quarantined" | "mailbox.message.received" | "mailbox.message.released" | "mailbox.message.sent")[];
|
|
121
|
-
readonly permissions: readonly ("quarantine.read" | "read" | "send" | "update")[];
|
|
122
|
-
readonly sendMode: "approval" | "send";
|
|
123
|
-
readonly scope: {
|
|
124
|
-
readonly mailboxIds: readonly (string & import("effect/Brand").Brand<"MailboxId">)[] | null;
|
|
125
|
-
readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
|
|
126
|
-
};
|
|
127
|
-
readonly webhook: {
|
|
128
|
-
readonly endpointId: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
129
|
-
readonly url: string;
|
|
130
|
-
} | null;
|
|
131
|
-
readonly updatedAt: string;
|
|
132
|
-
readonly disabledAt: string | null;
|
|
133
|
-
};
|
|
134
|
-
readonly fromVersion: {
|
|
135
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
|
|
136
|
-
readonly version: string;
|
|
137
|
-
};
|
|
138
|
-
readonly toVersion: {
|
|
139
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
|
|
140
|
-
readonly version: string;
|
|
141
|
-
};
|
|
142
|
-
readonly permissionDiff: {
|
|
143
|
-
readonly added: readonly ("event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.discarded" | "event:mailbox.message.quarantined" | "event:mailbox.message.received" | "event:mailbox.message.released" | "event:mailbox.message.sent" | "permission:quarantine.read" | "permission:read" | "permission:send" | "permission:update")[];
|
|
144
|
-
readonly removed: readonly ("event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.discarded" | "event:mailbox.message.quarantined" | "event:mailbox.message.received" | "event:mailbox.message.released" | "event:mailbox.message.sent" | "permission:quarantine.read" | "permission:read" | "permission:send" | "permission:update")[];
|
|
145
|
-
};
|
|
146
|
-
readonly dryRun: boolean;
|
|
147
|
-
readonly versionChange: {
|
|
148
|
-
readonly id: string;
|
|
149
|
-
readonly organizationId: string & import("effect/Brand").Brand<"OrganizationId">;
|
|
150
|
-
readonly installationId: string & import("effect/Brand").Brand<"ExtensionInstallationId">;
|
|
151
|
-
readonly extensionId: string & import("effect/Brand").Brand<"ExtensionId">;
|
|
152
|
-
readonly fromVersion: {
|
|
153
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
|
|
154
|
-
readonly version: string;
|
|
155
|
-
};
|
|
156
|
-
readonly toVersion: {
|
|
157
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
|
|
158
|
-
readonly version: string;
|
|
159
|
-
};
|
|
160
|
-
readonly permissionDiff: {
|
|
161
|
-
readonly added: readonly ("event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.discarded" | "event:mailbox.message.quarantined" | "event:mailbox.message.received" | "event:mailbox.message.released" | "event:mailbox.message.sent" | "permission:quarantine.read" | "permission:read" | "permission:send" | "permission:update")[];
|
|
162
|
-
readonly removed: readonly ("event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.discarded" | "event:mailbox.message.quarantined" | "event:mailbox.message.received" | "event:mailbox.message.released" | "event:mailbox.message.sent" | "permission:quarantine.read" | "permission:read" | "permission:send" | "permission:update")[];
|
|
163
|
-
};
|
|
164
|
-
readonly changedBy: string & import("effect/Brand").Brand<"UserId">;
|
|
165
|
-
readonly changedAt: string;
|
|
166
|
-
} | null;
|
|
167
|
-
}, import("./errors").ConflictError | import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
61
|
+
}) => import("./internal/operation").OperationResult<"extensionInstallationsUpgrade">;
|
|
168
62
|
export declare const get: (input: {
|
|
169
63
|
readonly id: string;
|
|
170
|
-
}) => import("
|
|
171
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionInstallationId">;
|
|
172
|
-
readonly extensionId: string & import("effect/Brand").Brand<"ExtensionId">;
|
|
173
|
-
readonly name: string;
|
|
174
|
-
readonly displayName: string;
|
|
175
|
-
readonly version: {
|
|
176
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
|
|
177
|
-
readonly version: string;
|
|
178
|
-
};
|
|
179
|
-
readonly runtime: "hosted" | "webhook";
|
|
180
|
-
readonly status: "active" | "disabled";
|
|
181
|
-
readonly createdAt: string;
|
|
182
|
-
readonly events: readonly ("mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.discarded" | "mailbox.message.quarantined" | "mailbox.message.received" | "mailbox.message.released" | "mailbox.message.sent")[];
|
|
183
|
-
readonly permissions: readonly ("quarantine.read" | "read" | "send" | "update")[];
|
|
184
|
-
readonly sendMode: "approval" | "send";
|
|
185
|
-
readonly scope: {
|
|
186
|
-
readonly mailboxIds: readonly (string & import("effect/Brand").Brand<"MailboxId">)[] | null;
|
|
187
|
-
readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
|
|
188
|
-
};
|
|
189
|
-
readonly webhook: {
|
|
190
|
-
readonly endpointId: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
191
|
-
readonly url: string;
|
|
192
|
-
} | null;
|
|
193
|
-
readonly updatedAt: string;
|
|
194
|
-
readonly disabledAt: string | null;
|
|
195
|
-
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
64
|
+
}) => import("./internal/operation").OperationResult<"extensionInstallationsGet">;
|
|
196
65
|
export declare const uninstall: (input: {
|
|
197
66
|
readonly id: string;
|
|
198
|
-
}) => import("
|
|
199
|
-
readonly success: boolean;
|
|
200
|
-
}, import("./errors").ConflictError | import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
67
|
+
}) => import("./internal/operation").OperationResult<"extensionInstallationsUninstall">;
|
|
201
68
|
export declare const disable: (input: {
|
|
202
69
|
readonly id: string;
|
|
203
|
-
}) => import("
|
|
204
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionInstallationId">;
|
|
205
|
-
readonly extensionId: string & import("effect/Brand").Brand<"ExtensionId">;
|
|
206
|
-
readonly name: string;
|
|
207
|
-
readonly displayName: string;
|
|
208
|
-
readonly version: {
|
|
209
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
|
|
210
|
-
readonly version: string;
|
|
211
|
-
};
|
|
212
|
-
readonly runtime: "hosted" | "webhook";
|
|
213
|
-
readonly status: "active" | "disabled";
|
|
214
|
-
readonly createdAt: string;
|
|
215
|
-
readonly events: readonly ("mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.discarded" | "mailbox.message.quarantined" | "mailbox.message.received" | "mailbox.message.released" | "mailbox.message.sent")[];
|
|
216
|
-
readonly permissions: readonly ("quarantine.read" | "read" | "send" | "update")[];
|
|
217
|
-
readonly sendMode: "approval" | "send";
|
|
218
|
-
readonly scope: {
|
|
219
|
-
readonly mailboxIds: readonly (string & import("effect/Brand").Brand<"MailboxId">)[] | null;
|
|
220
|
-
readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
|
|
221
|
-
};
|
|
222
|
-
readonly webhook: {
|
|
223
|
-
readonly endpointId: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
224
|
-
readonly url: string;
|
|
225
|
-
} | null;
|
|
226
|
-
readonly updatedAt: string;
|
|
227
|
-
readonly disabledAt: string | null;
|
|
228
|
-
}, import("./errors").ConflictError | import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
70
|
+
}) => import("./internal/operation").OperationResult<"extensionInstallationsDisable">;
|
|
229
71
|
export declare const enable: (input: {
|
|
230
72
|
readonly id: string;
|
|
231
|
-
}) => import("
|
|
232
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionInstallationId">;
|
|
233
|
-
readonly extensionId: string & import("effect/Brand").Brand<"ExtensionId">;
|
|
234
|
-
readonly name: string;
|
|
235
|
-
readonly displayName: string;
|
|
236
|
-
readonly version: {
|
|
237
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
|
|
238
|
-
readonly version: string;
|
|
239
|
-
};
|
|
240
|
-
readonly runtime: "hosted" | "webhook";
|
|
241
|
-
readonly status: "active" | "disabled";
|
|
242
|
-
readonly createdAt: string;
|
|
243
|
-
readonly events: readonly ("mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.discarded" | "mailbox.message.quarantined" | "mailbox.message.received" | "mailbox.message.released" | "mailbox.message.sent")[];
|
|
244
|
-
readonly permissions: readonly ("quarantine.read" | "read" | "send" | "update")[];
|
|
245
|
-
readonly sendMode: "approval" | "send";
|
|
246
|
-
readonly scope: {
|
|
247
|
-
readonly mailboxIds: readonly (string & import("effect/Brand").Brand<"MailboxId">)[] | null;
|
|
248
|
-
readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
|
|
249
|
-
};
|
|
250
|
-
readonly webhook: {
|
|
251
|
-
readonly endpointId: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
252
|
-
readonly url: string;
|
|
253
|
-
} | null;
|
|
254
|
-
readonly updatedAt: string;
|
|
255
|
-
readonly disabledAt: string | null;
|
|
256
|
-
}, import("./errors").ConflictError | import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
73
|
+
}) => import("./internal/operation").OperationResult<"extensionInstallationsEnable">;
|
|
257
74
|
export declare const listRuns: (input: {
|
|
258
75
|
readonly id: string;
|
|
259
|
-
}) => import("
|
|
260
|
-
readonly items: readonly {
|
|
261
|
-
readonly id: string;
|
|
262
|
-
readonly eventId: string;
|
|
263
|
-
readonly eventType: "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.discarded" | "mailbox.message.quarantined" | "mailbox.message.received" | "mailbox.message.released" | "mailbox.message.sent";
|
|
264
|
-
readonly attempt: number;
|
|
265
|
-
readonly startedAt: string;
|
|
266
|
-
readonly durationMs: number;
|
|
267
|
-
readonly outcome: "budget_exhausted" | "failed" | "revoked" | "succeeded" | "timed_out";
|
|
268
|
-
readonly error: string | null;
|
|
269
|
-
}[];
|
|
270
|
-
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
76
|
+
}) => import("./internal/operation").OperationResult<"extensionInstallationsListRuns">;
|
|
271
77
|
export declare const getRun: (input: {
|
|
272
78
|
readonly id: string;
|
|
273
79
|
readonly runId: string;
|
|
274
|
-
}) => import("
|
|
275
|
-
readonly id: string;
|
|
276
|
-
readonly eventId: string;
|
|
277
|
-
readonly eventType: "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.discarded" | "mailbox.message.quarantined" | "mailbox.message.received" | "mailbox.message.released" | "mailbox.message.sent";
|
|
278
|
-
readonly attempt: number;
|
|
279
|
-
readonly startedAt: string;
|
|
280
|
-
readonly durationMs: number;
|
|
281
|
-
readonly outcome: "budget_exhausted" | "failed" | "revoked" | "succeeded" | "timed_out";
|
|
282
|
-
readonly error: string | null;
|
|
283
|
-
readonly logs: readonly string[];
|
|
284
|
-
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
80
|
+
}) => import("./internal/operation").OperationResult<"extensionInstallationsGetRun">;
|
|
@@ -3,22 +3,7 @@ export declare const list: ((input?: {
|
|
|
3
3
|
readonly cursor?: string | null | undefined;
|
|
4
4
|
readonly after?: string | null | undefined;
|
|
5
5
|
readonly before?: string | null | undefined;
|
|
6
|
-
} | undefined) => import("
|
|
7
|
-
readonly items: readonly {
|
|
8
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionId">;
|
|
9
|
-
readonly name: string;
|
|
10
|
-
readonly displayName: string;
|
|
11
|
-
readonly description: string | null;
|
|
12
|
-
readonly runtime: "hosted" | "webhook";
|
|
13
|
-
readonly latestVersion: {
|
|
14
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
|
|
15
|
-
readonly version: string;
|
|
16
|
-
};
|
|
17
|
-
readonly createdAt: string;
|
|
18
|
-
readonly updatedAt: string;
|
|
19
|
-
}[];
|
|
20
|
-
readonly nextCursor: string | null;
|
|
21
|
-
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>) & {
|
|
6
|
+
} | undefined) => import("./internal/operation").OperationResult<"extensionsList">) & {
|
|
22
7
|
readonly pages: (input?: {
|
|
23
8
|
readonly limit?: string | null | undefined;
|
|
24
9
|
readonly cursor?: string | null | undefined;
|
|
@@ -70,72 +55,15 @@ export declare const publish: (input: {
|
|
|
70
55
|
readonly permissions: readonly ("quarantine.read" | "read" | "send" | "update")[];
|
|
71
56
|
};
|
|
72
57
|
readonly bundle?: string | null | undefined;
|
|
73
|
-
}) => import("
|
|
74
|
-
readonly extension: {
|
|
75
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionId">;
|
|
76
|
-
readonly name: string;
|
|
77
|
-
readonly displayName: string;
|
|
78
|
-
readonly description: string | null;
|
|
79
|
-
readonly runtime: "hosted" | "webhook";
|
|
80
|
-
readonly latestVersion: {
|
|
81
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
|
|
82
|
-
readonly version: string;
|
|
83
|
-
};
|
|
84
|
-
readonly createdAt: string;
|
|
85
|
-
readonly updatedAt: string;
|
|
86
|
-
};
|
|
87
|
-
readonly version: {
|
|
88
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
|
|
89
|
-
readonly version: string;
|
|
90
|
-
readonly runtime: "hosted" | "webhook";
|
|
91
|
-
readonly bundle: {
|
|
92
|
-
readonly sha256: string;
|
|
93
|
-
readonly sizeBytes: number;
|
|
94
|
-
} | null;
|
|
95
|
-
readonly publishedAt: string;
|
|
96
|
-
readonly manifest: {
|
|
97
|
-
readonly name: string;
|
|
98
|
-
readonly displayName: string;
|
|
99
|
-
readonly description?: string | null;
|
|
100
|
-
readonly version: string;
|
|
101
|
-
readonly runtime: "hosted" | "webhook";
|
|
102
|
-
readonly events: readonly ("mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.discarded" | "mailbox.message.quarantined" | "mailbox.message.received" | "mailbox.message.released" | "mailbox.message.sent")[];
|
|
103
|
-
readonly permissions: readonly ("quarantine.read" | "read" | "send" | "update")[];
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
}, import("./errors").ConflictError | import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
58
|
+
}) => import("./internal/operation").OperationResult<"extensionsPublish">;
|
|
107
59
|
export declare const get: (input: {
|
|
108
60
|
readonly id: string;
|
|
109
|
-
}) => import("
|
|
110
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionId">;
|
|
111
|
-
readonly name: string;
|
|
112
|
-
readonly displayName: string;
|
|
113
|
-
readonly description: string | null;
|
|
114
|
-
readonly runtime: "hosted" | "webhook";
|
|
115
|
-
readonly latestVersion: {
|
|
116
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
|
|
117
|
-
readonly version: string;
|
|
118
|
-
};
|
|
119
|
-
readonly createdAt: string;
|
|
120
|
-
readonly updatedAt: string;
|
|
121
|
-
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
61
|
+
}) => import("./internal/operation").OperationResult<"extensionsGet">;
|
|
122
62
|
export declare const listVersions: ((input: {
|
|
123
63
|
readonly id: string;
|
|
124
64
|
readonly limit?: string | null | undefined;
|
|
125
65
|
readonly cursor?: string | null | undefined;
|
|
126
|
-
}) => import("
|
|
127
|
-
readonly items: readonly {
|
|
128
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
|
|
129
|
-
readonly version: string;
|
|
130
|
-
readonly runtime: "hosted" | "webhook";
|
|
131
|
-
readonly bundle: {
|
|
132
|
-
readonly sha256: string;
|
|
133
|
-
readonly sizeBytes: number;
|
|
134
|
-
} | null;
|
|
135
|
-
readonly publishedAt: string;
|
|
136
|
-
}[];
|
|
137
|
-
readonly nextCursor: string | null;
|
|
138
|
-
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>) & {
|
|
66
|
+
}) => import("./internal/operation").OperationResult<"extensionsListVersions">) & {
|
|
139
67
|
readonly pages: (input: {
|
|
140
68
|
readonly id: string;
|
|
141
69
|
readonly limit?: string | null | undefined;
|
|
@@ -171,22 +99,4 @@ export declare const listVersions: ((input: {
|
|
|
171
99
|
export declare const getVersion: (input: {
|
|
172
100
|
readonly id: string;
|
|
173
101
|
readonly versionId: string;
|
|
174
|
-
}) => import("
|
|
175
|
-
readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
|
|
176
|
-
readonly version: string;
|
|
177
|
-
readonly runtime: "hosted" | "webhook";
|
|
178
|
-
readonly bundle: {
|
|
179
|
-
readonly sha256: string;
|
|
180
|
-
readonly sizeBytes: number;
|
|
181
|
-
} | null;
|
|
182
|
-
readonly publishedAt: string;
|
|
183
|
-
readonly manifest: {
|
|
184
|
-
readonly name: string;
|
|
185
|
-
readonly displayName: string;
|
|
186
|
-
readonly description?: string | null;
|
|
187
|
-
readonly version: string;
|
|
188
|
-
readonly runtime: "hosted" | "webhook";
|
|
189
|
-
readonly events: readonly ("mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.discarded" | "mailbox.message.quarantined" | "mailbox.message.received" | "mailbox.message.released" | "mailbox.message.sent")[];
|
|
190
|
-
readonly permissions: readonly ("quarantine.read" | "read" | "send" | "update")[];
|
|
191
|
-
};
|
|
192
|
-
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
102
|
+
}) => import("./internal/operation").OperationResult<"extensionsGetVersion">;
|
|
@@ -6,7 +6,4 @@ export declare const send: (input: {
|
|
|
6
6
|
readonly operation?: string | null | undefined;
|
|
7
7
|
readonly resourceId?: string | null | undefined;
|
|
8
8
|
} | null | undefined;
|
|
9
|
-
}) => import("
|
|
10
|
-
readonly id: string & import("effect/Brand").Brand<"FeedbackId">;
|
|
11
|
-
readonly createdAt: string;
|
|
12
|
-
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
9
|
+
}) => import("./internal/operation").OperationResult<"feedbackSend">;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Context, Effect, Layer, Redacted } from "effect";
|
|
2
|
-
import { HttpApiClient, type HttpApiGroup } from "effect/http-api";
|
|
2
|
+
import { HttpApiClient, type HttpApiEndpoint, type HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import * as HttpClient from "effect/http/HttpClient";
|
|
4
4
|
import { MediaUploadError } from "../../inline-attachments";
|
|
5
5
|
import type { MailboxEventStreamConnection } from "../../mailbox-events";
|
|
@@ -24,6 +24,10 @@ type FlattenGroups<Client> = {
|
|
|
24
24
|
}[keyof Client];
|
|
25
25
|
export type FlatRaw = UnionToIntersection<FlattenGroups<Api>>;
|
|
26
26
|
export type Operation = keyof FlatRaw & string;
|
|
27
|
+
type ApiEndpoints = HttpApiGroup.Endpoints<(typeof SamvaApi)["groups"][keyof (typeof SamvaApi)["groups"]]>;
|
|
28
|
+
export type OperationSuccess<Name extends Operation> = HttpApiClient.SuccessType<HttpApiEndpoint.Success<Extract<ApiEndpoints, {
|
|
29
|
+
readonly identifier: Name;
|
|
30
|
+
}>>>;
|
|
27
31
|
export type RawCall = (request?: unknown) => Effect.Effect<unknown, unknown>;
|
|
28
32
|
export interface Interface {
|
|
29
33
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type Brand, Effect, Redacted, Stream } from "effect";
|
|
2
2
|
import type { HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import { SDK_OPERATION_CALLS } from "../../service-map";
|
|
4
|
-
import { type FlatRaw, type Operation, Service } from "./client";
|
|
4
|
+
import { type FlatRaw, type Operation, type OperationSuccess, Service } from "./client";
|
|
5
5
|
export type SdkOperation = keyof typeof SDK_OPERATION_CALLS & Operation;
|
|
6
|
-
|
|
6
|
+
type MethodReturn<Method> = Method extends (...args: infer _Args) => infer Return ? Return : never;
|
|
7
7
|
type Wire<Value> = Value extends string ? Value extends Brand.Brand<string> ? string : Value : Value extends Redacted.Redacted<infer Raw> ? Raw | Value : Value extends number | boolean | bigint | symbol | null | undefined ? Value : Value extends Date ? Value : Value extends ReadonlyArray<infer Item> ? ReadonlyArray<Wire<Item>> : Value extends object ? {
|
|
8
8
|
readonly [Key in keyof Value]: Wire<Value[Key]> | ({} extends Pick<Value, Key> ? undefined : never);
|
|
9
9
|
} : Value;
|
|
@@ -23,7 +23,7 @@ type IdempotencyKeyField<Request> = Request extends {
|
|
|
23
23
|
} ? {
|
|
24
24
|
readonly idempotencyKey: Wire<Key>;
|
|
25
25
|
} : unknown;
|
|
26
|
-
type OperationResult<Name extends SdkOperation> = Effect.Effect<
|
|
26
|
+
export type OperationResult<Name extends SdkOperation> = Effect.Effect<OperationSuccess<Name>, Effect.Error<MethodReturn<FlatRaw[Name]>>, Service>;
|
|
27
27
|
type DirectOperation<Name extends SdkOperation> = {} extends Input<Name> ? (input?: Input<Name>) => OperationResult<Name> : (input: Input<Name>) => OperationResult<Name>;
|
|
28
28
|
type OperationFunction<Name extends SdkOperation> = (typeof SDK_OPERATION_CALLS)[Name] extends {
|
|
29
29
|
readonly kind: "none";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
2
|
import { type MediaUploadError } from "../../inline-attachments";
|
|
3
3
|
import type { SendMessagePayload } from "../generated/scheduled-messages";
|
|
4
|
-
import {
|
|
5
|
-
import { type
|
|
4
|
+
import { Service } from "./client";
|
|
5
|
+
import { type OperationResult } from "./operation";
|
|
6
6
|
type MessagePayload = typeof SendMessagePayload.Encoded;
|
|
7
7
|
export type MessageRecipient = MessagePayload["to"][number];
|
|
8
8
|
type ContactObjectRecipient = {
|
|
@@ -31,7 +31,7 @@ export type EmailSendInput = Omit<EmailPayload, "channel" | "email" | "to" | "cc
|
|
|
31
31
|
readonly cc?: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient>;
|
|
32
32
|
readonly bcc?: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient>;
|
|
33
33
|
};
|
|
34
|
-
type SendResult =
|
|
34
|
+
type SendResult = OperationResult<"messagesSend">;
|
|
35
35
|
type UploadFailure = MediaUploadError | Effect.Error<SendResult>;
|
|
36
36
|
export declare const sendMessage: (input: MessageSendInput, options?: SendOptions | undefined) => Effect.Effect<{
|
|
37
37
|
readonly id: string & import("effect/Brand").Brand<"MessageId">;
|