@new-project-media/client-frontends-shared-types 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/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "@new-project-media/client-frontends-shared-types",
3
+ "version": "1.0.1",
4
+ "scripts": {
5
+ "build": "tsc -p tsconfig.json",
6
+ "postbuild": "mkdir -p ../../dist/packages/client-frontends-shared-types/ && cp package.json ../../dist/packages/client-frontends-shared-types/",
7
+ "build-and-copy": "pnpm run build && pnpm run postbuild"
8
+ },
9
+ "main": "./src/index.js",
10
+ "typings": "./src/index.d.ts"
11
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './lib/charts';
2
+ export * from './lib/dataGrid';
3
+ export * from './lib/userDateFormat';
package/src/index.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./lib/charts"), exports);
5
+ tslib_1.__exportStar(require("./lib/dataGrid"), exports);
6
+ tslib_1.__exportStar(require("./lib/userDateFormat"), exports);
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/client-frontends-shared-types/src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,yDAA8B;AAC9B,+DAAoC"}
@@ -0,0 +1,14 @@
1
+ export declare enum ChartAggregations {
2
+ type = "type",
3
+ subType = "subType",
4
+ sectors = "sectors",
5
+ state = "state",
6
+ county = "county",
7
+ developers = "developers",
8
+ keyPeople = "keyPeople"
9
+ }
10
+ export declare enum ChartMode {
11
+ Primary = "primary",
12
+ Secondary = "secondary",
13
+ Frozen = "frozen"
14
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChartMode = exports.ChartAggregations = void 0;
4
+ var ChartAggregations;
5
+ (function (ChartAggregations) {
6
+ ChartAggregations["type"] = "type";
7
+ ChartAggregations["subType"] = "subType";
8
+ ChartAggregations["sectors"] = "sectors";
9
+ ChartAggregations["state"] = "state";
10
+ ChartAggregations["county"] = "county";
11
+ ChartAggregations["developers"] = "developers";
12
+ ChartAggregations["keyPeople"] = "keyPeople";
13
+ })(ChartAggregations || (exports.ChartAggregations = ChartAggregations = {}));
14
+ var ChartMode;
15
+ (function (ChartMode) {
16
+ ChartMode["Primary"] = "primary";
17
+ ChartMode["Secondary"] = "secondary";
18
+ ChartMode["Frozen"] = "frozen";
19
+ })(ChartMode || (exports.ChartMode = ChartMode = {}));
20
+ //# sourceMappingURL=charts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"charts.js","sourceRoot":"","sources":["../../../../../packages/client-frontends-shared-types/src/lib/charts.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAQX;AARD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,wCAAmB,CAAA;IACnB,wCAAmB,CAAA;IACnB,oCAAe,CAAA;IACf,sCAAiB,CAAA;IACjB,8CAAyB,CAAA;IACzB,4CAAuB,CAAA;AACzB,CAAC,EARW,iBAAiB,iCAAjB,iBAAiB,QAQ5B;AAED,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,oCAAuB,CAAA;IACvB,8BAAiB,CAAA;AACnB,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB"}
@@ -0,0 +1,107 @@
1
+ export type CommonItem = {
2
+ identifier: string;
3
+ id: string;
4
+ parentId?: string;
5
+ };
6
+ export type AggregationBucket = {
7
+ key: string;
8
+ id?: string;
9
+ doc_count: number;
10
+ sectors?: AggregationItem;
11
+ allSectors?: AggregationItem;
12
+ type?: AggregationItem;
13
+ subType?: AggregationItem;
14
+ state?: AggregationItem;
15
+ county?: AggregationItem;
16
+ audiences?: AggregationItem;
17
+ };
18
+ export type NestedAggregation = {
19
+ doc_count: number;
20
+ nested?: AggregationItem;
21
+ };
22
+ export type HitSource = {
23
+ identifier: string;
24
+ id: string;
25
+ };
26
+ export type Hit = {
27
+ _index: string;
28
+ _id: string;
29
+ _nested: unknown;
30
+ _score: number;
31
+ _source: HitSource;
32
+ };
33
+ export type Hits = {
34
+ total: {
35
+ value: number;
36
+ relation: string;
37
+ };
38
+ max_score: number;
39
+ hits: Hit[];
40
+ };
41
+ export type Details = {
42
+ hits: Hits;
43
+ };
44
+ export type NestedAggregationBucket = {
45
+ key: string;
46
+ doc_count: number;
47
+ details: Details;
48
+ reverse_to_root: AggregationBucket;
49
+ };
50
+ export type AggregationItem = {
51
+ doc_count_error_upper_bound: number;
52
+ sum_other_doc_count: number;
53
+ buckets: AggregationBucket[];
54
+ };
55
+ export type FilteredAggregation = {
56
+ doc_count: number;
57
+ filter_aggs?: NestedAggregation;
58
+ };
59
+ export type NestedFilteredAggregation = {
60
+ doc_count: number;
61
+ nested: AggregationItem;
62
+ };
63
+ export type AggregationBuckets = Record<string, AggregationItem | FilteredAggregation | NestedFilteredAggregation>;
64
+ export interface ChartAggregationBucket {
65
+ key: string;
66
+ doc_count: number;
67
+ [key: string]: number | string;
68
+ }
69
+ export declare const isAggregationItem: (item: AggregationItem | FilteredAggregation | undefined) => item is AggregationItem;
70
+ type AggregationParam = {
71
+ primary: string;
72
+ secondary?: string;
73
+ };
74
+ export type ClientApiListRequestQueryParams = {
75
+ page?: number;
76
+ filters?: Array<{
77
+ field: string;
78
+ value: string | string[];
79
+ }>;
80
+ ranges?: Array<{
81
+ field: string;
82
+ to?: string;
83
+ from?: string;
84
+ }>;
85
+ aggregations?: AggregationParam[];
86
+ searchTerm?: string;
87
+ existsFilters?: string[];
88
+ fieldsToSearch?: string[];
89
+ sortBy?: {
90
+ field: string;
91
+ direction: string;
92
+ };
93
+ source?: string[];
94
+ };
95
+ export type ClientApiListRequest = {
96
+ queryType: string;
97
+ queryParams: ClientApiListRequestQueryParams;
98
+ };
99
+ export type ClientApiListResponse<T> = {
100
+ paging: {
101
+ page: number;
102
+ total: number;
103
+ };
104
+ data: T[];
105
+ aggregations?: Record<string, AggregationItem | FilteredAggregation>;
106
+ };
107
+ export {};
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isAggregationItem = void 0;
4
+ const isAggregationItem = (item) => {
5
+ return !!item && 'buckets' in item;
6
+ };
7
+ exports.isAggregationItem = isAggregationItem;
8
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../../packages/client-frontends-shared-types/src/lib/dataGrid/api/common.ts"],"names":[],"mappings":";;;AAmFO,MAAM,iBAAiB,GAAG,CAC/B,IAAuD,EAC9B,EAAE;IAC3B,OAAO,CAAC,CAAC,IAAI,IAAI,SAAS,IAAI,IAAI,CAAA;AACpC,CAAC,CAAA;AAJY,QAAA,iBAAiB,qBAI7B"}
@@ -0,0 +1,402 @@
1
+ import { z } from 'zod';
2
+ export declare const EntityItemSchema: z.ZodObject<{
3
+ identifier: z.ZodString;
4
+ id: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ identifier?: string;
7
+ id?: string;
8
+ }, {
9
+ identifier?: string;
10
+ id?: string;
11
+ }>;
12
+ export declare const OrganizationItemSchema: z.ZodObject<z.objectUtil.extendShape<{
13
+ identifier: z.ZodString;
14
+ id: z.ZodString;
15
+ }, {
16
+ role: z.ZodString;
17
+ }>, "strip", z.ZodTypeAny, {
18
+ identifier?: string;
19
+ id?: string;
20
+ role?: string;
21
+ }, {
22
+ identifier?: string;
23
+ id?: string;
24
+ role?: string;
25
+ }>;
26
+ export declare const OrganizationSchema: z.ZodOptional<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
27
+ identifier: z.ZodString;
28
+ id: z.ZodString;
29
+ }, {
30
+ role: z.ZodString;
31
+ }>, "strip", z.ZodTypeAny, {
32
+ identifier?: string;
33
+ id?: string;
34
+ role?: string;
35
+ }, {
36
+ identifier?: string;
37
+ id?: string;
38
+ role?: string;
39
+ }>, "many">>;
40
+ export type OrganizationType = z.infer<typeof OrganizationSchema>;
41
+ export declare const EntityItemArraySchema: z.ZodArray<z.ZodObject<{
42
+ identifier: z.ZodString;
43
+ id: z.ZodString;
44
+ }, "strip", z.ZodTypeAny, {
45
+ identifier?: string;
46
+ id?: string;
47
+ }, {
48
+ identifier?: string;
49
+ id?: string;
50
+ }>, "many">;
51
+ export type EntityItemArrayType = z.infer<typeof EntityItemArraySchema>;
52
+ export declare const EntityItemArrayOptionalSchema: z.ZodOptional<z.ZodArray<z.ZodObject<{
53
+ identifier: z.ZodString;
54
+ id: z.ZodString;
55
+ }, "strip", z.ZodTypeAny, {
56
+ identifier?: string;
57
+ id?: string;
58
+ }, {
59
+ identifier?: string;
60
+ id?: string;
61
+ }>, "many">>;
62
+ export type EntityItemArrayOptionalSchemaType = z.infer<typeof EntityItemArrayOptionalSchema>;
63
+ export declare const OptionalStringSchema: z.ZodOptional<z.ZodString>;
64
+ export declare const OptionalNumberSchema: z.ZodOptional<z.ZodNumber>;
65
+ export declare const YYYYMMDDRegex: RegExp;
66
+ export declare const YYYYMMDDRegexSchema: z.ZodEffects<z.ZodString, string, string>;
67
+ export declare const YYYYMMDDRegexOptionalSchema: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
68
+ export declare const QueueJoinSchema: z.ZodArray<z.ZodObject<{
69
+ queueKey: z.ZodOptional<z.ZodString>;
70
+ applicationId: z.ZodOptional<z.ZodString>;
71
+ queueDataset: z.ZodOptional<z.ZodString>;
72
+ id: z.ZodString;
73
+ identifier: z.ZodString;
74
+ }, "strip", z.ZodTypeAny, {
75
+ identifier?: string;
76
+ id?: string;
77
+ queueKey?: string;
78
+ applicationId?: string;
79
+ queueDataset?: string;
80
+ }, {
81
+ identifier?: string;
82
+ id?: string;
83
+ queueKey?: string;
84
+ applicationId?: string;
85
+ queueDataset?: string;
86
+ }>, "many">;
87
+ export declare const QueueJoinOptionalSchema: z.ZodOptional<z.ZodArray<z.ZodObject<{
88
+ queueKey: z.ZodOptional<z.ZodString>;
89
+ applicationId: z.ZodOptional<z.ZodString>;
90
+ queueDataset: z.ZodOptional<z.ZodString>;
91
+ id: z.ZodString;
92
+ identifier: z.ZodString;
93
+ }, "strip", z.ZodTypeAny, {
94
+ identifier?: string;
95
+ id?: string;
96
+ queueKey?: string;
97
+ applicationId?: string;
98
+ queueDataset?: string;
99
+ }, {
100
+ identifier?: string;
101
+ id?: string;
102
+ queueKey?: string;
103
+ applicationId?: string;
104
+ queueDataset?: string;
105
+ }>, "many">>;
106
+ export type QueueJoinOptionalSchemaType = z.infer<typeof QueueJoinOptionalSchema>;
107
+ export declare const LinkedPeopleSchema: z.ZodArray<z.ZodObject<{
108
+ id: z.ZodOptional<z.ZodString>;
109
+ identifier: z.ZodOptional<z.ZodString>;
110
+ linkedinUrl: z.ZodOptional<z.ZodString>;
111
+ role: z.ZodOptional<z.ZodString>;
112
+ fullName: z.ZodOptional<z.ZodString>;
113
+ email: z.ZodOptional<z.ZodString>;
114
+ phone: z.ZodOptional<z.ZodString>;
115
+ source: z.ZodOptional<z.ZodString>;
116
+ }, "strip", z.ZodTypeAny, {
117
+ identifier?: string;
118
+ id?: string;
119
+ role?: string;
120
+ linkedinUrl?: string;
121
+ fullName?: string;
122
+ email?: string;
123
+ phone?: string;
124
+ source?: string;
125
+ }, {
126
+ identifier?: string;
127
+ id?: string;
128
+ role?: string;
129
+ linkedinUrl?: string;
130
+ fullName?: string;
131
+ email?: string;
132
+ phone?: string;
133
+ source?: string;
134
+ }>, "many">;
135
+ export declare const LinkedPeopleOptionalSchema: z.ZodOptional<z.ZodArray<z.ZodObject<{
136
+ id: z.ZodOptional<z.ZodString>;
137
+ identifier: z.ZodOptional<z.ZodString>;
138
+ linkedinUrl: z.ZodOptional<z.ZodString>;
139
+ role: z.ZodOptional<z.ZodString>;
140
+ fullName: z.ZodOptional<z.ZodString>;
141
+ email: z.ZodOptional<z.ZodString>;
142
+ phone: z.ZodOptional<z.ZodString>;
143
+ source: z.ZodOptional<z.ZodString>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ identifier?: string;
146
+ id?: string;
147
+ role?: string;
148
+ linkedinUrl?: string;
149
+ fullName?: string;
150
+ email?: string;
151
+ phone?: string;
152
+ source?: string;
153
+ }, {
154
+ identifier?: string;
155
+ id?: string;
156
+ role?: string;
157
+ linkedinUrl?: string;
158
+ fullName?: string;
159
+ email?: string;
160
+ phone?: string;
161
+ source?: string;
162
+ }>, "many">>;
163
+ export type LinkedPeopleOptionalSchemaType = z.infer<typeof LinkedPeopleOptionalSchema>;
164
+ export declare const AddressSchema: z.ZodObject<{
165
+ full: z.ZodOptional<z.ZodString>;
166
+ city: z.ZodOptional<z.ZodString>;
167
+ state: z.ZodOptional<z.ZodString>;
168
+ street: z.ZodOptional<z.ZodString>;
169
+ street2: z.ZodOptional<z.ZodString>;
170
+ zip: z.ZodOptional<z.ZodString>;
171
+ country: z.ZodOptional<z.ZodString>;
172
+ latitude: z.ZodOptional<z.ZodNumber>;
173
+ longitude: z.ZodOptional<z.ZodNumber>;
174
+ }, "strip", z.ZodTypeAny, {
175
+ state?: string;
176
+ full?: string;
177
+ city?: string;
178
+ street?: string;
179
+ street2?: string;
180
+ zip?: string;
181
+ country?: string;
182
+ latitude?: number;
183
+ longitude?: number;
184
+ }, {
185
+ state?: string;
186
+ full?: string;
187
+ city?: string;
188
+ street?: string;
189
+ street2?: string;
190
+ zip?: string;
191
+ country?: string;
192
+ latitude?: number;
193
+ longitude?: number;
194
+ }>;
195
+ export declare const OptionalAddressSchema: z.ZodOptional<z.ZodObject<{
196
+ full: z.ZodOptional<z.ZodString>;
197
+ city: z.ZodOptional<z.ZodString>;
198
+ state: z.ZodOptional<z.ZodString>;
199
+ street: z.ZodOptional<z.ZodString>;
200
+ street2: z.ZodOptional<z.ZodString>;
201
+ zip: z.ZodOptional<z.ZodString>;
202
+ country: z.ZodOptional<z.ZodString>;
203
+ latitude: z.ZodOptional<z.ZodNumber>;
204
+ longitude: z.ZodOptional<z.ZodNumber>;
205
+ }, "strip", z.ZodTypeAny, {
206
+ state?: string;
207
+ full?: string;
208
+ city?: string;
209
+ street?: string;
210
+ street2?: string;
211
+ zip?: string;
212
+ country?: string;
213
+ latitude?: number;
214
+ longitude?: number;
215
+ }, {
216
+ state?: string;
217
+ full?: string;
218
+ city?: string;
219
+ street?: string;
220
+ street2?: string;
221
+ zip?: string;
222
+ country?: string;
223
+ latitude?: number;
224
+ longitude?: number;
225
+ }>>;
226
+ export type OptionalAddressType = z.infer<typeof OptionalAddressSchema>;
227
+ export declare const DocumentS3RecordSchema: z.ZodArray<z.ZodObject<{
228
+ filename: z.ZodString;
229
+ created: z.ZodEffects<z.ZodString, string, string>;
230
+ document_id: z.ZodString;
231
+ mimeType: z.ZodString;
232
+ type: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
233
+ key: z.ZodOptional<z.ZodString>;
234
+ userName: z.ZodOptional<z.ZodString>;
235
+ }, "strip", z.ZodTypeAny, {
236
+ type?: string[];
237
+ key?: string;
238
+ filename?: string;
239
+ created?: string;
240
+ document_id?: string;
241
+ mimeType?: string;
242
+ userName?: string;
243
+ }, {
244
+ type?: string[];
245
+ key?: string;
246
+ filename?: string;
247
+ created?: string;
248
+ document_id?: string;
249
+ mimeType?: string;
250
+ userName?: string;
251
+ }>, "many">;
252
+ export declare const OptionalS3DocumentSchema: z.ZodOptional<z.ZodArray<z.ZodObject<{
253
+ filename: z.ZodString;
254
+ created: z.ZodEffects<z.ZodString, string, string>;
255
+ document_id: z.ZodString;
256
+ mimeType: z.ZodString;
257
+ type: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
258
+ key: z.ZodOptional<z.ZodString>;
259
+ userName: z.ZodOptional<z.ZodString>;
260
+ }, "strip", z.ZodTypeAny, {
261
+ type?: string[];
262
+ key?: string;
263
+ filename?: string;
264
+ created?: string;
265
+ document_id?: string;
266
+ mimeType?: string;
267
+ userName?: string;
268
+ }, {
269
+ type?: string[];
270
+ key?: string;
271
+ filename?: string;
272
+ created?: string;
273
+ document_id?: string;
274
+ mimeType?: string;
275
+ userName?: string;
276
+ }>, "many">>;
277
+ export type OptionalS3DocumentType = z.infer<typeof OptionalS3DocumentSchema>;
278
+ export declare const DocumentLinkSchema: z.ZodArray<z.ZodObject<{
279
+ file: z.ZodOptional<z.ZodString>;
280
+ url: z.ZodString;
281
+ created: z.ZodOptional<z.ZodString>;
282
+ type: z.ZodArray<z.ZodString, "many">;
283
+ documentDate: z.ZodEffects<z.ZodString, string, string>;
284
+ source: z.ZodOptional<z.ZodString>;
285
+ id: z.ZodOptional<z.ZodString>;
286
+ }, "strip", z.ZodTypeAny, {
287
+ type?: string[];
288
+ id?: string;
289
+ source?: string;
290
+ created?: string;
291
+ file?: string;
292
+ url?: string;
293
+ documentDate?: string;
294
+ }, {
295
+ type?: string[];
296
+ id?: string;
297
+ source?: string;
298
+ created?: string;
299
+ file?: string;
300
+ url?: string;
301
+ documentDate?: string;
302
+ }>, "many">;
303
+ export declare const OptionalDocumentLinkSchema: z.ZodOptional<z.ZodArray<z.ZodObject<{
304
+ file: z.ZodOptional<z.ZodString>;
305
+ url: z.ZodString;
306
+ created: z.ZodOptional<z.ZodString>;
307
+ type: z.ZodArray<z.ZodString, "many">;
308
+ documentDate: z.ZodEffects<z.ZodString, string, string>;
309
+ source: z.ZodOptional<z.ZodString>;
310
+ id: z.ZodOptional<z.ZodString>;
311
+ }, "strip", z.ZodTypeAny, {
312
+ type?: string[];
313
+ id?: string;
314
+ source?: string;
315
+ created?: string;
316
+ file?: string;
317
+ url?: string;
318
+ documentDate?: string;
319
+ }, {
320
+ type?: string[];
321
+ id?: string;
322
+ source?: string;
323
+ created?: string;
324
+ file?: string;
325
+ url?: string;
326
+ documentDate?: string;
327
+ }>, "many">>;
328
+ export type OptionalDocumentLinkType = z.infer<typeof OptionalDocumentLinkSchema>;
329
+ export declare const DocumentRecordSchema: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
330
+ filename: z.ZodString;
331
+ created: z.ZodEffects<z.ZodString, string, string>;
332
+ document_id: z.ZodString;
333
+ mimeType: z.ZodString;
334
+ type: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
335
+ key: z.ZodOptional<z.ZodString>;
336
+ userName: z.ZodOptional<z.ZodString>;
337
+ }, "strip", z.ZodTypeAny, {
338
+ type?: string[];
339
+ key?: string;
340
+ filename?: string;
341
+ created?: string;
342
+ document_id?: string;
343
+ mimeType?: string;
344
+ userName?: string;
345
+ }, {
346
+ type?: string[];
347
+ key?: string;
348
+ filename?: string;
349
+ created?: string;
350
+ document_id?: string;
351
+ mimeType?: string;
352
+ userName?: string;
353
+ }>, "many">, z.ZodArray<z.ZodObject<{
354
+ file: z.ZodOptional<z.ZodString>;
355
+ url: z.ZodString;
356
+ created: z.ZodOptional<z.ZodString>;
357
+ type: z.ZodArray<z.ZodString, "many">;
358
+ documentDate: z.ZodEffects<z.ZodString, string, string>;
359
+ source: z.ZodOptional<z.ZodString>;
360
+ id: z.ZodOptional<z.ZodString>;
361
+ }, "strip", z.ZodTypeAny, {
362
+ type?: string[];
363
+ id?: string;
364
+ source?: string;
365
+ created?: string;
366
+ file?: string;
367
+ url?: string;
368
+ documentDate?: string;
369
+ }, {
370
+ type?: string[];
371
+ id?: string;
372
+ source?: string;
373
+ created?: string;
374
+ file?: string;
375
+ url?: string;
376
+ documentDate?: string;
377
+ }>, "many">]>>;
378
+ export type DocumentRecordType = z.infer<typeof DocumentRecordSchema>;
379
+ export type DocumentS3RecordType = z.infer<typeof DocumentS3RecordSchema>[number];
380
+ export declare const GeoSchema: z.ZodObject<{
381
+ project: z.ZodObject<{
382
+ lon: z.ZodNumber;
383
+ lat: z.ZodNumber;
384
+ }, "strip", z.ZodTypeAny, {
385
+ lon?: number;
386
+ lat?: number;
387
+ }, {
388
+ lon?: number;
389
+ lat?: number;
390
+ }>;
391
+ }, "strip", z.ZodTypeAny, {
392
+ project?: {
393
+ lon?: number;
394
+ lat?: number;
395
+ };
396
+ }, {
397
+ project?: {
398
+ lon?: number;
399
+ lat?: number;
400
+ };
401
+ }>;
402
+ export type Geo = z.infer<typeof GeoSchema>;
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GeoSchema = exports.DocumentRecordSchema = exports.OptionalDocumentLinkSchema = exports.DocumentLinkSchema = exports.OptionalS3DocumentSchema = exports.DocumentS3RecordSchema = exports.OptionalAddressSchema = exports.AddressSchema = exports.LinkedPeopleOptionalSchema = exports.LinkedPeopleSchema = exports.QueueJoinOptionalSchema = exports.QueueJoinSchema = exports.YYYYMMDDRegexOptionalSchema = exports.YYYYMMDDRegexSchema = exports.YYYYMMDDRegex = exports.OptionalNumberSchema = exports.OptionalStringSchema = exports.EntityItemArrayOptionalSchema = exports.EntityItemArraySchema = exports.OrganizationSchema = exports.OrganizationItemSchema = exports.EntityItemSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.EntityItemSchema = zod_1.z.object({
6
+ identifier: zod_1.z.string().min(1),
7
+ id: zod_1.z.string().min(1),
8
+ });
9
+ exports.OrganizationItemSchema = exports.EntityItemSchema.extend({
10
+ role: zod_1.z.string().min(1),
11
+ });
12
+ exports.OrganizationSchema = zod_1.z.array(exports.OrganizationItemSchema).optional();
13
+ exports.EntityItemArraySchema = zod_1.z.array(exports.EntityItemSchema);
14
+ exports.EntityItemArrayOptionalSchema = exports.EntityItemArraySchema.optional();
15
+ exports.OptionalStringSchema = zod_1.z.string().optional();
16
+ exports.OptionalNumberSchema = zod_1.z.number().optional();
17
+ exports.YYYYMMDDRegex = /([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))/;
18
+ exports.YYYYMMDDRegexSchema = zod_1.z
19
+ .string()
20
+ .refine((value) => exports.YYYYMMDDRegex.test(value), {
21
+ message: 'Invalid date format',
22
+ });
23
+ exports.YYYYMMDDRegexOptionalSchema = exports.YYYYMMDDRegexSchema.optional().nullable();
24
+ exports.QueueJoinSchema = zod_1.z
25
+ .object({
26
+ queueKey: exports.OptionalStringSchema,
27
+ applicationId: exports.OptionalStringSchema,
28
+ queueDataset: exports.OptionalStringSchema,
29
+ id: zod_1.z.string(),
30
+ identifier: zod_1.z.string(),
31
+ })
32
+ .array();
33
+ exports.QueueJoinOptionalSchema = exports.QueueJoinSchema.optional();
34
+ exports.LinkedPeopleSchema = zod_1.z
35
+ .object({
36
+ id: exports.OptionalStringSchema,
37
+ identifier: exports.OptionalStringSchema,
38
+ linkedinUrl: (0, zod_1.optional)(zod_1.z.string().url()),
39
+ role: exports.OptionalStringSchema,
40
+ fullName: exports.OptionalStringSchema,
41
+ email: exports.OptionalStringSchema,
42
+ phone: exports.OptionalStringSchema,
43
+ source: exports.OptionalStringSchema,
44
+ })
45
+ .array();
46
+ exports.LinkedPeopleOptionalSchema = exports.LinkedPeopleSchema.optional();
47
+ exports.AddressSchema = zod_1.z.object({
48
+ full: exports.OptionalStringSchema,
49
+ city: exports.OptionalStringSchema,
50
+ state: exports.OptionalStringSchema,
51
+ street: exports.OptionalStringSchema,
52
+ street2: exports.OptionalStringSchema,
53
+ zip: exports.OptionalStringSchema,
54
+ country: exports.OptionalStringSchema,
55
+ latitude: exports.OptionalNumberSchema,
56
+ longitude: exports.OptionalNumberSchema,
57
+ });
58
+ exports.OptionalAddressSchema = exports.AddressSchema.optional();
59
+ exports.DocumentS3RecordSchema = zod_1.z
60
+ .object({
61
+ filename: zod_1.z.string(),
62
+ created: exports.YYYYMMDDRegexSchema,
63
+ document_id: zod_1.z.string(),
64
+ mimeType: zod_1.z.string(),
65
+ type: zod_1.z.string().array().optional(),
66
+ key: exports.OptionalStringSchema,
67
+ userName: exports.OptionalStringSchema,
68
+ })
69
+ .array();
70
+ exports.OptionalS3DocumentSchema = exports.DocumentS3RecordSchema.optional();
71
+ exports.DocumentLinkSchema = zod_1.z
72
+ .object({
73
+ file: exports.OptionalStringSchema,
74
+ url: zod_1.z.string().url(),
75
+ created: exports.OptionalStringSchema,
76
+ type: zod_1.z.array(zod_1.z.string()),
77
+ documentDate: exports.YYYYMMDDRegexSchema,
78
+ source: exports.OptionalStringSchema,
79
+ id: exports.OptionalStringSchema,
80
+ })
81
+ .array();
82
+ exports.OptionalDocumentLinkSchema = exports.DocumentLinkSchema.optional();
83
+ exports.DocumentRecordSchema = zod_1.z
84
+ .union([exports.DocumentS3RecordSchema, exports.DocumentLinkSchema])
85
+ .optional();
86
+ exports.GeoSchema = zod_1.z.object({
87
+ project: zod_1.z.object({
88
+ lon: zod_1.z.number(),
89
+ lat: zod_1.z.number(),
90
+ }),
91
+ });
92
+ //# sourceMappingURL=entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../../../../../packages/client-frontends-shared-types/src/lib/dataGrid/api/entity.ts"],"names":[],"mappings":";;;AAAA,6BAAiC;AAEpB,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACtB,CAAC,CAAA;AAEW,QAAA,sBAAsB,GAAG,wBAAgB,CAAC,MAAM,CAAC;IAC5D,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACxB,CAAC,CAAA;AAEW,QAAA,kBAAkB,GAAG,OAAC,CAAC,KAAK,CAAC,8BAAsB,CAAC,CAAC,QAAQ,EAAE,CAAA;AAG/D,QAAA,qBAAqB,GAAG,OAAC,CAAC,KAAK,CAAC,wBAAgB,CAAC,CAAA;AAGjD,QAAA,6BAA6B,GAAG,6BAAqB,CAAC,QAAQ,EAAE,CAAA;AAKhE,QAAA,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