@voyant-travel/auth 0.124.2 → 0.125.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.
Files changed (41) hide show
  1. package/dist/api-token-create.d.ts +2 -1
  2. package/dist/api-token-create.d.ts.map +1 -1
  3. package/dist/api-token-create.js +15 -9
  4. package/dist/api-token-create.js.map +1 -1
  5. package/dist/auth-facades.d.ts +2 -0
  6. package/dist/auth-facades.d.ts.map +1 -1
  7. package/dist/auth-facades.js +1 -1
  8. package/dist/auth-facades.js.map +1 -1
  9. package/dist/identity-access-graph-runtime.d.ts +32 -0
  10. package/dist/identity-access-graph-runtime.d.ts.map +1 -0
  11. package/dist/identity-access-graph-runtime.js +17 -0
  12. package/dist/identity-access-graph-runtime.js.map +1 -0
  13. package/dist/identity-access-runtime-port.d.ts +18 -0
  14. package/dist/identity-access-runtime-port.d.ts.map +1 -0
  15. package/dist/identity-access-runtime-port.js +15 -0
  16. package/dist/identity-access-runtime-port.js.map +1 -0
  17. package/dist/invitations-routes.d.ts +14 -0
  18. package/dist/invitations-routes.d.ts.map +1 -0
  19. package/dist/invitations-routes.js +242 -0
  20. package/dist/invitations-routes.js.map +1 -0
  21. package/dist/operator-node-runtime.d.ts +99 -0
  22. package/dist/operator-node-runtime.d.ts.map +1 -0
  23. package/dist/operator-node-runtime.js +688 -0
  24. package/dist/operator-node-runtime.js.map +1 -0
  25. package/dist/runtime-contributor.d.ts +7 -0
  26. package/dist/runtime-contributor.d.ts.map +1 -0
  27. package/dist/runtime-contributor.js +48 -0
  28. package/dist/runtime-contributor.js.map +1 -0
  29. package/dist/team-routes.d.ts +13 -0
  30. package/dist/team-routes.d.ts.map +1 -0
  31. package/dist/team-routes.js +211 -0
  32. package/dist/team-routes.js.map +1 -0
  33. package/dist/voyant.d.ts +3 -0
  34. package/dist/voyant.d.ts.map +1 -0
  35. package/dist/voyant.js +63 -0
  36. package/dist/voyant.js.map +1 -0
  37. package/openapi/admin/invitations.json +89 -0
  38. package/openapi/admin/team.json +171 -0
  39. package/openapi/storefront/invitations.json +87 -0
  40. package/package.json +62 -5
  41. package/dist/tsconfig.typecheck.tsbuildinfo +0 -1
