@productcraft/platform-auth 0.0.9 → 0.0.11

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/README.md CHANGED
@@ -12,10 +12,10 @@ Server-side only. The SDK ships a Platform API Key in the `Authorization` header
12
12
 
13
13
  | If your goal is to … | Reach for |
14
14
  |---|---|
15
- | Authenticate **your own end-users** in a product you're building (Heimdall apps) | [`@productcraft/heimdall`](https://www.npmjs.com/package/@productcraft/heimdall) |
15
+ | Authenticate **your own end-users** in a product you're building (Auth apps) | [`@productcraft/auth`](https://www.npmjs.com/package/@productcraft/auth) |
16
16
  | Authenticate **your team** into the ProductCraft console + manage workspaces | **this package** |
17
17
 
18
- The two are easy to confuse because both have "auth" in the name. Platform-Auth owns *the ProductCraft account you use to log into productcraft.co*. Heimdall owns *the end-users of products you build on the platform*. Distinct databases, distinct signing keys.
18
+ The two are easy to confuse because both have "auth" in the name. Platform-Auth owns *the ProductCraft account you use to log into productcraft.co*. Auth owns *the end-users of products you build on the platform*. Distinct databases, distinct signing keys.
19
19
 
20
20
  ## Quick start
21
21
 
@@ -33,7 +33,7 @@ const { data } = await platformAuth.client.GET(
33
33
  );
34
34
 
35
35
  // data.policy — flat array of IAM-style { effect, actions, resources } statements
36
- // data.services — string[] of enabled services (envoi / rally / agora / heimdall / …)
36
+ // data.services — string[] of enabled services (mail / waitlist / social / auth / …)
37
37
  ```
38
38
 
39
39
  The `client` is an [`openapi-fetch`](https://openapi-ts.dev/openapi-fetch/) instance bound to `https://api.auth.productcraft.co` and your auth credential.
