@krak-stack/auth 0.1.54 → 0.1.56

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/api.d.ts CHANGED
@@ -66,12 +66,55 @@ export declare const AuthServiceApi: HttpApi.HttpApi<"AuthServiceApi", import("e
66
66
  readonly key: import("effect/Schema").String;
67
67
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("./extra/schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getOrganizationPublicProfile", "GET", "/api/auth/organization-profile", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
68
68
  readonly organizationId: import("effect/Schema").String;
69
+ readonly locale: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>>;
69
70
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
70
71
  readonly id: import("effect/Schema").String;
71
72
  readonly name: import("effect/Schema").String;
72
73
  readonly slug: import("effect/Schema").String;
73
74
  readonly displayName: import("effect/Schema").String;
74
75
  readonly contactEmail: import("effect/Schema").NullOr<import("effect/Schema").String>;
76
+ readonly emails: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
77
+ readonly email: import("effect/Schema").NonEmptyString;
78
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
79
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
80
+ readonly label: import("effect/Schema").NonEmptyString;
81
+ }>>;
82
+ }>>>;
83
+ readonly phones: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
84
+ readonly number: import("effect/Schema").NonEmptyString;
85
+ readonly extension: import("effect/Schema").optional<import("effect/Schema").String>;
86
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
87
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
88
+ readonly label: import("effect/Schema").NonEmptyString;
89
+ }>>;
90
+ }>>>;
91
+ readonly websites: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
92
+ readonly url: import("effect/Schema").NonEmptyString;
93
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
94
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
95
+ readonly label: import("effect/Schema").NonEmptyString;
96
+ }>>;
97
+ }>>>;
98
+ readonly socials: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
99
+ readonly platform: import("effect/Schema").Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
100
+ readonly url: import("effect/Schema").NonEmptyString;
101
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
102
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
103
+ readonly label: import("effect/Schema").NonEmptyString;
104
+ }>>;
105
+ }>>>;
106
+ readonly addresses: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
107
+ readonly streetAddress: import("effect/Schema").optional<import("effect/Schema").String>;
108
+ readonly locality: import("effect/Schema").optional<import("effect/Schema").String>;
109
+ readonly region: import("effect/Schema").optional<import("effect/Schema").String>;
110
+ readonly postalCode: import("effect/Schema").optional<import("effect/Schema").String>;
111
+ readonly country: import("effect/Schema").optional<import("effect/Schema").String>;
112
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
113
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
114
+ readonly label: import("effect/Schema").NonEmptyString;
115
+ }>>;
116
+ readonly formatted: import("effect/Schema").String;
117
+ }>>>;
75
118
  readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
76
119
  readonly icon: import("effect/Schema").NullOr<import("effect/Schema").String>;
77
120
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getProjectPublicConfig", "GET", "/api/auth/project-config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
@@ -237,7 +280,7 @@ export declare const AuthServiceApi: HttpApi.HttpApi<"AuthServiceApi", import("e
237
280
  readonly name: import("effect/Schema").String;
238
281
  readonly slug: import("effect/Schema").String;
239
282
  readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
240
- readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
283
+ readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").decodeTo<import("effect/Schema").Struct<{
241
284
  readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
242
285
  readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
243
286
  readonly name: import("effect/Schema").String;
@@ -246,7 +289,48 @@ export declare const AuthServiceApi: HttpApi.HttpApi<"AuthServiceApi", import("e
246
289
  readonly contactEmail: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
247
290
  readonly location: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
248
291
  }>>;
249
- }>>;
292
+ readonly emails: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
293
+ readonly email: import("effect/Schema").NonEmptyString;
294
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
295
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
296
+ readonly label: import("effect/Schema").NonEmptyString;
297
+ }>>;
298
+ }>>>;
299
+ readonly phones: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
300
+ readonly number: import("effect/Schema").NonEmptyString;
301
+ readonly extension: import("effect/Schema").optional<import("effect/Schema").String>;
302
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
303
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
304
+ readonly label: import("effect/Schema").NonEmptyString;
305
+ }>>;
306
+ }>>>;
307
+ readonly websites: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
308
+ readonly url: import("effect/Schema").NonEmptyString;
309
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
310
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
311
+ readonly label: import("effect/Schema").NonEmptyString;
312
+ }>>;
313
+ }>>>;
314
+ readonly socials: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
315
+ readonly platform: import("effect/Schema").Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
316
+ readonly url: import("effect/Schema").NonEmptyString;
317
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
318
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
319
+ readonly label: import("effect/Schema").NonEmptyString;
320
+ }>>;
321
+ }>>>;
322
+ readonly addresses: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
323
+ readonly streetAddress: import("effect/Schema").optional<import("effect/Schema").String>;
324
+ readonly locality: import("effect/Schema").optional<import("effect/Schema").String>;
325
+ readonly region: import("effect/Schema").optional<import("effect/Schema").String>;
326
+ readonly postalCode: import("effect/Schema").optional<import("effect/Schema").String>;
327
+ readonly country: import("effect/Schema").optional<import("effect/Schema").String>;
328
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
329
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
330
+ readonly label: import("effect/Schema").NonEmptyString;
331
+ }>>;
332
+ }>>>;
333
+ }>, import("effect/Schema").Unknown, never, never>>;
250
334
  readonly parentId: import("effect/Schema").NullOr<import("effect/Schema").String>;
