@the-inkwell/shared 0.2.269 → 0.2.270

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.
@@ -804,6 +804,7 @@ export declare const AdminCandidacyListQuerySchema: z.ZodObject<{
804
804
  }>;
805
805
  }, z.core.$strip>>;
806
806
  filter: z.ZodOptional<z.ZodObject<{
807
+ campaignId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
807
808
  personId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
808
809
  positionId: z.ZodOptional<z.ZodUUID>;
809
810
  stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
@@ -83,7 +83,8 @@ exports.AdminCandidacyListQuerySchema = utils_1.ListQuerySchema.extend({
83
83
  filter: exports.AdminCandidacySelectSchema.pick({
84
84
  personId: true,
85
85
  positionId: true,
86
- stage: true
86
+ stage: true,
87
+ campaignId: true
87
88
  })
88
89
  .extend({
89
90
  status: v4_1.z.enum(['open', 'closed']).optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/candidacies/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAUmB;AACnB,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,0BAA0B,GAAG,IAAA,gCAAkB,EAAC,gBAAS,CAAC,CAAA;AAEvE,MAAM,gCAAgC,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;IACvE,EAAE,EAAE,IAAI;IACR,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE,IAAI;CACZ,CAAC,CAAA;AACW,QAAA,0BAA0B,GAAG,IAAA,gCAAkB,EAAC,gBAAS,CAAC,CAAC,MAAM,CAAC;IAC7E,QAAQ,EAAE,MAAC;SACR,MAAM,CA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R,OAAO,EAAE,IAAI;KACd,CAAC,CACH;SACA,QAAQ,EAAE;IACb,KAAK,EAAE,MAAC;SACL,KAAK,CACJ,IAAA,gCAAkB,EAAC,WAAI,CAAC,CAAC,IAAI,CAAC;QAC5B,EAAE,EAAE,IAAI;QACR,OAAO,EAAE,IAAI;KACd,CAAC,CACH;SACA,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,0BAA0B,GAAG,IAAA,gCAAkB,EAAC,gBAAS,CAAC,CAAA;AAE1D,QAAA,0BAA0B,GAAG,kCAA0B,CAAC,IAAI,CAAC;IACxE,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AACW,QAAA,gCAAgC,GAAG,kCAA0B,CAAA;AAC7D,QAAA,gCAAgC,GAAG,kCAA0B,CAAA;AAC7D,QAAA,6BAA6B,GAAG,uBAAe,CAAC,MAAM,CAAC;IAClE,MAAM,EAAE,kCAA0B,CAAC,IAAI,CAAC;QACtC,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;QAChB,KAAK,EAAE,IAAI;KACZ,CAAC;SACC,MAAM,CAAC;QACN,MAAM,EAAE,MAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC7C,eAAe,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACvC,CAAC;SACD,OAAO,EAAE;SACT,QAAQ,EAAE;CACd,CAAC,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport {\n action,\n campaign,\n candidacy,\n candidacyFeedback,\n client,\n note,\n person,\n position,\n tag\n} from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminCandidacyCreateSchema = createInsertSchema(candidacy)\n\nconst AdminCandidacySelectPersonSchema = createSelectSchema(person).pick({\n id: true,\n firstName: true,\n lastName: true,\n fullName: true,\n photoUri: true,\n doNotEngage: true,\n email: true\n})\nexport const AdminCandidacySelectSchema = createSelectSchema(candidacy).extend({\n referral: z\n .object({\n id: z.string(),\n referrer: AdminCandidacySelectPersonSchema\n })\n .nullable()\n .optional(),\n person: AdminCandidacySelectPersonSchema.optional(),\n campaign: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n personId: z.string().optional(),\n position: createSelectSchema(position)\n .pick({\n id: true,\n name: true\n })\n .extend({\n client: createSelectSchema(client).pick({\n id: true,\n name: true\n })\n })\n .optional(),\n ratingTags: z\n .array(\n z.object({\n tag: createSelectSchema(tag).pick({\n id: true,\n slug: true,\n name: true\n })\n })\n )\n .optional(),\n actions: z\n .array(\n createSelectSchema(action).pick({\n id: true,\n name: true\n })\n )\n .optional(),\n candidacyFeedbacks: z\n .array(\n createSelectSchema(candidacyFeedback).pick({\n id: true,\n content: true\n })\n )\n .optional(),\n notes: z\n .array(\n createSelectSchema(note).pick({\n id: true,\n content: true\n })\n )\n .optional()\n})\nexport const AdminCandidacyUpdateSchema = createUpdateSchema(candidacy)\n\nexport const AdminCandidacyParamsSchema = AdminCandidacySelectSchema.pick({\n id: true\n})\nexport const AdminCandidacyUpdateParamsSchema = AdminCandidacyParamsSchema\nexport const AdminCandidacyDeleteParamsSchema = AdminCandidacyParamsSchema\nexport const AdminCandidacyListQuerySchema = ListQuerySchema.extend({\n filter: AdminCandidacySelectSchema.pick({\n personId: true,\n positionId: true,\n stage: true\n })\n .extend({\n status: z.enum(['open', 'closed']).optional(),\n personNameEmail: z.string().optional()\n })\n .partial()\n .optional()\n})\n\n//// types\n\ntype AdminCandidacy = z.infer<typeof AdminCandidacySelectSchema>\n\n// detail\nexport type AdminCandidacyParams = z.infer<typeof AdminCandidacyParamsSchema>\nexport type AdminCandidacyResult = AdminCandidacy\n\n// list\nexport type AdminCandidacyListQuery = z.infer<\n typeof AdminCandidacyListQuerySchema\n>\nexport type AdminCandidacyListResult = ListResponse<\n z.infer<typeof AdminCandidacySelectSchema>\n>\n\n// create\nexport type AdminCandidacyCreateInput = z.infer<\n typeof AdminCandidacyCreateSchema\n>\nexport type AdminCandidacyCreateResult = Pick<AdminCandidacy, 'id'>\n\n// update\nexport type AdminCandidacyUpdateParams = z.infer<\n typeof AdminCandidacyUpdateParamsSchema\n>\nexport type AdminCandidacyUpdateInput = Partial<AdminCandidacy>\n\n// delete\nexport type AdminCandidacyDeleteParams = z.infer<\n typeof AdminCandidacyDeleteParamsSchema\n>\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/candidacies/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAUmB;AACnB,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,0BAA0B,GAAG,IAAA,gCAAkB,EAAC,gBAAS,CAAC,CAAA;AAEvE,MAAM,gCAAgC,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;IACvE,EAAE,EAAE,IAAI;IACR,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE,IAAI;CACZ,CAAC,CAAA;AACW,QAAA,0BAA0B,GAAG,IAAA,gCAAkB,EAAC,gBAAS,CAAC,CAAC,MAAM,CAAC;IAC7E,QAAQ,EAAE,MAAC;SACR,MAAM,CAAC;QACN,EAAE,EAAE,MAAC,CAAC,MAAM,EAAE;QACd,QAAQ,EAAE,gCAAgC;KAC3C,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;IACb,MAAM,EAAE,gCAAgC,CAAC,QAAQ,EAAE;IACnD,QAAQ,EAAE,IAAA,gCAAkB,EAAC,eAAQ,CAAC;SACnC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC;SACD,QAAQ,EAAE;SAC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,QAAA,0BAA0B,GAAG,kCAA0B,CAAC,IAAI,CAAC;IACxE,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AACW,QAAA,gCAAgC,GAAG,kCAA0B,CAAA;AAC7D,QAAA,gCAAgC,GAAG,kCAA0B,CAAA;AAC7D,QAAA,6BAA6B,GAAG,uBAAe,CAAC,MAAM,CAAC;IAClE,MAAM,EAAE,kCAA0B,CAAC,IAAI,CAAC;QACtC,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;QAChB,KAAK,EAAE,IAAI;QACX,UAAU,EAAE,IAAI;KACjB,CAAC;SACC,MAAM,CAAC;QACN,MAAM,EAAE,MAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC7C,eAAe,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACvC,CAAC;SACD,OAAO,EAAE;SACT,QAAQ,EAAE;CACd,CAAC,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport {\n action,\n campaign,\n candidacy,\n candidacyFeedback,\n client,\n note,\n person,\n position,\n tag\n} from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminCandidacyCreateSchema = createInsertSchema(candidacy)\n\nconst AdminCandidacySelectPersonSchema = createSelectSchema(person).pick({\n id: true,\n firstName: true,\n lastName: true,\n fullName: true,\n photoUri: true,\n doNotEngage: true,\n email: true\n})\nexport const AdminCandidacySelectSchema = createSelectSchema(candidacy).extend({\n referral: z\n .object({\n id: z.string(),\n referrer: AdminCandidacySelectPersonSchema\n })\n .nullable()\n .optional(),\n person: AdminCandidacySelectPersonSchema.optional(),\n campaign: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n personId: z.string().optional(),\n position: createSelectSchema(position)\n .pick({\n id: true,\n name: true\n })\n .extend({\n client: createSelectSchema(client).pick({\n id: true,\n name: true\n })\n })\n .optional(),\n ratingTags: z\n .array(\n z.object({\n tag: createSelectSchema(tag).pick({\n id: true,\n slug: true,\n name: true\n })\n })\n )\n .optional(),\n actions: z\n .array(\n createSelectSchema(action).pick({\n id: true,\n name: true\n })\n )\n .optional(),\n candidacyFeedbacks: z\n .array(\n createSelectSchema(candidacyFeedback).pick({\n id: true,\n content: true\n })\n )\n .optional(),\n notes: z\n .array(\n createSelectSchema(note).pick({\n id: true,\n content: true\n })\n )\n .optional()\n})\nexport const AdminCandidacyUpdateSchema = createUpdateSchema(candidacy)\n\nexport const AdminCandidacyParamsSchema = AdminCandidacySelectSchema.pick({\n id: true\n})\nexport const AdminCandidacyUpdateParamsSchema = AdminCandidacyParamsSchema\nexport const AdminCandidacyDeleteParamsSchema = AdminCandidacyParamsSchema\nexport const AdminCandidacyListQuerySchema = ListQuerySchema.extend({\n filter: AdminCandidacySelectSchema.pick({\n personId: true,\n positionId: true,\n stage: true,\n campaignId: true\n })\n .extend({\n status: z.enum(['open', 'closed']).optional(),\n personNameEmail: z.string().optional()\n })\n .partial()\n .optional()\n})\n\n//// types\n\ntype AdminCandidacy = z.infer<typeof AdminCandidacySelectSchema>\n\n// detail\nexport type AdminCandidacyParams = z.infer<typeof AdminCandidacyParamsSchema>\nexport type AdminCandidacyResult = AdminCandidacy\n\n// list\nexport type AdminCandidacyListQuery = z.infer<\n typeof AdminCandidacyListQuerySchema\n>\nexport type AdminCandidacyListResult = ListResponse<\n z.infer<typeof AdminCandidacySelectSchema>\n>\n\n// create\nexport type AdminCandidacyCreateInput = z.infer<\n typeof AdminCandidacyCreateSchema\n>\nexport type AdminCandidacyCreateResult = Pick<AdminCandidacy, 'id'>\n\n// update\nexport type AdminCandidacyUpdateParams = z.infer<\n typeof AdminCandidacyUpdateParamsSchema\n>\nexport type AdminCandidacyUpdateInput = Partial<AdminCandidacy>\n\n// delete\nexport type AdminCandidacyDeleteParams = z.infer<\n typeof AdminCandidacyDeleteParamsSchema\n>\n"]}
@@ -112,118 +112,32 @@ export declare const AdminMatchCreateSchema: import("drizzle-zod").BuildSchema<"
112
112
  generated: undefined;
113
113
  }, {}, {}>;
114
114
  }, undefined, undefined>;
115
- export declare const AdminMatchSelectSchema: import("drizzle-zod").BuildSchema<"select", {
116
- id: import("drizzle-orm/pg-core").PgColumn<{
117
- name: "id";
118
- tableName: "matches";
119
- dataType: "string";
120
- columnType: "PgUUID";
121
- data: string;
122
- driverParam: string;
123
- notNull: true;
124
- hasDefault: true;
125
- isPrimaryKey: true;
126
- isAutoincrement: false;
127
- hasRuntimeDefault: false;
128
- enumValues: undefined;
129
- baseColumn: never;
130
- identity: undefined;
131
- generated: undefined;
132
- }, {}, {}>;
133
- personId: import("drizzle-orm/pg-core").PgColumn<{
134
- name: "personId";
135
- tableName: "matches";
136
- dataType: "string";
137
- columnType: "PgUUID";
138
- data: string;
139
- driverParam: string;
140
- notNull: true;
141
- hasDefault: false;
142
- isPrimaryKey: false;
143
- isAutoincrement: false;
144
- hasRuntimeDefault: false;
145
- enumValues: undefined;
146
- baseColumn: never;
147
- identity: undefined;
148
- generated: undefined;
149
- }, {}, {}>;
150
- positionId: import("drizzle-orm/pg-core").PgColumn<{
151
- name: "positionId";
152
- tableName: "matches";
153
- dataType: "string";
154
- columnType: "PgUUID";
155
- data: string;
156
- driverParam: string;
157
- notNull: true;
158
- hasDefault: false;
159
- isPrimaryKey: false;
160
- isAutoincrement: false;
161
- hasRuntimeDefault: false;
162
- enumValues: undefined;
163
- baseColumn: never;
164
- identity: undefined;
165
- generated: undefined;
166
- }, {}, {}>;
167
- campaignId: import("drizzle-orm/pg-core").PgColumn<{
168
- name: "campaignId";
169
- tableName: "matches";
170
- dataType: "string";
171
- columnType: "PgUUID";
172
- data: string;
173
- driverParam: string;
174
- notNull: false;
175
- hasDefault: false;
176
- isPrimaryKey: false;
177
- isAutoincrement: false;
178
- hasRuntimeDefault: false;
179
- enumValues: undefined;
180
- baseColumn: never;
181
- identity: undefined;
182
- generated: undefined;
183
- }, {}, {}>;
184
- criteria: import("drizzle-orm/pg-core").PgColumn<{
185
- name: "criteria";
186
- tableName: "matches";
187
- dataType: "json";
188
- columnType: "PgJsonb";
189
- data: {
190
- person: Record<any, any>;
191
- referrer: Record<any, any>;
192
- };
193
- driverParam: unknown;
194
- notNull: false;
195
- hasDefault: false;
196
- isPrimaryKey: false;
197
- isAutoincrement: false;
198
- hasRuntimeDefault: false;
199
- enumValues: undefined;
200
- baseColumn: never;
201
- identity: undefined;
202
- generated: undefined;
203
- }, {}, {
204
- $type: {
205
- person: Record<any, any>;
206
- referrer: Record<any, any>;
207
- };
115
+ export declare const AdminMatchSelectSchema: z.ZodObject<{
116
+ id: z.ZodUUID;
117
+ personId: z.ZodUUID;
118
+ positionId: z.ZodUUID;
119
+ campaignId: z.ZodNullable<z.ZodUUID>;
120
+ criteria: z.ZodNullable<z.ZodType<{
121
+ person: Record<any, any>;
122
+ referrer: Record<any, any>;
123
+ }, {
124
+ person: Record<any, any>;
125
+ referrer: Record<any, any>;
126
+ }>>;
127
+ createdAt: z.ZodDate;
128
+ person: z.ZodObject<{
129
+ email: z.ZodString;
130
+ id: z.ZodUUID;
131
+ fullName: z.ZodNullable<z.ZodString>;
132
+ photoUri: z.ZodNullable<z.ZodString>;
133
+ }, {
134
+ out: {};
135
+ in: {};
208
136
  }>;
209
- createdAt: import("drizzle-orm/pg-core").PgColumn<{
210
- name: "createdAt";
211
- tableName: "matches";
212
- dataType: "date";
213
- columnType: "PgTimestamp";
214
- data: Date;
215
- driverParam: string;
216
- notNull: true;
217
- hasDefault: true;
218
- isPrimaryKey: false;
219
- isAutoincrement: false;
220
- hasRuntimeDefault: false;
221
- enumValues: undefined;
222
- baseColumn: never;
223
- identity: undefined;
224
- generated: undefined;
225
- }, {}, {}>;
226
- }, undefined, undefined>;
137
+ }, {
138
+ out: {};
139
+ in: {};
140
+ }>;
227
141
  export declare const AdminMatchUpdateSchema: import("drizzle-zod").BuildSchema<"update", {
228
142
  id: import("drizzle-orm/pg-core").PgColumn<{
229
143
  name: "id";
@@ -7,7 +7,14 @@ const utils_1 = require("../../../utils");
7
7
  const v4_1 = require("zod/v4");
8
8
  //// validators
9
9
  exports.AdminMatchCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.match);
10
- exports.AdminMatchSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.match);
10
+ exports.AdminMatchSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.match).extend({
11
+ person: (0, drizzle_zod_1.createSelectSchema)(core_1.person).pick({
12
+ id: true,
13
+ fullName: true,
14
+ email: true,
15
+ photoUri: true
16
+ })
17
+ });
11
18
  exports.AdminMatchUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.match);
12
19
  exports.AdminMatchParamsSchema = exports.AdminMatchSelectSchema.pick({
13
20
  id: true
@@ -1 +1 @@
1
- {"version":3,"file":"matches.js","sourceRoot":"","sources":["../../../../src/schema/admin/matches/matches.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAAkC;AAClC,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,sBAAsB,GAAG,IAAA,gCAAkB,EAAC,YAAK,CAAC,CAAA;AAClD,QAAA,sBAAsB,GAAG,IAAA,gCAAkB,EAAC,YAAK,CAAC,CAAA;AAClD,QAAA,sBAAsB,GAAG,IAAA,gCAAkB,EAAC,YAAK,CAAC,CAAA;AAElD,QAAA,sBAAsB,GAAG,8BAAsB,CAAC,IAAI,CAAC;IAChE,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AACW,QAAA,yBAAyB,GAAG,uBAAe,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,MAAC;SACN,MAAM,CAAC;QACN,QAAQ,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,UAAU,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACjC,UAAU,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACjC,MAAM,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC9B,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,4BAA4B,GAAG,8BAAsB,CAAA;AACrD,QAAA,4BAA4B,GAAG,8BAAsB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { match } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminMatchCreateSchema = createInsertSchema(match)\nexport const AdminMatchSelectSchema = createSelectSchema(match)\nexport const AdminMatchUpdateSchema = createUpdateSchema(match)\n\nexport const AdminMatchParamsSchema = AdminMatchSelectSchema.pick({\n id: true\n})\nexport const AdminMatchListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n personId: z.string().optional(),\n positionId: z.string().optional(),\n campaignId: z.string().optional(),\n search: z.string().optional()\n })\n .optional()\n})\nexport const AdminMatchUpdateParamsSchema = AdminMatchParamsSchema\nexport const AdminMatchDeleteParamsSchema = AdminMatchParamsSchema\n\n//// types\n\ntype AdminMatch = z.infer<typeof AdminMatchSelectSchema>\n\n// detail\nexport type AdminMatchParams = z.infer<typeof AdminMatchParamsSchema>\nexport type AdminMatchResult = AdminMatch\n\n// list\nexport type AdminMatchListQuery = z.infer<typeof AdminMatchListQuerySchema>\nexport type AdminMatchListResult = ListResponse<\n z.infer<typeof AdminMatchSelectSchema>\n>\n\n// create\nexport type AdminMatchCreateInput = z.infer<typeof AdminMatchCreateSchema>\nexport type AdminMatchCreateResult = Pick<AdminMatch, 'id'>\n\n// update\nexport type AdminMatchUpdateParams = z.infer<\n typeof AdminMatchUpdateParamsSchema\n>\nexport type AdminMatchUpdateInput = z.infer<typeof AdminMatchUpdateSchema>\n\n// delete\nexport type AdminMatchDeleteParams = z.infer<\n typeof AdminMatchDeleteParamsSchema\n>\n"]}
1
+ {"version":3,"file":"matches.js","sourceRoot":"","sources":["../../../../src/schema/admin/matches/matches.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAA0C;AAC1C,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,sBAAsB,GAAG,IAAA,gCAAkB,EAAC,YAAK,CAAC,CAAA;AAClD,QAAA,sBAAsB,GAAG,IAAA,gCAAkB,EAAC,YAAK,CAAC,CAAC,MAAM,CAAC;IACrE,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;QACtC,EAAE,EAAE,IAAI;QACR,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAC,CAAA;AACW,QAAA,sBAAsB,GAAG,IAAA,gCAAkB,EAAC,YAAK,CAAC,CAAA;AAElD,QAAA,sBAAsB,GAAG,8BAAsB,CAAC,IAAI,CAAC;IAChE,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AACW,QAAA,yBAAyB,GAAG,uBAAe,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,MAAC;SACN,MAAM,CAAC;QACN,QAAQ,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,UAAU,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACjC,UAAU,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACjC,MAAM,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC9B,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,4BAA4B,GAAG,8BAAsB,CAAA;AACrD,QAAA,4BAA4B,GAAG,8BAAsB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { match, person } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminMatchCreateSchema = createInsertSchema(match)\nexport const AdminMatchSelectSchema = createSelectSchema(match).extend({\n person: createSelectSchema(person).pick({\n id: true,\n fullName: true,\n email: true,\n photoUri: true\n })\n})\nexport const AdminMatchUpdateSchema = createUpdateSchema(match)\n\nexport const AdminMatchParamsSchema = AdminMatchSelectSchema.pick({\n id: true\n})\nexport const AdminMatchListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n personId: z.string().optional(),\n positionId: z.string().optional(),\n campaignId: z.string().optional(),\n search: z.string().optional()\n })\n .optional()\n})\nexport const AdminMatchUpdateParamsSchema = AdminMatchParamsSchema\nexport const AdminMatchDeleteParamsSchema = AdminMatchParamsSchema\n\n//// types\n\ntype AdminMatch = z.infer<typeof AdminMatchSelectSchema>\n\n// detail\nexport type AdminMatchParams = z.infer<typeof AdminMatchParamsSchema>\nexport type AdminMatchResult = AdminMatch\n\n// list\nexport type AdminMatchListQuery = z.infer<typeof AdminMatchListQuerySchema>\nexport type AdminMatchListResult = ListResponse<\n z.infer<typeof AdminMatchSelectSchema>\n>\n\n// create\nexport type AdminMatchCreateInput = z.infer<typeof AdminMatchCreateSchema>\nexport type AdminMatchCreateResult = Pick<AdminMatch, 'id'>\n\n// update\nexport type AdminMatchUpdateParams = z.infer<\n typeof AdminMatchUpdateParamsSchema\n>\nexport type AdminMatchUpdateInput = z.infer<typeof AdminMatchUpdateSchema>\n\n// delete\nexport type AdminMatchDeleteParams = z.infer<\n typeof AdminMatchDeleteParamsSchema\n>\n"]}
@@ -665,6 +665,7 @@ export declare const AdminReferralListQuerySchema: z.ZodObject<{
665
665
  }, z.core.$strip>>;
666
666
  filter: z.ZodOptional<z.ZodObject<{
667
667
  clientId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
668
+ campaignId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
668
669
  positionId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
669
670
  referrerId: z.ZodOptional<z.ZodUUID>;
670
671
  }, {
@@ -77,7 +77,8 @@ exports.AdminReferralListQuerySchema = utils_1.ListQuerySchema.extend({
77
77
  filter: exports.AdminReferralSelectSchema.pick({
78
78
  referrerId: true,
79
79
  clientId: true,
80
- positionId: true
80
+ positionId: true,
81
+ campaignId: true
81
82
  })
82
83
  .partial()
83
84
  .optional()
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/referrals/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAOmB;AACnB,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,yBAAyB,GAAG,IAAA,gCAAkB,EAAC,eAAQ,CAAC,CAAA;AACxD,QAAA,+BAA+B,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;IAC7E,EAAE,EAAE,IAAI;IACR,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;CACZ,CAAC,CAAA;AACW,QAAA,yBAAyB,GAAG,IAAA,gCAAkB,EAAC,eAAQ,CAAC,CAAC,MAAM,CAAC;IAC3E,QAAQ,EAAE,uCAA+B,CAAC,QAAQ,EAAE;IACpD,SAAS,EAAE,IAAA,gCAAkB,EAAC,gBAAS,CAAC;SACrC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,KAAK,EAAE,IAAI;KACZ,CAAC;SACD,MAAM,CAAC;QACN,MAAM,EAAE,uCAA+B,CAAC,QAAQ,EAAE;KACnD,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;IACb,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC;SAC/B,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;QACV,MAAM,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C;SACC,OAAO,EAAE;SACT,QAAQ,EAAE;CACd,CAAC,CAAA;AAEW,QAAA,+BAA+B,GAAG,iCAAyB,CAAA;AAC3D,QAAA,+BAA+B,GAAG,iCAAyB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport {\n campaign,\n candidacy,\n client,\n person,\n referral,\n referralPayout\n} from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminReferralCreateSchema = createInsertSchema(referral)\nexport const AdminReferralPersonSelectSchema = createSelectSchema(person).pick({\n id: true,\n firstName: true,\n lastName: true,\n fullName: true,\n photoUri: true,\n email: true\n})\nexport const AdminReferralSelectSchema = createSelectSchema(referral).extend({\n referrer: AdminReferralPersonSelectSchema.optional(),\n candidacy: createSelectSchema(candidacy)\n .pick({\n id: true,\n stage: true\n })\n .extend({\n person: AdminReferralPersonSelectSchema.optional()\n })\n .nullable()\n .optional(),\n client: createSelectSchema(client)\n .pick({\n id: true,\n name: true,\n isLead: true\n })\n .nullable()\n .optional(),\n clientPerson: AdminReferralPersonSelectSchema.nullable().optional(),\n campaign: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n position: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\n })\n .extend({\n client: createSelectSchema(client)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional()\n })\n .nullable()\n .optional(),\n payouts: z\n .array(\n createSelectSchema(referralPayout).pick({\n id: true,\n amount: true,\n paidAt: true,\n reason: true\n })\n )\n .nullable()\n .optional()\n})\nexport const AdminReferralUpdateSchema = createUpdateSchema(referral)\n\nexport const AdminReferralParamsSchema = AdminReferralSelectSchema.pick({\n id: true\n})\nexport const AdminReferralListQuerySchema = ListQuerySchema.extend({\n filter: AdminReferralSelectSchema.pick({\n referrerId: true,\n clientId: true,\n positionId: true\n })\n .partial()\n .optional()\n})\n\nexport const AdminReferralUpdateParamsSchema = AdminReferralParamsSchema\nexport const AdminReferralDeleteParamsSchema = AdminReferralParamsSchema\n\n//// types\n\ntype AdminReferral = z.infer<typeof AdminReferralSelectSchema>\n\n// detail\nexport type AdminReferralParams = z.infer<typeof AdminReferralParamsSchema>\nexport type AdminReferralResult = AdminReferral\n\n// list\nexport type AdminReferralListQuery = z.infer<\n typeof AdminReferralListQuerySchema\n>\nexport type AdminReferralListResult = ListResponse<\n z.infer<typeof AdminReferralSelectSchema>\n>\n\n// create\nexport type AdminReferralCreateInput = z.infer<typeof AdminReferralCreateSchema>\nexport type AdminReferralCreateResult = Pick<AdminReferral, 'id'>\n\n// update\nexport type AdminReferralUpdateParams = z.infer<\n typeof AdminReferralUpdateParamsSchema\n>\nexport type AdminReferralUpdateInput = Partial<AdminReferral>\n\n// delete\nexport type AdminReferralDeleteParams = z.infer<\n typeof AdminReferralDeleteParamsSchema\n>\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/referrals/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAOmB;AACnB,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,yBAAyB,GAAG,IAAA,gCAAkB,EAAC,eAAQ,CAAC,CAAA;AACxD,QAAA,+BAA+B,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;IAC7E,EAAE,EAAE,IAAI;IACR,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;CACZ,CAAC,CAAA;AACW,QAAA,yBAAyB,GAAG,IAAA,gCAAkB,EAAC,eAAQ,CAAC,CAAC,MAAM,CAAC;IAC3E,QAAQ,EAAE,uCAA+B,CAAC,QAAQ,EAAE;IACpD,SAAS,EAAE,IAAA,gCAAkB,EAAC,gBAAS,CAAC;SACrC,IAAI,CAAC;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AAC,eAAQ,CAAC,CAAA;AAExD,QAAA,yBAAyB,GAAG,iCAAyB,CAAC,IAAI,CAAC;IACtE,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AACW,QAAA,4BAA4B,GAAG,uBAAe,CAAC,MAAM,CAAC;IACjE,MAAM,EAAE,iCAAyB,CAAC,IAAI,CAAC;QACrC,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;QAChB,UAAU,EAAE,IAAI;KACjB,CAAC;SACC,OAAO,EAAE;SACT,QAAQ,EAAE;CACd,CAAC,CAAA;AAEW,QAAA,+BAA+B,GAAG,iCAAyB,CAAA;AAC3D,QAAA,+BAA+B,GAAG,iCAAyB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport {\n campaign,\n candidacy,\n client,\n person,\n referral,\n referralPayout\n} from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminReferralCreateSchema = createInsertSchema(referral)\nexport const AdminReferralPersonSelectSchema = createSelectSchema(person).pick({\n id: true,\n firstName: true,\n lastName: true,\n fullName: true,\n photoUri: true,\n email: true\n})\nexport const AdminReferralSelectSchema = createSelectSchema(referral).extend({\n referrer: AdminReferralPersonSelectSchema.optional(),\n candidacy: createSelectSchema(candidacy)\n .pick({\n id: true,\n stage: true\n })\n .extend({\n person: AdminReferralPersonSelectSchema.optional()\n })\n .nullable()\n .optional(),\n client: createSelectSchema(client)\n .pick({\n id: true,\n name: true,\n isLead: true\n })\n .nullable()\n .optional(),\n clientPerson: AdminReferralPersonSelectSchema.nullable().optional(),\n campaign: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n position: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\n })\n .extend({\n client: createSelectSchema(client)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional()\n })\n .nullable()\n .optional(),\n payouts: z\n .array(\n createSelectSchema(referralPayout).pick({\n id: true,\n amount: true,\n paidAt: true,\n reason: true\n })\n )\n .nullable()\n .optional()\n})\nexport const AdminReferralUpdateSchema = createUpdateSchema(referral)\n\nexport const AdminReferralParamsSchema = AdminReferralSelectSchema.pick({\n id: true\n})\nexport const AdminReferralListQuerySchema = ListQuerySchema.extend({\n filter: AdminReferralSelectSchema.pick({\n referrerId: true,\n clientId: true,\n positionId: true,\n campaignId: true\n })\n .partial()\n .optional()\n})\n\nexport const AdminReferralUpdateParamsSchema = AdminReferralParamsSchema\nexport const AdminReferralDeleteParamsSchema = AdminReferralParamsSchema\n\n//// types\n\ntype AdminReferral = z.infer<typeof AdminReferralSelectSchema>\n\n// detail\nexport type AdminReferralParams = z.infer<typeof AdminReferralParamsSchema>\nexport type AdminReferralResult = AdminReferral\n\n// list\nexport type AdminReferralListQuery = z.infer<\n typeof AdminReferralListQuerySchema\n>\nexport type AdminReferralListResult = ListResponse<\n z.infer<typeof AdminReferralSelectSchema>\n>\n\n// create\nexport type AdminReferralCreateInput = z.infer<typeof AdminReferralCreateSchema>\nexport type AdminReferralCreateResult = Pick<AdminReferral, 'id'>\n\n// update\nexport type AdminReferralUpdateParams = z.infer<\n typeof AdminReferralUpdateParamsSchema\n>\nexport type AdminReferralUpdateInput = Partial<AdminReferral>\n\n// delete\nexport type AdminReferralDeleteParams = z.infer<\n typeof AdminReferralDeleteParamsSchema\n>\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-inkwell/shared",
3
- "version": "0.2.269",
3
+ "version": "0.2.270",
4
4
  "description": "Shared code for Inkwell",
5
5
  "license": "ISC",
6
6
  "author": "Inkwell (Rob Yedlin & Saimon Alam)",