@fonderie/vue-courier-admin 0.1.0 → 0.2.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 +24 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +24 -1
- 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
|
@@ -157,7 +157,30 @@ function useTemplates(client) {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
void refresh();
|
|
160
|
-
|
|
160
|
+
async function saveTemplate(type, input, locale) {
|
|
161
|
+
error.value = null;
|
|
162
|
+
try {
|
|
163
|
+
const { result } = await client.setTemplate(type, input, locale);
|
|
164
|
+
await refresh();
|
|
165
|
+
return result;
|
|
166
|
+
} catch (err) {
|
|
167
|
+
const apiError = err instanceof import_client5.FonderieApiError ? err : new import_client5.FonderieApiError("unknown", String(err), 0);
|
|
168
|
+
error.value = apiError;
|
|
169
|
+
throw apiError;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
async function removeTemplate(type, locale) {
|
|
173
|
+
error.value = null;
|
|
174
|
+
try {
|
|
175
|
+
await client.deleteTemplate(type, locale);
|
|
176
|
+
await refresh();
|
|
177
|
+
} catch (err) {
|
|
178
|
+
const apiError = err instanceof import_client5.FonderieApiError ? err : new import_client5.FonderieApiError("unknown", String(err), 0);
|
|
179
|
+
error.value = apiError;
|
|
180
|
+
throw apiError;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return { templates, isLoading, error, refresh, saveTemplate, removeTemplate };
|
|
161
184
|
}
|
|
162
185
|
// Annotate the CommonJS export names for ESM import in node:
|
|
163
186
|
0 && (module.exports = {
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +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;
|
|
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\n/** @deprecated Use useTemplates(client).removeTemplate — the list composable self-refreshes after the write. */\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\n/** @deprecated Use useTemplates(client).saveTemplate — the list composable self-refreshes after the write. */\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, 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) {\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) {\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;AAAA;AAAA;AAQA,IAAAA,iBAAqD;;;ACPrD,oBAAiC;AACjC,iBAAoB;AAGb,SAAS,kBAAkB,QAA4B;A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ACzD;;;AC5CA,IAAAC,iBAAiC;AACjC,IAAAC,cAAoB;AAEb,SAAS,aAAa,QAA4B;AACxD,QAAM,gBAAY,iBAAsB,CAAC,CAAC;AAC1C,QAAM,gBAAY,iBAAI,IAAI;AAC1B,QAAM,YAAQ,iBAA6B,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,eAAe,kCAAmB,MAAM,IAAI,gCAAiB,WAAW,OAAO,GAAG,GAAG,CAAC;AACvF,YAAM,QAAQ;AAAA,IACf,UAAE;AACD,gBAAU,QAAQ;AAAA,IACnB;AAAA,EACD;AAEA,OAAK,QAAQ;AAEb,iBAAe,aAAa,MAAc,OAA0B,QAAiB;AACpF,UAAM,QAAQ;AACd,QAAI;AACH,YAAM,EAAE,OAAO,IAAI,MAAM,OAAO,YAAY,MAAM,OAAO,MAAM;AAC/D,YAAM,QAAQ;AACd,aAAO;AAAA,IACR,SAAS,KAAK;AACb,YAAM,WACL,eAAe,kCAAmB,MAAM,IAAI,gCAAiB,WAAW,OAAO,GAAG,GAAG,CAAC;AACvF,YAAM,QAAQ;AACd,YAAM;AAAA,IACP;AAAA,EACD;AAEA,iBAAe,eAAe,MAAc,QAAiB;AAC5D,UAAM,QAAQ;AACd,QAAI;AACH,YAAM,OAAO,eAAe,MAAM,MAAM;AACxC,YAAM,QAAQ;AAAA,IACf,SAAS,KAAK;AACb,YAAM,WACL,eAAe,kCAAmB,MAAM,IAAI,gCAAiB,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":["import_client","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -3,12 +3,14 @@ import { CourierAdminClient, FonderieApiError, ISetTemplateInput, ITemplateEntry
|
|
|
3
3
|
export { CourierAdminClient, FonderieApiError, ICourierAdminClientOptions, IRollbackTemplateInput, ISetTemplateInput, ITemplateEntry, ITemplateRevision } from '@fonderie/client';
|
|
4
4
|
import * as vue from 'vue';
|
|
5
5
|
|
|
6
|
+
/** @deprecated Use useTemplates(client).removeTemplate — the list composable self-refreshes after the write. */
|
|
6
7
|
declare function useDeleteTemplate(client: CourierAdminClient): {
|
|
7
8
|
deleteTemplate: (type: string, locale?: string | null) => Promise<void>;
|
|
8
9
|
isLoading: vue.Ref<boolean, boolean>;
|
|
9
10
|
error: vue.Ref<FonderieApiError | null, FonderieApiError | null>;
|
|
10
11
|
};
|
|
11
12
|
|
|
13
|
+
/** @deprecated Use useTemplates(client).saveTemplate — the list composable self-refreshes after the write. */
|
|
12
14
|
declare function useSaveTemplate(client: CourierAdminClient): {
|
|
13
15
|
saveTemplate: (type: string, input: ISetTemplateInput, locale?: string | null) => Promise<_fonderie_client.ITemplateEntry>;
|
|
14
16
|
isLoading: vue.Ref<boolean, boolean>;
|
|
@@ -93,6 +95,8 @@ declare function useTemplates(client: CourierAdminClient): {
|
|
|
93
95
|
isLoading: vue.Ref<boolean, boolean>;
|
|
94
96
|
error: vue.Ref<FonderieApiError | null, FonderieApiError | null>;
|
|
95
97
|
refresh: () => Promise<void>;
|
|
98
|
+
saveTemplate: (type: string, input: ISetTemplateInput, locale?: string) => Promise<ITemplateEntry>;
|
|
99
|
+
removeTemplate: (type: string, locale?: string) => Promise<void>;
|
|
96
100
|
};
|
|
97
101
|
|
|
98
102
|
export { useDeleteTemplate, useSaveTemplate, useTemplate, useTemplateRevisions, useTemplates };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,12 +3,14 @@ import { CourierAdminClient, FonderieApiError, ISetTemplateInput, ITemplateEntry
|
|
|
3
3
|
export { CourierAdminClient, FonderieApiError, ICourierAdminClientOptions, IRollbackTemplateInput, ISetTemplateInput, ITemplateEntry, ITemplateRevision } from '@fonderie/client';
|
|
4
4
|
import * as vue from 'vue';
|
|
5
5
|
|
|
6
|
+
/** @deprecated Use useTemplates(client).removeTemplate — the list composable self-refreshes after the write. */
|
|
6
7
|
declare function useDeleteTemplate(client: CourierAdminClient): {
|
|
7
8
|
deleteTemplate: (type: string, locale?: string | null) => Promise<void>;
|
|
8
9
|
isLoading: vue.Ref<boolean, boolean>;
|
|
9
10
|
error: vue.Ref<FonderieApiError | null, FonderieApiError | null>;
|
|
10
11
|
};
|
|
11
12
|
|
|
13
|
+
/** @deprecated Use useTemplates(client).saveTemplate — the list composable self-refreshes after the write. */
|
|
12
14
|
declare function useSaveTemplate(client: CourierAdminClient): {
|
|
13
15
|
saveTemplate: (type: string, input: ISetTemplateInput, locale?: string | null) => Promise<_fonderie_client.ITemplateEntry>;
|
|
14
16
|
isLoading: vue.Ref<boolean, boolean>;
|
|
@@ -93,6 +95,8 @@ declare function useTemplates(client: CourierAdminClient): {
|
|
|
93
95
|
isLoading: vue.Ref<boolean, boolean>;
|
|
94
96
|
error: vue.Ref<FonderieApiError | null, FonderieApiError | null>;
|
|
95
97
|
refresh: () => Promise<void>;
|
|
98
|
+
saveTemplate: (type: string, input: ISetTemplateInput, locale?: string) => Promise<ITemplateEntry>;
|
|
99
|
+
removeTemplate: (type: string, locale?: string) => Promise<void>;
|
|
96
100
|
};
|
|
97
101
|
|
|
98
102
|
export { useDeleteTemplate, useSaveTemplate, useTemplate, useTemplateRevisions, useTemplates };
|
package/dist/index.js
CHANGED
|
@@ -127,7 +127,30 @@ function useTemplates(client) {
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
void refresh();
|
|
130
|
-
|
|
130
|
+
async function saveTemplate(type, input, locale) {
|
|
131
|
+
error.value = null;
|
|
132
|
+
try {
|
|
133
|
+
const { result } = await client.setTemplate(type, input, locale);
|
|
134
|
+
await refresh();
|
|
135
|
+
return result;
|
|
136
|
+
} catch (err) {
|
|
137
|
+
const apiError = err instanceof FonderieApiError5 ? err : new FonderieApiError5("unknown", String(err), 0);
|
|
138
|
+
error.value = apiError;
|
|
139
|
+
throw apiError;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
async function removeTemplate(type, locale) {
|
|
143
|
+
error.value = null;
|
|
144
|
+
try {
|
|
145
|
+
await client.deleteTemplate(type, locale);
|
|
146
|
+
await refresh();
|
|
147
|
+
} catch (err) {
|
|
148
|
+
const apiError = err instanceof FonderieApiError5 ? err : new FonderieApiError5("unknown", String(err), 0);
|
|
149
|
+
error.value = apiError;
|
|
150
|
+
throw apiError;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return { templates, isLoading, error, refresh, saveTemplate, removeTemplate };
|
|
131
154
|
}
|
|
132
155
|
export {
|
|
133
156
|
CourierAdminClient,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +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;
|
|
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\n/** @deprecated Use useTemplates(client).removeTemplate — the list composable self-refreshes after the write. */\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\n/** @deprecated Use useTemplates(client).saveTemplate — the list composable self-refreshes after the write. */\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, 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) {\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) {\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":";AAQA,SAAS,oBAAoB,oBAAAA,yBAAwB;;;ACPrD,SAAS,wBAAwB;AACjC,SAAS,WAAW;AAGb,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;;;ACxBA,SAAS,oBAAAC,yBAAwB;AACjC,SAAS,OAAAC,YAAW;AAGb,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,MAA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d,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,iBAAe,eAAe,MAAc,QAAiB;AAC5D,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","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.2.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"
|