@substrat-run/engine-invites 0.6.0 → 0.6.1
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/dist/index.d.ts +68 -27
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -7
- package/dist/index.js.map +1 -1
- package/dist/model.d.ts +12 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/model.js +14 -0
- package/dist/model.js.map +1 -0
- package/dist/seam.d.ts +5 -0
- package/dist/seam.d.ts.map +1 -0
- package/dist/seam.js +18 -0
- package/dist/seam.js.map +1 -0
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -24,18 +24,19 @@ export declare const INVITES_CONFLICT_REASONS: readonly ['open_invite_limit'];
|
|
|
24
24
|
export type InvitesConflictReason = (typeof INVITES_CONFLICT_REASONS)[number];
|
|
25
25
|
export { invitation, invitesEntities, invitationRow } from './entities.js';
|
|
26
26
|
export { invitesOperations, INVITES_PERMISSIONS } from './operations.js';
|
|
27
|
+
import { z } from 'zod';
|
|
27
28
|
import { type ModuleRegistration, type OperationContext } from '@substrat-run/kernel';
|
|
28
29
|
export declare const INVITES_PERM: {
|
|
29
|
-
send: string &
|
|
30
|
-
read: string &
|
|
31
|
-
revoke: string &
|
|
30
|
+
send: string & z.$brand<"PermissionKey">;
|
|
31
|
+
read: string & z.$brand<"PermissionKey">;
|
|
32
|
+
revoke: string & z.$brand<"PermissionKey">;
|
|
32
33
|
};
|
|
33
34
|
export declare const invitesManifest: {
|
|
34
|
-
id: string &
|
|
35
|
+
id: string & z.$brand<"ModuleId">;
|
|
35
36
|
version: string;
|
|
36
37
|
kernelContract: string;
|
|
37
38
|
permissions: {
|
|
38
|
-
key: string &
|
|
39
|
+
key: string & z.$brand<"PermissionKey">;
|
|
39
40
|
description: string;
|
|
40
41
|
}[];
|
|
41
42
|
events: {
|
|
@@ -54,8 +55,8 @@ export declare const invitesManifest: {
|
|
|
54
55
|
};
|
|
55
56
|
attachmentTargets: {
|
|
56
57
|
entityType: string;
|
|
57
|
-
readPermission: string &
|
|
58
|
-
writePermission?: (string &
|
|
58
|
+
readPermission: string & z.$brand<"PermissionKey">;
|
|
59
|
+
writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
|
|
59
60
|
}[];
|
|
60
61
|
entityRelations?: {
|
|
61
62
|
entityType: string;
|
|
@@ -72,7 +73,7 @@ export declare const invitesManifest: {
|
|
|
72
73
|
everyMinutes: number;
|
|
73
74
|
};
|
|
74
75
|
input?: Record<string, unknown> | undefined;
|
|
75
|
-
permissions: (string &
|
|
76
|
+
permissions: (string & z.$brand<"PermissionKey">)[];
|
|
76
77
|
}[] | undefined;
|
|
77
78
|
withdraws?: string[] | undefined;
|
|
78
79
|
entitlementKey: string;
|
|
@@ -86,7 +87,7 @@ export declare const invitesManifest: {
|
|
|
86
87
|
default?: string | undefined;
|
|
87
88
|
group?: string | undefined;
|
|
88
89
|
}[] | undefined;
|
|
89
|
-
ownerGrants?: (string &
|
|
90
|
+
ownerGrants?: (string & z.$brand<"PermissionKey">)[] | undefined;
|
|
90
91
|
entitlements?: string[] | undefined;
|
|
91
92
|
provides?: string[] | undefined;
|
|
92
93
|
requires?: string[] | undefined;
|
|
@@ -109,13 +110,13 @@ export declare const invitesManifest: {
|
|
|
109
110
|
routes?: {
|
|
110
111
|
path: string;
|
|
111
112
|
screen: string;
|
|
112
|
-
permission: string &
|
|
113
|
+
permission: string & z.$brand<"PermissionKey">;
|
|
113
114
|
}[] | undefined;
|
|
114
115
|
nav?: {
|
|
115
116
|
label: string;
|
|
116
117
|
icon?: string | undefined;
|
|
117
118
|
to: string;
|
|
118
|
-
permission: string &
|
|
119
|
+
permission: string & z.$brand<"PermissionKey">;
|
|
119
120
|
}[] | undefined;
|
|
120
121
|
entityViews?: {
|
|
121
122
|
entityType: string;
|
|
@@ -124,12 +125,12 @@ export declare const invitesManifest: {
|
|
|
124
125
|
widgets?: {
|
|
125
126
|
slot: string;
|
|
126
127
|
component: string;
|
|
127
|
-
permission: string &
|
|
128
|
+
permission: string & z.$brand<"PermissionKey">;
|
|
128
129
|
}[] | undefined;
|
|
129
130
|
settingsPanels?: {
|
|
130
131
|
label: string;
|
|
131
132
|
component: string;
|
|
132
|
-
permission: string &
|
|
133
|
+
permission: string & z.$brand<"PermissionKey">;
|
|
133
134
|
}[] | undefined;
|
|
134
135
|
} | undefined;
|
|
135
136
|
};
|
|
@@ -137,21 +138,61 @@ export declare const invitesMigrations: {
|
|
|
137
138
|
version: string;
|
|
138
139
|
sql: string;
|
|
139
140
|
}[];
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
141
|
+
/**
|
|
142
|
+
* The seam schemas (#771/#970).
|
|
143
|
+
*
|
|
144
|
+
* `entities.ts` describes what is STORED, which is what the journal comparison
|
|
145
|
+
* checks against, so `state` is a bare string there. The engine's own machine is
|
|
146
|
+
* narrower than that, and the narrowing is the point: `state` decides whether an
|
|
147
|
+
* invitation is acceptable, so a row that drifted to a state this engine does not
|
|
148
|
+
* know must be a throw at the seam rather than a value `acceptInvite` compares
|
|
149
|
+
* against and silently refuses.
|
|
150
|
+
*/
|
|
151
|
+
declare const inviteState: z.ZodEnum<{
|
|
152
|
+
accepted: "accepted";
|
|
153
|
+
expired: "expired";
|
|
154
|
+
invited: "invited";
|
|
155
|
+
revoked: "revoked";
|
|
156
|
+
}>;
|
|
157
|
+
export type InviteState = z.infer<typeof inviteState>;
|
|
158
|
+
/** The stored row, hash included — never returned, only matched against. */
|
|
159
|
+
declare const invitationStored: z.ZodObject<{
|
|
160
|
+
id: z.ZodString;
|
|
161
|
+
org_id: z.ZodString;
|
|
162
|
+
identifier_hash: z.ZodString;
|
|
163
|
+
role_key: z.ZodString;
|
|
164
|
+
invited_by: z.ZodString;
|
|
165
|
+
accepted_by: z.ZodNullable<z.ZodString>;
|
|
166
|
+
created_at: z.ZodString;
|
|
167
|
+
expires_at: z.ZodString;
|
|
168
|
+
settled_at: z.ZodNullable<z.ZodString>;
|
|
169
|
+
state: z.ZodEnum<{
|
|
170
|
+
accepted: "accepted";
|
|
171
|
+
expired: "expired";
|
|
172
|
+
invited: "invited";
|
|
173
|
+
revoked: "revoked";
|
|
174
|
+
}>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
export type InvitationRow = z.infer<typeof invitationStored>;
|
|
177
|
+
/** What crosses the seam: the row minus the hash (`entities.ts` omits it). */
|
|
178
|
+
declare const invitationPublished: z.ZodObject<{
|
|
179
|
+
id: z.ZodString;
|
|
180
|
+
org_id: z.ZodString;
|
|
181
|
+
role_key: z.ZodString;
|
|
182
|
+
invited_by: z.ZodString;
|
|
183
|
+
accepted_by: z.ZodNullable<z.ZodString>;
|
|
184
|
+
created_at: z.ZodString;
|
|
185
|
+
expires_at: z.ZodString;
|
|
186
|
+
settled_at: z.ZodNullable<z.ZodString>;
|
|
187
|
+
state: z.ZodEnum<{
|
|
188
|
+
accepted: "accepted";
|
|
189
|
+
expired: "expired";
|
|
190
|
+
invited: "invited";
|
|
191
|
+
revoked: "revoked";
|
|
192
|
+
}>;
|
|
193
|
+
}, z.core.$strip>;
|
|
153
194
|
/** Public shape: the hash never leaves the engine. */
|
|
154
|
-
export type Invitation =
|
|
195
|
+
export type Invitation = z.infer<typeof invitationPublished>;
|
|
155
196
|
/**
|
|
156
197
|
* Hash an identifier with the scope's own salt (Web Crypto, never a node-only
|
|
157
198
|
* import).
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAQL,KAAK,KAAK,EAEX,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;GAQG;AACH,eAAO,MAAM,wB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AAE,CAe7E;AAqCD,eAAO,MAAM,aAAa,EAAE,kBAW3B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -29,10 +29,13 @@ const conflict = (reason, message) => substratError('conflict', message, { reaso
|
|
|
29
29
|
// entity-type constants its relation edges name, and the row schema to declare
|
|
30
30
|
// an operation's output against without retyping this engine's shape.
|
|
31
31
|
export { invitation, invitesEntities, invitationRow } from './entities.js';
|
|
32
|
+
import { invitation, invitationRow } from './entities.js';
|
|
32
33
|
// The declared operation surface (#865): what each operation checks and takes,
|
|
33
34
|
// readable by the conformance kit and by a composing vertical's routes.
|
|
34
35
|
export { invitesOperations, INVITES_PERMISSIONS } from './operations.js';
|
|
35
36
|
import { invitesOperations } from './operations.js';
|
|
37
|
+
import { columnsOf, returns } from './seam.js';
|
|
38
|
+
import { z } from 'zod';
|
|
36
39
|
import { assertAllowed, ulid, } from '@substrat-run/kernel';
|
|
37
40
|
// ============================================================================
|
|
38
41
|
// The invites engine (membership.md §6; mechanics from booking-social.md
|
|
@@ -114,7 +117,35 @@ export const invitesMigrations = [
|
|
|
114
117
|
`,
|
|
115
118
|
},
|
|
116
119
|
];
|
|
117
|
-
|
|
120
|
+
/**
|
|
121
|
+
* The seam schemas (#771/#970).
|
|
122
|
+
*
|
|
123
|
+
* `entities.ts` describes what is STORED, which is what the journal comparison
|
|
124
|
+
* checks against, so `state` is a bare string there. The engine's own machine is
|
|
125
|
+
* narrower than that, and the narrowing is the point: `state` decides whether an
|
|
126
|
+
* invitation is acceptable, so a row that drifted to a state this engine does not
|
|
127
|
+
* know must be a throw at the seam rather than a value `acceptInvite` compares
|
|
128
|
+
* against and silently refuses.
|
|
129
|
+
*/
|
|
130
|
+
const inviteState = z.enum(['invited', 'accepted', 'revoked', 'expired']);
|
|
131
|
+
/** The stored row, hash included — never returned, only matched against. */
|
|
132
|
+
const invitationStored = invitationRow.extend({ state: inviteState });
|
|
133
|
+
/** What crosses the seam: the row minus the hash (`entities.ts` omits it). */
|
|
134
|
+
const invitationPublished = invitation.extend({ state: inviteState });
|
|
135
|
+
/**
|
|
136
|
+
* The SELECT lists, DERIVED from those schemas rather than transcribed (#771).
|
|
137
|
+
*
|
|
138
|
+
* `PUBLIC_COLUMNS` was a hand-written string, and it was the only thing keeping
|
|
139
|
+
* the hash out of a read — one `SELECT *` and the property this engine exists to
|
|
140
|
+
* hold would have been gone with nothing to notice. Deriving it from the schema
|
|
141
|
+
* that already omits `identifier_hash` makes the omission structural.
|
|
142
|
+
*/
|
|
143
|
+
const PUBLIC_COLUMNS = columnsOf(invitationPublished);
|
|
144
|
+
const ROW_COLUMNS = columnsOf(invitationStored);
|
|
145
|
+
/** A stored row, parsed BEFORE anything is made of it. */
|
|
146
|
+
const storedInvitation = (r) => returns(invitationStored, `invitation row ${r.id}`, r);
|
|
147
|
+
/** A row on its way OUT, parsed by the shape a composing vertical declared. */
|
|
148
|
+
const publishedInvitation = (r) => returns(invitationPublished, `invitation ${r.id}`, r);
|
|
118
149
|
/** How long an unaccepted invitation stands. Bounded, because a standing offer should be. */
|
|
119
150
|
const DEFAULT_TTL_MS = 14 * 24 * 60 * 60 * 1000;
|
|
120
151
|
/** Open invitations one sender may hold per org — booking-social's rate limit. */
|
|
@@ -195,13 +226,17 @@ export async function sendInvite(ctx, input) {
|
|
|
195
226
|
* state that this transaction cannot reach atomically.
|
|
196
227
|
*/
|
|
197
228
|
export async function acceptInvite(ctx, input) {
|
|
198
|
-
const
|
|
199
|
-
input.invitationId,
|
|
200
|
-
])[0];
|
|
229
|
+
const raw = ctx.sql.query(`SELECT ${ROW_COLUMNS} FROM invites_invitation WHERE id = ?`, [input.invitationId])[0];
|
|
201
230
|
// One message for every failure mode — wrong id, wrong person, already settled,
|
|
202
231
|
// expired. Distinguishing them would turn this into an oracle.
|
|
203
232
|
const refuse = () => new Error('invitation is not acceptable');
|
|
204
|
-
if (!
|
|
233
|
+
if (!raw)
|
|
234
|
+
throw refuse();
|
|
235
|
+
// Parsed before the state machine reads it: a `state` this engine does not know
|
|
236
|
+
// is an engine fault, and answering `refuse()` for it would file that fault
|
|
237
|
+
// under "not acceptable" — indistinguishable from a wrong identifier forever.
|
|
238
|
+
const row = storedInvitation(raw);
|
|
239
|
+
if (row.state !== 'invited')
|
|
205
240
|
throw refuse();
|
|
206
241
|
if (row.expires_at <= ctx.now()) {
|
|
207
242
|
ctx.sql.exec(`UPDATE invites_invitation SET state = 'expired', settled_at = ? WHERE id = ?`, [
|
|
@@ -243,7 +278,9 @@ export async function acceptInvite(ctx, input) {
|
|
|
243
278
|
invitationId: row.id,
|
|
244
279
|
},
|
|
245
280
|
});
|
|
246
|
-
return ctx.sql.query(`SELECT ${PUBLIC_COLUMNS} FROM invites_invitation WHERE id = ?`, [
|
|
281
|
+
return publishedInvitation(ctx.sql.query(`SELECT ${PUBLIC_COLUMNS} FROM invites_invitation WHERE id = ?`, [
|
|
282
|
+
row.id,
|
|
283
|
+
])[0]);
|
|
247
284
|
}
|
|
248
285
|
/** Withdraw an unaccepted invitation. Settled invitations are left alone. */
|
|
249
286
|
export function revokeInvite(ctx, invitationId) {
|
|
@@ -273,7 +310,9 @@ export function listInvites(ctx, orgId) {
|
|
|
273
310
|
// same value and leaves their relative order to SQLite. That is fine for a
|
|
274
311
|
// whole-list read and fatal for the keyset walk `invites/list` now does, where
|
|
275
312
|
// a cursor over a column with ties skips or repeats rows.
|
|
276
|
-
return ctx.sql
|
|
313
|
+
return ctx.sql
|
|
314
|
+
.query(`SELECT ${PUBLIC_COLUMNS} FROM invites_invitation WHERE org_id = ? ORDER BY id DESC`, [orgId])
|
|
315
|
+
.map(publishedInvitation);
|
|
277
316
|
}
|
|
278
317
|
// -- operations: the permission check plus one exported function (D-28) -------
|
|
279
318
|
const sendOp = async (ctx, input) => {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,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F,8EAA8E;AAC9E,gEAAgE;AAChE,MAAM,MAAM,GAAoE,KAAK,EACnF,GAAG,EACH,KAAK,EACL,EAAE;IACF,aAAa,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,+EAA+E;IAC/E,4BAA4B;IAC5B,OAAO,YAAY,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;AACjF,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAqD,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;IACtF,aAAa,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IACpD,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAuB;IAC/C,QAAQ,EAAE,eAAe;IACzB,UAAU,EAAE,iBAAiB;IAC7B,+EAA+E;IAC/E,eAAe,EAAE,iBAAiB,CAAC,iBAAiB,CAAC;IACrD,UAAU,EAAE;QACV,cAAc,EAAE,MAAqD;QACrE,gBAAgB,EAAE,QAAuD;QACzE,cAAc,EAAE,MAAqD;QACrE,gBAAgB,EAAE,QAAuD;KAC1E;CACF,CAAC"}
|
package/dist/model.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The artifact of record for this engine (#697/#844, #976).
|
|
3
|
+
*
|
|
4
|
+
* `pnpm lint:model --check` re-emits this into `engines/invites/model.json`, so a
|
|
5
|
+
* changed table, a renamed field or a moved parent edge has to appear in a PR
|
|
6
|
+
* diff. No `lifecycles` option: this engine declares no state machine, and an
|
|
7
|
+
* empty one would claim otherwise.
|
|
8
|
+
*
|
|
9
|
+
* Imported by nothing, so the direction stays acyclic.
|
|
10
|
+
*/
|
|
11
|
+
export declare const invitesModel: import("@substrat-run/contracts").EmittedModel;
|
|
12
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,gDAA6B,CAAC"}
|
package/dist/model.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { emitModel } from '@substrat-run/contracts';
|
|
2
|
+
import { invitesEntities } from './entities.js';
|
|
3
|
+
/**
|
|
4
|
+
* The artifact of record for this engine (#697/#844, #976).
|
|
5
|
+
*
|
|
6
|
+
* `pnpm lint:model --check` re-emits this into `engines/invites/model.json`, so a
|
|
7
|
+
* changed table, a renamed field or a moved parent edge has to appear in a PR
|
|
8
|
+
* diff. No `lifecycles` option: this engine declares no state machine, and an
|
|
9
|
+
* empty one would claim otherwise.
|
|
10
|
+
*
|
|
11
|
+
* Imported by nothing, so the direction stays acyclic.
|
|
12
|
+
*/
|
|
13
|
+
export const invitesModel = emitModel(invitesEntities);
|
|
14
|
+
//# sourceMappingURL=model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC"}
|
package/dist/seam.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** How this engine names itself in a seam failure. */
|
|
2
|
+
export declare const columnsOf: (schema: {
|
|
3
|
+
readonly shape: Readonly<Record<string, unknown>>;
|
|
4
|
+
}) => string, returns: <T>(schema: import("zod").ZodType<T>, surface: string, value: unknown) => T;
|
|
5
|
+
//# sourceMappingURL=seam.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seam.d.ts","sourceRoot":"","sources":["../src/seam.ts"],"names":[],"mappings":"AAgBA,sDAAsD;AACtD,eAAO,MAAQ,SAAS;;cAAE,OAAO,6EAAiC,CAAC"}
|
package/dist/seam.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The engine seam (#771) for engine-invites — the NAME, and nothing else.
|
|
3
|
+
*
|
|
4
|
+
* `returns(schema, surface, value)` and `columnsOf(schema)` live in
|
|
5
|
+
* `@substrat-run/contracts` (#970), where the prose explaining what they are for
|
|
6
|
+
* lives with them; an engine supplies only the name it answers under.
|
|
7
|
+
*
|
|
8
|
+
* What is specific to this engine is what the seam must NOT publish. The stored
|
|
9
|
+
* row carries `identifier_hash`, and the whole non-enumerability property depends
|
|
10
|
+
* on it never leaving — so the published schema is the row minus the hash, and
|
|
11
|
+
* `columnsOf` derives the SELECT list from THAT. The exclusion is then a fact
|
|
12
|
+
* about the read rather than a column list somebody remembered to keep in step:
|
|
13
|
+
* `SELECT *` here would have leaked the hash on the first read that forgot.
|
|
14
|
+
*/
|
|
15
|
+
import { engineSeam } from '@substrat-run/contracts';
|
|
16
|
+
/** How this engine names itself in a seam failure. */
|
|
17
|
+
export const { columnsOf, returns } = engineSeam('engine-invites');
|
|
18
|
+
//# sourceMappingURL=seam.js.map
|
package/dist/seam.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seam.js","sourceRoot":"","sources":["../src/seam.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,sDAAsD;AACtD,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@substrat-run/engine-invites",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Substrat engine: invitations — invite by verified hashed identifier, accept-required, non-enumerable",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@substrat-run/
|
|
29
|
-
"@substrat-run/
|
|
28
|
+
"@substrat-run/contracts": "^0.95.0",
|
|
29
|
+
"@substrat-run/kernel": "^0.95.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"typescript": "^7.0.0",
|
|
33
33
|
"vitest": "^3.2.7",
|
|
34
34
|
"zod": "^4.4.3",
|
|
35
|
-
"@substrat-run/contract-tests": "^0.
|
|
36
|
-
"@substrat-run/
|
|
37
|
-
"@substrat-run/
|
|
35
|
+
"@substrat-run/contract-tests": "^0.95.0",
|
|
36
|
+
"@substrat-run/engine-test-kit": "^0.3.22",
|
|
37
|
+
"@substrat-run/model-emit": "0.8.10"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"zod": "^4.4.0"
|