@saasicat/ui-vue 0.26.0 → 0.27.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.
Files changed (36) hide show
  1. package/LICENSE +90 -201
  2. package/README.md +23 -0
  3. package/dist/{catalog-Dch1Ryw0.d.cts → catalog-Dv2twuNi.d.cts} +205 -4
  4. package/dist/{catalog-Dch1Ryw0.d.ts → catalog-Dv2twuNi.d.ts} +205 -4
  5. package/dist/{chunk-BPF2BMCQ.js → chunk-4IZWT4UY.js} +414 -2
  6. package/dist/{chunk-O3J3ITF2.js → chunk-LK6YJDXC.js} +1 -1
  7. package/dist/{chunk-NEXTZZRQ.js → chunk-NRVF3JJJ.js} +2 -2
  8. package/dist/client/index.cjs +426 -5
  9. package/dist/client/index.d.cts +70 -4
  10. package/dist/client/index.d.ts +70 -4
  11. package/dist/client/index.js +22 -4
  12. package/dist/index.cjs +429 -8
  13. package/dist/index.d.cts +5 -5
  14. package/dist/index.d.ts +5 -5
  15. package/dist/index.js +23 -5
  16. package/dist/quasar/index.cjs +411 -2
  17. package/dist/quasar/index.d.cts +2 -2
  18. package/dist/quasar/index.d.ts +2 -2
  19. package/dist/quasar/index.js +2 -2
  20. package/dist/{resource-registry-D7Xjs-5f.d.cts → resource-registry-BxFpnzHY.d.cts} +1 -1
  21. package/dist/{resource-registry-TaR7rtq0.d.ts → resource-registry-Cn1Gy2LE.d.ts} +1 -1
  22. package/package.json +5 -4
  23. package/src/client/admin-error.ts +18 -1
  24. package/src/client/attach-cause.ts +21 -0
  25. package/src/client/nav-builder.ts +3 -1
  26. package/src/client/resources/bundles.resource.ts +145 -0
  27. package/src/client/resources/catalog.resource.ts +160 -0
  28. package/src/client/resources/discovery.resource.ts +108 -0
  29. package/src/client/resources/index.ts +52 -14
  30. package/src/client/resources/marketing.resource.ts +121 -0
  31. package/src/client/resources/promo-codes.resource.ts +63 -0
  32. package/src/client/resources/promotions.resource.ts +44 -0
  33. package/src/client/resources/subscriptions.resource.ts +19 -0
  34. package/src/client/resources/tenants.resource.ts +35 -9
  35. package/src/client/resources/users.resource.ts +31 -0
  36. package/src/pages-standard/SuperAdminSetupWizard.vue +7 -4
