@remit/data-ports 0.0.92 → 0.0.94

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.
@@ -10,53 +10,23 @@ export type AccountSettingNameValue = (typeof AccountSettingName)[keyof typeof A
10
10
  export declare const BooleanSettingSchema: z.ZodObject<{
11
11
  kind: z.ZodLiteral<"Boolean">;
12
12
  value: z.ZodBoolean;
13
- }, "strip", z.ZodTypeAny, {
14
- kind: "Boolean";
15
- value: boolean;
16
- }, {
17
- kind: "Boolean";
18
- value: boolean;
19
- }>;
13
+ }, z.core.$strip>;
20
14
  export declare const StringSettingSchema: z.ZodObject<{
21
15
  kind: z.ZodLiteral<"String">;
22
16
  value: z.ZodString;
23
- }, "strip", z.ZodTypeAny, {
24
- kind: "String";
25
- value: string;
26
- }, {
27
- kind: "String";
28
- value: string;
29
- }>;
17
+ }, z.core.$strip>;
30
18
  export declare const NumberSettingSchema: z.ZodObject<{
31
19
  kind: z.ZodLiteral<"Number">;
32
20
  value: z.ZodNumber;
33
- }, "strip", z.ZodTypeAny, {
34
- kind: "Number";
35
- value: number;
36
- }, {
37
- kind: "Number";
38
- value: number;
39
- }>;
21
+ }, z.core.$strip>;
40
22
  export declare const StringListSettingSchema: z.ZodObject<{
41
23
  kind: z.ZodLiteral<"StringList">;
42
- value: z.ZodArray<z.ZodString, "many">;
43
- }, "strip", z.ZodTypeAny, {
44
- kind: "StringList";
45
- value: string[];
46
- }, {
47
- kind: "StringList";
48
- value: string[];
49
- }>;
24
+ value: z.ZodArray<z.ZodString>;
25
+ }, z.core.$strip>;
50
26
  export declare const MapSettingSchema: z.ZodObject<{
51
27
  kind: z.ZodLiteral<"Map">;
52
28
  value: z.ZodRecord<z.ZodString, z.ZodString>;
53
- }, "strip", z.ZodTypeAny, {
54
- kind: "Map";
55
- value: Record<string, string>;
56
- }, {
57
- kind: "Map";
58
- value: Record<string, string>;
59
- }>;
29
+ }, z.core.$strip>;
60
30
  /**
61
31
  * MutedFlag-valued setting. The value is a rich mute object (`MutedFlag` in
62
32
  * TypeSpec / `@remit/api-openapi-types`): a boolean plus audit metadata. The
@@ -72,38 +42,8 @@ export declare const MutedFlagSettingSchema: z.ZodObject<{
72
42
  setBy: z.ZodOptional<z.ZodString>;
73
43
  expiresAt: z.ZodOptional<z.ZodNumber>;
74
44
  reason: z.ZodOptional<z.ZodString>;
75
- }, "strip", z.ZodTypeAny, {
76
- value: boolean;
77
- setAt: number;
78
- setBy?: string | undefined;
79
- expiresAt?: number | undefined;
80
- reason?: string | undefined;
81
- }, {
82
- value: boolean;
83
- setAt: number;
84
- setBy?: string | undefined;
85
- expiresAt?: number | undefined;
86
- reason?: string | undefined;
87
- }>;
88
- }, "strip", z.ZodTypeAny, {
89
- kind: "MutedFlag";
90
- value: {
91
- value: boolean;
92
- setAt: number;
93
- setBy?: string | undefined;
94
- expiresAt?: number | undefined;
95
- reason?: string | undefined;
96
- };
97
- }, {
98
- kind: "MutedFlag";
99
- value: {
100
- value: boolean;
101
- setAt: number;
102
- setBy?: string | undefined;
103
- expiresAt?: number | undefined;
104
- reason?: string | undefined;
105
- };
106
- }>;
45
+ }, z.core.$strip>;
46
+ }, z.core.$strip>;
107
47
  /**
108
48
  * RFC 032 Tier 1 registry: binds each setting `name` to the zod schema its
109
49
  * `value` must satisfy. The discriminated union (`kind`) types the shape on the
@@ -117,73 +57,31 @@ export declare const accountSettingRegistry: {
117
57
  readonly Theme: z.ZodObject<{
118
58
  kind: z.ZodLiteral<"String">;
119
59
  value: z.ZodString;
120
- }, "strip", z.ZodTypeAny, {
121
- kind: "String";
122
- value: string;
123
- }, {
124
- kind: "String";
125
- value: string;
126
- }>;
60
+ }, z.core.$strip>;
127
61
  readonly Density: z.ZodObject<{
128
62
  kind: z.ZodLiteral<"String">;
129
63
  value: z.ZodString;
130
- }, "strip", z.ZodTypeAny, {
131
- kind: "String";
132
- value: string;
133
- }, {
134
- kind: "String";
135
- value: string;
136
- }>;
64
+ }, z.core.$strip>;
137
65
  readonly DefaultComposerFormat: z.ZodObject<{
138
66
  kind: z.ZodLiteral<"String">;
139
67
  value: z.ZodString;
140
- }, "strip", z.ZodTypeAny, {
141
- kind: "String";
142
- value: string;
143
- }, {
144
- kind: "String";
145
- value: string;
146
- }>;
68
+ }, z.core.$strip>;
147
69
  readonly PinnedFolders: z.ZodObject<{
148
70
  kind: z.ZodLiteral<"StringList">;
149
- value: z.ZodArray<z.ZodString, "many">;
150
- }, "strip", z.ZodTypeAny, {
151
- kind: "StringList";
152
- value: string[];
153
- }, {
154
- kind: "StringList";
155
- value: string[];
156
- }>;
71
+ value: z.ZodArray<z.ZodString>;
72
+ }, z.core.$strip>;
157
73
  readonly AccountSignaturePlainText: z.ZodObject<{
158
74
  kind: z.ZodLiteral<"String">;
159
75
  value: z.ZodString;
160
- }, "strip", z.ZodTypeAny, {
161
- kind: "String";
162
- value: string;
163
- }, {
164
- kind: "String";
165
- value: string;
166
- }>;
76
+ }, z.core.$strip>;
167
77
  readonly AccountSignatureHtml: z.ZodObject<{
168
78
  kind: z.ZodLiteral<"String">;
169
79
  value: z.ZodString;
170
- }, "strip", z.ZodTypeAny, {
171
- kind: "String";
172
- value: string;
173
- }, {
174
- kind: "String";
175
- value: string;
176
- }>;
80
+ }, z.core.$strip>;
177
81
  readonly AccountDisplayName: z.ZodObject<{
178
82
  kind: z.ZodLiteral<"String">;
179
83
  value: z.ZodString;
180
- }, "strip", z.ZodTypeAny, {
181
- kind: "String";
182
- value: string;
183
- }, {
184
- kind: "String";
185
- value: string;
186
- }>;
84
+ }, z.core.$strip>;
187
85
  readonly AccountMuted: z.ZodObject<{
188
86
  kind: z.ZodLiteral<"MutedFlag">;
189
87
  value: z.ZodObject<{
@@ -192,58 +90,16 @@ export declare const accountSettingRegistry: {
192
90
  setBy: z.ZodOptional<z.ZodString>;
193
91
  expiresAt: z.ZodOptional<z.ZodNumber>;
194
92
  reason: z.ZodOptional<z.ZodString>;
195
- }, "strip", z.ZodTypeAny, {
196
- value: boolean;
197
- setAt: number;
198
- setBy?: string | undefined;
199
- expiresAt?: number | undefined;
200
- reason?: string | undefined;
201
- }, {
202
- value: boolean;
203
- setAt: number;
204
- setBy?: string | undefined;
205
- expiresAt?: number | undefined;
206
- reason?: string | undefined;
207
- }>;
208
- }, "strip", z.ZodTypeAny, {
209
- kind: "MutedFlag";
210
- value: {
211
- value: boolean;
212
- setAt: number;
213
- setBy?: string | undefined;
214
- expiresAt?: number | undefined;
215
- reason?: string | undefined;
216
- };
217
- }, {
218
- kind: "MutedFlag";
219
- value: {
220
- value: boolean;
221
- setAt: number;
222
- setBy?: string | undefined;
223
- expiresAt?: number | undefined;
224
- reason?: string | undefined;
225
- };
226
- }>;
93
+ }, z.core.$strip>;
94
+ }, z.core.$strip>;
227
95
  readonly AccountComposeLanguages: z.ZodObject<{
228
96
  kind: z.ZodLiteral<"StringList">;
229
- value: z.ZodArray<z.ZodString, "many">;
230
- }, "strip", z.ZodTypeAny, {
231
- kind: "StringList";
232
- value: string[];
233
- }, {
234
- kind: "StringList";
235
- value: string[];
236
- }>;
97
+ value: z.ZodArray<z.ZodString>;
98
+ }, z.core.$strip>;
237
99
  readonly MailboxDisplayName: z.ZodObject<{
238
100
  kind: z.ZodLiteral<"String">;
239
101
  value: z.ZodString;
240
- }, "strip", z.ZodTypeAny, {
241
- kind: "String";
242
- value: string;
243
- }, {
244
- kind: "String";
245
- value: string;
246
- }>;
102
+ }, z.core.$strip>;
247
103
  readonly MailboxMuted: z.ZodObject<{
248
104
  kind: z.ZodLiteral<"MutedFlag">;
249
105
  value: z.ZodObject<{
@@ -252,58 +108,16 @@ export declare const accountSettingRegistry: {
252
108
  setBy: z.ZodOptional<z.ZodString>;
253
109
  expiresAt: z.ZodOptional<z.ZodNumber>;
254
110
  reason: z.ZodOptional<z.ZodString>;
255
- }, "strip", z.ZodTypeAny, {
256
- value: boolean;
257
- setAt: number;
258
- setBy?: string | undefined;
259
- expiresAt?: number | undefined;
260
- reason?: string | undefined;
261
- }, {
262
- value: boolean;
263
- setAt: number;
264
- setBy?: string | undefined;
265
- expiresAt?: number | undefined;
266
- reason?: string | undefined;
267
- }>;
268
- }, "strip", z.ZodTypeAny, {
269
- kind: "MutedFlag";
270
- value: {
271
- value: boolean;
272
- setAt: number;
273
- setBy?: string | undefined;
274
- expiresAt?: number | undefined;
275
- reason?: string | undefined;
276
- };
277
- }, {
278
- kind: "MutedFlag";
279
- value: {
280
- value: boolean;
281
- setAt: number;
282
- setBy?: string | undefined;
283
- expiresAt?: number | undefined;
284
- reason?: string | undefined;
285
- };
286
- }>;
111
+ }, z.core.$strip>;
112
+ }, z.core.$strip>;
287
113
  readonly FolderRoleAppointment: z.ZodObject<{
288
114
  kind: z.ZodLiteral<"String">;
289
115
  value: z.ZodString;
290
- }, "strip", z.ZodTypeAny, {
291
- kind: "String";
292
- value: string;
293
- }, {
294
- kind: "String";
295
- value: string;
296
- }>;
116
+ }, z.core.$strip>;
297
117
  readonly FolderRoleAppointmentLabel: z.ZodObject<{
298
118
  kind: z.ZodLiteral<"String">;
299
119
  value: z.ZodString;
300
- }, "strip", z.ZodTypeAny, {
301
- kind: "String";
302
- value: string;
303
- }, {
304
- kind: "String";
305
- value: string;
306
- }>;
120
+ }, z.core.$strip>;
307
121
  /**
308
122
  * Deprecated tombstone: superseded by `FolderRoleAppointment` (RFC 032
309
123
  * exclusive-folder-appointment, #976). Kept only so `baseSettingName`
@@ -317,13 +131,7 @@ export declare const accountSettingRegistry: {
317
131
  readonly MailboxRole: z.ZodObject<{
318
132
  kind: z.ZodLiteral<"String">;
319
133
  value: z.ZodString;
320
- }, "strip", z.ZodTypeAny, {
321
- kind: "String";
322
- value: string;
323
- }, {
324
- kind: "String";
325
- value: string;
326
- }>;
134
+ }, z.core.$strip>;
327
135
  };
328
136
  export type AccountSettingRegistry = typeof accountSettingRegistry;
329
137
  export type AccountSettingValueFor<N extends AccountSettingNameValue> = z.infer<AccountSettingRegistry[N]>;
@@ -363,9 +171,11 @@ export type AnyAccountSettingValue = z.infer<typeof BooleanSettingSchema | typeo
363
171
  */
