@shipfox/api-auth-dto 10.2.0 → 15.0.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.
@@ -1,2 +1,2 @@
1
1
  $ shipfox-swc
2
- Successfully compiled: 10 files with swc (174.46ms)
2
+ Successfully compiled: 10 files with swc (282.31ms)
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @shipfox/api-auth-dto
2
2
 
3
+ ## 15.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - @shipfox/api-common-dto@15.0.0
8
+
9
+ ## 12.0.0
10
+
11
+ ### Patch Changes
12
+
13
+ - f78740d: Remove Unicode dash punctuation from package prose and source comments.
14
+ - Updated dependencies [f78740d]
15
+ - Updated dependencies [34a5639]
16
+ - @shipfox/api-common-dto@12.0.0
17
+ - @shipfox/inter-module@0.2.3
18
+
3
19
  ## 10.2.0
4
20
 
5
21
  ### Minor Changes
package/dist/events.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- export declare const AUTH_PASSWORD_RESET_SEND_REQUESTED: "auth.password_reset.send_requested";
3
- export declare const AUTH_USER_SIGNED_UP: "auth.user.signed_up";
2
+ export declare const AUTH_PASSWORD_RESET_SEND_REQUESTED: 'auth.password_reset.send_requested';
3
+ export declare const AUTH_USER_SIGNED_UP: 'auth.user.signed_up';
4
4
  export declare const authPasswordResetSendRequestedSchema: z.ZodObject<{
5
5
  email: z.ZodString;
6
6
  resetLink: z.ZodString;
@@ -3,20 +3,20 @@ import { z } from 'zod';
3
3
  export declare const authInterModuleContract: import("@shipfox/inter-module").InterModuleContract<{
4
4
  readonly module: "auth";
5
5
  readonly methods: {
6
- readonly mintRunnerSessionToken: {
7
- readonly input: z.ZodObject<{
8
- workspaceId: z.ZodString;
6
+ mintRunnerSessionToken: {
7
+ input: z.ZodObject<{
9
8
  runnerSessionId: z.ZodString;
9
+ workspaceId: z.ZodString;
10
10
  scope: z.ZodLiteral<"workspace">;
11
11
  labels: z.ZodArray<z.ZodString>;
12
12
  maxClaims: z.ZodNullable<z.ZodNumber>;
13
13
  }, z.core.$strip>;
14
- readonly output: z.ZodObject<{
14
+ output: z.ZodObject<{
15
15
  token: z.ZodString;
16
16
  }, z.core.$strip>;
17
17
  };
18
- readonly mintJobLeaseToken: {
19
- readonly input: z.ZodObject<{
18
+ mintJobLeaseToken: {
19
+ input: z.ZodObject<{
20
20
  workflowRunId: z.ZodString;
21
21
  workflowRunAttempt: z.ZodOptional<z.ZodNumber>;
22
22
  workflowRunAttemptId: z.ZodString;
@@ -28,15 +28,15 @@ export declare const authInterModuleContract: import("@shipfox/inter-module").In
28
28
  currentStepId: z.ZodOptional<z.ZodString>;
29
29
  currentStepAttempt: z.ZodOptional<z.ZodNumber>;
30
30
  }, z.core.$strip>;
31
- readonly output: z.ZodObject<{
31
+ output: z.ZodObject<{
32
32
  token: z.ZodString;
33
33
  }, z.core.$strip>;
34
34
  };
35
- readonly getCurrentAdminRole: {
36
- readonly input: z.ZodObject<{
35
+ getCurrentAdminRole: {
36
+ input: z.ZodObject<{
37
37
  userId: z.ZodString;
38
38
  }, z.core.$strip>;
39
- readonly output: z.ZodObject<{
39
+ output: z.ZodObject<{
40
40
  role: z.ZodNullable<z.ZodEnum<{
41
41
  "admin-observer": "admin-observer";
42
42
  "admin-operator": "admin-operator";
@@ -44,8 +44,8 @@ export declare const authInterModuleContract: import("@shipfox/inter-module").In
44
44
  }>>;
45
45
  }, z.core.$strip>;
46
46
  };
47
- readonly requireAdminRole: {
48
- readonly input: z.ZodObject<{
47
+ requireAdminRole: {
48
+ input: z.ZodObject<{
49
49
  userId: z.ZodString;
50
50
  minimumRole: z.ZodEnum<{
51
51
  "admin-observer": "admin-observer";
@@ -53,15 +53,15 @@ export declare const authInterModuleContract: import("@shipfox/inter-module").In
53
53
  "admin-owner": "admin-owner";
54
54
  }>;
55
55
  }, z.core.$strip>;
56
- readonly output: z.ZodObject<{
56
+ output: z.ZodObject<{
57
57
  role: z.ZodEnum<{
58
58
  "admin-observer": "admin-observer";
59
59
  "admin-operator": "admin-operator";
60
60
  "admin-owner": "admin-owner";
61
61
  }>;
62
62
  }, z.core.$strip>;
63
- readonly errors: {
64
- readonly 'admin-role-required': z.ZodObject<{
63
+ errors: {
64
+ 'admin-role-required': z.ZodObject<{
65
65
  requiredRole: z.ZodEnum<{
66
66
  "admin-observer": "admin-observer";
67
67
  "admin-operator": "admin-operator";
@@ -1 +1 @@
1
- {"version":3,"file":"inter-module.d.ts","sourceRoot":"","sources":["../src/inter-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAYtB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BlC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
1
+ {"version":3,"file":"inter-module.d.ts","sourceRoot":"","sources":["../src/inter-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAYtB,eAAO,MAAM,uBAAuB;;;QAGhC,sBAAsB;YACpB,KAAK;;;;;;;YACL,MAAM;;;;QAER,iBAAiB;YACf,KAAK;;;;;;;;;;;;YACL,MAAM;;;;QAER,mBAAmB;YACjB,KAAK;;;YACL,MAAM;;;;;;;;QAER,gBAAgB;YACd,KAAK;;;;;;;;YAIL,MAAM;;;;;;;YACN,MAAM;gBACJ,qBAAqB;;;;;;;;;;EAI3B,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -89,8 +89,8 @@ export declare const administratorUserIdentitySchema: z.ZodObject<{
89
89
  name: z.ZodNullable<z.ZodString>;
90
90
  status: z.ZodEnum<{
91
91
  active: "active";
92
- suspended: "suspended";
93
92
  deleted: "deleted";
93
+ suspended: "suspended";
94
94
  }>;
95
95
  }, z.core.$strip>;
96
96
  export type AdministratorUserIdentityDto = z.infer<typeof administratorUserIdentitySchema>;
@@ -100,8 +100,8 @@ export declare const administratorUserSummarySchema: z.ZodObject<{
100
100
  name: z.ZodNullable<z.ZodString>;
101
101
  status: z.ZodEnum<{
102
102
  active: "active";
103
- suspended: "suspended";
104
103
  deleted: "deleted";
104
+ suspended: "suspended";
105
105
  }>;
106
106
  email_verified_at: z.ZodNullable<z.ZodString>;
107
107
  created_at: z.ZodString;
@@ -130,8 +130,8 @@ export declare const administratorUserMutationResponseSchema: z.ZodObject<{
130
130
  name: z.ZodNullable<z.ZodString>;
131
131
  status: z.ZodEnum<{
132
132
  active: "active";
133
- suspended: "suspended";
134
133
  deleted: "deleted";
134
+ suspended: "suspended";
135
135
  }>;
136
136
  email_verified_at: z.ZodNullable<z.ZodString>;
137
137
  created_at: z.ZodString;
@@ -149,8 +149,8 @@ export declare const revokeAdministratorUserSessionsResponseSchema: z.ZodObject<
149
149
  name: z.ZodNullable<z.ZodString>;
150
150
  status: z.ZodEnum<{
151
151
  active: "active";
152
- suspended: "suspended";
153
152
  deleted: "deleted";
153
+ suspended: "suspended";
154
154
  }>;
155
155
  email_verified_at: z.ZodNullable<z.ZodString>;
156
156
  created_at: z.ZodString;
@@ -184,8 +184,8 @@ export declare const administratorGrantSummarySchema: z.ZodObject<{
184
184
  name: z.ZodNullable<z.ZodString>;
185
185
  status: z.ZodEnum<{
186
186
  active: "active";
187
- suspended: "suspended";
188
187
  deleted: "deleted";
188
+ suspended: "suspended";
189
189
  }>;
190
190
  }, z.core.$strip>;
191
191
  }, z.core.$strip>;
@@ -211,8 +211,8 @@ export declare const listAdminGrantsResponseSchema: z.ZodObject<{
211
211
  name: z.ZodNullable<z.ZodString>;
212
212
  status: z.ZodEnum<{
213
213
  active: "active";
214
- suspended: "suspended";
215
214
  deleted: "deleted";
215
+ suspended: "suspended";
216
216
  }>;
217
217
  }, z.core.$strip>;
218
218
  }, z.core.$strip>>;
@@ -38,8 +38,8 @@ export declare const signupResponseSchema: z.ZodObject<{
38
38
  email_verified_at: z.ZodNullable<z.ZodString>;
39
39
  status: z.ZodEnum<{
40
40
  active: "active";
41
- suspended: "suspended";
42
41
  deleted: "deleted";
42
+ suspended: "suspended";
43
43
  }>;
44
44
  created_at: z.ZodString;
45
45
  updated_at: z.ZodString;
@@ -74,8 +74,8 @@ export declare const loginResponseSchema: z.ZodObject<{
74
74
  email_verified_at: z.ZodNullable<z.ZodString>;
75
75
  status: z.ZodEnum<{
76
76
  active: "active";
77
- suspended: "suspended";
78
77
  deleted: "deleted";
78
+ suspended: "suspended";
79
79
  }>;
80
80
  created_at: z.ZodString;
81
81
  updated_at: z.ZodString;
@@ -96,8 +96,8 @@ export declare const refreshResponseSchema: z.ZodObject<{
96
96
  email_verified_at: z.ZodNullable<z.ZodString>;
97
97
  status: z.ZodEnum<{
98
98
  active: "active";
99
- suspended: "suspended";
100
99
  deleted: "deleted";
100
+ suspended: "suspended";
101
101
  }>;
102
102
  created_at: z.ZodString;
103
103
  updated_at: z.ZodString;
@@ -117,8 +117,8 @@ export declare const meResponseSchema: z.ZodObject<{
117
117
  email_verified_at: z.ZodNullable<z.ZodString>;
118
118
  status: z.ZodEnum<{
119
119
  active: "active";
120
- suspended: "suspended";
121
120
  deleted: "deleted";
121
+ suspended: "suspended";
122
122
  }>;
123
123
  created_at: z.ZodString;
124
124
  updated_at: z.ZodString;
@@ -155,8 +155,8 @@ export declare const passwordResetConfirmResponseSchema: z.ZodObject<{
155
155
  email_verified_at: z.ZodNullable<z.ZodString>;
156
156
  status: z.ZodEnum<{
157
157
  active: "active";
158
- suspended: "suspended";
159
158
  deleted: "deleted";
159
+ suspended: "suspended";
160
160
  }>;
161
161
  created_at: z.ZodString;
162
162
  updated_at: z.ZodString;
@@ -183,8 +183,8 @@ export declare const verifyEmailConfirmResponseSchema: z.ZodObject<{
183
183
  email_verified_at: z.ZodNullable<z.ZodString>;
184
184
  status: z.ZodEnum<{
185
185
  active: "active";
186
- suspended: "suspended";
187
186
  deleted: "deleted";
187
+ suspended: "suspended";
188
188
  }>;
189
189
  created_at: z.ZodString;
190
190
  updated_at: z.ZodString;
@@ -14,8 +14,8 @@ export declare const e2eCreateUserResponseSchema: z.ZodObject<{
14
14
  email_verified_at: z.ZodNullable<z.ZodString>;
15
15
  status: z.ZodEnum<{
16
16
  active: "active";
17
- suspended: "suspended";
18
17
  deleted: "deleted";
18
+ suspended: "suspended";
19
19
  }>;
20
20
  created_at: z.ZodString;
21
21
  updated_at: z.ZodString;
@@ -38,8 +38,8 @@ export declare const e2eCreateSessionResponseSchema: z.ZodObject<{
38
38
  email_verified_at: z.ZodNullable<z.ZodString>;
39
39
  status: z.ZodEnum<{
40
40
  active: "active";
41
- suspended: "suspended";
42
41
  deleted: "deleted";
42
+ suspended: "suspended";
43
43
  }>;
44
44
  created_at: z.ZodString;
45
45
  updated_at: z.ZodString;
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  /**
3
3
  * Audience claim binding a token to the job-lease use case. Distinct from auth
4
- * tokens (separate secret) this is defense-in-depth so the two token classes stay
4
+ * tokens (separate secret): this is defense-in-depth so the two token classes stay
5
5
  * non-interchangeable even if a verifier is ever misconfigured.
6
6
  */
7
7
  export declare const JOB_LEASE_TOKEN_AUDIENCE = "runner-job-lease";
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  /**
3
3
  * Audience claim binding a token to the job-lease use case. Distinct from auth
4
- * tokens (separate secret) this is defense-in-depth so the two token classes stay
4
+ * tokens (separate secret): this is defense-in-depth so the two token classes stay
5
5
  * non-interchangeable even if a verifier is ever misconfigured.
6
6
  */ export const JOB_LEASE_TOKEN_AUDIENCE = 'runner-job-lease';
7
7
  export const jobLeaseTokenClaimsSchema = z.object({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/schemas/job-lease-token.ts"],"sourcesContent":["import {z} from 'zod';\n\n/**\n * Audience claim binding a token to the job-lease use case. Distinct from auth\n * tokens (separate secret) this is defense-in-depth so the two token classes stay\n * non-interchangeable even if a verifier is ever misconfigured.\n */\nexport const JOB_LEASE_TOKEN_AUDIENCE = 'runner-job-lease';\n\nexport const jobLeaseTokenClaimsSchema = z.object({\n workflowRunId: z.string().uuid(),\n workflowRunAttempt: z.number().int().positive().optional(),\n workflowRunAttemptId: z.string().uuid(),\n jobId: z.string().uuid(),\n jobExecutionId: z.string().uuid(),\n projectId: z.string().uuid(),\n workspaceId: z.string().uuid(),\n runnerSessionId: z.string().uuid(),\n // Narrows append-log authorization to the step attempt currently dispatched to the runner.\n currentStepId: z.string().uuid().optional(),\n currentStepAttempt: z.number().int().positive().optional(),\n aud: z.literal(JOB_LEASE_TOKEN_AUDIENCE),\n iat: z.number().int(),\n exp: z.number().int(),\n});\n\nexport type JobLeaseTokenClaims = z.infer<typeof jobLeaseTokenClaimsSchema>;\n"],"names":["z","JOB_LEASE_TOKEN_AUDIENCE","jobLeaseTokenClaimsSchema","object","workflowRunId","string","uuid","workflowRunAttempt","number","int","positive","optional","workflowRunAttemptId","jobId","jobExecutionId","projectId","workspaceId","runnerSessionId","currentStepId","currentStepAttempt","aud","literal","iat","exp"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AAEtB;;;;CAIC,GACD,OAAO,MAAMC,2BAA2B,mBAAmB;AAE3D,OAAO,MAAMC,4BAA4BF,EAAEG,MAAM,CAAC;IAChDC,eAAeJ,EAAEK,MAAM,GAAGC,IAAI;IAC9BC,oBAAoBP,EAAEQ,MAAM,GAAGC,GAAG,GAAGC,QAAQ,GAAGC,QAAQ;IACxDC,sBAAsBZ,EAAEK,MAAM,GAAGC,IAAI;IACrCO,OAAOb,EAAEK,MAAM,GAAGC,IAAI;IACtBQ,gBAAgBd,EAAEK,MAAM,GAAGC,IAAI;IAC/BS,WAAWf,EAAEK,MAAM,GAAGC,IAAI;IAC1BU,aAAahB,EAAEK,MAAM,GAAGC,IAAI;IAC5BW,iBAAiBjB,EAAEK,MAAM,GAAGC,IAAI;IAChC,2FAA2F;IAC3FY,eAAelB,EAAEK,MAAM,GAAGC,IAAI,GAAGK,QAAQ;IACzCQ,oBAAoBnB,EAAEQ,MAAM,GAAGC,GAAG,GAAGC,QAAQ,GAAGC,QAAQ;IACxDS,KAAKpB,EAAEqB,OAAO,CAACpB;IACfqB,KAAKtB,EAAEQ,MAAM,GAAGC,GAAG;IACnBc,KAAKvB,EAAEQ,MAAM,GAAGC,GAAG;AACrB,GAAG"}
1
+ {"version":3,"sources":["../../src/schemas/job-lease-token.ts"],"sourcesContent":["import {z} from 'zod';\n\n/**\n * Audience claim binding a token to the job-lease use case. Distinct from auth\n * tokens (separate secret): this is defense-in-depth so the two token classes stay\n * non-interchangeable even if a verifier is ever misconfigured.\n */\nexport const JOB_LEASE_TOKEN_AUDIENCE = 'runner-job-lease';\n\nexport const jobLeaseTokenClaimsSchema = z.object({\n workflowRunId: z.string().uuid(),\n workflowRunAttempt: z.number().int().positive().optional(),\n workflowRunAttemptId: z.string().uuid(),\n jobId: z.string().uuid(),\n jobExecutionId: z.string().uuid(),\n projectId: z.string().uuid(),\n workspaceId: z.string().uuid(),\n runnerSessionId: z.string().uuid(),\n // Narrows append-log authorization to the step attempt currently dispatched to the runner.\n currentStepId: z.string().uuid().optional(),\n currentStepAttempt: z.number().int().positive().optional(),\n aud: z.literal(JOB_LEASE_TOKEN_AUDIENCE),\n iat: z.number().int(),\n exp: z.number().int(),\n});\n\nexport type JobLeaseTokenClaims = z.infer<typeof jobLeaseTokenClaimsSchema>;\n"],"names":["z","JOB_LEASE_TOKEN_AUDIENCE","jobLeaseTokenClaimsSchema","object","workflowRunId","string","uuid","workflowRunAttempt","number","int","positive","optional","workflowRunAttemptId","jobId","jobExecutionId","projectId","workspaceId","runnerSessionId","currentStepId","currentStepAttempt","aud","literal","iat","exp"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AAEtB;;;;CAIC,GACD,OAAO,MAAMC,2BAA2B,mBAAmB;AAE3D,OAAO,MAAMC,4BAA4BF,EAAEG,MAAM,CAAC;IAChDC,eAAeJ,EAAEK,MAAM,GAAGC,IAAI;IAC9BC,oBAAoBP,EAAEQ,MAAM,GAAGC,GAAG,GAAGC,QAAQ,GAAGC,QAAQ;IACxDC,sBAAsBZ,EAAEK,MAAM,GAAGC,IAAI;IACrCO,OAAOb,EAAEK,MAAM,GAAGC,IAAI;IACtBQ,gBAAgBd,EAAEK,MAAM,GAAGC,IAAI;IAC/BS,WAAWf,EAAEK,MAAM,GAAGC,IAAI;IAC1BU,aAAahB,EAAEK,MAAM,GAAGC,IAAI;IAC5BW,iBAAiBjB,EAAEK,MAAM,GAAGC,IAAI;IAChC,2FAA2F;IAC3FY,eAAelB,EAAEK,MAAM,GAAGC,IAAI,GAAGK,QAAQ;IACzCQ,oBAAoBnB,EAAEQ,MAAM,GAAGC,GAAG,GAAGC,QAAQ,GAAGC,QAAQ;IACxDS,KAAKpB,EAAEqB,OAAO,CAACpB;IACfqB,KAAKtB,EAAEQ,MAAM,GAAGC,GAAG;IACnBc,KAAKvB,EAAEQ,MAAM,GAAGC,GAAG;AACrB,GAAG"}
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  export declare const userStatusSchema: z.ZodEnum<{
3
3
  active: "active";
4
- suspended: "suspended";
5
4
  deleted: "deleted";
5
+ suspended: "suspended";
6
6
  }>;
7
7
  export declare const userDtoSchema: z.ZodObject<{
8
8
  id: z.ZodString;
@@ -11,8 +11,8 @@ export declare const userDtoSchema: z.ZodObject<{
11
11
  email_verified_at: z.ZodNullable<z.ZodString>;
12
12
  status: z.ZodEnum<{
13
13
  active: "active";
14
- suspended: "suspended";
15
14
  deleted: "deleted";
15
+ suspended: "suspended";
16
16
  }>;
17
17
  created_at: z.ZodString;
18
18
  updated_at: z.ZodString;