@@ -1,6 +1,6 @@
1
- import { H as HttpClient, a as SaMessages, K as KvStore, S as SaLocale, a9 as SaNavMessages } from '../catalog-Dch1Ryw0.js';
2
- export { i as ActionDefNotInManifestError, A as ActionHandler, h as ActionRegistry, j as AuditListFilter, B as Bound, D as DEFAULT_SA_LOCALE, k as DefineResourceOptions, l as HttpResponse, L as LIST_FIRST_PAGE, m as LIST_PAGE_SIZE_DEFAULT, n as LIST_PAGE_SIZE_MAX, o as LIST_PAGINATION_PARAMS, q as ListFilterOf, r as ListOp, s as ListQuery, M as MessageTree, t as MissingHandlerError, u as PartialMessages, P as PlatformResources, v as PublishPlanVersionOptions, w as ResolvedAction, f as ResourceContext, R as ResourceDef, g as ResourceListPage, x as ResourceOp, e as ResourceOps, y as SA_INTL_LOCALES, z as SA_LOCALES, C as SA_LOCALE_LABELS, E as SA_MESSAGES, F as SaBuiltinLocale, G as SaCatalog, I as SaCatalogOptions, c as SaLocaleDefinition, b as SaLocaleOption, d as SaMessagesOverrides, T as TenantsListFilter, J as TranslationOf, N as auditResource, O as bindResource, Q as clampListPage, U as clampListPageSize, V as createSaCatalog, W as defaultHttpClient, X as defaultKvStore, Y as defineListOp, Z as defineMessages, _ as defineResource, $ as filterQueryString, a0 as isSaBuiltinLocale, a1 as isSentInQuery, a2 as listUrl, a3 as mergeMessages, a4 as planVersionsResource, a5 as plansResource, p as platformResources, a6 as readListPage, a7 as resolveMessages, a8 as tenantsResource } from '../catalog-Dch1Ryw0.js';
3
- import { PublicBootResponse, AdminManifest, StandardPageKey, TenantColumnDef, PromoCodeRecord, AdminTenantDetail, AdminUserListFilter, AdminUserListRow, AdminAuditListFilter, AuditEntry, AdminSubscriptionListRow } from '@saasicat/types';
1
+ import { H as HttpClient, R as ResourceDef, f as ResourceContext, a as SaMessages, K as KvStore, S as SaLocale, ai as SaNavMessages } from '../catalog-Dv2twuNi.js';
2
+ export { i as ActionDefNotInManifestError, A as ActionHandler, h as ActionRegistry, j as AuditListFilter, B as Bound, D as DEFAULT_SA_LOCALE, k as DefineResourceOptions, l as DiscoveryRead, m as HttpResponse, L as LIST_FIRST_PAGE, n as LIST_PAGE_SIZE_DEFAULT, o as LIST_PAGE_SIZE_MAX, q as LIST_PAGINATION_PARAMS, r as ListFilterOf, s as ListOp, t as ListQuery, M as MarketingProjectionsFilter, u as MessageTree, v as MissingHandlerError, w as PartialMessages, P as PlatformResources, x as PromoCodesFilter, y as PublishBundleVersionOptions, z as PublishPlanVersionOptions, C as ResolvedAction, g as ResourceListPage, E as ResourceOp, e as ResourceOps, F as SA_INTL_LOCALES, G as SA_LOCALES, I as SA_LOCALE_LABELS, J as SA_MESSAGES, N as SaBuiltinLocale, O as SaCatalog, Q as SaCatalogOptions, c as SaLocaleDefinition, b as SaLocaleOption, d as SaMessagesOverrides, T as TenantsListFilter, U as TranslationOf, V as auditResource, W as bindResource, X as bundleVersionsResource, Y as bundlesResource, Z as clampListPage, _ as clampListPageSize, $ as createSaCatalog, a0 as defaultHttpClient, a1 as defaultKvStore, a2 as defineListOp, a3 as defineMessages, a4 as defineResource, a5 as discoveryResource, a6 as filterQueryString, a7 as isSaBuiltinLocale, a8 as isSentInQuery, a9 as listUrl, aa as marketingResource, ab as mergeMessages, ac as planVersionsResource, ad as plansResource, p as platformResources, ae as promoCodesResource, af as readListPage, ag as resolveMessages, ah as tenantsResource } from '../catalog-Dv2twuNi.js';
3
+ import { CapabilityCatalogEntryRow, FeatureCatalogEntryRow, QuotaCatalogEntryRow, ReviewCatalogEntryData, CatalogEntryI18n, UpdateCatalogEntryBaseData, DiscoverySnapshot, SyncDiscoveryResult, PromotionRow, CreatePromotionData, UpdatePromotionData, AdminUserListFilter, AdminUserListRow, AdminSubscriptionListRow, PublicBootResponse, AdminManifest, StandardPageKey, TenantColumnDef, PromoCodeRecord, AdminTenantDetail, AdminAuditListFilter, AuditEntry } from '@saasicat/types';
4
4
 
5
5
  declare const ADMIN_UI_VERSION = "1.2.0";
6
6
 