364
172
  export declare function parseAccountSettingValue<N extends AccountSettingNameValue>(name: N, value: unknown): AccountSettingValueFor<N>;
365
173
  export declare function parseAccountSettingValue(name: StoredSettingName, value: unknown): AnyAccountSettingValue;
174
+ type SafeParseResult<T> = ReturnType<z.ZodType<T>["safeParse"]>;
366
175
  /**
367
176
  * Non-throwing variant: returns the zod SafeParse result so a caller with a
368
177
  * recovery path can branch on `success`. Accepts composite names like above.
369
178
  */
370
- export declare function safeParseAccountSettingValue<N extends AccountSettingNameValue>(name: N, value: unknown): z.SafeParseReturnType<unknown, AccountSettingValueFor<N>>;
371
- export declare function safeParseAccountSettingValue(name: StoredSettingName, value: unknown): z.SafeParseReturnType<unknown, AnyAccountSettingValue>;
179
+ export declare function safeParseAccountSettingValue<N extends AccountSettingNameValue>(name: N, value: unknown): SafeParseResult<AccountSettingValueFor<N>>;
180
+ export declare function safeParseAccountSettingValue(name: StoredSettingName, value: unknown): SafeParseResult<AnyAccountSettingValue>;
181
+ export {};
@@ -4,21 +4,7 @@ export declare const UpdateManifestSchema: z.ZodObject<{
4
4
  version: z.ZodString;
5
5
  publishedAt: z.ZodString;
6
6
  summary: z.ZodString;
7
- releaseNotesUrl: z.ZodEffects<z.ZodString, string, string>;
7
+ releaseNotesUrl: z.ZodString;
8
8
  registry: z.ZodString;
9
9
  schemaVersion: z.ZodOptional<z.ZodNumber>;
10
- }, "strip", z.ZodTypeAny, {
11
- summary: string;
12
- version: string;
13
- publishedAt: string;
14
- releaseNotesUrl: string;
15
- registry: string;
16
- schemaVersion?: number | undefined;
17
- }, {
18
- summary: string;
19
- version: string;
20
- publishedAt: string;
21
- releaseNotesUrl: string;
22
- registry: string;
23
- schemaVersion?: number | undefined;
24
- }>;
10
+ }, z.core.$strip>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/data-ports",
3
- "version": "0.0.92",
3
+ "version": "0.0.94",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -31,7 +31,7 @@
31
31
  "@remit/api-zod-schemas": "*"
32
32
  },
33
33
  "peerDependencies": {
34
- "zod": "^3.25.0"
34
+ "zod": "^3.25.0 || ^4.6.7"
35
35
  },
36
36
  "license": "MIT",
37
37
  "publishConfig": {