@pikku/addon-admin 0.12.3 → 0.12.4

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 (121) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/.pikku/addon/agent/index.d.ts +1 -1
  3. package/dist/.pikku/addon/agent/index.js +1 -1
  4. package/dist/.pikku/addon/agent/pikku-agent-map.gen.d.ts +1 -1
  5. package/dist/.pikku/addon/agent/pikku-agent-types.gen.d.ts +1 -1
  6. package/dist/.pikku/addon/agent/pikku-model-aliases.gen.js +1 -1
  7. package/dist/.pikku/addon/agent/pikku-scorer-names.gen.d.ts +1 -1
  8. package/dist/.pikku/addon/auth/index.d.ts +1 -1
  9. package/dist/.pikku/addon/auth/index.js +1 -1
  10. package/dist/.pikku/addon/auth/pikku-auth-types.gen.d.ts +1 -1
  11. package/dist/.pikku/addon/auth/pikku-auth-types.gen.js +1 -1
  12. package/dist/.pikku/addon/channel/index.d.ts +1 -1
  13. package/dist/.pikku/addon/channel/index.js +1 -1
  14. package/dist/.pikku/addon/channel/pikku-channel-types.gen.d.ts +1 -1
  15. package/dist/.pikku/addon/channel/pikku-channel-types.gen.js +1 -1
  16. package/dist/.pikku/addon/error/index.d.ts +1 -1
  17. package/dist/.pikku/addon/error/index.js +1 -1
  18. package/dist/.pikku/addon/error/pikku-error-types.gen.d.ts +1 -1
  19. package/dist/.pikku/addon/error/pikku-error-types.gen.js +1 -1
  20. package/dist/.pikku/addon/function/index.d.ts +1 -1
  21. package/dist/.pikku/addon/function/index.js +1 -1
  22. package/dist/.pikku/addon/function/pikku-function-types.gen.d.ts +1 -1
  23. package/dist/.pikku/addon/function/pikku-function-types.gen.js +1 -1
  24. package/dist/.pikku/addon/function/pikku-functions-meta-verbose.gen.json +67 -2
  25. package/dist/.pikku/addon/function/pikku-functions-meta.gen.js +1 -1
  26. package/dist/.pikku/addon/function/pikku-functions-meta.gen.json +53 -2
  27. package/dist/.pikku/addon/function/pikku-functions.gen.js +5 -1
  28. package/dist/.pikku/addon/function/pikku-functions.gen.js.map +1 -1
  29. package/dist/.pikku/addon/http/index.d.ts +1 -1
  30. package/dist/.pikku/addon/http/index.js +1 -1
  31. package/dist/.pikku/addon/http/pikku-http-types.gen.d.ts +1 -1
  32. package/dist/.pikku/addon/http/pikku-http-types.gen.js +1 -1
  33. package/dist/.pikku/addon/mcp/index.d.ts +1 -1
  34. package/dist/.pikku/addon/mcp/index.js +1 -1
  35. package/dist/.pikku/addon/mcp/pikku-mcp-types.gen.d.ts +1 -1
  36. package/dist/.pikku/addon/mcp/pikku-mcp-types.gen.js +1 -1
  37. package/dist/.pikku/addon/middleware/index.d.ts +1 -1
  38. package/dist/.pikku/addon/middleware/index.js +1 -1
  39. package/dist/.pikku/addon/middleware/pikku-middleware-types.gen.d.ts +1 -1
  40. package/dist/.pikku/addon/middleware/pikku-middleware-types.gen.js +1 -1
  41. package/dist/.pikku/addon/pikku-bootstrap-scenarios.gen.d.ts +1 -1
  42. package/dist/.pikku/addon/pikku-bootstrap-scenarios.gen.js +1 -1
  43. package/dist/.pikku/addon/pikku-bootstrap.gen.d.ts +1 -1
  44. package/dist/.pikku/addon/pikku-bootstrap.gen.js +1 -1
  45. package/dist/.pikku/addon/pikku-package.gen.js +1 -1
  46. package/dist/.pikku/addon/pikku-services.gen.d.ts +1 -1
  47. package/dist/.pikku/addon/rpc/pikku-rpc-wirings-map.gen.d.ts +12 -2
  48. package/dist/.pikku/addon/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +12 -2
  49. package/dist/.pikku/addon/rpc/pikku-rpc-wirings-map.remote.gen.d.ts +10 -2
  50. package/dist/.pikku/addon/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  51. package/dist/.pikku/addon/rpc/pikku-rpc-wirings-meta.internal.gen.json +2 -0
  52. package/dist/.pikku/addon/scenarios/index.d.ts +1 -1
  53. package/dist/.pikku/addon/scenarios/index.js +1 -1
  54. package/dist/.pikku/addon/scenarios/pikku-personas.gen.js +1 -1
  55. package/dist/.pikku/addon/scenarios/pikku-scenario-functions-meta.gen.js +1 -1
  56. package/dist/.pikku/addon/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
  57. package/dist/.pikku/addon/scenarios/pikku-scenario-types.gen.d.ts +1 -1
  58. package/dist/.pikku/addon/scenarios/pikku-scenario-wirings-meta.gen.js +1 -1
  59. package/dist/.pikku/addon/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
  60. package/dist/.pikku/addon/scenarios/schemas/register.gen.d.ts +1 -1
  61. package/dist/.pikku/addon/scenarios/schemas/register.gen.js +1 -1
  62. package/dist/.pikku/addon/schemas/register.gen.js +7 -1
  63. package/dist/.pikku/addon/schemas/register.gen.js.map +1 -1
  64. package/dist/.pikku/addon/schemas/schemas/CreateUserInput.schema.json +1 -1
  65. package/dist/.pikku/addon/schemas/schemas/PingOutput.schema.json +1 -0
  66. package/dist/.pikku/addon/schemas/schemas/SendSignInLinkInput.schema.json +1 -0
  67. package/dist/.pikku/addon/schemas/schemas/SendSignInLinkOutput.schema.json +1 -0
  68. package/dist/.pikku/addon/scopes/index.d.ts +1 -1
  69. package/dist/.pikku/addon/scopes/index.js +1 -1
  70. package/dist/.pikku/addon/scopes/pikku-personas.gen.js +1 -1
  71. package/dist/.pikku/addon/scopes/pikku-roles.gen.d.ts +1 -1
  72. package/dist/.pikku/addon/scopes/pikku-scope-types.gen.d.ts +1 -1
  73. package/dist/.pikku/addon/scopes/pikku-scope-types.gen.js +1 -1
  74. package/dist/.pikku/addon/scopes/pikku-scopes.gen.d.ts +1 -1
  75. package/dist/.pikku/addon/secrets/index.d.ts +1 -1
  76. package/dist/.pikku/addon/secrets/index.js +1 -1
  77. package/dist/.pikku/addon/secrets/pikku-secret-types.gen.d.ts +1 -1
  78. package/dist/.pikku/addon/secrets/pikku-secret-types.gen.js +1 -1
  79. package/dist/.pikku/addon/secrets/pikku-secrets.gen.d.ts +1 -1
  80. package/dist/.pikku/addon/secrets/pikku-secrets.gen.js +1 -1
  81. package/dist/.pikku/addon/services/pikku-meta-service.gen.d.ts +1 -1
  82. package/dist/.pikku/addon/services/pikku-meta-service.gen.js +1 -1
  83. package/dist/.pikku/addon/setup/index.d.ts +1 -1
  84. package/dist/.pikku/addon/setup/index.js +1 -1
  85. package/dist/.pikku/addon/setup/pikku-addon-setup-types.gen.d.ts +1 -1
  86. package/dist/.pikku/addon/setup/pikku-addon-setup-types.gen.js +1 -1
  87. package/dist/.pikku/addon/setup/pikku-setup-types.gen.d.ts +1 -1
  88. package/dist/.pikku/addon/setup/pikku-setup-types.gen.js +1 -1
  89. package/dist/.pikku/addon/trigger/index.d.ts +1 -1
  90. package/dist/.pikku/addon/trigger/index.js +1 -1
  91. package/dist/.pikku/addon/trigger/pikku-trigger-types.gen.d.ts +1 -1
  92. package/dist/.pikku/addon/trigger/pikku-trigger-types.gen.js +1 -1
  93. package/dist/.pikku/addon/variables/index.d.ts +1 -1
  94. package/dist/.pikku/addon/variables/index.js +1 -1
  95. package/dist/.pikku/addon/variables/pikku-variable-types.gen.d.ts +1 -1
  96. package/dist/.pikku/addon/variables/pikku-variable-types.gen.js +1 -1
  97. package/dist/.pikku/addon/variables/pikku-variables.gen.d.ts +1 -1
  98. package/dist/.pikku/addon/variables/pikku-variables.gen.js +1 -1
  99. package/dist/.pikku/addon/workflow/index.d.ts +1 -1
  100. package/dist/.pikku/addon/workflow/index.js +1 -1
  101. package/dist/.pikku/addon/workflow/pikku-scenario-step-map.gen.d.ts +1 -1
  102. package/dist/.pikku/addon/workflow/pikku-workflow-map.gen.d.ts +1 -1
  103. package/dist/.pikku/addon/workflow/pikku-workflow-types.gen.d.ts +1 -1
  104. package/dist/.pikku/addon/workflow/pikku-workflow-types.gen.js +1 -1
  105. package/dist/.pikku/addon/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  106. package/dist/.pikku/addon/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
  107. package/dist/.pikku/addon/workflow/pikku-workflow-wirings.gen.js +1 -1
  108. package/dist/src/functions/create-user.function.d.ts +3 -3
  109. package/dist/src/functions/ping.function.d.ts +25 -0
  110. package/dist/src/functions/ping.function.d.ts.map +1 -0
  111. package/dist/src/functions/ping.function.js +27 -0
  112. package/dist/src/functions/ping.function.js.map +1 -0
  113. package/dist/src/functions/send-sign-in-link.function.d.ts +17 -0
  114. package/dist/src/functions/send-sign-in-link.function.d.ts.map +1 -0
  115. package/dist/src/functions/send-sign-in-link.function.js +21 -0
  116. package/dist/src/functions/send-sign-in-link.function.js.map +1 -0
  117. package/dist/src/lib/user.schemas.d.ts +16 -1
  118. package/dist/src/lib/user.schemas.d.ts.map +1 -1
  119. package/dist/src/lib/user.schemas.js +16 -1
  120. package/dist/src/lib/user.schemas.js.map +1 -1
  121. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.141
