@atproto/lex-password-session 0.1.0 → 0.1.1

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 (58) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/error.d.ts.map +1 -1
  3. package/dist/lexicons/com/atproto/server/createAccount.d.ts +0 -1
  4. package/dist/lexicons/com/atproto/server/createAccount.d.ts.map +1 -1
  5. package/dist/lexicons/com/atproto/server/createAccount.defs.d.ts +16 -13
  6. package/dist/lexicons/com/atproto/server/createAccount.defs.d.ts.map +1 -1
  7. package/dist/lexicons/com/atproto/server/createAccount.defs.js +8 -10
  8. package/dist/lexicons/com/atproto/server/createAccount.defs.js.map +1 -1
  9. package/dist/lexicons/com/atproto/server/createAccount.js +0 -1
  10. package/dist/lexicons/com/atproto/server/createAccount.js.map +1 -1
  11. package/dist/lexicons/com/atproto/server/createSession.d.ts +0 -1
  12. package/dist/lexicons/com/atproto/server/createSession.d.ts.map +1 -1
  13. package/dist/lexicons/com/atproto/server/createSession.defs.d.ts +16 -13
  14. package/dist/lexicons/com/atproto/server/createSession.defs.d.ts.map +1 -1
  15. package/dist/lexicons/com/atproto/server/createSession.defs.js +11 -10
  16. package/dist/lexicons/com/atproto/server/createSession.defs.js.map +1 -1
  17. package/dist/lexicons/com/atproto/server/createSession.js +0 -1
  18. package/dist/lexicons/com/atproto/server/createSession.js.map +1 -1
  19. package/dist/lexicons/com/atproto/server/deleteSession.d.ts +0 -1
  20. package/dist/lexicons/com/atproto/server/deleteSession.d.ts.map +1 -1
  21. package/dist/lexicons/com/atproto/server/deleteSession.defs.d.ts +9 -6
  22. package/dist/lexicons/com/atproto/server/deleteSession.defs.d.ts.map +1 -1
  23. package/dist/lexicons/com/atproto/server/deleteSession.defs.js +8 -7
  24. package/dist/lexicons/com/atproto/server/deleteSession.defs.js.map +1 -1
  25. package/dist/lexicons/com/atproto/server/deleteSession.js +0 -1
  26. package/dist/lexicons/com/atproto/server/deleteSession.js.map +1 -1
  27. package/dist/lexicons/com/atproto/server/getSession.d.ts +0 -1
  28. package/dist/lexicons/com/atproto/server/getSession.d.ts.map +1 -1
  29. package/dist/lexicons/com/atproto/server/getSession.defs.d.ts +11 -9
  30. package/dist/lexicons/com/atproto/server/getSession.defs.d.ts.map +1 -1
  31. package/dist/lexicons/com/atproto/server/getSession.defs.js +6 -8
  32. package/dist/lexicons/com/atproto/server/getSession.defs.js.map +1 -1
  33. package/dist/lexicons/com/atproto/server/getSession.js +0 -1
  34. package/dist/lexicons/com/atproto/server/getSession.js.map +1 -1
  35. package/dist/lexicons/com/atproto/server/refreshSession.d.ts +0 -1
  36. package/dist/lexicons/com/atproto/server/refreshSession.d.ts.map +1 -1
  37. package/dist/lexicons/com/atproto/server/refreshSession.defs.d.ts +14 -11
  38. package/dist/lexicons/com/atproto/server/refreshSession.defs.d.ts.map +1 -1
  39. package/dist/lexicons/com/atproto/server/refreshSession.defs.js +11 -9
  40. package/dist/lexicons/com/atproto/server/refreshSession.defs.js.map +1 -1
  41. package/dist/lexicons/com/atproto/server/refreshSession.js +0 -1
  42. package/dist/lexicons/com/atproto/server/refreshSession.js.map +1 -1
  43. package/dist/password-session.d.ts.map +1 -1
  44. package/dist/password-session.js.map +1 -1
  45. package/package.json +6 -6
  46. package/src/lexicons/com/atproto/server/createAccount.defs.ts +43 -48
  47. package/src/lexicons/com/atproto/server/createAccount.ts +0 -1
  48. package/src/lexicons/com/atproto/server/createSession.defs.ts +42 -44
  49. package/src/lexicons/com/atproto/server/createSession.ts +0 -1
  50. package/src/lexicons/com/atproto/server/deleteSession.defs.ts +22 -24
  51. package/src/lexicons/com/atproto/server/deleteSession.ts +0 -1
  52. package/src/lexicons/com/atproto/server/getSession.defs.ts +27 -29
  53. package/src/lexicons/com/atproto/server/getSession.ts +0 -1
  54. package/src/lexicons/com/atproto/server/refreshSession.defs.ts +38 -39
  55. package/src/lexicons/com/atproto/server/refreshSession.ts +0 -1
  56. package/tsconfig.build.json +2 -2
  57. package/tsconfig.json +2 -2
  58. package/tsconfig.tests.json +1 -2
