@blimu/client 1.1.4 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -15
- package/dist/client.cjs +6 -4
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.mts +2 -1
- package/dist/client.d.ts +2 -1
- package/dist/client.mjs +6 -4
- package/dist/client.mjs.map +1 -1
- package/dist/index.cjs +33 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +56 -3
- package/dist/index.d.ts +56 -3
- package/dist/index.mjs +33 -21
- package/dist/index.mjs.map +1 -1
- package/dist/{schema-Z0doltxY.d.mts → schema-BdyLvb9B.d.mts} +13 -7
- package/dist/{schema-Z0doltxY.d.ts → schema-BdyLvb9B.d.ts} +13 -7
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.d.mts +2 -1
- package/dist/schema.d.ts +2 -1
- package/dist/services/auth.cjs +6 -4
- package/dist/services/auth.cjs.map +1 -1
- package/dist/services/auth.d.mts +4 -3
- package/dist/services/auth.d.ts +4 -3
- package/dist/services/auth.mjs +6 -4
- package/dist/services/auth.mjs.map +1 -1
- package/dist/services/entitlements.cjs.map +1 -1
- package/dist/services/entitlements.d.mts +2 -1
- package/dist/services/entitlements.d.ts +2 -1
- package/dist/services/entitlements.mjs.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- package/dist/__tests__/example.test.cjs +0 -17135
- package/dist/__tests__/example.test.cjs.map +0 -1
- package/dist/__tests__/example.test.d.mts +0 -2
- package/dist/__tests__/example.test.d.ts +0 -2
- package/dist/__tests__/example.test.mjs +0 -17134
- package/dist/__tests__/example.test.mjs.map +0 -1
- package/dist/auth-strategies.cjs +0 -40
- package/dist/auth-strategies.cjs.map +0 -1
- package/dist/auth-strategies.d.mts +0 -9
- package/dist/auth-strategies.d.ts +0 -9
- package/dist/auth-strategies.mjs +0 -15
- package/dist/auth-strategies.mjs.map +0 -1
- package/dist/schema.zod-BaQz36Pd.d.mts +0 -44
- package/dist/schema.zod-BaQz36Pd.d.ts +0 -44
- package/dist/schema.zod.cjs +0 -67
- package/dist/schema.zod.cjs.map +0 -1
- package/dist/schema.zod.d.mts +0 -2
- package/dist/schema.zod.d.ts +0 -2
- package/dist/schema.zod.mjs +0 -39
- package/dist/schema.zod.mjs.map +0 -1
package/dist/auth-strategies.cjs
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/auth-strategies.ts
|
|
21
|
-
var auth_strategies_exports = {};
|
|
22
|
-
__export(auth_strategies_exports, {
|
|
23
|
-
buildAuthStrategies: () => buildAuthStrategies
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(auth_strategies_exports);
|
|
26
|
-
function buildAuthStrategies(cfg) {
|
|
27
|
-
const authStrategies = [...cfg?.authStrategies ?? []];
|
|
28
|
-
if (cfg.bearer) {
|
|
29
|
-
authStrategies.push({
|
|
30
|
-
type: "bearer",
|
|
31
|
-
token: cfg.bearer
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
return authStrategies;
|
|
35
|
-
}
|
|
36
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
-
0 && (module.exports = {
|
|
38
|
-
buildAuthStrategies
|
|
39
|
-
});
|
|
40
|
-
//# sourceMappingURL=auth-strategies.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/auth-strategies.ts"],"sourcesContent":["import type { AuthStrategy } from '@blimu/fetch';\nimport type { ClientOption } from './client';\n\nexport function buildAuthStrategies(cfg: ClientOption): AuthStrategy[] {\n const authStrategies: AuthStrategy[] = [...(cfg?.authStrategies ?? [])];\n\n if (cfg.bearer) {\n authStrategies.push({\n type: 'bearer',\n token: cfg.bearer,\n });\n }\n return authStrategies;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,SAAS,oBAAoB,KAAmC;AACrE,QAAM,iBAAiC,CAAC,GAAI,KAAK,kBAAkB,CAAC,CAAE;AAEtE,MAAI,IAAI,QAAQ;AACd,mBAAe,KAAK;AAAA,MAClB,MAAM;AAAA,MACN,OAAO,IAAI;AAAA,IACb,CAAC;AAAA,EACH;AACA,SAAO;AACT;","names":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AuthStrategy } from '@blimu/fetch';
|
|
2
|
-
import { ClientOption } from './client.mjs';
|
|
3
|
-
import './services/auth.mjs';
|
|
4
|
-
import './schema-Z0doltxY.mjs';
|
|
5
|
-
import './services/entitlements.mjs';
|
|
6
|
-
|
|
7
|
-
declare function buildAuthStrategies(cfg: ClientOption): AuthStrategy[];
|
|
8
|
-
|
|
9
|
-
export { buildAuthStrategies };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AuthStrategy } from '@blimu/fetch';
|
|
2
|
-
import { ClientOption } from './client.js';
|
|
3
|
-
import './services/auth.js';
|
|
4
|
-
import './schema-Z0doltxY.js';
|
|
5
|
-
import './services/entitlements.js';
|
|
6
|
-
|
|
7
|
-
declare function buildAuthStrategies(cfg: ClientOption): AuthStrategy[];
|
|
8
|
-
|
|
9
|
-
export { buildAuthStrategies };
|
package/dist/auth-strategies.mjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// src/auth-strategies.ts
|
|
2
|
-
function buildAuthStrategies(cfg) {
|
|
3
|
-
const authStrategies = [...cfg?.authStrategies ?? []];
|
|
4
|
-
if (cfg.bearer) {
|
|
5
|
-
authStrategies.push({
|
|
6
|
-
type: "bearer",
|
|
7
|
-
token: cfg.bearer
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
return authStrategies;
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
buildAuthStrategies
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=auth-strategies.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/auth-strategies.ts"],"sourcesContent":["import type { AuthStrategy } from '@blimu/fetch';\nimport type { ClientOption } from './client';\n\nexport function buildAuthStrategies(cfg: ClientOption): AuthStrategy[] {\n const authStrategies: AuthStrategy[] = [...(cfg?.authStrategies ?? [])];\n\n if (cfg.bearer) {\n authStrategies.push({\n type: 'bearer',\n token: cfg.bearer,\n });\n }\n return authStrategies;\n}\n"],"mappings":";AAGO,SAAS,oBAAoB,KAAmC;AACrE,QAAM,iBAAiC,CAAC,GAAI,KAAK,kBAAkB,CAAC,CAAE;AAEtE,MAAI,IAAI,QAAQ;AACd,mBAAe,KAAK;AAAA,MAClB,MAAM;AAAA,MACN,OAAO,IAAI;AAAA,IACb,CAAC;AAAA,EACH;AACA,SAAO;AACT;","names":[]}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
declare const EntitlementsListResultSchema: z.ZodObject<{
|
|
4
|
-
results: z.ZodArray<z.ZodObject<{
|
|
5
|
-
entitlements: z.ZodArray<z.ZodObject<{
|
|
6
|
-
allowed: z.ZodBoolean;
|
|
7
|
-
allowedByPlan: z.ZodBoolean;
|
|
8
|
-
allowedByRole: z.ZodBoolean;
|
|
9
|
-
allowedPlans: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
|
-
allowedRoles: z.ZodArray<z.ZodString>;
|
|
11
|
-
currentPlan: z.ZodOptional<z.ZodString>;
|
|
12
|
-
currentRole: z.ZodOptional<z.ZodString>;
|
|
13
|
-
entitlement: z.ZodString;
|
|
14
|
-
}, z.core.$strip>>;
|
|
15
|
-
resourceId: z.ZodString;
|
|
16
|
-
resourceType: z.ZodString;
|
|
17
|
-
}, z.core.$strip>>;
|
|
18
|
-
}, z.core.$strip>;
|
|
19
|
-
declare const RefreshResponseSchema: z.ZodObject<{
|
|
20
|
-
sessionToken: z.ZodString;
|
|
21
|
-
}, z.core.$strip>;
|
|
22
|
-
declare const SessionResponseSchema: z.ZodObject<{
|
|
23
|
-
isAuthenticated: z.ZodBoolean;
|
|
24
|
-
user: z.ZodNullable<z.ZodObject<{
|
|
25
|
-
email: z.ZodString;
|
|
26
|
-
emailVerified: z.ZodBoolean;
|
|
27
|
-
firstName: z.ZodNullable<z.ZodString>;
|
|
28
|
-
id: z.ZodString;
|
|
29
|
-
lastName: z.ZodNullable<z.ZodString>;
|
|
30
|
-
}, z.core.$strip>>;
|
|
31
|
-
}, z.core.$strip>;
|
|
32
|
-
declare const AuthRefreshQuerySchema: z.ZodObject<{
|
|
33
|
-
__lh_jwt: z.ZodOptional<z.ZodString>;
|
|
34
|
-
}, z.core.$strip>;
|
|
35
|
-
|
|
36
|
-
declare const schema_zod_AuthRefreshQuerySchema: typeof AuthRefreshQuerySchema;
|
|
37
|
-
declare const schema_zod_EntitlementsListResultSchema: typeof EntitlementsListResultSchema;
|
|
38
|
-
declare const schema_zod_RefreshResponseSchema: typeof RefreshResponseSchema;
|
|
39
|
-
declare const schema_zod_SessionResponseSchema: typeof SessionResponseSchema;
|
|
40
|
-
declare namespace schema_zod {
|
|
41
|
-
export { schema_zod_AuthRefreshQuerySchema as AuthRefreshQuerySchema, schema_zod_EntitlementsListResultSchema as EntitlementsListResultSchema, schema_zod_RefreshResponseSchema as RefreshResponseSchema, schema_zod_SessionResponseSchema as SessionResponseSchema };
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export { AuthRefreshQuerySchema as A, EntitlementsListResultSchema as E, RefreshResponseSchema as R, SessionResponseSchema as S, schema_zod as s };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
declare const EntitlementsListResultSchema: z.ZodObject<{
|
|
4
|
-
results: z.ZodArray<z.ZodObject<{
|
|
5
|
-
entitlements: z.ZodArray<z.ZodObject<{
|
|
6
|
-
allowed: z.ZodBoolean;
|
|
7
|
-
allowedByPlan: z.ZodBoolean;
|
|
8
|
-
allowedByRole: z.ZodBoolean;
|
|
9
|
-
allowedPlans: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
|
-
allowedRoles: z.ZodArray<z.ZodString>;
|
|
11
|
-
currentPlan: z.ZodOptional<z.ZodString>;
|
|
12
|
-
currentRole: z.ZodOptional<z.ZodString>;
|
|
13
|
-
entitlement: z.ZodString;
|
|
14
|
-
}, z.core.$strip>>;
|
|
15
|
-
resourceId: z.ZodString;
|
|
16
|
-
resourceType: z.ZodString;
|
|
17
|
-
}, z.core.$strip>>;
|
|
18
|
-
}, z.core.$strip>;
|
|
19
|
-
declare const RefreshResponseSchema: z.ZodObject<{
|
|
20
|
-
sessionToken: z.ZodString;
|
|
21
|
-
}, z.core.$strip>;
|
|
22
|
-
declare const SessionResponseSchema: z.ZodObject<{
|
|
23
|
-
isAuthenticated: z.ZodBoolean;
|
|
24
|
-
user: z.ZodNullable<z.ZodObject<{
|
|
25
|
-
email: z.ZodString;
|
|
26
|
-
emailVerified: z.ZodBoolean;
|
|
27
|
-
firstName: z.ZodNullable<z.ZodString>;
|
|
28
|
-
id: z.ZodString;
|
|
29
|
-
lastName: z.ZodNullable<z.ZodString>;
|
|
30
|
-
}, z.core.$strip>>;
|
|
31
|
-
}, z.core.$strip>;
|
|
32
|
-
declare const AuthRefreshQuerySchema: z.ZodObject<{
|
|
33
|
-
__lh_jwt: z.ZodOptional<z.ZodString>;
|
|
34
|
-
}, z.core.$strip>;
|
|
35
|
-
|
|
36
|
-
declare const schema_zod_AuthRefreshQuerySchema: typeof AuthRefreshQuerySchema;
|
|
37
|
-
declare const schema_zod_EntitlementsListResultSchema: typeof EntitlementsListResultSchema;
|
|
38
|
-
declare const schema_zod_RefreshResponseSchema: typeof RefreshResponseSchema;
|
|
39
|
-
declare const schema_zod_SessionResponseSchema: typeof SessionResponseSchema;
|
|
40
|
-
declare namespace schema_zod {
|
|
41
|
-
export { schema_zod_AuthRefreshQuerySchema as AuthRefreshQuerySchema, schema_zod_EntitlementsListResultSchema as EntitlementsListResultSchema, schema_zod_RefreshResponseSchema as RefreshResponseSchema, schema_zod_SessionResponseSchema as SessionResponseSchema };
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export { AuthRefreshQuerySchema as A, EntitlementsListResultSchema as E, RefreshResponseSchema as R, SessionResponseSchema as S, schema_zod as s };
|
package/dist/schema.zod.cjs
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/schema.zod.ts
|
|
21
|
-
var schema_zod_exports = {};
|
|
22
|
-
__export(schema_zod_exports, {
|
|
23
|
-
AuthRefreshQuerySchema: () => AuthRefreshQuerySchema,
|
|
24
|
-
EntitlementsListResultSchema: () => EntitlementsListResultSchema,
|
|
25
|
-
RefreshResponseSchema: () => RefreshResponseSchema,
|
|
26
|
-
SessionResponseSchema: () => SessionResponseSchema
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(schema_zod_exports);
|
|
29
|
-
var import_zod = require("zod");
|
|
30
|
-
var EntitlementsListResultSchema = import_zod.z.object({
|
|
31
|
-
results: import_zod.z.object({
|
|
32
|
-
entitlements: import_zod.z.object({
|
|
33
|
-
allowed: import_zod.z.boolean(),
|
|
34
|
-
allowedByPlan: import_zod.z.boolean(),
|
|
35
|
-
allowedByRole: import_zod.z.boolean(),
|
|
36
|
-
allowedPlans: import_zod.z.string().array().optional(),
|
|
37
|
-
allowedRoles: import_zod.z.string().array(),
|
|
38
|
-
currentPlan: import_zod.z.string().optional(),
|
|
39
|
-
currentRole: import_zod.z.string().optional(),
|
|
40
|
-
entitlement: import_zod.z.string()
|
|
41
|
-
}).array(),
|
|
42
|
-
resourceId: import_zod.z.string(),
|
|
43
|
-
resourceType: import_zod.z.string()
|
|
44
|
-
}).array()
|
|
45
|
-
});
|
|
46
|
-
var RefreshResponseSchema = import_zod.z.object({ sessionToken: import_zod.z.string() });
|
|
47
|
-
var SessionResponseSchema = import_zod.z.object({
|
|
48
|
-
isAuthenticated: import_zod.z.boolean(),
|
|
49
|
-
user: import_zod.z.object({
|
|
50
|
-
email: import_zod.z.string(),
|
|
51
|
-
emailVerified: import_zod.z.boolean(),
|
|
52
|
-
firstName: import_zod.z.string().nullable(),
|
|
53
|
-
id: import_zod.z.string(),
|
|
54
|
-
lastName: import_zod.z.string().nullable()
|
|
55
|
-
}).nullable()
|
|
56
|
-
});
|
|
57
|
-
var AuthRefreshQuerySchema = import_zod.z.object({
|
|
58
|
-
__lh_jwt: import_zod.z.string().optional()
|
|
59
|
-
});
|
|
60
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
61
|
-
0 && (module.exports = {
|
|
62
|
-
AuthRefreshQuerySchema,
|
|
63
|
-
EntitlementsListResultSchema,
|
|
64
|
-
RefreshResponseSchema,
|
|
65
|
-
SessionResponseSchema
|
|
66
|
-
});
|
|
67
|
-
//# sourceMappingURL=schema.zod.cjs.map
|
package/dist/schema.zod.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/schema.zod.ts"],"sourcesContent":["// Generated zod schemas from OpenAPI components.schemas\n// Use these schemas for runtime validation in forms, API requests, etc.\n\nimport { z } from 'zod';\n\n/**\n * Zod schema for EntitlementsListResult\n */\nexport const EntitlementsListResultSchema = z.object({\n results: z\n .object({\n entitlements: z\n .object({\n allowed: z.boolean(),\n allowedByPlan: z.boolean(),\n allowedByRole: z.boolean(),\n allowedPlans: z.string().array().optional(),\n allowedRoles: z.string().array(),\n currentPlan: z.string().optional(),\n currentRole: z.string().optional(),\n entitlement: z.string(),\n })\n .array(),\n resourceId: z.string(),\n resourceType: z.string(),\n })\n .array(),\n});\n\n/**\n * Zod schema for RefreshResponse\n */\nexport const RefreshResponseSchema = z.object({ sessionToken: z.string() });\n\n/**\n * Zod schema for SessionResponse\n */\nexport const SessionResponseSchema = z.object({\n isAuthenticated: z.boolean(),\n user: z\n .object({\n email: z.string(),\n emailVerified: z.boolean(),\n firstName: z.string().nullable(),\n id: z.string(),\n lastName: z.string().nullable(),\n })\n .nullable(),\n});\n\n// Operation query parameter schemas\n\n/**\n * Schema for query params of Auth.Refresh\n */\nexport const AuthRefreshQuerySchema = z.object({\n __lh_jwt: z.string().optional(),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iBAAkB;AAKX,IAAM,+BAA+B,aAAE,OAAO;AAAA,EACnD,SAAS,aACN,OAAO;AAAA,IACN,cAAc,aACX,OAAO;AAAA,MACN,SAAS,aAAE,QAAQ;AAAA,MACnB,eAAe,aAAE,QAAQ;AAAA,MACzB,eAAe,aAAE,QAAQ;AAAA,MACzB,cAAc,aAAE,OAAO,EAAE,MAAM,EAAE,SAAS;AAAA,MAC1C,cAAc,aAAE,OAAO,EAAE,MAAM;AAAA,MAC/B,aAAa,aAAE,OAAO,EAAE,SAAS;AAAA,MACjC,aAAa,aAAE,OAAO,EAAE,SAAS;AAAA,MACjC,aAAa,aAAE,OAAO;AAAA,IACxB,CAAC,EACA,MAAM;AAAA,IACT,YAAY,aAAE,OAAO;AAAA,IACrB,cAAc,aAAE,OAAO;AAAA,EACzB,CAAC,EACA,MAAM;AACX,CAAC;AAKM,IAAM,wBAAwB,aAAE,OAAO,EAAE,cAAc,aAAE,OAAO,EAAE,CAAC;AAKnE,IAAM,wBAAwB,aAAE,OAAO;AAAA,EAC5C,iBAAiB,aAAE,QAAQ;AAAA,EAC3B,MAAM,aACH,OAAO;AAAA,IACN,OAAO,aAAE,OAAO;AAAA,IAChB,eAAe,aAAE,QAAQ;AAAA,IACzB,WAAW,aAAE,OAAO,EAAE,SAAS;AAAA,IAC/B,IAAI,aAAE,OAAO;AAAA,IACb,UAAU,aAAE,OAAO,EAAE,SAAS;AAAA,EAChC,CAAC,EACA,SAAS;AACd,CAAC;AAOM,IAAM,yBAAyB,aAAE,OAAO;AAAA,EAC7C,UAAU,aAAE,OAAO,EAAE,SAAS;AAChC,CAAC;","names":[]}
|
package/dist/schema.zod.d.mts
DELETED
package/dist/schema.zod.d.ts
DELETED
package/dist/schema.zod.mjs
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// src/schema.zod.ts
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
var EntitlementsListResultSchema = z.object({
|
|
4
|
-
results: z.object({
|
|
5
|
-
entitlements: z.object({
|
|
6
|
-
allowed: z.boolean(),
|
|
7
|
-
allowedByPlan: z.boolean(),
|
|
8
|
-
allowedByRole: z.boolean(),
|
|
9
|
-
allowedPlans: z.string().array().optional(),
|
|
10
|
-
allowedRoles: z.string().array(),
|
|
11
|
-
currentPlan: z.string().optional(),
|
|
12
|
-
currentRole: z.string().optional(),
|
|
13
|
-
entitlement: z.string()
|
|
14
|
-
}).array(),
|
|
15
|
-
resourceId: z.string(),
|
|
16
|
-
resourceType: z.string()
|
|
17
|
-
}).array()
|
|
18
|
-
});
|
|
19
|
-
var RefreshResponseSchema = z.object({ sessionToken: z.string() });
|
|
20
|
-
var SessionResponseSchema = z.object({
|
|
21
|
-
isAuthenticated: z.boolean(),
|
|
22
|
-
user: z.object({
|
|
23
|
-
email: z.string(),
|
|
24
|
-
emailVerified: z.boolean(),
|
|
25
|
-
firstName: z.string().nullable(),
|
|
26
|
-
id: z.string(),
|
|
27
|
-
lastName: z.string().nullable()
|
|
28
|
-
}).nullable()
|
|
29
|
-
});
|
|
30
|
-
var AuthRefreshQuerySchema = z.object({
|
|
31
|
-
__lh_jwt: z.string().optional()
|
|
32
|
-
});
|
|
33
|
-
export {
|
|
34
|
-
AuthRefreshQuerySchema,
|
|
35
|
-
EntitlementsListResultSchema,
|
|
36
|
-
RefreshResponseSchema,
|
|
37
|
-
SessionResponseSchema
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=schema.zod.mjs.map
|
package/dist/schema.zod.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/schema.zod.ts"],"sourcesContent":["// Generated zod schemas from OpenAPI components.schemas\n// Use these schemas for runtime validation in forms, API requests, etc.\n\nimport { z } from 'zod';\n\n/**\n * Zod schema for EntitlementsListResult\n */\nexport const EntitlementsListResultSchema = z.object({\n results: z\n .object({\n entitlements: z\n .object({\n allowed: z.boolean(),\n allowedByPlan: z.boolean(),\n allowedByRole: z.boolean(),\n allowedPlans: z.string().array().optional(),\n allowedRoles: z.string().array(),\n currentPlan: z.string().optional(),\n currentRole: z.string().optional(),\n entitlement: z.string(),\n })\n .array(),\n resourceId: z.string(),\n resourceType: z.string(),\n })\n .array(),\n});\n\n/**\n * Zod schema for RefreshResponse\n */\nexport const RefreshResponseSchema = z.object({ sessionToken: z.string() });\n\n/**\n * Zod schema for SessionResponse\n */\nexport const SessionResponseSchema = z.object({\n isAuthenticated: z.boolean(),\n user: z\n .object({\n email: z.string(),\n emailVerified: z.boolean(),\n firstName: z.string().nullable(),\n id: z.string(),\n lastName: z.string().nullable(),\n })\n .nullable(),\n});\n\n// Operation query parameter schemas\n\n/**\n * Schema for query params of Auth.Refresh\n */\nexport const AuthRefreshQuerySchema = z.object({\n __lh_jwt: z.string().optional(),\n});\n"],"mappings":";AAGA,SAAS,SAAS;AAKX,IAAM,+BAA+B,EAAE,OAAO;AAAA,EACnD,SAAS,EACN,OAAO;AAAA,IACN,cAAc,EACX,OAAO;AAAA,MACN,SAAS,EAAE,QAAQ;AAAA,MACnB,eAAe,EAAE,QAAQ;AAAA,MACzB,eAAe,EAAE,QAAQ;AAAA,MACzB,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS;AAAA,MAC1C,cAAc,EAAE,OAAO,EAAE,MAAM;AAAA,MAC/B,aAAa,EAAE,OAAO,EAAE,SAAS;AAAA,MACjC,aAAa,EAAE,OAAO,EAAE,SAAS;AAAA,MACjC,aAAa,EAAE,OAAO;AAAA,IACxB,CAAC,EACA,MAAM;AAAA,IACT,YAAY,EAAE,OAAO;AAAA,IACrB,cAAc,EAAE,OAAO;AAAA,EACzB,CAAC,EACA,MAAM;AACX,CAAC;AAKM,IAAM,wBAAwB,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC;AAKnE,IAAM,wBAAwB,EAAE,OAAO;AAAA,EAC5C,iBAAiB,EAAE,QAAQ;AAAA,EAC3B,MAAM,EACH,OAAO;AAAA,IACN,OAAO,EAAE,OAAO;AAAA,IAChB,eAAe,EAAE,QAAQ;AAAA,IACzB,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,IAC/B,IAAI,EAAE,OAAO;AAAA,IACb,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,CAAC,EACA,SAAS;AACd,CAAC;AAOM,IAAM,yBAAyB,EAAE,OAAO;AAAA,EAC7C,UAAU,EAAE,OAAO,EAAE,SAAS;AAChC,CAAC;","names":[]}
|