@@ -169,6 +169,57 @@ declare function requestJson<T>(http: HttpClient, url: string, init?: ResourceRe
169
169
  */
170
170
  declare function requestJsonBody<T>(http: HttpClient, url: string, what: string, init?: ResourceRequestInit): Promise<T>;
171
171
 
172
+ /**
173
+ * The discovered catalogue and the review decisions taken on it.
174
+ *
175
+ * Entry keys are encoded on the way into the path — that is what
176
+ * `useCatalogEntries` does, and a feature key legitimately contains characters
177
+ * (`.`, `:`) that a code scan produces.
178
+ */
179
+ declare const catalogResource: ResourceDef<{
180
+ readonly capabilities: (http: HttpClient, ctx: ResourceContext) => Promise<CapabilityCatalogEntryRow[]>;
181
+ readonly features: (http: HttpClient, ctx: ResourceContext) => Promise<FeatureCatalogEntryRow[]>;
182
+ readonly quotas: (http: HttpClient, ctx: ResourceContext) => Promise<QuotaCatalogEntryRow[]>;
183
+ readonly reviewFeature: (http: HttpClient, ctx: ResourceContext, featureKey: string, data: ReviewCatalogEntryData) => Promise<FeatureCatalogEntryRow>;
184
+ readonly reviewQuota: (http: HttpClient, ctx: ResourceContext, quotaKey: string, data: ReviewCatalogEntryData) => Promise<QuotaCatalogEntryRow>;
185
+ /** The translations are wrapped in `{ i18n }` here, not by the caller. */
186
+ readonly setFeatureI18n: (http: HttpClient, ctx: ResourceContext, featureKey: string, i18n: CatalogEntryI18n) => Promise<FeatureCatalogEntryRow>;
187
+ readonly setQuotaI18n: (http: HttpClient, ctx: ResourceContext, quotaKey: string, i18n: CatalogEntryI18n) => Promise<QuotaCatalogEntryRow>;
188
+ readonly setFeatureBase: (http: HttpClient, ctx: ResourceContext, featureKey: string, data: UpdateCatalogEntryBaseData) => Promise<FeatureCatalogEntryRow>;
189
+ readonly setQuotaBase: (http: HttpClient, ctx: ResourceContext, quotaKey: string, data: UpdateCatalogEntryBaseData) => Promise<QuotaCatalogEntryRow>;
190
+ /**
191
+ * Writes a discovery snapshot into the catalogue.
192
+ *
193
+ * The request only. `useCatalogEntries.syncDiscovery` reloads the three
194
+ * lists afterwards, which is that composable keeping its refs true —
195
+ * not part of the call, and not something an override should inherit
196
+ * invisibly.
197
+ */
198
+ readonly syncDiscovery: (http: HttpClient, ctx: ResourceContext, snapshot: DiscoverySnapshot) => Promise<SyncDiscoveryResult>;
199
+ }>;
200
+
201
+ declare const promotionsResource: ResourceDef<{
202
+ readonly list: (http: HttpClient, ctx: ResourceContext) => Promise<PromotionRow[]>;
203
+ readonly create: (http: HttpClient, ctx: ResourceContext, data: CreatePromotionData) => Promise<PromotionRow>;
204
+ readonly update: (http: HttpClient, ctx: ResourceContext, id: string, data: UpdatePromotionData) => Promise<PromotionRow>;
205
+ readonly remove: (http: HttpClient, ctx: ResourceContext, id: string) => Promise<void>;
206
+ }>;
207
+
208
+ declare const usersResource: ResourceDef<{
209
+ /**
210
+ * `q` searches name and mail, `tenant` narrows to one tenant's members.
211
+ *
212
+ * Both are dropped when empty rather than sent as `q=` — see
213
+ * `isSentInQuery`; an empty search that reached the server would filter
214
+ * every row away on an endpoint that treats the parameter as a substring.
215
+ */
216
+ readonly list: (http: HttpClient, ctx: ResourceContext, filter?: AdminUserListFilter) => Promise<AdminUserListRow[]>;
217
+ }>;
218
+
219
+ declare const subscriptionsResource: ResourceDef<{
220
+ readonly list: (http: HttpClient, ctx: ResourceContext) => Promise<AdminSubscriptionListRow[]>;
221
+ }>;
222
+
172
223
  /**
173
224
  * Marks an error as one this package raised. Called by the package's own error
174
225
  * classes in their constructors; nothing else should call it.
@@ -260,6 +311,21 @@ declare class AdminError extends Error {
260
311
  readonly emptyResponse: boolean;
261
312
  /** The request never reached the server. See `AdminErrorInit`. */
262
313
  readonly transportFailure: boolean;
314
+ /**
315
+ * The error this one was raised from, when `AdminErrorInit` carried one.
316
+ *
317
+ * `declare` because the property is real but not emitted here: `attachCause`
318
+ * defines it, exactly as the ES2022 `Error` constructor would. The
319
+ * declaration is what makes it *readable* — `Error.cause` lives in
320
+ * `lib.es2022.error.d.ts`, and this package supports consumers on ES2021,
321
+ * where taking a cause in and never being able to read it out would be a
322
+ * one-way public API.
323
+ *
324
+ * Not `readonly`, unlike its siblings: the inherited `Error.cause` is
325
+ * writable, and narrowing that in a patch release would reject assignments
326
+ * a consumer can make today on ES2022.
327
+ */
328
+ cause?: unknown;
263
329
  constructor(init?: AdminErrorInit);
264
330
  }
