@fabrika/auth-core 0.9.0-dev.41 → 0.9.0-dev.42
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/package.json +1 -1
- package/src/contract-canonical.ts +1 -0
- package/src/contract.ts +8 -2
- package/types/src/contract.d.ts +8 -2
package/package.json
CHANGED
|
@@ -88,6 +88,7 @@ export function canonicalizeArtifact(artifact: ContractArtifact): ContractArtifa
|
|
|
88
88
|
...(artifact.members === undefined ? {} : { members: artifact.members }),
|
|
89
89
|
...(artifact.directory === undefined ? {} : { directory: artifact.directory }),
|
|
90
90
|
...(artifact.terminal === undefined ? {} : { terminal: { identify: artifact.terminal.identify } }),
|
|
91
|
+
...(artifact.notifications === undefined ? {} : { notifications: artifact.notifications }),
|
|
91
92
|
...(artifact.procedures === undefined
|
|
92
93
|
? {}
|
|
93
94
|
: {
|
package/src/contract.ts
CHANGED
|
@@ -74,6 +74,11 @@ export interface ContractArtifact extends EndpointTable {
|
|
|
74
74
|
* terminal's browser there, and only an application that declares it may assert a person. Absent unless declared.
|
|
75
75
|
*/
|
|
76
76
|
readonly terminal?: TerminalArtifact
|
|
77
|
+
/**
|
|
78
|
+
* The application notifies people through Web Push (ADR-0088), so the table holds the framework's push rows under
|
|
79
|
+
* `/__fabrika/push`. Absent unless declared, so the digest stays.
|
|
80
|
+
*/
|
|
81
|
+
readonly notifications?: true
|
|
77
82
|
/**
|
|
78
83
|
* What each procedure of the staged kit admits and how long it runs, by endpoint id, with every default applied: the
|
|
79
84
|
* rules the application applies itself, beside the row the proxy applies. Absent for a contract with no such
|
|
@@ -167,10 +172,11 @@ export type EndpointKind = CredentialedEndpointKind | AnonymousEndpointKind
|
|
|
167
172
|
|
|
168
173
|
/**
|
|
169
174
|
* The contract entry that declared an endpoint. A `challenge` row is the framework's own: the endpoint that issues the
|
|
170
|
-
* ALTCHA challenge of the public procedure `name`.
|
|
175
|
+
* ALTCHA challenge of the public procedure `name`. A `push` row is the framework's own too: one of the rows a contract
|
|
176
|
+
* that declares `notifications` gets under `/__fabrika/push` (ADR-0088), named by its part (`worker`).
|
|
171
177
|
*/
|
|
172
178
|
export interface EndpointSource {
|
|
173
|
-
readonly kind: 'mount' | 'export' | 'files' | 'challenge'
|
|
179
|
+
readonly kind: 'mount' | 'export' | 'files' | 'challenge' | 'push'
|
|
174
180
|
readonly name: string
|
|
175
181
|
}
|
|
176
182
|
|
package/types/src/contract.d.ts
CHANGED
|
@@ -75,6 +75,11 @@ export interface ContractArtifact extends EndpointTable {
|
|
|
75
75
|
* terminal's browser there, and only an application that declares it may assert a person. Absent unless declared.
|
|
76
76
|
*/
|
|
77
77
|
readonly terminal?: TerminalArtifact;
|
|
78
|
+
/**
|
|
79
|
+
* The application notifies people through Web Push (ADR-0088), so the table holds the framework's push rows under
|
|
80
|
+
* `/__fabrika/push`. Absent unless declared, so the digest stays.
|
|
81
|
+
*/
|
|
82
|
+
readonly notifications?: true;
|
|
78
83
|
/**
|
|
79
84
|
* What each procedure of the staged kit admits and how long it runs, by endpoint id, with every default applied: the
|
|
80
85
|
* rules the application applies itself, beside the row the proxy applies. Absent for a contract with no such
|
|
@@ -153,10 +158,11 @@ export type AnonymousEndpointKind = 'health' | 'form' | 'webhook' | 'link-spa' |
|
|
|
153
158
|
export type EndpointKind = CredentialedEndpointKind | AnonymousEndpointKind;
|
|
154
159
|
/**
|
|
155
160
|
* The contract entry that declared an endpoint. A `challenge` row is the framework's own: the endpoint that issues the
|
|
156
|
-
* ALTCHA challenge of the public procedure `name`.
|
|
161
|
+
* ALTCHA challenge of the public procedure `name`. A `push` row is the framework's own too: one of the rows a contract
|
|
162
|
+
* that declares `notifications` gets under `/__fabrika/push` (ADR-0088), named by its part (`worker`).
|
|
157
163
|
*/
|
|
158
164
|
export interface EndpointSource {
|
|
159
|
-
readonly kind: 'mount' | 'export' | 'files' | 'challenge';
|
|
165
|
+
readonly kind: 'mount' | 'export' | 'files' | 'challenge' | 'push';
|
|
160
166
|
readonly name: string;
|
|
161
167
|
}
|
|
162
168
|
interface EndpointRowBase {
|