@@ -8,36 +8,34 @@ const $nsid = 'com.atproto.server.getSession'
8
8
 
9
9
  export { $nsid }
10
10
 
11
- /** Get information about the current auth session. Requires auth. */
12
- const main =
13
- /*#__PURE__*/
14
- l.query(
15
- $nsid,
16
- /*#__PURE__*/ l.params(),
17
- /*#__PURE__*/ l.jsonPayload({
18
- handle: /*#__PURE__*/ l.string({ format: 'handle' }),
19
- did: /*#__PURE__*/ l.string({ format: 'did' }),
20
- didDoc: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.lexMap()),
21
- email: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),
22
- emailConfirmed: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
23
- emailAuthFactor: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
24
- active: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
25
- status: /*#__PURE__*/ l.optional(
26
- /*#__PURE__*/ l.string<{
27
- knownValues: ['takendown', 'suspended', 'deactivated']
28
- }>(),
29
- ),
30
- }),
31
- )
32
- export { main }
11
+ export const $params = /*#__PURE__*/ l.params()
12
+
13
+ export type $Params = l.InferOutput<typeof $params>
14
+
15
+ export const $output = /*#__PURE__*/ l.jsonPayload({
16
+ handle: /*#__PURE__*/ l.string({ format: 'handle' }),
17
+ did: /*#__PURE__*/ l.string({ format: 'did' }),
18
+ didDoc: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.lexMap()),
19
+ email: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),
20
+ emailConfirmed: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
21
+ emailAuthFactor: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
22
+ active: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
23
+ status: /*#__PURE__*/ l.optional(
24
+ /*#__PURE__*/ l.string<{
25
+ knownValues: ['takendown', 'suspended', 'deactivated']
26
+ }>(),
27
+ ),
28
+ })
33
29
 
34
- export type $Params = l.InferMethodParams<typeof main>
35
- export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>
36
- export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<
37
- typeof main,
30
+ export type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>
31
+ export type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<
32
+ typeof $output,
38
33
  B
39
34
  >
40
35
 
41
- export const $lxm = /*#__PURE__*/ main.nsid,
42
- $params = main.parameters,
43
- $output = main.output
36
+ /** Get information about the current auth session. Requires auth. */
37
+ const main = /*#__PURE__*/ l.query($nsid, $params, $output)
38
+
39
+ export { main }
40
+
41
+ export const $lxm = $nsid
@@ -3,4 +3,3 @@
3
3
  */
4
4
 
5
5
  export * from './getSession.defs.js'
6
- export * as $defs from './getSession.defs.js'
@@ -8,46 +8,45 @@ const $nsid = 'com.atproto.server.refreshSession'
8
8
 
9
9
  export { $nsid }
10
10
 
