samva 0.5.0 → 0.6.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 +3 -2
- package/README.md +12 -2
- package/dist/{categories-B9Nw2v_F.js → categories-4u9Az4No.js} +24 -8
- package/dist/client/sdk.gen.d.ts +406 -74
- package/dist/client/types.gen.d.ts +2583 -279
- package/dist/{client-B7gEkvEq.js → client-DCM6U0-I.js} +2183 -772
- package/dist/{client-attribution-B2yJBXdZ.js → client-attribution-DYUSAa76.js} +2 -2
- package/dist/effect/analytics.d.ts +66 -0
- package/dist/effect/analytics.js +21 -0
- package/dist/effect/api-keys.d.ts +198 -34
- package/dist/effect/api-keys.js +1 -1
- package/dist/effect/attachments.d.ts +53 -0
- package/dist/effect/attachments.js +17 -0
- package/dist/effect/campaigns.d.ts +36 -18
- package/dist/effect/campaigns.js +1 -1
- package/dist/effect/categories.d.ts +3 -3
- package/dist/effect/categories.js +1 -1
- package/dist/effect/client.js +1 -1
- package/dist/effect/contact-groups.d.ts +375 -0
- package/dist/effect/contact-groups.js +29 -0
- package/dist/effect/contacts.d.ts +35 -19
- package/dist/effect/contacts.js +1 -1
- package/dist/effect/conversations.d.ts +179 -47
- package/dist/effect/conversations.js +1 -1
- package/dist/effect/custom-fields.d.ts +111 -0
- package/dist/effect/custom-fields.js +17 -0
- package/dist/effect/design.d.ts +2 -2
- package/dist/effect/design.js +1 -1
- package/dist/effect/email.d.ts +254 -118
- package/dist/effect/email.js +2 -2
- package/dist/effect/generated-metadata.d.ts +12 -4
- package/dist/effect/generated.d.ts +11189 -6155
- package/dist/effect/index.d.ts +6 -1
- package/dist/effect/index.js +8 -3
- package/dist/effect/internal/operation.d.ts +115 -27
- package/dist/effect/media.d.ts +5 -5
- package/dist/effect/media.js +1 -1
- package/dist/effect/messages.d.ts +303 -73
- package/dist/effect/messages.js +1 -1
- package/dist/effect/operations.d.ts +6 -6
- package/dist/effect/operations.js +1 -1
- package/dist/effect/organizations.d.ts +7 -110
- package/dist/effect/organizations.js +2 -4
- package/dist/effect/retry.js +1 -1
- package/dist/effect/scheduled-messages.d.ts +7 -7
- package/dist/effect/scheduled-messages.js +1 -1
- package/dist/effect/templates.d.ts +35 -307
- package/dist/effect/templates.js +3 -5
- package/dist/effect/unsubscribe-groups.d.ts +161 -0
- package/dist/effect/unsubscribe-groups.js +25 -0
- package/dist/effect/webhooks.d.ts +18 -18
- package/dist/effect/webhooks.js +2 -2
- package/dist/index.js +2 -2
- package/dist/{normalize-BiIJnycv.js → normalize-B79uJIeb.js} +13 -14
- package/dist/normalize.d.ts +3 -7
- package/dist/{operation-B4FjN6wq.js → operation-02YX3hY9.js} +96 -8
- package/dist/promises/errors.gen.d.ts +30 -41
- package/dist/promises/index.d.ts +18 -4
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/{promises-CP_nxUus.js → promises-8MaPNAam.js} +1209 -288
- package/dist/service-map.d.ts +155 -8
- package/package.json +28 -8
package/dist/effect/templates.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { n as make } from "../operation-
|
|
3
|
-
import {
|
|
2
|
+
import { n as make } from "../operation-02YX3hY9.js";
|
|
3
|
+
import { C as UpdateTemplatePayload, s as CreateTemplatePayload } from "../client-DCM6U0-I.js";
|
|
4
4
|
//#region src/effect/templates.ts
|
|
5
5
|
var templates_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
CreatePayload: () => CreateTemplatePayload,
|
|
@@ -21,7 +21,6 @@ var templates_exports = /* @__PURE__ */ __exportAll({
|
|
|
21
21
|
getPublication: () => getPublication,
|
|
22
22
|
issueGitCredential: () => issueGitCredential,
|
|
23
23
|
list: () => list,
|
|
24
|
-
listDashboard: () => listDashboard,
|
|
25
24
|
listFamilies: () => listFamilies,
|
|
26
25
|
listInputContracts: () => listInputContracts,
|
|
27
26
|
openWorkspace: () => openWorkspace,
|
|
@@ -40,7 +39,6 @@ var templates_exports = /* @__PURE__ */ __exportAll({
|
|
|
40
39
|
});
|
|
41
40
|
const list = make("templatesList");
|
|
42
41
|
const create = make("templatesCreate");
|
|
43
|
-
const listDashboard = make("templatesListDashboard");
|
|
44
42
|
const listFamilies = make("templatesListFamilies");
|
|
45
43
|
const createFamily = make("templatesCreateFamily");
|
|
46
44
|
const getFamily = make("templatesGetFamily");
|
|
@@ -71,6 +69,6 @@ const getInputContract = make("templatesGetInputContract");
|
|
|
71
69
|
const diffWorkspace = make("templatesDiffWorkspace");
|
|
72
70
|
const workspaceHistory = make("templatesWorkspaceHistory");
|
|
73
71
|
//#endregion
|
|
74
|
-
export { CreateTemplatePayload as CreatePayload, UpdateTemplatePayload as UpdatePayload, attachFamilyMember, attachWorkspaceResource, checkWorkspace, create, createFamily, createFamilyFromTemplate, deleteFamily, detachFamilyMember, diffWorkspace, getById, getFamily, getGitRepository, getInputContract, getPublication, issueGitCredential, list,
|
|
72
|
+
export { CreateTemplatePayload as CreatePayload, UpdateTemplatePayload as UpdatePayload, attachFamilyMember, attachWorkspaceResource, checkWorkspace, create, createFamily, createFamilyFromTemplate, deleteFamily, detachFamilyMember, diffWorkspace, getById, getFamily, getGitRepository, getInputContract, getPublication, issueGitCredential, list, listFamilies, listInputContracts, openWorkspace, patchWorkspace, publish, reconcileWorkspace, remove, removeWorkspaceResource, renameFamily, renderWorkspaceFixture, resolveWorkspaceConflict, restoreWorkspace, saveWorkspace, templates_exports as t, update, workspaceHistory };
|
|
75
73
|
|
|
76
74
|
//# sourceMappingURL=templates.js.map
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
export declare const list: ((input?: {
|
|
2
|
+
readonly page?: string | null | undefined;
|
|
3
|
+
readonly limit?: string | null | undefined;
|
|
4
|
+
} | undefined) => import("effect/Effect").Effect<{
|
|
5
|
+
readonly items: readonly {
|
|
6
|
+
readonly id: string & import("effect/Brand").Brand<"UnsubscribeId">;
|
|
7
|
+
readonly organizationId: string;
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly description: string | null;
|
|
10
|
+
readonly memberCount: number;
|
|
11
|
+
readonly createdAt: string;
|
|
12
|
+
readonly updatedAt: string;
|
|
13
|
+
}[];
|
|
14
|
+
readonly pagination: {
|
|
15
|
+
readonly page: number;
|
|
16
|
+
readonly limit: number;
|
|
17
|
+
readonly total: number;
|
|
18
|
+
readonly totalPages: number;
|
|
19
|
+
};
|
|
20
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>) & {
|
|
21
|
+
readonly pages: (input?: {
|
|
22
|
+
readonly page?: string | null | undefined;
|
|
23
|
+
readonly limit?: string | null | undefined;
|
|
24
|
+
} | undefined) => import("effect/Stream").Stream<{
|
|
25
|
+
readonly items: readonly {
|
|
26
|
+
readonly id: string & import("effect/Brand").Brand<"UnsubscribeId">;
|
|
27
|
+
readonly organizationId: string;
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly description: string | null;
|
|
30
|
+
readonly memberCount: number;
|
|
31
|
+
readonly createdAt: string;
|
|
32
|
+
readonly updatedAt: string;
|
|
33
|
+
}[];
|
|
34
|
+
readonly pagination: {
|
|
35
|
+
readonly page: number;
|
|
36
|
+
readonly limit: number;
|
|
37
|
+
readonly total: number;
|
|
38
|
+
readonly totalPages: number;
|
|
39
|
+
};
|
|
40
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
41
|
+
readonly items: (input?: {
|
|
42
|
+
readonly page?: string | null | undefined;
|
|
43
|
+
readonly limit?: string | null | undefined;
|
|
44
|
+
} | undefined) => import("effect/Stream").Stream<{
|
|
45
|
+
readonly id: string & import("effect/Brand").Brand<"UnsubscribeId">;
|
|
46
|
+
readonly organizationId: string;
|
|
47
|
+
readonly name: string;
|
|
48
|
+
readonly description: string | null;
|
|
49
|
+
readonly memberCount: number;
|
|
50
|
+
readonly createdAt: string;
|
|
51
|
+
readonly updatedAt: string;
|
|
52
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
53
|
+
};
|
|
54
|
+
export declare const create: (input: {
|
|
55
|
+
readonly name: string;
|
|
56
|
+
readonly description?: string | null | undefined;
|
|
57
|
+
}) => import("effect/Effect").Effect<{
|
|
58
|
+
readonly id: string & import("effect/Brand").Brand<"UnsubscribeId">;
|
|
59
|
+
readonly organizationId: string;
|
|
60
|
+
readonly name: string;
|
|
61
|
+
readonly description: string | null;
|
|
62
|
+
readonly memberCount: number;
|
|
63
|
+
readonly createdAt: string;
|
|
64
|
+
readonly updatedAt: string;
|
|
65
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
66
|
+
export declare const update: (input: {
|
|
67
|
+
readonly id: string;
|
|
68
|
+
readonly name?: string | null | undefined;
|
|
69
|
+
readonly description?: string | null | undefined;
|
|
70
|
+
}) => import("effect/Effect").Effect<{
|
|
71
|
+
readonly id: string & import("effect/Brand").Brand<"UnsubscribeId">;
|
|
72
|
+
readonly organizationId: string;
|
|
73
|
+
readonly name: string;
|
|
74
|
+
readonly description: string | null;
|
|
75
|
+
readonly memberCount: number;
|
|
76
|
+
readonly createdAt: string;
|
|
77
|
+
readonly updatedAt: string;
|
|
78
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
79
|
+
export declare const remove: (input: {
|
|
80
|
+
readonly id: string;
|
|
81
|
+
}) => import("effect/Effect").Effect<{
|
|
82
|
+
readonly success: boolean;
|
|
83
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
84
|
+
export declare const listMembers: ((input: {
|
|
85
|
+
readonly groupId: string;
|
|
86
|
+
readonly page?: string | null | undefined;
|
|
87
|
+
readonly limit?: string | null | undefined;
|
|
88
|
+
}) => import("effect/Effect").Effect<{
|
|
89
|
+
readonly items: readonly {
|
|
90
|
+
readonly id: string;
|
|
91
|
+
readonly email: string;
|
|
92
|
+
readonly contactId: string | null;
|
|
93
|
+
readonly source: "api" | "complaint" | "link" | "manual";
|
|
94
|
+
readonly unsubscribedAt: string;
|
|
95
|
+
readonly createdAt: string;
|
|
96
|
+
}[];
|
|
97
|
+
readonly pagination: {
|
|
98
|
+
readonly page: number;
|
|
99
|
+
readonly limit: number;
|
|
100
|
+
readonly total: number;
|
|
101
|
+
readonly totalPages: number;
|
|
102
|
+
};
|
|
103
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>) & {
|
|
104
|
+
readonly pages: (input: {
|
|
105
|
+
readonly groupId: string;
|
|
106
|
+
readonly page?: string | null | undefined;
|
|
107
|
+
readonly limit?: string | null | undefined;
|
|
108
|
+
}) => import("effect/Stream").Stream<{
|
|
109
|
+
readonly items: readonly {
|
|
110
|
+
readonly id: string;
|
|
111
|
+
readonly email: string;
|
|
112
|
+
readonly contactId: string | null;
|
|
113
|
+
readonly source: "api" | "complaint" | "link" | "manual";
|
|
114
|
+
readonly unsubscribedAt: string;
|
|
115
|
+
readonly createdAt: string;
|
|
116
|
+
}[];
|
|
117
|
+
readonly pagination: {
|
|
118
|
+
readonly page: number;
|
|
119
|
+
readonly limit: number;
|
|
120
|
+
readonly total: number;
|
|
121
|
+
readonly totalPages: number;
|
|
122
|
+
};
|
|
123
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
124
|
+
readonly items: (input: {
|
|
125
|
+
readonly groupId: string;
|
|
126
|
+
readonly page?: string | null | undefined;
|
|
127
|
+
readonly limit?: string | null | undefined;
|
|
128
|
+
}) => import("effect/Stream").Stream<{
|
|
129
|
+
readonly id: string;
|
|
130
|
+
readonly email: string;
|
|
131
|
+
readonly contactId: string | null;
|
|
132
|
+
readonly source: "api" | "complaint" | "link" | "manual";
|
|
133
|
+
readonly unsubscribedAt: string;
|
|
134
|
+
readonly createdAt: string;
|
|
135
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
136
|
+
};
|
|
137
|
+
export declare const addEmails: (input: {
|
|
138
|
+
readonly groupId: string;
|
|
139
|
+
readonly emails: readonly string[];
|
|
140
|
+
readonly source?: string | null | undefined;
|
|
141
|
+
}) => import("effect/Effect").Effect<{
|
|
142
|
+
readonly added: number;
|
|
143
|
+
readonly skipped: number;
|
|
144
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
145
|
+
export declare const removeEmails: (input: {
|
|
146
|
+
readonly groupId: string;
|
|
147
|
+
readonly emails: readonly string[];
|
|
148
|
+
}) => import("effect/Effect").Effect<{
|
|
149
|
+
readonly removed: number;
|
|
150
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
151
|
+
export declare const checkSubscription: (input: {
|
|
152
|
+
readonly email: string;
|
|
153
|
+
readonly groupIds?: string | null | undefined;
|
|
154
|
+
}) => import("effect/Effect").Effect<{
|
|
155
|
+
readonly email: string;
|
|
156
|
+
readonly unsubscribedGroups: readonly {
|
|
157
|
+
readonly groupId: string;
|
|
158
|
+
readonly groupName: string;
|
|
159
|
+
readonly unsubscribedAt: string;
|
|
160
|
+
}[];
|
|
161
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { n as make } from "../operation-02YX3hY9.js";
|
|
3
|
+
//#region src/effect/unsubscribe-groups.ts
|
|
4
|
+
var unsubscribe_groups_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
addEmails: () => addEmails,
|
|
6
|
+
checkSubscription: () => checkSubscription,
|
|
7
|
+
create: () => create,
|
|
8
|
+
list: () => list,
|
|
9
|
+
listMembers: () => listMembers,
|
|
10
|
+
remove: () => remove,
|
|
11
|
+
removeEmails: () => removeEmails,
|
|
12
|
+
update: () => update
|
|
13
|
+
});
|
|
14
|
+
const list = make("unsubscribeList");
|
|
15
|
+
const create = make("unsubscribeCreate");
|
|
16
|
+
const update = make("unsubscribeUpdate");
|
|
17
|
+
const remove = make("unsubscribeRemove");
|
|
18
|
+
const listMembers = make("unsubscribeListMembers");
|
|
19
|
+
const addEmails = make("unsubscribeAddEmails");
|
|
20
|
+
const removeEmails = make("unsubscribeRemoveEmails");
|
|
21
|
+
const checkSubscription = make("unsubscribeCheckSubscription");
|
|
22
|
+
//#endregion
|
|
23
|
+
export { addEmails, checkSubscription, create, list, listMembers, remove, removeEmails, unsubscribe_groups_exports as t, update };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=unsubscribe-groups.js.map
|
|
@@ -9,7 +9,7 @@ export declare const list: ((input?: {
|
|
|
9
9
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
10
10
|
readonly name: string;
|
|
11
11
|
readonly url: string;
|
|
12
|
-
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.
|
|
12
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "message.bounced" | "message.complained" | "message.delivered" | "message.failed" | "message.read" | "message.received" | "message.sent" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated")[];
|
|
13
13
|
readonly channels: readonly "email"[] | null;
|
|
14
14
|
readonly status: "active" | "disabled";
|
|
15
15
|
readonly hasCustomHeaders: boolean;
|
|
@@ -31,7 +31,7 @@ export declare const list: ((input?: {
|
|
|
31
31
|
readonly total: number;
|
|
32
32
|
readonly totalPages: number;
|
|
33
33
|
};
|
|
34
|
-
}, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>) & {
|
|
34
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>) & {
|
|
35
35
|
readonly pages: (input?: {
|
|
36
36
|
readonly page?: string | null | undefined;
|
|
37
37
|
readonly limit?: string | null | undefined;
|
|
@@ -42,7 +42,7 @@ export declare const list: ((input?: {
|
|
|
42
42
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
43
43
|
readonly name: string;
|
|
44
44
|
readonly url: string;
|
|
45
|
-
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.
|
|
45
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "message.bounced" | "message.complained" | "message.delivered" | "message.failed" | "message.read" | "message.received" | "message.sent" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated")[];
|
|
46
46
|
readonly channels: readonly "email"[] | null;
|
|
47
47
|
readonly status: "active" | "disabled";
|
|
48
48
|
readonly hasCustomHeaders: boolean;
|
|
@@ -64,7 +64,7 @@ export declare const list: ((input?: {
|
|
|
64
64
|
readonly total: number;
|
|
65
65
|
readonly totalPages: number;
|
|
66
66
|
};
|
|
67
|
-
}, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
67
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
68
68
|
readonly items: (input?: {
|
|
69
69
|
readonly page?: string | null | undefined;
|
|
70
70
|
readonly limit?: string | null | undefined;
|
|
@@ -74,7 +74,7 @@ export declare const list: ((input?: {
|
|
|
74
74
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
75
75
|
readonly name: string;
|
|
76
76
|
readonly url: string;
|
|
77
|
-
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.
|
|
77
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "message.bounced" | "message.complained" | "message.delivered" | "message.failed" | "message.read" | "message.received" | "message.sent" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated")[];
|
|
78
78
|
readonly channels: readonly "email"[] | null;
|
|
79
79
|
readonly status: "active" | "disabled";
|
|
80
80
|
readonly hasCustomHeaders: boolean;
|
|
@@ -89,7 +89,7 @@ export declare const list: ((input?: {
|
|
|
89
89
|
readonly exhausted: number;
|
|
90
90
|
readonly cancelled: number;
|
|
91
91
|
};
|
|
92
|
-
}, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
92
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
93
93
|
};
|
|
94
94
|
export declare const create: (input: {
|
|
95
95
|
readonly name: string;
|
|
@@ -105,7 +105,7 @@ export declare const create: (input: {
|
|
|
105
105
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
106
106
|
readonly name: string;
|
|
107
107
|
readonly url: string;
|
|
108
|
-
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.
|
|
108
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "message.bounced" | "message.complained" | "message.delivered" | "message.failed" | "message.read" | "message.received" | "message.sent" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated")[];
|
|
109
109
|
readonly channels: readonly "email"[] | null;
|
|
110
110
|
readonly status: "active" | "disabled";
|
|
111
111
|
readonly hasCustomHeaders: boolean;
|
|
@@ -115,14 +115,14 @@ export declare const create: (input: {
|
|
|
115
115
|
readonly updatedAt: string;
|
|
116
116
|
};
|
|
117
117
|
readonly secret: import("effect/Redacted").Redacted<string>;
|
|
118
|
-
}, import("./generated").BillingProviderError | import("./generated").ConflictError | import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").PaymentRequiredError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
|
|
118
|
+
}, import("./generated").BillingProviderError | import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").PaymentRequiredError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
|
|
119
119
|
export declare const get: (input: {
|
|
120
120
|
readonly id: string;
|
|
121
121
|
}) => import("effect/Effect").Effect<{
|
|
122
122
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
123
123
|
readonly name: string;
|
|
124
124
|
readonly url: string;
|
|
125
|
-
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.
|
|
125
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "message.bounced" | "message.complained" | "message.delivered" | "message.failed" | "message.read" | "message.received" | "message.sent" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated")[];
|
|
126
126
|
readonly channels: readonly "email"[] | null;
|
|
127
127
|
readonly status: "active" | "disabled";
|
|
128
128
|
readonly hasCustomHeaders: boolean;
|
|
@@ -130,12 +130,12 @@ export declare const get: (input: {
|
|
|
130
130
|
readonly lastSucceededAt: string | null;
|
|
131
131
|
readonly createdAt: string;
|
|
132
132
|
readonly updatedAt: string;
|
|
133
|
-
}, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
133
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
134
134
|
export declare const remove: (input: {
|
|
135
135
|
readonly id: string;
|
|
136
136
|
}) => import("effect/Effect").Effect<{
|
|
137
137
|
readonly success: boolean;
|
|
138
|
-
}, import("./generated").BillingProviderError | import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
138
|
+
}, import("./generated").BillingProviderError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
139
139
|
export declare const update: (input: {
|
|
140
140
|
readonly id: string;
|
|
141
141
|
readonly name?: string | null | undefined;
|
|
@@ -150,7 +150,7 @@ export declare const update: (input: {
|
|
|
150
150
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
151
151
|
readonly name: string;
|
|
152
152
|
readonly url: string;
|
|
153
|
-
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.
|
|
153
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "message.bounced" | "message.complained" | "message.delivered" | "message.failed" | "message.read" | "message.received" | "message.sent" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated")[];
|
|
154
154
|
readonly channels: readonly "email"[] | null;
|
|
155
155
|
readonly status: "active" | "disabled";
|
|
156
156
|
readonly hasCustomHeaders: boolean;
|
|
@@ -158,7 +158,7 @@ export declare const update: (input: {
|
|
|
158
158
|
readonly lastSucceededAt: string | null;
|
|
159
159
|
readonly createdAt: string;
|
|
160
160
|
readonly updatedAt: string;
|
|
161
|
-
}, import("./generated").ConflictError | import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
|
|
161
|
+
}, import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
|
|
162
162
|
export declare const test: (input: {
|
|
163
163
|
readonly id: string;
|
|
164
164
|
readonly data?: {
|
|
@@ -192,7 +192,7 @@ export declare const test: (input: {
|
|
|
192
192
|
readonly accepted: true;
|
|
193
193
|
readonly eventId: string & import("effect/Brand").Brand<"WebhookEventId">;
|
|
194
194
|
readonly deliveryId: string & import("effect/Brand").Brand<"WebhookDeliveryId">;
|
|
195
|
-
}, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
195
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
196
196
|
export declare const getLogs: (input: {
|
|
197
197
|
readonly webhookId: string;
|
|
198
198
|
readonly limit?: string | null | undefined;
|
|
@@ -227,7 +227,7 @@ export declare const getLogs: (input: {
|
|
|
227
227
|
}[];
|
|
228
228
|
}[];
|
|
229
229
|
readonly hasMore: boolean;
|
|
230
|
-
}, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
230
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
231
231
|
export declare const getStats: (input: {
|
|
232
232
|
readonly webhookId: string;
|
|
233
233
|
readonly period?: string | null | undefined;
|
|
@@ -244,7 +244,7 @@ export declare const getStats: (input: {
|
|
|
244
244
|
readonly exhausted: number;
|
|
245
245
|
readonly cancelled: number;
|
|
246
246
|
}[];
|
|
247
|
-
}, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
247
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
248
248
|
export declare const retryDelivery: (input: {
|
|
249
249
|
readonly webhookId: string;
|
|
250
250
|
readonly deliveryId: string;
|
|
@@ -253,9 +253,9 @@ export declare const retryDelivery: (input: {
|
|
|
253
253
|
readonly deliveryId: string & import("effect/Brand").Brand<"WebhookDeliveryId">;
|
|
254
254
|
readonly attemptId: string & import("effect/Brand").Brand<"WebhookAttemptId">;
|
|
255
255
|
readonly outcome: "failed" | "succeeded";
|
|
256
|
-
}, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
|
|
256
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
|
|
257
257
|
export declare const regenerateSecret: (input: {
|
|
258
258
|
readonly webhookId: string;
|
|
259
259
|
}) => import("effect/Effect").Effect<{
|
|
260
260
|
readonly secret: import("effect/Redacted").Redacted<string>;
|
|
261
|
-
}, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
|
|
261
|
+
}, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
|
package/dist/effect/webhooks.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { n as make } from "../operation-
|
|
3
|
-
import {
|
|
2
|
+
import { n as make } from "../operation-02YX3hY9.js";
|
|
3
|
+
import { b as TestWebhookPayload, c as CreateWebhookPayload, w as UpdateWebhookPayload } from "../client-DCM6U0-I.js";
|
|
4
4
|
//#region src/effect/webhooks.ts
|
|
5
5
|
var webhooks_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
CreatePayload: () => CreateWebhookPayload,
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
export { BillingProviderError, ConflictError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, InternalError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, UnauthorizedError, ValidationError,
|
|
1
|
+
import { _ as SamvaTransportError, a as DeliveryUnavailableError, b as fromApiError, c as FlagDisabledError, d as InternalError, f as OnboardingReviewRequiredError, g as SamvaApiError, h as ResourceNotFoundError, i as ConflictError, l as ForbiddenError, m as RateLimitedError, n as AnalyticsQueryError, o as EmailChannelError, p as PaymentRequiredError, r as BillingProviderError, s as ExternalServiceError, t as createClient, u as GatewayTimeoutError, v as UnauthorizedError, y as ValidationError } from "./promises-8MaPNAam.js";
|
|
2
|
+
export { AnalyticsQueryError, BillingProviderError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, UnauthorizedError, ValidationError, createClient, fromApiError };
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
function toRecipientArray(recipient) {
|
|
3
3
|
return Array.isArray(recipient) ? recipient : [recipient];
|
|
4
4
|
}
|
|
5
|
-
function normalizeMessageRecipient(recipient
|
|
5
|
+
function normalizeMessageRecipient(recipient) {
|
|
6
6
|
if (typeof recipient === "string") return { email: recipient };
|
|
7
7
|
if ("contactId" in recipient || "email" in recipient || "phone" in recipient) return recipient;
|
|
8
8
|
return { contactId: recipient.id };
|
|
9
9
|
}
|
|
10
|
-
function normalizeRecipients(recipient
|
|
11
|
-
return toRecipientArray(recipient).map((item) => normalizeMessageRecipient(item
|
|
10
|
+
function normalizeRecipients(recipient) {
|
|
11
|
+
return toRecipientArray(recipient).map((item) => normalizeMessageRecipient(item));
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* cc / bcc payload fragment. `undefined` → omitted (JSON drops it anyway),
|
|
15
15
|
* `null` → passed through (explicit "no recipients"), otherwise normalized.
|
|
16
16
|
* This is the single canonical rule for both clients.
|
|
17
17
|
*/
|
|
18
|
-
function ccBccPayload(key, value
|
|
18
|
+
function ccBccPayload(key, value) {
|
|
19
19
|
if (value === void 0) return {};
|
|
20
20
|
if (value === null) return { [key]: null };
|
|
21
|
-
return { [key]: normalizeRecipients(value
|
|
21
|
+
return { [key]: normalizeRecipients(value) };
|
|
22
22
|
}
|
|
23
23
|
function normalizeReplyTo(replyTo) {
|
|
24
24
|
if (replyTo === void 0 || replyTo === null) return replyTo;
|
|
@@ -45,29 +45,28 @@ function normalizeEmailContent(input) {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
function buildEmailSendPayload(input) {
|
|
48
|
-
const { to, cc, bcc, conversationId,
|
|
48
|
+
const { to, cc, bcc, conversationId, metadata, from, ...emailContent } = input;
|
|
49
49
|
return {
|
|
50
50
|
channel: "email",
|
|
51
51
|
conversationId,
|
|
52
|
-
idempotencyKey,
|
|
53
52
|
metadata,
|
|
54
53
|
from,
|
|
55
|
-
to: normalizeRecipients(to
|
|
56
|
-
...ccBccPayload("cc", cc
|
|
57
|
-
...ccBccPayload("bcc", bcc
|
|
54
|
+
to: normalizeRecipients(to),
|
|
55
|
+
...ccBccPayload("cc", cc),
|
|
56
|
+
...ccBccPayload("bcc", bcc),
|
|
58
57
|
email: normalizeEmailContent(emailContent)
|
|
59
58
|
};
|
|
60
59
|
}
|
|
61
60
|
function buildMessagesSendPayload(input) {
|
|
62
61
|
return {
|
|
63
62
|
...input,
|
|
64
|
-
to: normalizeRecipients(input.to
|
|
65
|
-
...ccBccPayload("cc", input.cc
|
|
66
|
-
...ccBccPayload("bcc", input.bcc
|
|
63
|
+
to: normalizeRecipients(input.to),
|
|
64
|
+
...ccBccPayload("cc", input.cc),
|
|
65
|
+
...ccBccPayload("bcc", input.bcc),
|
|
67
66
|
email: normalizeEmailContent(input.email ?? {})
|
|
68
67
|
};
|
|
69
68
|
}
|
|
70
69
|
//#endregion
|
|
71
70
|
export { buildMessagesSendPayload as n, replyToEmailsPayload as r, buildEmailSendPayload as t };
|
|
72
71
|
|
|
73
|
-
//# sourceMappingURL=normalize-
|
|
72
|
+
//# sourceMappingURL=normalize-B79uJIeb.js.map
|
package/dist/normalize.d.ts
CHANGED
|
@@ -2,16 +2,13 @@
|
|
|
2
2
|
* Shared, pure send-input normalization for the Effect and Promise clients.
|
|
3
3
|
*
|
|
4
4
|
* No Effect, no I/O — plain functions. Both ergonomic layers import these
|
|
5
|
-
* directly so recipient, replyTo, email-content
|
|
6
|
-
*
|
|
7
|
-
* this extraction lived only in the Effect copy; the `from`-placement drift only
|
|
8
|
-
* in the email helpers.) The wire-level parity tests are the proof.
|
|
5
|
+
* directly so recipient, replyTo, and email-content shaping cannot drift
|
|
6
|
+
* between the two clients. The wire-level parity tests are the proof.
|
|
9
7
|
*
|
|
10
8
|
* The generated payload types differ nominally between the two clients (they come
|
|
11
9
|
* from two different codegen outputs) but are structurally identical, so these
|
|
12
10
|
* builders return structural shapes and each client casts the assembled payload
|
|
13
|
-
* to its own generated body type at the call site
|
|
14
|
-
* already performed inline.
|
|
11
|
+
* to its own generated body type at the call site.
|
|
15
12
|
*/
|
|
16
13
|
/** A recipient the caller may pass in ergonomic form. */
|
|
17
14
|
type ErgonomicRecipient<Recipient> = Recipient | {
|
|
@@ -34,7 +31,6 @@ export interface EmailSendFields<Recipient> {
|
|
|
34
31
|
readonly cc?: ErgonomicRecipient<Recipient> | ReadonlyArray<ErgonomicRecipient<Recipient>> | null | undefined;
|
|
35
32
|
readonly bcc?: ErgonomicRecipient<Recipient> | ReadonlyArray<ErgonomicRecipient<Recipient>> | null | undefined;
|
|
36
33
|
readonly conversationId?: string | null | undefined;
|
|
37
|
-
readonly idempotencyKey?: string | null | undefined;
|
|
38
34
|
readonly metadata?: Metadata;
|
|
39
35
|
readonly from?: unknown;
|
|
40
36
|
readonly replyTo?: ErgonomicReplyTo | null | undefined;
|