@kakadu/types-api 1.0.0 → 1.0.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/build/index.d.mts +104 -0
- package/build/index.d.ts +104 -0
- package/build/index.js +86 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +74 -0
- package/build/index.mjs.map +1 -0
- package/package.json +11 -11
- package/dist/index.d.mts +0 -300
- package/dist/index.d.ts +0 -300
- package/dist/index.js +0 -55
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -44
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @maxLength 50
|
|
5
|
+
*/
|
|
6
|
+
type Id = string;
|
|
7
|
+
|
|
8
|
+
declare const idSchema: z.ZodType<Id>;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @maxLength 450
|
|
12
|
+
*/
|
|
13
|
+
type Name = string;
|
|
14
|
+
|
|
15
|
+
declare const nameSchema: z.ZodType<Name>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @schema string().url().startsWith("https://")
|
|
19
|
+
*/
|
|
20
|
+
type Url = string;
|
|
21
|
+
|
|
22
|
+
declare const urlSchema: z.ZodType<Url>;
|
|
23
|
+
|
|
24
|
+
type Image = {
|
|
25
|
+
url: Url;
|
|
26
|
+
/**
|
|
27
|
+
* @schema number().int().min(1).optional()
|
|
28
|
+
*/
|
|
29
|
+
width?: number;
|
|
30
|
+
/**
|
|
31
|
+
* @schema number().int().min(1).optional()
|
|
32
|
+
*/
|
|
33
|
+
height?: number;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
declare const imageSchema: z.ZodType<Image>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @maxLength 10
|
|
40
|
+
* @default en
|
|
41
|
+
*/
|
|
42
|
+
type Locale = string;
|
|
43
|
+
|
|
44
|
+
declare const localeSchema: z.ZodType<Locale>;
|
|
45
|
+
|
|
46
|
+
type User = {
|
|
47
|
+
id: Id;
|
|
48
|
+
organizationIds: Id[];
|
|
49
|
+
groupIds: Id[];
|
|
50
|
+
name?: Name;
|
|
51
|
+
firstName?: Name;
|
|
52
|
+
lastName?: Name;
|
|
53
|
+
/**
|
|
54
|
+
* @format email
|
|
55
|
+
*/
|
|
56
|
+
emailAddress?: string;
|
|
57
|
+
roles: string[];
|
|
58
|
+
};
|
|
59
|
+
type ClientUser = Omit<User, 'roles' | 'organizationIds'> & {
|
|
60
|
+
organizationIds?: Id[];
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
declare const userSchema: z.ZodType<User>;
|
|
64
|
+
declare const clientUserSchema: z.ZodType<ClientUser>;
|
|
65
|
+
|
|
66
|
+
type DatabaseOrganization = {
|
|
67
|
+
CustomerId: string;
|
|
68
|
+
Name: string;
|
|
69
|
+
Website?: string;
|
|
70
|
+
Slug: string;
|
|
71
|
+
Logo?: string;
|
|
72
|
+
Image?: string;
|
|
73
|
+
Icon?: string;
|
|
74
|
+
};
|
|
75
|
+
type Organization = {
|
|
76
|
+
id: Id;
|
|
77
|
+
name: Name;
|
|
78
|
+
url?: Url;
|
|
79
|
+
slug: Name;
|
|
80
|
+
logo?: Image;
|
|
81
|
+
image?: Image;
|
|
82
|
+
icon?: Image;
|
|
83
|
+
};
|
|
84
|
+
type ClientOrganization = Organization;
|
|
85
|
+
|
|
86
|
+
declare const organizationSchema: z.ZodType<Organization>;
|
|
87
|
+
declare const clientOrganizationSchema: z.ZodType<ClientOrganization>;
|
|
88
|
+
|
|
89
|
+
type DatabaseOrganizationUser = {
|
|
90
|
+
UserId: string;
|
|
91
|
+
CustomerId: string;
|
|
92
|
+
RoleId: string;
|
|
93
|
+
};
|
|
94
|
+
type OrganizationUser = {
|
|
95
|
+
id: Id;
|
|
96
|
+
organizationId: Id;
|
|
97
|
+
roleId: Id;
|
|
98
|
+
};
|
|
99
|
+
type ClientOrganizationUser = OrganizationUser;
|
|
100
|
+
|
|
101
|
+
declare const organizationUserSchema: z.ZodType<OrganizationUser>;
|
|
102
|
+
declare const clientOrganizationUserSchema: z.ZodType<ClientOrganizationUser>;
|
|
103
|
+
|
|
104
|
+
export { type ClientOrganization, type ClientOrganizationUser, type ClientUser, type DatabaseOrganization, type DatabaseOrganizationUser, type Id, type Image, type Locale, type Name, type Organization, type OrganizationUser, type Url, type User, clientOrganizationSchema, clientOrganizationUserSchema, clientUserSchema, idSchema, imageSchema, localeSchema, nameSchema, organizationSchema, organizationUserSchema, urlSchema, userSchema };
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @maxLength 50
|
|
5
|
+
*/
|
|
6
|
+
type Id = string;
|
|
7
|
+
|
|
8
|
+
declare const idSchema: z.ZodType<Id>;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @maxLength 450
|
|
12
|
+
*/
|
|
13
|
+
type Name = string;
|
|
14
|
+
|
|
15
|
+
declare const nameSchema: z.ZodType<Name>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @schema string().url().startsWith("https://")
|
|
19
|
+
*/
|
|
20
|
+
type Url = string;
|
|
21
|
+
|
|
22
|
+
declare const urlSchema: z.ZodType<Url>;
|
|
23
|
+
|
|
24
|
+
type Image = {
|
|
25
|
+
url: Url;
|
|
26
|
+
/**
|
|
27
|
+
* @schema number().int().min(1).optional()
|
|
28
|
+
*/
|
|
29
|
+
width?: number;
|
|
30
|
+
/**
|
|
31
|
+
* @schema number().int().min(1).optional()
|
|
32
|
+
*/
|
|
33
|
+
height?: number;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
declare const imageSchema: z.ZodType<Image>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @maxLength 10
|
|
40
|
+
* @default en
|
|
41
|
+
*/
|
|
42
|
+
type Locale = string;
|
|
43
|
+
|
|
44
|
+
declare const localeSchema: z.ZodType<Locale>;
|
|
45
|
+
|
|
46
|
+
type User = {
|
|
47
|
+
id: Id;
|
|
48
|
+
organizationIds: Id[];
|
|
49
|
+
groupIds: Id[];
|
|
50
|
+
name?: Name;
|
|
51
|
+
firstName?: Name;
|
|
52
|
+
lastName?: Name;
|
|
53
|
+
/**
|
|
54
|
+
* @format email
|
|
55
|
+
*/
|
|
56
|
+
emailAddress?: string;
|
|
57
|
+
roles: string[];
|
|
58
|
+
};
|
|
59
|
+
type ClientUser = Omit<User, 'roles' | 'organizationIds'> & {
|
|
60
|
+
organizationIds?: Id[];
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
declare const userSchema: z.ZodType<User>;
|
|
64
|
+
declare const clientUserSchema: z.ZodType<ClientUser>;
|
|
65
|
+
|
|
66
|
+
type DatabaseOrganization = {
|
|
67
|
+
CustomerId: string;
|
|
68
|
+
Name: string;
|
|
69
|
+
Website?: string;
|
|
70
|
+
Slug: string;
|
|
71
|
+
Logo?: string;
|
|
72
|
+
Image?: string;
|
|
73
|
+
Icon?: string;
|
|
74
|
+
};
|
|
75
|
+
type Organization = {
|
|
76
|
+
id: Id;
|
|
77
|
+
name: Name;
|
|
78
|
+
url?: Url;
|
|
79
|
+
slug: Name;
|
|
80
|
+
logo?: Image;
|
|
81
|
+
image?: Image;
|
|
82
|
+
icon?: Image;
|
|
83
|
+
};
|
|
84
|
+
type ClientOrganization = Organization;
|
|
85
|
+
|
|
86
|
+
declare const organizationSchema: z.ZodType<Organization>;
|
|
87
|
+
declare const clientOrganizationSchema: z.ZodType<ClientOrganization>;
|
|
88
|
+
|
|
89
|
+
type DatabaseOrganizationUser = {
|
|
90
|
+
UserId: string;
|
|
91
|
+
CustomerId: string;
|
|
92
|
+
RoleId: string;
|
|
93
|
+
};
|
|
94
|
+
type OrganizationUser = {
|
|
95
|
+
id: Id;
|
|
96
|
+
organizationId: Id;
|
|
97
|
+
roleId: Id;
|
|
98
|
+
};
|
|
99
|
+
type ClientOrganizationUser = OrganizationUser;
|
|
100
|
+
|
|
101
|
+
declare const organizationUserSchema: z.ZodType<OrganizationUser>;
|
|
102
|
+
declare const clientOrganizationUserSchema: z.ZodType<ClientOrganizationUser>;
|
|
103
|
+
|
|
104
|
+
export { type ClientOrganization, type ClientOrganizationUser, type ClientUser, type DatabaseOrganization, type DatabaseOrganizationUser, type Id, type Image, type Locale, type Name, type Organization, type OrganizationUser, type Url, type User, clientOrganizationSchema, clientOrganizationUserSchema, clientUserSchema, idSchema, imageSchema, localeSchema, nameSchema, organizationSchema, organizationUserSchema, urlSchema, userSchema };
|
package/build/index.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var zod = require('zod');
|
|
4
|
+
|
|
5
|
+
// ../../primitives/id.zod.ts
|
|
6
|
+
var idSchema = zod.z.string().max(50);
|
|
7
|
+
|
|
8
|
+
// ../../primitives/id.schemas.ts
|
|
9
|
+
var idSchema2 = idSchema;
|
|
10
|
+
var nameSchema = zod.z.string().max(450);
|
|
11
|
+
|
|
12
|
+
// ../../primitives/name.schemas.ts
|
|
13
|
+
var nameSchema2 = nameSchema;
|
|
14
|
+
var urlSchema = zod.z.string().url().startsWith("https://");
|
|
15
|
+
|
|
16
|
+
// ../../primitives/url.schemas.ts
|
|
17
|
+
var urlSchema2 = urlSchema;
|
|
18
|
+
var imageSchema = zod.z.object({
|
|
19
|
+
url: urlSchema,
|
|
20
|
+
width: zod.z.number().int().min(1).optional(),
|
|
21
|
+
height: zod.z.number().int().min(1).optional()
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// ../../primitives/image.schemas.ts
|
|
25
|
+
var imageSchema2 = imageSchema;
|
|
26
|
+
var localeSchema = zod.z.string().max(10).default("en");
|
|
27
|
+
|
|
28
|
+
// ../../primitives/locale.schemas.ts
|
|
29
|
+
var localeSchema2 = localeSchema;
|
|
30
|
+
var userSchema = zod.z.object({
|
|
31
|
+
id: idSchema,
|
|
32
|
+
organizationIds: zod.z.array(idSchema),
|
|
33
|
+
groupIds: zod.z.array(idSchema),
|
|
34
|
+
name: nameSchema.optional(),
|
|
35
|
+
firstName: nameSchema.optional(),
|
|
36
|
+
lastName: nameSchema.optional(),
|
|
37
|
+
emailAddress: zod.z.email().optional(),
|
|
38
|
+
roles: zod.z.array(zod.z.string())
|
|
39
|
+
});
|
|
40
|
+
var clientUserSchema = userSchema.omit({ roles: true, organizationIds: true }).and(
|
|
41
|
+
zod.z.object({
|
|
42
|
+
organizationIds: zod.z.array(idSchema).optional()
|
|
43
|
+
})
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
// types/user.schemas.ts
|
|
47
|
+
var userSchema2 = userSchema;
|
|
48
|
+
var clientUserSchema2 = clientUserSchema;
|
|
49
|
+
var organizationSchema = zod.z.object({
|
|
50
|
+
id: idSchema,
|
|
51
|
+
name: nameSchema,
|
|
52
|
+
url: urlSchema.optional(),
|
|
53
|
+
slug: nameSchema,
|
|
54
|
+
logo: imageSchema.optional(),
|
|
55
|
+
image: imageSchema.optional(),
|
|
56
|
+
icon: imageSchema.optional()
|
|
57
|
+
});
|
|
58
|
+
var clientOrganizationSchema = organizationSchema;
|
|
59
|
+
|
|
60
|
+
// types/organization.schemas.ts
|
|
61
|
+
var organizationSchema2 = organizationSchema;
|
|
62
|
+
var clientOrganizationSchema2 = clientOrganizationSchema;
|
|
63
|
+
var organizationUserSchema = zod.z.object({
|
|
64
|
+
id: idSchema,
|
|
65
|
+
organizationId: idSchema,
|
|
66
|
+
roleId: idSchema
|
|
67
|
+
});
|
|
68
|
+
var clientOrganizationUserSchema = organizationUserSchema;
|
|
69
|
+
|
|
70
|
+
// types/organization-user.schemas.ts
|
|
71
|
+
var organizationUserSchema2 = organizationUserSchema;
|
|
72
|
+
var clientOrganizationUserSchema2 = clientOrganizationUserSchema;
|
|
73
|
+
|
|
74
|
+
exports.clientOrganizationSchema = clientOrganizationSchema2;
|
|
75
|
+
exports.clientOrganizationUserSchema = clientOrganizationUserSchema2;
|
|
76
|
+
exports.clientUserSchema = clientUserSchema2;
|
|
77
|
+
exports.idSchema = idSchema2;
|
|
78
|
+
exports.imageSchema = imageSchema2;
|
|
79
|
+
exports.localeSchema = localeSchema2;
|
|
80
|
+
exports.nameSchema = nameSchema2;
|
|
81
|
+
exports.organizationSchema = organizationSchema2;
|
|
82
|
+
exports.organizationUserSchema = organizationUserSchema2;
|
|
83
|
+
exports.urlSchema = urlSchema2;
|
|
84
|
+
exports.userSchema = userSchema2;
|
|
85
|
+
//# sourceMappingURL=index.js.map
|
|
86
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../primitives/id.zod.ts","../../../primitives/id.schemas.ts","../../../primitives/name.zod.ts","../../../primitives/name.schemas.ts","../../../primitives/url.zod.ts","../../../primitives/url.schemas.ts","../../../primitives/image.zod.ts","../../../primitives/image.schemas.ts","../../../primitives/locale.zod.ts","../../../primitives/locale.schemas.ts","../types/user.zod.ts","../types/user.schemas.ts","../types/organization.zod.ts","../types/organization.schemas.ts","../types/organization-user.zod.ts","../types/organization-user.schemas.ts"],"names":["z","idSchema","nameSchema","urlSchema","imageSchema","localeSchema","userSchema","clientUserSchema","organizationSchema","clientOrganizationSchema","organizationUserSchema","clientOrganizationUserSchema"],"mappings":";;;;;AAGO,IAAM,QAAA,GAAWA,KAAA,CAAE,MAAA,EAAO,CAAE,IAAI,EAAE,CAAA;;;ACElC,IAAMC,SAAAA,GAA0B;ACFhC,IAAM,UAAA,GAAaD,KAAAA,CAAE,MAAA,EAAO,CAAE,IAAI,GAAG,CAAA;;;ACErC,IAAME,WAAAA,GAA8B;ACFpC,IAAM,YAAYF,KAAAA,CAAE,MAAA,GAAS,GAAA,EAAI,CAAE,WAAW,UAAU,CAAA;;;ACExD,IAAMG,UAAAA,GAA4B;ACAlC,IAAM,WAAA,GAAcH,M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GAAqBP,MAAE,MAAA,CAAO;AAAA,EACzC,EAAA,EAAI,QAAA;AAAA,EACJ,IAAA,EAAM,UAAA;AAAA,EACN,GAAA,EAAK,UAAU,QAAA,EAAS;AAAA,EACxB,IAAA,EAAM,UAAA;AAAA,EACN,IAAA,EAAM,YAAY,QAAA,EAAS;AAAA,EAC3B,KAAA,EAAO,YAAY,QAAA,EAAS;AAAA,EAC5B,IAAA,EAAM,YAAY,QAAA;AACpB,CAAC,CAAA;AAEM,IAAM,wBAAA,GAA2B,kBAAA;;;ACVjC,IAAMQ,mBAAAA,GAA8C;AACpD,IAAMC,yBAAAA,GACX;ACLK,IAAM,sBAAA,GAAyBT,MAAE,MAAA,CAAO;AAAA,EAC7C,EAAA,EAAI,QAAA;AAAA,EACJ,cAAA,EAAgB,QAAA;AAAA,EAChB,MAAA,EAAQ;AACV,CAAC,CAAA;AAEM,IAAM,4BAAA,GAA+B,sBAAA;;;ACArC,IAAMU,uBAAAA,GACX;AACK,IAAMC,6BAAAA,GACX","file":"index.js","sourcesContent":["// Generated by ts-to-zod\nimport {z} from 'zod';\n\nexport const idSchema = z.string().max(50);\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type Id} from './id';\nimport {idSchema as idSchema_} from './id.zod';\n\nexport const idSchema: z.ZodType<Id> = idSchema_;\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nexport const nameSchema = z.string().max(450);\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type Name} from './name';\nimport {nameSchema as nameSchema_} from './name.zod';\n\nexport const nameSchema: z.ZodType<Name> = nameSchema_;\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nexport const urlSchema = z.string().url().startsWith('https://');\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type Url} from './url';\nimport {urlSchema as urlSchema_} from './url.zod';\n\nexport const urlSchema: z.ZodType<Url> = urlSchema_;\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nimport {urlSchema} from './url.zod';\n\nexport const imageSchema = z.object({\n url: urlSchema,\n width: z.number().int().min(1).optional(),\n height: z.number().int().min(1).optional(),\n});\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type Image} from './image';\nimport {imageSchema as imageSchema_} from './image.zod';\n\nexport const imageSchema: z.ZodType<Image> = imageSchema_;\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nexport const localeSchema = z.string().max(10).default('en');\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type Locale} from './locale';\nimport {localeSchema as localeSchema_} from './locale.zod';\n\nexport const localeSchema: z.ZodType<Locale> = localeSchema_;\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nimport {idSchema} from './../../../primitives/id.zod';\nimport {nameSchema} from './../../../primitives/name.zod';\n\nexport const userSchema = z.object({\n id: idSchema,\n organizationIds: z.array(idSchema),\n groupIds: z.array(idSchema),\n name: nameSchema.optional(),\n firstName: nameSchema.optional(),\n lastName: nameSchema.optional(),\n emailAddress: z.email().optional(),\n roles: z.array(z.string()),\n});\n\nexport const clientUserSchema = userSchema\n .omit({roles: true, organizationIds: true})\n .and(\n z.object({\n organizationIds: z.array(idSchema).optional(),\n })\n );\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type User, type ClientUser} from './user';\nimport {\n userSchema as userSchema_,\n clientUserSchema as clientUserSchema_,\n} from './user.zod';\n\nexport const userSchema: z.ZodType<User> = userSchema_;\nexport const clientUserSchema: z.ZodType<ClientUser> = clientUserSchema_;\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nimport {idSchema} from './../../../primitives/id.zod';\nimport {nameSchema} from './../../../primitives/name.zod';\nimport {imageSchema} from './../../../primitives/image.zod';\nimport {urlSchema} from './../../../primitives/url.zod';\n\nexport const organizationSchema = z.object({\n id: idSchema,\n name: nameSchema,\n url: urlSchema.optional(),\n slug: nameSchema,\n logo: imageSchema.optional(),\n image: imageSchema.optional(),\n icon: imageSchema.optional(),\n});\n\nexport const clientOrganizationSchema = organizationSchema;\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type Organization, type ClientOrganization} from './organization';\nimport {\n organizationSchema as organizationSchema_,\n clientOrganizationSchema as clientOrganizationSchema_,\n} from './organization.zod';\n\nexport const organizationSchema: z.ZodType<Organization> = organizationSchema_;\nexport const clientOrganizationSchema: z.ZodType<ClientOrganization> =\n clientOrganizationSchema_;\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nimport {idSchema} from './../../../primitives/id.zod';\n\nexport const organizationUserSchema = z.object({\n id: idSchema,\n organizationId: idSchema,\n roleId: idSchema,\n});\n\nexport const clientOrganizationUserSchema = organizationUserSchema;\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {\n type OrganizationUser,\n type ClientOrganizationUser,\n} from './organization-user';\nimport {\n organizationUserSchema as organizationUserSchema_,\n clientOrganizationUserSchema as clientOrganizationUserSchema_,\n} from './organization-user.zod';\n\nexport const organizationUserSchema: z.ZodType<OrganizationUser> =\n organizationUserSchema_;\nexport const clientOrganizationUserSchema: z.ZodType<ClientOrganizationUser> =\n clientOrganizationUserSchema_;\n"]}
|
package/build/index.mjs
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
// ../../primitives/id.zod.ts
|
|
4
|
+
var idSchema = z.string().max(50);
|
|
5
|
+
|
|
6
|
+
// ../../primitives/id.schemas.ts
|
|
7
|
+
var idSchema2 = idSchema;
|
|
8
|
+
var nameSchema = z.string().max(450);
|
|
9
|
+
|
|
10
|
+
// ../../primitives/name.schemas.ts
|
|
11
|
+
var nameSchema2 = nameSchema;
|
|
12
|
+
var urlSchema = z.string().url().startsWith("https://");
|
|
13
|
+
|
|
14
|
+
// ../../primitives/url.schemas.ts
|
|
15
|
+
var urlSchema2 = urlSchema;
|
|
16
|
+
var imageSchema = z.object({
|
|
17
|
+
url: urlSchema,
|
|
18
|
+
width: z.number().int().min(1).optional(),
|
|
19
|
+
height: z.number().int().min(1).optional()
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// ../../primitives/image.schemas.ts
|
|
23
|
+
var imageSchema2 = imageSchema;
|
|
24
|
+
var localeSchema = z.string().max(10).default("en");
|
|
25
|
+
|
|
26
|
+
// ../../primitives/locale.schemas.ts
|
|
27
|
+
var localeSchema2 = localeSchema;
|
|
28
|
+
var userSchema = z.object({
|
|
29
|
+
id: idSchema,
|
|
30
|
+
organizationIds: z.array(idSchema),
|
|
31
|
+
groupIds: z.array(idSchema),
|
|
32
|
+
name: nameSchema.optional(),
|
|
33
|
+
firstName: nameSchema.optional(),
|
|
34
|
+
lastName: nameSchema.optional(),
|
|
35
|
+
emailAddress: z.email().optional(),
|
|
36
|
+
roles: z.array(z.string())
|
|
37
|
+
});
|
|
38
|
+
var clientUserSchema = userSchema.omit({ roles: true, organizationIds: true }).and(
|
|
39
|
+
z.object({
|
|
40
|
+
organizationIds: z.array(idSchema).optional()
|
|
41
|
+
})
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
// types/user.schemas.ts
|
|
45
|
+
var userSchema2 = userSchema;
|
|
46
|
+
var clientUserSchema2 = clientUserSchema;
|
|
47
|
+
var organizationSchema = z.object({
|
|
48
|
+
id: idSchema,
|
|
49
|
+
name: nameSchema,
|
|
50
|
+
url: urlSchema.optional(),
|
|
51
|
+
slug: nameSchema,
|
|
52
|
+
logo: imageSchema.optional(),
|
|
53
|
+
image: imageSchema.optional(),
|
|
54
|
+
icon: imageSchema.optional()
|
|
55
|
+
});
|
|
56
|
+
var clientOrganizationSchema = organizationSchema;
|
|
57
|
+
|
|
58
|
+
// types/organization.schemas.ts
|
|
59
|
+
var organizationSchema2 = organizationSchema;
|
|
60
|
+
var clientOrganizationSchema2 = clientOrganizationSchema;
|
|
61
|
+
var organizationUserSchema = z.object({
|
|
62
|
+
id: idSchema,
|
|
63
|
+
organizationId: idSchema,
|
|
64
|
+
roleId: idSchema
|
|
65
|
+
});
|
|
66
|
+
var clientOrganizationUserSchema = organizationUserSchema;
|
|
67
|
+
|
|
68
|
+
// types/organization-user.schemas.ts
|
|
69
|
+
var organizationUserSchema2 = organizationUserSchema;
|
|
70
|
+
var clientOrganizationUserSchema2 = clientOrganizationUserSchema;
|
|
71
|
+
|
|
72
|
+
export { clientOrganizationSchema2 as clientOrganizationSchema, clientOrganizationUserSchema2 as clientOrganizationUserSchema, clientUserSchema2 as clientUserSchema, idSchema2 as idSchema, imageSchema2 as imageSchema, localeSchema2 as localeSchema, nameSchema2 as nameSchema, organizationSchema2 as organizationSchema, organizationUserSchema2 as organizationUserSchema, urlSchema2 as urlSchema, userSchema2 as userSchema };
|
|
73
|
+
//# sourceMappingURL=index.mjs.map
|
|
74
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../primitives/id.zod.ts","../../../primitives/id.schemas.ts","../../../primitives/name.zod.ts","../../../primitives/name.schemas.ts","../../../primitives/url.zod.ts","../../../primitives/url.schemas.ts","../../../primitives/image.zod.ts","../../../primitives/image.schemas.ts","../../../primitives/locale.zod.ts","../../../primitives/locale.schemas.ts","../types/user.zod.ts","../types/user.schemas.ts","../types/organization.zod.ts","../types/organization.schemas.ts","../types/organization-user.zod.ts","../types/organization-user.schemas.ts"],"names":["idSchema","z","nameSchema","urlSchema","imageSchema","localeSchema","userSchema","clientUserSchema","organizationSchema","clientOrganizationSchema","organizationUserSchema","clientOrganizationUserSchema"],"mappings":";;;AAGO,IAAM,QAAA,GAAW,CAAA,CAAE,MAAA,EAAO,CAAE,IAAI,EAAE,CAAA;;;ACElC,IAAMA,SAAAA,GAA0B;ACFhC,IAAM,UAAA,GAAaC,CAAAA,CAAE,MAAA,EAAO,CAAE,IAAI,GAAG,CAAA;;;ACErC,IAAMC,WAAAA,GAA8B;ACFpC,IAAM,YAAYD,CAAAA,CAAE,MAAA,GAA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C7C;AACH,CAAA;;;ACfK,IAAMK,WAAAA,GAA8B;AACpC,IAAMC,iBAAAA,GAA0C;ACDhD,IAAM,kBAAA,GAAqBN,EAAE,MAAA,CAAO;AAAA,EACzC,EAAA,EAAI,QAAA;AAAA,EACJ,IAAA,EAAM,UAAA;AAAA,EACN,GAAA,EAAK,UAAU,QAAA,EAAS;AAAA,EACxB,IAAA,EAAM,UAAA;AAAA,EACN,IAAA,EAAM,YAAY,QAAA,EAAS;AAAA,EAC3B,KAAA,EAAO,YAAY,QAAA,EAAS;AAAA,EAC5B,IAAA,EAAM,YAAY,QAAA;AACpB,CAAC,CAAA;AAEM,IAAM,wBAAA,GAA2B,kBAAA;;;ACVjC,IAAMO,mBAAAA,GAA8C;AACpD,IAAMC,yBAAAA,GACX;ACLK,IAAM,sBAAA,GAAyBR,EAAE,MAAA,CAAO;AAAA,EAC7C,EAAA,EAAI,QAAA;AAAA,EACJ,cAAA,EAAgB,QAAA;AAAA,EAChB,MAAA,EAAQ;AACV,CAAC,CAAA;AAEM,IAAM,4BAAA,GAA+B,sBAAA;;;ACArC,IAAMS,uBAAAA,GACX;AACK,IAAMC,6BAAAA,GACX","file":"index.mjs","sourcesContent":["// Generated by ts-to-zod\nimport {z} from 'zod';\n\nexport const idSchema = z.string().max(50);\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type Id} from './id';\nimport {idSchema as idSchema_} from './id.zod';\n\nexport const idSchema: z.ZodType<Id> = idSchema_;\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nexport const nameSchema = z.string().max(450);\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type Name} from './name';\nimport {nameSchema as nameSchema_} from './name.zod';\n\nexport const nameSchema: z.ZodType<Name> = nameSchema_;\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nexport const urlSchema = z.string().url().startsWith('https://');\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type Url} from './url';\nimport {urlSchema as urlSchema_} from './url.zod';\n\nexport const urlSchema: z.ZodType<Url> = urlSchema_;\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nimport {urlSchema} from './url.zod';\n\nexport const imageSchema = z.object({\n url: urlSchema,\n width: z.number().int().min(1).optional(),\n height: z.number().int().min(1).optional(),\n});\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type Image} from './image';\nimport {imageSchema as imageSchema_} from './image.zod';\n\nexport const imageSchema: z.ZodType<Image> = imageSchema_;\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nexport const localeSchema = z.string().max(10).default('en');\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type Locale} from './locale';\nimport {localeSchema as localeSchema_} from './locale.zod';\n\nexport const localeSchema: z.ZodType<Locale> = localeSchema_;\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nimport {idSchema} from './../../../primitives/id.zod';\nimport {nameSchema} from './../../../primitives/name.zod';\n\nexport const userSchema = z.object({\n id: idSchema,\n organizationIds: z.array(idSchema),\n groupIds: z.array(idSchema),\n name: nameSchema.optional(),\n firstName: nameSchema.optional(),\n lastName: nameSchema.optional(),\n emailAddress: z.email().optional(),\n roles: z.array(z.string()),\n});\n\nexport const clientUserSchema = userSchema\n .omit({roles: true, organizationIds: true})\n .and(\n z.object({\n organizationIds: z.array(idSchema).optional(),\n })\n );\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type User, type ClientUser} from './user';\nimport {\n userSchema as userSchema_,\n clientUserSchema as clientUserSchema_,\n} from './user.zod';\n\nexport const userSchema: z.ZodType<User> = userSchema_;\nexport const clientUserSchema: z.ZodType<ClientUser> = clientUserSchema_;\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nimport {idSchema} from './../../../primitives/id.zod';\nimport {nameSchema} from './../../../primitives/name.zod';\nimport {imageSchema} from './../../../primitives/image.zod';\nimport {urlSchema} from './../../../primitives/url.zod';\n\nexport const organizationSchema = z.object({\n id: idSchema,\n name: nameSchema,\n url: urlSchema.optional(),\n slug: nameSchema,\n logo: imageSchema.optional(),\n image: imageSchema.optional(),\n icon: imageSchema.optional(),\n});\n\nexport const clientOrganizationSchema = organizationSchema;\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {type Organization, type ClientOrganization} from './organization';\nimport {\n organizationSchema as organizationSchema_,\n clientOrganizationSchema as clientOrganizationSchema_,\n} from './organization.zod';\n\nexport const organizationSchema: z.ZodType<Organization> = organizationSchema_;\nexport const clientOrganizationSchema: z.ZodType<ClientOrganization> =\n clientOrganizationSchema_;\n","// Generated by ts-to-zod\nimport {z} from 'zod';\n\nimport {idSchema} from './../../../primitives/id.zod';\n\nexport const organizationUserSchema = z.object({\n id: idSchema,\n organizationId: idSchema,\n roleId: idSchema,\n});\n\nexport const clientOrganizationUserSchema = organizationUserSchema;\n","// Generated by generate-typed-schemas.mjs\nimport {type z} from 'zod';\nimport {\n type OrganizationUser,\n type ClientOrganizationUser,\n} from './organization-user';\nimport {\n organizationUserSchema as organizationUserSchema_,\n clientOrganizationUserSchema as clientOrganizationUserSchema_,\n} from './organization-user.zod';\n\nexport const organizationUserSchema: z.ZodType<OrganizationUser> =\n organizationUserSchema_;\nexport const clientOrganizationUserSchema: z.ZodType<ClientOrganizationUser> =\n clientOrganizationUserSchema_;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kakadu/types-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Base types for Kakadu products",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
"url": "https://github.com/kakaduen/types.git",
|
|
9
9
|
"directory": "packages/types-api"
|
|
10
10
|
},
|
|
11
|
-
"main": "./
|
|
12
|
-
"module": "./
|
|
13
|
-
"types": "./
|
|
11
|
+
"main": "./build/index.js",
|
|
12
|
+
"module": "./build/index.mjs",
|
|
13
|
+
"types": "./build/index.d.ts",
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
|
-
"types": "./
|
|
17
|
-
"import": "./
|
|
18
|
-
"require": "./
|
|
16
|
+
"types": "./build/index.d.ts",
|
|
17
|
+
"import": "./build/index.mjs",
|
|
18
|
+
"require": "./build/index.js"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
|
-
"
|
|
22
|
+
"build/**/*"
|
|
23
23
|
],
|
|
24
24
|
"sideEffects": false,
|
|
25
25
|
"publishConfig": {
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"build": "tsup",
|
|
30
|
-
"prepublishOnly": "npm run build"
|
|
30
|
+
"prepublishOnly": "npm run generate --prefix ../.. && npm run build"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"zod": "^
|
|
33
|
+
"zod": "^4.6.7"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"tsup": "^8.5.1",
|
|
37
37
|
"typescript": "^5.9.3",
|
|
38
|
-
"zod": "^
|
|
38
|
+
"zod": "^4.6.7"
|
|
39
39
|
}
|
|
40
40
|
}
|
package/dist/index.d.mts
DELETED
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
declare const idSchema: z.ZodString;
|
|
4
|
-
type Id = z.infer<typeof idSchema>;
|
|
5
|
-
|
|
6
|
-
declare const nameSchema: z.ZodString;
|
|
7
|
-
type Name = z.infer<typeof nameSchema>;
|
|
8
|
-
|
|
9
|
-
declare const imageSchema: z.ZodObject<{
|
|
10
|
-
url: z.ZodString;
|
|
11
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
12
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
13
|
-
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
url: string;
|
|
15
|
-
width?: number | undefined;
|
|
16
|
-
height?: number | undefined;
|
|
17
|
-
}, {
|
|
18
|
-
url: string;
|
|
19
|
-
width?: number | undefined;
|
|
20
|
-
height?: number | undefined;
|
|
21
|
-
}>;
|
|
22
|
-
type Image = z.infer<typeof imageSchema>;
|
|
23
|
-
|
|
24
|
-
declare const localeSchema: z.ZodDefault<z.ZodString>;
|
|
25
|
-
type Locale = z.infer<typeof localeSchema>;
|
|
26
|
-
|
|
27
|
-
declare const userSchema: z.ZodObject<{
|
|
28
|
-
id: z.ZodString;
|
|
29
|
-
organizationIds: z.ZodArray<z.ZodString, "many">;
|
|
30
|
-
groupIds: z.ZodArray<z.ZodString, "many">;
|
|
31
|
-
name: z.ZodOptional<z.ZodString>;
|
|
32
|
-
firstName: z.ZodOptional<z.ZodString>;
|
|
33
|
-
lastName: z.ZodOptional<z.ZodString>;
|
|
34
|
-
emailAddress: z.ZodOptional<z.ZodString>;
|
|
35
|
-
roles: z.ZodArray<z.ZodString, "many">;
|
|
36
|
-
}, "strip", z.ZodTypeAny, {
|
|
37
|
-
id: string;
|
|
38
|
-
organizationIds: string[];
|
|
39
|
-
groupIds: string[];
|
|
40
|
-
roles: string[];
|
|
41
|
-
name?: string | undefined;
|
|
42
|
-
firstName?: string | undefined;
|
|
43
|
-
lastName?: string | undefined;
|
|
44
|
-
emailAddress?: string | undefined;
|
|
45
|
-
}, {
|
|
46
|
-
id: string;
|
|
47
|
-
organizationIds: string[];
|
|
48
|
-
groupIds: string[];
|
|
49
|
-
roles: string[];
|
|
50
|
-
name?: string | undefined;
|
|
51
|
-
firstName?: string | undefined;
|
|
52
|
-
lastName?: string | undefined;
|
|
53
|
-
emailAddress?: string | undefined;
|
|
54
|
-
}>;
|
|
55
|
-
type User = z.infer<typeof userSchema>;
|
|
56
|
-
declare const clientUserSchema: z.ZodObject<{
|
|
57
|
-
id: z.ZodString;
|
|
58
|
-
groupIds: z.ZodArray<z.ZodString, "many">;
|
|
59
|
-
name: z.ZodOptional<z.ZodString>;
|
|
60
|
-
firstName: z.ZodOptional<z.ZodString>;
|
|
61
|
-
lastName: z.ZodOptional<z.ZodString>;
|
|
62
|
-
emailAddress: z.ZodOptional<z.ZodString>;
|
|
63
|
-
} & {
|
|
64
|
-
organizationIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
65
|
-
}, "strip", z.ZodTypeAny, {
|
|
66
|
-
id: string;
|
|
67
|
-
groupIds: string[];
|
|
68
|
-
organizationIds?: string[] | undefined;
|
|
69
|
-
name?: string | undefined;
|
|
70
|
-
firstName?: string | undefined;
|
|
71
|
-
lastName?: string | undefined;
|
|
72
|
-
emailAddress?: string | undefined;
|
|
73
|
-
}, {
|
|
74
|
-
id: string;
|
|
75
|
-
groupIds: string[];
|
|
76
|
-
organizationIds?: string[] | undefined;
|
|
77
|
-
name?: string | undefined;
|
|
78
|
-
firstName?: string | undefined;
|
|
79
|
-
lastName?: string | undefined;
|
|
80
|
-
emailAddress?: string | undefined;
|
|
81
|
-
}>;
|
|
82
|
-
type ClientUser = z.infer<typeof clientUserSchema>;
|
|
83
|
-
|
|
84
|
-
type DatabaseOrganization = {
|
|
85
|
-
CustomerId: string;
|
|
86
|
-
Name: string;
|
|
87
|
-
Website?: string;
|
|
88
|
-
Slug: string;
|
|
89
|
-
Logo?: string;
|
|
90
|
-
Image?: string;
|
|
91
|
-
Icon?: string;
|
|
92
|
-
};
|
|
93
|
-
declare const organizationSchema: z.ZodObject<{
|
|
94
|
-
id: z.ZodString;
|
|
95
|
-
name: z.ZodString;
|
|
96
|
-
url: z.ZodOptional<z.ZodString>;
|
|
97
|
-
slug: z.ZodString;
|
|
98
|
-
logo: z.ZodOptional<z.ZodObject<{
|
|
99
|
-
url: z.ZodString;
|
|
100
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
101
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
102
|
-
}, "strip", z.ZodTypeAny, {
|
|
103
|
-
url: string;
|
|
104
|
-
width?: number | undefined;
|
|
105
|
-
height?: number | undefined;
|
|
106
|
-
}, {
|
|
107
|
-
url: string;
|
|
108
|
-
width?: number | undefined;
|
|
109
|
-
height?: number | undefined;
|
|
110
|
-
}>>;
|
|
111
|
-
image: z.ZodOptional<z.ZodObject<{
|
|
112
|
-
url: z.ZodString;
|
|
113
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
114
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
115
|
-
}, "strip", z.ZodTypeAny, {
|
|
116
|
-
url: string;
|
|
117
|
-
width?: number | undefined;
|
|
118
|
-
height?: number | undefined;
|
|
119
|
-
}, {
|
|
120
|
-
url: string;
|
|
121
|
-
width?: number | undefined;
|
|
122
|
-
height?: number | undefined;
|
|
123
|
-
}>>;
|
|
124
|
-
icon: z.ZodOptional<z.ZodObject<{
|
|
125
|
-
url: z.ZodString;
|
|
126
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
127
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
128
|
-
}, "strip", z.ZodTypeAny, {
|
|
129
|
-
url: string;
|
|
130
|
-
width?: number | undefined;
|
|
131
|
-
height?: number | undefined;
|
|
132
|
-
}, {
|
|
133
|
-
url: string;
|
|
134
|
-
width?: number | undefined;
|
|
135
|
-
height?: number | undefined;
|
|
136
|
-
}>>;
|
|
137
|
-
}, "strip", z.ZodTypeAny, {
|
|
138
|
-
id: string;
|
|
139
|
-
name: string;
|
|
140
|
-
slug: string;
|
|
141
|
-
url?: string | undefined;
|
|
142
|
-
logo?: {
|
|
143
|
-
url: string;
|
|
144
|
-
width?: number | undefined;
|
|
145
|
-
height?: number | undefined;
|
|
146
|
-
} | undefined;
|
|
147
|
-
image?: {
|
|
148
|
-
url: string;
|
|
149
|
-
width?: number | undefined;
|
|
150
|
-
height?: number | undefined;
|
|
151
|
-
} | undefined;
|
|
152
|
-
icon?: {
|
|
153
|
-
url: string;
|
|
154
|
-
width?: number | undefined;
|
|
155
|
-
height?: number | undefined;
|
|
156
|
-
} | undefined;
|
|
157
|
-
}, {
|
|
158
|
-
id: string;
|
|
159
|
-
name: string;
|
|
160
|
-
slug: string;
|
|
161
|
-
url?: string | undefined;
|
|
162
|
-
logo?: {
|
|
163
|
-
url: string;
|
|
164
|
-
width?: number | undefined;
|
|
165
|
-
height?: number | undefined;
|
|
166
|
-
} | undefined;
|
|
167
|
-
image?: {
|
|
168
|
-
url: string;
|
|
169
|
-
width?: number | undefined;
|
|
170
|
-
height?: number | undefined;
|
|
171
|
-
} | undefined;
|
|
172
|
-
icon?: {
|
|
173
|
-
url: string;
|
|
174
|
-
width?: number | undefined;
|
|
175
|
-
height?: number | undefined;
|
|
176
|
-
} | undefined;
|
|
177
|
-
}>;
|
|
178
|
-
type Organization = z.infer<typeof organizationSchema>;
|
|
179
|
-
declare const clientOrganizationSchema: z.ZodObject<{
|
|
180
|
-
id: z.ZodString;
|
|
181
|
-
name: z.ZodString;
|
|
182
|
-
url: z.ZodOptional<z.ZodString>;
|
|
183
|
-
slug: z.ZodString;
|
|
184
|
-
logo: z.ZodOptional<z.ZodObject<{
|
|
185
|
-
url: z.ZodString;
|
|
186
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
187
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
188
|
-
}, "strip", z.ZodTypeAny, {
|
|
189
|
-
url: string;
|
|
190
|
-
width?: number | undefined;
|
|
191
|
-
height?: number | undefined;
|
|
192
|
-
}, {
|
|
193
|
-
url: string;
|
|
194
|
-
width?: number | undefined;
|
|
195
|
-
height?: number | undefined;
|
|
196
|
-
}>>;
|
|
197
|
-
image: z.ZodOptional<z.ZodObject<{
|
|
198
|
-
url: z.ZodString;
|
|
199
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
200
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
201
|
-
}, "strip", z.ZodTypeAny, {
|
|
202
|
-
url: string;
|
|
203
|
-
width?: number | undefined;
|
|
204
|
-
height?: number | undefined;
|
|
205
|
-
}, {
|
|
206
|
-
url: string;
|
|
207
|
-
width?: number | undefined;
|
|
208
|
-
height?: number | undefined;
|
|
209
|
-
}>>;
|
|
210
|
-
icon: z.ZodOptional<z.ZodObject<{
|
|
211
|
-
url: z.ZodString;
|
|
212
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
213
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
214
|
-
}, "strip", z.ZodTypeAny, {
|
|
215
|
-
url: string;
|
|
216
|
-
width?: number | undefined;
|
|
217
|
-
height?: number | undefined;
|
|
218
|
-
}, {
|
|
219
|
-
url: string;
|
|
220
|
-
width?: number | undefined;
|
|
221
|
-
height?: number | undefined;
|
|
222
|
-
}>>;
|
|
223
|
-
}, "strip", z.ZodTypeAny, {
|
|
224
|
-
id: string;
|
|
225
|
-
name: string;
|
|
226
|
-
slug: string;
|
|
227
|
-
url?: string | undefined;
|
|
228
|
-
logo?: {
|
|
229
|
-
url: string;
|
|
230
|
-
width?: number | undefined;
|
|
231
|
-
height?: number | undefined;
|
|
232
|
-
} | undefined;
|
|
233
|
-
image?: {
|
|
234
|
-
url: string;
|
|
235
|
-
width?: number | undefined;
|
|
236
|
-
height?: number | undefined;
|
|
237
|
-
} | undefined;
|
|
238
|
-
icon?: {
|
|
239
|
-
url: string;
|
|
240
|
-
width?: number | undefined;
|
|
241
|
-
height?: number | undefined;
|
|
242
|
-
} | undefined;
|
|
243
|
-
}, {
|
|
244
|
-
id: string;
|
|
245
|
-
name: string;
|
|
246
|
-
slug: string;
|
|
247
|
-
url?: string | undefined;
|
|
248
|
-
logo?: {
|
|
249
|
-
url: string;
|
|
250
|
-
width?: number | undefined;
|
|
251
|
-
height?: number | undefined;
|
|
252
|
-
} | undefined;
|
|
253
|
-
image?: {
|
|
254
|
-
url: string;
|
|
255
|
-
width?: number | undefined;
|
|
256
|
-
height?: number | undefined;
|
|
257
|
-
} | undefined;
|
|
258
|
-
icon?: {
|
|
259
|
-
url: string;
|
|
260
|
-
width?: number | undefined;
|
|
261
|
-
height?: number | undefined;
|
|
262
|
-
} | undefined;
|
|
263
|
-
}>;
|
|
264
|
-
type ClientOrganization = z.infer<typeof clientOrganizationSchema>;
|
|
265
|
-
|
|
266
|
-
type DatabaseOrganizationUser = {
|
|
267
|
-
UserId: string;
|
|
268
|
-
CustomerId: string;
|
|
269
|
-
RoleId: string;
|
|
270
|
-
};
|
|
271
|
-
declare const organizationUserSchema: z.ZodObject<{
|
|
272
|
-
id: z.ZodString;
|
|
273
|
-
organizationId: z.ZodString;
|
|
274
|
-
roleId: z.ZodString;
|
|
275
|
-
}, "strip", z.ZodTypeAny, {
|
|
276
|
-
id: string;
|
|
277
|
-
organizationId: string;
|
|
278
|
-
roleId: string;
|
|
279
|
-
}, {
|
|
280
|
-
id: string;
|
|
281
|
-
organizationId: string;
|
|
282
|
-
roleId: string;
|
|
283
|
-
}>;
|
|
284
|
-
type OrganizationUser = z.infer<typeof organizationUserSchema>;
|
|
285
|
-
declare const clientOrganizationUserSchema: z.ZodObject<{
|
|
286
|
-
id: z.ZodString;
|
|
287
|
-
organizationId: z.ZodString;
|
|
288
|
-
roleId: z.ZodString;
|
|
289
|
-
}, "strip", z.ZodTypeAny, {
|
|
290
|
-
id: string;
|
|
291
|
-
organizationId: string;
|
|
292
|
-
roleId: string;
|
|
293
|
-
}, {
|
|
294
|
-
id: string;
|
|
295
|
-
organizationId: string;
|
|
296
|
-
roleId: string;
|
|
297
|
-
}>;
|
|
298
|
-
type ClientOrganizationUser = z.infer<typeof clientOrganizationUserSchema>;
|
|
299
|
-
|
|
300
|
-
export { type ClientOrganization, type ClientOrganizationUser, type ClientUser, type DatabaseOrganization, type DatabaseOrganizationUser, type Id, type Image, type Locale, type Name, type Organization, type OrganizationUser, type User, clientOrganizationSchema, clientOrganizationUserSchema, clientUserSchema, idSchema, imageSchema, localeSchema, nameSchema, organizationSchema, organizationUserSchema, userSchema };
|
package/dist/index.d.ts
DELETED
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
declare const idSchema: z.ZodString;
|
|
4
|
-
type Id = z.infer<typeof idSchema>;
|
|
5
|
-
|
|
6
|
-
declare const nameSchema: z.ZodString;
|
|
7
|
-
type Name = z.infer<typeof nameSchema>;
|
|
8
|
-
|
|
9
|
-
declare const imageSchema: z.ZodObject<{
|
|
10
|
-
url: z.ZodString;
|
|
11
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
12
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
13
|
-
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
url: string;
|
|
15
|
-
width?: number | undefined;
|
|
16
|
-
height?: number | undefined;
|
|
17
|
-
}, {
|
|
18
|
-
url: string;
|
|
19
|
-
width?: number | undefined;
|
|
20
|
-
height?: number | undefined;
|
|
21
|
-
}>;
|
|
22
|
-
type Image = z.infer<typeof imageSchema>;
|
|
23
|
-
|
|
24
|
-
declare const localeSchema: z.ZodDefault<z.ZodString>;
|
|
25
|
-
type Locale = z.infer<typeof localeSchema>;
|
|
26
|
-
|
|
27
|
-
declare const userSchema: z.ZodObject<{
|
|
28
|
-
id: z.ZodString;
|
|
29
|
-
organizationIds: z.ZodArray<z.ZodString, "many">;
|
|
30
|
-
groupIds: z.ZodArray<z.ZodString, "many">;
|
|
31
|
-
name: z.ZodOptional<z.ZodString>;
|
|
32
|
-
firstName: z.ZodOptional<z.ZodString>;
|
|
33
|
-
lastName: z.ZodOptional<z.ZodString>;
|
|
34
|
-
emailAddress: z.ZodOptional<z.ZodString>;
|
|
35
|
-
roles: z.ZodArray<z.ZodString, "many">;
|
|
36
|
-
}, "strip", z.ZodTypeAny, {
|
|
37
|
-
id: string;
|
|
38
|
-
organizationIds: string[];
|
|
39
|
-
groupIds: string[];
|
|
40
|
-
roles: string[];
|
|
41
|
-
name?: string | undefined;
|
|
42
|
-
firstName?: string | undefined;
|
|
43
|
-
lastName?: string | undefined;
|
|
44
|
-
emailAddress?: string | undefined;
|
|
45
|
-
}, {
|
|
46
|
-
id: string;
|
|
47
|
-
organizationIds: string[];
|
|
48
|
-
groupIds: string[];
|
|
49
|
-
roles: string[];
|
|
50
|
-
name?: string | undefined;
|
|
51
|
-
firstName?: string | undefined;
|
|
52
|
-
lastName?: string | undefined;
|
|
53
|
-
emailAddress?: string | undefined;
|
|
54
|
-
}>;
|
|
55
|
-
type User = z.infer<typeof userSchema>;
|
|
56
|
-
declare const clientUserSchema: z.ZodObject<{
|
|
57
|
-
id: z.ZodString;
|
|
58
|
-
groupIds: z.ZodArray<z.ZodString, "many">;
|
|
59
|
-
name: z.ZodOptional<z.ZodString>;
|
|
60
|
-
firstName: z.ZodOptional<z.ZodString>;
|
|
61
|
-
lastName: z.ZodOptional<z.ZodString>;
|
|
62
|
-
emailAddress: z.ZodOptional<z.ZodString>;
|
|
63
|
-
} & {
|
|
64
|
-
organizationIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
65
|
-
}, "strip", z.ZodTypeAny, {
|
|
66
|
-
id: string;
|
|
67
|
-
groupIds: string[];
|
|
68
|
-
organizationIds?: string[] | undefined;
|
|
69
|
-
name?: string | undefined;
|
|
70
|
-
firstName?: string | undefined;
|
|
71
|
-
lastName?: string | undefined;
|
|
72
|
-
emailAddress?: string | undefined;
|
|
73
|
-
}, {
|
|
74
|
-
id: string;
|
|
75
|
-
groupIds: string[];
|
|
76
|
-
organizationIds?: string[] | undefined;
|
|
77
|
-
name?: string | undefined;
|
|
78
|
-
firstName?: string | undefined;
|
|
79
|
-
lastName?: string | undefined;
|
|
80
|
-
emailAddress?: string | undefined;
|
|
81
|
-
}>;
|
|
82
|
-
type ClientUser = z.infer<typeof clientUserSchema>;
|
|
83
|
-
|
|
84
|
-
type DatabaseOrganization = {
|
|
85
|
-
CustomerId: string;
|
|
86
|
-
Name: string;
|
|
87
|
-
Website?: string;
|
|
88
|
-
Slug: string;
|
|
89
|
-
Logo?: string;
|
|
90
|
-
Image?: string;
|
|
91
|
-
Icon?: string;
|
|
92
|
-
};
|
|
93
|
-
declare const organizationSchema: z.ZodObject<{
|
|
94
|
-
id: z.ZodString;
|
|
95
|
-
name: z.ZodString;
|
|
96
|
-
url: z.ZodOptional<z.ZodString>;
|
|
97
|
-
slug: z.ZodString;
|
|
98
|
-
logo: z.ZodOptional<z.ZodObject<{
|
|
99
|
-
url: z.ZodString;
|
|
100
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
101
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
102
|
-
}, "strip", z.ZodTypeAny, {
|
|
103
|
-
url: string;
|
|
104
|
-
width?: number | undefined;
|
|
105
|
-
height?: number | undefined;
|
|
106
|
-
}, {
|
|
107
|
-
url: string;
|
|
108
|
-
width?: number | undefined;
|
|
109
|
-
height?: number | undefined;
|
|
110
|
-
}>>;
|
|
111
|
-
image: z.ZodOptional<z.ZodObject<{
|
|
112
|
-
url: z.ZodString;
|
|
113
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
114
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
115
|
-
}, "strip", z.ZodTypeAny, {
|
|
116
|
-
url: string;
|
|
117
|
-
width?: number | undefined;
|
|
118
|
-
height?: number | undefined;
|
|
119
|
-
}, {
|
|
120
|
-
url: string;
|
|
121
|
-
width?: number | undefined;
|
|
122
|
-
height?: number | undefined;
|
|
123
|
-
}>>;
|
|
124
|
-
icon: z.ZodOptional<z.ZodObject<{
|
|
125
|
-
url: z.ZodString;
|
|
126
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
127
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
128
|
-
}, "strip", z.ZodTypeAny, {
|
|
129
|
-
url: string;
|
|
130
|
-
width?: number | undefined;
|
|
131
|
-
height?: number | undefined;
|
|
132
|
-
}, {
|
|
133
|
-
url: string;
|
|
134
|
-
width?: number | undefined;
|
|
135
|
-
height?: number | undefined;
|
|
136
|
-
}>>;
|
|
137
|
-
}, "strip", z.ZodTypeAny, {
|
|
138
|
-
id: string;
|
|
139
|
-
name: string;
|
|
140
|
-
slug: string;
|
|
141
|
-
url?: string | undefined;
|
|
142
|
-
logo?: {
|
|
143
|
-
url: string;
|
|
144
|
-
width?: number | undefined;
|
|
145
|
-
height?: number | undefined;
|
|
146
|
-
} | undefined;
|
|
147
|
-
image?: {
|
|
148
|
-
url: string;
|
|
149
|
-
width?: number | undefined;
|
|
150
|
-
height?: number | undefined;
|
|
151
|
-
} | undefined;
|
|
152
|
-
icon?: {
|
|
153
|
-
url: string;
|
|
154
|
-
width?: number | undefined;
|
|
155
|
-
height?: number | undefined;
|
|
156
|
-
} | undefined;
|
|
157
|
-
}, {
|
|
158
|
-
id: string;
|
|
159
|
-
name: string;
|
|
160
|
-
slug: string;
|
|
161
|
-
url?: string | undefined;
|
|
162
|
-
logo?: {
|
|
163
|
-
url: string;
|
|
164
|
-
width?: number | undefined;
|
|
165
|
-
height?: number | undefined;
|
|
166
|
-
} | undefined;
|
|
167
|
-
image?: {
|
|
168
|
-
url: string;
|
|
169
|
-
width?: number | undefined;
|
|
170
|
-
height?: number | undefined;
|
|
171
|
-
} | undefined;
|
|
172
|
-
icon?: {
|
|
173
|
-
url: string;
|
|
174
|
-
width?: number | undefined;
|
|
175
|
-
height?: number | undefined;
|
|
176
|
-
} | undefined;
|
|
177
|
-
}>;
|
|
178
|
-
type Organization = z.infer<typeof organizationSchema>;
|
|
179
|
-
declare const clientOrganizationSchema: z.ZodObject<{
|
|
180
|
-
id: z.ZodString;
|
|
181
|
-
name: z.ZodString;
|
|
182
|
-
url: z.ZodOptional<z.ZodString>;
|
|
183
|
-
slug: z.ZodString;
|
|
184
|
-
logo: z.ZodOptional<z.ZodObject<{
|
|
185
|
-
url: z.ZodString;
|
|
186
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
187
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
188
|
-
}, "strip", z.ZodTypeAny, {
|
|
189
|
-
url: string;
|
|
190
|
-
width?: number | undefined;
|
|
191
|
-
height?: number | undefined;
|
|
192
|
-
}, {
|
|
193
|
-
url: string;
|
|
194
|
-
width?: number | undefined;
|
|
195
|
-
height?: number | undefined;
|
|
196
|
-
}>>;
|
|
197
|
-
image: z.ZodOptional<z.ZodObject<{
|
|
198
|
-
url: z.ZodString;
|
|
199
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
200
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
201
|
-
}, "strip", z.ZodTypeAny, {
|
|
202
|
-
url: string;
|
|
203
|
-
width?: number | undefined;
|
|
204
|
-
height?: number | undefined;
|
|
205
|
-
}, {
|
|
206
|
-
url: string;
|
|
207
|
-
width?: number | undefined;
|
|
208
|
-
height?: number | undefined;
|
|
209
|
-
}>>;
|
|
210
|
-
icon: z.ZodOptional<z.ZodObject<{
|
|
211
|
-
url: z.ZodString;
|
|
212
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
213
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
214
|
-
}, "strip", z.ZodTypeAny, {
|
|
215
|
-
url: string;
|
|
216
|
-
width?: number | undefined;
|
|
217
|
-
height?: number | undefined;
|
|
218
|
-
}, {
|
|
219
|
-
url: string;
|
|
220
|
-
width?: number | undefined;
|
|
221
|
-
height?: number | undefined;
|
|
222
|
-
}>>;
|
|
223
|
-
}, "strip", z.ZodTypeAny, {
|
|
224
|
-
id: string;
|
|
225
|
-
name: string;
|
|
226
|
-
slug: string;
|
|
227
|
-
url?: string | undefined;
|
|
228
|
-
logo?: {
|
|
229
|
-
url: string;
|
|
230
|
-
width?: number | undefined;
|
|
231
|
-
height?: number | undefined;
|
|
232
|
-
} | undefined;
|
|
233
|
-
image?: {
|
|
234
|
-
url: string;
|
|
235
|
-
width?: number | undefined;
|
|
236
|
-
height?: number | undefined;
|
|
237
|
-
} | undefined;
|
|
238
|
-
icon?: {
|
|
239
|
-
url: string;
|
|
240
|
-
width?: number | undefined;
|
|
241
|
-
height?: number | undefined;
|
|
242
|
-
} | undefined;
|
|
243
|
-
}, {
|
|
244
|
-
id: string;
|
|
245
|
-
name: string;
|
|
246
|
-
slug: string;
|
|
247
|
-
url?: string | undefined;
|
|
248
|
-
logo?: {
|
|
249
|
-
url: string;
|
|
250
|
-
width?: number | undefined;
|
|
251
|
-
height?: number | undefined;
|
|
252
|
-
} | undefined;
|
|
253
|
-
image?: {
|
|
254
|
-
url: string;
|
|
255
|
-
width?: number | undefined;
|
|
256
|
-
height?: number | undefined;
|
|
257
|
-
} | undefined;
|
|
258
|
-
icon?: {
|
|
259
|
-
url: string;
|
|
260
|
-
width?: number | undefined;
|
|
261
|
-
height?: number | undefined;
|
|
262
|
-
} | undefined;
|
|
263
|
-
}>;
|
|
264
|
-
type ClientOrganization = z.infer<typeof clientOrganizationSchema>;
|
|
265
|
-
|
|
266
|
-
type DatabaseOrganizationUser = {
|
|
267
|
-
UserId: string;
|
|
268
|
-
CustomerId: string;
|
|
269
|
-
RoleId: string;
|
|
270
|
-
};
|
|
271
|
-
declare const organizationUserSchema: z.ZodObject<{
|
|
272
|
-
id: z.ZodString;
|
|
273
|
-
organizationId: z.ZodString;
|
|
274
|
-
roleId: z.ZodString;
|
|
275
|
-
}, "strip", z.ZodTypeAny, {
|
|
276
|
-
id: string;
|
|
277
|
-
organizationId: string;
|
|
278
|
-
roleId: string;
|
|
279
|
-
}, {
|
|
280
|
-
id: string;
|
|
281
|
-
organizationId: string;
|
|
282
|
-
roleId: string;
|
|
283
|
-
}>;
|
|
284
|
-
type OrganizationUser = z.infer<typeof organizationUserSchema>;
|
|
285
|
-
declare const clientOrganizationUserSchema: z.ZodObject<{
|
|
286
|
-
id: z.ZodString;
|
|
287
|
-
organizationId: z.ZodString;
|
|
288
|
-
roleId: z.ZodString;
|
|
289
|
-
}, "strip", z.ZodTypeAny, {
|
|
290
|
-
id: string;
|
|
291
|
-
organizationId: string;
|
|
292
|
-
roleId: string;
|
|
293
|
-
}, {
|
|
294
|
-
id: string;
|
|
295
|
-
organizationId: string;
|
|
296
|
-
roleId: string;
|
|
297
|
-
}>;
|
|
298
|
-
type ClientOrganizationUser = z.infer<typeof clientOrganizationUserSchema>;
|
|
299
|
-
|
|
300
|
-
export { type ClientOrganization, type ClientOrganizationUser, type ClientUser, type DatabaseOrganization, type DatabaseOrganizationUser, type Id, type Image, type Locale, type Name, type Organization, type OrganizationUser, type User, clientOrganizationSchema, clientOrganizationUserSchema, clientUserSchema, idSchema, imageSchema, localeSchema, nameSchema, organizationSchema, organizationUserSchema, userSchema };
|
package/dist/index.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var zod = require('zod');
|
|
4
|
-
|
|
5
|
-
// ../../primitives/id.ts
|
|
6
|
-
var idSchema = zod.z.string().max(50);
|
|
7
|
-
var nameSchema = zod.z.string().max(450);
|
|
8
|
-
var imageSchema = zod.z.object({
|
|
9
|
-
url: zod.z.string().url(),
|
|
10
|
-
width: zod.z.number().int().positive().optional(),
|
|
11
|
-
height: zod.z.number().int().positive().optional()
|
|
12
|
-
});
|
|
13
|
-
var localeSchema = zod.z.string().max(10).default("en");
|
|
14
|
-
var userSchema = zod.z.object({
|
|
15
|
-
id: idSchema,
|
|
16
|
-
organizationIds: zod.z.array(idSchema),
|
|
17
|
-
groupIds: zod.z.array(idSchema),
|
|
18
|
-
name: nameSchema.optional(),
|
|
19
|
-
firstName: nameSchema.optional(),
|
|
20
|
-
lastName: nameSchema.optional(),
|
|
21
|
-
emailAddress: zod.z.string().email().optional(),
|
|
22
|
-
roles: zod.z.array(zod.z.string())
|
|
23
|
-
});
|
|
24
|
-
var clientUserSchema = userSchema.omit({ roles: true }).extend({
|
|
25
|
-
organizationIds: zod.z.array(idSchema).optional()
|
|
26
|
-
});
|
|
27
|
-
var organizationSchema = zod.z.object({
|
|
28
|
-
id: idSchema,
|
|
29
|
-
name: nameSchema,
|
|
30
|
-
url: zod.z.string().url().startsWith("https://").optional(),
|
|
31
|
-
slug: nameSchema,
|
|
32
|
-
logo: imageSchema.optional(),
|
|
33
|
-
image: imageSchema.optional(),
|
|
34
|
-
icon: imageSchema.optional()
|
|
35
|
-
});
|
|
36
|
-
var clientOrganizationSchema = organizationSchema;
|
|
37
|
-
var organizationUserSchema = zod.z.object({
|
|
38
|
-
id: idSchema,
|
|
39
|
-
organizationId: idSchema,
|
|
40
|
-
roleId: idSchema
|
|
41
|
-
});
|
|
42
|
-
var clientOrganizationUserSchema = organizationUserSchema;
|
|
43
|
-
|
|
44
|
-
exports.clientOrganizationSchema = clientOrganizationSchema;
|
|
45
|
-
exports.clientOrganizationUserSchema = clientOrganizationUserSchema;
|
|
46
|
-
exports.clientUserSchema = clientUserSchema;
|
|
47
|
-
exports.idSchema = idSchema;
|
|
48
|
-
exports.imageSchema = imageSchema;
|
|
49
|
-
exports.localeSchema = localeSchema;
|
|
50
|
-
exports.nameSchema = nameSchema;
|
|
51
|
-
exports.organizationSchema = organizationSchema;
|
|
52
|
-
exports.organizationUserSchema = organizationUserSchema;
|
|
53
|
-
exports.userSchema = userSchema;
|
|
54
|
-
//# sourceMappingURL=index.js.map
|
|
55
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../primitives/id.ts","../../../primitives/name.ts","../../../primitives/image.ts","../../../primitives/locale.ts","../types/user.ts","../types/organization.ts","../types/organization-user.ts"],"names":["z"],"mappings":";;;;;AAEO,IAAM,QAAA,GAAWA,KAAA,CAAE,MAAA,EAAO,CAAE,IAAI,EAAE;ACAlC,IAAM,UAAA,GAAaA,KAAAA,CAAE,MAAA,EAAO,CAAE,IAAI,GAAG;ACArC,IAAM,WAAA,GAAcA,MAAE,MAAA,CAAO;AAAA,EAClC,GAAA,EAAKA,KAAAA,CAAE,MAAA,EAAO,CAAE,GAAA,EAAI;AAAA,EACpB,KAAA,EAAOA,MAAE,MAAA,EAAO,CAAE,KAAI,CAAE,QAAA,GAAW,Q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M,IAAM,wBAAA,GAA2B;AClBjC,IAAM,sBAAA,GAAyBA,MAAE,MAAA,CAAO;AAAA,EAC7C,EAAA,EAAI,QAAA;AAAA,EACJ,cAAA,EAAgB,QAAA;AAAA,EAChB,MAAA,EAAQ;AACV,CAAC;AAIM,IAAM,4BAAA,GAA+B","file":"index.js","sourcesContent":["import {z} from 'zod';\n\nexport const idSchema = z.string().max(50);\n\nexport type Id = z.infer<typeof idSchema>;\n","import {z} from 'zod';\n\nexport const nameSchema = z.string().max(450);\n\nexport type Name = z.infer<typeof nameSchema>;\n","import {z} from 'zod';\n\nexport const imageSchema = z.object({\n url: z.string().url(),\n width: z.number().int().positive().optional(),\n height: z.number().int().positive().optional(),\n});\n\nexport type Image = z.infer<typeof imageSchema>;\n","import {z} from 'zod';\n\nexport const localeSchema = z.string().max(10).default('en');\n\nexport type Locale = z.infer<typeof localeSchema>;\n","import {z} from 'zod';\nimport {idSchema} from '../../../primitives/id';\nimport {nameSchema} from '../../../primitives/name';\n\nexport const userSchema = z.object({\n id: idSchema,\n organizationIds: z.array(idSchema),\n groupIds: z.array(idSchema),\n name: nameSchema.optional(),\n firstName: nameSchema.optional(),\n lastName: nameSchema.optional(),\n emailAddress: z.string().email().optional(),\n roles: z.array(z.string()),\n});\n\nexport type User = z.infer<typeof userSchema>;\n\nexport const clientUserSchema = userSchema.omit({roles: true}).extend({\n organizationIds: z.array(idSchema).optional(),\n});\n\nexport type ClientUser = z.infer<typeof clientUserSchema>;\n","import {z} from 'zod';\nimport {idSchema} from '../../../primitives/id';\nimport {nameSchema} from '../../../primitives/name';\nimport {imageSchema} from '../../../primitives/image';\n\nexport type DatabaseOrganization = {\n CustomerId: string;\n Name: string;\n Website?: string;\n Slug: string;\n Logo?: string;\n Image?: string;\n Icon?: string;\n};\n\nexport const organizationSchema = z.object({\n id: idSchema,\n name: nameSchema,\n url: z.string().url().startsWith('https://').optional(),\n slug: nameSchema,\n logo: imageSchema.optional(),\n image: imageSchema.optional(),\n icon: imageSchema.optional(),\n});\n\nexport type Organization = z.infer<typeof organizationSchema>;\n\nexport const clientOrganizationSchema = organizationSchema;\nexport type ClientOrganization = z.infer<typeof clientOrganizationSchema>;\n","import {z} from 'zod';\nimport {idSchema} from '../../../primitives/id';\n\nexport type DatabaseOrganizationUser = {\n UserId: string;\n CustomerId: string;\n RoleId: string;\n};\n\nexport const organizationUserSchema = z.object({\n id: idSchema,\n organizationId: idSchema,\n roleId: idSchema,\n});\n\nexport type OrganizationUser = z.infer<typeof organizationUserSchema>;\n\nexport const clientOrganizationUserSchema = organizationUserSchema;\nexport type ClientOrganizationUser = z.infer<\n typeof clientOrganizationUserSchema\n>;\n"]}
|
package/dist/index.mjs
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
// ../../primitives/id.ts
|
|
4
|
-
var idSchema = z.string().max(50);
|
|
5
|
-
var nameSchema = z.string().max(450);
|
|
6
|
-
var imageSchema = z.object({
|
|
7
|
-
url: z.string().url(),
|
|
8
|
-
width: z.number().int().positive().optional(),
|
|
9
|
-
height: z.number().int().positive().optional()
|
|
10
|
-
});
|
|
11
|
-
var localeSchema = z.string().max(10).default("en");
|
|
12
|
-
var userSchema = z.object({
|
|
13
|
-
id: idSchema,
|
|
14
|
-
organizationIds: z.array(idSchema),
|
|
15
|
-
groupIds: z.array(idSchema),
|
|
16
|
-
name: nameSchema.optional(),
|
|
17
|
-
firstName: nameSchema.optional(),
|
|
18
|
-
lastName: nameSchema.optional(),
|
|
19
|
-
emailAddress: z.string().email().optional(),
|
|
20
|
-
roles: z.array(z.string())
|
|
21
|
-
});
|
|
22
|
-
var clientUserSchema = userSchema.omit({ roles: true }).extend({
|
|
23
|
-
organizationIds: z.array(idSchema).optional()
|
|
24
|
-
});
|
|
25
|
-
var organizationSchema = z.object({
|
|
26
|
-
id: idSchema,
|
|
27
|
-
name: nameSchema,
|
|
28
|
-
url: z.string().url().startsWith("https://").optional(),
|
|
29
|
-
slug: nameSchema,
|
|
30
|
-
logo: imageSchema.optional(),
|
|
31
|
-
image: imageSchema.optional(),
|
|
32
|
-
icon: imageSchema.optional()
|
|
33
|
-
});
|
|
34
|
-
var clientOrganizationSchema = organizationSchema;
|
|
35
|
-
var organizationUserSchema = z.object({
|
|
36
|
-
id: idSchema,
|
|
37
|
-
organizationId: idSchema,
|
|
38
|
-
roleId: idSchema
|
|
39
|
-
});
|
|
40
|
-
var clientOrganizationUserSchema = organizationUserSchema;
|
|
41
|
-
|
|
42
|
-
export { clientOrganizationSchema, clientOrganizationUserSchema, clientUserSchema, idSchema, imageSchema, localeSchema, nameSchema, organizationSchema, organizationUserSchema, userSchema };
|
|
43
|
-
//# sourceMappingURL=index.mjs.map
|
|
44
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../primitives/id.ts","../../../primitives/name.ts","../../../primitives/image.ts","../../../primitives/locale.ts","../types/user.ts","../types/organization.ts","../types/organization-user.ts"],"names":["z"],"mappings":";;;AAEO,IAAM,QAAA,GAAW,CAAA,CAAE,MAAA,EAAO,CAAE,IAAI,EAAE;ACAlC,IAAM,UAAA,GAAaA,CAAAA,CAAE,MAAA,EAAO,CAAE,IAAI,GAAG;ACArC,IAAM,WAAA,GAAcA,EAAE,MAAA,CAAO;AAAA,EAClC,GAAA,EAAKA,CAAAA,CAAE,MAAA,EAAO,CAAE,GAAA,EAAI;AAAA,EACpB,KAAA,EAAOA,EAAE,MAAA,EAAO,CAAE,KAAI,CAAE,QAAA,GAAW,QAAA,EAAS;AAAA,EAC5C,MAAA,EAAQA,EAAE,MAAA,EAAO,CAAE,KAAI,CAAE,QAAA,GAAW,QAAA;AACtC,CAAC;ACJM,IAAM,YAAA,GAAeA,EAAE,MAAA,EAAO,CAAE,IAAI,EAAE,CAAA,CAAE,QAAQ,IAAI;ACEpD,IAAM,UAAA,GAAaA,EAAE,MAAA,C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\nexport const idSchema = z.string().max(50);\n\nexport type Id = z.infer<typeof idSchema>;\n","import {z} from 'zod';\n\nexport const nameSchema = z.string().max(450);\n\nexport type Name = z.infer<typeof nameSchema>;\n","import {z} from 'zod';\n\nexport const imageSchema = z.object({\n url: z.string().url(),\n width: z.number().int().positive().optional(),\n height: z.number().int().positive().optional(),\n});\n\nexport type Image = z.infer<typeof imageSchema>;\n","import {z} from 'zod';\n\nexport const localeSchema = z.string().max(10).default('en');\n\nexport type Locale = z.infer<typeof localeSchema>;\n","import {z} from 'zod';\nimport {idSchema} from '../../../primitives/id';\nimport {nameSchema} from '../../../primitives/name';\n\nexport const userSchema = z.object({\n id: idSchema,\n organizationIds: z.array(idSchema),\n groupIds: z.array(idSchema),\n name: nameSchema.optional(),\n firstName: nameSchema.optional(),\n lastName: nameSchema.optional(),\n emailAddress: z.string().email().optional(),\n roles: z.array(z.string()),\n});\n\nexport type User = z.infer<typeof userSchema>;\n\nexport const clientUserSchema = userSchema.omit({roles: true}).extend({\n organizationIds: z.array(idSchema).optional(),\n});\n\nexport type ClientUser = z.infer<typeof clientUserSchema>;\n","import {z} from 'zod';\nimport {idSchema} from '../../../primitives/id';\nimport {nameSchema} from '../../../primitives/name';\nimport {imageSchema} from '../../../primitives/image';\n\nexport type DatabaseOrganization = {\n CustomerId: string;\n Name: string;\n Website?: string;\n Slug: string;\n Logo?: string;\n Image?: string;\n Icon?: string;\n};\n\nexport const organizationSchema = z.object({\n id: idSchema,\n name: nameSchema,\n url: z.string().url().startsWith('https://').optional(),\n slug: nameSchema,\n logo: imageSchema.optional(),\n image: imageSchema.optional(),\n icon: imageSchema.optional(),\n});\n\nexport type Organization = z.infer<typeof organizationSchema>;\n\nexport const clientOrganizationSchema = organizationSchema;\nexport type ClientOrganization = z.infer<typeof clientOrganizationSchema>;\n","import {z} from 'zod';\nimport {idSchema} from '../../../primitives/id';\n\nexport type DatabaseOrganizationUser = {\n UserId: string;\n CustomerId: string;\n RoleId: string;\n};\n\nexport const organizationUserSchema = z.object({\n id: idSchema,\n organizationId: idSchema,\n roleId: idSchema,\n});\n\nexport type OrganizationUser = z.infer<typeof organizationUserSchema>;\n\nexport const clientOrganizationUserSchema = organizationUserSchema;\nexport type ClientOrganizationUser = z.infer<\n typeof clientOrganizationUserSchema\n>;\n"]}
|