@krak-stack/auth 0.2.30 → 0.2.32
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/CHANGELOG.md +17 -0
- package/README.md +79 -1
- package/dist/admin/api.group.d.ts +94 -0
- package/dist/admin/api.group.js +3 -3
- package/dist/admin/schema.d.ts +215 -0
- package/dist/admin/schema.js +39 -1
- package/dist/api.d.ts +1531 -1377
- package/dist/auth/api.group.d.ts +19 -1
- package/dist/auth/api.group.js +17 -1
- package/dist/auth/schema.d.ts +12 -0
- package/dist/auth/schema.js +12 -0
- package/dist/components/account-deletion-request.d.ts +5 -0
- package/dist/components/account-deletion-request.js +7 -0
- package/dist/components/account-deletion.d.ts +8 -0
- package/dist/components/account-deletion.js +59 -0
- package/dist/components/admin-organizations.js +13 -3
- package/dist/components/admin-users.js +18 -1
- package/dist/components/associated-projects-notice.js +1 -1
- package/dist/components/auth-client-api.d.ts +127 -0
- package/dist/components/deletion-visibility.d.ts +1 -0
- package/dist/components/deletion-visibility.js +3 -0
- package/dist/components/organization-deletion-request.d.ts +17 -0
- package/dist/components/organization-deletion-request.js +9 -0
- package/dist/components/organization-switcher.js +31 -2
- package/dist/components/user-button.d.ts +29 -1
- package/dist/components/user-button.js +39 -2
- package/dist/extra/api.group.d.ts +13 -1
- package/dist/extra/api.group.js +5 -1
- package/dist/extra/schema.d.ts +13 -0
- package/dist/extra/schema.js +13 -0
- package/dist/schema.d.ts +35 -0
- package/dist/schema.js +25 -0
- package/dist/server/index.d.ts +2 -1
- package/dist/server/index.js +1 -0
- package/dist/server/middleware.d.ts +10 -2
- package/dist/server/middleware.js +4 -1
- package/dist/server/webhook-layer.d.ts +6 -0
- package/dist/server/webhook-layer.js +37 -0
- package/dist/server/webhooks.d.ts +38 -0
- package/dist/server/webhooks.js +39 -0
- package/dist/service.d.ts +66 -0
- package/package.json +7 -3
package/dist/service.d.ts
CHANGED
|
@@ -373,6 +373,14 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
|
|
|
373
373
|
readonly updatedAt: import("effect/Schema").DateFromString;
|
|
374
374
|
}>;
|
|
375
375
|
}>>, import("effect/Schema").toCodecJson<typeof import("./auth/schema.js").AuthBadRequest | typeof import("./auth/schema.js").AuthUnauthorized | typeof import("./auth/schema.js").AuthForbidden | typeof import("./auth/schema.js").AuthNotFound | typeof import("./auth/schema.js").AuthConflict | typeof import("./auth/schema.js").AuthExpectationFailed | typeof import("./auth/schema.js").AuthTooManyRequests | typeof import("./auth/schema.js").AuthInternalServerError>, never, never>, never, never>;
|
|
376
|
+
readonly deleteUser: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"deleteUser", "POST", "/api/auth/delete-user", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
377
|
+
readonly password: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
378
|
+
readonly token: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
379
|
+
readonly callbackURL: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
380
|
+
}>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
381
|
+
readonly success: import("effect/Schema").Boolean;
|
|
382
|
+
readonly message: import("effect/Schema").String;
|
|
383
|
+
}>>, import("effect/Schema").toCodecJson<typeof import("./auth/schema.js").AuthBadRequest | typeof import("./auth/schema.js").AuthUnauthorized | typeof import("./auth/schema.js").AuthForbidden | typeof import("./auth/schema.js").AuthNotFound | typeof import("./auth/schema.js").AuthInternalServerError>, never, never>, never, never>;
|
|
376
384
|
readonly getSession: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getSession", "GET", "/api/auth/get-session", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
377
385
|
readonly disableCookieCache: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
378
386
|
readonly disableRefresh: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
@@ -591,6 +599,18 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
|
|
|
591
599
|
readonly parentId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
592
600
|
readonly createdAt: import("effect/Schema").DateFromString;
|
|
593
601
|
}>>, import("effect/Schema").toCodecJson<typeof import("./auth/schema.js").AuthBadRequest | typeof import("./auth/schema.js").AuthUnauthorized | typeof import("./auth/schema.js").AuthForbidden | typeof import("./auth/schema.js").AuthNotFound | typeof import("./auth/schema.js").AuthConflict | typeof import("./auth/schema.js").AuthExpectationFailed | typeof import("./auth/schema.js").AuthTooManyRequests | typeof import("./auth/schema.js").AuthInternalServerError>, never, never>, never, never>;
|
|
602
|
+
readonly organizationDelete: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"organizationDelete", "POST", "/api/auth/organization/delete", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
603
|
+
readonly organizationId: import("effect/Schema").NonEmptyString;
|
|
604
|
+
}>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
605
|
+
readonly id: import("effect/Schema").String;
|
|
606
|
+
readonly name: import("effect/Schema").String;
|
|
607
|
+
readonly slug: import("effect/Schema").String;
|
|
608
|
+
readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
609
|
+
readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Union<readonly [import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>, import("effect/Schema").String]>>>;
|
|
610
|
+
readonly userId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
611
|
+
readonly parentId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
612
|
+
readonly createdAt: import("effect/Schema").DateFromString;
|
|
613
|
+
}>>, import("effect/Schema").toCodecJson<typeof import("./auth/schema.js").AuthBadRequest | typeof import("./auth/schema.js").AuthUnauthorized | typeof import("./auth/schema.js").AuthForbidden | typeof import("./auth/schema.js").AuthNotFound | typeof import("./auth/schema.js").AuthConflict | typeof import("./auth/schema.js").AuthExpectationFailed | typeof import("./auth/schema.js").AuthTooManyRequests | typeof import("./auth/schema.js").AuthInternalServerError>, never, never>, never, never>;
|
|
594
614
|
readonly organizationGetFull: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"organizationGetFull", "GET", "/api/auth/organization/get-full-organization", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
595
615
|
readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
596
616
|
readonly organizationSlug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
@@ -1460,6 +1480,19 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
|
|
|
1460
1480
|
readonly id: import("effect/Schema").String;
|
|
1461
1481
|
readonly key: import("effect/Schema").String;
|
|
1462
1482
|
}>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError | typeof import("./extra/schema.js").ExtraBadRequest>, never, never>, never, never>;
|
|
1483
|
+
readonly getAccountDeletionPlan: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getAccountDeletionPlan", "GET", "/api/auth/account-deletion", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
1484
|
+
readonly projects: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
1485
|
+
readonly id: import("effect/Schema").String;
|
|
1486
|
+
readonly name: import("effect/Schema").String;
|
|
1487
|
+
readonly ready: import("effect/Schema").Boolean;
|
|
1488
|
+
}>>;
|
|
1489
|
+
readonly organizations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
1490
|
+
readonly id: import("effect/Schema").String;
|
|
1491
|
+
readonly name: import("effect/Schema").String;
|
|
1492
|
+
readonly personal: import("effect/Schema").Boolean;
|
|
1493
|
+
}>>;
|
|
1494
|
+
readonly adminAccount: import("effect/Schema").Boolean;
|
|
1495
|
+
}>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never>, never, never>;
|
|
1463
1496
|
readonly getOrganizationPublicProfile: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getOrganizationPublicProfile", "GET", "/api/auth/organization-profile", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
1464
1497
|
readonly organizationId: import("effect/Schema").String;
|
|
1465
1498
|
readonly locale: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>>;
|
|
@@ -2422,6 +2455,14 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
|
|
|
2422
2455
|
readonly updatedAt: import("effect/Schema").DateFromString;
|
|
2423
2456
|
}>;
|
|
2424
2457
|
}>>, import("effect/Schema").toCodecJson<typeof import("./auth/schema.js").AuthBadRequest | typeof import("./auth/schema.js").AuthUnauthorized | typeof import("./auth/schema.js").AuthForbidden | typeof import("./auth/schema.js").AuthNotFound | typeof import("./auth/schema.js").AuthConflict | typeof import("./auth/schema.js").AuthExpectationFailed | typeof import("./auth/schema.js").AuthTooManyRequests | typeof import("./auth/schema.js").AuthInternalServerError>, never, never>, never, never>;
|
|
2458
|
+
readonly deleteUser: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"deleteUser", "POST", "/api/auth/delete-user", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
2459
|
+
readonly password: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
2460
|
+
readonly token: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
2461
|
+
readonly callbackURL: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
2462
|
+
}>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
2463
|
+
readonly success: import("effect/Schema").Boolean;
|
|
2464
|
+
readonly message: import("effect/Schema").String;
|
|
2465
|
+
}>>, import("effect/Schema").toCodecJson<typeof import("./auth/schema.js").AuthBadRequest | typeof import("./auth/schema.js").AuthUnauthorized | typeof import("./auth/schema.js").AuthForbidden | typeof import("./auth/schema.js").AuthNotFound | typeof import("./auth/schema.js").AuthInternalServerError>, never, never>, never, never>;
|
|
2425
2466
|
readonly getSession: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getSession", "GET", "/api/auth/get-session", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
2426
2467
|
readonly disableCookieCache: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
2427
2468
|
readonly disableRefresh: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
@@ -2640,6 +2681,18 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
|
|
|
2640
2681
|
readonly parentId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
2641
2682
|
readonly createdAt: import("effect/Schema").DateFromString;
|
|
2642
2683
|
}>>, import("effect/Schema").toCodecJson<typeof import("./auth/schema.js").AuthBadRequest | typeof import("./auth/schema.js").AuthUnauthorized | typeof import("./auth/schema.js").AuthForbidden | typeof import("./auth/schema.js").AuthNotFound | typeof import("./auth/schema.js").AuthConflict | typeof import("./auth/schema.js").AuthExpectationFailed | typeof import("./auth/schema.js").AuthTooManyRequests | typeof import("./auth/schema.js").AuthInternalServerError>, never, never>, never, never>;
|
|
2684
|
+
readonly organizationDelete: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"organizationDelete", "POST", "/api/auth/organization/delete", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
2685
|
+
readonly organizationId: import("effect/Schema").NonEmptyString;
|
|
2686
|
+
}>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
2687
|
+
readonly id: import("effect/Schema").String;
|
|
2688
|
+
readonly name: import("effect/Schema").String;
|
|
2689
|
+
readonly slug: import("effect/Schema").String;
|
|
2690
|
+
readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
2691
|
+
readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Union<readonly [import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>, import("effect/Schema").String]>>>;
|
|
2692
|
+
readonly userId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
2693
|
+
readonly parentId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
2694
|
+
readonly createdAt: import("effect/Schema").DateFromString;
|
|
2695
|
+
}>>, import("effect/Schema").toCodecJson<typeof import("./auth/schema.js").AuthBadRequest | typeof import("./auth/schema.js").AuthUnauthorized | typeof import("./auth/schema.js").AuthForbidden | typeof import("./auth/schema.js").AuthNotFound | typeof import("./auth/schema.js").AuthConflict | typeof import("./auth/schema.js").AuthExpectationFailed | typeof import("./auth/schema.js").AuthTooManyRequests | typeof import("./auth/schema.js").AuthInternalServerError>, never, never>, never, never>;
|
|
2643
2696
|
readonly organizationGetFull: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"organizationGetFull", "GET", "/api/auth/organization/get-full-organization", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
2644
2697
|
readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
2645
2698
|
readonly organizationSlug: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
@@ -3509,6 +3562,19 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
|
|
|
3509
3562
|
readonly id: import("effect/Schema").String;
|
|
3510
3563
|
readonly key: import("effect/Schema").String;
|
|
3511
3564
|
}>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError | typeof import("./extra/schema.js").ExtraBadRequest>, never, never>, never, never>;
|
|
3565
|
+
readonly getAccountDeletionPlan: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getAccountDeletionPlan", "GET", "/api/auth/account-deletion", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
3566
|
+
readonly projects: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
3567
|
+
readonly id: import("effect/Schema").String;
|
|
3568
|
+
readonly name: import("effect/Schema").String;
|
|
3569
|
+
readonly ready: import("effect/Schema").Boolean;
|
|
3570
|
+
}>>;
|
|
3571
|
+
readonly organizations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
3572
|
+
readonly id: import("effect/Schema").String;
|
|
3573
|
+
readonly name: import("effect/Schema").String;
|
|
3574
|
+
readonly personal: import("effect/Schema").Boolean;
|
|
3575
|
+
}>>;
|
|
3576
|
+
readonly adminAccount: import("effect/Schema").Boolean;
|
|
3577
|
+
}>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never>, never, never>;
|
|
3512
3578
|
readonly getOrganizationPublicProfile: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"getOrganizationPublicProfile", "GET", "/api/auth/organization-profile", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
3513
3579
|
readonly organizationId: import("effect/Schema").String;
|
|
3514
3580
|
readonly locale: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krak-stack/auth",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.32",
|
|
4
4
|
"description": "Effect HttpApi clients and schemas for KrakStack Auth.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
"type": "module",
|
|
12
12
|
"sideEffects": false,
|
|
13
13
|
"exports": {
|
|
14
|
+
"./server/webhooks": {
|
|
15
|
+
"types": "./dist/server/webhooks.d.ts",
|
|
16
|
+
"default": "./dist/server/webhooks.js"
|
|
17
|
+
},
|
|
14
18
|
".": {
|
|
15
19
|
"types": "./dist/index.d.ts",
|
|
16
20
|
"default": "./dist/index.js"
|
|
@@ -76,10 +80,10 @@
|
|
|
76
80
|
"react-qr-code": "^2.2.0"
|
|
77
81
|
},
|
|
78
82
|
"devDependencies": {
|
|
79
|
-
"@krak-stack/registry": "0.1.
|
|
83
|
+
"@krak-stack/registry": "0.1.61"
|
|
80
84
|
},
|
|
81
85
|
"peerDependencies": {
|
|
82
|
-
"@krak-stack/registry": "^0.1.
|
|
86
|
+
"@krak-stack/registry": "^0.1.61",
|
|
83
87
|
"@tanstack/react-router": "^1.170.15",
|
|
84
88
|
"effect": "^4.1.0",
|
|
85
89
|
"input-otp": "^1.5.0",
|