@auth-craft/api-contract 0.8.0 → 0.9.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/auth.contract.d.ts +68 -0
- package/dist/auth.contract.d.ts.map +1 -1
- package/dist/auth.contract.js +40 -0
- package/dist/auth.contract.js.map +1 -1
- package/dist/index.d.ts +35 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/responses/session.d.ts +8 -0
- package/dist/responses/session.d.ts.map +1 -1
- package/dist/responses/session.js +4 -0
- package/dist/responses/session.js.map +1 -1
- package/dist/session.contract.d.ts +4 -0
- package/dist/session.contract.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/auth.contract.d.ts
CHANGED
|
@@ -76,6 +76,8 @@ export declare const register: {
|
|
|
76
76
|
readonly avatarUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
77
77
|
readonly locale: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
78
78
|
readonly metadata: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, number, undefined>]>, v.UnknownSchema, undefined>, undefined>;
|
|
79
|
+
/** false: no verification email; only for a credential whose first use verifies (email OTP). */
|
|
80
|
+
readonly sendVerification: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
79
81
|
}, undefined>;
|
|
80
82
|
readonly response: v.ObjectSchema<{
|
|
81
83
|
readonly userId: v.StringSchema<undefined>;
|
|
@@ -258,6 +260,52 @@ export declare const completeStepUp: {
|
|
|
258
260
|
readonly expiresAt: v.StringSchema<undefined>;
|
|
259
261
|
}, undefined>;
|
|
260
262
|
};
|
|
263
|
+
export declare const oauth2Authorize: {
|
|
264
|
+
readonly method: "POST";
|
|
265
|
+
readonly path: "/auth/oauth2/authorize";
|
|
266
|
+
readonly kind: "data";
|
|
267
|
+
readonly body: v.ObjectSchema<{
|
|
268
|
+
readonly response_type: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
269
|
+
readonly client_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>]>;
|
|
270
|
+
readonly redirect_uri: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>]>;
|
|
271
|
+
readonly scope: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 1024, undefined>]>, undefined>;
|
|
272
|
+
readonly state: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 1024, undefined>]>, undefined>;
|
|
273
|
+
readonly code_challenge: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>;
|
|
274
|
+
readonly code_challenge_method: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 16, undefined>]>, undefined>;
|
|
275
|
+
}, undefined>;
|
|
276
|
+
readonly response: v.ObjectSchema<{
|
|
277
|
+
readonly redirectTo: v.StringSchema<undefined>;
|
|
278
|
+
readonly granted: v.BooleanSchema<undefined>;
|
|
279
|
+
}, undefined>;
|
|
280
|
+
};
|
|
281
|
+
export declare const oauth2Token: {
|
|
282
|
+
readonly method: "POST";
|
|
283
|
+
readonly path: "/auth/oauth2/token";
|
|
284
|
+
readonly kind: "exchange";
|
|
285
|
+
readonly public: true;
|
|
286
|
+
readonly body: v.ObjectSchema<{
|
|
287
|
+
readonly grant_type: v.StringSchema<undefined>;
|
|
288
|
+
readonly code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 256, undefined>]>;
|
|
289
|
+
readonly client_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>]>;
|
|
290
|
+
readonly redirect_uri: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>]>;
|
|
291
|
+
readonly code_verifier: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 128, undefined>]>;
|
|
292
|
+
}, undefined>;
|
|
293
|
+
};
|
|
294
|
+
export declare const tokenEndpointContract: {
|
|
295
|
+
readonly oauth2Token: {
|
|
296
|
+
readonly method: "POST";
|
|
297
|
+
readonly path: "/auth/oauth2/token";
|
|
298
|
+
readonly kind: "exchange";
|
|
299
|
+
readonly public: true;
|
|
300
|
+
readonly body: v.ObjectSchema<{
|
|
301
|
+
readonly grant_type: v.StringSchema<undefined>;
|
|
302
|
+
readonly code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 256, undefined>]>;
|
|
303
|
+
readonly client_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>]>;
|
|
304
|
+
readonly redirect_uri: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>]>;
|
|
305
|
+
readonly code_verifier: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 128, undefined>]>;
|
|
306
|
+
}, undefined>;
|
|
307
|
+
};
|
|
308
|
+
};
|
|
261
309
|
export declare const authContract: {
|
|
262
310
|
readonly authenticate: {
|
|
263
311
|
readonly method: "POST";
|
|
@@ -323,6 +371,8 @@ export declare const authContract: {
|
|
|
323
371
|
readonly avatarUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
324
372
|
readonly locale: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
325
373
|
readonly metadata: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, number, undefined>]>, v.UnknownSchema, undefined>, undefined>;
|
|
374
|
+
/** false: no verification email; only for a credential whose first use verifies (email OTP). */
|
|
375
|
+
readonly sendVerification: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
326
376
|
}, undefined>;
|
|
327
377
|
readonly response: v.ObjectSchema<{
|
|
328
378
|
readonly userId: v.StringSchema<undefined>;
|
|
@@ -505,5 +555,23 @@ export declare const authContract: {
|
|
|
505
555
|
readonly expiresAt: v.StringSchema<undefined>;
|
|
506
556
|
}, undefined>;
|
|
507
557
|
};
|
|
558
|
+
readonly oauth2Authorize: {
|
|
559
|
+
readonly method: "POST";
|
|
560
|
+
readonly path: "/auth/oauth2/authorize";
|
|
561
|
+
readonly kind: "data";
|
|
562
|
+
readonly body: v.ObjectSchema<{
|
|
563
|
+
readonly response_type: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
564
|
+
readonly client_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>]>;
|
|
565
|
+
readonly redirect_uri: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>]>;
|
|
566
|
+
readonly scope: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 1024, undefined>]>, undefined>;
|
|
567
|
+
readonly state: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 1024, undefined>]>, undefined>;
|
|
568
|
+
readonly code_challenge: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>;
|
|
569
|
+
readonly code_challenge_method: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 16, undefined>]>, undefined>;
|
|
570
|
+
}, undefined>;
|
|
571
|
+
readonly response: v.ObjectSchema<{
|
|
572
|
+
readonly redirectTo: v.StringSchema<undefined>;
|
|
573
|
+
readonly granted: v.BooleanSchema<undefined>;
|
|
574
|
+
}, undefined>;
|
|
575
|
+
};
|
|
508
576
|
};
|
|
509
577
|
//# sourceMappingURL=auth.contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.contract.d.ts","sourceRoot":"","sources":["../src/auth.contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAO7B,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAevB,CAAC;AAKH,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"auth.contract.d.ts","sourceRoot":"","sources":["../src/auth.contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAO7B,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAevB,CAAC;AAKH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;QAgBjB,gGAAgG;;;;;;;;;;;;;CAIlG,CAAC;AAGH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAU5B,CAAC;AAGH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAW/B,CAAC;AAGH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;CAW5B,CAAC;AAIH,eAAO,MAAM,OAAO;;;;;CAKlB,CAAC;AAGH,eAAO,MAAM,MAAM;;;;;CAKjB,CAAC;AAGH,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;CAKb,CAAC;AAGH,eAAO,MAAM,YAAY;;;;;;;CAOvB,CAAC;AAGH,eAAO,MAAM,WAAW;;;;;;;;;;CAMtB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;CAMzB,CAAC;AAKH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;CAe1B,CAAC;AAMH,eAAO,MAAM,WAAW;;;;;;;;;;;;CAYtB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;CAA2B,CAAC;AAE9D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA3IrB,gGAAgG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwJ1F,CAAC"}
|
package/dist/auth.contract.js
CHANGED
|
@@ -52,6 +52,8 @@ export const register = endpoint({
|
|
|
52
52
|
avatarUrl: v.optional(textString(2048)),
|
|
53
53
|
locale: v.optional(shortString()),
|
|
54
54
|
metadata: v.optional(v.record(shortString(), v.unknown())),
|
|
55
|
+
/** false: no verification email; only for a credential whose first use verifies (email OTP). */
|
|
56
|
+
sendVerification: v.optional(v.boolean()),
|
|
55
57
|
}),
|
|
56
58
|
response: registerResponse,
|
|
57
59
|
});
|
|
@@ -139,6 +141,43 @@ export const completeStepUp = endpoint({
|
|
|
139
141
|
body: v.object({ challengeId: v.string(), code: secretString }),
|
|
140
142
|
response: v.object({ expiresAt: v.string() }),
|
|
141
143
|
});
|
|
144
|
+
// ── /auth/oauth2/authorize (data) — authorization request of an OAuth client ──
|
|
145
|
+
// Called by the sign-in page with the session it just created; the page navigates to
|
|
146
|
+
// `redirectTo` (the client's redirect URI with a code, or with an error).
|
|
147
|
+
export const oauth2Authorize = endpoint({
|
|
148
|
+
method: 'POST',
|
|
149
|
+
path: '/auth/oauth2/authorize',
|
|
150
|
+
kind: 'data',
|
|
151
|
+
body: v.object({
|
|
152
|
+
response_type: v.pipe(v.string(), v.maxLength(64)),
|
|
153
|
+
client_id: v.pipe(v.string(), v.minLength(1), v.maxLength(512)),
|
|
154
|
+
redirect_uri: v.pipe(v.string(), v.maxLength(2048)),
|
|
155
|
+
scope: v.optional(v.pipe(v.string(), v.maxLength(1024))),
|
|
156
|
+
state: v.optional(v.pipe(v.string(), v.maxLength(1024))),
|
|
157
|
+
code_challenge: v.optional(v.pipe(v.string(), v.maxLength(128))),
|
|
158
|
+
code_challenge_method: v.optional(v.pipe(v.string(), v.maxLength(16))),
|
|
159
|
+
}),
|
|
160
|
+
// `granted`: the redirect carries a code (the sign-in session is spent), not an error.
|
|
161
|
+
response: v.object({ redirectTo: v.string(), granted: v.boolean() }),
|
|
162
|
+
});
|
|
163
|
+
// ── /auth/oauth2/token (exchange) — RFC 6749 token endpoint ───────────────────
|
|
164
|
+
// Called by the client's proxy, not by a page: form-encoded, RFC 6749 responses. Not in
|
|
165
|
+
// `authContract`, so the typed client has no method for it; in `fullContract` so the
|
|
166
|
+
// token transition matrices must declare it.
|
|
167
|
+
export const oauth2Token = endpoint({
|
|
168
|
+
method: 'POST',
|
|
169
|
+
path: '/auth/oauth2/token',
|
|
170
|
+
kind: 'exchange',
|
|
171
|
+
public: true,
|
|
172
|
+
body: v.object({
|
|
173
|
+
grant_type: v.string(),
|
|
174
|
+
code: v.pipe(v.string(), v.maxLength(256)),
|
|
175
|
+
client_id: v.pipe(v.string(), v.minLength(1), v.maxLength(512)),
|
|
176
|
+
redirect_uri: v.pipe(v.string(), v.maxLength(2048)),
|
|
177
|
+
code_verifier: v.pipe(v.string(), v.maxLength(128)),
|
|
178
|
+
}),
|
|
179
|
+
});
|
|
180
|
+
export const tokenEndpointContract = { oauth2Token };
|
|
142
181
|
export const authContract = {
|
|
143
182
|
authenticate,
|
|
144
183
|
register,
|
|
@@ -151,5 +190,6 @@ export const authContract = {
|
|
|
151
190
|
selectTenant,
|
|
152
191
|
startStepUp,
|
|
153
192
|
completeStepUp,
|
|
193
|
+
oauth2Authorize,
|
|
154
194
|
};
|
|
155
195
|
//# sourceMappingURL=auth.contract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.contract.js","sourceRoot":"","sources":["../src/auth.contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEpG,iFAAiF;AACjF,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC;IACnC,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,OAAO;IACb,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,YAAY,EAAE,WAAW,EAAE;QAC3B,aAAa,EAAE,cAAc;QAC7B,cAAc,EAAE,WAAW,EAAE;QAC7B,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC;QACzC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,C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AC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAC1C,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAC/D,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACnD,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;KACpD,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,WAAW,EAAW,CAAC;AAE9D,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,YAAY;IACZ,QAAQ;IACR,iBAAiB;IACjB,oBAAoB;IACpB,iBAAiB;IACjB,OAAO;IACP,MAAM;IACN,EAAE;IACF,YAAY;IACZ,WAAW;IACX,cAAc;IACd,eAAe;CACP,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { authContract } from './auth.contract.js';
|
|
1
|
+
export { authContract, tokenEndpointContract } from './auth.contract.js';
|
|
2
2
|
export type { Endpoint, EndpointKind, HttpMethod, PathParams } from './core.js';
|
|
3
3
|
export { endpoint, fillPath } from './core.js';
|
|
4
4
|
export type { AuthTokens, ChallengeRequired, IdentityVerificationRequired, LoginResult, MfaRequired, } from './login-result.js';
|
|
@@ -14,6 +14,19 @@ export { usersContract } from './users.contract.js';
|
|
|
14
14
|
export { verificationContract } from './verification.contract.js';
|
|
15
15
|
/** All endpoint groups, for registry diffing and full-client construction. */
|
|
16
16
|
export declare const fullContract: {
|
|
17
|
+
readonly oauth2Token: {
|
|
18
|
+
readonly method: "POST";
|
|
19
|
+
readonly path: "/auth/oauth2/token";
|
|
20
|
+
readonly kind: "exchange";
|
|
21
|
+
readonly public: true;
|
|
22
|
+
readonly body: import("valibot").ObjectSchema<{
|
|
23
|
+
readonly grant_type: import("valibot").StringSchema<undefined>;
|
|
24
|
+
readonly code: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 256, undefined>]>;
|
|
25
|
+
readonly client_id: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 512, undefined>]>;
|
|
26
|
+
readonly redirect_uri: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2048, undefined>]>;
|
|
27
|
+
readonly code_verifier: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 128, undefined>]>;
|
|
28
|
+
}, undefined>;
|
|
29
|
+
};
|
|
17
30
|
readonly authenticate: {
|
|
18
31
|
readonly method: "POST";
|
|
19
32
|
readonly path: "/auth/authenticate";
|
|
@@ -78,6 +91,7 @@ export declare const fullContract: {
|
|
|
78
91
|
readonly avatarUrl: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
79
92
|
readonly locale: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
80
93
|
readonly metadata: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, import("valibot").UnknownSchema, undefined>, undefined>;
|
|
94
|
+
readonly sendVerification: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, undefined>;
|
|
81
95
|
}, undefined>;
|
|
82
96
|
readonly response: import("valibot").ObjectSchema<{
|
|
83
97
|
readonly userId: import("valibot").StringSchema<undefined>;
|
|
@@ -260,6 +274,24 @@ export declare const fullContract: {
|
|
|
260
274
|
readonly expiresAt: import("valibot").StringSchema<undefined>;
|
|
261
275
|
}, undefined>;
|
|
262
276
|
};
|
|
277
|
+
readonly oauth2Authorize: {
|
|
278
|
+
readonly method: "POST";
|
|
279
|
+
readonly path: "/auth/oauth2/authorize";
|
|
280
|
+
readonly kind: "data";
|
|
281
|
+
readonly body: import("valibot").ObjectSchema<{
|
|
282
|
+
readonly response_type: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 64, undefined>]>;
|
|
283
|
+
readonly client_id: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 512, undefined>]>;
|
|
284
|
+
readonly redirect_uri: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2048, undefined>]>;
|
|
285
|
+
readonly scope: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 1024, undefined>]>, undefined>;
|
|
286
|
+
readonly state: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 1024, undefined>]>, undefined>;
|
|
287
|
+
readonly code_challenge: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 128, undefined>]>, undefined>;
|
|
288
|
+
readonly code_challenge_method: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 16, undefined>]>, undefined>;
|
|
289
|
+
}, undefined>;
|
|
290
|
+
readonly response: import("valibot").ObjectSchema<{
|
|
291
|
+
readonly redirectTo: import("valibot").StringSchema<undefined>;
|
|
292
|
+
readonly granted: import("valibot").BooleanSchema<undefined>;
|
|
293
|
+
}, undefined>;
|
|
294
|
+
};
|
|
263
295
|
readonly setupAuthenticator: {
|
|
264
296
|
readonly method: "POST";
|
|
265
297
|
readonly path: "/mfa/authenticators/setup";
|
|
@@ -501,6 +533,8 @@ export declare const fullContract: {
|
|
|
501
533
|
readonly id: import("valibot").StringSchema<undefined>;
|
|
502
534
|
readonly tokenId: import("valibot").StringSchema<undefined>;
|
|
503
535
|
readonly tenantId: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
536
|
+
readonly origin: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
537
|
+
readonly clientId: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
504
538
|
readonly deviceLabel: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
505
539
|
readonly country: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
506
540
|
readonly city: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AACzE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC/C,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUf,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { authContract } from './auth.contract.js';
|
|
1
|
+
export { authContract, tokenEndpointContract } from './auth.contract.js';
|
|
2
2
|
export { endpoint, fillPath } from './core.js';
|
|
3
3
|
export { isAuthTokens, isChallengeRequired, isMfaRequired, isVerificationRequired } from './login-result.js';
|
|
4
4
|
export { mfaContract } from './mfa.contract.js';
|
|
@@ -10,7 +10,7 @@ export { sessionContract } from './session.contract.js';
|
|
|
10
10
|
export { tenantsContract } from './tenants.contract.js';
|
|
11
11
|
export { usersContract } from './users.contract.js';
|
|
12
12
|
export { verificationContract } from './verification.contract.js';
|
|
13
|
-
import { authContract } from './auth.contract.js';
|
|
13
|
+
import { authContract, tokenEndpointContract } from './auth.contract.js';
|
|
14
14
|
import { mfaContract } from './mfa.contract.js';
|
|
15
15
|
import { oauthContract } from './oauth.contract.js';
|
|
16
16
|
import { passwordContract } from './password.contract.js';
|
|
@@ -21,6 +21,7 @@ import { verificationContract } from './verification.contract.js';
|
|
|
21
21
|
/** All endpoint groups, for registry diffing and full-client construction. */
|
|
22
22
|
export const fullContract = {
|
|
23
23
|
...authContract,
|
|
24
|
+
...tokenEndpointContract,
|
|
24
25
|
...passwordContract,
|
|
25
26
|
...verificationContract,
|
|
26
27
|
...sessionContract,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAQ/C,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC7G,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,8EAA8E;AAC9E,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,GAAG,YAAY;IACf,GAAG,qBAAqB;IACxB,GAAG,gBAAgB;IACnB,GAAG,oBAAoB;IACvB,GAAG,eAAe;IAClB,GAAG,WAAW;IACd,GAAG,aAAa;IAChB,GAAG,aAAa;IAChB,GAAG,eAAe;CACV,CAAC"}
|
|
@@ -5,6 +5,10 @@ export declare const sessionInfoResponse: v.ObjectSchema<{
|
|
|
5
5
|
readonly id: v.StringSchema<undefined>;
|
|
6
6
|
readonly tokenId: v.StringSchema<undefined>;
|
|
7
7
|
readonly tenantId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
8
|
+
/** Origin the session is bound to, when it is. */
|
|
9
|
+
readonly origin: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
10
|
+
/** OAuth client the session was issued to, when it was. */
|
|
11
|
+
readonly clientId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
8
12
|
readonly deviceLabel: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
9
13
|
readonly country: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
10
14
|
readonly city: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -19,6 +23,10 @@ export declare const listSessionsResponse: v.ArraySchema<v.ObjectSchema<{
|
|
|
19
23
|
readonly id: v.StringSchema<undefined>;
|
|
20
24
|
readonly tokenId: v.StringSchema<undefined>;
|
|
21
25
|
readonly tenantId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
26
|
+
/** Origin the session is bound to, when it is. */
|
|
27
|
+
readonly origin: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
28
|
+
/** OAuth client the session was issued to, when it was. */
|
|
29
|
+
readonly clientId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
22
30
|
readonly deviceLabel: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
23
31
|
readonly country: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
24
32
|
readonly city: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/responses/session.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,+CAA+C;AAC/C,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/responses/session.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,+CAA+C;AAC/C,eAAO,MAAM,mBAAmB;;;;IAI9B,kDAAkD;;IAElD,2DAA2D;;;;;;;;;;;aAW3D,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;IAf/B,kDAAkD;;IAElD,2DAA2D;;;;;;;;;;;yBAaG,CAAC"}
|
|
@@ -5,6 +5,10 @@ export const sessionInfoResponse = v.object({
|
|
|
5
5
|
id: v.string(),
|
|
6
6
|
tokenId: v.string(),
|
|
7
7
|
tenantId: v.optional(v.string()),
|
|
8
|
+
/** Origin the session is bound to, when it is. */
|
|
9
|
+
origin: v.optional(v.string()),
|
|
10
|
+
/** OAuth client the session was issued to, when it was. */
|
|
11
|
+
clientId: v.optional(v.string()),
|
|
8
12
|
deviceLabel: v.optional(v.string()),
|
|
9
13
|
country: v.optional(v.string()),
|
|
10
14
|
city: v.optional(v.string()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/responses/session.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,+CAA+C;AAC/C,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAChC,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACnC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC/B,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC5B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7C,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IACvD,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;CACnC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/responses/session.ts"],"names":[],"mappings":"AAAA,sCAAsC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@@ -13,6 +13,8 @@ export declare const listSessions: {
|
|
|
13
13
|
readonly id: v.StringSchema<undefined>;
|
|
14
14
|
readonly tokenId: v.StringSchema<undefined>;
|
|
15
15
|
readonly tenantId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
16
|
+
readonly origin: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
17
|
+
readonly clientId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
16
18
|
readonly deviceLabel: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
17
19
|
readonly country: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
18
20
|
readonly city: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -60,6 +62,8 @@ export declare const sessionContract: {
|
|
|
60
62
|
readonly id: v.StringSchema<undefined>;
|
|
61
63
|
readonly tokenId: v.StringSchema<undefined>;
|
|
62
64
|
readonly tenantId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
65
|
+
readonly origin: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
66
|
+
readonly clientId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
63
67
|
readonly deviceLabel: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
64
68
|
readonly country: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
65
69
|
readonly city: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.contract.d.ts","sourceRoot":"","sources":["../src/session.contract.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAO7B,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"session.contract.d.ts","sourceRoot":"","sources":["../src/session.contract.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAO7B,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;CAUvB,CAAC;AAGH,eAAO,MAAM,aAAa;;;;;;;;;;CAQxB,CAAC;AAGH,eAAO,MAAM,WAAW;;;;;;;;;;CAQtB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIlB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@auth-craft/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Single source of truth for Auth Craft HTTP endpoints (path + method + kind + valibot request/response schemas). Imported by both the backend routes and the typed frontend client so they cannot drift.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|