2
+ * This file was generated by @pikku/cli@0.12.143
3
3
  */
4
4
  import { WorkflowCancelledException } from '@pikku/core/workflow';
5
5
  import { pikkuWorkflowGraph as corePikkuWorkflowGraph } from '@pikku/core/workflow';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.141
2
+ * This file was generated by @pikku/cli@0.12.143
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/state';
5
5
  const workflowsMeta = {};
@@ -1,5 +1,5 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.12.141
3
+ * This file was generated by @pikku/cli@0.12.143
4
4
  */
5
5
  //# sourceMappingURL=pikku-workflow-wirings.gen.d.ts.map
@@ -1,5 +1,5 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.12.141
3
+ * This file was generated by @pikku/cli@0.12.143
4
4
  */
5
5
  //# sourceMappingURL=pikku-workflow-wirings.gen.js.map
@@ -1,18 +1,18 @@
1
1
  export declare const createUser: import("#pikku/addon/function").PikkuFunctionConfig<{
2
2
  email: string;
3
- password: string;
3
+ password?: string | undefined;
4
4
  name?: string | undefined;
5
5
  }, {
6
6
  userId: string;
7
7
  }, "rpc" | "session", import("#pikku/addon/function").PikkuFunction<{
8
8
  email: string;
9
- password: string;
9
+ password?: string | undefined;
10
10
  name?: string | undefined;
11
11
  }, {
12
12
  userId: string;
13
13
  }, "rpc" | "session", import("#pikku/addon/function").WiredServices> | import("#pikku/addon/function").PikkuFunctionSessionless<{
14
14
  email: string;
15
- password: string;
15
+ password?: string | undefined;
16
16
  name?: string | undefined;
17
17
  }, {
18
18
  userId: string;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Answers "am I wired?" and nothing else.
3
+ *
4
+ * The console UI ships with screens for users, roles and scopes, credentials
5
+ * and the audit trail, but the app serving it may never have wired this addon.
6
+ * Those screens probe for this function so they can say the addon is not
7
+ * enabled, instead of failing one request at a time.
8
+ *
9
+ * The probe discriminates on `RPCNotFoundError` (404), not on success: name
10
+ * resolution runs before the session check, so an unwired addon 404s even for
11
+ * an anonymous caller, while a wired one answers 200 — or 401/403 if the host
12
+ * gated it with `wireAddon({ auth: true })` or the caller lacks a role. Every
13
+ * one of those means *wired*, which is the only thing the screens need to know.
14
+ *
15
+ * It carries no scopes for the same reason: narrowing who may learn a fact the
16
+ * served UI already implies would only turn a clear answer into a 403.
17
+ */
18
+ export declare const ping: import("#pikku/addon/function").PikkuFunctionConfig<null, {
19
+ pong: true;
20
+ }, "rpc" | "session", import("#pikku/addon/function").PikkuFunction<null, {
21
+ pong: true;
22
+ }, "rpc" | "session", import("#pikku/addon/function").WiredServices> | import("#pikku/addon/function").PikkuFunctionSessionless<null, {
23
+ pong: true;
24
+ }, "rpc" | "session", import("#pikku/addon/function").WiredServices, unknown>, undefined, undefined>;
25
+ //# sourceMappingURL=ping.function.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ping.function.d.ts","sourceRoot":"","sources":["../../../src/functions/ping.function.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,IAAI;UAA2B,IAAI;;UAAJ,IAAI;;UAAJ,IAAI;oGAQ9C,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { pikkuFunc } from '#pikku/addon/function';
2
+ /**
3
+ * Answers "am I wired?" and nothing else.
4
+ *
5
+ * The console UI ships with screens for users, roles and scopes, credentials
6
+ * and the audit trail, but the app serving it may never have wired this addon.
7
+ * Those screens probe for this function so they can say the addon is not
8
+ * enabled, instead of failing one request at a time.
9
+ *
10
+ * The probe discriminates on `RPCNotFoundError` (404), not on success: name
11
+ * resolution runs before the session check, so an unwired addon 404s even for
12
+ * an anonymous caller, while a wired one answers 200 — or 401/403 if the host
13
+ * gated it with `wireAddon({ auth: true })` or the caller lacks a role. Every
14
+ * one of those means *wired*, which is the only thing the screens need to know.
15
+ *
16
+ * It carries no scopes for the same reason: narrowing who may learn a fact the
17
+ * served UI already implies would only turn a clear answer into a 403.
18
+ */
19
+ export const ping = pikkuFunc({
20
+ title: 'Ping',
21
+ description: 'Health check for the Pikku Admin addon. The console UI probes it to tell "addon not installed" apart from a real failure.',
22
+ expose: true,
23
+ func: async () => {
24
+ return { pong: true };
25
+ },
26
+ });
27
+ //# sourceMappingURL=ping.function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ping.function.js","sourceRoot":"","sources":["../../../src/functions/ping.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAuB;IAClD,KAAK,EAAE,MAAM;IACb,WAAW,EACT,2HAA2H;IAC7H,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK,IAAI,EAAE;QACf,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;IACvB,CAAC;CACF,CAAC,CAAA"}
@@ -0,0 +1,17 @@
1
+ export declare const sendSignInLink: import("#pikku/addon/function").PikkuFunctionConfig<{
2
+ email: string;
3
+ callbackURL?: string | undefined;
4
+ }, {
5
+ success: boolean;
6
+ }, "rpc" | "session", import("#pikku/addon/function").PikkuFunction<{
7
+ email: string;
8
+ callbackURL?: string | undefined;
9
+ }, {
10
+ success: boolean;
11
+ }, "rpc" | "session", import("#pikku/addon/function").WiredServices> | import("#pikku/addon/function").PikkuFunctionSessionless<{
12
+ email: string;
13
+ callbackURL?: string | undefined;
14
+ }, {
15
+ success: boolean;
16
+ }, "rpc" | "session", import("#pikku/addon/function").WiredServices, unknown>, undefined, undefined>;
17
+ //# sourceMappingURL=send-sign-in-link.function.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-sign-in-link.function.d.ts","sourceRoot":"","sources":["../../../src/functions/send-sign-in-link.function.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;oGAiBzB,CAAA"}
@@ -0,0 +1,21 @@
1
+ import { pikkuFunc } from '#pikku/addon/function';
2
+ import { sendAuthUserSignInLink } from '@pikku/better-auth';
3
+ import { SendSignInLinkInput, Success } from '../lib/user.schemas.js';
4
+ export const sendSignInLink = pikkuFunc({
5
+ title: 'Send Sign-In Link',
6
+ description: 'Mails a user a magic link they can sign in with. With magicLink({ disableSignUp: true }) a link only admits an email that already has a user row, which makes this the invitation for an account created without a password. Requires the magicLink plugin.',
7
+ expose: true,
8
+ // `admin:users:create` rather than a scope of its own: the link is the second
9
+ // half of provisioning an account out of band, and it is strictly weaker than
10
+ // `admin:users:password` — it goes to the user's own inbox, so it hands the
11
+ // caller nothing. A separate leaf would also have to be mirrored byte-for-byte
12
+ // in `@pikku/better-auth`'s tree, making an addon bump un-upgradable on its own.
13
+ scopes: ['admin:users:create'],
14
+ input: SendSignInLinkInput,
15
+ output: Success,
16
+ func: async ({ auth }, { email, callbackURL }) => {
17
+ await sendAuthUserSignInLink(auth, { email, callbackURL });
18
+ return { success: true };
19
+ },
20
+ });
21
+ //# sourceMappingURL=send-sign-in-link.function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-sign-in-link.function.js","sourceRoot":"","sources":["../../../src/functions/send-sign-in-link.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAErE,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC;IACtC,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EACT,6PAA6P;IAC/P,MAAM,EAAE,IAAI;IACZ,8EAA8E;IAC9E,8EAA8E;IAC9E,4EAA4E;IAC5E,+EAA+E;IAC/E,iFAAiF;IACjF,MAAM,EAAE,CAAC,oBAAoB,CAAC;IAC9B,KAAK,EAAE,mBAAmB;IAC1B,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE;QAC/C,MAAM,sBAAsB,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAA;QAC1D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;IAC1B,CAAC;CACF,CAAC,CAAA"}
@@ -31,9 +31,15 @@ export declare const ListUsersOutput: z.ZodObject<{
31
31
  banExpires: z.ZodOptional<z.ZodString>;
32
32
  }, z.core.$strip>>;
33
33
  }, z.core.$strip>;