@@ -198,7 +198,7 @@ const { data: policy } = await platformAuth.client.POST(
198
198
  policy: [
199
199
  // Permission action prefixes rebranded (heimdall.* → auth.*, envoi.* → mail.*),
200
200
  // but resource-URN namespaces intentionally stay pcft:heimdall: / pcft:envoi: —
201
- // the services still emit those resource prefixes.
201
+ // the services still emit the old resource prefixes.
202
202
  { effect: "allow", actions: ["auth.create", "auth.read", "auth.update"], resources: ["pcft:heimdall:app/*"] },
203
203
  { effect: "allow", actions: ["mail.read", "mail.send"], resources: ["*"] },
204
204
  ],
@@ -232,7 +232,7 @@ await platformAuth.client.PATCH(
232
232
  ### Service activation
233
233
 
234
234
  ```ts
235
- // Enable / disable a service for the workspace (envoi, rally, agora, heimdall, …)
235
+ // Enable / disable a service for the workspace (mail, waitlist, social, auth, …)
236
236
  await platformAuth.client.PUT(
237
237
  "/v1/workspaces/{workspace_slug}/services/{service}",
238
238
  { params: { ... }, body: { enabled: true } },
package/dist/index.d.cts CHANGED
@@ -464,7 +464,7 @@ interface paths {
464
464
  };
465
465
  /**
466
466
  * Unified workspace audit feed (cursor-paginated)
467
- * @description Merged audit timeline across the workspace surfaces. v1 covers `workspace_audit` (this service); per-app Heimdall and per-community Agora rows arrive in a follow-up. Response shape is stable from v1 — clients can build against it today.
467
+ * @description Merged audit timeline across the workspace surfaces. v1 covers `workspace_audit` (this service); per-app Auth and per-community Social rows arrive in a follow-up. Response shape is stable from v1 — clients can build against it today.
468
468
  */
469
469
  get: operations["WorkspaceAuditFeedController_listFeed"];
470
470
  put?: never;
@@ -762,7 +762,7 @@ interface components {
762
762
  description: string | null;
763
763
  /** Format: uuid */
764
764
  id: string;
765
- /** @example envoi-readonly */
765
+ /** @example mail-readonly */
766
766
  name: string;
767
767
  };
768
768
  CallbackBodyDto: {
@@ -780,7 +780,7 @@ interface components {
780
780
  description?: string;
781
781
  /**
782
782
  * @description Human-readable PAK name (shown in the keys list).
783
- * @example Production agora client
783
+ * @example Production social client
784
784
  */
785
785
  name: string;
786
786
  /**
@@ -830,12 +830,12 @@ interface components {
830
830
  CreateWorkspacePolicyDto: {
831
831
  /**
832
832
  * @description Optional human description. Pass `null` to clear an existing description on PATCH.
833
- * @example Read-only access to all Envoi resources
833
+ * @example Read-only access to all Mail resources
834
834
  */
835
835
  description?: string | null;
836
836
  /**
837
837
  * @description Policy name (1-64 chars, alphanumeric + space/underscore/hyphen). Unique per workspace.
838
- * @example envoi-readonly
838
+ * @example mail-readonly
839
839
  */
840
840
  name: string;
841
841
  /**
@@ -985,8 +985,8 @@ interface components {
985
985
  /**
986
986
  * @description Enabled services on this workspace.
987
987
  * @example [
988
- * "envoi",
989
- * "rally"
988
+ * "mail",
989
+ * "waitlist"
990
990
  * ]
991
991
  */
992
992
  services: string[];
@@ -1005,8 +1005,8 @@ interface components {
1005
1005
  /**
1006
1006
  * @description Enabled services on this workspace.
1007
1007
  * @example [
1008
- * "envoi",
1009
- * "rally"
1008
+ * "mail",
1009
+ * "waitlist"
1010
1010
  * ]
1011
1011
  */
1012
1012
  services: string[];
@@ -1082,7 +1082,7 @@ interface components {
1082
1082
  description: string | null;
1083
1083
  /** Format: uuid */
1084
1084
  id: string;
1085
- /** @example envoi-readonly */
1085
+ /** @example mail-readonly */
1086
1086
  name: string;
1087
1087
  /** @description IAM-style policy statements bound to this managed policy. */
1088
1088
  policy: components["schemas"]["PolicyStatementDto"][];
@@ -1102,7 +1102,7 @@ interface components {
1102
1102
  description: string | null;
1103
1103
  /** Format: uuid */
1104
1104
  id: string;
1105
- /** @example envoi-readonly */
1105
+ /** @example mail-readonly */
1106
1106
  name: string;
1107
1107
  /** @description IAM-style policy statements bound to this managed policy. */
1108
1108
  policy: components["schemas"]["PolicyStatementDto"][];
@@ -1155,7 +1155,7 @@ interface components {
1155
1155
  };
1156
1156
  PolicyStatementDto: {
1157
1157
  /**
1158
- * @description Action strings the statement applies to. Wildcards (e.g. `agora.*`, `*.read`, `*`) supported per `actionMatches` semantics.
1158
+ * @description Action strings the statement applies to. Wildcards (e.g. `social.*`, `*.read`, `*`) supported per `actionMatches` semantics.
1159
1159
  * @example [
1160
1160
  * "social.read",
1161
1161
  * "social.list"
@@ -1391,12 +1391,12 @@ interface components {
1391
1391
  UpdateWorkspacePolicyDto: {
1392
1392
  /**
1393
1393
  * @description Optional human description. Pass `null` to clear an existing description on PATCH.
1394
- * @example Read-only access to all Envoi resources
1394
+ * @example Read-only access to all Mail resources
1395
1395
  */
1396
1396
  description?: string | null;
1397
1397
  /**
1398
1398
  * @description Policy name (1-64 chars, alphanumeric + space/underscore/hyphen). Unique per workspace.
1399
- * @example envoi-readonly
1399
+ * @example mail-readonly
1400
1400
  */
1401
1401
  name?: string;
1402
1402
  /**
@@ -1609,8 +1609,8 @@ interface components {
1609
1609
  /** Format: uuid */
1610
1610
  enabled_by: string | null;
1611
1611
  /**
1612
- * @description Service identifier (e.g. `envoi`, `rally`, `agora`, `heimdall`).
1613
- * @example envoi
1612
+ * @description Service identifier (e.g. `mail`, `waitlist`, `social`, `auth`).
1613
+ * @example mail
1614
1614
  */
1615
1615
  service: string;
1616
1616
  /** @description Per-service settings blob (service-specific shape). */
@@ -3235,7 +3235,7 @@ interface operations {
3235
3235
  };
3236
3236
  cookie?: never;
3237
3237
  };
3238
- /** @description Replaces the per-service settings jsonb entirely. The body is the settings object itself (no wrapper). Service-specific shape — e.g. envoi tracks default sender, agora tracks ranking weights. */
3238
+ /** @description Replaces the per-service settings jsonb entirely. The body is the settings object itself (no wrapper). Service-specific shape — e.g. mail tracks default sender, social tracks ranking weights. */
3239
3239
  requestBody: {
3240
3240
  content: {
3241
3241
  "application/json": {
package/dist/index.d.ts CHANGED
@@ -464,7 +464,7 @@ interface paths {
464
464
  };
465
465
  /**
466
466
  * Unified workspace audit feed (cursor-paginated)
467
- * @description Merged audit timeline across the workspace surfaces. v1 covers `workspace_audit` (this service); per-app Heimdall and per-community Agora rows arrive in a follow-up. Response shape is stable from v1 — clients can build against it today.
467
+ * @description Merged audit timeline across the workspace surfaces. v1 covers `workspace_audit` (this service); per-app Auth and per-community Social rows arrive in a follow-up. Response shape is stable from v1 — clients can build against it today.
468
468
  */
469
469
  get: operations["WorkspaceAuditFeedController_listFeed"];
470
470
  put?: never;
@@ -762,7 +762,7 @@ interface components {
762
762
  description: string | null;
763
763
  /** Format: uuid */
764
764
  id: string;
765
- /** @example envoi-readonly */
765
+ /** @example mail-readonly */
766
766
  name: string;
767
767
  };
768
768
  CallbackBodyDto: {
@@ -780,7 +780,7 @@ interface components {
780
780
  description?: string;
781
781
  /**
782
782
  * @description Human-readable PAK name (shown in the keys list).
783
- * @example Production agora client
783
+ * @example Production social client
784
784
  */
785
785
  name: string;
786
786
  /**
@@ -830,12 +830,12 @@ interface components {
830
830
  CreateWorkspacePolicyDto: {
831
831
  /**
832
832
  * @description Optional human description. Pass `null` to clear an existing description on PATCH.
833
- * @example Read-only access to all Envoi resources
833
+ * @example Read-only access to all Mail resources
834
834
  */
835
835
  description?: string | null;
836
836
  /**
837
837
  * @description Policy name (1-64 chars, alphanumeric + space/underscore/hyphen). Unique per workspace.
838
- * @example envoi-readonly
838
+ * @example mail-readonly
839
839
  */
840
840
  name: string;
841
841
  /**
@@ -985,8 +985,8 @@ interface components {
985
985
  /**
986
986
  * @description Enabled services on this workspace.
987
987
  * @example [
988
- * "envoi",
989
- * "rally"
988
+ * "mail",
989
+ * "waitlist"
990
990
  * ]
991
991
  */
992
992
  services: string[];
@@ -1005,8 +1005,8 @@ interface components {
1005
1005
  /**
1006
1006
  * @description Enabled services on this workspace.
1007
1007
  * @example [
1008
- * "envoi",
1009
- * "rally"
1008
+ * "mail",
1009
+ * "waitlist"
1010
1010
  * ]
1011
1011
  */
1012
1012
  services: string[];
@@ -1082,7 +1082,7 @@ interface components {
1082
1082
  description: string | null;
1083
1083
  /** Format: uuid */
1084
1084
  id: string;
1085
- /** @example envoi-readonly */
1085
+ /** @example mail-readonly */
1086
1086
  name: string;
1087
1087
  /** @description IAM-style policy statements bound to this managed policy. */
1088
1088
  policy: components["schemas"]["PolicyStatementDto"][];
@@ -1102,7 +1102,7 @@ interface components {
1102
1102
  description: string | null;
1103
1103
  /** Format: uuid */
1104
1104
  id: string;
1105
- /** @example envoi-readonly */
1105
+ /** @example mail-readonly */
1106
1106
  name: string;
1107
1107
  /** @description IAM-style policy statements bound to this managed policy. */
1108
1108
  policy: components["schemas"]["PolicyStatementDto"][];
@@ -1155,7 +1155,7 @@ interface components {
1155
1155
  };
1156
1156
  PolicyStatementDto: {
1157
1157
  /**
1158
- * @description Action strings the statement applies to. Wildcards (e.g. `agora.*`, `*.read`, `*`) supported per `actionMatches` semantics.
1158
+ * @description Action strings the statement applies to. Wildcards (e.g. `social.*`, `*.read`, `*`) supported per `actionMatches` semantics.
1159
1159
  * @example [
1160
1160
  * "social.read",
1161
1161
  * "social.list"
@@ -1391,12 +1391,12 @@ interface components {
1391
1391
  UpdateWorkspacePolicyDto: {
1392
1392
  /**
1393
1393
  * @description Optional human description. Pass `null` to clear an existing description on PATCH.
1394
- * @example Read-only access to all Envoi resources
1394
+ * @example Read-only access to all Mail resources
1395
1395
  */
1396
1396
  description?: string | null;
1397
1397
  /**
1398
1398
  * @description Policy name (1-64 chars, alphanumeric + space/underscore/hyphen). Unique per workspace.
1399
- * @example envoi-readonly
1399
+ * @example mail-readonly
1400
1400
  */
1401
1401
  name?: string;
1402
1402
  /**
@@ -1609,8 +1609,8 @@ interface components {
1609
1609
  /** Format: uuid */
1610
1610
  enabled_by: string | null;
1611
1611
  /**
1612
- * @description Service identifier (e.g. `envoi`, `rally`, `agora`, `heimdall`).
1613
- * @example envoi
1612
+ * @description Service identifier (e.g. `mail`, `waitlist`, `social`, `auth`).
1613
+ * @example mail
1614
1614
  */
1615
1615
  service: string;
1616
1616
  /** @description Per-service settings blob (service-specific shape). */
@@ -3235,7 +3235,7 @@ interface operations {
3235
3235
  };
3236
3236
  cookie?: never;
3237
3237
  };
3238
- /** @description Replaces the per-service settings jsonb entirely. The body is the settings object itself (no wrapper). Service-specific shape — e.g. envoi tracks default sender, agora tracks ranking weights. */
3238
+ /** @description Replaces the per-service settings jsonb entirely. The body is the settings object itself (no wrapper). Service-specific shape — e.g. mail tracks default sender, social tracks ranking weights. */
3239
3239
  requestBody: {
3240
3240
  content: {
3241
3241
  "application/json": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@productcraft/platform-auth",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "PlatformUser auth, workspaces, members, invites, roles + IAM policies, API keys, service activation, and the introspect endpoint every ProductCraft backend uses to resolve permissions. Generated from the production OpenAPI spec.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -35,12 +35,11 @@
35
35
  },
36
36
  "homepage": "https://github.com/clauderanelagh/productcraft-node/tree/main/packages/platform-auth",
37
37
  "publishConfig": {
38
- "access": "public",
39
- "provenance": true
38
+ "access": "public"
40
39
  },
41
40
  "dependencies": {
42
41
  "openapi-fetch": "^0.13.0",
43
- "@productcraft/core": "^0.0.5"
42
+ "@productcraft/core": "^0.1.0"
44
43
  },
45
44
  "scripts": {
46
45
  "build": "tsup"