@marcoappio/marco-config 4.0.13 → 4.0.14

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.
@@ -1,21 +1,10 @@
1
1
  import type { ReadonlyDeep } from 'type-fest';
2
2
  import * as v from 'valibot';
3
3
  export { appwriteRowIdSchema, appwriteTableIdSchema, appwriteTableIds, type AppwriteDataRow, type AppwriteRow, type AppwriteRowTable } from './tableContract';
4
+ export type { AppwriteDraftAttachment, AppwriteDraftEnvelope } from './decodedSchemas';
4
5
  export type { AppwriteMailboxSyncLane, AppwriteMailboxSyncLaneState, AppwriteMailboxSyncState, AppwritePollShardState, AppwriteTableId } from './tableContract';
5
6
  export { type AppwriteColumnDefinition, type AppwriteColumnSchema, type AppwriteColumnType, type AppwriteIndexDefinition, type AppwriteIndexType, type AppwriteRelationshipDefinition, type AppwriteRelationshipOnDelete, type AppwriteRelationshipSchema, type AppwriteRelationshipType, type AppwriteTableDefinition, type AppwriteTableInput, type AppwriteTableKey, appwriteDataSchemas, appwriteRowSchemas, appwriteTableContract, appwriteTables, defineAppwriteTables, } from './tableContract';
6
7
  export { accountProviders, accountStates, appwriteRelationshipIdSchema, commandStates, draftStates, draftTypes, jobStates, labelSpecialUses, mailboxSyncLaneStates, mailboxSyncLanes, mailboxSyncProvisionedStates, mailboxSyncStates, oauthOperations, oauthProviders, oauthReturnUris, oauthReturnUriSchema, pollShardStates, } from './tableContract';
7
- declare const draftAttachmentSchema: v.StrictObjectSchema<{
8
- readonly fileId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
9
- readonly fileName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
10
- readonly mimeType: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 3, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
11
- readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
12
- }, undefined>;
13
- declare const draftEnvelopeSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.StrictObjectSchema<{
14
- readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
15
- readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
16
- readonly subject: v.NullableSchema<v.StringSchema<undefined>, undefined>;
17
- readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
18
- }, undefined>]>;
19
8
  declare const messageAttachmentSchema: v.LooseObjectSchema<{
20
9
  readonly fileId: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>;
21
10
  readonly isAttachment: v.BooleanSchema<undefined>;
@@ -29,8 +18,6 @@ declare const messageRecipientSchema: v.StrictObjectSchema<{
29
18
  readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
30
19
  readonly type: v.PicklistSchema<readonly ["bcc", "cc", "to", "replyTo"], undefined>;
31
20
  }, undefined>;
32
- export type AppwriteDraftAttachment = ReadonlyDeep<v.InferOutput<typeof draftAttachmentSchema>>;
33
- export type AppwriteDraftEnvelope = ReadonlyDeep<v.InferOutput<typeof draftEnvelopeSchema>>;
34
21
  export type AppwriteMessageAttachment = ReadonlyDeep<v.InferOutput<typeof messageAttachmentSchema>>;
35
22
  export type AppwriteMessageRecipient = ReadonlyDeep<v.InferOutput<typeof messageRecipientSchema>>;
36
23
  declare const appwriteEnvironments: readonly ['development', 'production', 'staging'];
@@ -597,10 +584,10 @@ export declare const appwrite: {
597
584
  readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
598
585
  }, undefined>, undefined>]>;
599
586
  readonly draftEnvelope: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.StrictObjectSchema<{
600
- readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
601
- readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
602
- readonly subject: v.NullableSchema<v.StringSchema<undefined>, undefined>;
603
- readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
587
+ readonly bcc: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
588
+ readonly cc: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
589
+ readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 998, undefined>]>, undefined>;
590
+ readonly to: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
604
591
  }, undefined>]>;
605
592
  readonly jobPayload: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.CheckAction<unknown, undefined>, v.LooseObjectSchema<{}, undefined>]>;
