@ankhorage/contracts 25.0.0 → 25.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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/auth.d.ts +989 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +278 -0
- package/dist/auth.js.map +1 -1
- package/dist/structure/generated.d.ts +2 -2
- package/dist/structure/generated.js +2 -2
- package/dist/structure/generated.js.map +1 -1
- package/package.json +4 -7
- package/src/auth-schemas.test.ts +76 -0
- package/src/auth.ts +303 -0
- package/src/contracts.test.ts +1 -2
- package/src/structure/generated.ts +2 -2
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,eAAO,MAAM,qBAAqB,yCAA0C,CAAC;AAC7E,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,eAAO,MAAM,mBAAmB,6FAMtB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AACxE,MAAM,MAAM,eAAe,GAAG,oB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
|
48
|
+
/**
|
|
49
|
+
* Portable schema sources for the provider-neutral auth/session values and operation payloads.
|
|
50
|
+
*
|
|
51
|
+
* They describe the existing serializable contracts only. Auth execution, capability catalogs,
|
|
52
|
+
* adapter ports, and provider-specific configuration remain outside Contracts.
|
|
53
|
+
*/
|
|
54
|
+
export const AUTH_IDENTIFIER_SCHEMA = {
|
|
55
|
+
type: 'object',
|
|
56
|
+
required: ['kind', 'value'],
|
|
57
|
+
properties: {
|
|
58
|
+
kind: { type: 'string', enum: AUTH_IDENTIFIER_KINDS },
|
|
59
|
+
value: { type: 'string' },
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
export const AUTH_USER_SCHEMA = {
|
|
63
|
+
type: 'object',
|
|
64
|
+
required: ['id'],
|
|
65
|
+
properties: {
|
|
66
|
+
id: { type: 'string' },
|
|
67
|
+
email: { type: 'string' },
|
|
68
|
+
phone: { type: 'string' },
|
|
69
|
+
username: { type: 'string' },
|
|
70
|
+
displayName: { type: 'string' },
|
|
71
|
+
avatarUrl: { type: 'string' },
|
|
72
|
+
metadata: { type: 'object', additionalProperties: {} },
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
export const AUTH_SESSION_SCHEMA = {
|
|
76
|
+
type: 'object',
|
|
77
|
+
required: ['accessToken', 'user'],
|
|
78
|
+
properties: {
|
|
79
|
+
accessToken: { type: 'string' },
|
|
80
|
+
refreshToken: { type: 'string' },
|
|
81
|
+
expiresAt: { type: 'number' },
|
|
82
|
+
tokenType: { type: 'string' },
|
|
83
|
+
user: AUTH_USER_SCHEMA,
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
export const AUTH_ADAPTER_ERROR_SCHEMA = {
|
|
87
|
+
type: 'object',
|
|
88
|
+
required: ['code', 'message'],
|
|
89
|
+
properties: {
|
|
90
|
+
code: { type: 'string' },
|
|
91
|
+
message: { type: 'string' },
|
|
92
|
+
cause: {},
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
export const SIGN_IN_INPUT_SCHEMA = {
|
|
96
|
+
type: 'object',
|
|
97
|
+
required: ['identifier'],
|
|
98
|
+
properties: {
|
|
99
|
+
identifier: AUTH_IDENTIFIER_SCHEMA,
|
|
100
|
+
password: { type: 'string' },
|
|
101
|
+
otp: { type: 'string' },
|
|
102
|
+
redirectTo: { type: 'string' },
|
|
103
|
+
metadata: { type: 'object', additionalProperties: {} },
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
export const SIGN_UP_INPUT_SCHEMA = {
|
|
107
|
+
type: 'object',
|
|
108
|
+
required: ['identifier'],
|
|
109
|
+
properties: {
|
|
110
|
+
identifier: AUTH_IDENTIFIER_SCHEMA,
|
|
111
|
+
password: { type: 'string' },
|
|
112
|
+
profile: { type: 'object', additionalProperties: {} },
|
|
113
|
+
redirectTo: { type: 'string' },
|
|
114
|
+
metadata: { type: 'object', additionalProperties: {} },
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
export const SIGN_OUT_INPUT_SCHEMA = {
|
|
118
|
+
type: 'object',
|
|
119
|
+
properties: { allDevices: { type: 'boolean' } },
|
|
120
|
+
};
|
|
121
|
+
export const PASSWORD_RESET_INPUT_SCHEMA = {
|
|
122
|
+
type: 'object',
|
|
123
|
+
required: ['identifier'],
|
|
124
|
+
properties: {
|
|
125
|
+
identifier: AUTH_IDENTIFIER_SCHEMA,
|
|
126
|
+
redirectTo: { type: 'string' },
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
export const VERIFY_OTP_INPUT_SCHEMA = {
|
|
130
|
+
type: 'object',
|
|
131
|
+
required: ['identifier', 'token'],
|
|
132
|
+
properties: {
|
|
133
|
+
identifier: AUTH_IDENTIFIER_SCHEMA,
|
|
134
|
+
token: { type: 'string' },
|
|
135
|
+
redirectTo: { type: 'string' },
|
|
136
|
+
metadata: { type: 'object', additionalProperties: {} },
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
export const AUTH_SUCCESS_SCHEMA = {
|
|
140
|
+
type: 'object',
|
|
141
|
+
required: ['ok'],
|
|
142
|
+
properties: { ok: { const: true } },
|
|
143
|
+
};
|
|
144
|
+
export const AUTH_ERROR_RESULT_SCHEMA = {
|
|
145
|
+
type: 'object',
|
|
146
|
+
required: ['ok', 'error'],
|
|
147
|
+
properties: {
|
|
148
|
+
ok: { const: false },
|
|
149
|
+
error: AUTH_ADAPTER_ERROR_SCHEMA,
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
export const SIGN_IN_RESULT_SCHEMA = {
|
|
153
|
+
oneOf: [
|
|
154
|
+
{
|
|
155
|
+
...AUTH_SUCCESS_SCHEMA,
|
|
156
|
+
properties: { ...AUTH_SUCCESS_SCHEMA.properties, data: AUTH_SESSION_SCHEMA },
|
|
157
|
+
},
|
|
158
|
+
AUTH_ERROR_RESULT_SCHEMA,
|
|
159
|
+
],
|
|
160
|
+
};
|
|
161
|
+
export const SIGN_UP_RESULT_SCHEMA = {
|
|
162
|
+
oneOf: [
|
|
163
|
+
{
|
|
164
|
+
...AUTH_SUCCESS_SCHEMA,
|
|
165
|
+
properties: {
|
|
166
|
+
...AUTH_SUCCESS_SCHEMA.properties,
|
|
167
|
+
data: { oneOf: [AUTH_SESSION_SCHEMA, AUTH_USER_SCHEMA] },
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
AUTH_ERROR_RESULT_SCHEMA,
|
|
171
|
+
],
|
|
172
|
+
};
|
|
173
|
+
export const AUTH_VOID_RESULT_SCHEMA = {
|
|
174
|
+
oneOf: [AUTH_SUCCESS_SCHEMA, AUTH_ERROR_RESULT_SCHEMA],
|
|
175
|
+
};
|
|
176
|
+
export const AUTH_SESSION_RESULT_SCHEMA = {
|
|
177
|
+
oneOf: [
|
|
178
|
+
{
|
|
179
|
+
...AUTH_SUCCESS_SCHEMA,
|
|
180
|
+
properties: { ...AUTH_SUCCESS_SCHEMA.properties, data: AUTH_SESSION_SCHEMA },
|
|
181
|
+
},
|
|
182
|
+
AUTH_ERROR_RESULT_SCHEMA,
|
|
183
|
+
],
|
|
184
|
+
};
|
|
185
|
+
export const AUTH_NULLABLE_SESSION_RESULT_SCHEMA = {
|
|
186
|
+
oneOf: [
|
|
187
|
+
{
|
|
188
|
+
...AUTH_SUCCESS_SCHEMA,
|
|
189
|
+
properties: {
|
|
190
|
+
...AUTH_SUCCESS_SCHEMA.properties,
|
|
191
|
+
data: { oneOf: [AUTH_SESSION_SCHEMA, { type: 'null' }] },
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
AUTH_ERROR_RESULT_SCHEMA,
|
|
195
|
+
],
|
|
196
|
+
};
|
|
48
197
|
export const AUTH_OAUTH_ERROR_STAGES = [
|
|
49
198
|
'start',
|
|
50
199
|
'transport',
|
|
@@ -82,4 +231,133 @@ export const AUTH_OAUTH_TRANSPORT_ERROR_CODES = [
|
|
|
82
231
|
'browser_unavailable',
|
|
83
232
|
'transport_failed',
|
|
84
233
|
];
|
|
234
|
+
export const AUTH_EMPTY_INPUT_SCHEMA = {
|
|
235
|
+
type: 'object',
|
|
236
|
+
};
|
|
237
|
+
export const START_OAUTH_AUTHORIZATION_INPUT_SCHEMA = {
|
|
238
|
+
type: 'object',
|
|
239
|
+
required: ['provider', 'redirectUri'],
|
|
240
|
+
properties: {
|
|
241
|
+
provider: { type: 'string' },
|
|
242
|
+
redirectUri: { type: 'string' },
|
|
243
|
+
scopes: { type: 'array', items: { type: 'string' } },
|
|
244
|
+
queryParams: { type: 'object', additionalProperties: { type: 'string' } },
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
export const AUTH_OAUTH_AUTHORIZATION_REQUEST_SCHEMA = {
|
|
248
|
+
type: 'object',
|
|
249
|
+
required: ['attemptId', 'provider', 'authorizationUrl', 'redirectUri'],
|
|
250
|
+
properties: {
|
|
251
|
+
attemptId: { type: 'string' },
|
|
252
|
+
provider: { type: 'string' },
|
|
253
|
+
authorizationUrl: { type: 'string' },
|
|
254
|
+
redirectUri: { type: 'string' },
|
|
255
|
+
},
|
|
256
|
+
};
|
|
257
|
+
export const AUTH_OAUTH_ERROR_SCHEMA = {
|
|
258
|
+
type: 'object',
|
|
259
|
+
required: ['code', 'message', 'stage', 'recoverable'],
|
|
260
|
+
properties: {
|
|
261
|
+
code: { type: 'string', enum: AUTH_OAUTH_ERROR_CODES },
|
|
262
|
+
message: { type: 'string' },
|
|
263
|
+
cause: {},
|
|
264
|
+
stage: { type: 'string', enum: AUTH_OAUTH_ERROR_STAGES },
|
|
265
|
+
provider: { type: 'string' },
|
|
266
|
+
recoverable: { type: 'boolean' },
|
|
267
|
+
},
|
|
268
|
+
};
|
|
269
|
+
export const AUTH_OAUTH_START_RESULT_SCHEMA = {
|
|
270
|
+
oneOf: [
|
|
271
|
+
{
|
|
272
|
+
type: 'object',
|
|
273
|
+
required: ['ok', 'data'],
|
|
274
|
+
properties: {
|
|
275
|
+
ok: { const: true },
|
|
276
|
+
data: AUTH_OAUTH_AUTHORIZATION_REQUEST_SCHEMA,
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
type: 'object',
|
|
281
|
+
required: ['ok', 'error'],
|
|
282
|
+
properties: {
|
|
283
|
+
ok: { const: false },
|
|
284
|
+
error: AUTH_OAUTH_ERROR_SCHEMA,
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
],
|
|
288
|
+
};
|
|
289
|
+
export const AUTH_OAUTH_AUTHORIZATION_RESPONSE_SCHEMA = {
|
|
290
|
+
oneOf: [
|
|
291
|
+
{
|
|
292
|
+
type: 'object',
|
|
293
|
+
required: ['type', 'url'],
|
|
294
|
+
properties: { type: { const: 'callback' }, url: { type: 'string' } },
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
type: 'object',
|
|
298
|
+
required: ['type', 'reason'],
|
|
299
|
+
properties: {
|
|
300
|
+
type: { const: 'cancelled' },
|
|
301
|
+
reason: { type: 'string', enum: AUTH_OAUTH_TRANSPORT_CANCELLATION_REASONS },
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
type: 'object',
|
|
306
|
+
required: ['type', 'error'],
|
|
307
|
+
properties: {
|
|
308
|
+
type: { const: 'error' },
|
|
309
|
+
error: {
|
|
310
|
+
type: 'object',
|
|
311
|
+
required: ['code', 'message'],
|
|
312
|
+
properties: {
|
|
313
|
+
code: { type: 'string', enum: AUTH_OAUTH_TRANSPORT_ERROR_CODES },
|
|
314
|
+
message: { type: 'string' },
|
|
315
|
+
cause: {},
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
],
|
|
321
|
+
};
|
|
322
|
+
export const COMPLETE_OAUTH_AUTHORIZATION_INPUT_SCHEMA = {
|
|
323
|
+
type: 'object',
|
|
324
|
+
required: ['attemptId', 'response'],
|
|
325
|
+
properties: {
|
|
326
|
+
attemptId: { type: 'string' },
|
|
327
|
+
response: AUTH_OAUTH_AUTHORIZATION_RESPONSE_SCHEMA,
|
|
328
|
+
},
|
|
329
|
+
};
|
|
330
|
+
export const AUTH_OAUTH_COMPLETION_RESULT_SCHEMA = {
|
|
331
|
+
oneOf: [
|
|
332
|
+
{
|
|
333
|
+
type: 'object',
|
|
334
|
+
required: ['ok', 'status', 'provider', 'session'],
|
|
335
|
+
properties: {
|
|
336
|
+
ok: { const: true },
|
|
337
|
+
status: { const: 'authenticated' },
|
|
338
|
+
provider: { type: 'string' },
|
|
339
|
+
session: AUTH_SESSION_SCHEMA,
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
type: 'object',
|
|
344
|
+
required: ['ok', 'status', 'provider', 'reason'],
|
|
345
|
+
properties: {
|
|
346
|
+
ok: { const: false },
|
|
347
|
+
status: { const: 'cancelled' },
|
|
348
|
+
provider: { type: 'string' },
|
|
349
|
+
reason: { type: 'string', enum: AUTH_OAUTH_CANCELLATION_REASONS },
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
type: 'object',
|
|
354
|
+
required: ['ok', 'status', 'error'],
|
|
355
|
+
properties: {
|
|
356
|
+
ok: { const: false },
|
|
357
|
+
status: { const: 'error' },
|
|
358
|
+
error: AUTH_OAUTH_ERROR_SCHEMA,
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
],
|
|
362
|
+
};
|
|
85
363
|
//# sourceMappingURL=auth.js.map
|
package/dist/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAU,CAAC;AAG7E,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,qBAAqB;IACxB,UAAU;IACV,aAAa;IACb,WAAW;IACX,UAAU;CACF,CAAC;AAIX,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,OAAO;IACP,OAAO;IACP,WAAW;IACX,SAAS;IACT,UAAU;IACV,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,UAAU;IACV,UAAU;IACV,QAAQ;IACR,OAAO;IACP,SAAS;IACT,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,MAAM;CACE,CAAC;AAIX,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,kBAAkB,CAAU,CAAC;AAItE,MAAM,CAAC,MAAM,wCAAwC,GAAG;IACtD,mBAAmB;IACnB,cAAc;CACN,CAAC;AAIX,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAGlF,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,UAAU,EAAE,KAAK,CAAU,CAAC;AAgE5E,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,SAAS;IACtB,YAAY,EAAE,UAAU;IACxB,mBAAmB,EAAE,iBAAiB;IACtC,eAAe,EAAE,GAAG;IACpB,iBAAiB,EAAE,SAAS;CACK,CAAC;AAEpC,MAAM,UAAU,eAAe,CAAC,IAAqB;IACnD,OAAO,EAAE,GAAG,CAAC,IAAI,IAAI,iBAAiB,CAAC,EAAE,CAAC;AAC5C,CAAC;AA2GD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,OAAO;IACP,WAAW;IACX,UAAU;IACV,UAAU;IACV,SAAS;IACT,SAAS;CACD,CAAC;AAGX,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,mBAAmB;IACnB,mBAAmB;IACnB,wBAAwB;IACxB,sBAAsB;IACtB,sBAAsB;IACtB,iCAAiC;IACjC,kBAAkB;IAClB,gBAAgB;IAChB,eAAe;IACf,4BAA4B;IAC5B,sBAAsB;IACtB,eAAe;IACf,4BAA4B;IAC5B,yBAAyB;IACzB,gBAAgB;CACR,CAAC;AAUX,MAAM,CAAC,MAAM,yCAAyC,GAAG;IACvD,gBAAgB;IAChB,mBAAmB;CACX,CAAC;AAIX,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,GAAG,yCAAyC;IAC5C,iBAAiB;CACT,CAAC;AAGX,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,qBAAqB;IACrB,kBAAkB;CACV,CAAC","sourcesContent":["import type { ValueMap } from './collections';\nimport type { AppDeployTargetId } from './deploy';\nimport type { AppEnvironmentId } from './environments';\nimport type { SecretRef } from './secrets';\nimport type { IconSpec } from './types';\n\nexport const AUTH_IDENTIFIER_KINDS = ['email', 'phone', 'username'] as const;\nexport type AuthIdentifierKind = (typeof AUTH_IDENTIFIER_KINDS)[number];\n\nexport const AUTH_SIGN_UP_FIELDS = [\n ...AUTH_IDENTIFIER_KINDS,\n 'password',\n 'displayName',\n 'firstName',\n 'lastName',\n] as const;\nexport type KnownAuthSignUpField = (typeof AUTH_SIGN_UP_FIELDS)[number];\nexport type AuthSignUpField = KnownAuthSignUpField | (string & {});\n\nexport const AUTH_OAUTH_PROVIDER_IDS = [\n 'apple',\n 'azure',\n 'bitbucket',\n 'discord',\n 'facebook',\n 'figma',\n 'github',\n 'gitlab',\n 'google',\n 'kakao',\n 'keycloak',\n 'linkedin',\n 'notion',\n 'slack',\n 'spotify',\n 'twitch',\n 'twitter',\n 'workos',\n 'zoom',\n] as const;\nexport type KnownAuthOAuthProviderId = (typeof AUTH_OAUTH_PROVIDER_IDS)[number];\nexport type AuthOAuthProviderId = KnownAuthOAuthProviderId | (string & {});\n\nexport const AUTH_OAUTH_TRANSPORT_IDS = ['brokeredRedirect'] as const;\nexport type KnownAuthOAuthTransportId = (typeof AUTH_OAUTH_TRANSPORT_IDS)[number];\nexport type AuthOAuthTransportId = KnownAuthOAuthTransportId | (string & {});\n\nexport const AUTH_OAUTH_SETUP_FIELD_PERSISTENCE_KINDS = [\n 'trustedCredential',\n 'publicConfig',\n] as const;\nexport type AuthOAuthSetupFieldPersistence =\n (typeof AUTH_OAUTH_SETUP_FIELD_PERSISTENCE_KINDS)[number];\n\nexport const AUTH_OAUTH_SETUP_FIELD_SENSITIVITIES = ['public', 'secret'] as const;\nexport type AuthOAuthSetupFieldSensitivity = (typeof AUTH_OAUTH_SETUP_FIELD_SENSITIVITIES)[number];\n\nexport const AUTH_OAUTH_SETUP_CALLBACK_ROLES = ['provider', 'app'] as const;\nexport type AuthOAuthSetupCallbackRole = (typeof AUTH_OAUTH_SETUP_CALLBACK_ROLES)[number];\n\nexport interface AuthOAuthSetupFieldRequirement {\n readonly kind: 'field';\n /** Adapter-owned stable key. The contract does not prescribe provider-specific field names. */\n readonly key: string;\n readonly label: string;\n readonly required: boolean;\n readonly sensitivity: AuthOAuthSetupFieldSensitivity;\n readonly persistence: AuthOAuthSetupFieldPersistence;\n /** Present only when a field belongs to one application target rather than the backend setup. */\n readonly target?: AppDeployTargetId;\n readonly description?: string;\n}\n\nexport interface AuthOAuthSetupCallbackRequirement {\n readonly kind: 'callback';\n readonly role: AuthOAuthSetupCallbackRole;\n readonly label: string;\n readonly required: boolean;\n /** App callbacks may be target-specific; provider/backend callbacks normally omit this. */\n readonly target?: AppDeployTargetId;\n readonly description?: string;\n}\n\nexport type AuthOAuthSetupRequirement =\n AuthOAuthSetupFieldRequirement | AuthOAuthSetupCallbackRequirement;\n\n/**\n * Adapter-neutral description of the OAuth setup Studio or Doctor should surface for one\n * provider/transport/environment combination. It contains requirements only, never credential\n * values, tokens, callback authorization data, or other secret material.\n */\nexport interface AuthOAuthSetupPlan {\n readonly provider: AuthOAuthProviderId;\n readonly transport: AuthOAuthTransportId;\n readonly environment: AppEnvironmentId;\n /** Enabled application targets considered while deriving this plan. */\n readonly targets: readonly AppDeployTargetId[];\n readonly requirements: readonly AuthOAuthSetupRequirement[];\n}\n\n/** Backend-owned setup capabilities used by administration planning, separate from runtime OAuth. */\nexport interface AuthOAuthSetupCapabilities {\n readonly providers: readonly AuthOAuthProviderId[];\n readonly transports: readonly AuthOAuthTransportId[];\n}\n\nexport interface AuthIdentifier {\n kind: AuthIdentifierKind;\n value: string;\n}\n\nexport interface AuthFlowConfig {\n signInRoute: string;\n signUpRoute?: string;\n signOutRoute?: string;\n forgotPasswordRoute?: string;\n otpRoute?: string;\n postSignInRoute: string;\n unauthorizedRoute?: string;\n}\n\nexport const DEFAULT_AUTH_FLOW = {\n signInRoute: 'sign-in',\n signUpRoute: 'sign-up',\n signOutRoute: 'sign-out',\n forgotPasswordRoute: 'forgot-password',\n postSignInRoute: '/',\n unauthorizedRoute: 'sign-in',\n} as const satisfies AuthFlowConfig;\n\nexport function resolveAuthFlow(flow?: AuthFlowConfig): AuthFlowConfig {\n return { ...(flow ?? DEFAULT_AUTH_FLOW) };\n}\n\nexport interface AuthSignInConfig {\n identifiers: AuthIdentifierKind[];\n}\n\nexport interface AuthSignUpConfig {\n requiredFields: AuthSignUpField[];\n optionalFields?: AuthSignUpField[];\n}\n\nexport interface AuthOAuthProviderConfig {\n id: AuthOAuthProviderId;\n label?: string;\n enabled?: boolean;\n scopes?: string[];\n queryParams?: Record<string, string>;\n icon?: IconSpec;\n /** Logical server-side secret reference; raw credentials must never be stored here. */\n credentialsRef?: SecretRef;\n}\n\nexport interface AuthOAuthConfig {\n enabled: boolean;\n callbackRoute: string;\n providers: AuthOAuthProviderConfig[];\n}\n\nexport interface AuthProviderConfig {\n provider: string;\n signIn: AuthSignInConfig;\n signUp?: AuthSignUpConfig;\n oauth?: AuthOAuthConfig;\n passwordReset?: {\n enabled: boolean;\n };\n otp?: {\n enabled: boolean;\n };\n}\n\nexport interface AuthUser {\n id: string;\n email?: string;\n phone?: string;\n username?: string;\n displayName?: string;\n avatarUrl?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface AuthSession {\n accessToken: string;\n refreshToken?: string;\n expiresAt?: number;\n tokenType?: string;\n user: AuthUser;\n}\n\nexport interface AuthAdapterError {\n code: string;\n message: string;\n cause?: unknown;\n}\n\nexport type AuthResult<TData = void> =\n | {\n ok: true;\n data?: TData;\n }\n | {\n ok: false;\n error: AuthAdapterError;\n };\n\nexport interface SignInInput {\n identifier: AuthIdentifier;\n password?: string;\n otp?: string;\n redirectTo?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface SignUpInput {\n identifier: AuthIdentifier;\n password?: string;\n profile?: Record<string, unknown>;\n redirectTo?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface SignOutInput {\n allDevices?: boolean;\n}\n\nexport interface PasswordResetInput {\n identifier: AuthIdentifier;\n redirectTo?: string;\n}\n\nexport interface VerifyOtpInput {\n identifier: AuthIdentifier;\n token: string;\n redirectTo?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport const AUTH_OAUTH_ERROR_STAGES = [\n 'start',\n 'transport',\n 'callback',\n 'exchange',\n 'session',\n 'profile',\n] as const;\nexport type AuthOAuthErrorStage = (typeof AUTH_OAUTH_ERROR_STAGES)[number];\n\nexport const AUTH_OAUTH_ERROR_CODES = [\n 'oauth_unavailable',\n 'provider_disabled',\n 'provider_misconfigured',\n 'invalid_redirect_uri',\n 'authorization_failed',\n 'authorization_attempt_not_found',\n 'invalid_callback',\n 'state_mismatch',\n 'pkce_mismatch',\n 'callback_already_completed',\n 'code_exchange_failed',\n 'network_error',\n 'session_persistence_failed',\n 'profile_creation_failed',\n 'provider_error',\n] as const;\nexport type AuthOAuthErrorCode = (typeof AUTH_OAUTH_ERROR_CODES)[number];\n\nexport interface AuthOAuthError extends AuthAdapterError {\n code: AuthOAuthErrorCode;\n stage: AuthOAuthErrorStage;\n provider?: AuthOAuthProviderId;\n recoverable: boolean;\n}\n\nexport const AUTH_OAUTH_TRANSPORT_CANCELLATION_REASONS = [\n 'user_cancelled',\n 'browser_dismissed',\n] as const;\nexport type AuthOAuthTransportCancellationReason =\n (typeof AUTH_OAUTH_TRANSPORT_CANCELLATION_REASONS)[number];\n\nexport const AUTH_OAUTH_CANCELLATION_REASONS = [\n ...AUTH_OAUTH_TRANSPORT_CANCELLATION_REASONS,\n 'provider_denied',\n] as const;\nexport type AuthOAuthCancellationReason = (typeof AUTH_OAUTH_CANCELLATION_REASONS)[number];\n\nexport const AUTH_OAUTH_TRANSPORT_ERROR_CODES = [\n 'browser_unavailable',\n 'transport_failed',\n] as const;\nexport type AuthOAuthTransportErrorCode = (typeof AUTH_OAUTH_TRANSPORT_ERROR_CODES)[number];\n\nexport interface AuthOAuthTransportError {\n code: AuthOAuthTransportErrorCode;\n message: string;\n cause?: unknown;\n}\n\nexport interface StartOAuthAuthorizationInput {\n provider: AuthOAuthProviderId;\n redirectUri: string;\n scopes?: readonly string[];\n queryParams?: ValueMap<string, string>;\n}\n\nexport interface AuthOAuthAuthorizationRequest {\n attemptId: string;\n provider: AuthOAuthProviderId;\n authorizationUrl: string;\n redirectUri: string;\n}\n\nexport type AuthOAuthStartResult =\n | {\n ok: true;\n data: AuthOAuthAuthorizationRequest;\n }\n | {\n ok: false;\n error: AuthOAuthError;\n };\n\nexport type AuthOAuthAuthorizationResponse =\n | {\n type: 'callback';\n url: string;\n }\n | {\n type: 'cancelled';\n reason: AuthOAuthTransportCancellationReason;\n }\n | {\n type: 'error';\n error: AuthOAuthTransportError;\n };\n\nexport interface CompleteOAuthAuthorizationInput {\n attemptId: string;\n response: AuthOAuthAuthorizationResponse;\n}\n\nexport type AuthOAuthCompletionResult =\n | {\n ok: true;\n status: 'authenticated';\n provider: AuthOAuthProviderId;\n session: AuthSession;\n }\n | {\n ok: false;\n status: 'cancelled';\n provider: AuthOAuthProviderId;\n reason: AuthOAuthCancellationReason;\n }\n | {\n ok: false;\n status: 'error';\n error: AuthOAuthError;\n };\n\nexport interface AuthOAuthCapabilities {\n /** Enabled providers for which start and callback completion are operational. */\n providers: readonly [AuthOAuthProviderId, ...AuthOAuthProviderId[]];\n}\n\nexport interface AuthOAuthAdapter {\n readonly capabilities: AuthOAuthCapabilities;\n\n startAuthorization(input: StartOAuthAuthorizationInput): Promise<AuthOAuthStartResult>;\n completeAuthorization(input: CompleteOAuthAuthorizationInput): Promise<AuthOAuthCompletionResult>;\n}\n\nexport interface AuthAdapterCapabilities {\n signInIdentifiers: AuthIdentifierKind[];\n supportsSignUp: boolean;\n supportsPasswordReset: boolean;\n supportsOtp: boolean;\n supportsSessionRefresh: boolean;\n}\n\nexport interface AuthAdapter {\n readonly capabilities?: AuthAdapterCapabilities;\n /**\n * Presence is the canonical OAuth capability signal. When present, both authorization start and\n * callback completion are mandatory and operational for every advertised provider.\n */\n readonly oauth?: AuthOAuthAdapter;\n\n signIn(input: SignInInput): Promise<AuthResult<AuthSession>>;\n signUp(input: SignUpInput): Promise<AuthResult<AuthSession | AuthUser>>;\n signOut(input?: SignOutInput): Promise<AuthResult>;\n\n getSession(): Promise<AuthResult<AuthSession | null>>;\n refreshSession?(): Promise<AuthResult<AuthSession | null>>;\n\n requestPasswordReset?(input: PasswordResetInput): Promise<AuthResult>;\n verifyOtp?(input: VerifyOtpInput): Promise<AuthResult<AuthSession>>;\n}\n"]}
|
|
1
|
+
{"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AAE;gBAC5B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,+BAA+B,EAAE;aAClE;SACF;QACD;YACE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC;YACnC,UAAU,EAAE;gBACV,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE;gBACpB,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;gBAC1B,KAAK,EAAE,uBAAuB;aAC/B;SACF;KACF;CAC4B,CAAC","sourcesContent":["import type { ValueMap } from './collections';\nimport type { DataSchema } from './data/schemas';\nimport type { AppDeployTargetId } from './deploy';\nimport type { AppEnvironmentId } from './environments';\nimport type { SecretRef } from './secrets';\nimport type { IconSpec } from './types';\n\nexport const AUTH_IDENTIFIER_KINDS = ['email', 'phone', 'username'] as const;\nexport type AuthIdentifierKind = (typeof AUTH_IDENTIFIER_KINDS)[number];\n\nexport const AUTH_SIGN_UP_FIELDS = [\n ...AUTH_IDENTIFIER_KINDS,\n 'password',\n 'displayName',\n 'firstName',\n 'lastName',\n] as const;\nexport type KnownAuthSignUpField = (typeof AUTH_SIGN_UP_FIELDS)[number];\nexport type AuthSignUpField = KnownAuthSignUpField | (string & {});\n\nexport const AUTH_OAUTH_PROVIDER_IDS = [\n 'apple',\n 'azure',\n 'bitbucket',\n 'discord',\n 'facebook',\n 'figma',\n 'github',\n 'gitlab',\n 'google',\n 'kakao',\n 'keycloak',\n 'linkedin',\n 'notion',\n 'slack',\n 'spotify',\n 'twitch',\n 'twitter',\n 'workos',\n 'zoom',\n] as const;\nexport type KnownAuthOAuthProviderId = (typeof AUTH_OAUTH_PROVIDER_IDS)[number];\nexport type AuthOAuthProviderId = KnownAuthOAuthProviderId | (string & {});\n\nexport const AUTH_OAUTH_TRANSPORT_IDS = ['brokeredRedirect'] as const;\nexport type KnownAuthOAuthTransportId = (typeof AUTH_OAUTH_TRANSPORT_IDS)[number];\nexport type AuthOAuthTransportId = KnownAuthOAuthTransportId | (string & {});\n\nexport const AUTH_OAUTH_SETUP_FIELD_PERSISTENCE_KINDS = [\n 'trustedCredential',\n 'publicConfig',\n] as const;\nexport type AuthOAuthSetupFieldPersistence =\n (typeof AUTH_OAUTH_SETUP_FIELD_PERSISTENCE_KINDS)[number];\n\nexport const AUTH_OAUTH_SETUP_FIELD_SENSITIVITIES = ['public', 'secret'] as const;\nexport type AuthOAuthSetupFieldSensitivity = (typeof AUTH_OAUTH_SETUP_FIELD_SENSITIVITIES)[number];\n\nexport const AUTH_OAUTH_SETUP_CALLBACK_ROLES = ['provider', 'app'] as const;\nexport type AuthOAuthSetupCallbackRole = (typeof AUTH_OAUTH_SETUP_CALLBACK_ROLES)[number];\n\nexport interface AuthOAuthSetupFieldRequirement {\n readonly kind: 'field';\n /** Adapter-owned stable key. The contract does not prescribe provider-specific field names. */\n readonly key: string;\n readonly label: string;\n readonly required: boolean;\n readonly sensitivity: AuthOAuthSetupFieldSensitivity;\n readonly persistence: AuthOAuthSetupFieldPersistence;\n /** Present only when a field belongs to one application target rather than the backend setup. */\n readonly target?: AppDeployTargetId;\n readonly description?: string;\n}\n\nexport interface AuthOAuthSetupCallbackRequirement {\n readonly kind: 'callback';\n readonly role: AuthOAuthSetupCallbackRole;\n readonly label: string;\n readonly required: boolean;\n /** App callbacks may be target-specific; provider/backend callbacks normally omit this. */\n readonly target?: AppDeployTargetId;\n readonly description?: string;\n}\n\nexport type AuthOAuthSetupRequirement =\n AuthOAuthSetupFieldRequirement | AuthOAuthSetupCallbackRequirement;\n\n/**\n * Adapter-neutral description of the OAuth setup Studio or Doctor should surface for one\n * provider/transport/environment combination. It contains requirements only, never credential\n * values, tokens, callback authorization data, or other secret material.\n */\nexport interface AuthOAuthSetupPlan {\n readonly provider: AuthOAuthProviderId;\n readonly transport: AuthOAuthTransportId;\n readonly environment: AppEnvironmentId;\n /** Enabled application targets considered while deriving this plan. */\n readonly targets: readonly AppDeployTargetId[];\n readonly requirements: readonly AuthOAuthSetupRequirement[];\n}\n\n/** Backend-owned setup capabilities used by administration planning, separate from runtime OAuth. */\nexport interface AuthOAuthSetupCapabilities {\n readonly providers: readonly AuthOAuthProviderId[];\n readonly transports: readonly AuthOAuthTransportId[];\n}\n\nexport interface AuthIdentifier {\n kind: AuthIdentifierKind;\n value: string;\n}\n\nexport interface AuthFlowConfig {\n signInRoute: string;\n signUpRoute?: string;\n signOutRoute?: string;\n forgotPasswordRoute?: string;\n otpRoute?: string;\n postSignInRoute: string;\n unauthorizedRoute?: string;\n}\n\nexport const DEFAULT_AUTH_FLOW = {\n signInRoute: 'sign-in',\n signUpRoute: 'sign-up',\n signOutRoute: 'sign-out',\n forgotPasswordRoute: 'forgot-password',\n postSignInRoute: '/',\n unauthorizedRoute: 'sign-in',\n} as const satisfies AuthFlowConfig;\n\nexport function resolveAuthFlow(flow?: AuthFlowConfig): AuthFlowConfig {\n return { ...(flow ?? DEFAULT_AUTH_FLOW) };\n}\n\nexport interface AuthSignInConfig {\n identifiers: AuthIdentifierKind[];\n}\n\nexport interface AuthSignUpConfig {\n requiredFields: AuthSignUpField[];\n optionalFields?: AuthSignUpField[];\n}\n\nexport interface AuthOAuthProviderConfig {\n id: AuthOAuthProviderId;\n label?: string;\n enabled?: boolean;\n scopes?: string[];\n queryParams?: Record<string, string>;\n icon?: IconSpec;\n /** Logical server-side secret reference; raw credentials must never be stored here. */\n credentialsRef?: SecretRef;\n}\n\nexport interface AuthOAuthConfig {\n enabled: boolean;\n callbackRoute: string;\n providers: AuthOAuthProviderConfig[];\n}\n\nexport interface AuthProviderConfig {\n provider: string;\n signIn: AuthSignInConfig;\n signUp?: AuthSignUpConfig;\n oauth?: AuthOAuthConfig;\n passwordReset?: {\n enabled: boolean;\n };\n otp?: {\n enabled: boolean;\n };\n}\n\nexport interface AuthUser {\n id: string;\n email?: string;\n phone?: string;\n username?: string;\n displayName?: string;\n avatarUrl?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface AuthSession {\n accessToken: string;\n refreshToken?: string;\n expiresAt?: number;\n tokenType?: string;\n user: AuthUser;\n}\n\nexport interface AuthAdapterError {\n code: string;\n message: string;\n cause?: unknown;\n}\n\nexport type AuthResult<TData = void> =\n | {\n ok: true;\n data?: TData;\n }\n | {\n ok: false;\n error: AuthAdapterError;\n };\n\nexport interface SignInInput {\n identifier: AuthIdentifier;\n password?: string;\n otp?: string;\n redirectTo?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface SignUpInput {\n identifier: AuthIdentifier;\n password?: string;\n profile?: Record<string, unknown>;\n redirectTo?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface SignOutInput {\n allDevices?: boolean;\n}\n\nexport interface PasswordResetInput {\n identifier: AuthIdentifier;\n redirectTo?: string;\n}\n\nexport interface VerifyOtpInput {\n identifier: AuthIdentifier;\n token: string;\n redirectTo?: string;\n metadata?: Record<string, unknown>;\n}\n\n/**\n * Portable schema sources for the provider-neutral auth/session values and operation payloads.\n *\n * They describe the existing serializable contracts only. Auth execution, capability catalogs,\n * adapter ports, and provider-specific configuration remain outside Contracts.\n */\nexport const AUTH_IDENTIFIER_SCHEMA = {\n type: 'object',\n required: ['kind', 'value'],\n properties: {\n kind: { type: 'string', enum: AUTH_IDENTIFIER_KINDS },\n value: { type: 'string' },\n },\n} as const satisfies DataSchema;\n\nexport const AUTH_USER_SCHEMA = {\n type: 'object',\n required: ['id'],\n properties: {\n id: { type: 'string' },\n email: { type: 'string' },\n phone: { type: 'string' },\n username: { type: 'string' },\n displayName: { type: 'string' },\n avatarUrl: { type: 'string' },\n metadata: { type: 'object', additionalProperties: {} },\n },\n} as const satisfies DataSchema;\n\nexport const AUTH_SESSION_SCHEMA = {\n type: 'object',\n required: ['accessToken', 'user'],\n properties: {\n accessToken: { type: 'string' },\n refreshToken: { type: 'string' },\n expiresAt: { type: 'number' },\n tokenType: { type: 'string' },\n user: AUTH_USER_SCHEMA,\n },\n} as const satisfies DataSchema;\n\nexport const AUTH_ADAPTER_ERROR_SCHEMA = {\n type: 'object',\n required: ['code', 'message'],\n properties: {\n code: { type: 'string' },\n message: { type: 'string' },\n cause: {},\n },\n} as const satisfies DataSchema;\n\nexport const SIGN_IN_INPUT_SCHEMA = {\n type: 'object',\n required: ['identifier'],\n properties: {\n identifier: AUTH_IDENTIFIER_SCHEMA,\n password: { type: 'string' },\n otp: { type: 'string' },\n redirectTo: { type: 'string' },\n metadata: { type: 'object', additionalProperties: {} },\n },\n} as const satisfies DataSchema;\n\nexport const SIGN_UP_INPUT_SCHEMA = {\n type: 'object',\n required: ['identifier'],\n properties: {\n identifier: AUTH_IDENTIFIER_SCHEMA,\n password: { type: 'string' },\n profile: { type: 'object', additionalProperties: {} },\n redirectTo: { type: 'string' },\n metadata: { type: 'object', additionalProperties: {} },\n },\n} as const satisfies DataSchema;\n\nexport const SIGN_OUT_INPUT_SCHEMA = {\n type: 'object',\n properties: { allDevices: { type: 'boolean' } },\n} as const satisfies DataSchema;\n\nexport const PASSWORD_RESET_INPUT_SCHEMA = {\n type: 'object',\n required: ['identifier'],\n properties: {\n identifier: AUTH_IDENTIFIER_SCHEMA,\n redirectTo: { type: 'string' },\n },\n} as const satisfies DataSchema;\n\nexport const VERIFY_OTP_INPUT_SCHEMA = {\n type: 'object',\n required: ['identifier', 'token'],\n properties: {\n identifier: AUTH_IDENTIFIER_SCHEMA,\n token: { type: 'string' },\n redirectTo: { type: 'string' },\n metadata: { type: 'object', additionalProperties: {} },\n },\n} as const satisfies DataSchema;\n\nexport const AUTH_SUCCESS_SCHEMA = {\n type: 'object',\n required: ['ok'],\n properties: { ok: { const: true } },\n} as const satisfies DataSchema;\n\nexport const AUTH_ERROR_RESULT_SCHEMA = {\n type: 'object',\n required: ['ok', 'error'],\n properties: {\n ok: { const: false },\n error: AUTH_ADAPTER_ERROR_SCHEMA,\n },\n} as const satisfies DataSchema;\n\nexport const SIGN_IN_RESULT_SCHEMA = {\n oneOf: [\n {\n ...AUTH_SUCCESS_SCHEMA,\n properties: { ...AUTH_SUCCESS_SCHEMA.properties, data: AUTH_SESSION_SCHEMA },\n },\n AUTH_ERROR_RESULT_SCHEMA,\n ],\n} as const satisfies DataSchema;\n\nexport const SIGN_UP_RESULT_SCHEMA = {\n oneOf: [\n {\n ...AUTH_SUCCESS_SCHEMA,\n properties: {\n ...AUTH_SUCCESS_SCHEMA.properties,\n data: { oneOf: [AUTH_SESSION_SCHEMA, AUTH_USER_SCHEMA] },\n },\n },\n AUTH_ERROR_RESULT_SCHEMA,\n ],\n} as const satisfies DataSchema;\n\nexport const AUTH_VOID_RESULT_SCHEMA = {\n oneOf: [AUTH_SUCCESS_SCHEMA, AUTH_ERROR_RESULT_SCHEMA],\n} as const satisfies DataSchema;\n\nexport const AUTH_SESSION_RESULT_SCHEMA = {\n oneOf: [\n {\n ...AUTH_SUCCESS_SCHEMA,\n properties: { ...AUTH_SUCCESS_SCHEMA.properties, data: AUTH_SESSION_SCHEMA },\n },\n AUTH_ERROR_RESULT_SCHEMA,\n ],\n} as const satisfies DataSchema;\n\nexport const AUTH_NULLABLE_SESSION_RESULT_SCHEMA = {\n oneOf: [\n {\n ...AUTH_SUCCESS_SCHEMA,\n properties: {\n ...AUTH_SUCCESS_SCHEMA.properties,\n data: { oneOf: [AUTH_SESSION_SCHEMA, { type: 'null' }] },\n },\n },\n AUTH_ERROR_RESULT_SCHEMA,\n ],\n} as const satisfies DataSchema;\n\nexport const AUTH_OAUTH_ERROR_STAGES = [\n 'start',\n 'transport',\n 'callback',\n 'exchange',\n 'session',\n 'profile',\n] as const;\nexport type AuthOAuthErrorStage = (typeof AUTH_OAUTH_ERROR_STAGES)[number];\n\nexport const AUTH_OAUTH_ERROR_CODES = [\n 'oauth_unavailable',\n 'provider_disabled',\n 'provider_misconfigured',\n 'invalid_redirect_uri',\n 'authorization_failed',\n 'authorization_attempt_not_found',\n 'invalid_callback',\n 'state_mismatch',\n 'pkce_mismatch',\n 'callback_already_completed',\n 'code_exchange_failed',\n 'network_error',\n 'session_persistence_failed',\n 'profile_creation_failed',\n 'provider_error',\n] as const;\nexport type AuthOAuthErrorCode = (typeof AUTH_OAUTH_ERROR_CODES)[number];\n\nexport interface AuthOAuthError extends AuthAdapterError {\n code: AuthOAuthErrorCode;\n stage: AuthOAuthErrorStage;\n provider?: AuthOAuthProviderId;\n recoverable: boolean;\n}\n\nexport const AUTH_OAUTH_TRANSPORT_CANCELLATION_REASONS = [\n 'user_cancelled',\n 'browser_dismissed',\n] as const;\nexport type AuthOAuthTransportCancellationReason =\n (typeof AUTH_OAUTH_TRANSPORT_CANCELLATION_REASONS)[number];\n\nexport const AUTH_OAUTH_CANCELLATION_REASONS = [\n ...AUTH_OAUTH_TRANSPORT_CANCELLATION_REASONS,\n 'provider_denied',\n] as const;\nexport type AuthOAuthCancellationReason = (typeof AUTH_OAUTH_CANCELLATION_REASONS)[number];\n\nexport const AUTH_OAUTH_TRANSPORT_ERROR_CODES = [\n 'browser_unavailable',\n 'transport_failed',\n] as const;\nexport type AuthOAuthTransportErrorCode = (typeof AUTH_OAUTH_TRANSPORT_ERROR_CODES)[number];\n\nexport interface AuthOAuthTransportError {\n code: AuthOAuthTransportErrorCode;\n message: string;\n cause?: unknown;\n}\n\nexport interface StartOAuthAuthorizationInput {\n provider: AuthOAuthProviderId;\n redirectUri: string;\n scopes?: readonly string[];\n queryParams?: ValueMap<string, string>;\n}\n\nexport interface AuthOAuthAuthorizationRequest {\n attemptId: string;\n provider: AuthOAuthProviderId;\n authorizationUrl: string;\n redirectUri: string;\n}\n\nexport type AuthOAuthStartResult =\n | {\n ok: true;\n data: AuthOAuthAuthorizationRequest;\n }\n | {\n ok: false;\n error: AuthOAuthError;\n };\n\nexport type AuthOAuthAuthorizationResponse =\n | {\n type: 'callback';\n url: string;\n }\n | {\n type: 'cancelled';\n reason: AuthOAuthTransportCancellationReason;\n }\n | {\n type: 'error';\n error: AuthOAuthTransportError;\n };\n\nexport interface CompleteOAuthAuthorizationInput {\n attemptId: string;\n response: AuthOAuthAuthorizationResponse;\n}\n\nexport const AUTH_EMPTY_INPUT_SCHEMA = {\n type: 'object',\n} as const satisfies DataSchema;\n\nexport const START_OAUTH_AUTHORIZATION_INPUT_SCHEMA = {\n type: 'object',\n required: ['provider', 'redirectUri'],\n properties: {\n provider: { type: 'string' },\n redirectUri: { type: 'string' },\n scopes: { type: 'array', items: { type: 'string' } },\n queryParams: { type: 'object', additionalProperties: { type: 'string' } },\n },\n} as const satisfies DataSchema;\n\nexport const AUTH_OAUTH_AUTHORIZATION_REQUEST_SCHEMA = {\n type: 'object',\n required: ['attemptId', 'provider', 'authorizationUrl', 'redirectUri'],\n properties: {\n attemptId: { type: 'string' },\n provider: { type: 'string' },\n authorizationUrl: { type: 'string' },\n redirectUri: { type: 'string' },\n },\n} as const satisfies DataSchema;\n\nexport const AUTH_OAUTH_ERROR_SCHEMA = {\n type: 'object',\n required: ['code', 'message', 'stage', 'recoverable'],\n properties: {\n code: { type: 'string', enum: AUTH_OAUTH_ERROR_CODES },\n message: { type: 'string' },\n cause: {},\n stage: { type: 'string', enum: AUTH_OAUTH_ERROR_STAGES },\n provider: { type: 'string' },\n recoverable: { type: 'boolean' },\n },\n} as const satisfies DataSchema;\n\nexport const AUTH_OAUTH_START_RESULT_SCHEMA = {\n oneOf: [\n {\n type: 'object',\n required: ['ok', 'data'],\n properties: {\n ok: { const: true },\n data: AUTH_OAUTH_AUTHORIZATION_REQUEST_SCHEMA,\n },\n },\n {\n type: 'object',\n required: ['ok', 'error'],\n properties: {\n ok: { const: false },\n error: AUTH_OAUTH_ERROR_SCHEMA,\n },\n },\n ],\n} as const satisfies DataSchema;\n\nexport const AUTH_OAUTH_AUTHORIZATION_RESPONSE_SCHEMA = {\n oneOf: [\n {\n type: 'object',\n required: ['type', 'url'],\n properties: { type: { const: 'callback' }, url: { type: 'string' } },\n },\n {\n type: 'object',\n required: ['type', 'reason'],\n properties: {\n type: { const: 'cancelled' },\n reason: { type: 'string', enum: AUTH_OAUTH_TRANSPORT_CANCELLATION_REASONS },\n },\n },\n {\n type: 'object',\n required: ['type', 'error'],\n properties: {\n type: { const: 'error' },\n error: {\n type: 'object',\n required: ['code', 'message'],\n properties: {\n code: { type: 'string', enum: AUTH_OAUTH_TRANSPORT_ERROR_CODES },\n message: { type: 'string' },\n cause: {},\n },\n },\n },\n },\n ],\n} as const satisfies DataSchema;\n\nexport const COMPLETE_OAUTH_AUTHORIZATION_INPUT_SCHEMA = {\n type: 'object',\n required: ['attemptId', 'response'],\n properties: {\n attemptId: { type: 'string' },\n response: AUTH_OAUTH_AUTHORIZATION_RESPONSE_SCHEMA,\n },\n} as const satisfies DataSchema;\n\nexport const AUTH_OAUTH_COMPLETION_RESULT_SCHEMA = {\n oneOf: [\n {\n type: 'object',\n required: ['ok', 'status', 'provider', 'session'],\n properties: {\n ok: { const: true },\n status: { const: 'authenticated' },\n provider: { type: 'string' },\n session: AUTH_SESSION_SCHEMA,\n },\n },\n {\n type: 'object',\n required: ['ok', 'status', 'provider', 'reason'],\n properties: {\n ok: { const: false },\n status: { const: 'cancelled' },\n provider: { type: 'string' },\n reason: { type: 'string', enum: AUTH_OAUTH_CANCELLATION_REASONS },\n },\n },\n {\n type: 'object',\n required: ['ok', 'status', 'error'],\n properties: {\n ok: { const: false },\n status: { const: 'error' },\n error: AUTH_OAUTH_ERROR_SCHEMA,\n },\n },\n ],\n} as const satisfies DataSchema;\n\nexport type AuthOAuthCompletionResult =\n | {\n ok: true;\n status: 'authenticated';\n provider: AuthOAuthProviderId;\n session: AuthSession;\n }\n | {\n ok: false;\n status: 'cancelled';\n provider: AuthOAuthProviderId;\n reason: AuthOAuthCancellationReason;\n }\n | {\n ok: false;\n status: 'error';\n error: AuthOAuthError;\n };\n\nexport interface AuthOAuthCapabilities {\n /** Enabled providers for which start and callback completion are operational. */\n providers: readonly [AuthOAuthProviderId, ...AuthOAuthProviderId[]];\n}\n\nexport interface AuthOAuthAdapter {\n readonly capabilities: AuthOAuthCapabilities;\n\n startAuthorization(input: StartOAuthAuthorizationInput): Promise<AuthOAuthStartResult>;\n completeAuthorization(input: CompleteOAuthAuthorizationInput): Promise<AuthOAuthCompletionResult>;\n}\n\nexport interface AuthAdapterCapabilities {\n signInIdentifiers: AuthIdentifierKind[];\n supportsSignUp: boolean;\n supportsPasswordReset: boolean;\n supportsOtp: boolean;\n supportsSessionRefresh: boolean;\n}\n\nexport interface AuthAdapter {\n readonly capabilities?: AuthAdapterCapabilities;\n /**\n * Presence is the canonical OAuth capability signal. When present, both authorization start and\n * callback completion are mandatory and operational for every advertised provider.\n */\n readonly oauth?: AuthOAuthAdapter;\n\n signIn(input: SignInInput): Promise<AuthResult<AuthSession>>;\n signUp(input: SignUpInput): Promise<AuthResult<AuthSession | AuthUser>>;\n signOut(input?: SignOutInput): Promise<AuthResult>;\n\n getSession(): Promise<AuthResult<AuthSession | null>>;\n refreshSession?(): Promise<AuthResult<AuthSession | null>>;\n\n requestPasswordReset?(input: PasswordResetInput): Promise<AuthResult>;\n verifyOtp?(input: VerifyOtpInput): Promise<AuthResult<AuthSession>>;\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const STRUCTURE_DESCRIPTOR_COMPILER_VERSION = "6.0.3";
|
|
2
|
-
export declare const STRUCTURE_DESCRIPTOR_FINGERPRINT = "sha256:
|
|
2
|
+
export declare const STRUCTURE_DESCRIPTOR_FINGERPRINT = "sha256:05419311d2828869c0ffc554890df986b462de036e7399cf2e9057c4ca381928";
|
|
3
3
|
export declare const STRUCTURE_DESCRIPTOR: {
|
|
4
4
|
readonly protocolVersion: 1;
|
|
5
5
|
readonly packageName: "@ankhorage/contracts";
|
|
6
|
-
readonly packageVersion: "25.
|
|
6
|
+
readonly packageVersion: "25.1.0";
|
|
7
7
|
readonly roots: {
|
|
8
8
|
readonly "auth-flow": "AuthFlowConfig";
|
|
9
9
|
readonly "auth-profile": "AuthProfileSpec";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export const STRUCTURE_DESCRIPTOR_COMPILER_VERSION = '6.0.3';
|
|
2
|
-
export const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:
|
|
2
|
+
export const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:05419311d2828869c0ffc554890df986b462de036e7399cf2e9057c4ca381928';
|
|
3
3
|
export const STRUCTURE_DESCRIPTOR = {
|
|
4
4
|
"protocolVersion": 1,
|
|
5
5
|
"packageName": "@ankhorage/contracts",
|
|
6
|
-
"packageVersion": "25.
|
|
6
|
+
"packageVersion": "25.1.0",
|
|
7
7
|
"roots": {
|
|
8
8
|
"auth-flow": "AuthFlowConfig",
|
|
9
9
|
"auth-profile": "AuthProfileSpec",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated.js","sourceRoot":"","sources":["../../src/structure/generated.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,qCAAqC,GAAG,OAAO,CAAC;AAC7D,MAAM,CAAC,MAAM,gCAAgC,GAAG,yEAAyE,CAAC;AAE1H,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,iBAAiB,EAAE,CAAC;IACpB,aAAa,EAAE,sBAAsB;IACrC,gBAAgB,EAAE,QAAQ;IAC1B,OAAO,EAAE;QACP,WAAW,EAAE,gBAAgB;QAC7B,cAAc,EAAE,iBAAiB;QACjC,cAAc,EAAE,gBAAgB;QAChC,cAAc,EAAE,gBAAgB;QAChC,iBAAiB,EAAE,oBAAoB;QACvC,qBAAqB,EAAE,oBAAoB;QAC3C,cAAc,EAAE,aAAa;KAC9B;IACD,aAAa,EAAE;QACb,gBAAgB,EAAE;YAChB,IAAI,EAAE,gBAAgB;YACtB,YAAY,EAAE;gBACZ,MAAM,EAAE,QAAQ;gBAChB,QAAQ,EAAE;oBACR,qBAAqB,EAAE;wBACrB,OAAO,EAAE;4BACP,MAAM,EAAE,QAAQ;4BAChB,MAAM,EAAE,QAAQ;yBACjB;wBACD,UAAU,EAAE,IAAI;qBACjB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BACjB;iBACF;aACF;SACF;QACD,+BAA+B,EAAE;YAC/B,IAAI,EAAE,+BAA+B;YACrC,YAAY,EAAE;gBACZ,MAAM,EAAE,QAAQ;gBAChB,QAAQ,EAAE;oBACR,UAAU,EAAE;wBACV,OAAO,EAAE;4BACP,MAAM,EAAE,WAAW;4BACnB,KAAK,EAAE;gCACL,MAAM,EAAE,QAAQ;gCAChB,MAAM,EAAE,QAAQ;6BACjB;4BACD,OAAO,EAAE;gCACP,MAAM,EAAE,KAAK;gCACb,IAAI,EAAE,iCAAiC;6BACxC;yBACF;wBACD,UAAU,EAAE,IAAI;qBACjB;oBACD,OAAO,EAAE;wBACP,OAAO,EAAE;4BACP,MAAM,EAAE,WAAW;4BACnB,KAAK,EAAE;gCACL,MAAM,EAAE,QAAQ;gCAChB,MAAM,EAAE,QAAQ;6BACjB;4BACD,OAAO,EAAE;gCACP,MAAM,EAAE,QAAQ;gCAChB,MAAM,EAAE,QAAQ;6BACjB;yBACF;wBACD,UAAU,EAAE,IAAI;qBACjB;oBACD,SAAS,EAAE;wBACT,OAAO,EAAE;4BACP,MAAM,EAAE,WAAW;4BACnB,KAAK,EAAE;gCACL,MAAM,EAAE,QAAQ;gCAChB,MAAM,EAAE,QAAQ;6BACjB;4BACD,OAAO,EAAE;gCACP,MAAM,EAAE,QAAQ;gCAChB,MAAM,EAAE,QAAQ;6BACjB;yBACF;wBACD,UAAU,EAAE,IAAI;qBACjB;iBACF;aACF;SACF;KACF;CAC6C,CAAC","sourcesContent":["/* This file is generated by @ankhorage/devtools. Do not edit manually. */\nimport type { StructureDescriptorDocument } from '@ankhorage/contracts/structure';\n\nexport const STRUCTURE_DESCRIPTOR_COMPILER_VERSION = '6.0.3';\nexport const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:ae107775b095cd601a0336a3369c6af308068a5796224278dfb503f482a41bbb';\n\nexport const STRUCTURE_DESCRIPTOR = {\n \"protocolVersion\": 1,\n \"packageName\": \"@ankhorage/contracts\",\n \"packageVersion\": \"25.0.0\",\n \"roots\": {\n \"auth-flow\": \"AuthFlowConfig\",\n \"auth-profile\": \"AuthProfileSpec\",\n \"auth-sign-in\": \"AuthSignInSpec\",\n \"auth-sign-up\": \"AuthSignUpSpec\",\n \"screen-metadata\": \"ScreenMetadataSpec\",\n \"screen-requirements\": \"ScreenRequirements\",\n \"theme-config\": \"ThemeConfig\"\n },\n \"descriptors\": {\n \"AuthFlowConfig\": {\n \"id\": \"AuthFlowConfig\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"forgotPasswordRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"otpRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"postSignInRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"signInRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"signOutRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"signUpRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"unauthorizedRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"AuthProfileField\": {\n \"id\": \"AuthProfileField\",\n \"descriptor\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"AuthProfileSpec\": {\n \"id\": \"AuthProfileSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"createStrategy\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"api\",\n \"app\",\n \"trigger\"\n ]\n },\n \"optional\": true\n },\n \"fields\": {\n \"value\": {\n \"kind\": \"ordered-list\",\n \"item\": {\n \"kind\": \"ref\",\n \"id\": \"AuthProfileField\"\n }\n }\n },\n \"primaryKey\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"authUserId\"\n ]\n },\n \"optional\": true\n },\n \"table\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"updateStrategy\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"api\",\n \"app\"\n ]\n },\n \"optional\": true\n }\n }\n }\n },\n \"AuthSignInSpec\": {\n \"id\": \"AuthSignInSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"identifiers\": {\n \"value\": {\n \"kind\": \"ordered-list\",\n \"item\": {\n \"kind\": \"enum\",\n \"values\": [\n \"email\",\n \"phone\",\n \"username\"\n ]\n }\n }\n }\n }\n }\n },\n \"AuthSignUpField\": {\n \"id\": \"AuthSignUpField\",\n \"descriptor\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"AuthSignUpSpec\": {\n \"id\": \"AuthSignUpSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"optionalFields\": {\n \"value\": {\n \"kind\": \"ordered-list\",\n \"item\": {\n \"kind\": \"ref\",\n \"id\": \"AuthSignUpField\"\n }\n },\n \"optional\": true\n },\n \"requiredFields\": {\n \"value\": {\n \"kind\": \"ordered-list\",\n \"item\": {\n \"kind\": \"ref\",\n \"id\": \"AuthSignUpField\"\n }\n }\n },\n \"signUpPolicy\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"autoSignIn\",\n \"requireVerification\"\n ]\n },\n \"optional\": true\n }\n }\n }\n },\n \"ScreenMetadataSpec\": {\n \"id\": \"ScreenMetadataSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"description\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"id\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"name\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"title\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ScreenRequirements\": {\n \"id\": \"ScreenRequirements\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"capabilities\": {\n \"value\": {\n \"kind\": \"set\",\n \"member\": {\n \"kind\": \"enum\",\n \"values\": [\n \"barcodeScanner\",\n \"cameraPreview\",\n \"clipboard\",\n \"ebookReader\",\n \"filePicker\",\n \"location\",\n \"mediaPicker\",\n \"notifications\"\n ]\n }\n },\n \"optional\": true\n },\n \"permissions\": {\n \"value\": {\n \"kind\": \"set\",\n \"member\": {\n \"kind\": \"enum\",\n \"values\": [\n \"camera\",\n \"clipboard\",\n \"locationBackground\",\n \"locationForeground\",\n \"mediaLibrary\",\n \"mediaLibraryWrite\",\n \"microphone\",\n \"notifications\"\n ]\n }\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeConfig\": {\n \"id\": \"ThemeConfig\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"dark\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeModeConfig\"\n }\n },\n \"id\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"light\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeModeConfig\"\n }\n },\n \"name\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"recipes\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeRecipeOverrides\"\n },\n \"optional\": true\n },\n \"tokens\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeGlobalTokenOverrides\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeGlobalTokenOverrides\": {\n \"id\": \"ThemeGlobalTokenOverrides\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"radii\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n }\n },\n \"optional\": true\n },\n \"shadows\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n }\n },\n \"optional\": true\n },\n \"spacing\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n }\n },\n \"optional\": true\n },\n \"typography\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeTypographyTokenOverrides\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeModeConfig\": {\n \"id\": \"ThemeModeConfig\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"harmony\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"analogous\",\n \"complementary\",\n \"monochromatic\",\n \"splitComplementary\",\n \"square\",\n \"tetradic\",\n \"triadic\"\n ]\n }\n },\n \"primaryColor\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n }\n }\n }\n },\n \"ThemeRecipeOverrides\": {\n \"id\": \"ThemeRecipeOverrides\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"components\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"ref\",\n \"packageName\": \"typescript\",\n \"id\": \"Readonly\"\n }\n },\n \"optional\": true\n },\n \"patterns\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"ref\",\n \"packageName\": \"typescript\",\n \"id\": \"Readonly\"\n }\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeTypographyHeadingOverrides\": {\n \"id\": \"ThemeTypographyHeadingOverrides\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"lineHeight\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n },\n \"optional\": true\n },\n \"size\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n },\n \"optional\": true\n },\n \"weight\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeTypographyTokenOverrides\": {\n \"id\": \"ThemeTypographyTokenOverrides\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"headings\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeTypographyHeadingOverrides\"\n }\n },\n \"optional\": true\n },\n \"sizes\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n }\n },\n \"optional\": true\n },\n \"weights\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"optional\": true\n }\n }\n }\n }\n }\n} as const satisfies StructureDescriptorDocument;\n"]}
|
|
1
|
+
{"version":3,"file":"generated.js","sourceRoot":"","sources":["../../src/structure/generated.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,qCAAqC,GAAG,OAAO,CAAC;AAC7D,MAAM,CAAC,MAAM,gCAAgC,GAAG,yEAAyE,CAAC;AAE1H,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,iBAAiB,EAAE,CAAC;IACpB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EAAE;gCACL,MAAM,EAAE,QAAQ;gCAChB,MAAM,EAAE,QAAQ;6BACjB;4BACD,OAAO,EAAE;gCACP,MAAM,EAAE,QAAQ;gCAChB,MAAM,EAAE,QAAQ;6BACjB;yBACF;wBACD,UAAU,EAAE,IAAI;qBACjB;iBACF;aACF;SACF;KACF;CAC6C,CAAC","sourcesContent":["/* This file is generated by @ankhorage/devtools. Do not edit manually. */\nimport type { StructureDescriptorDocument } from '@ankhorage/contracts/structure';\n\nexport const STRUCTURE_DESCRIPTOR_COMPILER_VERSION = '6.0.3';\nexport const STRUCTURE_DESCRIPTOR_FINGERPRINT = 'sha256:05419311d2828869c0ffc554890df986b462de036e7399cf2e9057c4ca381928';\n\nexport const STRUCTURE_DESCRIPTOR = {\n \"protocolVersion\": 1,\n \"packageName\": \"@ankhorage/contracts\",\n \"packageVersion\": \"25.1.0\",\n \"roots\": {\n \"auth-flow\": \"AuthFlowConfig\",\n \"auth-profile\": \"AuthProfileSpec\",\n \"auth-sign-in\": \"AuthSignInSpec\",\n \"auth-sign-up\": \"AuthSignUpSpec\",\n \"screen-metadata\": \"ScreenMetadataSpec\",\n \"screen-requirements\": \"ScreenRequirements\",\n \"theme-config\": \"ThemeConfig\"\n },\n \"descriptors\": {\n \"AuthFlowConfig\": {\n \"id\": \"AuthFlowConfig\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"forgotPasswordRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"otpRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"postSignInRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"signInRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"signOutRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"signUpRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"unauthorizedRoute\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"AuthProfileField\": {\n \"id\": \"AuthProfileField\",\n \"descriptor\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"AuthProfileSpec\": {\n \"id\": \"AuthProfileSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"createStrategy\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"api\",\n \"app\",\n \"trigger\"\n ]\n },\n \"optional\": true\n },\n \"fields\": {\n \"value\": {\n \"kind\": \"ordered-list\",\n \"item\": {\n \"kind\": \"ref\",\n \"id\": \"AuthProfileField\"\n }\n }\n },\n \"primaryKey\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"authUserId\"\n ]\n },\n \"optional\": true\n },\n \"table\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"updateStrategy\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"api\",\n \"app\"\n ]\n },\n \"optional\": true\n }\n }\n }\n },\n \"AuthSignInSpec\": {\n \"id\": \"AuthSignInSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"identifiers\": {\n \"value\": {\n \"kind\": \"ordered-list\",\n \"item\": {\n \"kind\": \"enum\",\n \"values\": [\n \"email\",\n \"phone\",\n \"username\"\n ]\n }\n }\n }\n }\n }\n },\n \"AuthSignUpField\": {\n \"id\": \"AuthSignUpField\",\n \"descriptor\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"AuthSignUpSpec\": {\n \"id\": \"AuthSignUpSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"optionalFields\": {\n \"value\": {\n \"kind\": \"ordered-list\",\n \"item\": {\n \"kind\": \"ref\",\n \"id\": \"AuthSignUpField\"\n }\n },\n \"optional\": true\n },\n \"requiredFields\": {\n \"value\": {\n \"kind\": \"ordered-list\",\n \"item\": {\n \"kind\": \"ref\",\n \"id\": \"AuthSignUpField\"\n }\n }\n },\n \"signUpPolicy\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"autoSignIn\",\n \"requireVerification\"\n ]\n },\n \"optional\": true\n }\n }\n }\n },\n \"ScreenMetadataSpec\": {\n \"id\": \"ScreenMetadataSpec\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"description\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n },\n \"id\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"name\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"title\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ScreenRequirements\": {\n \"id\": \"ScreenRequirements\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"capabilities\": {\n \"value\": {\n \"kind\": \"set\",\n \"member\": {\n \"kind\": \"enum\",\n \"values\": [\n \"barcodeScanner\",\n \"cameraPreview\",\n \"clipboard\",\n \"ebookReader\",\n \"filePicker\",\n \"location\",\n \"mediaPicker\",\n \"notifications\"\n ]\n }\n },\n \"optional\": true\n },\n \"permissions\": {\n \"value\": {\n \"kind\": \"set\",\n \"member\": {\n \"kind\": \"enum\",\n \"values\": [\n \"camera\",\n \"clipboard\",\n \"locationBackground\",\n \"locationForeground\",\n \"mediaLibrary\",\n \"mediaLibraryWrite\",\n \"microphone\",\n \"notifications\"\n ]\n }\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeConfig\": {\n \"id\": \"ThemeConfig\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"dark\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeModeConfig\"\n }\n },\n \"id\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"light\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeModeConfig\"\n }\n },\n \"name\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"recipes\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeRecipeOverrides\"\n },\n \"optional\": true\n },\n \"tokens\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeGlobalTokenOverrides\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeGlobalTokenOverrides\": {\n \"id\": \"ThemeGlobalTokenOverrides\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"radii\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n }\n },\n \"optional\": true\n },\n \"shadows\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n }\n },\n \"optional\": true\n },\n \"spacing\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n }\n },\n \"optional\": true\n },\n \"typography\": {\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeTypographyTokenOverrides\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeModeConfig\": {\n \"id\": \"ThemeModeConfig\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"harmony\": {\n \"value\": {\n \"kind\": \"enum\",\n \"values\": [\n \"analogous\",\n \"complementary\",\n \"monochromatic\",\n \"splitComplementary\",\n \"square\",\n \"tetradic\",\n \"triadic\"\n ]\n }\n },\n \"primaryColor\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n }\n }\n }\n },\n \"ThemeRecipeOverrides\": {\n \"id\": \"ThemeRecipeOverrides\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"components\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"ref\",\n \"packageName\": \"typescript\",\n \"id\": \"Readonly\"\n }\n },\n \"optional\": true\n },\n \"patterns\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"ref\",\n \"packageName\": \"typescript\",\n \"id\": \"Readonly\"\n }\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeTypographyHeadingOverrides\": {\n \"id\": \"ThemeTypographyHeadingOverrides\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"lineHeight\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n },\n \"optional\": true\n },\n \"size\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n },\n \"optional\": true\n },\n \"weight\": {\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"optional\": true\n }\n }\n }\n },\n \"ThemeTypographyTokenOverrides\": {\n \"id\": \"ThemeTypographyTokenOverrides\",\n \"descriptor\": {\n \"kind\": \"object\",\n \"fields\": {\n \"headings\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"ref\",\n \"id\": \"ThemeTypographyHeadingOverrides\"\n }\n },\n \"optional\": true\n },\n \"sizes\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"number\"\n }\n },\n \"optional\": true\n },\n \"weights\": {\n \"value\": {\n \"kind\": \"value-map\",\n \"key\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n },\n \"value\": {\n \"kind\": \"scalar\",\n \"type\": \"string\"\n }\n },\n \"optional\": true\n }\n }\n }\n }\n }\n} as const satisfies StructureDescriptorDocument;\n"]}
|
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/contracts",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.1.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"ankh": {
|
|
6
6
|
"category": "contracts",
|
|
7
7
|
"provider": null,
|
|
8
|
-
"capabilities": [
|
|
9
|
-
"contracts.cli"
|
|
10
|
-
],
|
|
11
8
|
"structure": {
|
|
12
9
|
"output": "src/structure/generated.ts",
|
|
13
10
|
"roots": {
|
|
@@ -47,10 +44,10 @@
|
|
|
47
44
|
"@ankhorage/utility": "^1.9.85"
|
|
48
45
|
},
|
|
49
46
|
"devDependencies": {
|
|
50
|
-
"@ankhorage/devtools": "^2.
|
|
51
|
-
"@ankhorage/paradox": "^0.3.
|
|
47
|
+
"@ankhorage/devtools": "^2.3.9",
|
|
48
|
+
"@ankhorage/paradox": "^0.3.2",
|
|
52
49
|
"@types/bun": "^1.4.2",
|
|
53
|
-
"@types/node": "^26.6.
|
|
50
|
+
"@types/node": "^26.6.5",
|
|
54
51
|
"typescript": "^6.0.3"
|
|
55
52
|
},
|
|
56
53
|
"exports": {
|