@crvouga/mockingbird-service-workos 0.1.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.
package/dist/server.js ADDED
@@ -0,0 +1,12 @@
1
+ import {
2
+ DEFAULT_PORT,
3
+ createServer,
4
+ serveTarget
5
+ } from "./chunk-XPKENS6X.js";
6
+ import "./chunk-WBY3LJBQ.js";
7
+ export {
8
+ DEFAULT_PORT,
9
+ createServer,
10
+ serveTarget
11
+ };
12
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
package/openapi.yaml ADDED
@@ -0,0 +1,121 @@
1
+ openapi: 3.1.0
2
+ info: { title: WorkOS AuthKit mock, version: '1.0.0' }
3
+ servers:
4
+ - url: https://api.workos.com
5
+ paths:
6
+ /user_management/authorize:
7
+ get:
8
+ operationId: Authorize
9
+ x-mockingbird:
10
+ parity: { enabled: false, reason: Browser redirect requires registered client and callback, safe: false }
11
+ parameters:
12
+ - { name: client_id, in: query, required: true, schema: { type: string } }
13
+ - { name: redirect_uri, in: query, required: true, schema: { type: string } }
14
+ - { name: response_type, in: query, required: true, schema: { type: string, enum: [code] } }
15
+ - { name: provider, in: query, required: true, schema: { type: string } }
16
+ - { name: state, in: query, schema: { type: string } }
17
+ - { name: organization_id, in: query, schema: { type: string } }
18
+ - { name: code_challenge, in: query, schema: { type: string } }
19
+ - { name: code_challenge_method, in: query, schema: { type: string, enum: [S256] } }
20
+ responses:
21
+ '302': { description: Registered callback with code and state, headers: { Location: { schema: { type: string } } } }
22
+ '400': { $ref: '#/components/responses/Error' }
23
+ '403': { $ref: '#/components/responses/Error' }
24
+ /user_management/authenticate:
25
+ post:
26
+ operationId: Authenticate
27
+ x-mockingbird: { parity: { safe: false } }
28
+ requestBody:
29
+ required: true
30
+ content:
31
+ application/json:
32
+ schema:
33
+ type: object
34
+ required: [client_id, client_secret, grant_type]
35
+ properties:
36
+ client_id: { type: string, example: client_mock }
37
+ client_secret: { type: string, example: mock_workos_key }
38
+ grant_type: { type: string, enum: [authorization_code, refresh_token] }
39
+ code: { type: string }
40
+ code_verifier: { type: string }
41
+ refresh_token: { type: string }
42
+ organization_id: { type: string }
43
+ responses:
44
+ '200':
45
+ description: Authenticated session
46
+ content:
47
+ application/json:
48
+ schema:
49
+ type: object
50
+ required: [user, access_token, refresh_token]
51
+ properties:
52
+ user: { $ref: '#/components/schemas/User' }
53
+ access_token: { type: string, x-mockingbird-volatile: { kind: token } }
54
+ refresh_token: { type: string, x-mockingbird-volatile: { kind: token } }
55
+ organization_id: { type: string }
56
+ '400': { $ref: '#/components/responses/Error' }
57
+ '401': { $ref: '#/components/responses/Error' }
58
+ '403': { $ref: '#/components/responses/Error' }
59
+ /user_management/users:
60
+ get:
61
+ operationId: ListUsers
62
+ parameters:
63
+ - { name: limit, in: query, schema: { type: integer, minimum: 1, maximum: 100, default: 10 } }
64
+ - { name: after, in: query, schema: { type: string, example: user_mock } }
65
+ - { name: email, in: query, schema: { type: string, example: synthetic@example.test } }
66
+ responses:
67
+ '200':
68
+ description: User page
69
+ content:
70
+ application/json:
71
+ schema:
72
+ type: object
73
+ required: [object, data, list_metadata]
74
+ properties:
75
+ object: { type: string, enum: [list] }
76
+ data: { type: array, items: { $ref: '#/components/schemas/User' } }
77
+ list_metadata:
78
+ type: object
79
+ required: [before, after]
80
+ properties:
81
+ before: { type: [string, 'null'] }
82
+ after: { type: [string, 'null'] }
83
+ '400': { $ref: '#/components/responses/Error' }
84
+ '401': { $ref: '#/components/responses/Error' }
85
+ /sso/jwks/{clientId}:
86
+ get:
87
+ operationId: GetJwks
88
+ parameters:
89
+ - { name: clientId, in: path, required: true, schema: { type: string, example: client_mock } }
90
+ responses:
91
+ '200':
92
+ description: Public signing keys
93
+ content:
94
+ application/json:
95
+ schema:
96
+ type: object
97
+ required: [keys]
98
+ properties:
99
+ keys: { type: array, items: { type: object, x-mockingbird-volatile: { kind: opaque } } }
100
+ '404': { $ref: '#/components/responses/Error' }
101
+ components:
102
+ responses:
103
+ Error:
104
+ description: WorkOS error
105
+ content:
106
+ application/json:
107
+ schema: { type: object, properties: { error: { type: string }, error_description: { type: string }, message: { type: string } } }
108
+ schemas:
109
+ User:
110
+ type: object
111
+ required: [object, id, email, first_name, last_name, metadata, email_verified, created_at, updated_at]
112
+ properties:
113
+ object: { type: string, enum: [user] }
114
+ id: { type: string, x-mockingbird-resource: { type: user, identity: true } }
115
+ email: { type: string }
116
+ first_name: { type: [string, 'null'] }
117
+ last_name: { type: [string, 'null'] }
118
+ metadata: { type: object, additionalProperties: { type: string } }
119
+ email_verified: { type: boolean }
120
+ created_at: { type: string, x-mockingbird-volatile: { kind: timestamp } }
121
+ updated_at: { type: string, x-mockingbird-volatile: { kind: timestamp } }
package/package.json ADDED
@@ -0,0 +1,126 @@
1
+ {
2
+ "name": "@crvouga/mockingbird-service-workos",
3
+ "version": "0.1.0",
4
+ "description": "Stateful WorkOS AuthKit mock with signed sessions, rotating refresh tokens and user pagination.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "sideEffects": false,
8
+ "files": [
9
+ "dist",
10
+ "README.md",
11
+ "CHANGELOG.md",
12
+ "SUPPORT.md",
13
+ "openapi.yaml",
14
+ "DISCOVERY.md"
15
+ ],
16
+ "main": "./dist/index.js",
17
+ "types": "./dist/index.d.ts",
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "default": "./dist/index.js"
22
+ },
23
+ "./server": {
24
+ "types": "./dist/server.d.ts",
25
+ "default": "./dist/server.js"
26
+ }
27
+ },
28
+ "bin": {
29
+ "mockingbird-workos": "./dist/cli.js"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public",
33
+ "provenance": true
34
+ },
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/crvouga/mockingbird.git",
38
+ "directory": "packages/service/workos"
39
+ },
40
+ "homepage": "https://github.com/crvouga/mockingbird/tree/main/packages/service/workos#readme",
41
+ "keywords": [
42
+ "mockingbird",
43
+ "workos",
44
+ "authkit",
45
+ "mock"
46
+ ],
47
+ "mockingbird": {
48
+ "runtime": "portable",
49
+ "entries": {
50
+ "server": "node",
51
+ "cli": "node"
52
+ },
53
+ "layer": "service",
54
+ "category": "identity",
55
+ "displayName": "WorkOS",
56
+ "status": "wip",
57
+ "vendor": {
58
+ "website": "https://workos.com",
59
+ "docs": "https://workos.com/docs/reference/authkit/authentication"
60
+ },
61
+ "parity": "AuthKit codes, signed sessions, refresh and user pagination",
62
+ "parityTier": "cold",
63
+ "playground": {
64
+ "headers": {
65
+ "authorization": "Bearer mock_workos_key"
66
+ },
67
+ "operation": "ListUsers"
68
+ },
69
+ "discovery": {
70
+ "guide": "DISCOVERY.md",
71
+ "behavior": "README.md",
72
+ "capabilities": "SUPPORT.md",
73
+ "contract": "openapi.yaml",
74
+ "types": "dist/index.d.ts",
75
+ "oracle": {
76
+ "kind": "Live vendor API or sandbox",
77
+ "command": "bun run parity:service -- workos",
78
+ "note": "Run from a Mockingbird checkout; credentials come only from .env.local or GitHub Actions secrets. Missing credentials exit 2."
79
+ },
80
+ "introspection": [
81
+ "GET /__admin/health",
82
+ "GET /__admin",
83
+ "GET /__admin/state",
84
+ "GET /__admin/requests",
85
+ "GET /__admin/metrics",
86
+ "GET /__admin/faults/presets",
87
+ "GET /__admin/ui"
88
+ ],
89
+ "reporting": "https://github.com/crvouga/mockingbird/blob/main/docs/REPORTING_ISSUES.md"
90
+ }
91
+ },
92
+ "scripts": {
93
+ "generate": "bun ../../openapi/codegen/dist/cli.js",
94
+ "generate:check": "bun ../../openapi/codegen/dist/cli.js --check",
95
+ "openapi:check": "bun ../../openapi/codegen/dist/cli.js --validate",
96
+ "build": "bun ../../../scripts/bundle-service.ts",
97
+ "typecheck": "tsc -p tsconfig.json --noEmit",
98
+ "lint": "biome check .",
99
+ "test": "bun test",
100
+ "parity": "bun scripts/parity.ts",
101
+ "portability": "bun ../../../scripts/portability.ts",
102
+ "pack:check": "bun ../../../scripts/pack-check.ts"
103
+ },
104
+ "dependencies": {
105
+ "@crvouga/mockingbird-service-sqlite": "2.1.1",
106
+ "hono": "4.11.9"
107
+ },
108
+ "devDependencies": {
109
+ "@crvouga/mockingbird-adapter-node": "0.0.0-development",
110
+ "@crvouga/mockingbird-core": "0.0.0-development",
111
+ "@crvouga/mockingbird-credentials": "0.0.0-development",
112
+ "@crvouga/mockingbird-openapi": "0.0.0-development",
113
+ "@crvouga/mockingbird-openapi-codegen": "0.1.0",
114
+ "@crvouga/mockingbird-parity": "0.0.0-development",
115
+ "@crvouga/mockingbird-service": "0.0.0-development",
116
+ "@crvouga/mockingbird-sqlite": "0.0.0-development",
117
+ "@crvouga/mockingbird-testing": "0.1.0",
118
+ "@workos-inc/node": "9.3.1",
119
+ "@workos-inc/authkit-nextjs": "4.1.0",
120
+ "next": "15.5.9",
121
+ "react": "19.2.3",
122
+ "react-dom": "19.2.3",
123
+ "fast-check": "4.9.0",
124
+ "jose": "6.1.3"
125
+ }
126
+ }