251
335
  readonly createdAt: import("effect/Schema").Date;
252
336
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getOrganizationChildren", "GET", "/api/organizations/:organizationId/children", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
@@ -256,7 +340,7 @@ export declare const AuthServiceApi: HttpApi.HttpApi<"AuthServiceApi", import("e
256
340
  readonly name: import("effect/Schema").String;
257
341
  readonly slug: import("effect/Schema").String;
258
342
  readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
259
- readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
343
+ readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").decodeTo<import("effect/Schema").Struct<{
260
344
  readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
261
345
  readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
262
346
  readonly name: import("effect/Schema").String;
@@ -265,7 +349,48 @@ export declare const AuthServiceApi: HttpApi.HttpApi<"AuthServiceApi", import("e
265
349
  readonly contactEmail: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
266
350
  readonly location: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
267
351
  }>>;
268
- }>>;
352
+ readonly emails: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
353
+ readonly email: import("effect/Schema").NonEmptyString;
354
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
355
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
356
+ readonly label: import("effect/Schema").NonEmptyString;
357
+ }>>;
358
+ }>>>;
359
+ readonly phones: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
360
+ readonly number: import("effect/Schema").NonEmptyString;
361
+ readonly extension: import("effect/Schema").optional<import("effect/Schema").String>;
362
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
363
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
364
+ readonly label: import("effect/Schema").NonEmptyString;
365
+ }>>;
366
+ }>>>;
367
+ readonly websites: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
368
+ readonly url: import("effect/Schema").NonEmptyString;
369
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
370
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
371
+ readonly label: import("effect/Schema").NonEmptyString;
372
+ }>>;
373
+ }>>>;
374
+ readonly socials: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
375
+ readonly platform: import("effect/Schema").Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
376
+ readonly url: import("effect/Schema").NonEmptyString;
377
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
378
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
379
+ readonly label: import("effect/Schema").NonEmptyString;
380
+ }>>;
381
+ }>>>;
382
+ readonly addresses: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
383
+ readonly streetAddress: import("effect/Schema").optional<import("effect/Schema").String>;
384
+ readonly locality: import("effect/Schema").optional<import("effect/Schema").String>;
385
+ readonly region: import("effect/Schema").optional<import("effect/Schema").String>;
386
+ readonly postalCode: import("effect/Schema").optional<import("effect/Schema").String>;
387
+ readonly country: import("effect/Schema").optional<import("effect/Schema").String>;
388
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
389
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
390
+ readonly label: import("effect/Schema").NonEmptyString;
391
+ }>>;
392
+ }>>>;
393
+ }>, import("effect/Schema").Unknown, never, never>>;
269
394
  readonly parentId: import("effect/Schema").NullOr<import("effect/Schema").String>;
270
395
  readonly createdAt: import("effect/Schema").Date;
271
396
  }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listOrganizationMembers", "GET", "/api/organizations/:organizationId/members", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