606
593
  readonly messageAttachments: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.ArraySchema<v.LooseObjectSchema<{
@@ -1 +1 @@
1
- {"version":3,"file":"appwrite.d.ts","sourceRoot":"","sources":["../../src/appwrite/appwrite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAwB5B,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAE7J,YAAY,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC/J,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,uB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDT,CAAA"}
@@ -1,23 +1,11 @@
1
1
  import * as v from 'valibot';
2
2
  import { string } from '../schemas/string';
3
3
  import { MESSAGE_RECIPIENT_TYPES } from '../types';
4
+ import { persistedDraftAttachmentsSchema, persistedDraftEnvelopeSchema } from './decodedSchemas';
4
5
  import { appwriteDataSchemas, appwriteIds, appwriteRowSchemas as generatedRowSchemas, appwriteRowIdSchema, appwriteTables, mailboxSyncLaneStates, mailboxSyncLanes, mailboxSyncStates, oauthOperations, oauthProviders, oauthReturnUris, oauthReturnUriSchema, pollShardStates, jsonObjectTextSchema, nonNegativeIntegerSchema, identifierSchema, } from './tableContract';
5
6
  export { appwriteRowIdSchema, appwriteTableIdSchema, appwriteTableIds } from './tableContract';
6
7
  export { appwriteDataSchemas, appwriteRowSchemas, appwriteTableContract, appwriteTables, defineAppwriteTables, } from './tableContract';
7
8
  export { accountProviders, accountStates, appwriteRelationshipIdSchema, commandStates, draftStates, draftTypes, jobStates, labelSpecialUses, mailboxSyncLaneStates, mailboxSyncLanes, mailboxSyncProvisionedStates, mailboxSyncStates, oauthOperations, oauthProviders, oauthReturnUris, oauthReturnUriSchema, pollShardStates, } from './tableContract';
8
- const draftAttachmentSchema = v.strictObject({
9
- fileId: appwriteRowIdSchema,
10
- fileName: v.pipe(v.string(), v.minLength(1), v.maxLength(255)),
11
- mimeType: v.pipe(v.string(), v.minLength(3), v.maxLength(255)),
12
- size: nonNegativeIntegerSchema,
13
- });
14
- const draftAttachmentsSchema = v.pipe(v.string(), v.parseJson(), v.array(draftAttachmentSchema));
15
- const draftEnvelopeSchema = v.pipe(v.string(), v.parseJson(), v.strictObject({
16
- bcc: v.array(string.mailboxAddress()),
17
- cc: v.array(string.mailboxAddress()),
18
- subject: v.nullable(v.string()),
19
- to: v.array(string.mailboxAddress()),
20
- }));
21
9
  const messageAttachmentSchema = v.looseObject({
22
10
  fileId: v.optional(v.nullable(appwriteRowIdSchema)),
23
11
  isAttachment: v.boolean(),
@@ -67,8 +55,8 @@ export const appwrite = {
67
55
  dataSchemas: appwriteDataSchemas,
68
56
  decodedSchemas: {
69
57
  commandPayload: jsonObjectTextSchema,
70
- draftAttachments: draftAttachmentsSchema,
71
- draftEnvelope: draftEnvelopeSchema,
58
+ draftAttachments: persistedDraftAttachmentsSchema,
59
+ draftEnvelope: persistedDraftEnvelopeSchema,
72
60
  jobPayload: jsonObjectTextSchema,
73
61
  messageAttachments: messageAttachmentsSchema,
74
62
  messageRecipients: messageRecipientsSchema,
@@ -1106,4 +1106,28 @@ describe('appwrite', () => {
1106
1106
  expect(v.safeParse(testCase.schema, '{').success).toBe(false);
1107
1107
  });
1108
1108
  }
1109
+ it('keeps persisted draft envelope constraints strict and bounded', () => {
1110
+ const envelope = { bcc: ['sender@example'], cc: [], subject: 'a'.repeat(998), to: ['recipient@example.com'] };
1111
+ expect(v.safeParse(appwrite.decodedSchemas.draftEnvelope, JSON.stringify(envelope)).success).toBe(true);
1112
+ for (const invalidEnvelope of [
1113
+ { ...envelope, subject: 'a'.repeat(999) },
1114
+ { ...envelope, to: ['not-an-address'] },
1115
+ { ...envelope, unexpected: true },
1116
+ ]) {
1117
+ expect(v.safeParse(appwrite.decodedSchemas.draftEnvelope, JSON.stringify(invalidEnvelope)).success).toBe(false);
1118
+ }
1119
+ });
1120
+ it('keeps persisted draft attachment constraints strict and bounded', () => {
1121
+ const attachment = { fileId: 'test-file-id-1', fileName: 'proposal.pdf', mimeType: 'application/pdf', size: 0 };
1122
+ expect(v.safeParse(appwrite.decodedSchemas.draftAttachments, JSON.stringify([attachment])).success).toBe(true);
1123
+ for (const invalidAttachment of [
1124
+ { ...attachment, fileId: '-invalid' },
1125
+ { ...attachment, fileName: 'a'.repeat(256) },
1126
+ { ...attachment, mimeType: 'x' },
1127
+ { ...attachment, size: -1 },
1128
+ { ...attachment, unexpected: true },
1129
+ ]) {
1130
+ expect(v.safeParse(appwrite.decodedSchemas.draftAttachments, JSON.stringify([invalidAttachment])).success).toBe(false);
1131
+ }
1132
+ });
1109
1133
  });
@@ -126,7 +126,7 @@ export declare const appwriteCommands: {
126
126
  readonly kind: v.LiteralSchema<"draft.attachment.delete", undefined>;
127
127
  readonly payload: v.StrictObjectSchema<{
128
128
  readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
129
- readonly fileId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
129
+ readonly fileId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
130
130
  }, undefined>;
131
131
  readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
132
132
  readonly version: v.LiteralSchema<1, undefined>;
@@ -136,9 +136,9 @@ export declare const appwriteCommands: {
136
136
  readonly kind: v.LiteralSchema<"draft.attachment.link", undefined>;
137
137
  readonly payload: v.StrictObjectSchema<{
138
138
  readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
139
- readonly fileId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
140
- readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
141
- readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
139
+ readonly fileId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
140
+ readonly fileName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
141
+ readonly mimeType: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 3, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
142
142
  readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
143
143
  }, undefined>;
144
144
  readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
@@ -179,11 +179,11 @@ export declare const appwriteCommands: {
179
179
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
180
180
  readonly kind: v.LiteralSchema<"draft.envelope.set", undefined>;
181
181
  readonly payload: v.StrictObjectSchema<{
182
- readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
183
- readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
184
182
  readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
183
+ readonly bcc: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
184
+ readonly cc: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
185
185
  readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 998, undefined>]>, undefined>;
186
- readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
186
+ readonly to: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
187
187
  }, undefined>;
188
188
  readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
189
189
  readonly version: v.LiteralSchema<1, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/appwrite/commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAa5B,eAAO,MAAM,cAAc;8BACC,MAAM,KAAG,MAAM;CAC1C,CAAA;AAED,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCR,CAAA;AAEV,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO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} from '../schemas/id';
3
3
  import { string } from '../schemas/string';
4
4
  import { DRAFT_TYPES } from '../types';
5
+ import { appwriteDraftAttachmentSchema, appwriteDraftEnvelopeSchema } from './decodedSchemas';
5
6
  import { canonicalTimestampSchema, commandStates, isoTimestampSchema, nonNegativeIntegerSchema } from './tableContract';
6
7
  const commandIdSchema = v.pipe(v.string(), v.uuid(), v.brand('CommandId'));
7
8
  const appwriteThreadCommandBatchSize = 100;
@@ -150,11 +151,8 @@ const draftContentSetPayloadSchema = v.strictObject({
150
151
  html: v.pipe(v.string(), v.maxLength(384_000)),
151
152
  });
152
153
  const draftEnvelopeSetPayloadSchema = v.strictObject({
153
- bcc: v.array(string.mailboxAddress()),
154
- cc: v.array(string.mailboxAddress()),
154
+ ...appwriteDraftEnvelopeSchema.entries,
155
155
  draftId: id.draftId.required(),
156
- subject: v.nullable(v.pipe(v.string(), v.maxLength(998))),
157
- to: v.array(string.mailboxAddress()),
158
156
  });
159
157
  const draftFromSetPayloadSchema = v.strictObject({
160
158
  draftId: id.draftId.required(),
@@ -163,15 +161,12 @@ const draftFromSetPayloadSchema = v.strictObject({
163
161
  });
164
162
  const draftDeletePayloadSchema = v.strictObject({ draftId: id.draftId.required() });
165
163
  const draftAttachmentLinkPayloadSchema = v.strictObject({
164
+ ...appwriteDraftAttachmentSchema.entries,
166
165
  draftId: id.draftId.required(),
167
- fileId: string.required(36),
168
- fileName: string.required(),
169
- mimeType: string.required(),
170
- size: nonNegativeIntegerSchema,
171
166
  });
172
167
  const draftAttachmentDeletePayloadSchema = v.strictObject({
173
168
  draftId: id.draftId.required(),
174
- fileId: string.required(36),
169
+ fileId: appwriteDraftAttachmentSchema.entries.fileId,
175
170
  });
176
171
  const draftSendPayloadSchema = v.strictObject({ draftId: id.draftId.required() });
177
172
  const draftSendCancelPayloadSchema = v.strictObject({ draftId: id.draftId.required() });
@@ -333,6 +333,38 @@ describe('appwriteCommands', () => {
333
333
  expect(v.safeParse(appwriteCommands.requestSchema, command).success).toBe(true);
334
334
  expect(v.safeParse(appwriteCommands.requestSchema, { ...command, payload: { ...command.payload, to: [overlongAddress] } }).success).toBe(false);
335
335
  });
336
+ it('shares persisted draft envelope and attachment boundaries', () => {
337
+ const envelopeCommand = {
338
+ ...commandMetadata,
339
+ accountId: 'account_1',
340
+ kind: 'draft.envelope.set',
341
+ payload: { bcc: [], cc: [], draftId: 'draft_1', subject: 'a'.repeat(998), to: ['recipient@example.com'] },
342
+ };
343
+ const attachmentCommand = {
344
+ ...commandMetadata,
345
+ accountId: 'account_1',
346
+ kind: 'draft.attachment.link',
347
+ payload: { draftId: 'draft_1', fileId: 'test-file-id-1', fileName: 'proposal.pdf', mimeType: 'application/pdf', size: 0 },
348
+ };
349
+ expect(v.safeParse(appwriteCommands.requestSchema, envelopeCommand).success).toBe(true);
350
+ expect(v.safeParse(appwriteCommands.requestSchema, { ...envelopeCommand, payload: { ...envelopeCommand.payload, subject: 'a'.repeat(999) } }).success).toBe(false);
351
+ expect(v.safeParse(appwriteCommands.requestSchema, attachmentCommand).success).toBe(true);
352
+ for (const payload of [
353
+ { ...attachmentCommand.payload, fileId: '-invalid' },
354
+ { ...attachmentCommand.payload, fileName: 'a'.repeat(256) },
355
+ { ...attachmentCommand.payload, mimeType: 'x' },
356
+ { ...attachmentCommand.payload, size: -1 },
357
+ { ...attachmentCommand.payload, unexpected: true },
358
+ ]) {
359
+ expect(v.safeParse(appwriteCommands.requestSchema, { ...attachmentCommand, payload }).success).toBe(false);
360
+ }
361
+ expect(v.safeParse(appwriteCommands.requestSchema, {
362
+ ...commandMetadata,
363
+ accountId: 'account_1',
364
+ kind: 'draft.attachment.delete',
365
+ payload: { draftId: 'draft_1', fileId: '-invalid' },
366
+ }).success).toBe(false);
367
+ });
336
368
  it('rejects non-canonical scheduled command timestamps', () => {
337
369
  for (const command of [
338
370
  {
@@ -0,0 +1,35 @@
1
+ import type { ReadonlyDeep } from 'type-fest';
2
+ import * as v from 'valibot';
3
+ export declare const appwriteDraftAttachmentSchema: v.StrictObjectSchema<{
4
+ readonly fileId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
5
+ readonly fileName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
6
+ readonly mimeType: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 3, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
7
+ readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
8
+ }, undefined>;
9
+ export declare const appwriteDraftAttachmentsSchema: v.ArraySchema<v.StrictObjectSchema<{
10
+ readonly fileId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
11
+ readonly fileName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
12
+ readonly mimeType: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 3, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
13
+ readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
14
+ }, undefined>, undefined>;
15
+ export declare const persistedDraftAttachmentsSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.ArraySchema<v.StrictObjectSchema<{
16
+ readonly fileId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
17
+ readonly fileName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
18
+ readonly mimeType: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 3, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
19
+ readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
20
+ }, undefined>, undefined>]>;
21
+ export declare const appwriteDraftEnvelopeSchema: v.StrictObjectSchema<{
22
+ readonly bcc: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
23
+ readonly cc: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
24
+ readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 998, undefined>]>, undefined>;
25
+ readonly to: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
26
+ }, undefined>;
27
+ export declare const persistedDraftEnvelopeSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.ParseJsonAction<string, undefined, undefined>, v.StrictObjectSchema<{
28
+ readonly bcc: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
29
+ readonly cc: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
30
+ readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 998, undefined>]>, undefined>;
31
+ readonly to: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
32
+ }, undefined>]>;
33
+ export type AppwriteDraftAttachment = ReadonlyDeep<v.InferOutput<typeof appwriteDraftAttachmentSchema>>;
34
+ export type AppwriteDraftEnvelope = ReadonlyDeep<v.InferOutput<typeof appwriteDraftEnvelopeSchema>>;
35
+ //# sourceMappingURL=decodedSchemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decodedSchemas.d.ts","sourceRoot":"","sources":["../../src/appwrite/decodedSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAM5B,eAAO,MAAM,6BAA6B;;;;;aAKxC,CAAA;AACF,eAAO,MAAM,8BAA8B;;;;;yBAAyC,CAAA;AACpF,eAAO,MAAM,+BAA+B;;;;;2BAAoE,CAAA;AAEhH,eAAO,MAAM,2BAA2B;;;;;aAKtC,CAAA;AACF,eAAO,MAAM,4BAA4B;;;;;eAAiE,CAAA;AAE1G,MAAM,MAAM,uBAAuB,GAAG,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,6BAA6B,CAAC,CAAC,CAAA;AACvG,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAAC,CAAC,CAAA"}
@@ -0,0 +1,18 @@
1
+ import * as v from 'valibot';
2
+ import { mailboxAddressSchema, nonNegativeIntegerSchema } from '../schemas/scalars';
3
+ import { appwriteRowIdSchema } from './tableContract';
4
+ export const appwriteDraftAttachmentSchema = v.strictObject({
5
+ fileId: appwriteRowIdSchema,
6
+ fileName: v.pipe(v.string(), v.minLength(1), v.maxLength(255)),
7
+ mimeType: v.pipe(v.string(), v.minLength(3), v.maxLength(255)),
8
+ size: nonNegativeIntegerSchema,
9
+ });
10
+ export const appwriteDraftAttachmentsSchema = v.array(appwriteDraftAttachmentSchema);
11
+ export const persistedDraftAttachmentsSchema = v.pipe(v.string(), v.parseJson(), appwriteDraftAttachmentsSchema);
12
+ export const appwriteDraftEnvelopeSchema = v.strictObject({
13
+ bcc: v.array(mailboxAddressSchema),
14
+ cc: v.array(mailboxAddressSchema),
15
+ subject: v.nullable(v.pipe(v.string(), v.maxLength(998))),
16
+ to: v.array(mailboxAddressSchema),
17
+ });
18
+ export const persistedDraftEnvelopeSchema = v.pipe(v.string(), v.parseJson(), appwriteDraftEnvelopeSchema);
@@ -226,7 +226,7 @@ export declare const appwriteFunctions: {
226
226
  readonly kind: v.LiteralSchema<"draft.attachment.delete", undefined>;
227
227
  readonly payload: v.StrictObjectSchema<{
228
228
  readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
229
- readonly fileId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
229
+ readonly fileId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
230
230
  }, undefined>;
231
231
  readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
232
232
  readonly version: v.LiteralSchema<1, undefined>;
@@ -236,9 +236,9 @@ export declare const appwriteFunctions: {
236
236
  readonly kind: v.LiteralSchema<"draft.attachment.link", undefined>;
237
237
  readonly payload: v.StrictObjectSchema<{
238
238
  readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
239
- readonly fileId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
240
- readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
241
- readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
239
+ readonly fileId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
240
+ readonly fileName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
241
+ readonly mimeType: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 3, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
242
242
  readonly size: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
243
243
  }, undefined>;
244
244
  readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
@@ -279,11 +279,11 @@ export declare const appwriteFunctions: {
279
279
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
280
280
  readonly kind: v.LiteralSchema<"draft.envelope.set", undefined>;
281
281
  readonly payload: v.StrictObjectSchema<{
282
- readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
283
- readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
284
282
  readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
283
+ readonly bcc: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
284
+ readonly cc: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
285
285
  readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 998, undefined>]>, undefined>;
286
- readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>, undefined>;
286
+ readonly to: v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
287
287
  }, undefined>;
288
288
  readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
289
289
  readonly version: v.LiteralSchema<1, undefined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "4.0.13",
3
+ "version": "4.0.14",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",