34
+ /**
35
+ * A password is optional: an account created without one has no credential
36
+ * row, so it cannot be signed into until `setUserPassword` gives it one — the
37
+ * provisioning half of an invite, for an app that mails its own link or signs
38
+ * users in through a social provider.
39
+ */
34
40
  export declare const CreateUserInput: z.ZodObject<{
35
41
  email: z.ZodString;
36
- password: z.ZodString;
42
+ password: z.ZodOptional<z.ZodString>;
37
43
  name: z.ZodOptional<z.ZodString>;
38
44
  }, z.core.$strip>;
39
45
  export declare const CreateUserOutput: z.ZodObject<{
@@ -53,6 +59,15 @@ export declare const SetUserPasswordInput: z.ZodObject<{
53
59
  userId: z.ZodString;
54
60
  newPassword: z.ZodString;
55
61
  }, z.core.$strip>;
62
+ /**
63
+ * An invite is addressed by email rather than by id: the link is mailed to an
64
+ * address, and the plugin resolves the user from it. `callbackURL` is where the
65
+ * app wants the accepted invite to land.
66
+ */
67
+ export declare const SendSignInLinkInput: z.ZodObject<{
68
+ email: z.ZodString;
69
+ callbackURL: z.ZodOptional<z.ZodString>;
70
+ }, z.core.$strip>;
56
71
  export declare const Success: z.ZodObject<{
57
72
  success: z.ZodBoolean;
58
73
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"user.schemas.d.ts","sourceRoot":"","sources":["../../../src/lib/user.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;iBASf,CAAA;AAEF,eAAO,MAAM,cAAc;;;iBAGzB,CAAA;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;iBAE1B,CAAA;AAEF,eAAO,MAAM,eAAe;;;;iBAI1B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;iBAE3B,CAAA;AAEF,0CAA0C;AAC1C,eAAO,MAAM,OAAO;;iBAElB,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;iBAK7B,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAA;AAEF,eAAO,MAAM,OAAO;;iBAElB,CAAA"}
1
+ {"version":3,"file":"user.schemas.d.ts","sourceRoot":"","sources":["../../../src/lib/user.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;iBASf,CAAA;AAEF,eAAO,MAAM,cAAc;;;iBAGzB,CAAA;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;iBAE1B,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;iBAI1B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;iBAE3B,CAAA;AAEF,0CAA0C;AAC1C,eAAO,MAAM,OAAO;;iBAElB,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;iBAK7B,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAA;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;iBAG9B,CAAA;AAEF,eAAO,MAAM,OAAO;;iBAElB,CAAA"}
@@ -22,9 +22,15 @@ export const ListUsersInput = z.object({
22
22
  export const ListUsersOutput = z.object({
23
23
  users: z.array(User),
24
24
  });
25
+ /**
26
+ * A password is optional: an account created without one has no credential
27
+ * row, so it cannot be signed into until `setUserPassword` gives it one — the
28
+ * provisioning half of an invite, for an app that mails its own link or signs
29
+ * users in through a social provider.
30
+ */
25
31
  export const CreateUserInput = z.object({
26
32
  email: z.string(),
27
- password: z.string(),
33
+ password: z.string().optional(),
28
34
  name: z.string().optional(),
29
35
  });
30
36
  export const CreateUserOutput = z.object({
@@ -44,6 +50,15 @@ export const SetUserPasswordInput = z.object({
44
50
  userId: z.string(),
45
51
  newPassword: z.string(),
46
52
  });
53
+ /**
54
+ * An invite is addressed by email rather than by id: the link is mailed to an
55
+ * address, and the plugin resolves the user from it. `callbackURL` is where the
56
+ * app wants the accepted invite to land.
57
+ */
58
+ export const SendSignInLinkInput = z.object({
59
+ email: z.string(),
60
+ callbackURL: z.string().optional(),
61
+ });
47
62
  export const Success = z.object({
48
63
  success: z.boolean(),
49
64
  });
@@ -1 +1 @@
1
- {"version":3,"file":"user.schemas.js","sourceRoot":"","sources":["../../../src/lib/user.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,C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M,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;CACxB,CAAC,CAAA;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/addon-admin",
3
- "version": "0.12.3",
3
+ "version": "0.12.4",
4
4
  "description": "Admin addon for Pikku — the user directory, roles and scopes, credentials and the audit trail, as ordinary RPCs",
5
5
  "type": "module",
6
6
  "imports": {
@@ -27,7 +27,7 @@
27
27
  "test:coverage": "bash run-tests.sh --coverage"
28
28
  },
29
29
  "peerDependencies": {
30
- "@pikku/better-auth": "^0.12.34",
30
+ "@pikku/better-auth": "^0.12.39",
31
31
  "@pikku/core": "^0.12.106",
32
32
  "zod": "^4"
33
33
  },
@@ -37,7 +37,7 @@
37
37
  }
38
38
  },
39
39
  "devDependencies": {
40
- "@pikku/better-auth": "^0.12.34",
40
+ "@pikku/better-auth": "^0.12.39",
41
41
  "@pikku/cli": "^0.12.141",
42
42
  "@pikku/core": "*",
43
43
  "typescript": "^6.0.3",