11
- /** Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt'). */
12
- const main =
13
- /*#__PURE__*/
14
- l.procedure(
15
- $nsid,
16
- /*#__PURE__*/ l.params(),
17
- /*#__PURE__*/ l.payload(),
18
- /*#__PURE__*/ l.jsonPayload({
19
- accessJwt: /*#__PURE__*/ l.string(),
20
- refreshJwt: /*#__PURE__*/ l.string(),
21
- handle: /*#__PURE__*/ l.string({ format: 'handle' }),
22
- did: /*#__PURE__*/ l.string({ format: 'did' }),
23
- didDoc: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.lexMap()),
24
- email: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),
25
- emailConfirmed: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
26
- emailAuthFactor: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
27
- active: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
28
- status: /*#__PURE__*/ l.optional(
29
- /*#__PURE__*/ l.string<{
30
- knownValues: ['takendown', 'suspended', 'deactivated']
31
- }>(),
32
- ),
33
- }),
34
- ['AccountTakedown', 'InvalidToken', 'ExpiredToken'],
35
- )
36
- export { main }
11
+ export const $params = /*#__PURE__*/ l.params()
37
12
 
38
- export type $Params = l.InferMethodParams<typeof main>
39
- export type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>
40
- export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<
41
- typeof main,
42
- B
43
- >
44
- export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>
45
- export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<
46
- typeof main,
13
+ export type $Params = l.InferOutput<typeof $params>
14
+
15
+ export const $input = /*#__PURE__*/ l.payload()
16
+
17
+ export type $Input<B = l.BinaryData> = l.InferPayload<typeof $input, B>
18
+ export type $InputBody<B = l.BinaryData> = l.InferPayloadBody<typeof $input, B>
19
+
20
+ export const $output = /*#__PURE__*/ l.jsonPayload({
21
+ accessJwt: /*#__PURE__*/ l.string(),
22
+ refreshJwt: /*#__PURE__*/ l.string(),
23
+ handle: /*#__PURE__*/ l.string({ format: 'handle' }),
24
+ did: /*#__PURE__*/ l.string({ format: 'did' }),
25
+ didDoc: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.lexMap()),
26
+ email: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),
27
+ emailConfirmed: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
28
+ emailAuthFactor: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
29
+ active: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
30
+ status: /*#__PURE__*/ l.optional(
31
+ /*#__PURE__*/ l.string<{
32
+ knownValues: ['takendown', 'suspended', 'deactivated']
33
+ }>(),
34
+ ),
35
+ })
36
+
37
+ export type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>
38
+ export type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<
39
+ typeof $output,
47
40
  B
48
41
  >
49
42
 
50
- export const $lxm = /*#__PURE__*/ main.nsid,
51
- $params = /*#__PURE__*/ main.parameters,
52
- $input = /*#__PURE__*/ main.input,
53
- $output = /*#__PURE__*/ main.output
43
+ /** Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt'). */
44
+ const main = /*#__PURE__*/ l.procedure($nsid, $params, $input, $output, [
45
+ 'AccountTakedown',
46
+ 'InvalidToken',
47
+ 'ExpiredToken',
48
+ ])
49
+
50
+ export { main }
51
+
52
+ export const $lxm = $nsid
@@ -3,4 +3,3 @@
3
3
  */
4
4
 
5
5
  export * from './refreshSession.defs.js'
6
- export * as $defs from './refreshSession.defs.js'
@@ -7,6 +7,6 @@
7
7
  "importHelpers": true,
8
8
  "target": "ES2023",
9
9
  "rootDir": "./src",
10
- "outDir": "./dist"
11
- }
10
+ "outDir": "./dist",
11
+ },
12
12
  }
package/tsconfig.json CHANGED
@@ -2,6 +2,6 @@
2
2
  "include": [],
3
3
  "references": [
4
4
  { "path": "./tsconfig.build.json" },
5
- { "path": "./tsconfig.tests.json" }
6
- ]
5
+ { "path": "./tsconfig.tests.json" },
6
+ ],
7
7
  }
@@ -4,6 +4,5 @@
4
4
  "compilerOptions": {
5
5
  "noImplicitAny": true,
6
6
  "rootDir": "./",
7
- "baseUrl": "./"
8
- }
7
+ },
9
8
  }