@@ -0,0 +1,171 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "Voyant Auth Team Admin API",
5
+ "version": "1.0.0"
6
+ },
7
+ "paths": {
8
+ "/v1/admin/team/members": {
9
+ "get": {
10
+ "operationId": "listTeamMembers",
11
+ "summary": "List team members",
12
+ "tags": ["Team"],
13
+ "x-voyant-api-id": "@voyant-travel/auth#team.api.admin",
14
+ "responses": {
15
+ "200": { "description": "The deployment team members." },
16
+ "401": { "description": "The caller is not authenticated." },
17
+ "404": { "description": "Cloud team management is unavailable." }
18
+ }
19
+ }
20
+ },
21
+ "/v1/admin/team/roles": {
22
+ "get": {
23
+ "operationId": "listTeamRoles",
24
+ "summary": "List team roles",
25
+ "tags": ["Team"],
26
+ "x-voyant-api-id": "@voyant-travel/auth#team.api.admin",
27
+ "responses": {
28
+ "200": { "description": "The available team roles." },
29
+ "401": { "description": "The caller is not authenticated." },
30
+ "404": { "description": "Cloud team management is unavailable." }
31
+ }
32
+ }
33
+ },
34
+ "/v1/admin/team/invitations": {
35
+ "get": {
36
+ "operationId": "listTeamInvitations",
37
+ "summary": "List team invitations",
38
+ "tags": ["Team"],
39
+ "x-voyant-api-id": "@voyant-travel/auth#team.api.admin",
40
+ "responses": {
41
+ "200": { "description": "The outstanding team invitations." },
42
+ "401": { "description": "The caller is not authenticated." }
43
+ }
44
+ },
45
+ "post": {
46
+ "operationId": "createTeamInvitation",
47
+ "summary": "Invite a team member",
48
+ "tags": ["Team"],
49
+ "x-voyant-api-id": "@voyant-travel/auth#team.api.admin",
50
+ "requestBody": {
51
+ "required": true,
52
+ "content": {
53
+ "application/json": {
54
+ "schema": {
55
+ "type": "object",
56
+ "required": ["email"],
57
+ "properties": {
58
+ "email": { "type": "string", "format": "email" },
59
+ "roleSlug": {
60
+ "type": ["string", "null"],
61
+ "minLength": 1,
62
+ "maxLength": 120
63
+ },
64
+ "expiresInDays": {
65
+ "type": "integer",
66
+ "minimum": 1,
67
+ "maximum": 30
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ },
74
+ "responses": {
75
+ "201": { "description": "The created team invitation." },
76
+ "401": { "description": "The caller is not authenticated." }
77
+ }
78
+ }
79
+ },
80
+ "/v1/admin/team/invitations/{invitationId}": {
81
+ "delete": {
82
+ "operationId": "revokeTeamInvitation",
83
+ "summary": "Revoke a team invitation",
84
+ "tags": ["Team"],
85
+ "x-voyant-api-id": "@voyant-travel/auth#team.api.admin",
86
+ "parameters": [
87
+ {
88
+ "name": "invitationId",
89
+ "in": "path",
90
+ "required": true,
91
+ "schema": { "type": "string" }
92
+ }
93
+ ],
94
+ "responses": {
95
+ "204": { "description": "The invitation was revoked." },
96
+ "401": { "description": "The caller is not authenticated." }
97
+ }
98
+ }
99
+ },
100
+ "/v1/admin/team/members/{membershipId}/access": {
101
+ "put": {
102
+ "operationId": "setTeamMemberAccess",
103
+ "summary": "Set team member access",
104
+ "tags": ["Team"],
105
+ "x-voyant-api-id": "@voyant-travel/auth#team.api.admin",
106
+ "parameters": [
107
+ {
108
+ "name": "membershipId",
109
+ "in": "path",
110
+ "required": true,
111
+ "schema": { "type": "string" }
112
+ }
113
+ ],
114
+ "requestBody": {
115
+ "required": true,
116
+ "content": {
117
+ "application/json": {
118
+ "schema": {
119
+ "type": "object",
120
+ "required": ["hasAccess"],
121
+ "properties": { "hasAccess": { "type": "boolean" } }
122
+ }
123
+ }
124
+ }
125
+ },
126
+ "responses": {
127
+ "200": { "description": "The updated team member." },
128
+ "401": { "description": "The caller is not authenticated." }
129
+ }
130
+ }
131
+ },
132
+ "/v1/admin/team/members/{membershipId}/permissions": {
133
+ "put": {
134
+ "operationId": "setTeamMemberPermissions",
135
+ "summary": "Set team member permissions",
136
+ "tags": ["Team"],
137
+ "x-voyant-api-id": "@voyant-travel/auth#team.api.admin",
138
+ "parameters": [
139
+ {
140
+ "name": "membershipId",
141
+ "in": "path",
142
+ "required": true,
143
+ "schema": { "type": "string" }
144
+ }
145
+ ],
146
+ "requestBody": {
147
+ "required": true,
148
+ "content": {
149
+ "application/json": {
150
+ "schema": {
151
+ "type": "object",
152
+ "required": ["permissions"],
153
+ "properties": {
154
+ "permissions": {
155
+ "type": "array",
156
+ "maxItems": 200,
157
+ "items": { "type": "string", "minLength": 1, "maxLength": 120 }
158
+ }
159
+ }
160
+ }
161
+ }
162
+ }
163
+ },
164
+ "responses": {
165
+ "200": { "description": "The updated team member." },
166
+ "401": { "description": "The caller is not authenticated." }
167
+ }
168
+ }
169
+ }
170
+ }
171
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "Voyant Auth Invitations Public API",
5
+ "version": "1.0.0"
6
+ },
7
+ "paths": {
8
+ "/v1/public/invitations/{token}": {
9
+ "get": {
10
+ "operationId": "inspectAuthInvitation",
11
+ "summary": "Inspect a user invitation",
12
+ "tags": ["Auth invitations"],
13
+ "x-voyant-api-id": "@voyant-travel/auth#invitations.api.public",
14
+ "parameters": [
15
+ {
16
+ "name": "token",
17
+ "in": "path",
18
+ "required": true,
19
+ "schema": { "type": "string" }
20
+ }
21
+ ],
22
+ "responses": {
23
+ "200": {
24
+ "description": "The invitation is valid."
25
+ },
26
+ "404": {
27
+ "description": "The invitation was not found."
28
+ },
29
+ "410": {
30
+ "description": "The invitation is expired or redeemed."
31
+ }
32
+ }
33
+ }
34
+ },
35
+ "/v1/public/invitations/{token}/redeem": {
36
+ "post": {
37
+ "operationId": "redeemAuthInvitation",
38
+ "summary": "Redeem a user invitation",
39
+ "tags": ["Auth invitations"],
40
+ "x-voyant-api-id": "@voyant-travel/auth#invitations.api.public",
41
+ "parameters": [
42
+ {
43
+ "name": "token",
44
+ "in": "path",
45
+ "required": true,
46
+ "schema": { "type": "string" }
47
+ }
48
+ ],
49
+ "requestBody": {
50
+ "required": true,
51
+ "content": {
52
+ "application/json": {
53
+ "schema": {
54
+ "type": "object",
55
+ "required": ["name", "password"],
56
+ "properties": {
57
+ "name": {
58
+ "type": "string",
59
+ "minLength": 1,
60
+ "maxLength": 200
61
+ },
62
+ "password": {
63
+ "type": "string",
64
+ "minLength": 8,
65
+ "maxLength": 128,
66
+ "writeOnly": true
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+ },
73
+ "responses": {
74
+ "200": {
75
+ "description": "The newly created user."
76
+ },
77
+ "409": {
78
+ "description": "A user already exists for the invitation email."
79
+ },
80
+ "410": {
81
+ "description": "The invitation is invalid, expired, or redeemed."
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyant-travel/auth",
3
- "version": "0.124.2",
3
+ "version": "0.125.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,6 +32,11 @@
32
32
  "import": "./dist/backend.js",
33
33
  "default": "./dist/backend.js"
34
34
  },
35
+ "./operator-node-runtime": {
36
+ "types": "./dist/operator-node-runtime.d.ts",
37
+ "import": "./dist/operator-node-runtime.js",
38
+ "default": "./dist/operator-node-runtime.js"
39
+ },
35
40
  "./cloud-broker": {
36
41
  "types": "./dist/cloud-broker.d.ts",
37
42
  "import": "./dist/cloud-broker.js",
@@ -51,27 +56,79 @@
51
56
  "types": "./dist/permissions.d.ts",
52
57
  "import": "./dist/permissions.js",
53
58
  "default": "./dist/permissions.js"
59
+ },
60
+ "./identity-access-runtime-port": {
61
+ "types": "./dist/identity-access-runtime-port.d.ts",
62
+ "import": "./dist/identity-access-runtime-port.js",
63
+ "default": "./dist/identity-access-runtime-port.js"
64
+ },
65
+ "./identity-access-graph-runtime": {
66
+ "types": "./dist/identity-access-graph-runtime.d.ts",
67
+ "import": "./dist/identity-access-graph-runtime.js",
68
+ "default": "./dist/identity-access-graph-runtime.js"
69
+ },
70
+ "./runtime-contributor": {
71
+ "types": "./dist/runtime-contributor.d.ts",
72
+ "import": "./dist/runtime-contributor.js",
73
+ "default": "./dist/runtime-contributor.js"
74
+ },
75
+ "./openapi/admin/invitations": "./openapi/admin/invitations.json",
76
+ "./openapi/admin/team": "./openapi/admin/team.json",
77
+ "./openapi/storefront/invitations": "./openapi/storefront/invitations.json",
78
+ "./voyant": {
79
+ "types": "./dist/voyant.d.ts",
80
+ "import": "./dist/voyant.js",
81
+ "default": "./dist/voyant.js"
54
82
  }
55
83
  },
56
84
  "publishConfig": {
57
85
  "access": "public"
58
86
  },
59
87
  "files": [
60
- "dist"
88
+ "dist",
89
+ "openapi"
61
90
  ],
62
91
  "dependencies": {
63
92
  "@better-auth/api-key": "1.6.23",
93
+ "@hono/zod-openapi": "^1.4.0",
64
94
  "better-auth": "1.6.23",
65
95
  "drizzle-orm": "^0.45.2",
66
- "@voyant-travel/db": "^0.112.0",
67
- "@voyant-travel/types": "^0.107.3",
68
- "@voyant-travel/utils": "^0.106.0"
96
+ "hono": "^4.12.27",
97
+ "zod": "^4.4.3",
98
+ "@voyant-travel/core": "^0.118.0",
99
+ "@voyant-travel/db": "^0.112.2",
100
+ "@voyant-travel/hono": "^0.125.0",
101
+ "@voyant-travel/types": "^0.108.0",
102
+ "@voyant-travel/utils": "^0.106.1"
69
103
  },
70
104
  "devDependencies": {
71
105
  "@types/node": "^25.5.2",
72
106
  "typescript": "^6.0.3",
73
107
  "@voyant-travel/voyant-typescript-config": "^0.1.0"
74
108
  },
109
+ "voyant": {
110
+ "schemaVersion": "voyant.package.v1",
111
+ "kind": "module",
112
+ "manifest": "./voyant",
113
+ "runtime": {
114
+ "entry": "./runtime-contributor",
115
+ "export": "createAuthRuntimePortContribution"
116
+ },
117
+ "compatibleWith": {
118
+ "framework": ">=0.26.0",
119
+ "targets": [
120
+ "node"
121
+ ],
122
+ "modes": [
123
+ "local",
124
+ "managed-cloud",
125
+ "self-hosted"
126
+ ]
127
+ },
128
+ "requiresSchemas": [
129
+ "@voyant-travel/db"
130
+ ]
131
+ },
75
132
  "scripts": {
76
133
  "build": "tsc -p tsconfig.build.json",
77
134
  "clean": "rm -rf dist tsconfig.tsbuildinfo",