@asturiu/v0-sdk 0.0.0-stage → 1.0.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/CHANGELOG.md +42 -0
- package/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +82 -2
- package/contract/assertion-vectors.json +90 -0
- package/contract/schemas/branding.schema.json +46 -0
- package/contract/schemas/definitions.schema.json +376 -0
- package/contract/schemas/portal.schema.json +56 -0
- package/contract/tenant-api-routes.json +165 -0
- package/dist/branding.d.ts +131 -0
- package/dist/branding.d.ts.map +1 -0
- package/dist/branding.js +206 -0
- package/dist/branding.js.map +1 -0
- package/dist/changesets.d.ts +58 -0
- package/dist/changesets.d.ts.map +1 -0
- package/dist/changesets.js +18 -0
- package/dist/changesets.js.map +1 -0
- package/dist/cli/bin.d.ts +3 -0
- package/dist/cli/bin.d.ts.map +1 -0
- package/dist/cli/bin.js +12 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/changesets.d.ts +14 -0
- package/dist/cli/changesets.d.ts.map +1 -0
- package/dist/cli/changesets.js +252 -0
- package/dist/cli/changesets.js.map +1 -0
- package/dist/cli/cli.d.ts +37 -0
- package/dist/cli/cli.d.ts.map +1 -0
- package/dist/cli/cli.js +415 -0
- package/dist/cli/cli.js.map +1 -0
- package/dist/cli/context.d.ts +147 -0
- package/dist/cli/context.d.ts.map +1 -0
- package/dist/cli/context.js +258 -0
- package/dist/cli/context.js.map +1 -0
- package/dist/cli/engine.d.ts +59 -0
- package/dist/cli/engine.d.ts.map +1 -0
- package/dist/cli/engine.js +85 -0
- package/dist/cli/engine.js.map +1 -0
- package/dist/cli/feedback.d.ts +40 -0
- package/dist/cli/feedback.d.ts.map +1 -0
- package/dist/cli/feedback.js +420 -0
- package/dist/cli/feedback.js.map +1 -0
- package/dist/cli/files.d.ts +83 -0
- package/dist/cli/files.d.ts.map +1 -0
- package/dist/cli/files.js +389 -0
- package/dist/cli/files.js.map +1 -0
- package/dist/cli/index.d.ts +8 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +8 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/overview.d.ts +6 -0
- package/dist/cli/overview.d.ts.map +1 -0
- package/dist/cli/overview.js +379 -0
- package/dist/cli/overview.js.map +1 -0
- package/dist/cli/parts.d.ts +5 -0
- package/dist/cli/parts.d.ts.map +1 -0
- package/dist/cli/parts.js +414 -0
- package/dist/cli/parts.js.map +1 -0
- package/dist/cli/sources.d.ts +37 -0
- package/dist/cli/sources.d.ts.map +1 -0
- package/dist/cli/sources.js +91 -0
- package/dist/cli/sources.js.map +1 -0
- package/dist/cli/terminal.d.ts +135 -0
- package/dist/cli/terminal.d.ts.map +1 -0
- package/dist/cli/terminal.js +353 -0
- package/dist/cli/terminal.js.map +1 -0
- package/dist/cli/ui-page.d.ts +8 -0
- package/dist/cli/ui-page.d.ts.map +1 -0
- package/dist/cli/ui-page.js +216 -0
- package/dist/cli/ui-page.js.map +1 -0
- package/dist/cli/ui.d.ts +54 -0
- package/dist/cli/ui.d.ts.map +1 -0
- package/dist/cli/ui.js +251 -0
- package/dist/cli/ui.js.map +1 -0
- package/dist/client.d.ts +88 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +165 -0
- package/dist/client.js.map +1 -0
- package/dist/contacts.d.ts +43 -0
- package/dist/contacts.d.ts.map +1 -0
- package/dist/contacts.js +46 -0
- package/dist/contacts.js.map +1 -0
- package/dist/definition-set.d.ts +731 -0
- package/dist/definition-set.d.ts.map +1 -0
- package/dist/definition-set.js +659 -0
- package/dist/definition-set.js.map +1 -0
- package/dist/definitions.d.ts +42 -0
- package/dist/definitions.d.ts.map +1 -0
- package/dist/definitions.js +154 -0
- package/dist/definitions.js.map +1 -0
- package/dist/enrolment.d.ts +9 -0
- package/dist/enrolment.d.ts.map +1 -0
- package/dist/enrolment.js +8 -0
- package/dist/enrolment.js.map +1 -0
- package/dist/fill.d.ts +73 -0
- package/dist/fill.d.ts.map +1 -0
- package/dist/fill.js +46 -0
- package/dist/fill.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -0
- package/dist/notifications.d.ts +33 -0
- package/dist/notifications.d.ts.map +1 -0
- package/dist/notifications.js +36 -0
- package/dist/notifications.js.map +1 -0
- package/dist/oidc.d.ts +122 -0
- package/dist/oidc.d.ts.map +1 -0
- package/dist/oidc.js +150 -0
- package/dist/oidc.js.map +1 -0
- package/dist/overlay.d.ts +109 -0
- package/dist/overlay.d.ts.map +1 -0
- package/dist/overlay.js +58 -0
- package/dist/overlay.js.map +1 -0
- package/dist/passes.d.ts +95 -0
- package/dist/passes.d.ts.map +1 -0
- package/dist/passes.js +140 -0
- package/dist/passes.js.map +1 -0
- package/dist/portal-options.d.ts +65 -0
- package/dist/portal-options.d.ts.map +1 -0
- package/dist/portal-options.js +120 -0
- package/dist/portal-options.js.map +1 -0
- package/dist/reads.d.ts +41 -0
- package/dist/reads.d.ts.map +1 -0
- package/dist/reads.js +44 -0
- package/dist/reads.js.map +1 -0
- package/dist/recovery-words.d.ts +8 -0
- package/dist/recovery-words.d.ts.map +1 -0
- package/dist/recovery-words.js +136 -0
- package/dist/recovery-words.js.map +1 -0
- package/dist/recovery.d.ts +198 -0
- package/dist/recovery.d.ts.map +1 -0
- package/dist/recovery.js +112 -0
- package/dist/recovery.js.map +1 -0
- package/dist/reveal.d.ts +35 -0
- package/dist/reveal.d.ts.map +1 -0
- package/dist/reveal.js +66 -0
- package/dist/reveal.js.map +1 -0
- package/dist/seal.d.ts +15 -0
- package/dist/seal.d.ts.map +1 -0
- package/dist/seal.js +0 -0
- package/dist/seal.js.map +1 -0
- package/dist/session.d.ts +66 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +61 -0
- package/dist/session.js.map +1 -0
- package/dist/signing-in-mark.d.ts +14 -0
- package/dist/signing-in-mark.d.ts.map +1 -0
- package/dist/signing-in-mark.js +24 -0
- package/dist/signing-in-mark.js.map +1 -0
- package/dist/signing-in.d.ts +22 -0
- package/dist/signing-in.d.ts.map +1 -0
- package/dist/signing-in.js +203 -0
- package/dist/signing-in.js.map +1 -0
- package/dist/tags.d.ts +96 -0
- package/dist/tags.d.ts.map +1 -0
- package/dist/tags.js +88 -0
- package/dist/tags.js.map +1 -0
- package/dist/tenant-subscription.d.ts +47 -0
- package/dist/tenant-subscription.d.ts.map +1 -0
- package/dist/tenant-subscription.js +7 -0
- package/dist/tenant-subscription.js.map +1 -0
- package/dist/testing/index.d.ts +125 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +320 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/theme.d.ts +237 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +504 -0
- package/dist/theme.js.map +1 -0
- package/dist/tickets.d.ts +152 -0
- package/dist/tickets.d.ts.map +1 -0
- package/dist/tickets.js +65 -0
- package/dist/tickets.js.map +1 -0
- package/dist/tiers.d.ts +168 -0
- package/dist/tiers.d.ts.map +1 -0
- package/dist/tiers.js +341 -0
- package/dist/tiers.js.map +1 -0
- package/dist/types.d.ts +885 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +12 -0
- package/dist/types.js.map +1 -0
- package/dist/urlid.d.ts +50 -0
- package/dist/urlid.d.ts.map +1 -0
- package/dist/urlid.js +78 -0
- package/dist/urlid.js.map +1 -0
- package/dist/version.d.ts +15 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +15 -0
- package/dist/version.js.map +1 -0
- package/make/asturiu.mk +43 -0
- package/package.json +63 -4
- package/src/branding.ts +221 -0
- package/src/changesets.ts +61 -0
- package/src/cli/bin.ts +12 -0
- package/src/cli/changesets.ts +233 -0
- package/src/cli/cli.ts +425 -0
- package/src/cli/context.ts +299 -0
- package/src/cli/engine.ts +112 -0
- package/src/cli/feedback.ts +406 -0
- package/src/cli/files.ts +371 -0
- package/src/cli/index.ts +7 -0
- package/src/cli/overview.ts +343 -0
- package/src/cli/parts.ts +371 -0
- package/src/cli/sources.ts +111 -0
- package/src/cli/terminal.ts +384 -0
- package/src/cli/ui-page.ts +215 -0
- package/src/cli/ui.ts +266 -0
- package/src/client.ts +202 -0
- package/src/contacts.ts +61 -0
- package/src/definition-set.ts +965 -0
- package/src/definitions.ts +156 -0
- package/src/enrolment.ts +10 -0
- package/src/fill.ts +83 -0
- package/src/index.ts +38 -0
- package/src/notifications.ts +55 -0
- package/src/oidc.ts +199 -0
- package/src/overlay.ts +137 -0
- package/src/passes.ts +168 -0
- package/src/portal-options.ts +125 -0
- package/src/reads.ts +71 -0
- package/src/recovery-words.ts +137 -0
- package/src/recovery.ts +269 -0
- package/src/reveal.ts +72 -0
- package/src/seal.ts +0 -0
- package/src/session.ts +93 -0
- package/src/signing-in-mark.ts +23 -0
- package/src/signing-in.ts +213 -0
- package/src/tags.ts +146 -0
- package/src/tenant-subscription.ts +44 -0
- package/src/testing/index.ts +337 -0
- package/src/theme.ts +628 -0
- package/src/tickets.ts +195 -0
- package/src/tiers.ts +397 -0
- package/src/types.ts +847 -0
- package/src/urlid.ts +77 -0
- package/src/version.ts +15 -0
- package/templates/asturiu/branding.json +4 -0
- package/templates/asturiu/definitions.json +23 -0
- package/templates/asturiu/portal.json +16 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
One entry per release of `@asturiu/v0-sdk`. A release that breaks something
|
|
4
|
+
for a Tenant is a new major version and comes with a Tenant changeset, listed
|
|
5
|
+
under its entry. A release with no break needs no changeset.
|
|
6
|
+
|
|
7
|
+
## 1.0.0 (2026-11-09)
|
|
8
|
+
|
|
9
|
+
The first release of the Tenant SDK out of its own repository. It holds what
|
|
10
|
+
Tenants imported from `@asturiu/utils/frontend` before, under a new name:
|
|
11
|
+
|
|
12
|
+
- The Interface API client and the `/v0` types, sign-in (`oidc`), sessions and
|
|
13
|
+
`continuePage`, sealing, the Definition set, branding, portal options,
|
|
14
|
+
themes, overlays, fill modes, reveal levels, contacts, guest passes,
|
|
15
|
+
notifications, recovery, tiers and entitlements, tags, tickets and
|
|
16
|
+
announcements, and the changeset and feedback types.
|
|
17
|
+
- Every Tenant API call: `applyDefinitions`, `definitionStatus`,
|
|
18
|
+
`applyBranding`, `readBranding`, `applyPortal`, `readPortal`, `applyTiers`,
|
|
19
|
+
`readTiers`, `reportEntitlement`, `readEntitlements`,
|
|
20
|
+
`readTenantSubscription`, `readEngine`, `readChangesets`,
|
|
21
|
+
`setChangesetStatus`, `sendFeedback`, `readFeedback`, `replyToFeedback`.
|
|
22
|
+
|
|
23
|
+
New in this release:
|
|
24
|
+
|
|
25
|
+
- `TenantApiError { status, type, detail, problem }`, thrown by every Tenant
|
|
26
|
+
API call that reads or writes, so a missing route (`404`) is told from a
|
|
27
|
+
refusal.
|
|
28
|
+
- `readKey`: the calling key's own record, from `GET /tenant/v0/key`.
|
|
29
|
+
- Calls for tags (`readTags`, `setTag`, `tagCustomer`, `untagCustomer`),
|
|
30
|
+
tickets (`listTickets`, `readTicket`, `openTicket`, `postToTicket`,
|
|
31
|
+
`updateTicket`) and announcements (`listAnnouncements`, `readAnnouncement`,
|
|
32
|
+
`draftAnnouncement`, `publishAnnouncement`, `updateAnnouncement`,
|
|
33
|
+
`withdrawAnnouncement`, `deleteAnnouncementDraft`).
|
|
34
|
+
- `SDK_VERSION`, sent as `User-Agent: asturiu-v0-sdk/<version>` and shown in
|
|
35
|
+
the Admin UI's key list.
|
|
36
|
+
- The `asturiu-v0-tenant` command line, the local page, the Make targets, the
|
|
37
|
+
templates, the in-memory Tenant API (`@asturiu/v0-sdk/testing`) and the
|
|
38
|
+
`contract/` files.
|
|
39
|
+
- Licensed under the Apache License 2.0.
|
|
40
|
+
|
|
41
|
+
The route table no longer carries the Operations API path a route is forwarded
|
|
42
|
+
to: that is the Engine's inside.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
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.
|
package/NOTICE
ADDED
package/README.md
CHANGED
|
@@ -1,3 +1,83 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Asturiu v0 Tenant Toolbox
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Everything a Tenant's engineers and coding agents install to build a product
|
|
4
|
+
on Asturiu v0, in one place. A product built on Asturiu is a **Tenant**, and
|
|
5
|
+
the people who use it are its **Customers**.
|
|
6
|
+
|
|
7
|
+
| Path | What it is |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `sdk/typescript/` | `@asturiu/v0-sdk`, the **Tenant SDK**: the Interface API client and the `/v0` types, sign-in and session helpers, the Definition set, branding and portal files, and the signed Tenant API calls. It carries the `asturiu-v0-tenant` command line, the local page (`asturiu-v0-tenant ui`) and an in-memory Tenant API for tests (`@asturiu/v0-sdk/testing`). |
|
|
10
|
+
| `contract/` | What every SDK must agree on, as plain files: the Tenant API's routes, test vectors for signing a request, and JSON Schemas for the files a repository keeps. A client in another language checks itself against them. |
|
|
11
|
+
| `make/asturiu.mk` | Make targets that each run one command, for people who prefer `make asturiu-status` to typing the command. |
|
|
12
|
+
| `templates/asturiu/` | A starting `definitions.json`, `branding.json` and `portal.json`. |
|
|
13
|
+
| `CHANGELOG.md` | What each SDK release changed, and the Tenant changesets it carries. |
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npm install --save-exact @asturiu/v0-sdk
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Install an exact version, never a range: a new major version is a change that
|
|
22
|
+
can break your application, and a Tenant changeset says what to do about it.
|
|
23
|
+
|
|
24
|
+
Add the command line as a package script, so it always runs the version you
|
|
25
|
+
installed:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{ "scripts": { "asturiu": "asturiu-v0-tenant" } }
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Then `npm run asturiu -- status`. Without the package script, run
|
|
32
|
+
`npx --no-install asturiu-v0-tenant`. Never run it with plain `npx`: when the
|
|
33
|
+
SDK is not installed, plain `npx` downloads whatever package carries that name.
|
|
34
|
+
|
|
35
|
+
Your server reads the Tenant key from `ASTURIU_TENANT_KEY`. The key stays in
|
|
36
|
+
the server's environment: never in the repository, a browser bundle or a log.
|
|
37
|
+
The SDK refuses to sign a Tenant API request in a browser.
|
|
38
|
+
|
|
39
|
+
## Versions
|
|
40
|
+
|
|
41
|
+
| What | Rule |
|
|
42
|
+
|---|---|
|
|
43
|
+
| The `v0` in the name | The Asturiu generation the SDK talks to: the `v0` of `/v0` and `/tenant/v0`. A later generation publishes new names. |
|
|
44
|
+
| The version number | The SDK's own semantic version. A new major version is a break. |
|
|
45
|
+
| The Engine | Has a version of its own. `GET /tenant/v0/engine` answers `sdk: { built_with, minimum }`: the SDK version the Engine was built with, and the oldest it still serves without a break. `asturiu-v0-tenant status` compares them with yours. |
|
|
46
|
+
|
|
47
|
+
## Documentation
|
|
48
|
+
|
|
49
|
+
The Tenant documentation explains what you build and what you call, with
|
|
50
|
+
"Your tools: the SDK and the command line" for everything in this
|
|
51
|
+
repository. Engine changes reach you as Tenant changesets, published on the
|
|
52
|
+
Engine site and listed by `asturiu-v0-tenant changesets`.
|
|
53
|
+
|
|
54
|
+
Feedback about the Engine or this toolbox goes through the Tenant API:
|
|
55
|
+
`asturiu-v0-tenant feedback`.
|
|
56
|
+
|
|
57
|
+
## Security
|
|
58
|
+
|
|
59
|
+
Report a security issue in the SDK, the command line or the Engine to
|
|
60
|
+
**info@solcus.com**, with "Security" in the subject, and not through a public
|
|
61
|
+
channel. Never include a Tenant key: Asturiu never asks for one.
|
|
62
|
+
|
|
63
|
+
## Working on this repository
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
cd sdk/typescript
|
|
67
|
+
pnpm install
|
|
68
|
+
pnpm build # tsc, then marks the command line executable
|
|
69
|
+
pnpm test # vitest
|
|
70
|
+
pnpm contract # rewrites contract/ from the SDK; --check fails while it is stale
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The Asturiu Engine links this SDK by path and builds it before its own shared
|
|
74
|
+
library, so the Engine's frontends and services use the same SDK a Tenant
|
|
75
|
+
installs. Nothing here names a Branded Product, holds a secret or describes
|
|
76
|
+
the Engine's inside beyond what the Tenant documentation says.
|
|
77
|
+
|
|
78
|
+
## License
|
|
79
|
+
|
|
80
|
+
Apache License 2.0: see `LICENSE` and `NOTICE`. You may use the SDK in a
|
|
81
|
+
commercial product. The license grants no right to the name "Asturiu" or its
|
|
82
|
+
marks. Using the Asturiu service is governed by your Tenant agreement, not by
|
|
83
|
+
this license.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Tenant API assertions (ADR-030 §3): what an SDK in any language must produce for these requests, with this key and these claims. Ed25519 is deterministic, so the signature must match byte for byte. The key is registered with no Engine and is no secret. Written by scripts/contract.mjs; do not edit.",
|
|
3
|
+
"key": "atk.vectors.0000000000000000.MC4CAQAwBQYDK2VwBCIEINKd02iIUOKLUL9a5YHOae7WMUYrS0tuFq2DNFTO6xPv",
|
|
4
|
+
"public_key": "zIJyBqVrytA2kBV_YW9aBiFZjW_XIgjGLpwjsoN-86Q",
|
|
5
|
+
"tenant": "vectors",
|
|
6
|
+
"key_id": "0000000000000000",
|
|
7
|
+
"audience": "asturiu-tenant-api",
|
|
8
|
+
"max_seconds": 60,
|
|
9
|
+
"header": "authorization: Asturiu-Assertion <jws>; the body hash bdh is base64url(SHA-256(body)), the empty body's for GET",
|
|
10
|
+
"vectors": [
|
|
11
|
+
{
|
|
12
|
+
"request": {
|
|
13
|
+
"method": "GET",
|
|
14
|
+
"path": "/tenant/v0/engine",
|
|
15
|
+
"body": ""
|
|
16
|
+
},
|
|
17
|
+
"header": {
|
|
18
|
+
"alg": "EdDSA",
|
|
19
|
+
"typ": "JWT",
|
|
20
|
+
"kid": "0000000000000000"
|
|
21
|
+
},
|
|
22
|
+
"claims": {
|
|
23
|
+
"iss": "vectors",
|
|
24
|
+
"sub": "0000000000000000",
|
|
25
|
+
"aud": "asturiu-tenant-api",
|
|
26
|
+
"htm": "GET",
|
|
27
|
+
"htu": "/tenant/v0/engine",
|
|
28
|
+
"bdh": "47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU",
|
|
29
|
+
"iat": 1767225600,
|
|
30
|
+
"exp": 1767225660,
|
|
31
|
+
"jti": "vector-1"
|
|
32
|
+
},
|
|
33
|
+
"signing_input": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6IjAwMDAwMDAwMDAwMDAwMDAifQ.eyJpc3MiOiJ2ZWN0b3JzIiwic3ViIjoiMDAwMDAwMDAwMDAwMDAwMCIsImF1ZCI6ImFzdHVyaXUtdGVuYW50LWFwaSIsImh0bSI6IkdFVCIsImh0dSI6Ii90ZW5hbnQvdjAvZW5naW5lIiwiYmRoIjoiNDdERVFwajhIQlNhLV9USW1XLTVKQ2V1UWVSa201Tk1wSldaRzNoU3VGVSIsImlhdCI6MTc2NzIyNTYwMCwiZXhwIjoxNzY3MjI1NjYwLCJqdGkiOiJ2ZWN0b3ItMSJ9",
|
|
34
|
+
"signature": "EPjDjMYFaE3Xv8XL5-jWXxnL1_H1b_ezVauH2FhUhLMOuEJa0xIilziO7zZzPUHtNmIsMKo7AtFlxaRialjXDw",
|
|
35
|
+
"authorization": "Asturiu-Assertion eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6IjAwMDAwMDAwMDAwMDAwMDAifQ.eyJpc3MiOiJ2ZWN0b3JzIiwic3ViIjoiMDAwMDAwMDAwMDAwMDAwMCIsImF1ZCI6ImFzdHVyaXUtdGVuYW50LWFwaSIsImh0bSI6IkdFVCIsImh0dSI6Ii90ZW5hbnQvdjAvZW5naW5lIiwiYmRoIjoiNDdERVFwajhIQlNhLV9USW1XLTVKQ2V1UWVSa201Tk1wSldaRzNoU3VGVSIsImlhdCI6MTc2NzIyNTYwMCwiZXhwIjoxNzY3MjI1NjYwLCJqdGkiOiJ2ZWN0b3ItMSJ9.EPjDjMYFaE3Xv8XL5-jWXxnL1_H1b_ezVauH2FhUhLMOuEJa0xIilziO7zZzPUHtNmIsMKo7AtFlxaRialjXDw"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"request": {
|
|
39
|
+
"method": "POST",
|
|
40
|
+
"path": "/tenant/v0/definitions",
|
|
41
|
+
"body": "{\"wallets\":{\"documents\":{\"label\":\"Documents\"}}}"
|
|
42
|
+
},
|
|
43
|
+
"header": {
|
|
44
|
+
"alg": "EdDSA",
|
|
45
|
+
"typ": "JWT",
|
|
46
|
+
"kid": "0000000000000000"
|
|
47
|
+
},
|
|
48
|
+
"claims": {
|
|
49
|
+
"iss": "vectors",
|
|
50
|
+
"sub": "0000000000000000",
|
|
51
|
+
"aud": "asturiu-tenant-api",
|
|
52
|
+
"htm": "POST",
|
|
53
|
+
"htu": "/tenant/v0/definitions",
|
|
54
|
+
"bdh": "ZVd3iJ5eRRWYl7ifOqCYK6pw1AMfv741kMHuMCwSIys",
|
|
55
|
+
"iat": 1767225600,
|
|
56
|
+
"exp": 1767225660,
|
|
57
|
+
"jti": "vector-2"
|
|
58
|
+
},
|
|
59
|
+
"signing_input": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6IjAwMDAwMDAwMDAwMDAwMDAifQ.eyJpc3MiOiJ2ZWN0b3JzIiwic3ViIjoiMDAwMDAwMDAwMDAwMDAwMCIsImF1ZCI6ImFzdHVyaXUtdGVuYW50LWFwaSIsImh0bSI6IlBPU1QiLCJodHUiOiIvdGVuYW50L3YwL2RlZmluaXRpb25zIiwiYmRoIjoiWlZkM2lKNWVSUldZbDdpZk9xQ1lLNnB3MUFNZnY3NDFrTUh1TUN3U0l5cyIsImlhdCI6MTc2NzIyNTYwMCwiZXhwIjoxNzY3MjI1NjYwLCJqdGkiOiJ2ZWN0b3ItMiJ9",
|
|
60
|
+
"signature": "LXnJYE1djSJOhwBG5r2bWSddrMX89U2IjIL8q8wzVcKnrtrS1z-A4DhHfCncv7sTWAboBLL3zBAoRajK97TCAw",
|
|
61
|
+
"authorization": "Asturiu-Assertion eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6IjAwMDAwMDAwMDAwMDAwMDAifQ.eyJpc3MiOiJ2ZWN0b3JzIiwic3ViIjoiMDAwMDAwMDAwMDAwMDAwMCIsImF1ZCI6ImFzdHVyaXUtdGVuYW50LWFwaSIsImh0bSI6IlBPU1QiLCJodHUiOiIvdGVuYW50L3YwL2RlZmluaXRpb25zIiwiYmRoIjoiWlZkM2lKNWVSUldZbDdpZk9xQ1lLNnB3MUFNZnY3NDFrTUh1TUN3U0l5cyIsImlhdCI6MTc2NzIyNTYwMCwiZXhwIjoxNzY3MjI1NjYwLCJqdGkiOiJ2ZWN0b3ItMiJ9.LXnJYE1djSJOhwBG5r2bWSddrMX89U2IjIL8q8wzVcKnrtrS1z-A4DhHfCncv7sTWAboBLL3zBAoRajK97TCAw"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"request": {
|
|
65
|
+
"method": "PUT",
|
|
66
|
+
"path": "/tenant/v0/changesets/24/status",
|
|
67
|
+
"body": "{\"status\":\"resolved\",\"applied_version\":\"1.0.0\"}"
|
|
68
|
+
},
|
|
69
|
+
"header": {
|
|
70
|
+
"alg": "EdDSA",
|
|
71
|
+
"typ": "JWT",
|
|
72
|
+
"kid": "0000000000000000"
|
|
73
|
+
},
|
|
74
|
+
"claims": {
|
|
75
|
+
"iss": "vectors",
|
|
76
|
+
"sub": "0000000000000000",
|
|
77
|
+
"aud": "asturiu-tenant-api",
|
|
78
|
+
"htm": "PUT",
|
|
79
|
+
"htu": "/tenant/v0/changesets/24/status",
|
|
80
|
+
"bdh": "4PxecGebfJkCVRQpWk4kDRqmOOZek-jsa5Q0pJckRs0",
|
|
81
|
+
"iat": 1767225600,
|
|
82
|
+
"exp": 1767225660,
|
|
83
|
+
"jti": "vector-3"
|
|
84
|
+
},
|
|
85
|
+
"signing_input": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6IjAwMDAwMDAwMDAwMDAwMDAifQ.eyJpc3MiOiJ2ZWN0b3JzIiwic3ViIjoiMDAwMDAwMDAwMDAwMDAwMCIsImF1ZCI6ImFzdHVyaXUtdGVuYW50LWFwaSIsImh0bSI6IlBVVCIsImh0dSI6Ii90ZW5hbnQvdjAvY2hhbmdlc2V0cy8yNC9zdGF0dXMiLCJiZGgiOiI0UHhlY0dlYmZKa0NWUlFwV2s0a0RScW1PT1play1qc2E1UTBwSmNrUnMwIiwiaWF0IjoxNzY3MjI1NjAwLCJleHAiOjE3NjcyMjU2NjAsImp0aSI6InZlY3Rvci0zIn0",
|
|
86
|
+
"signature": "iw7NE0-bHgSUX8pAJM_tn_A5gIAjjYOrrr_eYZb2bFftr9xHIoZDfc8e6HQWvkOKK__00N63fHLdAlTMYqHUDg",
|
|
87
|
+
"authorization": "Asturiu-Assertion eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6IjAwMDAwMDAwMDAwMDAwMDAifQ.eyJpc3MiOiJ2ZWN0b3JzIiwic3ViIjoiMDAwMDAwMDAwMDAwMDAwMCIsImF1ZCI6ImFzdHVyaXUtdGVuYW50LWFwaSIsImh0bSI6IlBVVCIsImh0dSI6Ii90ZW5hbnQvdjAvY2hhbmdlc2V0cy8yNC9zdGF0dXMiLCJiZGgiOiI0UHhlY0dlYmZKa0NWUlFwV2s0a0RScW1PT1play1qc2E1UTBwSmNrUnMwIiwiaWF0IjoxNzY3MjI1NjAwLCJleHAiOjE3NjcyMjU2NjAsImp0aSI6InZlY3Rvci0zIn0.iw7NE0-bHgSUX8pAJM_tn_A5gIAjjYOrrr_eYZb2bFftr9xHIoZDfc8e6HQWvkOKK__00N63fHLdAlTMYqHUDg"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://asturiu.com/contract/v0/branding.schema.json",
|
|
4
|
+
"title": "A Tenant's branding",
|
|
5
|
+
"description": "Structure only (ADR-074 §10): what PUT /tenant/v0/branding takes. Sent whole: a key left out is cleared. Theme keys outside the theme reference are dropped by the Engine. Written by scripts/contract.mjs.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"$comment": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"theme": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"preset": {
|
|
15
|
+
"enum": [
|
|
16
|
+
"asturiu",
|
|
17
|
+
"porcelain",
|
|
18
|
+
"midnight",
|
|
19
|
+
"aurora",
|
|
20
|
+
"sandstone",
|
|
21
|
+
"evergreen",
|
|
22
|
+
"graphite",
|
|
23
|
+
"ember"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"primary_color": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "^#[0-9a-fA-F]{6}$"
|
|
31
|
+
},
|
|
32
|
+
"logo_url": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "An inline image (data:<type>;base64,…), or file:<path> relative to the file, which the command line reads and sends inline."
|
|
35
|
+
},
|
|
36
|
+
"logo_dark_url": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "An inline image (data:<type>;base64,…), or file:<path> relative to the file, which the command line reads and sends inline."
|
|
39
|
+
},
|
|
40
|
+
"favicon_url": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "An inline image (data:<type>;base64,…), or file:<path> relative to the file, which the command line reads and sends inline."
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"additionalProperties": false
|
|
46
|
+
}
|