@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.
- package/LICENSE +90 -201
- package/README.md +23 -0
- package/dist/{catalog-Dch1Ryw0.d.cts → catalog-Dv2twuNi.d.cts} +205 -4
- package/dist/{catalog-Dch1Ryw0.d.ts → catalog-Dv2twuNi.d.ts} +205 -4
- package/dist/{chunk-BPF2BMCQ.js → chunk-4IZWT4UY.js} +414 -2
- package/dist/{chunk-O3J3ITF2.js → chunk-LK6YJDXC.js} +1 -1
- package/dist/{chunk-NEXTZZRQ.js → chunk-NRVF3JJJ.js} +2 -2
- package/dist/client/index.cjs +426 -5
- package/dist/client/index.d.cts +70 -4
- package/dist/client/index.d.ts +70 -4
- package/dist/client/index.js +22 -4
- package/dist/index.cjs +429 -8
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +23 -5
- package/dist/quasar/index.cjs +411 -2
- package/dist/quasar/index.d.cts +2 -2
- package/dist/quasar/index.d.ts +2 -2
- package/dist/quasar/index.js +2 -2
- package/dist/{resource-registry-D7Xjs-5f.d.cts → resource-registry-BxFpnzHY.d.cts} +1 -1
- package/dist/{resource-registry-TaR7rtq0.d.ts → resource-registry-Cn1Gy2LE.d.ts} +1 -1
- package/package.json +5 -4
- package/src/client/admin-error.ts +18 -1
- package/src/client/attach-cause.ts +21 -0
- package/src/client/nav-builder.ts +3 -1
- package/src/client/resources/bundles.resource.ts +145 -0
- package/src/client/resources/catalog.resource.ts +160 -0
- package/src/client/resources/discovery.resource.ts +108 -0
- package/src/client/resources/index.ts +52 -14
- package/src/client/resources/marketing.resource.ts +121 -0
- package/src/client/resources/promo-codes.resource.ts +63 -0
- package/src/client/resources/promotions.resource.ts +44 -0
- package/src/client/resources/subscriptions.resource.ts +19 -0
- package/src/client/resources/tenants.resource.ts +35 -9
- package/src/client/resources/users.resource.ts +31 -0
- 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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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.
|
|
283
|
-
*
|
|
421
|
+
* The registry binds these; an app overrides by key. A page whose data is
|
|
422
|
+
* app-owned — pilots, 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 {
|
|
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 };
|