@rpcbase/vite 0.114.0 → 0.116.0
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/dist/index.js +12 -3
- package/dist/plugins/prune-models-for-client/fixtures/alias-and-types.input.d.ts +9 -0
- package/dist/plugins/prune-models-for-client/fixtures/alias-and-types.input.d.ts.map +1 -0
- package/dist/plugins/prune-models-for-client/fixtures/alias-and-types.output.d.ts +8 -0
- package/dist/plugins/prune-models-for-client/fixtures/alias-and-types.output.d.ts.map +1 -0
- package/dist/plugins/prune-models-for-client/fixtures/chained-bindings.input.d.ts +101 -0
- package/dist/plugins/prune-models-for-client/fixtures/chained-bindings.input.d.ts.map +1 -0
- package/dist/plugins/prune-models-for-client/fixtures/chained-bindings.output.d.ts +5 -0
- package/dist/plugins/prune-models-for-client/fixtures/chained-bindings.output.d.ts.map +1 -0
- package/dist/plugins/prune-models-for-client/fixtures/contact-model.input.d.ts +242 -0
- package/dist/plugins/prune-models-for-client/fixtures/contact-model.input.d.ts.map +1 -0
- package/dist/plugins/prune-models-for-client/fixtures/contact-model.output.d.ts +32 -0
- package/dist/plugins/prune-models-for-client/fixtures/contact-model.output.d.ts.map +1 -0
- package/dist/plugins/prune-models-for-client/fixtures/destructuring-bindings.input.d.ts +7 -0
- package/dist/plugins/prune-models-for-client/fixtures/destructuring-bindings.input.d.ts.map +1 -0
- package/dist/plugins/prune-models-for-client/fixtures/destructuring-bindings.output.d.ts +5 -0
- package/dist/plugins/prune-models-for-client/fixtures/destructuring-bindings.output.d.ts.map +1 -0
- package/dist/plugins/prune-models-for-client/fixtures/export-specifiers.input.d.ts +5 -0
- package/dist/plugins/prune-models-for-client/fixtures/export-specifiers.input.d.ts.map +1 -0
- package/dist/plugins/prune-models-for-client/fixtures/export-specifiers.output.d.ts +3 -0
- package/dist/plugins/prune-models-for-client/fixtures/export-specifiers.output.d.ts.map +1 -0
- package/dist/plugins/prune-models-for-client/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -180,7 +180,7 @@ function rewriteRpcbaseDbImport(importDeclaration, forbiddenIdentifiers) {
|
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
182
|
const specifierText = Array.from(zLocals).map((local) => local === "z" ? "z" : `z as ${local}`).join(", ");
|
|
183
|
-
importDeclaration.replaceWithText(`import { ${specifierText} } from "
|
|
183
|
+
importDeclaration.replaceWithText(`import { ${specifierText} } from "@rpcbase/db"`);
|
|
184
184
|
}
|
|
185
185
|
function collectBindingNames(name, out) {
|
|
186
186
|
if (ts.isIdentifier(name)) {
|
|
@@ -300,8 +300,17 @@ function inferIsSsrTransform(transformOptions) {
|
|
|
300
300
|
if (!transformOptions || typeof transformOptions !== "object") return false;
|
|
301
301
|
return transformOptions.ssr === true;
|
|
302
302
|
}
|
|
303
|
+
function isPrunableModelsFilePath(filePath) {
|
|
304
|
+
const normalized = filePath.replaceAll("\\", "/");
|
|
305
|
+
const parts = normalized.split("/");
|
|
306
|
+
if (parts.includes("node_modules")) return false;
|
|
307
|
+
if (parts.length < 2) return false;
|
|
308
|
+
if (!parts.some((part, index) => part === "models" && index < parts.length - 1)) return false;
|
|
309
|
+
if (normalized.endsWith(".d.ts")) return false;
|
|
310
|
+
const ext = path$1.posix.extname(normalized);
|
|
311
|
+
return ext === ".ts" || ext === ".tsx" || ext === ".mts" || ext === ".cts";
|
|
312
|
+
}
|
|
303
313
|
function pruneModelsForClientPlugin() {
|
|
304
|
-
const modelsDir = `${path$1.resolve(process.cwd(), "src/models")}${path$1.sep}`;
|
|
305
314
|
const prune = createTransformSource();
|
|
306
315
|
return {
|
|
307
316
|
name: "lz-models-prune-for-browser",
|
|
@@ -309,7 +318,7 @@ function pruneModelsForClientPlugin() {
|
|
|
309
318
|
transform(code, id, transformOptions) {
|
|
310
319
|
if (inferIsSsrTransform(transformOptions)) return;
|
|
311
320
|
const filePath = id.split("?", 1)[0] ?? id;
|
|
312
|
-
if (!filePath
|
|
321
|
+
if (!isPrunableModelsFilePath(filePath)) return;
|
|
313
322
|
const nextCode = prune({ code, filePath });
|
|
314
323
|
if (!nextCode) return;
|
|
315
324
|
return { code: nextCode };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z as zz } from '../../../../../db/src';
|
|
2
|
+
export declare const ZThing: zz.ZodObject<{
|
|
3
|
+
value: zz.ZodNumber;
|
|
4
|
+
}, zz.core.$strip>;
|
|
5
|
+
type Thing = DbSchema;
|
|
6
|
+
export declare const x: Thing;
|
|
7
|
+
export declare const leaked: import('../../../../../db/src').ModelsClient<import('../../../../../db/src/registerModels').ModelModules, Record<string, never>>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=alias-and-types.input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alias-and-types.input.d.ts","sourceRoot":"","sources":["../../../../src/plugins/prune-models-for-client/fixtures/alias-and-types.input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,IAAI,EAAE,EAAoC,MAAM,aAAa,CAAA;AAGvE,eAAO,MAAM,MAAM;;kBAAoC,CAAA;AAEvD,KAAK,KAAK,GAAG,QAAQ,CAAA;AACrB,eAAO,MAAM,CAAC,EAAmB,KAAK,CAAA;AAGtC,eAAO,MAAM,MAAM,wHAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alias-and-types.output.d.ts","sourceRoot":"","sources":["../../../../src/plugins/prune-models-for-client/fixtures/alias-and-types.output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,MAAM,aAAa,CAAA;AAGrC,eAAO,MAAM,MAAM;;kBAAoC,CAAA;AAEvD,KAAK,KAAK,GAAG,QAAQ,CAAA;AACrB,eAAO,MAAM,CAAC,EAAmB,KAAK,CAAA"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { z, mongoose } from '../../../../../db/src';
|
|
2
|
+
export declare const ZUser: z.ZodObject<{
|
|
3
|
+
email: z.ZodString;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const UserSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
6
|
+
email?: string | null | undefined;
|
|
7
|
+
}, mongoose.Document<unknown, {}, {
|
|
8
|
+
email?: string | null | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
id: string;
|
|
11
|
+
}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & Omit<{
|
|
12
|
+
email?: string | null | undefined;
|
|
13
|
+
} & {
|
|
14
|
+
_id: mongoose.Types.ObjectId;
|
|
15
|
+
} & {
|
|
16
|
+
__v: number;
|
|
17
|
+
}, "id"> & {
|
|
18
|
+
id: string;
|
|
19
|
+
}, {
|
|
20
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
21
|
+
} | {
|
|
22
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
23
|
+
email?: string | null | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
id: string;
|
|
26
|
+
}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & Omit<{
|
|
27
|
+
email?: string | null | undefined;
|
|
28
|
+
} & {
|
|
29
|
+
_id: mongoose.Types.ObjectId;
|
|
30
|
+
} & {
|
|
31
|
+
__v: number;
|
|
32
|
+
}, "id"> & {
|
|
33
|
+
id: string;
|
|
34
|
+
}> | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
email?: string | null | undefined;
|
|
37
|
+
} & {
|
|
38
|
+
_id: mongoose.Types.ObjectId;
|
|
39
|
+
} & {
|
|
40
|
+
__v: number;
|
|
41
|
+
}>;
|
|
42
|
+
export declare const UserModel: mongoose.Model<{
|
|
43
|
+
email?: string | null | undefined;
|
|
44
|
+
}, {}, {}, {
|
|
45
|
+
id: string;
|
|
46
|
+
}, mongoose.Document<unknown, {}, {
|
|
47
|
+
email?: string | null | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
id: string;
|
|
50
|
+
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
51
|
+
email?: string | null | undefined;
|
|
52
|
+
} & {
|
|
53
|
+
_id: mongoose.Types.ObjectId;
|
|
54
|
+
} & {
|
|
55
|
+
__v: number;
|
|
56
|
+
}, "id"> & {
|
|
57
|
+
id: string;
|
|
58
|
+
}, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
59
|
+
email?: string | null | undefined;
|
|
60
|
+
}, mongoose.Document<unknown, {}, {
|
|
61
|
+
email?: string | null | undefined;
|
|
62
|
+
}, {
|
|
63
|
+
id: string;
|
|
64
|
+
}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & Omit<{
|
|
65
|
+
email?: string | null | undefined;
|
|
66
|
+
} & {
|
|
67
|
+
_id: mongoose.Types.ObjectId;
|
|
68
|
+
} & {
|
|
69
|
+
__v: number;
|
|
70
|
+
}, "id"> & {
|
|
71
|
+
id: string;
|
|
72
|
+
}, {
|
|
73
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
74
|
+
} | {
|
|
75
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
76
|
+
email?: string | null | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
id: string;
|
|
79
|
+
}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & Omit<{
|
|
80
|
+
email?: string | null | undefined;
|
|
81
|
+
} & {
|
|
82
|
+
_id: mongoose.Types.ObjectId;
|
|
83
|
+
} & {
|
|
84
|
+
__v: number;
|
|
85
|
+
}, "id"> & {
|
|
86
|
+
id: string;
|
|
87
|
+
}> | undefined;
|
|
88
|
+
}, {
|
|
89
|
+
email?: string | null | undefined;
|
|
90
|
+
} & {
|
|
91
|
+
_id: mongoose.Types.ObjectId;
|
|
92
|
+
} & {
|
|
93
|
+
__v: number;
|
|
94
|
+
}>, {
|
|
95
|
+
email?: string | null | undefined;
|
|
96
|
+
} & {
|
|
97
|
+
_id: mongoose.Types.ObjectId;
|
|
98
|
+
} & {
|
|
99
|
+
__v: number;
|
|
100
|
+
}>;
|
|
101
|
+
//# sourceMappingURL=chained-bindings.input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chained-bindings.input.d.ts","sourceRoot":"","sources":["../../../../src/plugins/prune-models-for-client/fixtures/chained-bindings.input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAwB,MAAM,aAAa,CAAA;AAG/D,eAAO,MAAM,KAAK;;iBAA0C,CAAA;AAI5D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAS,CAAA;AAEhC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAiC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chained-bindings.output.d.ts","sourceRoot":"","sources":["../../../../src/plugins/prune-models-for-client/fixtures/chained-bindings.output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAA;AAG/B,eAAO,MAAM,KAAK;;iBAA0C,CAAA"}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { z } from '../../../../../db/src';
|
|
2
|
+
export declare const contactIdSchema: z.ZodString;
|
|
3
|
+
export declare const contactEmailSchema: z.ZodObject<{
|
|
4
|
+
value: z.ZodString;
|
|
5
|
+
normalized: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const contactPhoneSchema: z.ZodObject<{
|
|
8
|
+
value: z.ZodString;
|
|
9
|
+
normalizedE164: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const ZContact: z.ZodObject<{
|
|
12
|
+
_id: z.ZodString;
|
|
13
|
+
workspaceId: z.ZodString;
|
|
14
|
+
displayName: z.ZodString;
|
|
15
|
+
emails: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
16
|
+
value: z.ZodString;
|
|
17
|
+
normalized: z.ZodString;
|
|
18
|
+
}, z.core.$strip>>>;
|
|
19
|
+
phones: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
20
|
+
value: z.ZodString;
|
|
21
|
+
normalizedE164: z.ZodString;
|
|
22
|
+
}, z.core.$strip>>>;
|
|
23
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
24
|
+
relatedContactIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
25
|
+
unreliablyMatchesOtherContacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
26
|
+
address: z.ZodOptional<z.ZodString>;
|
|
27
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
28
|
+
createdAt: z.ZodString;
|
|
29
|
+
updatedAt: z.ZodString;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export type IContact = z.infer<typeof ZContact>;
|
|
32
|
+
export declare const ContactSchema: import('../../../../node_modules/mongoose').Schema<any, import('../../../../node_modules/mongoose').Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
33
|
+
collection: string;
|
|
34
|
+
timestamps: true;
|
|
35
|
+
}, {
|
|
36
|
+
_id: string;
|
|
37
|
+
displayName: string;
|
|
38
|
+
workspaceId: string;
|
|
39
|
+
emails: import("mongoose").Types.DocumentArray<{
|
|
40
|
+
value: string;
|
|
41
|
+
normalized: string;
|
|
42
|
+
}, import("mongoose").Types.Subdocument<import('bson').ObjectId, unknown, {
|
|
43
|
+
value: string;
|
|
44
|
+
normalized: string;
|
|
45
|
+
}> & {
|
|
46
|
+
value: string;
|
|
47
|
+
normalized: string;
|
|
48
|
+
}>;
|
|
49
|
+
phones: import("mongoose").Types.DocumentArray<{
|
|
50
|
+
value: string;
|
|
51
|
+
normalizedE164: string;
|
|
52
|
+
}, import("mongoose").Types.Subdocument<import('bson').ObjectId, unknown, {
|
|
53
|
+
value: string;
|
|
54
|
+
normalizedE164: string;
|
|
55
|
+
}> & {
|
|
56
|
+
value: string;
|
|
57
|
+
normalizedE164: string;
|
|
58
|
+
}>;
|
|
59
|
+
relatedContactIds: string[];
|
|
60
|
+
unreliablyMatchesOtherContacts: string[];
|
|
61
|
+
address?: string | null | undefined;
|
|
62
|
+
notes?: string | null | undefined;
|
|
63
|
+
avatarUrl?: string | null | undefined;
|
|
64
|
+
} & import('../../../../node_modules/mongoose').DefaultTimestampProps, import('../../../../node_modules/mongoose').Document<unknown, {}, {
|
|
65
|
+
_id: string;
|
|
66
|
+
displayName: string;
|
|
67
|
+
workspaceId: string;
|
|
68
|
+
emails: import("mongoose").Types.DocumentArray<{
|
|
69
|
+
value: string;
|
|
70
|
+
normalized: string;
|
|
71
|
+
}, import("mongoose").Types.Subdocument<import('bson').ObjectId, unknown, {
|
|
72
|
+
value: string;
|
|
73
|
+
normalized: string;
|
|
74
|
+
}> & {
|
|
75
|
+
value: string;
|
|
76
|
+
normalized: string;
|
|
77
|
+
}>;
|
|
78
|
+
phones: import("mongoose").Types.DocumentArray<{
|
|
79
|
+
value: string;
|
|
80
|
+
normalizedE164: string;
|
|
81
|
+
}, import("mongoose").Types.Subdocument<import('bson').ObjectId, unknown, {
|
|
82
|
+
value: string;
|
|
83
|
+
normalizedE164: string;
|
|
84
|
+
}> & {
|
|
85
|
+
value: string;
|
|
86
|
+
normalizedE164: string;
|
|
87
|
+
}>;
|
|
88
|
+
relatedContactIds: string[];
|
|
89
|
+
unreliablyMatchesOtherContacts: string[];
|
|
90
|
+
address?: string | null | undefined;
|
|
91
|
+
notes?: string | null | undefined;
|
|
92
|
+
avatarUrl?: string | null | undefined;
|
|
93
|
+
} & import('../../../../node_modules/mongoose').DefaultTimestampProps, {
|
|
94
|
+
id: string;
|
|
95
|
+
}, import('../../../../node_modules/mongoose').ResolveSchemaOptions<{
|
|
96
|
+
collection: string;
|
|
97
|
+
timestamps: true;
|
|
98
|
+
}>> & Omit<{
|
|
99
|
+
_id: string;
|
|
100
|
+
displayName: string;
|
|
101
|
+
workspaceId: string;
|
|
102
|
+
emails: import("mongoose").Types.DocumentArray<{
|
|
103
|
+
value: string;
|
|
104
|
+
normalized: string;
|
|
105
|
+
}, import("mongoose").Types.Subdocument<import('bson').ObjectId, unknown, {
|
|
106
|
+
value: string;
|
|
107
|
+
normalized: string;
|
|
108
|
+
}> & {
|
|
109
|
+
value: string;
|
|
110
|
+
normalized: string;
|
|
111
|
+
}>;
|
|
112
|
+
phones: import("mongoose").Types.DocumentArray<{
|
|
113
|
+
value: string;
|
|
114
|
+
normalizedE164: string;
|
|
115
|
+
}, import("mongoose").Types.Subdocument<import('bson').ObjectId, unknown, {
|
|
116
|
+
value: string;
|
|
117
|
+
normalizedE164: string;
|
|
118
|
+
}> & {
|
|
119
|
+
value: string;
|
|
120
|
+
normalizedE164: string;
|
|
121
|
+
}>;
|
|
122
|
+
relatedContactIds: string[];
|
|
123
|
+
unreliablyMatchesOtherContacts: string[];
|
|
124
|
+
address?: string | null | undefined;
|
|
125
|
+
notes?: string | null | undefined;
|
|
126
|
+
avatarUrl?: string | null | undefined;
|
|
127
|
+
} & import('../../../../node_modules/mongoose').DefaultTimestampProps & Required<{
|
|
128
|
+
_id: string;
|
|
129
|
+
}> & {
|
|
130
|
+
__v: number;
|
|
131
|
+
}, "id"> & {
|
|
132
|
+
id: string;
|
|
133
|
+
}, {
|
|
134
|
+
[path: string]: import('../../../../node_modules/mongoose').SchemaDefinitionProperty<undefined, any, any>;
|
|
135
|
+
} | {
|
|
136
|
+
[x: string]: import('../../../../node_modules/mongoose').SchemaDefinitionProperty<any, any, import('../../../../node_modules/mongoose').Document<unknown, {}, {
|
|
137
|
+
_id: string;
|
|
138
|
+
displayName: string;
|
|
139
|
+
workspaceId: string;
|
|
140
|
+
emails: import("mongoose").Types.DocumentArray<{
|
|
141
|
+
value: string;
|
|
142
|
+
normalized: string;
|
|
143
|
+
}, import("mongoose").Types.Subdocument<import('bson').ObjectId, unknown, {
|
|
144
|
+
value: string;
|
|
145
|
+
normalized: string;
|
|
146
|
+
}> & {
|
|
147
|
+
value: string;
|
|
148
|
+
normalized: string;
|
|
149
|
+
}>;
|
|
150
|
+
phones: import("mongoose").Types.DocumentArray<{
|
|
151
|
+
value: string;
|
|
152
|
+
normalizedE164: string;
|
|
153
|
+
}, import("mongoose").Types.Subdocument<import('bson').ObjectId, unknown, {
|
|
154
|
+
value: string;
|
|
155
|
+
normalizedE164: string;
|
|
156
|
+
}> & {
|
|
157
|
+
value: string;
|
|
158
|
+
normalizedE164: string;
|
|
159
|
+
}>;
|
|
160
|
+
relatedContactIds: string[];
|
|
161
|
+
unreliablyMatchesOtherContacts: string[];
|
|
162
|
+
address?: string | null | undefined;
|
|
163
|
+
notes?: string | null | undefined;
|
|
164
|
+
avatarUrl?: string | null | undefined;
|
|
165
|
+
} & import('../../../../node_modules/mongoose').DefaultTimestampProps, {
|
|
166
|
+
id: string;
|
|
167
|
+
}, import('../../../../node_modules/mongoose').ResolveSchemaOptions<{
|
|
168
|
+
collection: string;
|
|
169
|
+
timestamps: true;
|
|
170
|
+
}>> & Omit<{
|
|
171
|
+
_id: string;
|
|
172
|
+
displayName: string;
|
|
173
|
+
workspaceId: string;
|
|
174
|
+
emails: import("mongoose").Types.DocumentArray<{
|
|
175
|
+
value: string;
|
|
176
|
+
normalized: string;
|
|
177
|
+
}, import("mongoose").Types.Subdocument<import('bson').ObjectId, unknown, {
|
|
178
|
+
value: string;
|
|
179
|
+
normalized: string;
|
|
180
|
+
}> & {
|
|
181
|
+
value: string;
|
|
182
|
+
normalized: string;
|
|
183
|
+
}>;
|
|
184
|
+
phones: import("mongoose").Types.DocumentArray<{
|
|
185
|
+
value: string;
|
|
186
|
+
normalizedE164: string;
|
|
187
|
+
}, import("mongoose").Types.Subdocument<import('bson').ObjectId, unknown, {
|
|
188
|
+
value: string;
|
|
189
|
+
normalizedE164: string;
|
|
190
|
+
}> & {
|
|
191
|
+
value: string;
|
|
192
|
+
normalizedE164: string;
|
|
193
|
+
}>;
|
|
194
|
+
relatedContactIds: string[];
|
|
195
|
+
unreliablyMatchesOtherContacts: string[];
|
|
196
|
+
address?: string | null | undefined;
|
|
197
|
+
notes?: string | null | undefined;
|
|
198
|
+
avatarUrl?: string | null | undefined;
|
|
199
|
+
} & import('../../../../node_modules/mongoose').DefaultTimestampProps & Required<{
|
|
200
|
+
_id: string;
|
|
201
|
+
}> & {
|
|
202
|
+
__v: number;
|
|
203
|
+
}, "id"> & {
|
|
204
|
+
id: string;
|
|
205
|
+
}> | undefined;
|
|
206
|
+
}, {
|
|
207
|
+
_id: string;
|
|
208
|
+
displayName: string;
|
|
209
|
+
workspaceId: string;
|
|
210
|
+
emails: import("mongoose").Types.DocumentArray<{
|
|
211
|
+
value: string;
|
|
212
|
+
normalized: string;
|
|
213
|
+
}, import("mongoose").Types.Subdocument<import('bson').ObjectId, unknown, {
|
|
214
|
+
value: string;
|
|
215
|
+
normalized: string;
|
|
216
|
+
}> & {
|
|
217
|
+
value: string;
|
|
218
|
+
normalized: string;
|
|
219
|
+
}>;
|
|
220
|
+
phones: import("mongoose").Types.DocumentArray<{
|
|
221
|
+
value: string;
|
|
222
|
+
normalizedE164: string;
|
|
223
|
+
}, import("mongoose").Types.Subdocument<import('bson').ObjectId, unknown, {
|
|
224
|
+
value: string;
|
|
225
|
+
normalizedE164: string;
|
|
226
|
+
}> & {
|
|
227
|
+
value: string;
|
|
228
|
+
normalizedE164: string;
|
|
229
|
+
}>;
|
|
230
|
+
relatedContactIds: string[];
|
|
231
|
+
unreliablyMatchesOtherContacts: string[];
|
|
232
|
+
address?: string | null | undefined;
|
|
233
|
+
notes?: string | null | undefined;
|
|
234
|
+
avatarUrl?: string | null | undefined;
|
|
235
|
+
createdAt: NativeDate;
|
|
236
|
+
updatedAt: NativeDate;
|
|
237
|
+
} & Required<{
|
|
238
|
+
_id: string;
|
|
239
|
+
}> & {
|
|
240
|
+
__v: number;
|
|
241
|
+
}>;
|
|
242
|
+
//# sourceMappingURL=contact-model.input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-model.input.d.ts","sourceRoot":"","sources":["../../../../src/plugins/prune-models-for-client/fixtures/contact-model.input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAU,MAAM,aAAa,CAAA;AAGvC,eAAO,MAAM,eAAe,aAAuD,CAAA;AAEnF,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAA;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;iBAanB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAA;AAsE/C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAS,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from '../../../../../db/src';
|
|
2
|
+
export declare const contactIdSchema: z.ZodString;
|
|
3
|
+
export declare const contactEmailSchema: z.ZodObject<{
|
|
4
|
+
value: z.ZodString;
|
|
5
|
+
normalized: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const contactPhoneSchema: z.ZodObject<{
|
|
8
|
+
value: z.ZodString;
|
|
9
|
+
normalizedE164: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const ZContact: z.ZodObject<{
|
|
12
|
+
_id: z.ZodString;
|
|
13
|
+
workspaceId: z.ZodString;
|
|
14
|
+
displayName: z.ZodString;
|
|
15
|
+
emails: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
16
|
+
value: z.ZodString;
|
|
17
|
+
normalized: z.ZodString;
|
|
18
|
+
}, z.core.$strip>>>;
|
|
19
|
+
phones: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
20
|
+
value: z.ZodString;
|
|
21
|
+
normalizedE164: z.ZodString;
|
|
22
|
+
}, z.core.$strip>>>;
|
|
23
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
24
|
+
relatedContactIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
25
|
+
unreliablyMatchesOtherContacts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
26
|
+
address: z.ZodOptional<z.ZodString>;
|
|
27
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
28
|
+
createdAt: z.ZodString;
|
|
29
|
+
updatedAt: z.ZodString;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export type IContact = z.infer<typeof ZContact>;
|
|
32
|
+
//# sourceMappingURL=contact-model.output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-model.output.d.ts","sourceRoot":"","sources":["../../../../src/plugins/prune-models-for-client/fixtures/contact-model.output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAA;AAG/B,eAAO,MAAM,eAAe,aAAuD,CAAA;AAEnF,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAA;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;iBAanB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destructuring-bindings.input.d.ts","sourceRoot":"","sources":["../../../../src/plugins/prune-models-for-client/fixtures/destructuring-bindings.input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,CAAC,EAAE,MAAM,aAAa,CAAA;AAG7C,eAAO,MAAM,KAAK;;iBAAkC,CAAA;AAGpD,eAAO,MAAM,CAAC,KAAY,CAAA;AAC1B,eAAO,MAAM,CAAC,KAAO,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destructuring-bindings.output.d.ts","sourceRoot":"","sources":["../../../../src/plugins/prune-models-for-client/fixtures/destructuring-bindings.output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAA;AAG/B,eAAO,MAAM,KAAK;;iBAAkC,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { z } from '../../../../../db/src';
|
|
2
|
+
export declare const ZA: z.ZodString;
|
|
3
|
+
declare const local: import('../../../../../db/src').ModelsClient<import('../../../../../db/src/registerModels').ModelModules, Record<string, never>>;
|
|
4
|
+
export { local as exported };
|
|
5
|
+
//# sourceMappingURL=export-specifiers.input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-specifiers.input.d.ts","sourceRoot":"","sources":["../../../../src/plugins/prune-models-for-client/fixtures/export-specifiers.input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,CAAC,EAAE,MAAM,aAAa,CAAA;AAG7C,eAAO,MAAM,EAAE,aAAa,CAAA;AAG5B,QAAA,MAAM,KAAK,wHAAS,CAAA;AACpB,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-specifiers.output.d.ts","sourceRoot":"","sources":["../../../../src/plugins/prune-models-for-client/fixtures/export-specifiers.output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAA;AAG/B,eAAO,MAAM,EAAE,aAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/prune-models-for-client/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/prune-models-for-client/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AA2BlC,wBAAgB,0BAA0B,IAAI,MAAM,CAiBnD"}
|