@atproto/oauth-provider 0.25.6 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/dist/account/account-manager.d.ts +5 -11
  3. package/dist/account/account-manager.d.ts.map +1 -1
  4. package/dist/account/account-manager.js +17 -59
  5. package/dist/account/account-manager.js.map +1 -1
  6. package/dist/account/account-store.d.ts +2 -8
  7. package/dist/account/account-store.d.ts.map +1 -1
  8. package/dist/account/account-store.js.map +1 -1
  9. package/dist/errors/captcha-rejected-error.d.ts +12 -0
  10. package/dist/errors/captcha-rejected-error.d.ts.map +1 -0
  11. package/dist/errors/captcha-rejected-error.js +18 -0
  12. package/dist/errors/captcha-rejected-error.js.map +1 -0
  13. package/dist/errors/captcha-required-error.d.ts +9 -0
  14. package/dist/errors/captcha-required-error.d.ts.map +1 -0
  15. package/dist/errors/captcha-required-error.js +11 -0
  16. package/dist/errors/captcha-required-error.js.map +1 -0
  17. package/dist/errors/oauth-error.d.ts +1 -0
  18. package/dist/errors/oauth-error.d.ts.map +1 -1
  19. package/dist/errors/oauth-error.js +3 -0
  20. package/dist/errors/oauth-error.js.map +1 -1
  21. package/dist/errors/rate-limit-exceeded-error.d.ts +12 -0
  22. package/dist/errors/rate-limit-exceeded-error.d.ts.map +1 -0
  23. package/dist/errors/rate-limit-exceeded-error.js +14 -0
  24. package/dist/errors/rate-limit-exceeded-error.js.map +1 -0
  25. package/dist/errors/www-authenticate-error.d.ts +1 -0
  26. package/dist/errors/www-authenticate-error.d.ts.map +1 -1
  27. package/dist/errors/www-authenticate-error.js +4 -0
  28. package/dist/errors/www-authenticate-error.js.map +1 -1
  29. package/dist/hcaptcha/hcaptcha-client-tokens.d.ts +7 -0
  30. package/dist/hcaptcha/hcaptcha-client-tokens.d.ts.map +1 -0
  31. package/dist/hcaptcha/hcaptcha-client-tokens.js +2 -0
  32. package/dist/hcaptcha/hcaptcha-client-tokens.js.map +1 -0
  33. package/dist/hcaptcha/hcaptcha-manager.d.ts +23 -0
  34. package/dist/hcaptcha/hcaptcha-manager.d.ts.map +1 -0
  35. package/dist/hcaptcha/hcaptcha-manager.js +83 -0
  36. package/dist/hcaptcha/hcaptcha-manager.js.map +1 -0
  37. package/dist/hcaptcha/hcaptcha-verify-data.d.ts +15 -0
  38. package/dist/hcaptcha/hcaptcha-verify-data.d.ts.map +1 -0
  39. package/dist/hcaptcha/hcaptcha-verify-data.js +2 -0
  40. package/dist/hcaptcha/hcaptcha-verify-data.js.map +1 -0
  41. package/dist/lib/hcaptcha.d.ts +5 -11
  42. package/dist/lib/hcaptcha.d.ts.map +1 -1
  43. package/dist/lib/hcaptcha.js +12 -20
  44. package/dist/lib/hcaptcha.js.map +1 -1
  45. package/dist/lib/http/response.d.ts +1 -1
  46. package/dist/lib/http/response.d.ts.map +1 -1
  47. package/dist/lib/http/response.js +15 -17
  48. package/dist/lib/http/response.js.map +1 -1
  49. package/dist/lib/identifier.d.ts +3 -0
  50. package/dist/lib/identifier.d.ts.map +1 -0
  51. package/dist/lib/identifier.js +4 -0
  52. package/dist/lib/identifier.js.map +1 -0
  53. package/dist/lib/redis.d.ts.map +1 -1
  54. package/dist/lib/redis.js +7 -1
  55. package/dist/lib/redis.js.map +1 -1
  56. package/dist/oauth-errors.d.ts +3 -0
  57. package/dist/oauth-errors.d.ts.map +1 -1
  58. package/dist/oauth-errors.js +3 -0
  59. package/dist/oauth-errors.js.map +1 -1
  60. package/dist/oauth-hooks.d.ts +16 -14
  61. package/dist/oauth-hooks.d.ts.map +1 -1
  62. package/dist/oauth-hooks.js.map +1 -1
  63. package/dist/oauth-provider.d.ts +26 -7
  64. package/dist/oauth-provider.d.ts.map +1 -1
  65. package/dist/oauth-provider.js +28 -48
  66. package/dist/oauth-provider.js.map +1 -1
  67. package/dist/rate-limit/rate-limit-manager.d.ts +39 -0
  68. package/dist/rate-limit/rate-limit-manager.d.ts.map +1 -0
  69. package/dist/rate-limit/rate-limit-manager.js +99 -0
  70. package/dist/rate-limit/rate-limit-manager.js.map +1 -0
  71. package/dist/rate-limit/rate-limit-policies.d.ts +108 -0
  72. package/dist/rate-limit/rate-limit-policies.d.ts.map +1 -0
  73. package/dist/rate-limit/rate-limit-policies.js +90 -0
  74. package/dist/rate-limit/rate-limit-policies.js.map +1 -0
  75. package/dist/rate-limit/rate-limiter.d.ts +36 -0
  76. package/dist/rate-limit/rate-limiter.d.ts.map +1 -0
  77. package/dist/rate-limit/rate-limiter.js +2 -0
  78. package/dist/rate-limit/rate-limiter.js.map +1 -0
  79. package/dist/router/assets/send-error-page.d.ts.map +1 -1
  80. package/dist/router/assets/send-error-page.js +3 -2
  81. package/dist/router/assets/send-error-page.js.map +1 -1
  82. package/dist/router/create-api-middleware.d.ts.map +1 -1
  83. package/dist/router/create-api-middleware.js +72 -15
  84. package/dist/router/create-api-middleware.js.map +1 -1
  85. package/dist/router/create-authorization-page-middleware.d.ts.map +1 -1
  86. package/dist/router/create-authorization-page-middleware.js +18 -17
  87. package/dist/router/create-authorization-page-middleware.js.map +1 -1
  88. package/dist/router/create-oauth-middleware.d.ts.map +1 -1
  89. package/dist/router/create-oauth-middleware.js +9 -8
  90. package/dist/router/create-oauth-middleware.js.map +1 -1
  91. package/dist/types/email.d.ts +2 -1
  92. package/dist/types/email.d.ts.map +1 -1
  93. package/dist/types/email.js.map +1 -1
  94. package/dist/types/indentifier.d.ts +2 -3
  95. package/dist/types/indentifier.d.ts.map +1 -1
  96. package/dist/types/indentifier.js.map +1 -1
  97. package/package.json +17 -17
  98. package/dist/account/sign-in-data.d.ts +0 -22
  99. package/dist/account/sign-in-data.d.ts.map +0 -1
  100. package/dist/account/sign-in-data.js +0 -15
  101. package/dist/account/sign-in-data.js.map +0 -1
  102. package/dist/account/sign-up-input.d.ts +0 -28
  103. package/dist/account/sign-up-input.d.ts.map +0 -1
  104. package/dist/account/sign-up-input.js +0 -19
  105. package/dist/account/sign-up-input.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/types/email.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,MAAM,WAAW,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAA;AAC/C,eAAO,MAAM,WAAW,uGAkBmC,CAAA;AAE3D,eAAO,MAAM,cAAc,oJAK1B,CAAA"}
