samva 0.3.0 → 0.5.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 +1 -1
- package/README.md +5 -1
- package/dist/{categories-CsUa8ojo.js → categories-B9Nw2v_F.js} +5 -1
- package/dist/client/sdk.gen.d.ts +312 -190
- package/dist/client/types.gen.d.ts +2284 -728
- package/dist/{client-BOghX8fr.js → client-B7gEkvEq.js} +2740 -1036
- package/dist/client-attribution-B2yJBXdZ.js +9 -0
- package/dist/client-attribution.d.ts +2 -0
- package/dist/effect/api-keys.d.ts +51 -51
- package/dist/effect/api-keys.js +1 -1
- package/dist/effect/campaigns.d.ts +269 -219
- package/dist/effect/campaigns.js +1 -1
- package/dist/effect/categories.d.ts +6 -6
- package/dist/effect/categories.js +1 -1
- package/dist/effect/client.js +1 -1
- package/dist/effect/contacts.d.ts +225 -225
- package/dist/effect/contacts.js +1 -1
- package/dist/effect/conversations.d.ts +308 -293
- package/dist/effect/conversations.js +1 -1
- package/dist/effect/design.d.ts +76 -76
- package/dist/effect/design.js +1 -1
- package/dist/effect/email.d.ts +923 -213
- package/dist/effect/email.js +27 -3
- package/dist/effect/generated-metadata.d.ts +4 -0
- package/dist/effect/generated.d.ts +14948 -10919
- package/dist/effect/index.js +2 -2
- package/dist/effect/internal/client.d.ts +1 -1
- package/dist/effect/internal/operation.d.ts +31 -20
- package/dist/effect/media.d.ts +12 -12
- package/dist/effect/media.js +1 -1
- package/dist/effect/messages.d.ts +243 -61
- package/dist/effect/messages.js +5 -3
- package/dist/effect/operations.d.ts +17 -17
- package/dist/effect/operations.js +1 -1
- package/dist/effect/organizations.d.ts +162 -162
- package/dist/effect/organizations.js +1 -1
- package/dist/effect/retry.js +1 -1
- package/dist/effect/runtime.d.ts +0 -2
- package/dist/effect/scheduled-messages.d.ts +375 -277
- package/dist/effect/scheduled-messages.js +5 -3
- package/dist/effect/templates.d.ts +1383 -1554
- package/dist/effect/templates.js +40 -30
- package/dist/effect/webhooks.d.ts +81 -47
- package/dist/effect/webhooks.js +2 -2
- package/dist/index.js +2 -2
- package/dist/{normalize-BKFjbR9t.js → normalize-BiIJnycv.js} +2 -3
- package/dist/{operation-C2Q4cFJL.js → operation-B4FjN6wq.js} +113 -38
- package/dist/promises/errors.gen.d.ts +21 -2
- package/dist/promises/index.d.ts +11 -8
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/{promises-oiy7mOyu.js → promises-CP_nxUus.js} +828 -306
- package/dist/service-map.d.ts +136 -44
- package/package.json +13 -14
package/dist/effect/templates.js
CHANGED
|
@@ -1,37 +1,42 @@
|
|
|
1
1
|
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { n as make } from "../operation-
|
|
3
|
-
import { s as CreateTemplatePayload, x as UpdateTemplatePayload } from "../client-
|
|
2
|
+
import { n as make } from "../operation-B4FjN6wq.js";
|
|
3
|
+
import { s as CreateTemplatePayload, x as UpdateTemplatePayload } from "../client-B7gEkvEq.js";
|
|
4
4
|
//#region src/effect/templates.ts
|
|
5
5
|
var templates_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
CreatePayload: () => CreateTemplatePayload,
|
|
7
7
|
UpdatePayload: () => UpdateTemplatePayload,
|
|
8
|
-
addFamilyChannel: () => addFamilyChannel,
|
|
9
|
-
approve: () => approve,
|
|
10
8
|
attachFamilyMember: () => attachFamilyMember,
|
|
11
|
-
|
|
9
|
+
attachWorkspaceResource: () => attachWorkspaceResource,
|
|
10
|
+
checkWorkspace: () => checkWorkspace,
|
|
12
11
|
create: () => create,
|
|
13
12
|
createFamily: () => createFamily,
|
|
14
13
|
createFamilyFromTemplate: () => createFamilyFromTemplate,
|
|
15
14
|
deleteFamily: () => deleteFamily,
|
|
16
15
|
detachFamilyMember: () => detachFamilyMember,
|
|
16
|
+
diffWorkspace: () => diffWorkspace,
|
|
17
17
|
getById: () => getById,
|
|
18
|
-
getDocument: () => getDocument,
|
|
19
18
|
getFamily: () => getFamily,
|
|
19
|
+
getGitRepository: () => getGitRepository,
|
|
20
|
+
getInputContract: () => getInputContract,
|
|
21
|
+
getPublication: () => getPublication,
|
|
22
|
+
issueGitCredential: () => issueGitCredential,
|
|
20
23
|
list: () => list,
|
|
21
24
|
listDashboard: () => listDashboard,
|
|
22
|
-
listDocumentVersions: () => listDocumentVersions,
|
|
23
25
|
listFamilies: () => listFamilies,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
listInputContracts: () => listInputContracts,
|
|
27
|
+
openWorkspace: () => openWorkspace,
|
|
28
|
+
patchWorkspace: () => patchWorkspace,
|
|
29
|
+
publish: () => publish,
|
|
30
|
+
reconcileWorkspace: () => reconcileWorkspace,
|
|
26
31
|
remove: () => remove,
|
|
32
|
+
removeWorkspaceResource: () => removeWorkspaceResource,
|
|
27
33
|
renameFamily: () => renameFamily,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
update: () => update
|
|
34
|
+
renderWorkspaceFixture: () => renderWorkspaceFixture,
|
|
35
|
+
resolveWorkspaceConflict: () => resolveWorkspaceConflict,
|
|
36
|
+
restoreWorkspace: () => restoreWorkspace,
|
|
37
|
+
saveWorkspace: () => saveWorkspace,
|
|
38
|
+
update: () => update,
|
|
39
|
+
workspaceHistory: () => workspaceHistory
|
|
35
40
|
});
|
|
36
41
|
const list = make("templatesList");
|
|
37
42
|
const create = make("templatesCreate");
|
|
@@ -44,23 +49,28 @@ const renameFamily = make("templatesRenameFamily");
|
|
|
44
49
|
const createFamilyFromTemplate = make("templatesCreateFamilyFromTemplate");
|
|
45
50
|
const attachFamilyMember = make("templatesAttachFamilyMember");
|
|
46
51
|
const detachFamilyMember = make("templatesDetachFamilyMember");
|
|
47
|
-
const addFamilyChannel = make("templatesAddFamilyChannel");
|
|
48
52
|
const getById = make("templatesGetById");
|
|
49
53
|
const remove = make("templatesRemove");
|
|
50
54
|
const update = make("templatesUpdate");
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
const
|
|
55
|
+
const openWorkspace = make("templatesOpenWorkspace");
|
|
56
|
+
const getGitRepository = make("templatesGetGitRepository");
|
|
57
|
+
const issueGitCredential = make("templatesIssueGitCredential");
|
|
58
|
+
const patchWorkspace = make("templatesPatchWorkspace");
|
|
59
|
+
const resolveWorkspaceConflict = make("templatesResolveWorkspaceConflict");
|
|
60
|
+
const attachWorkspaceResource = make("templatesAttachWorkspaceResource");
|
|
61
|
+
const removeWorkspaceResource = make("templatesRemoveWorkspaceResource");
|
|
62
|
+
const reconcileWorkspace = make("templatesReconcileWorkspace");
|
|
63
|
+
const restoreWorkspace = make("templatesRestoreWorkspace");
|
|
64
|
+
const saveWorkspace = make("templatesSaveWorkspace");
|
|
65
|
+
const checkWorkspace = make("templatesCheckWorkspace");
|
|
66
|
+
const renderWorkspaceFixture = make("templatesRenderWorkspaceFixture");
|
|
67
|
+
const publish = make("templatesPublish");
|
|
68
|
+
const getPublication = make("templatesGetPublication");
|
|
69
|
+
const listInputContracts = make("templatesListInputContracts");
|
|
70
|
+
const getInputContract = make("templatesGetInputContract");
|
|
71
|
+
const diffWorkspace = make("templatesDiffWorkspace");
|
|
72
|
+
const workspaceHistory = make("templatesWorkspaceHistory");
|
|
63
73
|
//#endregion
|
|
64
|
-
export { CreateTemplatePayload as CreatePayload, UpdateTemplatePayload as UpdatePayload,
|
|
74
|
+
export { CreateTemplatePayload as CreatePayload, UpdateTemplatePayload as UpdatePayload, attachFamilyMember, attachWorkspaceResource, checkWorkspace, create, createFamily, createFamilyFromTemplate, deleteFamily, detachFamilyMember, diffWorkspace, getById, getFamily, getGitRepository, getInputContract, getPublication, issueGitCredential, list, listDashboard, listFamilies, listInputContracts, openWorkspace, patchWorkspace, publish, reconcileWorkspace, remove, removeWorkspaceResource, renameFamily, renderWorkspaceFixture, resolveWorkspaceConflict, restoreWorkspace, saveWorkspace, templates_exports as t, update, workspaceHistory };
|
|
65
75
|
|
|
66
76
|
//# sourceMappingURL=templates.js.map
|
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
export { CreateWebhookPayload as CreatePayload, TestWebhookPayload as TestPayload, UpdateWebhookPayload as UpdatePayload, } from "./generated";
|
|
2
2
|
export declare const list: ((input?: {
|
|
3
|
+
readonly page?: string | null | undefined;
|
|
3
4
|
readonly limit?: string | null | undefined;
|
|
4
5
|
readonly search?: string | null | undefined;
|
|
5
|
-
readonly
|
|
6
|
+
readonly status?: string | null | undefined;
|
|
6
7
|
} | undefined) => import("effect/Effect").Effect<{
|
|
7
8
|
readonly items: readonly {
|
|
8
9
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
9
10
|
readonly name: string;
|
|
10
11
|
readonly url: string;
|
|
11
|
-
readonly eventTypes: readonly ("
|
|
12
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.ended" | "conversation.started" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "message.bounced" | "message.complained" | "message.delivered" | "message.failed" | "message.read" | "message.received" | "message.sent" | "template.approved" | "template.created" | "template.deleted" | "template.rejected" | "template.updated" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated")[];
|
|
12
13
|
readonly channels: readonly "email"[] | null;
|
|
13
|
-
readonly status: "
|
|
14
|
+
readonly status: "active" | "disabled";
|
|
14
15
|
readonly hasCustomHeaders: boolean;
|
|
15
16
|
readonly failureStartedAt: string | null;
|
|
16
17
|
readonly lastSucceededAt: string | null;
|
|
17
18
|
readonly createdAt: string;
|
|
18
19
|
readonly updatedAt: string;
|
|
20
|
+
readonly deliveries: {
|
|
21
|
+
readonly total: number;
|
|
22
|
+
readonly pending: number;
|
|
23
|
+
readonly delivered: number;
|
|
24
|
+
readonly exhausted: number;
|
|
25
|
+
readonly cancelled: number;
|
|
26
|
+
};
|
|
19
27
|
}[];
|
|
20
28
|
readonly pagination: {
|
|
21
29
|
readonly page: number;
|
|
@@ -23,24 +31,32 @@ export declare const list: ((input?: {
|
|
|
23
31
|
readonly total: number;
|
|
24
32
|
readonly totalPages: number;
|
|
25
33
|
};
|
|
26
|
-
}, import("./generated").
|
|
34
|
+
}, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>) & {
|
|
27
35
|
readonly pages: (input?: {
|
|
36
|
+
readonly page?: string | null | undefined;
|
|
28
37
|
readonly limit?: string | null | undefined;
|
|
29
38
|
readonly search?: string | null | undefined;
|
|
30
|
-
readonly
|
|
39
|
+
readonly status?: string | null | undefined;
|
|
31
40
|
} | undefined) => import("effect/Stream").Stream<{
|
|
32
41
|
readonly items: readonly {
|
|
33
42
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
34
43
|
readonly name: string;
|
|
35
44
|
readonly url: string;
|
|
36
|
-
readonly eventTypes: readonly ("
|
|
45
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.ended" | "conversation.started" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "message.bounced" | "message.complained" | "message.delivered" | "message.failed" | "message.read" | "message.received" | "message.sent" | "template.approved" | "template.created" | "template.deleted" | "template.rejected" | "template.updated" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated")[];
|
|
37
46
|
readonly channels: readonly "email"[] | null;
|
|
38
|
-
readonly status: "
|
|
47
|
+
readonly status: "active" | "disabled";
|
|
39
48
|
readonly hasCustomHeaders: boolean;
|
|
40
49
|
readonly failureStartedAt: string | null;
|
|
41
50
|
readonly lastSucceededAt: string | null;
|
|
42
51
|
readonly createdAt: string;
|
|
43
52
|
readonly updatedAt: string;
|
|
53
|
+
readonly deliveries: {
|
|
54
|
+
readonly total: number;
|
|
55
|
+
readonly pending: number;
|
|
56
|
+
readonly delivered: number;
|
|
57
|
+
readonly exhausted: number;
|
|
58
|
+
readonly cancelled: number;
|
|
59
|
+
};
|
|
44
60
|
}[];
|
|
45
61
|
readonly pagination: {
|
|
46
62
|
readonly page: number;
|
|
@@ -48,42 +64,50 @@ export declare const list: ((input?: {
|
|
|
48
64
|
readonly total: number;
|
|
49
65
|
readonly totalPages: number;
|
|
50
66
|
};
|
|
51
|
-
}, import("./generated").
|
|
67
|
+
}, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
52
68
|
readonly items: (input?: {
|
|
69
|
+
readonly page?: string | null | undefined;
|
|
53
70
|
readonly limit?: string | null | undefined;
|
|
54
71
|
readonly search?: string | null | undefined;
|
|
55
|
-
readonly
|
|
72
|
+
readonly status?: string | null | undefined;
|
|
56
73
|
} | undefined) => import("effect/Stream").Stream<{
|
|
57
74
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
58
75
|
readonly name: string;
|
|
59
76
|
readonly url: string;
|
|
60
|
-
readonly eventTypes: readonly ("
|
|
77
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.ended" | "conversation.started" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "message.bounced" | "message.complained" | "message.delivered" | "message.failed" | "message.read" | "message.received" | "message.sent" | "template.approved" | "template.created" | "template.deleted" | "template.rejected" | "template.updated" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated")[];
|
|
61
78
|
readonly channels: readonly "email"[] | null;
|
|
62
|
-
readonly status: "
|
|
79
|
+
readonly status: "active" | "disabled";
|
|
63
80
|
readonly hasCustomHeaders: boolean;
|
|
64
81
|
readonly failureStartedAt: string | null;
|
|
65
82
|
readonly lastSucceededAt: string | null;
|
|
66
83
|
readonly createdAt: string;
|
|
67
84
|
readonly updatedAt: string;
|
|
68
|
-
|
|
85
|
+
readonly deliveries: {
|
|
86
|
+
readonly total: number;
|
|
87
|
+
readonly pending: number;
|
|
88
|
+
readonly delivered: number;
|
|
89
|
+
readonly exhausted: number;
|
|
90
|
+
readonly cancelled: number;
|
|
91
|
+
};
|
|
92
|
+
}, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
69
93
|
};
|
|
70
94
|
export declare const create: (input: {
|
|
71
|
-
readonly url: string;
|
|
72
95
|
readonly name: string;
|
|
96
|
+
readonly url: string;
|
|
73
97
|
readonly eventTypes: readonly string[];
|
|
98
|
+
readonly channels?: readonly string[] | null | undefined;
|
|
74
99
|
readonly headers?: {
|
|
75
100
|
readonly [x: string]: string | undefined;
|
|
76
101
|
} | null | undefined;
|
|
77
102
|
readonly status?: string | null | undefined;
|
|
78
|
-
readonly channels?: readonly string[] | null | undefined;
|
|
79
103
|
}) => import("effect/Effect").Effect<{
|
|
80
104
|
readonly endpoint: {
|
|
81
105
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
82
106
|
readonly name: string;
|
|
83
107
|
readonly url: string;
|
|
84
|
-
readonly eventTypes: readonly ("
|
|
108
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.ended" | "conversation.started" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "message.bounced" | "message.complained" | "message.delivered" | "message.failed" | "message.read" | "message.received" | "message.sent" | "template.approved" | "template.created" | "template.deleted" | "template.rejected" | "template.updated" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated")[];
|
|
85
109
|
readonly channels: readonly "email"[] | null;
|
|
86
|
-
readonly status: "
|
|
110
|
+
readonly status: "active" | "disabled";
|
|
87
111
|
readonly hasCustomHeaders: boolean;
|
|
88
112
|
readonly failureStartedAt: string | null;
|
|
89
113
|
readonly lastSucceededAt: string | null;
|
|
@@ -91,84 +115,84 @@ export declare const create: (input: {
|
|
|
91
115
|
readonly updatedAt: string;
|
|
92
116
|
};
|
|
93
117
|
readonly secret: import("effect/Redacted").Redacted<string>;
|
|
94
|
-
}, import("./generated").
|
|
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>;
|
|
95
119
|
export declare const get: (input: {
|
|
96
120
|
readonly id: string;
|
|
97
121
|
}) => import("effect/Effect").Effect<{
|
|
98
122
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
99
123
|
readonly name: string;
|
|
100
124
|
readonly url: string;
|
|
101
|
-
readonly eventTypes: readonly ("
|
|
125
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.ended" | "conversation.started" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "message.bounced" | "message.complained" | "message.delivered" | "message.failed" | "message.read" | "message.received" | "message.sent" | "template.approved" | "template.created" | "template.deleted" | "template.rejected" | "template.updated" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated")[];
|
|
102
126
|
readonly channels: readonly "email"[] | null;
|
|
103
|
-
readonly status: "
|
|
127
|
+
readonly status: "active" | "disabled";
|
|
104
128
|
readonly hasCustomHeaders: boolean;
|
|
105
129
|
readonly failureStartedAt: string | null;
|
|
106
130
|
readonly lastSucceededAt: string | null;
|
|
107
131
|
readonly createdAt: string;
|
|
108
132
|
readonly updatedAt: string;
|
|
109
|
-
}, import("./generated").
|
|
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>;
|
|
110
134
|
export declare const remove: (input: {
|
|
111
135
|
readonly id: string;
|
|
112
136
|
}) => import("effect/Effect").Effect<{
|
|
113
137
|
readonly success: boolean;
|
|
114
|
-
}, import("./generated").
|
|
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>;
|
|
115
139
|
export declare const update: (input: {
|
|
116
140
|
readonly id: string;
|
|
141
|
+
readonly name?: string | null | undefined;
|
|
142
|
+
readonly url?: string | null | undefined;
|
|
143
|
+
readonly eventTypes?: readonly string[] | null | undefined;
|
|
144
|
+
readonly channels?: readonly string[] | null | undefined;
|
|
117
145
|
readonly headers?: {
|
|
118
146
|
readonly [x: string]: string | undefined;
|
|
119
147
|
} | null | undefined;
|
|
120
|
-
readonly url?: string | null | undefined;
|
|
121
|
-
readonly name?: string | null | undefined;
|
|
122
148
|
readonly status?: string | null | undefined;
|
|
123
|
-
readonly channels?: readonly string[] | null | undefined;
|
|
124
|
-
readonly eventTypes?: readonly string[] | null | undefined;
|
|
125
149
|
}) => import("effect/Effect").Effect<{
|
|
126
150
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
127
151
|
readonly name: string;
|
|
128
152
|
readonly url: string;
|
|
129
|
-
readonly eventTypes: readonly ("
|
|
153
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.ended" | "conversation.started" | "conversation.updated" | "domain.updated" | "domain.warming.updated" | "message.bounced" | "message.complained" | "message.delivered" | "message.failed" | "message.read" | "message.received" | "message.sent" | "template.approved" | "template.created" | "template.deleted" | "template.rejected" | "template.updated" | "webhook.created" | "webhook.deleted" | "webhook.test" | "webhook.updated")[];
|
|
130
154
|
readonly channels: readonly "email"[] | null;
|
|
131
|
-
readonly status: "
|
|
155
|
+
readonly status: "active" | "disabled";
|
|
132
156
|
readonly hasCustomHeaders: boolean;
|
|
133
157
|
readonly failureStartedAt: string | null;
|
|
134
158
|
readonly lastSucceededAt: string | null;
|
|
135
159
|
readonly createdAt: string;
|
|
136
160
|
readonly updatedAt: string;
|
|
137
|
-
}, import("./generated").
|
|
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>;
|
|
138
162
|
export declare const test: (input: {
|
|
139
163
|
readonly id: string;
|
|
140
164
|
readonly data?: {
|
|
141
165
|
readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | {
|
|
142
166
|
readonly [x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined;
|
|
143
167
|
} | null)[] | {
|
|
144
|
-
readonly [x: string]: string | number | boolean |
|
|
168
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
145
169
|
} | null)[] | {
|
|
146
|
-
readonly [x: string]: string | number | boolean |
|
|
170
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
147
171
|
} | null)[] | {
|
|
148
|
-
readonly [x: string]: string | number | boolean |
|
|
172
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
149
173
|
} | null)[] | {
|
|
150
|
-
readonly [x: string]: string | number | boolean |
|
|
174
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
151
175
|
} | null)[] | {
|
|
152
|
-
readonly [x: string]: string | number | boolean |
|
|
176
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
153
177
|
} | null)[] | {
|
|
154
|
-
readonly [x: string]: string | number | boolean |
|
|
178
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
155
179
|
} | null)[] | {
|
|
156
|
-
readonly [x: string]: string | number | boolean |
|
|
180
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
157
181
|
} | null)[] | {
|
|
158
|
-
readonly [x: string]: string | number | boolean |
|
|
182
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
159
183
|
} | null)[] | {
|
|
160
|
-
readonly [x: string]: string | number | boolean |
|
|
184
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
161
185
|
} | null)[] | {
|
|
162
|
-
readonly [x: string]: string | number | boolean |
|
|
186
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
163
187
|
} | null)[] | {
|
|
164
|
-
readonly [x: string]: string | number | boolean |
|
|
188
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
165
189
|
} | null | undefined;
|
|
166
190
|
} | null | undefined;
|
|
167
191
|
}) => import("effect/Effect").Effect<{
|
|
168
192
|
readonly accepted: true;
|
|
169
193
|
readonly eventId: string & import("effect/Brand").Brand<"WebhookEventId">;
|
|
170
194
|
readonly deliveryId: string & import("effect/Brand").Brand<"WebhookDeliveryId">;
|
|
171
|
-
}, import("./generated").
|
|
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>;
|
|
172
196
|
export declare const getLogs: (input: {
|
|
173
197
|
readonly webhookId: string;
|
|
174
198
|
readonly limit?: string | null | undefined;
|
|
@@ -176,8 +200,10 @@ export declare const getLogs: (input: {
|
|
|
176
200
|
readonly data: readonly {
|
|
177
201
|
readonly id: string & import("effect/Brand").Brand<"WebhookDeliveryId">;
|
|
178
202
|
readonly eventId: string & import("effect/Brand").Brand<"WebhookEventId">;
|
|
203
|
+
readonly eventType: string;
|
|
204
|
+
readonly occurredAt: string;
|
|
179
205
|
readonly endpointId: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
180
|
-
readonly status: "
|
|
206
|
+
readonly status: "cancelled" | "delivered" | "exhausted" | "pending";
|
|
181
207
|
readonly automaticAttempts: number;
|
|
182
208
|
readonly nextAttemptAt: string | null;
|
|
183
209
|
readonly completedAt: string | null;
|
|
@@ -186,9 +212,9 @@ export declare const getLogs: (input: {
|
|
|
186
212
|
readonly attempts: readonly {
|
|
187
213
|
readonly id: string & import("effect/Brand").Brand<"WebhookAttemptId">;
|
|
188
214
|
readonly deliveryId: string & import("effect/Brand").Brand<"WebhookDeliveryId">;
|
|
189
|
-
readonly kind: "
|
|
215
|
+
readonly kind: "automatic" | "manual";
|
|
190
216
|
readonly attemptNumber: number;
|
|
191
|
-
readonly classification: "cancelled" | "
|
|
217
|
+
readonly classification: "cancelled" | "http-error" | "network-error" | "success" | "timeout";
|
|
192
218
|
readonly attemptedAt: string;
|
|
193
219
|
readonly responseStatus: number | null;
|
|
194
220
|
readonly responseHeaders: {
|
|
@@ -201,16 +227,24 @@ export declare const getLogs: (input: {
|
|
|
201
227
|
}[];
|
|
202
228
|
}[];
|
|
203
229
|
readonly hasMore: boolean;
|
|
204
|
-
}, import("./generated").
|
|
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>;
|
|
205
231
|
export declare const getStats: (input: {
|
|
206
232
|
readonly webhookId: string;
|
|
233
|
+
readonly period?: string | null | undefined;
|
|
207
234
|
}) => import("effect/Effect").Effect<{
|
|
208
235
|
readonly total: number;
|
|
209
236
|
readonly pending: number;
|
|
210
237
|
readonly delivered: number;
|
|
211
238
|
readonly exhausted: number;
|
|
212
239
|
readonly cancelled: number;
|
|
213
|
-
|
|
240
|
+
readonly daily: readonly {
|
|
241
|
+
readonly date: string;
|
|
242
|
+
readonly pending: number;
|
|
243
|
+
readonly delivered: number;
|
|
244
|
+
readonly exhausted: number;
|
|
245
|
+
readonly cancelled: number;
|
|
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>;
|
|
214
248
|
export declare const retryDelivery: (input: {
|
|
215
249
|
readonly webhookId: string;
|
|
216
250
|
readonly deliveryId: string;
|
|
@@ -219,9 +253,9 @@ export declare const retryDelivery: (input: {
|
|
|
219
253
|
readonly deliveryId: string & import("effect/Brand").Brand<"WebhookDeliveryId">;
|
|
220
254
|
readonly attemptId: string & import("effect/Brand").Brand<"WebhookAttemptId">;
|
|
221
255
|
readonly outcome: "failed" | "succeeded";
|
|
222
|
-
}, import("./generated").
|
|
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>;
|
|
223
257
|
export declare const regenerateSecret: (input: {
|
|
224
258
|
readonly webhookId: string;
|
|
225
259
|
}) => import("effect/Effect").Effect<{
|
|
226
260
|
readonly secret: import("effect/Redacted").Redacted<string>;
|
|
227
|
-
}, import("./generated").
|
|
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>;
|
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 { S as UpdateWebhookPayload, c as CreateWebhookPayload, v as TestWebhookPayload } from "../client-
|
|
2
|
+
import { n as make } from "../operation-B4FjN6wq.js";
|
|
3
|
+
import { S as UpdateWebhookPayload, c as CreateWebhookPayload, v as TestWebhookPayload } from "../client-B7gEkvEq.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, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, UnauthorizedError, ValidationError, WebhookEnqueueError, createClient, fromApiError };
|
|
1
|
+
import { _ as WebhookEnqueueError, a as ExternalServiceError, c as InternalError, d as RateLimitedError, f as ResourceNotFoundError, g as ValidationError, h as UnauthorizedError, i as EmailChannelError, l as OnboardingReviewRequiredError, m as SamvaTransportError, n as BillingProviderError, o as FlagDisabledError, p as SamvaApiError, r as ConflictError, s as ForbiddenError, t as createClient, u as PaymentRequiredError, v as fromApiError } from "./promises-CP_nxUus.js";
|
|
2
|
+
export { BillingProviderError, ConflictError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, InternalError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, UnauthorizedError, ValidationError, WebhookEnqueueError, createClient, fromApiError };
|
|
@@ -13,8 +13,7 @@ function normalizeRecipients(recipient, channel) {
|
|
|
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
|
-
* This is the single canonical rule
|
|
17
|
-
* null/undefined cases differently.
|
|
16
|
+
* This is the single canonical rule for both clients.
|
|
18
17
|
*/
|
|
19
18
|
function ccBccPayload(key, value, channel) {
|
|
20
19
|
if (value === void 0) return {};
|
|
@@ -71,4 +70,4 @@ function buildMessagesSendPayload(input) {
|
|
|
71
70
|
//#endregion
|
|
72
71
|
export { buildMessagesSendPayload as n, replyToEmailsPayload as r, buildEmailSendPayload as t };
|
|
73
72
|
|
|
74
|
-
//# sourceMappingURL=normalize-
|
|
73
|
+
//# sourceMappingURL=normalize-BiIJnycv.js.map
|