@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
package/LICENSE CHANGED
@@ -1,202 +1,91 @@
1
+ Required Notice: Copyright Taci Ülker (https://github.com/uelker70/saasicat)
1
2
 
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- APPENDIX: How to apply the Apache License to your work.
180
-
181
- To apply the Apache License to your work, attach the following
182
- boilerplate notice, with the fields enclosed by brackets "[]"
183
- replaced with your own identifying information. (Don't include
184
- the brackets!) The text should be enclosed in the appropriate
185
- comment syntax for the file format. We also recommend that a
186
- file or class name and description of purpose be included on the
187
- same "printed page" as the copyright notice for easier
188
- identification within third-party archives.
189
-
190
- Copyright [yyyy] [name of copyright owner]
191
-
192
- Licensed under the Apache License, Version 2.0 (the "License");
193
- you may not use this file except in compliance with the License.
194
- You may obtain a copy of the License at
195
-
196
- http://www.apache.org/licenses/LICENSE-2.0
197
-
198
- Unless required by applicable law or agreed to in writing, software
199
- distributed under the License is distributed on an "AS IS" BASIS,
200
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
- See the License for the specific language governing permissions and
202
- limitations under the License.
3
+ # PolyForm Shield License 1.0.0
4
+
5
+ <https://polyformproject.org/licenses/shield/1.0.0>
6
+
7
+ ## Acceptance
8
+
9
+ In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
10
+
11
+ ## Copyright License
12
+
13
+ The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
14
+
15
+ ## Distribution License
16
+
17
+ The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
18
+
19
+ ## Notices
20
+
21
+ You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
22
+
23
+ > Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
24
+
25
+ ## Changes and New Works License
26
+
27
+ The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
28
+
29
+ ## Patent License
30
+
31
+ The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
32
+
33
+ ## Noncompete
34
+
35
+ Any purpose is a permitted purpose, except for providing any product that competes with the software or any product the licensor or any of its affiliates provides using the software.
36
+
37
+ ## Competition
38
+
39
+ Goods and services compete even when they provide functionality through different kinds of interfaces or for different technical platforms. Applications can compete with services, libraries with plugins, frameworks with development tools, and so on, even if they're written in different programming languages or for different computer architectures. Goods and services compete even when provided free of charge. If you market a product as a practical substitute for the software or another product, it definitely competes.
40
+
41
+ ## New Products
42
+
43
+ If you are using the software to provide a product that does not compete, but the licensor or any of its affiliates brings your product into competition by providing a new version of the software or another product using the software, you may continue using versions of the software available under these terms beforehand to provide your competing product, but not any later versions.
44
+
45
+ ## Discontinued Products
46
+
47
+ You may begin using the software to compete with a product or service that the licensor or any of its affiliates has stopped providing, unless the licensor includes a plain-text line beginning with `Licensor Line of Business:` with the software that mentions that line of business. For example:
48
+
49
+ > Licensor Line of Business: YoyodyneCMS Content Management System (http://example.com/cms)
50
+
51
+ ## Sales of Business
52
+
53
+ If the licensor or any of its affiliates sells a line of business developing the software or using the software to provide a product, the buyer can also enforce [Noncompete](#noncompete) for that product.
54
+
55
+ ## Fair Use
56
+
57
+ You may have "fair use" rights for the software under the law. These terms do not limit them.
58
+
59
+ ## No Other Rights
60
+
61
+ These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
62
+
63
+ ## Patent Defense
64
+
65
+ If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
66
+
67
+ ## Violations
68
+
69
+ The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
70
+
71
+ ## No Liability
72
+
73
+ ***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
74
+
75
+ ## Definitions
76
+
77
+ The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
78
+
79
+ A **product** can be a good or service, or a combination of them.
80
+
81
+ **You** refers to the individual or entity agreeing to these terms.
82
+
83
+ **Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all its affiliates.
84
+
85
+ **Affiliates** means the other organizations than an organization has control over, is under the control of, or is under common control with.
86
+
87
+ **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
88
+
89
+ **Your licenses** are all the licenses granted to you for the software under these terms.
90
+
91
+ **Use** means anything you do with the software requiring one of your licenses.
package/README.md CHANGED
@@ -22,6 +22,29 @@ root config) enforces the boundaries in CI.
22
22
  | `@saasicat/ui-vue/quasar` | `src/quasar/` | everything above + Quasar | `createSuperAdminApp()` bootstrap and the Quasar notify-port implementation. |
23
23
  | `@saasicat/ui-vue/pages-standard/*`, `/pages-tenant/*`, `/components/*` | SFC directories | everything | The Quasar reference UI, shipped as raw `.vue` from `src/` (compiled by the consumer's Vite). |
24
24
 
25
+ ### The shipped source has a language floor
26
+
27
+ The last row is not a build output: those subpaths hand out `.vue` and `.ts`
28
+ straight from `src/`, so **your** `tsconfig` compiles them, not ours. Anything
29
+ they reach — which includes `src/client/` and `src/vue/` — therefore has to
30
+ compile under the oldest language level a consumer uses.
31
+
32
+ That floor is **ES2021** (`lib: ES2021, DOM`), with **TypeScript 5.0** as the
33
+ minimum compiler. The language level is checked rather than promised:
34
+ `pnpm --filter @saasicat/ui-vue test:shipped-source` compiles the closure
35
+ reachable from every source-shipping subpath at that level, with
36
+ `isolatedModules`, `useDefineForClassFields` and `strictPropertyInitialization`
37
+ set the way a Vite app sets them, and CI runs it. The directories come from the export map, so a new source subpath
38
+ is covered the day it is added. The compiler version is not checked — `satisfies`
39
+ in the shipped source needs 4.9 or newer whatever `lib` says, and testing that
40
+ would mean installing old compilers.
41
+
42
+ Practically this rules out a handful of ES2022 conveniences in shipped code —
43
+ `new Error(msg, { cause })` and `Object.hasOwn` are the two that have come up.
44
+ Use `attachCause()` from `src/client/attach-cause.ts` and
45
+ `Object.prototype.hasOwnProperty.call()` instead. Code that only ever runs from
46
+ `dist/` is unaffected.
47
+
25
48
  Rules of thumb when contributing:
26
49
 
27
50
  - New page/business logic starts as a composable in `src/vue/` (or, if
@@ -1,5 +1,5 @@
1
1
  import * as _saasicat_types from '@saasicat/types';
2
- import { AuditQuery, AuditEntry, TenantListFilter, TenantDto, PlanVersionRow, CreatePlanVersionDraftData, PlanVersionMutationResult, UpdatePlanVersionDraftData, PlanRow, CreatePlanData, UpdatePlanData, StandardPageKey, AdminManifest, TenantActionDef } from '@saasicat/types';
2
+ import { AuditQuery, AuditEntry, TenantListFilter, TenantDto, AdminTenantDetail, PromoCodeRecord, MarketingProjectionRow, CreateMarketingProjectionData, UpdateMarketingProjectionData, MarketingSettingsRow, DiscoverySnapshot, BundleVersionRow, CreateBundleVersionDraftData, BundleVersionMutationResult, UpdateBundleVersionDraftData, BundleRow, CreateBundleData, UpdateBundleData, PlanVersionRow, CreatePlanVersionDraftData, PlanVersionMutationResult, UpdatePlanVersionDraftData, PlanRow, CreatePlanData, UpdatePlanData, StandardPageKey, AdminManifest, TenantActionDef } from '@saasicat/types';
3
3
 
4
4
  /**
5
5
  * Minimal abstraction over `fetch`. Consumers may pass their own
@@ -224,6 +224,145 @@ declare const auditResource: ResourceDef<{
224
224
  type TenantsListFilter = ListFilterOf<TenantListFilter>;
225
225
  declare const tenantsResource: ResourceDef<{
226
226
  readonly list: ListOp<TenantDto, TenantsListFilter>;
227
+ readonly detail: (http: HttpClient, ctx: ResourceContext, slug: string) => Promise<AdminTenantDetail | null>;
228
+ /**
229
+ * Suspends a tenant. The reason is recorded on the audit trail, so it is a
230
+ * required argument rather than an option with a default.
231
+ */
232
+ readonly suspend: (http: HttpClient, ctx: ResourceContext, slug: string, reason: string) => Promise<void>;
233
+ readonly reactivate: (http: HttpClient, ctx: ResourceContext, slug: string) => Promise<void>;
234
+ }>;
235
+
236
+ /** What the promo list can be narrowed by, including its "all" state. */
237
+ interface PromoCodesFilter {
238
+ search?: string;
239
+ status?: string | null;
240
+ }
241
+ declare const promoCodesResource: ResourceDef<{
242
+ readonly list: (http: HttpClient, ctx: ResourceContext, filter?: PromoCodesFilter) => Promise<PromoCodeRecord[]>;
243
+ /**
244
+ * Returns nothing, matching `createAdminResourceClient.createPromo`.
245
+ *
246
+ * The endpoint does answer with the created record, but the page it feeds
247
+ * reloads the list rather than reading it, and promising a body a caller
248
+ * would then have to trust is a wider contract than anything holds today.
249
+ */
250
+ readonly create: (http: HttpClient, ctx: ResourceContext, payload: unknown) => Promise<void>;
251
+ readonly update: (http: HttpClient, ctx: ResourceContext, id: string, payload: unknown) => Promise<void>;
252
+ readonly remove: (http: HttpClient, ctx: ResourceContext, id: string) => Promise<void>;
253
+ }>;
254
+
255
+ /**
256
+ * What the projection list can be narrowed by, beyond the bound project.
257
+ *
258
+ * `projectKey` is deliberately absent: it comes from the context, so a page
259
+ * cannot list one project's projections while creating in another.
260
+ */
261
+ interface MarketingProjectionsFilter {
262
+ targetType?: string;
263
+ targetVersionId?: string;
264
+ locale?: string;
265
+ }
266
+ declare const marketingResource: ResourceDef<{
267
+ readonly listProjections: (http: HttpClient, ctx: ResourceContext, filter?: MarketingProjectionsFilter) => Promise<MarketingProjectionRow[]>;
268
+ /**
269
+ * The request only. `useMarketingProjections.create` reloads the list
270
+ * afterwards because a unique-tuple insert can change what the filter
271
+ * matches — that is the composable keeping its refs true, not part of
272
+ * the call.
273
+ */
274
+ readonly createProjection: (http: HttpClient, ctx: ResourceContext, data: CreateMarketingProjectionData) => Promise<MarketingProjectionRow>;
275
+ readonly updateProjection: (http: HttpClient, ctx: ResourceContext, id: string, data: UpdateMarketingProjectionData) => Promise<MarketingProjectionRow>;
276
+ readonly deleteProjection: (http: HttpClient, ctx: ResourceContext, id: string) => Promise<void>;
277
+ /**
278
+ * The activated locale subset, or `null` when none was ever stored.
279
+ *
280
+ * `null` means the full pool is active — the server's answer for "no
281
+ * row", and the state the page falls back to.
282
+ */
283
+ readonly settings: (http: HttpClient, ctx: ResourceContext) => Promise<MarketingSettingsRow | null>;
284
+ /** `PUT`, not `PATCH`: the endpoint replaces the set it is given. */
285
+ readonly saveSettings: (http: HttpClient, ctx: ResourceContext, activeLocales: readonly string[]) => Promise<void>;
286
+ }>;
287
+
288
+ /**
289
+ * The answer to a conditional read.
290
+ *
291
+ * `unchanged` carries no snapshot on purpose: the server said the caller's copy
292
+ * is current, and returning a re-fetched one would defeat the request.
293
+ */
294
+ type DiscoveryRead = {
295
+ readonly status: 'unchanged';
296
+ } | {
297
+ readonly status: 'loaded';
298
+ readonly snapshot: DiscoverySnapshot;
299
+ /** `null` when the server sent none — revalidation is then a full read. */
300
+ readonly etag: string | null;
301
+ };
302
+ declare const discoveryResource: ResourceDef<{
303
+ /**
304
+ * Reads the snapshot, revalidating against `etag` when one is passed.
305
+ *
306
+ * Pass `null` (or nothing) to force a full read — that is what
307
+ * `useDiscovery.reload()` does when the operator asks for fresh data.
308
+ */
309
+ readonly read: (http: HttpClient, ctx: ResourceContext, etag?: string | null) => Promise<DiscoveryRead>;
310
+ /**
311
+ * Re-runs the scan and returns what it found.
312
+ *
313
+ * Unconditional by construction: a rescan asks the server to look again,
314
+ * so revalidating against a tag the previous scan produced would answer
315
+ * with the snapshot the rescan was meant to replace.
316
+ */
317
+ readonly rescan: (http: HttpClient, ctx: ResourceContext) => Promise<{
318
+ snapshot: DiscoverySnapshot;
319
+ etag: string | null;
320
+ }>;
321
+ }>;
322
+
323
+ /** What `publish` may override at the moment a bundle version goes live. */
324
+ interface PublishBundleVersionOptions {
325
+ forceRegressive?: boolean;
326
+ allowZeroPrice?: boolean;
327
+ validFrom?: string | null;
328
+ validUntil?: string | null;
329
+ }
330
+ /**
331
+ * The bundle catalogue — read per project, like the plan catalogue.
332
+ *
333
+ * `create` takes the project from the context rather than from the caller, for
334
+ * the reason spelled out on `plansResource.create`: the composable this
335
+ * replaces made it the caller's job, so `list()` and `create()` read two
336
+ * different sources for one value and a stale one creates a bundle outside the
337
+ * project the list is showing.
338
+ */
339
+ declare const bundlesResource: ResourceDef<{
340
+ readonly list: (http: HttpClient, ctx: ResourceContext) => Promise<BundleRow[]>;
341
+ readonly create: (http: HttpClient, ctx: ResourceContext, data: Omit<CreateBundleData, "projectKey">) => Promise<BundleRow>;
342
+ readonly update: (http: HttpClient, ctx: ResourceContext, bundleId: string, data: UpdateBundleData) => Promise<BundleRow>;
343
+ /** Marks the bundle deleted. */
344
+ readonly softDelete: (http: HttpClient, ctx: ResourceContext, bundleId: string) => Promise<void>;
345
+ }>;
346
+ /**
347
+ * Bundle version lifecycle.
348
+ *
349
+ * `publish` is the request only. `useBundleVersions.publish` reloads the list
350
+ * afterwards, because publishing may supersede another version — but that is
351
+ * the composable keeping its own refs consistent, not part of the call. A
352
+ * descriptor operation that issued a second request would make every override
353
+ * inherit a reload it cannot see, and a page holding no list would pay for one
354
+ * it does not read.
355
+ */
356
+ declare const bundleVersionsResource: ResourceDef<{
357
+ readonly listForBundle: (http: HttpClient, ctx: ResourceContext, bundleId: string) => Promise<BundleVersionRow[]>;
358
+ readonly createDraft: (http: HttpClient, ctx: ResourceContext, bundleId: string, data: Omit<CreateBundleVersionDraftData, "bundleId">) => Promise<BundleVersionMutationResult>;
359
+ readonly updateDraft: (http: HttpClient, ctx: ResourceContext, versionId: string, data: UpdateBundleVersionDraftData) => Promise<BundleVersionMutationResult>;
360
+ readonly publish: (http: HttpClient, ctx: ResourceContext, versionId: string, options?: PublishBundleVersionOptions) => Promise<BundleVersionMutationResult>;
361
+ /**
362
+ * Discards a draft. A published version cannot be discarded — the API
363
+ * answers 422 `BUNDLE_VERSION_ALREADY_PUBLISHED`.
364
+ */
365
+ readonly discardDraft: (http: HttpClient, ctx: ResourceContext, versionId: string) => Promise<void>;
227
366
  }>;
228
367
 
229
368
  /** What `publish` may override at the moment a version goes live. */
@@ -279,8 +418,9 @@ declare const planVersionsResource: ResourceDef<{
279
418
  /**
280
419
  * Every resource the shell offers by default.
281
420
  *
282
- * The registry binds these; an app overrides by key. Partial while the roster
283
- * growsa page whose resource is not here yet keeps its props.
421
+ * The registry binds these; an app overrides by key. A page whose data is
422
+ * app-ownedpilots, platform e-mail keeps its props, because there is no
423
+ * platform default to override.
284
424
  */
285
425
  declare const platformResources: {
286
426
  plans: ResourceDef<{
@@ -299,8 +439,69 @@ declare const platformResources: {
299
439
  readonly discardDraft: (http: HttpClient, ctx: ResourceContext, versionId: string) => Promise<void>;
300
440
  readonly terminate: (http: HttpClient, ctx: ResourceContext, versionId: string, endsAt: string) => Promise<_saasicat_types.PlanVersionRow>;
301
441
  }>;
442
+ bundles: ResourceDef<{
443
+ readonly list: (http: HttpClient, ctx: ResourceContext) => Promise<_saasicat_types.BundleRow[]>;
444
+ readonly create: (http: HttpClient, ctx: ResourceContext, data: Omit<_saasicat_types.CreateBundleData, "projectKey">) => Promise<_saasicat_types.BundleRow>;
445
+ readonly update: (http: HttpClient, ctx: ResourceContext, bundleId: string, data: _saasicat_types.UpdateBundleData) => Promise<_saasicat_types.BundleRow>;
446
+ readonly softDelete: (http: HttpClient, ctx: ResourceContext, bundleId: string) => Promise<void>;
447
+ }>;
448
+ bundleVersions: ResourceDef<{
449
+ readonly listForBundle: (http: HttpClient, ctx: ResourceContext, bundleId: string) => Promise<_saasicat_types.BundleVersionRow[]>;
450
+ readonly createDraft: (http: HttpClient, ctx: ResourceContext, bundleId: string, data: Omit<_saasicat_types.CreateBundleVersionDraftData, "bundleId">) => Promise<_saasicat_types.BundleVersionMutationResult>;
451
+ readonly updateDraft: (http: HttpClient, ctx: ResourceContext, versionId: string, data: _saasicat_types.UpdateBundleVersionDraftData) => Promise<_saasicat_types.BundleVersionMutationResult>;
452
+ readonly publish: (http: HttpClient, ctx: ResourceContext, versionId: string, options?: PublishBundleVersionOptions) => Promise<_saasicat_types.BundleVersionMutationResult>;
453
+ readonly discardDraft: (http: HttpClient, ctx: ResourceContext, versionId: string) => Promise<void>;
454
+ }>;
455
+ catalog: ResourceDef<{
456
+ readonly capabilities: (http: HttpClient, ctx: ResourceContext) => Promise<_saasicat_types.CapabilityCatalogEntryRow[]>;
457
+ readonly features: (http: HttpClient, ctx: ResourceContext) => Promise<_saasicat_types.FeatureCatalogEntryRow[]>;
458
+ readonly quotas: (http: HttpClient, ctx: ResourceContext) => Promise<_saasicat_types.QuotaCatalogEntryRow[]>;
459
+ readonly reviewFeature: (http: HttpClient, ctx: ResourceContext, featureKey: string, data: _saasicat_types.ReviewCatalogEntryData) => Promise<_saasicat_types.FeatureCatalogEntryRow>;
460
+ readonly reviewQuota: (http: HttpClient, ctx: ResourceContext, quotaKey: string, data: _saasicat_types.ReviewCatalogEntryData) => Promise<_saasicat_types.QuotaCatalogEntryRow>;
461
+ readonly setFeatureI18n: (http: HttpClient, ctx: ResourceContext, featureKey: string, i18n: _saasicat_types.CatalogEntryI18n) => Promise<_saasicat_types.FeatureCatalogEntryRow>;
462
+ readonly setQuotaI18n: (http: HttpClient, ctx: ResourceContext, quotaKey: string, i18n: _saasicat_types.CatalogEntryI18n) => Promise<_saasicat_types.QuotaCatalogEntryRow>;
463
+ readonly setFeatureBase: (http: HttpClient, ctx: ResourceContext, featureKey: string, data: _saasicat_types.UpdateCatalogEntryBaseData) => Promise<_saasicat_types.FeatureCatalogEntryRow>;
464
+ readonly setQuotaBase: (http: HttpClient, ctx: ResourceContext, quotaKey: string, data: _saasicat_types.UpdateCatalogEntryBaseData) => Promise<_saasicat_types.QuotaCatalogEntryRow>;
465
+ readonly syncDiscovery: (http: HttpClient, ctx: ResourceContext, snapshot: _saasicat_types.DiscoverySnapshot) => Promise<_saasicat_types.SyncDiscoveryResult>;
466
+ }>;
467
+ discovery: ResourceDef<{
468
+ readonly read: (http: HttpClient, ctx: ResourceContext, etag?: string | null) => Promise<DiscoveryRead>;
469
+ readonly rescan: (http: HttpClient, ctx: ResourceContext) => Promise<{
470
+ snapshot: _saasicat_types.DiscoverySnapshot;
471
+ etag: string | null;
472
+ }>;
473
+ }>;
474
+ marketing: ResourceDef<{
475
+ readonly listProjections: (http: HttpClient, ctx: ResourceContext, filter?: MarketingProjectionsFilter) => Promise<_saasicat_types.MarketingProjectionRow[]>;
476
+ readonly createProjection: (http: HttpClient, ctx: ResourceContext, data: _saasicat_types.CreateMarketingProjectionData) => Promise<_saasicat_types.MarketingProjectionRow>;
477
+ readonly updateProjection: (http: HttpClient, ctx: ResourceContext, id: string, data: _saasicat_types.UpdateMarketingProjectionData) => Promise<_saasicat_types.MarketingProjectionRow>;
478
+ readonly deleteProjection: (http: HttpClient, ctx: ResourceContext, id: string) => Promise<void>;
479
+ readonly settings: (http: HttpClient, ctx: ResourceContext) => Promise<_saasicat_types.MarketingSettingsRow | null>;
480
+ readonly saveSettings: (http: HttpClient, ctx: ResourceContext, activeLocales: readonly string[]) => Promise<void>;
481
+ }>;
482
+ promoCodes: ResourceDef<{
483
+ readonly list: (http: HttpClient, ctx: ResourceContext, filter?: PromoCodesFilter) => Promise<_saasicat_types.PromoCodeRecord[]>;
484
+ readonly create: (http: HttpClient, ctx: ResourceContext, payload: unknown) => Promise<void>;
485
+ readonly update: (http: HttpClient, ctx: ResourceContext, id: string, payload: unknown) => Promise<void>;
486
+ readonly remove: (http: HttpClient, ctx: ResourceContext, id: string) => Promise<void>;
487
+ }>;
488
+ promotions: ResourceDef<{
489
+ readonly list: (http: HttpClient, ctx: ResourceContext) => Promise<_saasicat_types.PromotionRow[]>;
490
+ readonly create: (http: HttpClient, ctx: ResourceContext, data: _saasicat_types.CreatePromotionData) => Promise<_saasicat_types.PromotionRow>;
491
+ readonly update: (http: HttpClient, ctx: ResourceContext, id: string, data: _saasicat_types.UpdatePromotionData) => Promise<_saasicat_types.PromotionRow>;
492
+ readonly remove: (http: HttpClient, ctx: ResourceContext, id: string) => Promise<void>;
493
+ }>;
302
494
  tenants: ResourceDef<{
303
495
  readonly list: ListOp<_saasicat_types.TenantDto, TenantsListFilter>;
496
+ readonly detail: (http: HttpClient, ctx: ResourceContext, slug: string) => Promise<_saasicat_types.AdminTenantDetail | null>;
497
+ readonly suspend: (http: HttpClient, ctx: ResourceContext, slug: string, reason: string) => Promise<void>;
498
+ readonly reactivate: (http: HttpClient, ctx: ResourceContext, slug: string) => Promise<void>;
499
+ }>;
500
+ users: ResourceDef<{
501
+ readonly list: (http: HttpClient, ctx: ResourceContext, filter?: _saasicat_types.AdminUserListFilter) => Promise<_saasicat_types.AdminUserListRow[]>;
502
+ }>;
503
+ subscriptions: ResourceDef<{
504
+ readonly list: (http: HttpClient, ctx: ResourceContext) => Promise<_saasicat_types.AdminSubscriptionListRow[]>;
304
505
  }>;
305
506
  audit: ResourceDef<{
306
507
  readonly list: ListOp<_saasicat_types.AuditEntry, AuditListFilter>;
@@ -1956,4 +2157,4 @@ interface SaCatalog {
1956
2157
  */
1957
2158
  declare function createSaCatalog(options?: SaCatalogOptions): SaCatalog;
1958
2159
 
1959
- export { filterQueryString as $, type ActionHandler as A, type Bound as B, SA_LOCALE_LABELS as C, DEFAULT_SA_LOCALE as D, SA_MESSAGES as E, type SaBuiltinLocale as F, type SaCatalog as G, type HttpClient as H, type SaCatalogOptions as I, type TranslationOf as J, type KvStore as K, LIST_FIRST_PAGE as L, type MessageTree as M, auditResource as N, bindResource as O, type PlatformResources as P, clampListPage as Q, type ResourceDef as R, type SaLocale as S, type TenantsListFilter as T, clampListPageSize as U, createSaCatalog as V, defaultHttpClient as W, defaultKvStore as X, defineListOp as Y, defineMessages as Z, defineResource as _, type SaMessages as a, isSaBuiltinLocale as a0, isSentInQuery as a1, listUrl as a2, mergeMessages as a3, planVersionsResource as a4, plansResource as a5, readListPage as a6, resolveMessages as a7, tenantsResource as a8, type SaNavMessages as a9, type SaLocaleOption as b, type SaLocaleDefinition as c, type SaMessagesOverrides as d, type ResourceOps as e, type ResourceContext as f, type ResourceListPage as g, ActionRegistry as h, ActionDefNotInManifestError as i, type AuditListFilter as j, type DefineResourceOptions as k, type HttpResponse as l, LIST_PAGE_SIZE_DEFAULT as m, LIST_PAGE_SIZE_MAX as n, LIST_PAGINATION_PARAMS as o, platformResources as p, type ListFilterOf as q, type ListOp as r, type ListQuery as s, MissingHandlerError as t, type PartialMessages as u, type PublishPlanVersionOptions as v, type ResolvedAction as w, type ResourceOp as x, SA_INTL_LOCALES as y, SA_LOCALES as z };
2160
+ export { createSaCatalog as $, type ActionHandler as A, type Bound as B, type ResolvedAction as C, DEFAULT_SA_LOCALE as D, type ResourceOp as E, SA_INTL_LOCALES as F, SA_LOCALES as G, type HttpClient as H, SA_LOCALE_LABELS as I, SA_MESSAGES as J, type KvStore as K, LIST_FIRST_PAGE as L, type MarketingProjectionsFilter as M, type SaBuiltinLocale as N, type SaCatalog as O, type PlatformResources as P, type SaCatalogOptions as Q, type ResourceDef as R, type SaLocale as S, type TenantsListFilter as T, type TranslationOf as U, auditResource as V, bindResource as W, bundleVersionsResource as X, bundlesResource as Y, clampListPage as Z, clampListPageSize as _, type SaMessages as a, defaultHttpClient as a0, defaultKvStore as a1, defineListOp as a2, defineMessages as a3, defineResource as a4, discoveryResource as a5, filterQueryString as a6, isSaBuiltinLocale as a7, isSentInQuery as a8, listUrl as a9, marketingResource as aa, mergeMessages as ab, planVersionsResource as ac, plansResource as ad, promoCodesResource as ae, readListPage as af, resolveMessages as ag, tenantsResource as ah, type SaNavMessages as ai, type SaLocaleOption as b, type SaLocaleDefinition as c, type SaMessagesOverrides as d, type ResourceOps as e, type ResourceContext as f, type ResourceListPage as g, ActionRegistry as h, ActionDefNotInManifestError as i, type AuditListFilter as j, type DefineResourceOptions as k, type DiscoveryRead as l, type HttpResponse as m, LIST_PAGE_SIZE_DEFAULT as n, LIST_PAGE_SIZE_MAX as o, platformResources as p, LIST_PAGINATION_PARAMS as q, type ListFilterOf as r, type ListOp as s, type ListQuery as t, type MessageTree as u, MissingHandlerError as v, type PartialMessages as w, type PromoCodesFilter as x, type PublishBundleVersionOptions as y, type PublishPlanVersionOptions as z };