1
+ {"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/types/email.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAE9D,YAAY,EAAE,WAAW,EAAE,CAAA;AAC3B,eAAO,MAAM,WAAW,uGAkBmC,CAAA;AAE3D,eAAO,MAAM,cAAc,oJAK1B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"email.js","sourceRoot":"","sources":["../../src/types/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC;KACzB,MAAM,EAAE;KACR,KAAK,EAAE;IACR,qEAAqE;IACrE,2EAA2E;IAC3E,2EAA2E;IAC3E,+DAA+D;IAC/D,oEAAoE;IACpE,2EAA2E;IAC3E,EAAE;IACF,6EAA6E;IAC7E,8EAA8E;IAC9E,4EAA4E;IAC5E,6EAA6E;IAC7E,kBAAkB;KACjB,MAAM,CAAC,CAAC,KAAa,EAAwB,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE;IACpE,OAAO,EAAE,uBAAuB;CACjC,CAAC;KACD,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,EAAiB,CAAC,CAAA;AAE3D,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CAC9C,CAAC,KAAa,EAAwB,EAAE,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAClE;IACE,OAAO,EAAE,4CAA4C;CACtD,CACF,CAAA","sourcesContent":["import { isEmailValid } from '@hapi/address'\nimport { isDisposableEmail } from 'disposable-email-domains-js'\nimport { z } from 'zod'\n\nexport type EmailString = `${string}@${string}`\nexport const emailSchema = z\n .string()\n .email()\n // @NOTE Internally, `zod` uses a regexp for validating emails.. This\n // validation strategy *could* be less permissive in some (edge) cases than\n // `@hapi/address` as the latter uses an algorithm based on the spec. Truth\n // is, it is kinda hard to know if the set of emails allowed by\n // `@hapi/address` is covered by the set of emails allowed by `zod`.\n // Additionally, this could change with future changes in either libraries.\n //\n // Because of this uncertainty, and because other part of the Bluesky/ATProto\n // codebases rely solely on `zod`, this code only allows emails that are valid\n // according to both libraries ensuring that we never encounter a case where\n // an email allowed here is in a format that would be rejected by other parts\n // of our systems.\n .refine((input: string): input is EmailString => isEmailValid(input), {\n message: 'Invalid email address',\n })\n .transform((value) => value.toLowerCase() as EmailString)\n\nexport const newEmailSchema = emailSchema.refine(\n (input: string): input is EmailString => !isDisposableEmail(input),\n {\n message: 'Disposable email addresses are not allowed',\n },\n)\n"]}
1
+ {"version":3,"file":"email.js","sourceRoot":"","sources":["../../src/types/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC;KACzB,MAAM,EAAE;KACR,KAAK,EAAE;IACR,qEAAqE;IACrE,2EAA2E;IAC3E,2EAA2E;IAC3E,+DAA+D;IAC/D,oEAAoE;IACpE,2EAA2E;IAC3E,EAAE;IACF,6EAA6E;IAC7E,8EAA8E;IAC9E,4EAA4E;IAC5E,6EAA6E;IAC7E,kBAAkB;KACjB,MAAM,CAAC,CAAC,KAAa,EAAwB,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE;IACpE,OAAO,EAAE,uBAAuB;CACjC,CAAC;KACD,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,EAAiB,CAAC,CAAA;AAE3D,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CAC9C,CAAC,KAAa,EAAwB,EAAE,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAClE;IACE,OAAO,EAAE,4CAA4C;CACtD,CACF,CAAA","sourcesContent":["import { isEmailValid } from '@hapi/address'\nimport { isDisposableEmail } from 'disposable-email-domains-js'\nimport { z } from 'zod'\nimport type { EmailString } from '@atproto/oauth-provider-api'\n\nexport type { EmailString }\nexport const emailSchema = z\n .string()\n .email()\n // @NOTE Internally, `zod` uses a regexp for validating emails.. This\n // validation strategy *could* be less permissive in some (edge) cases than\n // `@hapi/address` as the latter uses an algorithm based on the spec. Truth\n // is, it is kinda hard to know if the set of emails allowed by\n // `@hapi/address` is covered by the set of emails allowed by `zod`.\n // Additionally, this could change with future changes in either libraries.\n //\n // Because of this uncertainty, and because other part of the Bluesky/ATProto\n // codebases rely solely on `zod`, this code only allows emails that are valid\n // according to both libraries ensuring that we never encounter a case where\n // an email allowed here is in a format that would be rejected by other parts\n // of our systems.\n .refine((input: string): input is EmailString => isEmailValid(input), {\n message: 'Invalid email address',\n })\n .transform((value) => value.toLowerCase() as EmailString)\n\nexport const newEmailSchema = emailSchema.refine(\n (input: string): input is EmailString => !isDisposableEmail(input),\n {\n message: 'Disposable email addresses are not allowed',\n },\n)\n"]}
@@ -1,6 +1,5 @@
1
1
  import { z } from 'zod';
2
- import type { AtIdentifierString } from '@atproto/syntax';
3
- import { type EmailString } from './email.js';
4
- export type IdentifierString = AtIdentifierString | EmailString;
2
+ import type { IdentifierString } from '@atproto/oauth-provider-api';
3
+ export type { IdentifierString };
5
4
  export declare const identifierSchema: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, `${string}@${string}`, string>, `${string}@${string}`, string>, z.ZodEffects<z.ZodString, `did:${string}:${string}`, string>, z.ZodEffects<z.ZodString, `${string}.${string}`, string>]>;
6
5
  //# sourceMappingURL=indentifier.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"indentifier.d.ts","sourceRoot":"","sources":["../../src/types/indentifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,CAAC,EAAE,MAAM,KAAK,CAAA;AAExC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,KAAK,WAAW,EAAe,MAAM,YAAY,CAAA;AAG1D,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,GAAG,WAAW,CAAA;AAC/D,eAAO,MAAM,gBAAgB,6OAI+B,CAAA"}
1
+ {"version":3,"file":"indentifier.d.ts","sourceRoot":"","sources":["../../src/types/indentifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,CAAC,EAAE,MAAM,KAAK,CAAA;AAExC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAInE,YAAY,EAAE,gBAAgB,EAAE,CAAA;AAChC,eAAO,MAAM,gBAAgB,6OAI+B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"indentifier.js","sourceRoot":"","sources":["../../src/types/indentifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,CAAC,EAAE,MAAM,KAAK,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,OAAO,EAAoB,WAAW,EAAE,MAAM,YAAY,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG1C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC;IACtC,WAAW;IACX,SAAS;IACT,YAAY;CACb,CAA2D,CAAA","sourcesContent":["import { type ZodTypeDef, z } from 'zod'\nimport { didSchema } from '@atproto/did'\nimport type { AtIdentifierString } from '@atproto/syntax'\nimport { type EmailString, emailSchema } from './email.js'\nimport { handleSchema } from './handle.js'\n\nexport type IdentifierString = AtIdentifierString | EmailString\nexport const identifierSchema = z.union([\n emailSchema,\n didSchema,\n handleSchema,\n]) satisfies z.ZodType<IdentifierString, ZodTypeDef, string>\n"]}
1
+ {"version":3,"file":"indentifier.js","sourceRoot":"","sources":["../../src/types/indentifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,CAAC,EAAE,MAAM,KAAK,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG1C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC;IACtC,WAAW;IACX,SAAS;IACT,YAAY;CACb,CAA2D,CAAA","sourcesContent":["import { type ZodTypeDef, z } from 'zod'\nimport { didSchema } from '@atproto/did'\nimport type { IdentifierString } from '@atproto/oauth-provider-api'\nimport { emailSchema } from './email.js'\nimport { handleSchema } from './handle.js'\n\nexport type { IdentifierString }\nexport const identifierSchema = z.union([\n emailSchema,\n didSchema,\n handleSchema,\n]) satisfies z.ZodType<IdentifierString, ZodTypeDef, string>\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/oauth-provider",
3
- "version": "0.25.6",
3
+ "version": "0.27.0",
4
4
  "license": "MIT",
5
5
  "description": "Generic OAuth2 and OpenID Connect provider for Node.js. Currently only supports features needed for Atproto.",
6
6
  "keywords": [
@@ -61,24 +61,24 @@
61
61
  "node": ">=22"
62
62
  },
63
63
  "dependencies": {
64
- "@atproto-labs/did-resolver": "^0.3.13",
65
- "@atproto-labs/fetch-node": "^0.4.5",
66
- "@atproto-labs/handle-resolver-node": "^0.2.17",
64
+ "@atproto-labs/did-resolver": "^0.3.14",
65
+ "@atproto-labs/fetch-node": "^0.4.6",
66
+ "@atproto-labs/handle-resolver-node": "^0.2.18",
67
67
  "@atproto-labs/pipe": "^0.2.5",
68
- "@atproto-labs/simple-store": "^0.5.1",
69
- "@atproto-labs/simple-store-memory": "^0.2.6",
70
- "@atproto/common": "^0.8.10",
68
+ "@atproto-labs/simple-store": "^0.5.2",
69
+ "@atproto-labs/simple-store-memory": "^0.2.7",
70
+ "@atproto/common": "^0.8.11",
71
71
  "@atproto/did": "^0.5.6",
72
72
  "@atproto/jwk": "^0.7.4",
73
73
  "@atproto/jwk-jose": "^0.2.4",
74
- "@atproto/lex-document": "^0.1.16",
75
- "@atproto/lex-resolver": "^0.4.5",
76
- "@atproto/oauth-types": "^0.7.7",
77
- "@atproto/oauth-provider-api": "0.11.0",
78
- "@atproto/oauth-provider-ui": "0.11.0",
79
- "@atproto/oauth-resolver": "^0.0.3",
80
- "@atproto/oauth-scopes": "^0.5.14",
81
- "@atproto/syntax": "^0.7.7",
74
+ "@atproto/lex-document": "^0.1.17",
75
+ "@atproto/lex-resolver": "^0.4.7",
76
+ "@atproto/oauth-types": "^0.8.0",
77
+ "@atproto/oauth-provider-api": "0.12.0",
78
+ "@atproto/oauth-provider-ui": "0.11.1",
79
+ "@atproto/oauth-resolver": "^0.0.4",
80
+ "@atproto/oauth-scopes": "^0.5.15",
81
+ "@atproto/syntax": "^0.7.8",
82
82
  "@hapi/accept": "^6.0.3",
83
83
  "@hapi/address": "^5.1.1",
84
84
  "@hapi/bourne": "^3.0.0",
@@ -87,7 +87,7 @@
87
87
  "disposable-email-domains-js": "^1.5.0",
88
88
  "forwarded": "^0.2.0",
89
89
  "http-errors": "^2.0.0",
90
- "ioredis": "^5.3.2",
90
+ "ioredis": "^6.0.0",
91
91
  "jose": "^5.2.0",
92
92
  "zod": "^3.23.8"
93
93
  },
@@ -96,7 +96,7 @@
96
96
  "@types/cookie": "^0.6.0",
97
97
  "@types/forwarded": "0.1.4",
98
98
  "@types/http-errors": "^2.0.4",
99
- "vitest": "^4.1.10"
99
+ "vitest": "^5.1.1"
100
100
  },
101
101
  "scripts": {
102
102
  "build": "tsc --build tsconfig.build.json",
@@ -1,22 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const signInDataSchema: z.ZodObject<{
3
- locale: z.ZodString;
4
- identifier: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, `${string}@${string}`, string>, `${string}@${string}`, string>, z.ZodEffects<z.ZodString, `did:${string}:${string}`, string>, z.ZodEffects<z.ZodString, `${string}.${string}`, string>]>;
5
- password: z.ZodUnion<[z.ZodString, z.ZodString]>;
6
- emailOtp: z.ZodOptional<z.ZodString>;
7
- remember: z.ZodOptional<z.ZodBoolean>;
8
- }, "strict", z.ZodTypeAny, {
9
- locale: string;
10
- identifier: `${string}.${string}` | `${string}@${string}` | `did:${string}:${string}`;
11
- password: string;
12
- emailOtp?: string | undefined;
13
- remember?: boolean | undefined;
14
- }, {
15
- locale: string;
16
- identifier: string;
17
- password: string;
18
- emailOtp?: string | undefined;
19
- remember?: boolean | undefined;
20
- }>;
21
- export type SignInData = z.output<typeof signInDataSchema>;
22
- //# sourceMappingURL=sign-in-data.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sign-in-data.d.ts","sourceRoot":"","sources":["../../src/account/sign-in-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;EAQlB,CAAA;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
@@ -1,15 +0,0 @@
1
- import { z } from 'zod';
2
- import { localeSchema } from '../lib/util/locale.js';
3
- import { emailOtpSchema } from '../types/email-otp.js';
4
- import { identifierSchema } from '../types/indentifier.js';
5
- import { newPasswordSchema, oldPasswordSchema } from '../types/password.js';
6
- export const signInDataSchema = z
7
- .object({
8
- locale: localeSchema,
9
- identifier: identifierSchema,
10
- password: z.union([oldPasswordSchema, newPasswordSchema]),
11
- emailOtp: emailOtpSchema.optional(),
12
- remember: z.boolean().optional(),
13
- })
14
- .strict();
15
- //# sourceMappingURL=sign-in-data.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sign-in-data.js","sourceRoot":"","sources":["../../src/account/sign-in-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE3E,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC;KAC9B,MAAM,CAAC;IACN,MAAM,EAAE,YAAY;IACpB,UAAU,EAAE,gBAAgB;IAC5B,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;IACzD,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE;IACnC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC;KACD,MAAM,EAAE,CAAA","sourcesContent":["import { z } from 'zod'\nimport { localeSchema } from '../lib/util/locale.js'\nimport { emailOtpSchema } from '../types/email-otp.js'\nimport { identifierSchema } from '../types/indentifier.js'\nimport { newPasswordSchema, oldPasswordSchema } from '../types/password.js'\n\nexport const signInDataSchema = z\n .object({\n locale: localeSchema,\n identifier: identifierSchema,\n password: z.union([oldPasswordSchema, newPasswordSchema]),\n emailOtp: emailOtpSchema.optional(),\n remember: z.boolean().optional(),\n })\n .strict()\n\nexport type SignInData = z.output<typeof signInDataSchema>\n"]}
@@ -1,28 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const signUpInputSchema: z.ZodObject<{
3
- locale: z.ZodString;
4
- handle: z.ZodEffects<z.ZodString, `${string}.${string}`, string>;
5
- email: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `${string}@${string}`, string>, `${string}@${string}`, string>, `${string}@${string}`, string>;
6
- password: z.ZodString;
7
- remember: z.ZodOptional<z.ZodBoolean>;
8
- inviteCode: z.ZodOptional<z.ZodString>;
9
- hcaptchaToken: z.ZodOptional<z.ZodString>;
10
- }, "strict", z.ZodTypeAny, {
11
- locale: string;
12
- handle: `${string}.${string}`;
13
- email: `${string}@${string}`;
14
- password: string;
15
- remember?: boolean | undefined;
16
- inviteCode?: string | undefined;
17
- hcaptchaToken?: string | undefined;
18
- }, {
19
- locale: string;
20
- handle: string;
21
- email: string;
22
- password: string;
23
- remember?: boolean | undefined;
24
- inviteCode?: string | undefined;
25
- hcaptchaToken?: string | undefined;
26
- }>;
27
- export type SignUpInput = z.output<typeof signUpInputSchema>;
28
- //# sourceMappingURL=sign-up-input.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sign-up-input.d.ts","sourceRoot":"","sources":["../../src/account/sign-up-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;EAUnB,CAAA;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
@@ -1,19 +0,0 @@
1
- import { z } from 'zod';
2
- import { hcaptchaTokenSchema } from '../lib/hcaptcha.js';
3
- import { localeSchema } from '../lib/util/locale.js';
4
- import { newEmailSchema } from '../types/email.js';
5
- import { handleSchema } from '../types/handle.js';
6
- import { inviteCodeSchema } from '../types/invite-code.js';
7
- import { newPasswordSchema } from '../types/password.js';
8
- export const signUpInputSchema = z
9
- .object({
10
- locale: localeSchema,
11
- handle: handleSchema,
12
- email: newEmailSchema,
13
- password: newPasswordSchema,
14
- remember: z.boolean().optional(),
15
- inviteCode: inviteCodeSchema.optional(),
16
- hcaptchaToken: hcaptchaTokenSchema.optional(),
17
- })
18
- .strict();
19
- //# sourceMappingURL=sign-up-input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sign-up-input.js","sourceRoot":"","sources":["../../src/account/sign-up-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAExD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,MAAM,CAAC;IACN,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,YAAY;IACpB,KAAK,EAAE,cAAc;IACrB,QAAQ,EAAE,iBAAiB;IAC3B,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,UAAU,EAAE,gBAAgB,CAAC,QAAQ,EAAE;IACvC,aAAa,EAAE,mBAAmB,CAAC,QAAQ,EAAE;CAC9C,CAAC;KACD,MAAM,EAAE,CAAA","sourcesContent":["import { z } from 'zod'\nimport { hcaptchaTokenSchema } from '../lib/hcaptcha.js'\nimport { localeSchema } from '../lib/util/locale.js'\nimport { newEmailSchema } from '../types/email.js'\nimport { handleSchema } from '../types/handle.js'\nimport { inviteCodeSchema } from '../types/invite-code.js'\nimport { newPasswordSchema } from '../types/password.js'\n\nexport const signUpInputSchema = z\n .object({\n locale: localeSchema,\n handle: handleSchema,\n email: newEmailSchema,\n password: newPasswordSchema,\n remember: z.boolean().optional(),\n inviteCode: inviteCodeSchema.optional(),\n hcaptchaToken: hcaptchaTokenSchema.optional(),\n })\n .strict()\n\nexport type SignUpInput = z.output<typeof signUpInputSchema>\n"]}