@@ -297,7 +422,7 @@ export declare const AuthServiceApi: HttpApi.HttpApi<"AuthServiceApi", import("e
297
422
  readonly name: import("effect/Schema").String;
298
423
  readonly slug: import("effect/Schema").String;
299
424
  readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
300
- readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
425
+ readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").decodeTo<import("effect/Schema").Struct<{
301
426
  readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
302
427
  readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
303
428
  readonly name: import("effect/Schema").String;
@@ -306,7 +431,48 @@ export declare const AuthServiceApi: HttpApi.HttpApi<"AuthServiceApi", import("e
306
431
  readonly contactEmail: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
307
432
  readonly location: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
308
433
  }>>;
309
- }>>;
434
+ readonly emails: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
435
+ readonly email: import("effect/Schema").NonEmptyString;
436
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
437
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
438
+ readonly label: import("effect/Schema").NonEmptyString;
439
+ }>>;
440
+ }>>>;
441
+ readonly phones: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
442
+ readonly number: import("effect/Schema").NonEmptyString;
443
+ readonly extension: import("effect/Schema").optional<import("effect/Schema").String>;
444
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
445
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
446
+ readonly label: import("effect/Schema").NonEmptyString;
447
+ }>>;
448
+ }>>>;
449
+ readonly websites: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
450
+ readonly url: import("effect/Schema").NonEmptyString;
451
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
452
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
453
+ readonly label: import("effect/Schema").NonEmptyString;
454
+ }>>;
455
+ }>>>;
456
+ readonly socials: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
457
+ readonly platform: import("effect/Schema").Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
458
+ readonly url: import("effect/Schema").NonEmptyString;
459
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
460
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
461
+ readonly label: import("effect/Schema").NonEmptyString;
462
+ }>>;
463
+ }>>>;
464
+ readonly addresses: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
465
+ readonly streetAddress: import("effect/Schema").optional<import("effect/Schema").String>;
466
+ readonly locality: import("effect/Schema").optional<import("effect/Schema").String>;
467
+ readonly region: import("effect/Schema").optional<import("effect/Schema").String>;
468
+ readonly postalCode: import("effect/Schema").optional<import("effect/Schema").String>;
469
+ readonly country: import("effect/Schema").optional<import("effect/Schema").String>;
470
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
471
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
472
+ readonly label: import("effect/Schema").NonEmptyString;
473
+ }>>;
474
+ }>>>;
475
+ }>, import("effect/Schema").Unknown, never, never>>;
310
476
  readonly parentId: import("effect/Schema").NullOr<import("effect/Schema").String>;
311
477
  readonly createdAt: import("effect/Schema").Date;
312
478
  }>>;
@@ -788,12 +954,55 @@ export declare const AuthClientApi: HttpApi.HttpApi<"AuthClientApi", import("eff
788
954
  readonly key: import("effect/Schema").String;
789
955
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("./extra/schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getOrganizationPublicProfile", "GET", "/api/auth/organization-profile", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
790
956
  readonly organizationId: import("effect/Schema").String;
957
+ readonly locale: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>>;
791
958
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
792
959
  readonly id: import("effect/Schema").String;
793
960
  readonly name: import("effect/Schema").String;
794
961
  readonly slug: import("effect/Schema").String;
795
962
  readonly displayName: import("effect/Schema").String;
796
963
  readonly contactEmail: import("effect/Schema").NullOr<import("effect/Schema").String>;
964
+ readonly emails: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
965
+ readonly email: import("effect/Schema").NonEmptyString;
966
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
967
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
968
+ readonly label: import("effect/Schema").NonEmptyString;
969
+ }>>;
970
+ }>>>;
971
+ readonly phones: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
972
+ readonly number: import("effect/Schema").NonEmptyString;
973
+ readonly extension: import("effect/Schema").optional<import("effect/Schema").String>;
974
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
975
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
976
+ readonly label: import("effect/Schema").NonEmptyString;
977
+ }>>;
978
+ }>>>;
979
+ readonly websites: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
980
+ readonly url: import("effect/Schema").NonEmptyString;
981
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
982
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
983
+ readonly label: import("effect/Schema").NonEmptyString;
984
+ }>>;
985
+ }>>>;
986
+ readonly socials: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
987
+ readonly platform: import("effect/Schema").Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
988
+ readonly url: import("effect/Schema").NonEmptyString;
989
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
990
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
991
+ readonly label: import("effect/Schema").NonEmptyString;
992
+ }>>;
993
+ }>>>;
994
+ readonly addresses: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
995
+ readonly streetAddress: import("effect/Schema").optional<import("effect/Schema").String>;
996
+ readonly locality: import("effect/Schema").optional<import("effect/Schema").String>;
997
+ readonly region: import("effect/Schema").optional<import("effect/Schema").String>;
998
+ readonly postalCode: import("effect/Schema").optional<import("effect/Schema").String>;
999
+ readonly country: import("effect/Schema").optional<import("effect/Schema").String>;
1000
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
1001
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
1002
+ readonly label: import("effect/Schema").NonEmptyString;
1003
+ }>>;
1004
+ readonly formatted: import("effect/Schema").String;
1005
+ }>>>;
797
1006
  readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
