@marcoappio/marco-config 2.0.578 → 2.0.580

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.
@@ -189,10 +189,11 @@ declare const rowSchemas: {
189
189
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
190
190
  }, undefined>;
191
191
  readonly profiles: v.StrictObjectSchema<{
192
+ readonly avatarFileId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>, undefined>;
192
193
  readonly email: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>;
193
- readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
194
- readonly onboardingState: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
195
- readonly timezone: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
194
+ readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
195
+ readonly onboardingState: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
196
+ readonly timezone: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
196
197
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
197
198
  readonly $databaseId: v.LiteralSchema<"marco", undefined>;
198
199
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
@@ -495,10 +496,11 @@ export declare const appwrite: {
495
496
  readonly $updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
496
497
  }, undefined>;
497
498
  readonly profiles: v.StrictObjectSchema<{
499
+ readonly avatarFileId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>, undefined>;
498
500
  readonly email: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>;
499
- readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
500
- readonly onboardingState: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
501
- readonly timezone: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
501
+ readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
502
+ readonly onboardingState: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
503
+ readonly timezone: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
502
504
  readonly $createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
503
505
  readonly $databaseId: v.LiteralSchema<"marco", undefined>;
504
506
  readonly $id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 36, undefined>, v.RegexAction<string, undefined>]>;
@@ -1 +1 @@
1
- {"version":3,"file":"appwrite.d.ts","sourceRoot":"","sources":["../../src/appwrite/appwrite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAgE5B,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoLN,CAAA;AAEV,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYX,CAAA;AAEV,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,UAAU,CA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,10 +181,11 @@ const rowSchemas = {
181
181
  }),
182
182
  profiles: v.strictObject({
183
183
  ...wireMetadata(appwriteIds.tables.profiles),
184
+ avatarFileId: v.nullable(appwriteRowIdSchema),
184
185
  email: emailSchema,
185
- name: v.optional(identifierSchema),
186
- onboardingState: v.optional(identifierSchema),
187
- timezone: v.optional(identifierSchema),
186
+ name: v.nullable(identifierSchema),
187
+ onboardingState: v.nullable(identifierSchema),
188
+ timezone: v.nullable(identifierSchema),
188
189
  }),
189
190
  pushNotificationTokens: v.strictObject({
190
191
  ...wireMetadata(appwriteIds.tables.pushNotificationTokens),
@@ -140,7 +140,11 @@ const validRows = {
140
140
  profiles: {
141
141
  ...metadata,
142
142
  $tableId: 'profiles',
143
+ avatarFileId: null,
143
144
  email: 'marco@example.com',
145
+ name: null,
146
+ onboardingState: null,
147
+ timezone: null,
144
148
  },
145
149
  pushNotificationTokens: {
146
150
  ...metadata,
@@ -1,11 +1,14 @@
1
1
  import * as v from 'valibot';
2
+ export declare const appwriteAvatar: {
3
+ createFileId: (userId: string, sha256: string) => string;
4
+ };
2
5
  export declare const appwriteCommands: {
3
6
  readonly errorCodes: readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "COMMAND_CONFLICT", "COMMAND_NOT_FOUND", "INVALID_COMMAND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"];
4
7
  readonly errorSchema: v.StrictObjectSchema<{
5
8
  readonly code: v.PicklistSchema<readonly ["AUTHENTICATION_FAILED", "AUTHORIZATION_FAILED", "COMMAND_CONFLICT", "COMMAND_NOT_FOUND", "INVALID_COMMAND", "PROVIDER_REJECTED", "TRANSIENT_FAILURE", "INTERNAL_ERROR"], undefined>;
6
9
  readonly retryable: v.BooleanSchema<undefined>;
7
10
  }, undefined>;
8
- readonly kinds: readonly ["profile.settings.set", "account.settings.set", "account.delete", "alias.create", "alias.delete", "alias.name.set", "alias.primary.set", "alias.signature.set", "label.create", "label.delete", "label.rename", "thread.label.add", "thread.label.remove", "thread.archive.set", "thread.flagged.set", "thread.seen.set", "thread.snooze.set", "thread.spam.set", "thread.trash.set", "thread.delete", "draft.create", "draft.content.set", "draft.envelope.set", "draft.from.set", "draft.delete", "draft.attachment.link", "draft.attachment.delete", "draft.send", "draft.send.cancel", "draft.send.schedule"];
11
+ readonly kinds: readonly ["profile.settings.set", "profile.avatar.set", "account.settings.set", "account.delete", "alias.create", "alias.delete", "alias.name.set", "alias.primary.set", "alias.signature.set", "label.create", "label.delete", "label.rename", "thread.label.add", "thread.label.remove", "thread.archive.set", "thread.flagged.set", "thread.seen.set", "thread.snooze.set", "thread.spam.set", "thread.trash.set", "thread.delete", "draft.create", "draft.content.set", "draft.envelope.set", "draft.from.set", "draft.delete", "draft.attachment.link", "draft.attachment.delete", "draft.send", "draft.send.cancel", "draft.send.schedule"];
9
12
  readonly requestSchema: v.VariantSchema<"kind", readonly [v.StrictObjectSchema<{
10
13
  readonly accountId: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>, undefined>;
11
14
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
@@ -16,6 +19,15 @@ export declare const appwriteCommands: {
16
19
  }, undefined>;
17
20
  readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
18
21
  readonly version: v.LiteralSchema<1, undefined>;
22
+ }, undefined>, v.StrictObjectSchema<{
23
+ readonly accountId: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>, undefined>;
24
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
25
+ readonly kind: v.LiteralSchema<"profile.avatar.set", undefined>;
26
+ readonly payload: v.StrictObjectSchema<{
27
+ readonly sha256: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
28
+ }, undefined>;
29
+ readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
30
+ readonly version: v.LiteralSchema<1, undefined>;
19
31
  }, undefined>, v.StrictObjectSchema<{
20
32
  readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
21
33
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/appwrite/commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAiQ5B,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQnB,CAAA;AAEV,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,WAAW,CAAC,CAAA;AACrF,M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sB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,aAAa,CAAC,CAAA;AACzF,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAA;AAChE,MAAM,MAAM,sBAAsB,CAAC,KAAK,SAAS,mBAAmB,IAAI,OAAO,CAC7E,sBAAsB,EACtB;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAChB,CAAC,SAAS,CAAC,CAAA;AACZ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,cAAc,CAAC,CAAA;AAC3F,MAAM,MAAM,oBAAoB,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAA"}
@@ -6,6 +6,11 @@ const commandIdSchema = v.pipe(v.string(), v.uuid(), v.brand('CommandId'));
6
6
  const nonNegativeIntegerSchema = v.pipe(v.number(), v.integer(), v.minValue(0));
7
7
  const timestampSchema = v.pipe(v.string(), v.isoTimestamp());
8
8
  const threadIdsSchema = v.pipe(v.array(id.threadId.required()), v.minLength(1));
9
+ const avatarSha256Schema = v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/));
10
+ const appwriteUserIdSchema = v.pipe(v.string(), v.minLength(1), v.maxLength(20), v.regex(/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/));
11
+ export const appwriteAvatar = {
12
+ createFileId: (userId, sha256) => `avatar_${v.parse(appwriteUserIdSchema, userId)}${v.parse(avatarSha256Schema, sha256).slice(0, 9)}`,
13
+ };
9
14
  const commandKinds = {
10
15
  accountDelete: 'account.delete',
11
16
  accountSettingsSet: 'account.settings.set',
@@ -27,6 +32,7 @@ const commandKinds = {
27
32
  labelCreate: 'label.create',
28
33
  labelDelete: 'label.delete',
29
34
  labelRename: 'label.rename',
35
+ profileAvatarSet: 'profile.avatar.set',
30
36
  profileSettingsSet: 'profile.settings.set',
31
37
  threadArchiveSet: 'thread.archive.set',
32
38
  threadDelete: 'thread.delete',
@@ -40,6 +46,7 @@ const commandKinds = {
40
46
  };
41
47
  const appwriteCommandKinds = [
42
48
  commandKinds.profileSettingsSet,
49
+ commandKinds.profileAvatarSet,
43
50
  commandKinds.accountSettingsSet,
44
51
  commandKinds.accountDelete,
45
52
  commandKinds.aliasCreate,
@@ -95,6 +102,7 @@ const profileSettingsSetPayloadSchema = v.strictObject({
95
102
  name: v.optional(v.nullable(string.required())),
96
103
  timezone: v.optional(v.nullable(string.required())),
97
104
  });
105
+ const profileAvatarSetPayloadSchema = v.strictObject({ sha256: avatarSha256Schema });
98
106
  const accountSettingsSetPayloadSchema = v.strictObject({
99
107
  colour: v.optional(string.required(64)),
100
108
  displayName: v.optional(v.nullable(string.required())),
@@ -166,6 +174,7 @@ const draftSendCancelPayloadSchema = v.strictObject({ draftId: id.draftId.requir
166
174
  const draftSendSchedulePayloadSchema = v.strictObject({ draftId: id.draftId.required(), scheduledAt: timestampSchema });
167
175
  const commandRequestSchemas = [
168
176
  createCommandRequestSchema(commandKinds.profileSettingsSet, profileSettingsSetPayloadSchema, v.nullable(accountIdSchema)),
177
+ createCommandRequestSchema(commandKinds.profileAvatarSet, profileAvatarSetPayloadSchema, v.nullable(accountIdSchema)),
169
178
  createAccountCommandRequestSchema(commandKinds.accountSettingsSet, accountSettingsSetPayloadSchema),
170
179
  createAccountCommandRequestSchema(commandKinds.accountDelete, accountDeletePayloadSchema),
171
180
  createAccountCommandRequestSchema(commandKinds.aliasCreate, aliasCreatePayloadSchema),
@@ -1,11 +1,13 @@
1
1
  import { describe, expect, it } from 'bun:test';
2
2
  import * as v from 'valibot';
3
- import { appwriteCommands } from './commands';
3
+ import { appwriteAvatar, appwriteCommands } from './commands';
4
4
  const commandMetadata = {
5
5
  id: '0197f3d4-1b22-7abc-8def-123456789abc',
6
6
  submittedAt: '2026-07-15T00:00:00.000Z',
7
7
  version: 1,
8
8
  };
9
+ const avatarSha256 = 'a'.repeat(64);
10
+ const avatarUserId = 'avatarowner123456789';
9
11
  const commandFixtures = [
10
12
  {
11
13
  command: {
@@ -232,12 +234,21 @@ const commandFixtures = [
232
234
  payload: { draftId: 'draft_1', scheduledAt: '2026-07-16T00:00:00.000Z' },
233
235
  },
234
236
  },
237
+ {
238
+ command: {
239
+ ...commandMetadata,
240
+ accountId: null,
241
+ kind: 'profile.avatar.set',
242
+ payload: { sha256: avatarSha256 },
243
+ },
244
+ },
235
245
  ];
236
246
  describe('appwriteCommands', () => {
237
247
  it('publishes the complete version-one command and status manifest', () => {
238
248
  expect(appwriteCommands.version).toBe(1);
239
249
  expect(appwriteCommands.kinds).toEqual([
240
250
  'profile.settings.set',
251
+ 'profile.avatar.set',
241
252
  'account.settings.set',
242
253
  'account.delete',
243
254
  'alias.create',
@@ -280,6 +291,13 @@ describe('appwriteCommands', () => {
280
291
  'INTERNAL_ERROR',
281
292
  ]);
282
293
  });
294
+ it('derives a user-scoped content-addressed avatar file ID within Appwrite limits', () => {
295
+ expect(appwriteAvatar.createFileId(avatarUserId, avatarSha256)).toBe(`avatar_${avatarUserId}${avatarSha256.slice(0, 9)}`);
296
+ });
297
+ it('rejects an invalid avatar input before deriving a file ID', () => {
298
+ expect(() => appwriteAvatar.createFileId(avatarUserId, 'not-a-sha256')).toThrow();
299
+ expect(() => appwriteAvatar.createFileId('invalid!user', avatarSha256)).toThrow();
300
+ });
283
301
  for (const { command } of commandFixtures) {
284
302
  it(`accepts ${command.kind}`, () => {
285
303
  expect(v.safeParse(appwriteCommands.requestSchema, command).success).toBe(true);
@@ -320,6 +338,15 @@ describe('appwriteCommands', () => {
320
338
  command: { ...commandFixtures[0].command, version: 2 },
321
339
  description: 'an unknown command version',
322
340
  },
341
+ {
342
+ command: {
343
+ ...commandMetadata,
344
+ accountId: null,
345
+ kind: 'profile.avatar.set',
346
+ payload: { sha256: 'not-a-sha256' },
347
+ },
348
+ description: 'an avatar command without a SHA-256 digest',
349
+ },
323
350
  ];
324
351
  for (const { command, description } of invalidCommands) {
325
352
  it(`rejects ${description}`, () => {
@@ -110,6 +110,15 @@ export declare const appwriteFunctions: {
110
110
  }, undefined>;
111
111
  readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
112
112
  readonly version: v.LiteralSchema<1, undefined>;
113
+ }, undefined>, v.StrictObjectSchema<{
114
+ readonly accountId: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>, undefined>;
115
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
116
+ readonly kind: v.LiteralSchema<"profile.avatar.set", undefined>;
117
+ readonly payload: v.StrictObjectSchema<{
118
+ readonly sha256: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
119
+ }, undefined>;
120
+ readonly submittedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
121
+ readonly version: v.LiteralSchema<1, undefined>;
113
122
  }, undefined>, v.StrictObjectSchema<{
114
123
  readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
115
124
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.BrandAction<string, "CommandId">]>;
@@ -489,7 +498,9 @@ export declare const appwriteFunctions: {
489
498
  context: "internal";
490
499
  method: "POST";
491
500
  path: "/jobs/run";
492
- requestSchema: v.StrictObjectSchema<{}, undefined>;
501
+ requestSchema: v.StrictObjectSchema<{
502
+ readonly jobId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "JobId">]>, undefined>;
503
+ }, undefined>;
493
504
  responseSchema: v.StrictObjectSchema<{
494
505
  readonly state: v.LiteralSchema<"COMPLETED", undefined>;
495
506
  }, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/appwrite/functions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAQ5B,KAAK,uBAAuB,GAAG,eAAe,GAAG,UAAU,GAAG,SAAS,CAAA;AAqJvE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWpB,CAAA;AAEV,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,WAAW,CAAC,CAAA;AACvF,YAAY,EAAE,uBAAuB,EAAE,CAAA;AACvC,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,QAAQ,CAAA;AACnD,MAAM,MAAM,yBAAyB,CAAC,SAAS,SAAS,oBAAoB,IAAI,SA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,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GACvD,KAAK,GACP,KAAK,CAAA;AACT,MAAM,MAAM,uBAAuB,CACjC,SAAS,SAAS,oBAAoB,EACtC,MAAM,SAAS,yBAAyB,CAAC,SAAS,CAAC,IACjD,qBAAqB,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS;IAAE,aAAa,EAAE,MAAM,OAAO,SAAS,CAAC,CAAC,aAAa,CAAA;CAAE,GACzG,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,GACtB,KAAK,CAAA;AACT,MAAM,MAAM,wBAAwB,CAClC,SAAS,SAAS,oBAAoB,EACtC,MAAM,SAAS,yBAAyB,CAAC,SAAS,CAAC,IACjD,qBAAqB,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS;IAAE,cAAc,EAAE,MAAM,OAAO,SAAS,CAAC,CAAC,aAAa,CAAA;CAAE,GAC1G,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,GACtB,KAAK,CAAA"}
@@ -115,7 +115,7 @@ const workerRoutes = {
115
115
  context: 'internal',
116
116
  method: 'POST',
117
117
  path: '/jobs/run',
118
- requestSchema: emptySchema,
118
+ requestSchema: v.strictObject({ jobId: id.jobId.required() }),
119
119
  responseSchema: completedSchema,
120
120
  }),
121
121
  supervisor: createRoute({
@@ -83,7 +83,7 @@ const routeFixtures = [
83
83
  },
84
84
  {
85
85
  name: 'job runner',
86
- request: {},
86
+ request: { jobId: 'job_1' },
87
87
  response: { state: 'COMPLETED' },
88
88
  route: () => appwriteFunctions.worker.routes.jobsRun,
89
89
  },
@@ -1,4 +1,4 @@
1
1
  export { type AppwriteRow, type AppwriteRowTable, appwrite } from './appwrite';
2
- export { type AppwriteCommandError, type AppwriteCommandKind, type AppwriteCommandPayload, type AppwriteCommandRequest, type AppwriteCommandResponse, type AppwriteCommandState, appwriteCommands, } from './commands';
2
+ export { type AppwriteCommandError, type AppwriteCommandKind, type AppwriteCommandPayload, type AppwriteCommandRequest, type AppwriteCommandResponse, type AppwriteCommandState, appwriteAvatar, appwriteCommands, } from './commands';
3
3
  export { type AppwriteFunctionContext, type AppwriteFunctionError, type AppwriteFunctionName, type AppwriteFunctionRequest, type AppwriteFunctionResponse, type AppwriteFunctionRoute, type AppwriteFunctionRouteName, appwriteFunctions, } from './functions';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/appwrite/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAC9E,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,gBAAgB,GACjB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,iBAAiB,GAClB,MAAM,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/appwrite/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAC9E,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,cAAc,EACd,gBAAgB,GACjB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,iBAAiB,GAClB,MAAM,aAAa,CAAA"}
@@ -1,3 +1,3 @@
1
1
  export { appwrite } from './appwrite';
2
- export { appwriteCommands, } from './commands';
2
+ export { appwriteAvatar, appwriteCommands, } from './commands';
3
3
  export { appwriteFunctions, } from './functions';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { type AppwriteCommandError, type AppwriteCommandKind, type AppwriteCommandPayload, type AppwriteCommandRequest, type AppwriteCommandResponse, type AppwriteCommandState, type AppwriteFunctionContext, type AppwriteFunctionError, type AppwriteFunctionName, type AppwriteFunctionRequest, type AppwriteFunctionResponse, type AppwriteFunctionRoute, type AppwriteFunctionRouteName, type AppwriteRow, type AppwriteRowTable, appwrite, appwriteCommands, appwriteFunctions, } from './appwrite';
1
+ export { type AppwriteCommandError, type AppwriteCommandKind, type AppwriteCommandPayload, type AppwriteCommandRequest, type AppwriteCommandResponse, type AppwriteCommandState, type AppwriteFunctionContext, type AppwriteFunctionError, type AppwriteFunctionName, type AppwriteFunctionRequest, type AppwriteFunctionResponse, type AppwriteFunctionRoute, type AppwriteFunctionRouteName, type AppwriteRow, type AppwriteRowTable, appwrite, appwriteAvatar, appwriteCommands, appwriteFunctions, } from './appwrite';
2
2
  export { marcoConstants } from './constants';
3
3
  export { MARCO_ENV, MarcoEnvironment, marcoPublicConfig } from './marcoPublicConfig';
4
- export { type Account, type AccountAlias, type AccountId, type AccountLabel, type AliasId, type AttachmentId, type Contact, type ContactId, type Draft, type DraftAttachment, type DraftBody, type DraftId, type LabelId, type MessageId, marcoSchemas, type PushNotificationTokenId, type RecipientId, type Thread, type ThreadId, type ThreadMessage, type ThreadMessageAttachment, type ThreadMessageRecipient, type User, type UserId, type UserPushNotificationToken, type UserView, type ViewId, } from './schemas';
4
+ export { type Account, type AccountAlias, type AccountId, type AccountLabel, type AliasId, type AttachmentId, type Contact, type ContactId, type Draft, type DraftAttachment, type DraftBody, type DraftId, type JobId, type LabelId, type MessageId, marcoSchemas, type PushNotificationTokenId, type RecipientId, type Thread, type ThreadId, type ThreadMessage, type ThreadMessageAttachment, type ThreadMessageRecipient, type User, type UserId, type UserPushNotificationToken, type UserView, type ViewId, } from './schemas';
5
5
  export { marcoSDK } from './sdk';
6
6
  export * from './types';
7
7
  export { accountUtils, labelUtils, threadsUtils } from './utils';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACpF,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,YAAY,EACZ,KAAK,uBAAuB,EAC5B,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KA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MAAM,EACX,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,IAAI,EACT,KAAK,MAAM,EACX,KAAK,yBAAyB,EAC9B,KAAK,QAAQ,EACb,KAAK,MAAM,GACZ,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { appwrite, appwriteCommands, appwriteFunctions, } from './appwrite';
1
+ export { appwrite, appwriteAvatar, appwriteCommands, appwriteFunctions, } from './appwrite';
2
2
  export { marcoConstants } from './constants';
3
3
  export { MARCO_ENV, marcoPublicConfig } from './marcoPublicConfig';
4
4
  export { marcoSchemas, } from './schemas';
@@ -20,6 +20,10 @@ export declare const id: {
20
20
  nullable: (maxLength?: number) => v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
21
21
  required: (maxLength?: number) => v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "DraftId">]>, undefined>;
22
22
  };
23
+ jobId: {
24
+ nullable: (maxLength?: number) => v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "JobId">]>, undefined>;
25
+ required: (maxLength?: number) => v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "JobId">]>, undefined>;
26
+ };
23
27
  labelId: {
24
28
  nullable: (maxLength?: number) => v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
25
29
  required: (maxLength?: number) => v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
@@ -54,6 +58,7 @@ export type AliasId = v.InferOutput<ReturnType<typeof id.aliasId.required>>;
54
58
  export type AttachmentId = v.InferOutput<ReturnType<typeof id.attachmentId.required>>;
55
59
  export type ContactId = v.InferOutput<ReturnType<typeof id.contactId.required>>;
56
60
  export type DraftId = v.InferOutput<ReturnType<typeof id.draftId.required>>;
61
+ export type JobId = v.InferOutput<ReturnType<typeof id.jobId.required>>;
57
62
  export type LabelId = v.InferOutput<ReturnType<typeof id.labelId.required>>;
58
63
  export type MessageId = v.InferOutput<ReturnType<typeof id.messageId.required>>;
59
64
  export type PushNotificationTokenId = v.InferOutput<ReturnType<typeof id.pushNotificationTokenId.required>>;
@@ -1 +1 @@
1
- {"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../src/schemas/id.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAQ5B,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAad,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAA;AAC/E,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAA;AAC3E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC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Q,CAAC,CAAC,CAAA;AAC3G,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAA;AACnF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAA;AAC7E,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAA;AACzE,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAA"}
@@ -9,6 +9,7 @@ export const id = {
9
9
  attachmentId: brandedId('AttachmentId'),
10
10
  contactId: brandedId('ContactId'),
11
11
  draftId: brandedId('DraftId'),
12
+ jobId: brandedId('JobId'),
12
13
  labelId: brandedId('LabelId'),
13
14
  messageId: brandedId('MessageId'),
14
15
  pushNotificationTokenId: brandedId('PushNotificationTokenId'),
@@ -1,6 +1,6 @@
1
1
  import { type StripeUserData } from './stripe';
2
2
  export type { StripeUserData };
3
- export type { AccountId, AliasId, AttachmentId, ContactId, DraftId, LabelId, MessageId, PushNotificationTokenId, RecipientId, ThreadId, UserId, ViewId, } from './id';
3
+ export type { AccountId, AliasId, AttachmentId, ContactId, DraftId, JobId, LabelId, MessageId, PushNotificationTokenId, RecipientId, ThreadId, UserId, ViewId, } from './id';
4
4
  export type { Account, AccountAlias, AccountLabel, Contact, Draft, DraftAttachment, DraftBody, Thread, ThreadMessage, ThreadMessageAttachment, ThreadMessageRecipient, User, UserPushNotificationToken, UserView, } from './models';
5
5
  export { mutatorSchemas } from './mutators';
6
6
  export declare const marcoSchemas: {
@@ -59,6 +59,10 @@ export declare const marcoSchemas: {
59
59
  nullable: (maxLength?: number) => import("valibot").NullableSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "DraftId">]>, undefined>;
60
60
  required: (maxLength?: number) => import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "DraftId">]>, undefined>;
61
61
  };
62
+ jobId: {
63
+ nullable: (maxLength?: number) => import("valibot").NullableSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "JobId">]>, undefined>;
64
+ required: (maxLength?: number) => import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "JobId">]>, undefined>;
65
+ };
62
66
  labelId: {
63
67
  nullable: (maxLength?: number) => import("valibot").NullableSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "LabelId">]>, undefined>;
64
68
  required: (maxLength?: number) => import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "LabelId">]>, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,UAAU,CAAA;AAGpE,YAAY,EAAE,cAAc,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCxB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "2.0.578",
3
+ "version": "2.0.580",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",