samva 0.3.0 → 0.4.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/client/sdk.gen.d.ts +167 -184
- package/dist/client/types.gen.d.ts +1362 -662
- package/dist/{client-BOghX8fr.js → client-BmZK_uCt.js} +1797 -935
- package/dist/client-attribution-BslSOa_8.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 +253 -219
- package/dist/effect/campaigns.js +1 -1
- package/dist/effect/categories.d.ts +6 -6
- 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 +293 -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 +225 -213
- package/dist/effect/email.js +2 -2
- package/dist/effect/generated.d.ts +12174 -11888
- package/dist/effect/index.js +1 -1
- package/dist/effect/internal/client.d.ts +1 -1
- package/dist/effect/internal/operation.d.ts +20 -19
- package/dist/effect/media.d.ts +9 -9
- package/dist/effect/media.js +1 -1
- package/dist/effect/messages.d.ts +64 -61
- package/dist/effect/messages.js +1 -1
- 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/runtime.d.ts +0 -2
- package/dist/effect/scheduled-messages.d.ts +290 -276
- package/dist/effect/scheduled-messages.js +1 -1
- package/dist/effect/templates.d.ts +1371 -1554
- package/dist/effect/templates.js +40 -30
- package/dist/effect/webhooks.d.ts +47 -47
- package/dist/effect/webhooks.js +2 -2
- package/dist/index.js +1 -1
- package/dist/{normalize-BKFjbR9t.js → normalize-BiIJnycv.js} +2 -3
- package/dist/{operation-C2Q4cFJL.js → operation-B1knNlxk.js} +65 -38
- package/dist/promises/index.d.ts +10 -8
- package/dist/promises/index.js +1 -1
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/{promises-oiy7mOyu.js → promises-n1opem5V.js} +293 -262
- package/dist/service-map.d.ts +70 -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-B1knNlxk.js";
|
|
3
|
+
import { s as CreateTemplatePayload, x as UpdateTemplatePayload } from "../client-BmZK_uCt.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,16 +1,16 @@
|
|
|
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 page?: string | null | undefined;
|
|
6
6
|
} | undefined) => import("effect/Effect").Effect<{
|
|
7
7
|
readonly items: readonly {
|
|
8
8
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
9
9
|
readonly name: string;
|
|
10
10
|
readonly url: string;
|
|
11
|
-
readonly eventTypes: readonly ("
|
|
11
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.ended" | "conversation.started" | "conversation.updated" | "domain.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
12
|
readonly channels: readonly "email"[] | null;
|
|
13
|
-
readonly status: "
|
|
13
|
+
readonly status: "active" | "disabled";
|
|
14
14
|
readonly hasCustomHeaders: boolean;
|
|
15
15
|
readonly failureStartedAt: string | null;
|
|
16
16
|
readonly lastSucceededAt: string | null;
|
|
@@ -23,19 +23,19 @@ export declare const list: ((input?: {
|
|
|
23
23
|
readonly total: number;
|
|
24
24
|
readonly totalPages: number;
|
|
25
25
|
};
|
|
26
|
-
}, import("./generated").
|
|
26
|
+
}, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>) & {
|
|
27
27
|
readonly pages: (input?: {
|
|
28
|
+
readonly page?: string | null | undefined;
|
|
28
29
|
readonly limit?: string | null | undefined;
|
|
29
30
|
readonly search?: string | null | undefined;
|
|
30
|
-
readonly page?: string | null | undefined;
|
|
31
31
|
} | undefined) => import("effect/Stream").Stream<{
|
|
32
32
|
readonly items: readonly {
|
|
33
33
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
34
34
|
readonly name: string;
|
|
35
35
|
readonly url: string;
|
|
36
|
-
readonly eventTypes: readonly ("
|
|
36
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.ended" | "conversation.started" | "conversation.updated" | "domain.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
37
|
readonly channels: readonly "email"[] | null;
|
|
38
|
-
readonly status: "
|
|
38
|
+
readonly status: "active" | "disabled";
|
|
39
39
|
readonly hasCustomHeaders: boolean;
|
|
40
40
|
readonly failureStartedAt: string | null;
|
|
41
41
|
readonly lastSucceededAt: string | null;
|
|
@@ -48,42 +48,42 @@ export declare const list: ((input?: {
|
|
|
48
48
|
readonly total: number;
|
|
49
49
|
readonly totalPages: number;
|
|
50
50
|
};
|
|
51
|
-
}, import("./generated").
|
|
51
|
+
}, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
52
52
|
readonly items: (input?: {
|
|
53
|
+
readonly page?: string | null | undefined;
|
|
53
54
|
readonly limit?: string | null | undefined;
|
|
54
55
|
readonly search?: string | null | undefined;
|
|
55
|
-
readonly page?: string | null | undefined;
|
|
56
56
|
} | undefined) => import("effect/Stream").Stream<{
|
|
57
57
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
58
58
|
readonly name: string;
|
|
59
59
|
readonly url: string;
|
|
60
|
-
readonly eventTypes: readonly ("
|
|
60
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.ended" | "conversation.started" | "conversation.updated" | "domain.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
61
|
readonly channels: readonly "email"[] | null;
|
|
62
|
-
readonly status: "
|
|
62
|
+
readonly status: "active" | "disabled";
|
|
63
63
|
readonly hasCustomHeaders: boolean;
|
|
64
64
|
readonly failureStartedAt: string | null;
|
|
65
65
|
readonly lastSucceededAt: string | null;
|
|
66
66
|
readonly createdAt: string;
|
|
67
67
|
readonly updatedAt: string;
|
|
68
|
-
}, import("./generated").
|
|
68
|
+
}, import("./generated").ForbiddenError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
|
|
69
69
|
};
|
|
70
70
|
export declare const create: (input: {
|
|
71
|
-
readonly url: string;
|
|
72
71
|
readonly name: string;
|
|
72
|
+
readonly url: string;
|
|
73
73
|
readonly eventTypes: readonly string[];
|
|
74
|
+
readonly channels?: readonly string[] | null | undefined;
|
|
74
75
|
readonly headers?: {
|
|
75
76
|
readonly [x: string]: string | undefined;
|
|
76
77
|
} | null | undefined;
|
|
77
78
|
readonly status?: string | null | undefined;
|
|
78
|
-
readonly channels?: readonly string[] | null | undefined;
|
|
79
79
|
}) => import("effect/Effect").Effect<{
|
|
80
80
|
readonly endpoint: {
|
|
81
81
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
82
82
|
readonly name: string;
|
|
83
83
|
readonly url: string;
|
|
84
|
-
readonly eventTypes: readonly ("
|
|
84
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.ended" | "conversation.started" | "conversation.updated" | "domain.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
85
|
readonly channels: readonly "email"[] | null;
|
|
86
|
-
readonly status: "
|
|
86
|
+
readonly status: "active" | "disabled";
|
|
87
87
|
readonly hasCustomHeaders: boolean;
|
|
88
88
|
readonly failureStartedAt: string | null;
|
|
89
89
|
readonly lastSucceededAt: string | null;
|
|
@@ -91,84 +91,84 @@ export declare const create: (input: {
|
|
|
91
91
|
readonly updatedAt: string;
|
|
92
92
|
};
|
|
93
93
|
readonly secret: import("effect/Redacted").Redacted<string>;
|
|
94
|
-
}, import("./generated").
|
|
94
|
+
}, 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
95
|
export declare const get: (input: {
|
|
96
96
|
readonly id: string;
|
|
97
97
|
}) => import("effect/Effect").Effect<{
|
|
98
98
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
99
99
|
readonly name: string;
|
|
100
100
|
readonly url: string;
|
|
101
|
-
readonly eventTypes: readonly ("
|
|
101
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.ended" | "conversation.started" | "conversation.updated" | "domain.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
102
|
readonly channels: readonly "email"[] | null;
|
|
103
|
-
readonly status: "
|
|
103
|
+
readonly status: "active" | "disabled";
|
|
104
104
|
readonly hasCustomHeaders: boolean;
|
|
105
105
|
readonly failureStartedAt: string | null;
|
|
106
106
|
readonly lastSucceededAt: string | null;
|
|
107
107
|
readonly createdAt: string;
|
|
108
108
|
readonly updatedAt: string;
|
|
109
|
-
}, import("./generated").
|
|
109
|
+
}, 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
110
|
export declare const remove: (input: {
|
|
111
111
|
readonly id: string;
|
|
112
112
|
}) => import("effect/Effect").Effect<{
|
|
113
113
|
readonly success: boolean;
|
|
114
|
-
}, import("./generated").
|
|
114
|
+
}, 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
115
|
export declare const update: (input: {
|
|
116
116
|
readonly id: string;
|
|
117
|
+
readonly name?: string | null | undefined;
|
|
118
|
+
readonly url?: string | null | undefined;
|
|
119
|
+
readonly eventTypes?: readonly string[] | null | undefined;
|
|
120
|
+
readonly channels?: readonly string[] | null | undefined;
|
|
117
121
|
readonly headers?: {
|
|
118
122
|
readonly [x: string]: string | undefined;
|
|
119
123
|
} | null | undefined;
|
|
120
|
-
readonly url?: string | null | undefined;
|
|
121
|
-
readonly name?: string | null | undefined;
|
|
122
124
|
readonly status?: string | null | undefined;
|
|
123
|
-
readonly channels?: readonly string[] | null | undefined;
|
|
124
|
-
readonly eventTypes?: readonly string[] | null | undefined;
|
|
125
125
|
}) => import("effect/Effect").Effect<{
|
|
126
126
|
readonly id: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
127
127
|
readonly name: string;
|
|
128
128
|
readonly url: string;
|
|
129
|
-
readonly eventTypes: readonly ("
|
|
129
|
+
readonly eventTypes: readonly ("contact.created" | "contact.deleted" | "contact.updated" | "conversation.archived" | "conversation.created" | "conversation.ended" | "conversation.started" | "conversation.updated" | "domain.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
130
|
readonly channels: readonly "email"[] | null;
|
|
131
|
-
readonly status: "
|
|
131
|
+
readonly status: "active" | "disabled";
|
|
132
132
|
readonly hasCustomHeaders: boolean;
|
|
133
133
|
readonly failureStartedAt: string | null;
|
|
134
134
|
readonly lastSucceededAt: string | null;
|
|
135
135
|
readonly createdAt: string;
|
|
136
136
|
readonly updatedAt: string;
|
|
137
|
-
}, import("./generated").
|
|
137
|
+
}, 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
138
|
export declare const test: (input: {
|
|
139
139
|
readonly id: string;
|
|
140
140
|
readonly data?: {
|
|
141
141
|
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
142
|
readonly [x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined;
|
|
143
143
|
} | null)[] | {
|
|
144
|
-
readonly [x: string]: string | number | boolean |
|
|
144
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
145
145
|
} | null)[] | {
|
|
146
|
-
readonly [x: string]: string | number | boolean |
|
|
146
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
147
147
|
} | null)[] | {
|
|
148
|
-
readonly [x: string]: string | number | boolean |
|
|
148
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
149
149
|
} | null)[] | {
|
|
150
|
-
readonly [x: string]: string | number | boolean |
|
|
150
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
151
151
|
} | null)[] | {
|
|
152
|
-
readonly [x: string]: string | number | boolean |
|
|
152
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
153
153
|
} | null)[] | {
|
|
154
|
-
readonly [x: string]: string | number | boolean |
|
|
154
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
155
155
|
} | null)[] | {
|
|
156
|
-
readonly [x: string]: string | number | boolean |
|
|
156
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
157
157
|
} | null)[] | {
|
|
158
|
-
readonly [x: string]: string | number | boolean |
|
|
158
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
159
159
|
} | null)[] | {
|
|
160
|
-
readonly [x: string]: string | number | boolean |
|
|
160
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
161
161
|
} | null)[] | {
|
|
162
|
-
readonly [x: string]: string | number | boolean |
|
|
162
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
163
163
|
} | null)[] | {
|
|
164
|
-
readonly [x: string]: string | number | boolean |
|
|
164
|
+
readonly [x: string]: string | number | boolean | any | any | null | undefined;
|
|
165
165
|
} | null | undefined;
|
|
166
166
|
} | null | undefined;
|
|
167
167
|
}) => import("effect/Effect").Effect<{
|
|
168
168
|
readonly accepted: true;
|
|
169
169
|
readonly eventId: string & import("effect/Brand").Brand<"WebhookEventId">;
|
|
170
170
|
readonly deliveryId: string & import("effect/Brand").Brand<"WebhookDeliveryId">;
|
|
171
|
-
}, import("./generated").
|
|
171
|
+
}, 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
172
|
export declare const getLogs: (input: {
|
|
173
173
|
readonly webhookId: string;
|
|
174
174
|
readonly limit?: string | null | undefined;
|
|
@@ -177,7 +177,7 @@ export declare const getLogs: (input: {
|
|
|
177
177
|
readonly id: string & import("effect/Brand").Brand<"WebhookDeliveryId">;
|
|
178
178
|
readonly eventId: string & import("effect/Brand").Brand<"WebhookEventId">;
|
|
179
179
|
readonly endpointId: string & import("effect/Brand").Brand<"WebhookEndpointId">;
|
|
180
|
-
readonly status: "
|
|
180
|
+
readonly status: "cancelled" | "delivered" | "exhausted" | "pending";
|
|
181
181
|
readonly automaticAttempts: number;
|
|
182
182
|
readonly nextAttemptAt: string | null;
|
|
183
183
|
readonly completedAt: string | null;
|
|
@@ -186,9 +186,9 @@ export declare const getLogs: (input: {
|
|
|
186
186
|
readonly attempts: readonly {
|
|
187
187
|
readonly id: string & import("effect/Brand").Brand<"WebhookAttemptId">;
|
|
188
188
|
readonly deliveryId: string & import("effect/Brand").Brand<"WebhookDeliveryId">;
|
|
189
|
-
readonly kind: "
|
|
189
|
+
readonly kind: "automatic" | "manual";
|
|
190
190
|
readonly attemptNumber: number;
|
|
191
|
-
readonly classification: "cancelled" | "
|
|
191
|
+
readonly classification: "cancelled" | "http-error" | "network-error" | "success" | "timeout";
|
|
192
192
|
readonly attemptedAt: string;
|
|
193
193
|
readonly responseStatus: number | null;
|
|
194
194
|
readonly responseHeaders: {
|
|
@@ -201,7 +201,7 @@ export declare const getLogs: (input: {
|
|
|
201
201
|
}[];
|
|
202
202
|
}[];
|
|
203
203
|
readonly hasMore: boolean;
|
|
204
|
-
}, import("./generated").
|
|
204
|
+
}, 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
205
|
export declare const getStats: (input: {
|
|
206
206
|
readonly webhookId: string;
|
|
207
207
|
}) => import("effect/Effect").Effect<{
|
|
@@ -210,7 +210,7 @@ export declare const getStats: (input: {
|
|
|
210
210
|
readonly delivered: number;
|
|
211
211
|
readonly exhausted: number;
|
|
212
212
|
readonly cancelled: number;
|
|
213
|
-
}, import("./generated").
|
|
213
|
+
}, 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
214
|
export declare const retryDelivery: (input: {
|
|
215
215
|
readonly webhookId: string;
|
|
216
216
|
readonly deliveryId: string;
|
|
@@ -219,9 +219,9 @@ export declare const retryDelivery: (input: {
|
|
|
219
219
|
readonly deliveryId: string & import("effect/Brand").Brand<"WebhookDeliveryId">;
|
|
220
220
|
readonly attemptId: string & import("effect/Brand").Brand<"WebhookAttemptId">;
|
|
221
221
|
readonly outcome: "failed" | "succeeded";
|
|
222
|
-
}, import("./generated").
|
|
222
|
+
}, 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
223
|
export declare const regenerateSecret: (input: {
|
|
224
224
|
readonly webhookId: string;
|
|
225
225
|
}) => import("effect/Effect").Effect<{
|
|
226
226
|
readonly secret: import("effect/Redacted").Redacted<string>;
|
|
227
|
-
}, import("./generated").
|
|
227
|
+
}, 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-B1knNlxk.js";
|
|
3
|
+
import { S as UpdateWebhookPayload, c as CreateWebhookPayload, v as TestWebhookPayload } from "../client-BmZK_uCt.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 fromApiError, a as ExternalServiceError, c as InternalError, d as ResourceNotFoundError, f as SamvaApiError, g as WebhookEnqueueError, h as ValidationError, i as EmailChannelError, l as PaymentRequiredError, m as UnauthorizedError, n as BillingProviderError, o as FlagDisabledError, p as SamvaTransportError, r as ConflictError, s as ForbiddenError, t as createClient, u as RateLimitedError } from "./promises-
|
|
1
|
+
import { _ as fromApiError, a as ExternalServiceError, c as InternalError, d as ResourceNotFoundError, f as SamvaApiError, g as WebhookEnqueueError, h as ValidationError, i as EmailChannelError, l as PaymentRequiredError, m as UnauthorizedError, n as BillingProviderError, o as FlagDisabledError, p as SamvaTransportError, r as ConflictError, s as ForbiddenError, t as createClient, u as RateLimitedError } from "./promises-n1opem5V.js";
|
|
2
2
|
export { BillingProviderError, ConflictError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, InternalError, 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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as buildMessagesSendPayload, r as replyToEmailsPayload, t as buildEmailSendPayload } from "./normalize-
|
|
2
|
-
import { _ as SamvaApi, t as Service } from "./client-
|
|
1
|
+
import { n as buildMessagesSendPayload, r as replyToEmailsPayload, t as buildEmailSendPayload } from "./normalize-BiIJnycv.js";
|
|
2
|
+
import { _ as SamvaApi, t as Service } from "./client-BmZK_uCt.js";
|
|
3
3
|
import { generateIdempotencyKey, withRetry } from "./effect/retry.js";
|
|
4
4
|
import { Effect, Option, Predicate, Stream } from "effect";
|
|
5
5
|
//#region src/service-map.ts
|
|
@@ -190,7 +190,7 @@ const SDK_OPERATION_CALLS = {
|
|
|
190
190
|
paths: ["id"]
|
|
191
191
|
},
|
|
192
192
|
emailListSenders: { kind: "params" },
|
|
193
|
-
emailAddSender: { kind: "
|
|
193
|
+
emailAddSender: { kind: "idempotentPayload" },
|
|
194
194
|
emailCheckSenderVerification: {
|
|
195
195
|
kind: "path",
|
|
196
196
|
paths: ["id"]
|
|
@@ -321,10 +321,6 @@ const SDK_OPERATION_CALLS = {
|
|
|
321
321
|
kind: "path",
|
|
322
322
|
paths: ["familyId", "templateId"]
|
|
323
323
|
},
|
|
324
|
-
templatesAddFamilyChannel: {
|
|
325
|
-
kind: "path",
|
|
326
|
-
paths: ["familyId", "channel"]
|
|
327
|
-
},
|
|
328
324
|
templatesGetById: {
|
|
329
325
|
kind: "path",
|
|
330
326
|
paths: ["id"]
|
|
@@ -337,50 +333,77 @@ const SDK_OPERATION_CALLS = {
|
|
|
337
333
|
kind: "pathPayload",
|
|
338
334
|
paths: ["id"]
|
|
339
335
|
},
|
|
340
|
-
|
|
341
|
-
kind: "
|
|
336
|
+
templatesOpenWorkspace: {
|
|
337
|
+
kind: "path",
|
|
342
338
|
paths: ["id"]
|
|
343
339
|
},
|
|
344
|
-
|
|
345
|
-
templateDocumentsGet: {
|
|
340
|
+
templatesGetGitRepository: {
|
|
346
341
|
kind: "path",
|
|
347
|
-
paths: ["
|
|
342
|
+
paths: ["id"]
|
|
348
343
|
},
|
|
349
|
-
|
|
344
|
+
templatesIssueGitCredential: {
|
|
350
345
|
kind: "pathPayload",
|
|
351
|
-
paths: ["
|
|
346
|
+
paths: ["id"]
|
|
352
347
|
},
|
|
353
|
-
|
|
348
|
+
templatesPatchWorkspace: {
|
|
354
349
|
kind: "pathPayload",
|
|
355
|
-
paths: ["
|
|
350
|
+
paths: ["id"]
|
|
356
351
|
},
|
|
357
|
-
|
|
352
|
+
templatesResolveWorkspaceConflict: {
|
|
358
353
|
kind: "pathPayload",
|
|
359
|
-
paths: ["
|
|
354
|
+
paths: ["id"]
|
|
360
355
|
},
|
|
361
|
-
|
|
356
|
+
templatesAttachWorkspaceResource: {
|
|
362
357
|
kind: "pathPayload",
|
|
363
|
-
paths: ["
|
|
358
|
+
paths: ["id"]
|
|
364
359
|
},
|
|
365
|
-
|
|
360
|
+
templatesRemoveWorkspaceResource: {
|
|
366
361
|
kind: "pathPayload",
|
|
367
|
-
paths: ["
|
|
362
|
+
paths: ["id", "resourceId"]
|
|
368
363
|
},
|
|
369
|
-
|
|
370
|
-
kind: "
|
|
371
|
-
paths: ["
|
|
364
|
+
templatesDiffWorkspace: {
|
|
365
|
+
kind: "pathPayload",
|
|
366
|
+
paths: ["id"]
|
|
367
|
+
},
|
|
368
|
+
templatesWorkspaceHistory: {
|
|
369
|
+
kind: "pathParams",
|
|
370
|
+
paths: ["id"]
|
|
372
371
|
},
|
|
373
|
-
|
|
372
|
+
templatesCheckWorkspace: {
|
|
373
|
+
kind: "pathPayload",
|
|
374
|
+
paths: ["id"]
|
|
375
|
+
},
|
|
376
|
+
templatesRenderWorkspaceFixture: {
|
|
377
|
+
kind: "pathPayload",
|
|
378
|
+
paths: ["id"]
|
|
379
|
+
},
|
|
380
|
+
templatesReconcileWorkspace: {
|
|
381
|
+
kind: "pathPayload",
|
|
382
|
+
paths: ["id"]
|
|
383
|
+
},
|
|
384
|
+
templatesRestoreWorkspace: {
|
|
385
|
+
kind: "pathPayload",
|
|
386
|
+
paths: ["id"]
|
|
387
|
+
},
|
|
388
|
+
templatesSaveWorkspace: {
|
|
389
|
+
kind: "pathPayload",
|
|
390
|
+
paths: ["id"]
|
|
391
|
+
},
|
|
392
|
+
templatesPublish: {
|
|
393
|
+
kind: "pathPayload",
|
|
394
|
+
paths: ["id"]
|
|
395
|
+
},
|
|
396
|
+
templatesGetPublication: {
|
|
374
397
|
kind: "path",
|
|
375
|
-
paths: ["
|
|
398
|
+
paths: ["id", "publicationId"]
|
|
376
399
|
},
|
|
377
|
-
|
|
400
|
+
templatesListInputContracts: {
|
|
378
401
|
kind: "path",
|
|
379
|
-
paths: ["
|
|
402
|
+
paths: ["id"]
|
|
380
403
|
},
|
|
381
|
-
|
|
382
|
-
kind: "
|
|
383
|
-
paths: ["
|
|
404
|
+
templatesGetInputContract: {
|
|
405
|
+
kind: "path",
|
|
406
|
+
paths: ["id", "inputContractId"]
|
|
384
407
|
},
|
|
385
408
|
webhooksList: { kind: "params" },
|
|
386
409
|
webhooksCreate: { kind: "payload" },
|
|
@@ -600,15 +623,19 @@ const sendMessage = Effect.fn("Messages.send")(function* (input, options) {
|
|
|
600
623
|
const sendEmail = Effect.fn("Email.send")(function* (input, options) {
|
|
601
624
|
return yield* sendPayload(buildEmailSendPayload(input), options);
|
|
602
625
|
});
|
|
603
|
-
const addEmailSender = Effect.fn("Email.addSender")(function* (input) {
|
|
626
|
+
const addEmailSender = Effect.fn("Email.addSender")(function* (input, options) {
|
|
604
627
|
const client = yield* Service;
|
|
628
|
+
const idempotencyKey = options?.idempotencyKey ?? (yield* generateIdempotencyKey);
|
|
605
629
|
const { replyToEmails, ...sender } = input;
|
|
606
|
-
return yield* rawOperation(client, "emailAddSender")({
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
630
|
+
return yield* withRetry(rawOperation(client, "emailAddSender")({
|
|
631
|
+
headers: { "idempotency-key": idempotencyKey },
|
|
632
|
+
payload: stripUndefined({
|
|
633
|
+
...sender,
|
|
634
|
+
...replyToEmailsPayload(replyToEmails)
|
|
635
|
+
})
|
|
636
|
+
}));
|
|
610
637
|
});
|
|
611
638
|
//#endregion
|
|
612
639
|
export { sendMessage as i, make as n, sendEmail as r, addEmailSender as t };
|
|
613
640
|
|
|
614
|
-
//# sourceMappingURL=operation-
|
|
641
|
+
//# sourceMappingURL=operation-B1knNlxk.js.map
|