@selvajs/platform 0.17.0 → 0.18.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.
@@ -1,4 +1,5 @@
1
1
  import type { OrgRole, OrgPermission } from '../organizations/schemas.js';
2
+ import type { PlatformPermission } from '../permissions/types.js';
2
3
  /**
3
4
  * "The holder of the raw token whose hash is `tokenHash` may join `orgId` at
4
5
  * `orgRole` with these org permissions." Accepting creates the user (if
@@ -22,6 +23,15 @@ export interface Invite {
22
23
  orgRole: OrgRole;
23
24
  /** May be empty — adapters may seed from `DEFAULT_ORG_PERMISSIONS` in that case. */
24
25
  orgPermissions: OrgPermission[];
26
+ /**
27
+ * Instance-wide permissions granted on accept — usually empty.
28
+ *
29
+ * Only a caller who already holds `instance_admin` may mint an invite
30
+ * carrying these; the mint route enforces that, because anyone able to set
31
+ * this field can hand out `instance_admin` and escalate past org scope.
32
+ * Optional so invites stored before this field existed still parse.
33
+ */
34
+ platformPermissions?: PlatformPermission[];
25
35
  invitedBy: string;
26
36
  createdAt: string;
27
37
  expiresAt: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/invites/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE1E;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,MAAM;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,0GAA0G;IAC1G,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,oFAAoF;IACpF,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/invites/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,MAAM;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,0GAA0G;IAC1G,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,oFAAoF;IACpF,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selvajs/platform",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "Pure TypeScript interfaces for Selva platform providers (auth, definitions, compute)",
5
5
  "license": "MIT",
6
6
  "author": "VektorNode",