@the-inkwell/shared 0.2.321 → 0.2.322
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.
|
@@ -7,127 +7,34 @@ export declare const AdminNetworkCreateSchema: z.ZodObject<{
|
|
|
7
7
|
out: {};
|
|
8
8
|
in: {};
|
|
9
9
|
}>;
|
|
10
|
-
export declare const AdminNetworkSelectSchema:
|
|
11
|
-
id:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
isAutoincrement: false;
|
|
39
|
-
hasRuntimeDefault: false;
|
|
40
|
-
enumValues: undefined;
|
|
41
|
-
baseColumn: never;
|
|
42
|
-
identity: undefined;
|
|
43
|
-
generated: undefined;
|
|
44
|
-
}, {}, {}>;
|
|
45
|
-
slug: import("drizzle-orm/pg-core").PgColumn<{
|
|
46
|
-
name: "slug";
|
|
47
|
-
tableName: "networks";
|
|
48
|
-
dataType: "string";
|
|
49
|
-
columnType: "PgText";
|
|
50
|
-
data: string;
|
|
51
|
-
driverParam: string;
|
|
52
|
-
notNull: true;
|
|
53
|
-
hasDefault: false;
|
|
54
|
-
isPrimaryKey: false;
|
|
55
|
-
isAutoincrement: false;
|
|
56
|
-
hasRuntimeDefault: false;
|
|
57
|
-
enumValues: [string, ...string[]];
|
|
58
|
-
baseColumn: never;
|
|
59
|
-
identity: undefined;
|
|
60
|
-
generated: undefined;
|
|
61
|
-
}, {}, {}>;
|
|
62
|
-
name: import("drizzle-orm/pg-core").PgColumn<{
|
|
63
|
-
name: "name";
|
|
64
|
-
tableName: "networks";
|
|
65
|
-
dataType: "string";
|
|
66
|
-
columnType: "PgText";
|
|
67
|
-
data: string;
|
|
68
|
-
driverParam: string;
|
|
69
|
-
notNull: true;
|
|
70
|
-
hasDefault: false;
|
|
71
|
-
isPrimaryKey: false;
|
|
72
|
-
isAutoincrement: false;
|
|
73
|
-
hasRuntimeDefault: false;
|
|
74
|
-
enumValues: [string, ...string[]];
|
|
75
|
-
baseColumn: never;
|
|
76
|
-
identity: undefined;
|
|
77
|
-
generated: undefined;
|
|
78
|
-
}, {}, {}>;
|
|
79
|
-
deletedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
80
|
-
name: "deletedAt";
|
|
81
|
-
tableName: "networks";
|
|
82
|
-
dataType: "date";
|
|
83
|
-
columnType: "PgTimestamp";
|
|
84
|
-
data: Date;
|
|
85
|
-
driverParam: string;
|
|
86
|
-
notNull: false;
|
|
87
|
-
hasDefault: false;
|
|
88
|
-
isPrimaryKey: false;
|
|
89
|
-
isAutoincrement: false;
|
|
90
|
-
hasRuntimeDefault: false;
|
|
91
|
-
enumValues: undefined;
|
|
92
|
-
baseColumn: never;
|
|
93
|
-
identity: undefined;
|
|
94
|
-
generated: undefined;
|
|
95
|
-
}, {}, {}>;
|
|
96
|
-
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
97
|
-
name: "createdAt";
|
|
98
|
-
tableName: "networks";
|
|
99
|
-
dataType: "date";
|
|
100
|
-
columnType: "PgTimestamp";
|
|
101
|
-
data: Date;
|
|
102
|
-
driverParam: string;
|
|
103
|
-
notNull: true;
|
|
104
|
-
hasDefault: true;
|
|
105
|
-
isPrimaryKey: false;
|
|
106
|
-
isAutoincrement: false;
|
|
107
|
-
hasRuntimeDefault: false;
|
|
108
|
-
enumValues: undefined;
|
|
109
|
-
baseColumn: never;
|
|
110
|
-
identity: undefined;
|
|
111
|
-
generated: undefined;
|
|
112
|
-
}, {}, {}>;
|
|
113
|
-
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
114
|
-
name: "updatedAt";
|
|
115
|
-
tableName: "networks";
|
|
116
|
-
dataType: "date";
|
|
117
|
-
columnType: "PgTimestamp";
|
|
118
|
-
data: Date;
|
|
119
|
-
driverParam: string;
|
|
120
|
-
notNull: true;
|
|
121
|
-
hasDefault: true;
|
|
122
|
-
isPrimaryKey: false;
|
|
123
|
-
isAutoincrement: false;
|
|
124
|
-
hasRuntimeDefault: false;
|
|
125
|
-
enumValues: undefined;
|
|
126
|
-
baseColumn: never;
|
|
127
|
-
identity: undefined;
|
|
128
|
-
generated: undefined;
|
|
129
|
-
}, {}, {}>;
|
|
130
|
-
}, undefined, undefined>;
|
|
10
|
+
export declare const AdminNetworkSelectSchema: z.ZodObject<{
|
|
11
|
+
id: z.ZodUUID;
|
|
12
|
+
partnerId: z.ZodNullable<z.ZodUUID>;
|
|
13
|
+
slug: z.ZodString;
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
deletedAt: z.ZodNullable<z.ZodDate>;
|
|
16
|
+
createdAt: z.ZodDate;
|
|
17
|
+
updatedAt: z.ZodDate;
|
|
18
|
+
_peopleCount: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
persons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
20
|
+
personId: z.ZodUUID;
|
|
21
|
+
networkId: z.ZodUUID;
|
|
22
|
+
person: z.ZodNullable<z.ZodObject<{
|
|
23
|
+
email: z.ZodString;
|
|
24
|
+
id: z.ZodUUID;
|
|
25
|
+
fullName: z.ZodNullable<z.ZodString>;
|
|
26
|
+
}, {
|
|
27
|
+
out: {};
|
|
28
|
+
in: {};
|
|
29
|
+
}>>;
|
|
30
|
+
}, {
|
|
31
|
+
out: {};
|
|
32
|
+
in: {};
|
|
33
|
+
}>>>;
|
|
34
|
+
}, {
|
|
35
|
+
out: {};
|
|
36
|
+
in: {};
|
|
37
|
+
}>;
|
|
131
38
|
export declare const AdminNetworkUpdateSchema: z.ZodObject<{
|
|
132
39
|
name: z.ZodOptional<z.ZodString>;
|
|
133
40
|
partnerId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AdminNetworkDeleteParamsSchema = exports.AdminNetworkUpdateParamsSchema = exports.AdminNetworkListQuerySchema = exports.AdminNetworkParamsSchema = exports.AdminNetworkUpdateSchema = exports.AdminNetworkSelectSchema = exports.AdminNetworkCreateSchema = void 0;
|
|
4
4
|
const drizzle_zod_1 = require("drizzle-zod");
|
|
5
5
|
const core_1 = require("../../core");
|
|
6
|
+
const core_2 = require("../../core");
|
|
6
7
|
const utils_1 = require("../../../utils");
|
|
7
8
|
const v4_1 = require("zod/v4");
|
|
8
9
|
//// validators
|
|
@@ -10,7 +11,25 @@ exports.AdminNetworkCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.
|
|
|
10
11
|
name: true,
|
|
11
12
|
partnerId: true
|
|
12
13
|
});
|
|
13
|
-
exports.AdminNetworkSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.network)
|
|
14
|
+
exports.AdminNetworkSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.network).extend({
|
|
15
|
+
_peopleCount: v4_1.z.number().optional(),
|
|
16
|
+
persons: v4_1.z
|
|
17
|
+
.array((0, drizzle_zod_1.createSelectSchema)(core_2.personToNetwork)
|
|
18
|
+
.pick({
|
|
19
|
+
personId: true,
|
|
20
|
+
networkId: true
|
|
21
|
+
})
|
|
22
|
+
.extend({
|
|
23
|
+
person: (0, drizzle_zod_1.createSelectSchema)(core_2.person)
|
|
24
|
+
.pick({
|
|
25
|
+
id: true,
|
|
26
|
+
email: true,
|
|
27
|
+
fullName: true
|
|
28
|
+
})
|
|
29
|
+
.nullable()
|
|
30
|
+
}))
|
|
31
|
+
.optional()
|
|
32
|
+
});
|
|
14
33
|
exports.AdminNetworkUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.network).pick({
|
|
15
34
|
name: true,
|
|
16
35
|
partnerId: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/networks/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAAoC;AACpC,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,wBAAwB,GAAG,IAAA,gCAAkB,EAAC,cAAO,CAAC,CAAC,IAAI,CAAC;IACvE,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,IAAI;CAChB,CAAC,CAAA;AACW,QAAA,wBAAwB,GAAG,IAAA,gCAAkB,EAAC,cAAO,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/networks/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAAoC;AACpC,qCAAoD;AACpD,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,wBAAwB,GAAG,IAAA,gCAAkB,EAAC,cAAO,CAAC,CAAC,IAAI,CAAC;IACvE,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,IAAI;CAChB,CAAC,CAAA;AACW,QAAA,wBAAwB,GAAG,IAAA,gCAAkB,EAAC,cAAO,CAAC,CAAC,MAAM,CAAC;IACzE,YAAY,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,OAAO,EAAE,MAAC;SACP,KAAK,CACJ,IAAA,gCAAkB,EAAC,sBAAe,CAAC;SAChC,IAAI,CAAC;QACJ,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,IAAI;KAChB,CAAC;SACD,MAAM,CAAC;QACN,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC;aAC/B,IAAI,CAAC;YACJ,EAAE,EAAE,IAAI;YACR,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,IAAI;SACf,CAAC;aACD,QAAQ,EAAE;KACd,CAAC,CACL;SACA,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,wBAAwB,GAAG,IAAA,gCAAkB,EAAC,cAAO,CAAC,CAAC,IAAI,CAAC;IACvE,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,IAAI;CAChB,CAAC,CAAA;AAEW,QAAA,wBAAwB,GAAG,gCAAwB,CAAC,IAAI,CAAC;IACpE,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AACW,QAAA,2BAA2B,GAAG,uBAAe,CAAC,MAAM,CAAC;IAChE,MAAM,EAAE,MAAC;SACN,MAAM,CAAC;QACN,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC5B,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,8BAA8B,GAAG,gCAAwB,CAAA;AACzD,QAAA,8BAA8B,GAAG,gCAAwB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { network } from '../../core'\nimport { person, personToNetwork } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminNetworkCreateSchema = createInsertSchema(network).pick({\n name: true,\n partnerId: true\n})\nexport const AdminNetworkSelectSchema = createSelectSchema(network).extend({\n _peopleCount: z.number().optional(),\n persons: z\n .array(\n createSelectSchema(personToNetwork)\n .pick({\n personId: true,\n networkId: true\n })\n .extend({\n person: createSelectSchema(person)\n .pick({\n id: true,\n email: true,\n fullName: true\n })\n .nullable()\n })\n )\n .optional()\n})\nexport const AdminNetworkUpdateSchema = createUpdateSchema(network).pick({\n name: true,\n partnerId: true\n})\n\nexport const AdminNetworkParamsSchema = AdminNetworkSelectSchema.pick({\n id: true\n})\nexport const AdminNetworkListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n name: z.string().optional()\n })\n .optional()\n})\nexport const AdminNetworkUpdateParamsSchema = AdminNetworkParamsSchema\nexport const AdminNetworkDeleteParamsSchema = AdminNetworkParamsSchema\n\n//// types\n\ntype AdminNetwork = z.infer<typeof AdminNetworkSelectSchema>\n\n// detail\nexport type AdminNetworkParams = z.infer<typeof AdminNetworkParamsSchema>\nexport type AdminNetworkResult = AdminNetwork\n\n// list\nexport type AdminNetworkListQuery = z.infer<typeof AdminNetworkListQuerySchema>\nexport type AdminNetworkListResult = ListResponse<AdminNetwork>\n\n// create\nexport type AdminNetworkCreateInput = z.infer<typeof AdminNetworkCreateSchema>\nexport type AdminNetworkCreateResult = Pick<AdminNetwork, 'id'>\n\n// update\nexport type AdminNetworkUpdateParams = z.infer<\n typeof AdminNetworkUpdateParamsSchema\n>\nexport type AdminNetworkUpdateInput = z.infer<typeof AdminNetworkUpdateSchema>\n\n// delete\nexport type AdminNetworkDeleteParams = z.infer<\n typeof AdminNetworkDeleteParamsSchema\n>\n"]}
|