798
1007
  readonly icon: import("effect/Schema").NullOr<import("effect/Schema").String>;
799
1008
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getProjectPublicConfig", "GET", "/api/auth/project-config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
@@ -122,7 +122,8 @@ export function AdminOrganizationsTable({ from, reloadKey = 0, search, }) {
122
122
  onFailure: () => false,
123
123
  onSuccess: () => false,
124
124
  });
125
- return (_jsxs("div", { className: "flex flex-col gap-4", children: [error ? _jsx(ErrorMessage, { text: error }) : null, _jsx(DataTable, { columns: organizationColumns(m, locale, baseUrl), data: organizations, defaultColumnVisibility: { id: false }, features: {
125
+ return (_jsxs("div", { className: "flex flex-col gap-4", children: [error ? _jsx(ErrorMessage, { text: error }) : null, _jsx(DataTable, { columns: organizationColumns(m, locale, baseUrl), data: organizations, features: {
126
+ columnVisibility: { default: { id: false } },
126
127
  export: { baseName: "organizations" },
127
128
  gallery: false,
128
129
  pagination: { mode: "server", rowCount: total },
@@ -183,7 +183,8 @@ export function AdminUsersTable({ from, reloadKey = 0, search, }) {
183
183
  await navigate({ to: "/" });
184
184
  await router.invalidate();
185
185
  };
186
- return (_jsxs(_Fragment, { children: [error ? _jsx(ErrorMessage, { text: error }) : null, impersonateError ? _jsx(ErrorMessage, { text: impersonateError }) : null, _jsx(DataTable, { columns: userColumns(m, baseUrl), data: users, defaultColumnVisibility: { id: false }, features: {
186
+ return (_jsxs(_Fragment, { children: [error ? _jsx(ErrorMessage, { text: error }) : null, impersonateError ? _jsx(ErrorMessage, { text: impersonateError }) : null, _jsx(DataTable, { columns: userColumns(m, baseUrl), data: users, features: {
187
+ columnVisibility: { default: { id: false } },
187
188
  export: { baseName: "users" },
188
189
  gallery: false,
189
190
  pagination: { mode: "server", rowCount: total },
@@ -442,12 +442,55 @@ export declare const authClientApi: (baseUrl?: string | undefined) => AtomHttpAp
442
442
  readonly key: import("effect/Schema").String;
443
443
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("../extra/schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getOrganizationPublicProfile", "GET", "/api/auth/organization-profile", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
444
444
  readonly organizationId: import("effect/Schema").String;
445
+ readonly locale: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>>;
445
446
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
446
447
  readonly id: import("effect/Schema").String;
447
448
  readonly name: import("effect/Schema").String;
448
449
  readonly slug: import("effect/Schema").String;
449
450
  readonly displayName: import("effect/Schema").String;
450
451
  readonly contactEmail: import("effect/Schema").NullOr<import("effect/Schema").String>;
452
+ readonly emails: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
453
+ readonly email: import("effect/Schema").NonEmptyString;
454
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
455
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
456
+ readonly label: import("effect/Schema").NonEmptyString;
457
+ }>>;
458
+ }>>>;
459
+ readonly phones: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
460
+ readonly number: import("effect/Schema").NonEmptyString;
461
+ readonly extension: import("effect/Schema").optional<import("effect/Schema").String>;
462
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
463
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
464
+ readonly label: import("effect/Schema").NonEmptyString;
465
+ }>>;
466
+ }>>>;
467
+ readonly websites: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
468
+ readonly url: import("effect/Schema").NonEmptyString;
469
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
470
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
471
+ readonly label: import("effect/Schema").NonEmptyString;
472
+ }>>;
473
+ }>>>;
474
+ readonly socials: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
475
+ readonly platform: import("effect/Schema").Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
476
+ readonly url: import("effect/Schema").NonEmptyString;
477
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
478
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
479
+ readonly label: import("effect/Schema").NonEmptyString;
480
+ }>>;
481
+ }>>>;
482
+ readonly addresses: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
483
+ readonly streetAddress: import("effect/Schema").optional<import("effect/Schema").String>;
484
+ readonly locality: import("effect/Schema").optional<import("effect/Schema").String>;
485
+ readonly region: import("effect/Schema").optional<import("effect/Schema").String>;
486
+ readonly postalCode: import("effect/Schema").optional<import("effect/Schema").String>;
487
+ readonly country: import("effect/Schema").optional<import("effect/Schema").String>;
488
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
489
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
490
+ readonly label: import("effect/Schema").NonEmptyString;
491
+ }>>;
492
+ readonly formatted: import("effect/Schema").String;
493
+ }>>>;
451
494
  readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
452
495
  readonly icon: import("effect/Schema").NullOr<import("effect/Schema").String>;
453
496
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getProjectPublicConfig", "GET", "/api/auth/project-config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
@@ -53,6 +53,8 @@ const isFullOrganization = (value) => {
53
53
  if (!("displayName" in value) || typeof value.displayName !== "string") {
54
54
  return false;
55
55
  }
56
+ if ("emails" in value && !Array.isArray(value.emails))
57
+ return false;
56
58
  return true;
57
59
  };
58
60
  const interpolate = (value, params) => Object.entries(params ?? {}).reduce((current, [key, replacement]) => current.replace(`{${key}}`, replacement), value);
@@ -62,21 +64,26 @@ const labels = (locale, overrides) => ({
62
64
  });
63
65
  const invitationMatches = (invitation, organizationId) => invitation.status === "pending" &&
64
66
  invitation.organizationId === organizationId;
65
- const organizationContactEmail = (organization, fallback) => organization?.contactEmail ?? fallback ?? null;
67
+ const organizationContactEmail = (organization, fallback) => organization?.contactEmail ??
68
+ organization?.emails?.[0]?.email ??
69
+ fallback ??
70
+ null;
66
71
  const organizationDisplayName = (invitation, organization, fallback) => organization?.displayName ??
67
72
  organization?.name ??
68
73
  invitation?.organization?.name ??
69
74
  invitation?.organizationName ??
70
75
  fallback;
71
- const organizationProfileUrl = (baseUrl, organizationId) => {
76
+ const organizationProfileUrl = (baseUrl, organizationId, locale) => {
72
77
  const root = baseUrl?.trim() ||
73
78
  (typeof window === "undefined" ? "" : window.location.origin);
74
79
  const url = new URL("/api/auth/organization-profile", root);
75
80
  url.searchParams.set("organizationId", organizationId);
81
+ if (locale)
82
+ url.searchParams.set("locale", locale);
76
83
  return url;
77
84
  };
78
- const getOrganizationPublicProfile = async (baseUrl, organizationId) => {
79
- const response = await fetch(organizationProfileUrl(baseUrl, organizationId), {
85
+ const getOrganizationPublicProfile = async (baseUrl, organizationId, locale) => {
86
+ const response = await fetch(organizationProfileUrl(baseUrl, organizationId, locale), {
80
87
  credentials: "include",
81
88
  });
82
89
  if (!response.ok)
@@ -85,7 +92,7 @@ const getOrganizationPublicProfile = async (baseUrl, organizationId) => {
85
92
  return isFullOrganization(body) ? body : null;
86
93
  };
87
94
  const accessAtom = Atom.family((authClient) => Atom.family((key) => {
88
- const { baseUrl, organizationId } = JSON.parse(key);
95
+ const { baseUrl, locale, organizationId } = JSON.parse(key);
89
96
  return Atom.keepAlive(Atom.make(Effect.tryPromise({
90
97
  try: async () => {
91
98
  const activeResult = await authClient.organization.setActive({
@@ -94,7 +101,7 @@ const accessAtom = Atom.family((authClient) => Atom.family((key) => {
94
101
  if (!activeResult.error)
95
102
  return { allowed: true };
96
103
  const [organization, invitationsResult] = await Promise.all([
97
- getOrganizationPublicProfile(baseUrl, organizationId).catch(() => null),
104
+ getOrganizationPublicProfile(baseUrl, organizationId, locale).catch(() => null),
98
105
  authClient.organization.listUserInvitations({}),
99
106
  ]);
100
107
  return {
@@ -106,7 +113,13 @@ const accessAtom = Atom.family((authClient) => Atom.family((key) => {
106
113
  catch: (error) => error,
107
114
  })));
108
115
  }));
109
- const accessAtomKey = ({ authRefreshVersion, baseUrl, organizationId, userId, }) => JSON.stringify({ authRefreshVersion, baseUrl, organizationId, userId });
116
+ const accessAtomKey = ({ authRefreshVersion, baseUrl, locale, organizationId, userId, }) => JSON.stringify({
117
+ authRefreshVersion,
118
+ baseUrl,
119
+ locale,
120
+ organizationId,
121
+ userId,
122
+ });
110
123
  export function MemberRequired({ authClient: providedAuthClient, organizationId, contactEmail, children, messages, }) {
111
124
  const auth = useKrakstackAuth();
112
125
  const authClient = providedAuthClient ?? auth?.authClient;
@@ -122,6 +135,7 @@ export function MemberRequired({ authClient: providedAuthClient, organizationId,
122
135
  const currentAccessKey = accessAtomKey({
123
136
  authRefreshVersion,
124
137
  baseUrl,
138
+ locale,
125
139
  organizationId,
126
140
  userId,
127
141
  });
@@ -4,7 +4,20 @@ import type { AuthUiClient } from "./auth-client";
4
4
  declare const messages: {
5
5
  readonly en: {
6
6
  readonly api_key_rate_limit_notice: "API keys are subject to the same rate limits as your account.";
7
- readonly organization_contact_email: "Contact email";
7
+ readonly organization_contact: "Contact methods";
8
+ readonly organization_contact_add_email: "Add email";
9
+ readonly organization_contact_add_phone: "Add phone";
10
+ readonly organization_contact_add_social: "Add social profile";
11
+ readonly organization_contact_add_website: "Add website";
12
+ readonly organization_contact_email_type: "Email";
13
+ readonly organization_contact_extension: "Extension";
14
+ readonly organization_contact_label: "Label";
15
+ readonly organization_contact_phone_type: "Phone";
16
+ readonly organization_contact_platform: "Platform";
17
+ readonly organization_contact_remove: "Remove contact method";
18
+ readonly organization_contact_social_type: "Social";
19
+ readonly organization_contact_url: "URL";
20
+ readonly organization_contact_website_type: "Website";
8
21
  readonly organization_create_description: "Create a workspace for team-based access.";
9
22
  readonly organization_create_error: "Could not create the organization.";
10
23
  readonly organization_copy_id: "Copy organization ID";
@@ -38,10 +51,17 @@ declare const messages: {
38
51
  readonly organization_invite_member_description: "Send an invitation to join this organization with the selected role.";
39
52
  readonly organization_invite_member_title: "Invite a member";
40
53
  readonly organization_loading: "Loading...";
41
- readonly organization_location: "Location";
54
+ readonly organization_address: "Address";
55
+ readonly organization_address_add: "Add address";
56
+ readonly organization_address_country: "Country";
57
+ readonly organization_address_locality: "City or locality";
58
+ readonly organization_address_postal_code: "Postal code";
59
+ readonly organization_address_region: "State, province, or region";
60
+ readonly organization_address_street: "Street address";
42
61
  readonly organization_parent: "Parent organization";
43
62
  readonly organization_parent_description: "Optionally group this organization under another organization.";
44
63
  readonly organization_parent_none: "No parent organization";
64
+ readonly organization_profile: "Profile";
45
65
  readonly organization_icon: "Icon";
46
66
  readonly organization_logo: "Logo";
47
67
  readonly organization_logo_upload_error: "Could not upload the organization logo.";
@@ -64,7 +84,7 @@ declare const messages: {
64
84
  readonly organization_role_member: "Member";
65
85
  readonly organization_role_owner: "Owner";
66
86
  readonly organization_role_support: "Support";
67
- readonly organization_slug: "Organization slug";
87
+ readonly organization_slug: "Slug";
68
88
  readonly organization_slug_description: "Leave blank to generate one from the name.";
69
89
  readonly organization_switcher_empty: "You do not belong to any organizations yet.";
70
90
  readonly organization_switcher_label: "Organization";
@@ -72,8 +92,6 @@ declare const messages: {
72
92
  readonly organization_switcher_no_other_organizations: "No other organizations.";
73
93
  readonly organization_switcher_personal: "Personal";
74
94
  readonly organization_translation_description: "Localized organization details stored in metadata.";
75
- readonly organization_translation_english: "English profile";
76
- readonly organization_translation_french: "French profile";
77
95
  readonly organization_translation_name: "Name";
78
96
  readonly organization_update_error: "Could not update the organization.";
79
97
  readonly table_empty: "No results.";
@@ -95,7 +113,20 @@ declare const messages: {
95
113
  };
96
114
  readonly fr: {
97
115
  readonly api_key_rate_limit_notice: "Les clés API sont soumises aux mêmes limites de débit que votre compte.";
98
- readonly organization_contact_email: "E-mail de contact";
116
+ readonly organization_contact: "Moyens de contact";
117
+ readonly organization_contact_add_email: "Ajouter un courriel";
118
+ readonly organization_contact_add_phone: "Ajouter un téléphone";
119
+ readonly organization_contact_add_social: "Ajouter un profil social";
120
+ readonly organization_contact_add_website: "Ajouter un site Web";
121
+ readonly organization_contact_email_type: "Courriel";
122
+ readonly organization_contact_extension: "Poste";
123
+ readonly organization_contact_label: "Libellé";
124
+ readonly organization_contact_phone_type: "Téléphone";
125
+ readonly organization_contact_platform: "Plateforme";
126
+ readonly organization_contact_remove: "Supprimer le moyen de contact";
127
+ readonly organization_contact_social_type: "Réseau social";
128
+ readonly organization_contact_url: "URL";
129
+ readonly organization_contact_website_type: "Site Web";
99
130
  readonly organization_create_description: "Créez un espace de travail pour l'accès en équipe.";
100
131
  readonly organization_create_error: "Impossible de créer l'organisation.";
101
132
  readonly organization_copy_id: "Copier l'ID de l'organisation";
@@ -129,10 +160,17 @@ declare const messages: {
129
160
  readonly organization_invite_member_description: "Envoyez une invitation à rejoindre cette organisation avec le rôle sélectionné.";
130
161
  readonly organization_invite_member_title: "Inviter un membre";
131
162
  readonly organization_loading: "Chargement...";
132
- readonly organization_location: "Emplacement";
163
+ readonly organization_address: "Adresse";
164
+ readonly organization_address_add: "Ajouter une adresse";
165
+ readonly organization_address_country: "Pays";
166
+ readonly organization_address_locality: "Ville ou localité";
167
+ readonly organization_address_postal_code: "Code postal";
168
+ readonly organization_address_region: "État, province ou région";
169
+ readonly organization_address_street: "Adresse municipale";
133
170
  readonly organization_parent: "Organisation parente";
134
171
  readonly organization_parent_description: "Regroupez facultativement cette organisation sous une autre organisation.";
135
172
  readonly organization_parent_none: "Aucune organisation parente";
173
+ readonly organization_profile: "Profil";
136
174
  readonly organization_icon: "Icône";
137
175
  readonly organization_logo: "Logo";
138
176
  readonly organization_logo_upload_error: "Impossible de téléverser le logo de l'organisation.";
@@ -155,7 +193,7 @@ declare const messages: {
155
193
  readonly organization_role_member: "Membre";
156
194
  readonly organization_role_owner: "Propriétaire";
157
195
  readonly organization_role_support: "Support";
158
- readonly organization_slug: "Slug de l'organisation";
196
+ readonly organization_slug: "Slug";
159
197
  readonly organization_slug_description: "Laissez vide pour en générer un à partir du nom.";
160
198
  readonly organization_switcher_empty: "Vous n'appartenez encore à aucune organisation.";
161
199
  readonly organization_switcher_label: "Organisation";
@@ -163,8 +201,6 @@ declare const messages: {
163
201
  readonly organization_switcher_no_other_organizations: "Aucune autre organisation.";
164
202
  readonly organization_switcher_personal: "Personnel";
165
203
  readonly organization_translation_description: "Détails localisés de l'organisation stockés dans les métadonnées.";
166
- readonly organization_translation_english: "Profil anglais";
167
- readonly organization_translation_french: "Profil français";
168
204
  readonly organization_translation_name: "Nom";
169
205
  readonly organization_update_error: "Impossible de mettre à jour l'organisation.";
170
206
  readonly table_empty: "Aucun résultat.";