@fonderie/vue-courier-admin 0.1.0 → 0.3.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/README.md +4 -4
- package/dist/index.cjs +45 -71
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -14
- package/dist/index.d.ts +4 -14
- package/dist/index.js +44 -68
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Vue 3 composables for the Fonderie courier admin API — `useTemplates`,
|
|
4
4
|
`useTemplate`, `useSaveTemplate`, `useDeleteTemplate`, and
|
|
5
5
|
`useTemplateRevisions` (list + rollback). Thin bindings over
|
|
6
|
-
[`@fonderie/client`](https://github.com/
|
|
6
|
+
[`@fonderie/client`](https://github.com/fonderiejs/sdk/tree/main/packages/client)'s
|
|
7
7
|
`CourierAdminClient`: reactive `ref`s for loading/error/data state and the
|
|
8
8
|
request itself, nothing else. Bring your own UI.
|
|
9
9
|
|
|
@@ -45,14 +45,14 @@ session — the same model `@fonderie/config`'s admin surface and the
|
|
|
45
45
|
`AuthClient`/`BillingClient`/`WorkspacesClient`.
|
|
46
46
|
|
|
47
47
|
Want pre-built screens instead of wiring your own editor?
|
|
48
|
-
See [`@fonderie/vue-courier-admin-screens`](https://github.com/
|
|
48
|
+
See [`@fonderie/vue-courier-admin-screens`](https://github.com/fonderiejs/sdk/tree/main/packages/vue-courier-admin-screens).
|
|
49
49
|
|
|
50
50
|
## Why this exists
|
|
51
51
|
|
|
52
52
|
You've shipped this plumbing before — auth, teams, billing, messaging —
|
|
53
53
|
and the next project will ask for it again. Fonderie packages it once:
|
|
54
54
|
plain TypeScript modules for
|
|
55
|
-
[`@fonderie/core`](https://github.com/
|
|
55
|
+
[`@fonderie/core`](https://github.com/fonderiejs/sdk/tree/main/packages/core),
|
|
56
56
|
PostgreSQL-backed, self-hosted, MIT. No external control plane, no
|
|
57
57
|
per-seat anything. Register the modules you need; skip the ones you don't.
|
|
58
58
|
|
|
@@ -61,7 +61,7 @@ reactive state management around `@fonderie/client`, nothing more. No
|
|
|
61
61
|
business logic lives here; it lives in `@fonderie/courier` on the server.
|
|
62
62
|
|
|
63
63
|
Browse the whole set at
|
|
64
|
-
[
|
|
64
|
+
[fonderiejs/sdk](https://github.com/fonderiejs/sdk) · follow
|
|
65
65
|
[@fonderiejs](https://x.com/fonderiejs)
|
|
66
66
|
|
|
67
67
|
## License
|
package/dist/index.cjs
CHANGED
|
@@ -20,69 +20,22 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
CourierAdminClient: () =>
|
|
24
|
-
FonderieApiError: () =>
|
|
25
|
-
useDeleteTemplate: () => useDeleteTemplate,
|
|
26
|
-
useSaveTemplate: () => useSaveTemplate,
|
|
23
|
+
CourierAdminClient: () => import_client4.CourierAdminClient,
|
|
24
|
+
FonderieApiError: () => import_client4.FonderieApiError,
|
|
27
25
|
useTemplate: () => useTemplate,
|
|
28
26
|
useTemplateRevisions: () => useTemplateRevisions,
|
|
29
27
|
useTemplates: () => useTemplates
|
|
30
28
|
});
|
|
31
29
|
module.exports = __toCommonJS(index_exports);
|
|
32
|
-
var
|
|
30
|
+
var import_client4 = require("@fonderie/client");
|
|
33
31
|
|
|
34
|
-
// src/composables/
|
|
32
|
+
// src/composables/useTemplate.ts
|
|
35
33
|
var import_client = require("@fonderie/client");
|
|
36
34
|
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
35
|
function useTemplate(client, type, locale) {
|
|
83
|
-
const template = (0,
|
|
84
|
-
const isLoading = (0,
|
|
85
|
-
const error = (0,
|
|
36
|
+
const template = (0, import_vue.ref)(null);
|
|
37
|
+
const isLoading = (0, import_vue.ref)(true);
|
|
38
|
+
const error = (0, import_vue.ref)(null);
|
|
86
39
|
async function refresh() {
|
|
87
40
|
isLoading.value = true;
|
|
88
41
|
error.value = null;
|
|
@@ -90,7 +43,7 @@ function useTemplate(client, type, locale) {
|
|
|
90
43
|
const { result } = await client.getTemplate(type, locale);
|
|
91
44
|
template.value = result;
|
|
92
45
|
} catch (err) {
|
|
93
|
-
const apiError = err instanceof
|
|
46
|
+
const apiError = err instanceof import_client.FonderieApiError ? err : new import_client.FonderieApiError("unknown", String(err), 0);
|
|
94
47
|
error.value = apiError;
|
|
95
48
|
} finally {
|
|
96
49
|
isLoading.value = false;
|
|
@@ -101,12 +54,12 @@ function useTemplate(client, type, locale) {
|
|
|
101
54
|
}
|
|
102
55
|
|
|
103
56
|
// src/composables/useTemplateRevisions.ts
|
|
104
|
-
var
|
|
105
|
-
var
|
|
57
|
+
var import_client2 = require("@fonderie/client");
|
|
58
|
+
var import_vue2 = require("vue");
|
|
106
59
|
function useTemplateRevisions(client, type, locale) {
|
|
107
|
-
const revisions = (0,
|
|
108
|
-
const isLoading = (0,
|
|
109
|
-
const error = (0,
|
|
60
|
+
const revisions = (0, import_vue2.ref)([]);
|
|
61
|
+
const isLoading = (0, import_vue2.ref)(true);
|
|
62
|
+
const error = (0, import_vue2.ref)(null);
|
|
110
63
|
async function refresh() {
|
|
111
64
|
isLoading.value = true;
|
|
112
65
|
error.value = null;
|
|
@@ -114,7 +67,7 @@ function useTemplateRevisions(client, type, locale) {
|
|
|
114
67
|
const { result } = await client.listRevisions(type, locale);
|
|
115
68
|
revisions.value = result;
|
|
116
69
|
} catch (err) {
|
|
117
|
-
const apiError = err instanceof
|
|
70
|
+
const apiError = err instanceof import_client2.FonderieApiError ? err : new import_client2.FonderieApiError("unknown", String(err), 0);
|
|
118
71
|
error.value = apiError;
|
|
119
72
|
} finally {
|
|
120
73
|
isLoading.value = false;
|
|
@@ -127,7 +80,7 @@ function useTemplateRevisions(client, type, locale) {
|
|
|
127
80
|
await refresh();
|
|
128
81
|
return result;
|
|
129
82
|
} catch (err) {
|
|
130
|
-
const apiError = err instanceof
|
|
83
|
+
const apiError = err instanceof import_client2.FonderieApiError ? err : new import_client2.FonderieApiError("unknown", String(err), 0);
|
|
131
84
|
error.value = apiError;
|
|
132
85
|
throw apiError;
|
|
133
86
|
}
|
|
@@ -137,12 +90,12 @@ function useTemplateRevisions(client, type, locale) {
|
|
|
137
90
|
}
|
|
138
91
|
|
|
139
92
|
// src/composables/useTemplates.ts
|
|
140
|
-
var
|
|
141
|
-
var
|
|
93
|
+
var import_client3 = require("@fonderie/client");
|
|
94
|
+
var import_vue3 = require("vue");
|
|
142
95
|
function useTemplates(client) {
|
|
143
|
-
const templates = (0,
|
|
144
|
-
const isLoading = (0,
|
|
145
|
-
const error = (0,
|
|
96
|
+
const templates = (0, import_vue3.ref)([]);
|
|
97
|
+
const isLoading = (0, import_vue3.ref)(true);
|
|
98
|
+
const error = (0, import_vue3.ref)(null);
|
|
146
99
|
async function refresh() {
|
|
147
100
|
isLoading.value = true;
|
|
148
101
|
error.value = null;
|
|
@@ -150,21 +103,42 @@ function useTemplates(client) {
|
|
|
150
103
|
const { result } = await client.listTemplates();
|
|
151
104
|
templates.value = result;
|
|
152
105
|
} catch (err) {
|
|
153
|
-
const apiError = err instanceof
|
|
106
|
+
const apiError = err instanceof import_client3.FonderieApiError ? err : new import_client3.FonderieApiError("unknown", String(err), 0);
|
|
154
107
|
error.value = apiError;
|
|
155
108
|
} finally {
|
|
156
109
|
isLoading.value = false;
|
|
157
110
|
}
|
|
158
111
|
}
|
|
159
112
|
void refresh();
|
|
160
|
-
|
|
113
|
+
async function saveTemplate(type, input, locale) {
|
|
114
|
+
error.value = null;
|
|
115
|
+
try {
|
|
116
|
+
const { result } = await client.setTemplate(type, input, locale);
|
|
117
|
+
await refresh();
|
|
118
|
+
return result;
|
|
119
|
+
} catch (err) {
|
|
120
|
+
const apiError = err instanceof import_client3.FonderieApiError ? err : new import_client3.FonderieApiError("unknown", String(err), 0);
|
|
121
|
+
error.value = apiError;
|
|
122
|
+
throw apiError;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
async function removeTemplate(type, locale) {
|
|
126
|
+
error.value = null;
|
|
127
|
+
try {
|
|
128
|
+
await client.deleteTemplate(type, locale);
|
|
129
|
+
await refresh();
|
|
130
|
+
} catch (err) {
|
|
131
|
+
const apiError = err instanceof import_client3.FonderieApiError ? err : new import_client3.FonderieApiError("unknown", String(err), 0);
|
|
132
|
+
error.value = apiError;
|
|
133
|
+
throw apiError;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return { templates, isLoading, error, refresh, saveTemplate, removeTemplate };
|
|
161
137
|
}
|
|
162
138
|
// Annotate the CommonJS export names for ESM import in node:
|
|
163
139
|
0 && (module.exports = {
|
|
164
140
|
CourierAdminClient,
|
|
165
141
|
FonderieApiError,
|
|
166
|
-
useDeleteTemplate,
|
|
167
|
-
useSaveTemplate,
|
|
168
142
|
useTemplate,
|
|
169
143
|
useTemplateRevisions,
|
|
170
144
|
useTemplates
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/composables/
|
|
1
|
+
{"version":3,"sources":["../src/index.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\tuseTemplate,\n\tuseTemplateRevisions,\n\tuseTemplates,\n} from './composables';\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, ISetTemplateInput, 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\tasync function saveTemplate(type: string, input: ISetTemplateInput, locale?: string | null) {\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await client.setTemplate(type, input, 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\tasync function removeTemplate(type: string, locale?: string | null) {\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait client.deleteTemplate(type, locale);\n\t\t\tawait refresh();\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\treturn { templates, isLoading, error, refresh, saveTemplate, removeTemplate };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,IAAAA,iBAAqD;;;ACPrD,oBAAiC;AACjC,iBAAoB;AAEb,SAAS,YAAY,QAA4B,MAAc,QAAwB;AAC7F,QAAM,eAAW,gBAA2B,IAAI;AAChD,QAAM,gBAAY,gBAAI,IAAI;AAC1B,QAAM,YAAQ,gBAA6B,IAAI;AAE/C,iBAAe,UAAU;AACxB,cAAU,QAAQ;AAClB,UAAM,QAAQ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}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
import * as _fonderie_client from '@fonderie/client';
|
|
2
|
-
import { CourierAdminClient,
|
|
2
|
+
import { CourierAdminClient, ITemplateEntry, FonderieApiError, ITemplateRevision, ISetTemplateInput } from '@fonderie/client';
|
|
3
3
|
export { CourierAdminClient, FonderieApiError, ICourierAdminClientOptions, IRollbackTemplateInput, ISetTemplateInput, ITemplateEntry, ITemplateRevision } from '@fonderie/client';
|
|
4
4
|
import * as vue from 'vue';
|
|
5
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
6
|
declare function useTemplate(client: CourierAdminClient, type: string, locale?: string | null): {
|
|
19
7
|
template: vue.Ref<{
|
|
20
8
|
type: string;
|
|
@@ -93,6 +81,8 @@ declare function useTemplates(client: CourierAdminClient): {
|
|
|
93
81
|
isLoading: vue.Ref<boolean, boolean>;
|
|
94
82
|
error: vue.Ref<FonderieApiError | null, FonderieApiError | null>;
|
|
95
83
|
refresh: () => Promise<void>;
|
|
84
|
+
saveTemplate: (type: string, input: ISetTemplateInput, locale?: string | null) => Promise<ITemplateEntry>;
|
|
85
|
+
removeTemplate: (type: string, locale?: string | null) => Promise<void>;
|
|
96
86
|
};
|
|
97
87
|
|
|
98
|
-
export {
|
|
88
|
+
export { useTemplate, useTemplateRevisions, useTemplates };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
import * as _fonderie_client from '@fonderie/client';
|
|
2
|
-
import { CourierAdminClient,
|
|
2
|
+
import { CourierAdminClient, ITemplateEntry, FonderieApiError, ITemplateRevision, ISetTemplateInput } from '@fonderie/client';
|
|
3
3
|
export { CourierAdminClient, FonderieApiError, ICourierAdminClientOptions, IRollbackTemplateInput, ISetTemplateInput, ITemplateEntry, ITemplateRevision } from '@fonderie/client';
|
|
4
4
|
import * as vue from 'vue';
|
|
5
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
6
|
declare function useTemplate(client: CourierAdminClient, type: string, locale?: string | null): {
|
|
19
7
|
template: vue.Ref<{
|
|
20
8
|
type: string;
|
|
@@ -93,6 +81,8 @@ declare function useTemplates(client: CourierAdminClient): {
|
|
|
93
81
|
isLoading: vue.Ref<boolean, boolean>;
|
|
94
82
|
error: vue.Ref<FonderieApiError | null, FonderieApiError | null>;
|
|
95
83
|
refresh: () => Promise<void>;
|
|
84
|
+
saveTemplate: (type: string, input: ISetTemplateInput, locale?: string | null) => Promise<ITemplateEntry>;
|
|
85
|
+
removeTemplate: (type: string, locale?: string | null) => Promise<void>;
|
|
96
86
|
};
|
|
97
87
|
|
|
98
|
-
export {
|
|
88
|
+
export { useTemplate, useTemplateRevisions, useTemplates };
|
package/dist/index.js
CHANGED
|
@@ -1,58 +1,13 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import { CourierAdminClient, FonderieApiError as
|
|
2
|
+
import { CourierAdminClient, FonderieApiError as FonderieApiError4 } from "@fonderie/client";
|
|
3
3
|
|
|
4
|
-
// src/composables/
|
|
4
|
+
// src/composables/useTemplate.ts
|
|
5
5
|
import { FonderieApiError } from "@fonderie/client";
|
|
6
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
7
|
function useTemplate(client, type, locale) {
|
|
53
|
-
const template =
|
|
54
|
-
const isLoading =
|
|
55
|
-
const error =
|
|
8
|
+
const template = ref(null);
|
|
9
|
+
const isLoading = ref(true);
|
|
10
|
+
const error = ref(null);
|
|
56
11
|
async function refresh() {
|
|
57
12
|
isLoading.value = true;
|
|
58
13
|
error.value = null;
|
|
@@ -60,7 +15,7 @@ function useTemplate(client, type, locale) {
|
|
|
60
15
|
const { result } = await client.getTemplate(type, locale);
|
|
61
16
|
template.value = result;
|
|
62
17
|
} catch (err) {
|
|
63
|
-
const apiError = err instanceof
|
|
18
|
+
const apiError = err instanceof FonderieApiError ? err : new FonderieApiError("unknown", String(err), 0);
|
|
64
19
|
error.value = apiError;
|
|
65
20
|
} finally {
|
|
66
21
|
isLoading.value = false;
|
|
@@ -71,12 +26,12 @@ function useTemplate(client, type, locale) {
|
|
|
71
26
|
}
|
|
72
27
|
|
|
73
28
|
// src/composables/useTemplateRevisions.ts
|
|
74
|
-
import { FonderieApiError as
|
|
75
|
-
import { ref as
|
|
29
|
+
import { FonderieApiError as FonderieApiError2 } from "@fonderie/client";
|
|
30
|
+
import { ref as ref2 } from "vue";
|
|
76
31
|
function useTemplateRevisions(client, type, locale) {
|
|
77
|
-
const revisions =
|
|
78
|
-
const isLoading =
|
|
79
|
-
const error =
|
|
32
|
+
const revisions = ref2([]);
|
|
33
|
+
const isLoading = ref2(true);
|
|
34
|
+
const error = ref2(null);
|
|
80
35
|
async function refresh() {
|
|
81
36
|
isLoading.value = true;
|
|
82
37
|
error.value = null;
|
|
@@ -84,7 +39,7 @@ function useTemplateRevisions(client, type, locale) {
|
|
|
84
39
|
const { result } = await client.listRevisions(type, locale);
|
|
85
40
|
revisions.value = result;
|
|
86
41
|
} catch (err) {
|
|
87
|
-
const apiError = err instanceof
|
|
42
|
+
const apiError = err instanceof FonderieApiError2 ? err : new FonderieApiError2("unknown", String(err), 0);
|
|
88
43
|
error.value = apiError;
|
|
89
44
|
} finally {
|
|
90
45
|
isLoading.value = false;
|
|
@@ -97,7 +52,7 @@ function useTemplateRevisions(client, type, locale) {
|
|
|
97
52
|
await refresh();
|
|
98
53
|
return result;
|
|
99
54
|
} catch (err) {
|
|
100
|
-
const apiError = err instanceof
|
|
55
|
+
const apiError = err instanceof FonderieApiError2 ? err : new FonderieApiError2("unknown", String(err), 0);
|
|
101
56
|
error.value = apiError;
|
|
102
57
|
throw apiError;
|
|
103
58
|
}
|
|
@@ -107,12 +62,12 @@ function useTemplateRevisions(client, type, locale) {
|
|
|
107
62
|
}
|
|
108
63
|
|
|
109
64
|
// src/composables/useTemplates.ts
|
|
110
|
-
import { FonderieApiError as
|
|
111
|
-
import { ref as
|
|
65
|
+
import { FonderieApiError as FonderieApiError3 } from "@fonderie/client";
|
|
66
|
+
import { ref as ref3 } from "vue";
|
|
112
67
|
function useTemplates(client) {
|
|
113
|
-
const templates =
|
|
114
|
-
const isLoading =
|
|
115
|
-
const error =
|
|
68
|
+
const templates = ref3([]);
|
|
69
|
+
const isLoading = ref3(true);
|
|
70
|
+
const error = ref3(null);
|
|
116
71
|
async function refresh() {
|
|
117
72
|
isLoading.value = true;
|
|
118
73
|
error.value = null;
|
|
@@ -120,20 +75,41 @@ function useTemplates(client) {
|
|
|
120
75
|
const { result } = await client.listTemplates();
|
|
121
76
|
templates.value = result;
|
|
122
77
|
} catch (err) {
|
|
123
|
-
const apiError = err instanceof
|
|
78
|
+
const apiError = err instanceof FonderieApiError3 ? err : new FonderieApiError3("unknown", String(err), 0);
|
|
124
79
|
error.value = apiError;
|
|
125
80
|
} finally {
|
|
126
81
|
isLoading.value = false;
|
|
127
82
|
}
|
|
128
83
|
}
|
|
129
84
|
void refresh();
|
|
130
|
-
|
|
85
|
+
async function saveTemplate(type, input, locale) {
|
|
86
|
+
error.value = null;
|
|
87
|
+
try {
|
|
88
|
+
const { result } = await client.setTemplate(type, input, locale);
|
|
89
|
+
await refresh();
|
|
90
|
+
return result;
|
|
91
|
+
} catch (err) {
|
|
92
|
+
const apiError = err instanceof FonderieApiError3 ? err : new FonderieApiError3("unknown", String(err), 0);
|
|
93
|
+
error.value = apiError;
|
|
94
|
+
throw apiError;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
async function removeTemplate(type, locale) {
|
|
98
|
+
error.value = null;
|
|
99
|
+
try {
|
|
100
|
+
await client.deleteTemplate(type, locale);
|
|
101
|
+
await refresh();
|
|
102
|
+
} catch (err) {
|
|
103
|
+
const apiError = err instanceof FonderieApiError3 ? err : new FonderieApiError3("unknown", String(err), 0);
|
|
104
|
+
error.value = apiError;
|
|
105
|
+
throw apiError;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return { templates, isLoading, error, refresh, saveTemplate, removeTemplate };
|
|
131
109
|
}
|
|
132
110
|
export {
|
|
133
111
|
CourierAdminClient,
|
|
134
|
-
|
|
135
|
-
useDeleteTemplate,
|
|
136
|
-
useSaveTemplate,
|
|
112
|
+
FonderieApiError4 as FonderieApiError,
|
|
137
113
|
useTemplate,
|
|
138
114
|
useTemplateRevisions,
|
|
139
115
|
useTemplates
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/composables/
|
|
1
|
+
{"version":3,"sources":["../src/index.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\tuseTemplate,\n\tuseTemplateRevisions,\n\tuseTemplates,\n} from './composables';\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, ISetTemplateInput, 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\tasync function saveTemplate(type: string, input: ISetTemplateInput, locale?: string | null) {\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await client.setTemplate(type, input, 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\tasync function removeTemplate(type: string, locale?: string | null) {\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait client.deleteTemplate(type, locale);\n\t\t\tawait refresh();\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;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,EACD;AAEA,iBAAe,eAAe,MAAc,QAAwB;AACnE,UAAM,QAAQ;AACd,QAAI;AACH,YAAM,OAAO,eAAe,MAAM,MAAM;AACxC,YAAM,QAAQ;AAAA,IACf,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,SAAO,EAAE,WAAW,WAAW,OAAO,SAAS,cAAc,eAAe;AAC7E;","names":["FonderieApiError","FonderieApiError","ref","FonderieApiError","ref"]}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonderie/vue-courier-admin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Vue 3 composables for the Fonderie courier admin API (email/SMS/push template management) — thin bindings over @fonderie/client's CourierAdminClient.",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"
|
|
6
|
+
"fonderiejs",
|
|
7
7
|
"vue",
|
|
8
8
|
"courier",
|
|
9
9
|
"templates",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"vue": ">=3.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@types/node": "^
|
|
44
|
+
"@types/node": "^26.2.0",
|
|
45
45
|
"tsup": "^8.5.1",
|
|
46
46
|
"typescript": "^6.0.3",
|
|
47
47
|
"vue": "^3.5.0"
|