@fonderie/vue-courier-admin 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Fonderie, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,69 @@
1
+ # @fonderie/vue-courier-admin
2
+
3
+ Vue 3 composables for the Fonderie courier admin API — `useTemplates`,
4
+ `useTemplate`, `useSaveTemplate`, `useDeleteTemplate`, and
5
+ `useTemplateRevisions` (list + rollback). Thin bindings over
6
+ [`@fonderie/client`](https://github.com/fonderie-js/sdk/tree/main/packages/client)'s
7
+ `CourierAdminClient`: reactive `ref`s for loading/error/data state and the
8
+ request itself, nothing else. Bring your own UI.
9
+
10
+ ## Install
11
+
12
+ ```sh
13
+ npm install @fonderie/vue-courier-admin
14
+ ```
15
+
16
+ ## Use
17
+
18
+ ```vue
19
+ <script setup>
20
+ import { CourierAdminClient } from '@fonderie/client';
21
+ import { useTemplates, useSaveTemplate } from '@fonderie/vue-courier-admin';
22
+
23
+ const admin = new CourierAdminClient({
24
+ baseUrl: 'https://api.example.com/v1',
25
+ adminToken: import.meta.env.VITE_FONDERIE_ADMIN_TOKEN,
26
+ });
27
+
28
+ const { templates } = useTemplates(admin);
29
+ const { saveTemplate } = useSaveTemplate(admin);
30
+ </script>
31
+
32
+ <template>
33
+ <ul>
34
+ <li v-for="t in templates" :key="t.type">{{ t.type }}</li>
35
+ </ul>
36
+ </template>
37
+ ```
38
+
39
+ **This client is deliberately separate from `FonderieClient`.** Courier's
40
+ `/admin/templates/*` routes are guarded by a static bearer token configured
41
+ on the server (`CourierModule`'s `adminToken`), not the signed-in user's
42
+ session — the same model `@fonderie/config`'s admin surface and the
43
+ `fonderie template`/`fonderie config` CLI commands use. Construct
44
+ `CourierAdminClient` with that token directly; it does not share state with
45
+ `AuthClient`/`BillingClient`/`WorkspacesClient`.
46
+
47
+ Want pre-built screens instead of wiring your own editor?
48
+ See [`@fonderie/vue-courier-admin-screens`](https://github.com/fonderie-js/sdk/tree/main/packages/vue-courier-admin-screens).
49
+
50
+ ## Why this exists
51
+
52
+ You've shipped this plumbing before — auth, teams, billing, messaging —
53
+ and the next project will ask for it again. Fonderie packages it once:
54
+ plain TypeScript modules for
55
+ [`@fonderie/core`](https://github.com/fonderie-js/sdk/tree/main/packages/core),
56
+ PostgreSQL-backed, self-hosted, MIT. No external control plane, no
57
+ per-seat anything. Register the modules you need; skip the ones you don't.
58
+
59
+ **This package owns** the Vue binding for courier's template admin API —
60
+ reactive state management around `@fonderie/client`, nothing more. No
61
+ business logic lives here; it lives in `@fonderie/courier` on the server.
62
+
63
+ Browse the whole set at
64
+ [fonderie-js/sdk](https://github.com/fonderie-js/sdk) · follow
65
+ [@fonderiejs](https://x.com/fonderiejs)
66
+
67
+ ## License
68
+
69
+ MIT © Fonderie, Inc.
package/dist/index.cjs ADDED
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ CourierAdminClient: () => import_client6.CourierAdminClient,
24
+ FonderieApiError: () => import_client6.FonderieApiError,
25
+ useDeleteTemplate: () => useDeleteTemplate,
26
+ useSaveTemplate: () => useSaveTemplate,
27
+ useTemplate: () => useTemplate,
28
+ useTemplateRevisions: () => useTemplateRevisions,
29
+ useTemplates: () => useTemplates
30
+ });
31
+ module.exports = __toCommonJS(index_exports);
32
+ var import_client6 = require("@fonderie/client");
33
+
34
+ // src/composables/useDeleteTemplate.ts
35
+ var import_client = require("@fonderie/client");
36
+ var import_vue = require("vue");
37
+ function useDeleteTemplate(client) {
38
+ const isLoading = (0, import_vue.ref)(false);
39
+ const error = (0, import_vue.ref)(null);
40
+ async function deleteTemplate(type, locale) {
41
+ isLoading.value = true;
42
+ error.value = null;
43
+ try {
44
+ await client.deleteTemplate(type, locale);
45
+ } catch (err) {
46
+ const apiError = err instanceof import_client.FonderieApiError ? err : new import_client.FonderieApiError("unknown", String(err), 0);
47
+ error.value = apiError;
48
+ throw apiError;
49
+ } finally {
50
+ isLoading.value = false;
51
+ }
52
+ }
53
+ return { deleteTemplate, isLoading, error };
54
+ }
55
+
56
+ // src/composables/useSaveTemplate.ts
57
+ var import_client2 = require("@fonderie/client");
58
+ var import_vue2 = require("vue");
59
+ function useSaveTemplate(client) {
60
+ const isLoading = (0, import_vue2.ref)(false);
61
+ const error = (0, import_vue2.ref)(null);
62
+ async function saveTemplate(type, input, locale) {
63
+ isLoading.value = true;
64
+ error.value = null;
65
+ try {
66
+ const { result } = await client.setTemplate(type, input, locale);
67
+ return result;
68
+ } catch (err) {
69
+ const apiError = err instanceof import_client2.FonderieApiError ? err : new import_client2.FonderieApiError("unknown", String(err), 0);
70
+ error.value = apiError;
71
+ throw apiError;
72
+ } finally {
73
+ isLoading.value = false;
74
+ }
75
+ }
76
+ return { saveTemplate, isLoading, error };
77
+ }
78
+
79
+ // src/composables/useTemplate.ts
80
+ var import_client3 = require("@fonderie/client");
81
+ var import_vue3 = require("vue");
82
+ function useTemplate(client, type, locale) {
83
+ const template = (0, import_vue3.ref)(null);
84
+ const isLoading = (0, import_vue3.ref)(true);
85
+ const error = (0, import_vue3.ref)(null);
86
+ async function refresh() {
87
+ isLoading.value = true;
88
+ error.value = null;
89
+ try {
90
+ const { result } = await client.getTemplate(type, locale);
91
+ template.value = result;
92
+ } catch (err) {
93
+ const apiError = err instanceof import_client3.FonderieApiError ? err : new import_client3.FonderieApiError("unknown", String(err), 0);
94
+ error.value = apiError;
95
+ } finally {
96
+ isLoading.value = false;
97
+ }
98
+ }
99
+ void refresh();
100
+ return { template, isLoading, error, refresh };
101
+ }
102
+
103
+ // src/composables/useTemplateRevisions.ts
104
+ var import_client4 = require("@fonderie/client");
105
+ var import_vue4 = require("vue");
106
+ function useTemplateRevisions(client, type, locale) {
107
+ const revisions = (0, import_vue4.ref)([]);
108
+ const isLoading = (0, import_vue4.ref)(true);
109
+ const error = (0, import_vue4.ref)(null);
110
+ async function refresh() {
111
+ isLoading.value = true;
112
+ error.value = null;
113
+ try {
114
+ const { result } = await client.listRevisions(type, locale);
115
+ revisions.value = result;
116
+ } catch (err) {
117
+ const apiError = err instanceof import_client4.FonderieApiError ? err : new import_client4.FonderieApiError("unknown", String(err), 0);
118
+ error.value = apiError;
119
+ } finally {
120
+ isLoading.value = false;
121
+ }
122
+ }
123
+ async function rollback(toVersion) {
124
+ error.value = null;
125
+ try {
126
+ const { result } = await client.rollback(type, { toVersion }, locale);
127
+ await refresh();
128
+ return result;
129
+ } catch (err) {
130
+ const apiError = err instanceof import_client4.FonderieApiError ? err : new import_client4.FonderieApiError("unknown", String(err), 0);
131
+ error.value = apiError;
132
+ throw apiError;
133
+ }
134
+ }
135
+ void refresh();
136
+ return { revisions, isLoading, error, refresh, rollback };
137
+ }
138
+
139
+ // src/composables/useTemplates.ts
140
+ var import_client5 = require("@fonderie/client");
141
+ var import_vue5 = require("vue");
142
+ function useTemplates(client) {
143
+ const templates = (0, import_vue5.ref)([]);
144
+ const isLoading = (0, import_vue5.ref)(true);
145
+ const error = (0, import_vue5.ref)(null);
146
+ async function refresh() {
147
+ isLoading.value = true;
148
+ error.value = null;
149
+ try {
150
+ const { result } = await client.listTemplates();
151
+ templates.value = result;
152
+ } catch (err) {
153
+ const apiError = err instanceof import_client5.FonderieApiError ? err : new import_client5.FonderieApiError("unknown", String(err), 0);
154
+ error.value = apiError;
155
+ } finally {
156
+ isLoading.value = false;
157
+ }
158
+ }
159
+ void refresh();
160
+ return { templates, isLoading, error, refresh };
161
+ }
162
+ // Annotate the CommonJS export names for ESM import in node:
163
+ 0 && (module.exports = {
164
+ CourierAdminClient,
165
+ FonderieApiError,
166
+ useDeleteTemplate,
167
+ useSaveTemplate,
168
+ useTemplate,
169
+ useTemplateRevisions,
170
+ useTemplates
171
+ });
172
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/composables/useDeleteTemplate.ts","../src/composables/useSaveTemplate.ts","../src/composables/useTemplate.ts","../src/composables/useTemplateRevisions.ts","../src/composables/useTemplates.ts"],"sourcesContent":["export type {\n\tICourierAdminClientOptions,\n\tIRollbackTemplateInput,\n\tISetTemplateInput,\n\tITemplateEntry,\n\tITemplateRevision,\n} from '@fonderie/client';\n\nexport { CourierAdminClient, FonderieApiError } from '@fonderie/client';\nexport {\n\tuseDeleteTemplate,\n\tuseSaveTemplate,\n\tuseTemplate,\n\tuseTemplateRevisions,\n\tuseTemplates,\n} from './composables';\n","import type { CourierAdminClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { ref } from 'vue';\n\nexport function useDeleteTemplate(client: CourierAdminClient) {\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function deleteTemplate(type: string, locale?: string | null) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait client.deleteTemplate(type, locale);\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { deleteTemplate, isLoading, error };\n}\n","import type { CourierAdminClient, ISetTemplateInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { ref } from 'vue';\n\nexport function useSaveTemplate(client: CourierAdminClient) {\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function saveTemplate(type: string, input: ISetTemplateInput, locale?: string | null) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await client.setTemplate(type, input, locale);\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { saveTemplate, isLoading, error };\n}\n","import type { CourierAdminClient, ITemplateEntry } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { ref } from 'vue';\n\nexport function useTemplate(client: CourierAdminClient, type: string, locale?: string | null) {\n\tconst template = ref<ITemplateEntry | null>(null);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function refresh() {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await client.getTemplate(type, locale);\n\t\t\ttemplate.value = result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tvoid refresh();\n\n\treturn { template, isLoading, error, refresh };\n}\n","import type { CourierAdminClient, ITemplateRevision } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { ref } from 'vue';\n\nexport function useTemplateRevisions(\n\tclient: CourierAdminClient,\n\ttype: string,\n\tlocale?: string | null,\n) {\n\tconst revisions = ref<ITemplateRevision[]>([]);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function refresh() {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await client.listRevisions(type, locale);\n\t\t\trevisions.value = result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function rollback(toVersion: number) {\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await client.rollback(type, { toVersion }, locale);\n\t\t\tawait refresh();\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t}\n\t}\n\n\tvoid refresh();\n\n\treturn { revisions, isLoading, error, refresh, rollback };\n}\n","import type { CourierAdminClient, ITemplateEntry } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { ref } from 'vue';\n\nexport function useTemplates(client: CourierAdminClient) {\n\tconst templates = ref<ITemplateEntry[]>([]);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function refresh() {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await client.listTemplates();\n\t\t\ttemplates.value = result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tvoid refresh();\n\n\treturn { templates, isLoading, error, refresh };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,IAAAA,iBAAqD;;;ACPrD,oBAAiC;AACjC,iBAAoB;AAEb,SAAS,kBAAkB,QAA4B;AAC7D,QAAM,gBAAY,gBAAI,KAAK;AAC3B,QAAM,YAAQ,gBAA6B,IAAI;AAE/C,iBAAe,eAAe,MAAc,QAAwB;AACnE,cAAU,QAAQ;AAClB,UAAM,QAAQ;AACd,QAAI;AACH,YAAM,OAAO,eAAe,MAAM,MAAM;AAAA,IACzC,SAAS,KAAK;AACb,YAAM,WACL,eAAe,iCAAmB,MAAM,IAAI,+BAAiB,WAAW,OAAO,GAAG,GAAG,CAAC;AACvF,YAAM,QAAQ;AACd,YAAM;AAAA,IACP,UAAE;AACD,gBAAU,QAAQ;AAAA,IACnB;AAAA,EACD;AAEA,SAAO,EAAE,gBAAgB,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AO,GAAG,GAAG,CAAC;AACvF,YAAM,QAAQ;AAAA,IACf,UAAE;AACD,gBAAU,QAAQ;AAAA,IACnB;AAAA,EACD;AAEA,OAAK,QAAQ;AAEb,SAAO,EAAE,WAAW,WAAW,OAAO,QAAQ;AAC/C;","names":["import_client","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue"]}
@@ -0,0 +1,98 @@
1
+ import * as _fonderie_client from '@fonderie/client';
2
+ import { CourierAdminClient, FonderieApiError, ISetTemplateInput, ITemplateEntry, ITemplateRevision } from '@fonderie/client';
3
+ export { CourierAdminClient, FonderieApiError, ICourierAdminClientOptions, IRollbackTemplateInput, ISetTemplateInput, ITemplateEntry, ITemplateRevision } from '@fonderie/client';
4
+ import * as vue from 'vue';
5
+
6
+ declare function useDeleteTemplate(client: CourierAdminClient): {
7
+ deleteTemplate: (type: string, locale?: string | null) => Promise<void>;
8
+ isLoading: vue.Ref<boolean, boolean>;
9
+ error: vue.Ref<FonderieApiError | null, FonderieApiError | null>;
10
+ };
11
+
12
+ declare function useSaveTemplate(client: CourierAdminClient): {
13
+ saveTemplate: (type: string, input: ISetTemplateInput, locale?: string | null) => Promise<_fonderie_client.ITemplateEntry>;
14
+ isLoading: vue.Ref<boolean, boolean>;
15
+ error: vue.Ref<FonderieApiError | null, FonderieApiError | null>;
16
+ };
17
+
18
+ declare function useTemplate(client: CourierAdminClient, type: string, locale?: string | null): {
19
+ template: vue.Ref<{
20
+ type: string;
21
+ locale: string | null;
22
+ subject: string | null;
23
+ html: string | null;
24
+ text: string;
25
+ active: boolean;
26
+ version: number;
27
+ updatedBy: string | null;
28
+ updatedAt: string;
29
+ } | null, ITemplateEntry | {
30
+ type: string;
31
+ locale: string | null;
32
+ subject: string | null;
33
+ html: string | null;
34
+ text: string;
35
+ active: boolean;
36
+ version: number;
37
+ updatedBy: string | null;
38
+ updatedAt: string;
39
+ } | null>;
40
+ isLoading: vue.Ref<boolean, boolean>;
41
+ error: vue.Ref<FonderieApiError | null, FonderieApiError | null>;
42
+ refresh: () => Promise<void>;
43
+ };
44
+
45
+ declare function useTemplateRevisions(client: CourierAdminClient, type: string, locale?: string | null): {
46
+ revisions: vue.Ref<{
47
+ type: string;
48
+ locale: string | null;
49
+ subject: string | null;
50
+ html: string | null;
51
+ text: string;
52
+ version: number;
53
+ actor: string | null;
54
+ createdAt: string;
55
+ }[], ITemplateRevision[] | {
56
+ type: string;
57
+ locale: string | null;
58
+ subject: string | null;
59
+ html: string | null;
60
+ text: string;
61
+ version: number;
62
+ actor: string | null;
63
+ createdAt: string;
64
+ }[]>;
65
+ isLoading: vue.Ref<boolean, boolean>;
66
+ error: vue.Ref<FonderieApiError | null, FonderieApiError | null>;
67
+ refresh: () => Promise<void>;
68
+ rollback: (toVersion: number) => Promise<_fonderie_client.ITemplateEntry>;
69
+ };
70
+
71
+ declare function useTemplates(client: CourierAdminClient): {
72
+ templates: vue.Ref<{
73
+ type: string;
74
+ locale: string | null;
75
+ subject: string | null;
76
+ html: string | null;
77
+ text: string;
78
+ active: boolean;
79
+ version: number;
80
+ updatedBy: string | null;
81
+ updatedAt: string;
82
+ }[], ITemplateEntry[] | {
83
+ type: string;
84
+ locale: string | null;
85
+ subject: string | null;
86
+ html: string | null;
87
+ text: string;
88
+ active: boolean;
89
+ version: number;
90
+ updatedBy: string | null;
91
+ updatedAt: string;
92
+ }[]>;
93
+ isLoading: vue.Ref<boolean, boolean>;
94
+ error: vue.Ref<FonderieApiError | null, FonderieApiError | null>;
95
+ refresh: () => Promise<void>;
96
+ };
97
+
98
+ export { useDeleteTemplate, useSaveTemplate, useTemplate, useTemplateRevisions, useTemplates };
@@ -0,0 +1,98 @@
1
+ import * as _fonderie_client from '@fonderie/client';
2
+ import { CourierAdminClient, FonderieApiError, ISetTemplateInput, ITemplateEntry, ITemplateRevision } from '@fonderie/client';
3
+ export { CourierAdminClient, FonderieApiError, ICourierAdminClientOptions, IRollbackTemplateInput, ISetTemplateInput, ITemplateEntry, ITemplateRevision } from '@fonderie/client';
4
+ import * as vue from 'vue';
5
+
6
+ declare function useDeleteTemplate(client: CourierAdminClient): {
7
+ deleteTemplate: (type: string, locale?: string | null) => Promise<void>;
8
+ isLoading: vue.Ref<boolean, boolean>;
9
+ error: vue.Ref<FonderieApiError | null, FonderieApiError | null>;
10
+ };
11
+
12
+ declare function useSaveTemplate(client: CourierAdminClient): {
13
+ saveTemplate: (type: string, input: ISetTemplateInput, locale?: string | null) => Promise<_fonderie_client.ITemplateEntry>;
14
+ isLoading: vue.Ref<boolean, boolean>;
15
+ error: vue.Ref<FonderieApiError | null, FonderieApiError | null>;
16
+ };
17
+
18
+ declare function useTemplate(client: CourierAdminClient, type: string, locale?: string | null): {
19
+ template: vue.Ref<{
20
+ type: string;
21
+ locale: string | null;
22
+ subject: string | null;
23
+ html: string | null;
24
+ text: string;
25
+ active: boolean;
26
+ version: number;
27
+ updatedBy: string | null;
28
+ updatedAt: string;
29
+ } | null, ITemplateEntry | {
30
+ type: string;
31
+ locale: string | null;
32
+ subject: string | null;
33
+ html: string | null;
34
+ text: string;
35
+ active: boolean;
36
+ version: number;
37
+ updatedBy: string | null;
38
+ updatedAt: string;
39
+ } | null>;
40
+ isLoading: vue.Ref<boolean, boolean>;
41
+ error: vue.Ref<FonderieApiError | null, FonderieApiError | null>;
42
+ refresh: () => Promise<void>;
43
+ };
44
+
45
+ declare function useTemplateRevisions(client: CourierAdminClient, type: string, locale?: string | null): {
46
+ revisions: vue.Ref<{
47
+ type: string;
48
+ locale: string | null;
49
+ subject: string | null;
50
+ html: string | null;
51
+ text: string;
52
+ version: number;
53
+ actor: string | null;
54
+ createdAt: string;
55
+ }[], ITemplateRevision[] | {
56
+ type: string;
57
+ locale: string | null;
58
+ subject: string | null;
59
+ html: string | null;
60
+ text: string;
61
+ version: number;
62
+ actor: string | null;
63
+ createdAt: string;
64
+ }[]>;
65
+ isLoading: vue.Ref<boolean, boolean>;
66
+ error: vue.Ref<FonderieApiError | null, FonderieApiError | null>;
67
+ refresh: () => Promise<void>;
68
+ rollback: (toVersion: number) => Promise<_fonderie_client.ITemplateEntry>;
69
+ };
70
+
71
+ declare function useTemplates(client: CourierAdminClient): {
72
+ templates: vue.Ref<{
73
+ type: string;
74
+ locale: string | null;
75
+ subject: string | null;
76
+ html: string | null;
77
+ text: string;
78
+ active: boolean;
79
+ version: number;
80
+ updatedBy: string | null;
81
+ updatedAt: string;
82
+ }[], ITemplateEntry[] | {
83
+ type: string;
84
+ locale: string | null;
85
+ subject: string | null;
86
+ html: string | null;
87
+ text: string;
88
+ active: boolean;
89
+ version: number;
90
+ updatedBy: string | null;
91
+ updatedAt: string;
92
+ }[]>;
93
+ isLoading: vue.Ref<boolean, boolean>;
94
+ error: vue.Ref<FonderieApiError | null, FonderieApiError | null>;
95
+ refresh: () => Promise<void>;
96
+ };
97
+
98
+ export { useDeleteTemplate, useSaveTemplate, useTemplate, useTemplateRevisions, useTemplates };
package/dist/index.js ADDED
@@ -0,0 +1,141 @@
1
+ // src/index.ts
2
+ import { CourierAdminClient, FonderieApiError as FonderieApiError6 } from "@fonderie/client";
3
+
4
+ // src/composables/useDeleteTemplate.ts
5
+ import { FonderieApiError } from "@fonderie/client";
6
+ import { ref } from "vue";
7
+ function useDeleteTemplate(client) {
8
+ const isLoading = ref(false);
9
+ const error = ref(null);
10
+ async function deleteTemplate(type, locale) {
11
+ isLoading.value = true;
12
+ error.value = null;
13
+ try {
14
+ await client.deleteTemplate(type, locale);
15
+ } catch (err) {
16
+ const apiError = err instanceof FonderieApiError ? err : new FonderieApiError("unknown", String(err), 0);
17
+ error.value = apiError;
18
+ throw apiError;
19
+ } finally {
20
+ isLoading.value = false;
21
+ }
22
+ }
23
+ return { deleteTemplate, isLoading, error };
24
+ }
25
+
26
+ // src/composables/useSaveTemplate.ts
27
+ import { FonderieApiError as FonderieApiError2 } from "@fonderie/client";
28
+ import { ref as ref2 } from "vue";
29
+ function useSaveTemplate(client) {
30
+ const isLoading = ref2(false);
31
+ const error = ref2(null);
32
+ async function saveTemplate(type, input, locale) {
33
+ isLoading.value = true;
34
+ error.value = null;
35
+ try {
36
+ const { result } = await client.setTemplate(type, input, locale);
37
+ return result;
38
+ } catch (err) {
39
+ const apiError = err instanceof FonderieApiError2 ? err : new FonderieApiError2("unknown", String(err), 0);
40
+ error.value = apiError;
41
+ throw apiError;
42
+ } finally {
43
+ isLoading.value = false;
44
+ }
45
+ }
46
+ return { saveTemplate, isLoading, error };
47
+ }
48
+
49
+ // src/composables/useTemplate.ts
50
+ import { FonderieApiError as FonderieApiError3 } from "@fonderie/client";
51
+ import { ref as ref3 } from "vue";
52
+ function useTemplate(client, type, locale) {
53
+ const template = ref3(null);
54
+ const isLoading = ref3(true);
55
+ const error = ref3(null);
56
+ async function refresh() {
57
+ isLoading.value = true;
58
+ error.value = null;
59
+ try {
60
+ const { result } = await client.getTemplate(type, locale);
61
+ template.value = result;
62
+ } catch (err) {
63
+ const apiError = err instanceof FonderieApiError3 ? err : new FonderieApiError3("unknown", String(err), 0);
64
+ error.value = apiError;
65
+ } finally {
66
+ isLoading.value = false;
67
+ }
68
+ }
69
+ void refresh();
70
+ return { template, isLoading, error, refresh };
71
+ }
72
+
73
+ // src/composables/useTemplateRevisions.ts
74
+ import { FonderieApiError as FonderieApiError4 } from "@fonderie/client";
75
+ import { ref as ref4 } from "vue";
76
+ function useTemplateRevisions(client, type, locale) {
77
+ const revisions = ref4([]);
78
+ const isLoading = ref4(true);
79
+ const error = ref4(null);
80
+ async function refresh() {
81
+ isLoading.value = true;
82
+ error.value = null;
83
+ try {
84
+ const { result } = await client.listRevisions(type, locale);
85
+ revisions.value = result;
86
+ } catch (err) {
87
+ const apiError = err instanceof FonderieApiError4 ? err : new FonderieApiError4("unknown", String(err), 0);
88
+ error.value = apiError;
89
+ } finally {
90
+ isLoading.value = false;
91
+ }
92
+ }
93
+ async function rollback(toVersion) {
94
+ error.value = null;
95
+ try {
96
+ const { result } = await client.rollback(type, { toVersion }, locale);
97
+ await refresh();
98
+ return result;
99
+ } catch (err) {
100
+ const apiError = err instanceof FonderieApiError4 ? err : new FonderieApiError4("unknown", String(err), 0);
101
+ error.value = apiError;
102
+ throw apiError;
103
+ }
104
+ }
105
+ void refresh();
106
+ return { revisions, isLoading, error, refresh, rollback };
107
+ }
108
+
109
+ // src/composables/useTemplates.ts
110
+ import { FonderieApiError as FonderieApiError5 } from "@fonderie/client";
111
+ import { ref as ref5 } from "vue";
112
+ function useTemplates(client) {
113
+ const templates = ref5([]);
114
+ const isLoading = ref5(true);
115
+ const error = ref5(null);
116
+ async function refresh() {
117
+ isLoading.value = true;
118
+ error.value = null;
119
+ try {
120
+ const { result } = await client.listTemplates();
121
+ templates.value = result;
122
+ } catch (err) {
123
+ const apiError = err instanceof FonderieApiError5 ? err : new FonderieApiError5("unknown", String(err), 0);
124
+ error.value = apiError;
125
+ } finally {
126
+ isLoading.value = false;
127
+ }
128
+ }
129
+ void refresh();
130
+ return { templates, isLoading, error, refresh };
131
+ }
132
+ export {
133
+ CourierAdminClient,
134
+ FonderieApiError6 as FonderieApiError,
135
+ useDeleteTemplate,
136
+ useSaveTemplate,
137
+ useTemplate,
138
+ useTemplateRevisions,
139
+ useTemplates
140
+ };
141
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/composables/useDeleteTemplate.ts","../src/composables/useSaveTemplate.ts","../src/composables/useTemplate.ts","../src/composables/useTemplateRevisions.ts","../src/composables/useTemplates.ts"],"sourcesContent":["export type {\n\tICourierAdminClientOptions,\n\tIRollbackTemplateInput,\n\tISetTemplateInput,\n\tITemplateEntry,\n\tITemplateRevision,\n} from '@fonderie/client';\n\nexport { CourierAdminClient, FonderieApiError } from '@fonderie/client';\nexport {\n\tuseDeleteTemplate,\n\tuseSaveTemplate,\n\tuseTemplate,\n\tuseTemplateRevisions,\n\tuseTemplates,\n} from './composables';\n","import type { CourierAdminClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { ref } from 'vue';\n\nexport function useDeleteTemplate(client: CourierAdminClient) {\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function deleteTemplate(type: string, locale?: string | null) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait client.deleteTemplate(type, locale);\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { deleteTemplate, isLoading, error };\n}\n","import type { CourierAdminClient, ISetTemplateInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { ref } from 'vue';\n\nexport function useSaveTemplate(client: CourierAdminClient) {\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function saveTemplate(type: string, input: ISetTemplateInput, locale?: string | null) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await client.setTemplate(type, input, locale);\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { saveTemplate, isLoading, error };\n}\n","import type { CourierAdminClient, ITemplateEntry } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { ref } from 'vue';\n\nexport function useTemplate(client: CourierAdminClient, type: string, locale?: string | null) {\n\tconst template = ref<ITemplateEntry | null>(null);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function refresh() {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await client.getTemplate(type, locale);\n\t\t\ttemplate.value = result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tvoid refresh();\n\n\treturn { template, isLoading, error, refresh };\n}\n","import type { CourierAdminClient, ITemplateRevision } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { ref } from 'vue';\n\nexport function useTemplateRevisions(\n\tclient: CourierAdminClient,\n\ttype: string,\n\tlocale?: string | null,\n) {\n\tconst revisions = ref<ITemplateRevision[]>([]);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function refresh() {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await client.listRevisions(type, locale);\n\t\t\trevisions.value = result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function rollback(toVersion: number) {\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await client.rollback(type, { toVersion }, locale);\n\t\t\tawait refresh();\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t}\n\t}\n\n\tvoid refresh();\n\n\treturn { revisions, isLoading, error, refresh, rollback };\n}\n","import type { CourierAdminClient, ITemplateEntry } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { ref } from 'vue';\n\nexport function useTemplates(client: CourierAdminClient) {\n\tconst templates = ref<ITemplateEntry[]>([]);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function refresh() {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await client.listTemplates();\n\t\t\ttemplates.value = result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tvoid refresh();\n\n\treturn { templates, isLoading, error, refresh };\n}\n"],"mappings":";AAQA,SAAS,oBAAoB,oBAAAA,yBAAwB;;;ACPrD,SAAS,wBAAwB;AACjC,SAAS,WAAW;AAEb,SAAS,kBAAkB,QAA4B;AAC7D,QAAM,YAAY,IAAI,KAAK;AAC3B,QAAM,QAAQ,IAA6B,IAAI;AAE/C,iBAAe,eAAe,MAAc,QAAwB;AACnE,cAAU,QAAQ;AAClB,UAAM,QAAQ;AACd,QAAI;AACH,YAAM,OAAO,eAAe,MAAM,MAAM;AAAA,IACzC,SAAS,KAAK;AACb,YAAM,WACL,eAAe,mBAAmB,MAAM,IAAI,iBAAiB,WAAW,OAAO,GAAG,GAAG,CAAC;AACvF,YAAM,QAAQ;AACd,YAAM;AAAA,IACP,UAAE;AACD,gBAAU,QAAQ;AAAA,IACnB;AAAA,EACD;AAEA,SAAO,EAAE,gBAAgB,WAAW,MAAM;AAC3C;;;ACvBA,SAAS,oBAAAC,yBAAwB;AACjC,SAAS,OAAAC,YAAW;AAEb,SAAS,gBAAgB,QAA4B;AAC3D,QAAM,YAAYA,KAAI,KAAK;AAC3B,QAAM,QAAQA,KAA6B,IAAI;AAE/C,iBAAe,aAAa,MAAc,OAA0B,QAAwB;AAC3F,cAAU,QAAQ;AAClB,UAAM,QAAQ;AACd,QAAI;AACH,YAAM,EAAE,OAAO,IAAI,MAAM,OAAO,YAAY,MAAM,OAAO,MAAM;AAC/D,aAAO;AAAA,IACR,SAAS,KAAK;AACb,YAAM,WACL,eAAeD,oBAAmB,MAAM,IAAIA,kB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Q;AAAA,IACf,UAAE;AACD,gBAAU,QAAQ;AAAA,IACnB;AAAA,EACD;AAEA,iBAAe,SAAS,WAAmB;AAC1C,UAAM,QAAQ;AACd,QAAI;AACH,YAAM,EAAE,OAAO,IAAI,MAAM,OAAO,SAAS,MAAM,EAAE,UAAU,GAAG,MAAM;AACpE,YAAM,QAAQ;AACd,aAAO;AAAA,IACR,SAAS,KAAK;AACb,YAAM,WACL,eAAeA,oBAAmB,MAAM,IAAIA,kBAAiB,WAAW,OAAO,GAAG,GAAG,CAAC;AACvF,YAAM,QAAQ;AACd,YAAM;AAAA,IACP;AAAA,EACD;AAEA,OAAK,QAAQ;AAEb,SAAO,EAAE,WAAW,WAAW,OAAO,SAAS,SAAS;AACzD;;;AC5CA,SAAS,oBAAAE,yBAAwB;AACjC,SAAS,OAAAC,YAAW;AAEb,SAAS,aAAa,QAA4B;AACxD,QAAM,YAAYA,KAAsB,CAAC,CAAC;AAC1C,QAAM,YAAYA,KAAI,IAAI;AAC1B,QAAM,QAAQA,KAA6B,IAAI;AAE/C,iBAAe,UAAU;AACxB,cAAU,QAAQ;AAClB,UAAM,QAAQ;AACd,QAAI;AACH,YAAM,EAAE,OAAO,IAAI,MAAM,OAAO,cAAc;AAC9C,gBAAU,QAAQ;AAAA,IACnB,SAAS,KAAK;AACb,YAAM,WACL,eAAeD,oBAAmB,MAAM,IAAIA,kBAAiB,WAAW,OAAO,GAAG,GAAG,CAAC;AACvF,YAAM,QAAQ;AAAA,IACf,UAAE;AACD,gBAAU,QAAQ;AAAA,IACnB;AAAA,EACD;AAEA,OAAK,QAAQ;AAEb,SAAO,EAAE,WAAW,WAAW,OAAO,QAAQ;AAC/C;","names":["FonderieApiError","FonderieApiError","ref","FonderieApiError","ref","FonderieApiError","ref","FonderieApiError","ref"]}
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@fonderie/vue-courier-admin",
3
+ "version": "0.1.0",
4
+ "description": "Vue 3 composables for the Fonderie courier admin API (email/SMS/push template management) — thin bindings over @fonderie/client's CourierAdminClient.",
5
+ "keywords": [
6
+ "fonderie-js",
7
+ "vue",
8
+ "courier",
9
+ "templates",
10
+ "admin",
11
+ "composables",
12
+ "typescript"
13
+ ],
14
+ "license": "MIT",
15
+ "type": "module",
16
+ "engines": {
17
+ "node": ">=20"
18
+ },
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js",
23
+ "require": "./dist/index.cjs"
24
+ }
25
+ },
26
+ "main": "./dist/index.cjs",
27
+ "module": "./dist/index.js",
28
+ "types": "./dist/index.d.ts",
29
+ "scripts": {
30
+ "build": "tsup",
31
+ "dev": "tsup --watch",
32
+ "typecheck": "tsc --noEmit",
33
+ "lint": "biome lint src",
34
+ "format": "biome format --write src",
35
+ "check": "biome check --write src"
36
+ },
37
+ "dependencies": {
38
+ "@fonderie/client": "*"
39
+ },
40
+ "peerDependencies": {
41
+ "vue": ">=3.0.0"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^25.6.0",
45
+ "tsup": "^8.5.1",
46
+ "typescript": "^6.0.3",
47
+ "vue": "^3.5.0"
48
+ },
49
+ "publishConfig": {
50
+ "access": "public"
51
+ },
52
+ "files": [
53
+ "dist",
54
+ "LICENSE",
55
+ "README.md"
56
+ ],
57
+ "repository": {
58
+ "type": "git",
59
+ "url": "git+https://github.com/fonderiejs/fonderie.git",
60
+ "directory": "packages/vue-courier-admin"
61
+ },
62
+ "homepage": "https://github.com/fonderiejs/fonderie/tree/main/packages/vue-courier-admin#readme",
63
+ "bugs": {
64
+ "url": "https://github.com/fonderiejs/fonderie/issues"
65
+ }
66
+ }