265
331
  /** Whether `err` is an `AdminError`, including one from another bundle copy. */
@@ -863,4 +929,4 @@ declare function identityAccentFor(key: string, overrides?: Readonly<Record<stri
863
929
  */
864
930
  declare function identityChipStyle(accent: string): Record<string, string>;
865
931
 
866
- export { ADMIN_UI_VERSION, AdminError, type AdminErrorInit, type AdminPromoListFilter, type AdminPromoListRow, type AdminResourceClientOptions, type AxiosHttpClientOptions, type AxiosLike, type AxiosLikeConfig, type AxiosLikeResponse, type AxiosLikeResponseConfig, type AxiosResponseBody, type BatchColumnData, BatchColumnDriftError, BatchColumnFetcher, type BatchColumnFetcherOptions, type BatchColumnRow, type BatchColumnValue, BootLoadError, BootLoader, type BootLoaderOptions, type BuildRouteEntry, type CachedManifestEntry, DEFAULT_STANDARD_PAGE_ROUTES, type FetchHttpClientOptions, HttpClient, HttpJsonError, IDENTITY_ACCENTS, IDENTITY_ACCENT_VALUES, IDENTITY_NEUTRAL, IDENTITY_NEUTRAL_VALUE, KvStore, type LoginBootProject, type LoginBrandFallback, type LoginBranding, ManifestLoadError, ManifestLoader, type ManifestLoaderOptions, type MessageParams, type NavBuilderOptions, type ParamStyle, type PlanCounts, type PlanRowLike, type PlanVersionLike, type ResolvePlansInput, type ResolvedPlan, type ResourceRequestInit, SaLocale, SaMessages, type SidebarItem, type SidebarSection, adminErrorMessage, buildRoutes, buildSidebar, countPlans, createAdminResourceClient, createAxiosHttpClient, createFetchHttpClient, defaultSectionOrder, formatCurrency, formatMessage, getJson, identityAccentAt, identityAccentFor, identityChipStyle, isAdminError, isAxiosNoResponseError, isCurrentlyValid, isEmptyResponse, isExpired, isFutureScheduled, isPlatformError, isProductionBoot, isTransportFailure, markEmptyResponse, markPlatformError, markTransportFailure, postJson, readErrorCode, readErrorDetail, requestJson, requestJsonBody, requireServerAnswer, resolveExtension, resolveLoginBranding, resolvePlans, toAdminError, todayIsoDate, trimTrailingSlashes };
932
+ export { ADMIN_UI_VERSION, AdminError, type AdminErrorInit, type AdminPromoListFilter, type AdminPromoListRow, type AdminResourceClientOptions, type AxiosHttpClientOptions, type AxiosLike, type AxiosLikeConfig, type AxiosLikeResponse, type AxiosLikeResponseConfig, type AxiosResponseBody, type BatchColumnData, BatchColumnDriftError, BatchColumnFetcher, type BatchColumnFetcherOptions, type BatchColumnRow, type BatchColumnValue, BootLoadError, BootLoader, type BootLoaderOptions, type BuildRouteEntry, type CachedManifestEntry, DEFAULT_STANDARD_PAGE_ROUTES, type FetchHttpClientOptions, HttpClient, HttpJsonError, IDENTITY_ACCENTS, IDENTITY_ACCENT_VALUES, IDENTITY_NEUTRAL, IDENTITY_NEUTRAL_VALUE, KvStore, type LoginBootProject, type LoginBrandFallback, type LoginBranding, ManifestLoadError, ManifestLoader, type ManifestLoaderOptions, type MessageParams, type NavBuilderOptions, type ParamStyle, type PlanCounts, type PlanRowLike, type PlanVersionLike, type ResolvePlansInput, type ResolvedPlan, ResourceContext, ResourceDef, type ResourceRequestInit, SaLocale, SaMessages, type SidebarItem, type SidebarSection, adminErrorMessage, buildRoutes, buildSidebar, catalogResource, countPlans, createAdminResourceClient, createAxiosHttpClient, createFetchHttpClient, defaultSectionOrder, formatCurrency, formatMessage, getJson, identityAccentAt, identityAccentFor, identityChipStyle, isAdminError, isAxiosNoResponseError, isCurrentlyValid, isEmptyResponse, isExpired, isFutureScheduled, isPlatformError, isProductionBoot, isTransportFailure, markEmptyResponse, markPlatformError, markTransportFailure, postJson, promotionsResource, readErrorCode, readErrorDetail, requestJson, requestJsonBody, requireServerAnswer, resolveExtension, resolveLoginBranding, resolvePlans, subscriptionsResource, toAdminError, todayIsoDate, trimTrailingSlashes, usersResource };
@@ -27,7 +27,7 @@ import {
27
27
  resolveLoginBranding,
28
28
  resolvePlans,
29
29
  todayIsoDate
30
- } from "../chunk-NEXTZZRQ.js";
30
+ } from "../chunk-NRVF3JJJ.js";
31
31
  import {
32
32
  AdminError,
33
33
  BootLoadError,
@@ -47,6 +47,9 @@ import {
47
47
  adminErrorMessage,
48
48
  auditResource,
49
49
  bindResource,
50
+ bundleVersionsResource,
51
+ bundlesResource,
52
+ catalogResource,
50
53
  clampListPage,
51
54
  clampListPageSize,
52
55
  createFetchHttpClient,
@@ -56,6 +59,7 @@ import {
56
59
  defineListOp,
57
60
  defineMessages,
58
61
  defineResource,
62
+ discoveryResource,
59
63
  filterQueryString,
60
64
  formatCurrency,
61
65
  formatMessage,
@@ -71,11 +75,14 @@ import {
71
75
  markEmptyResponse,
72
76
  markPlatformError,
73
77
  markTransportFailure,
78
+ marketingResource,
74
79
  mergeMessages,
75
80
  planVersionsResource,
76
81
  plansResource,
77
82
  platformResources,
78
83
  postJson,
84
+ promoCodesResource,
85
+ promotionsResource,
79
86
  readErrorCode,
80
87
  readErrorDetail,
81
88
  readListPage,
@@ -83,10 +90,12 @@ import {
83
90
  requestJsonBody,
84
91
  requireServerAnswer,
85
92
  resolveMessages,
93
+ subscriptionsResource,
86
94
  tenantsResource,
87
95
  toAdminError,
88
- trimTrailingSlashes
89
- } from "../chunk-BPF2BMCQ.js";
96
+ trimTrailingSlashes,
97
+ usersResource
98
+ } from "../chunk-4IZWT4UY.js";
90
99
  export {
91
100
  ADMIN_UI_VERSION,
92
101
  ActionDefNotInManifestError,
@@ -119,6 +128,9 @@ export {
119
128
  bindResource,
120
129
  buildRoutes,
121
130
  buildSidebar,
131
+ bundleVersionsResource,
132
+ bundlesResource,
133
+ catalogResource,
122
134
  clampListPage,
123
135
  clampListPageSize,
124
136
  countPlans,
@@ -132,6 +144,7 @@ export {
132
144
  defineListOp,
133
145
  defineMessages,
134
146
  defineResource,
147
+ discoveryResource,
135
148
  filterQueryString,
136
149
  formatCurrency,
137
150
  formatMessage,
@@ -154,11 +167,14 @@ export {
154
167
  markEmptyResponse,
155
168
  markPlatformError,
156
169
  markTransportFailure,
170
+ marketingResource,
157
171
  mergeMessages,
158
172
  planVersionsResource,
159
173
  plansResource,
160
174
  platformResources,
161
175
  postJson,
176
+ promoCodesResource,
177
+ promotionsResource,
162
178
  readErrorCode,
163
179
  readErrorDetail,
164
180
  readListPage,
@@ -169,8 +185,10 @@ export {
169
185
  resolveLoginBranding,
170
186
  resolveMessages,
171
187
  resolvePlans,
188
+ subscriptionsResource,
172
189
  tenantsResource,
173
190
  toAdminError,
174
191
  todayIsoDate,
175
- trimTrailingSlashes
192
+ trimTrailingSlashes,
193
+ usersResource
176
194
  };