@marcoappio/marco-config 4.0.18 → 4.0.20

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.
Files changed (94) hide show
  1. package/dist/appwrite/appwrite.d.ts +240 -240
  2. package/dist/appwrite/appwrite.d.ts.map +1 -1
  3. package/dist/appwrite/appwrite.js +1 -1
  4. package/dist/appwrite/appwrite.test.js +54 -288
  5. package/dist/appwrite/commands.d.ts +1 -1
  6. package/dist/appwrite/commands.d.ts.map +1 -1
  7. package/dist/appwrite/commands.js +1 -1
  8. package/dist/appwrite/commands.test.js +11 -114
  9. package/dist/appwrite/decodedSchemas.d.ts +1 -1
  10. package/dist/appwrite/decodedSchemas.d.ts.map +1 -1
  11. package/dist/appwrite/decodedSchemas.js +1 -1
  12. package/dist/appwrite/functions.d.ts +1 -1
  13. package/dist/appwrite/functions.d.ts.map +1 -1
  14. package/dist/appwrite/functions.js +1 -1
  15. package/dist/appwrite/functions.test.js +1 -1
  16. package/dist/appwrite/index.d.ts +3 -1
  17. package/dist/appwrite/index.d.ts.map +1 -1
  18. package/dist/appwrite/index.js +1 -0
  19. package/dist/appwrite/queryContracts/queryContracts.d.ts +392 -0
  20. package/dist/appwrite/queryContracts/queryContracts.d.ts.map +1 -0
  21. package/dist/appwrite/queryContracts/queryContracts.js +299 -0
  22. package/dist/appwrite/queryContracts/queryContracts.test.d.ts +2 -0
  23. package/dist/appwrite/queryContracts/queryContracts.test.d.ts.map +1 -0
  24. package/dist/appwrite/queryContracts/queryContracts.test.js +39 -0
  25. package/dist/appwrite/tableContract/identity.d.ts +35 -35
  26. package/dist/appwrite/tableContract/identity.d.ts.map +1 -1
  27. package/dist/appwrite/tableContract/identity.js +71 -36
  28. package/dist/appwrite/tableContract/index.d.ts +1186 -440
  29. package/dist/appwrite/tableContract/index.d.ts.map +1 -1
  30. package/dist/appwrite/tableContract/index.js +1 -1
  31. package/dist/appwrite/tableContract/index.test.js +1 -1
  32. package/dist/appwrite/tableContract/mailbox.d.ts +64 -64
  33. package/dist/appwrite/tableContract/mailbox.d.ts.map +1 -1
  34. package/dist/appwrite/tableContract/mailbox.js +155 -68
  35. package/dist/appwrite/tableContract/operational.d.ts +1 -1
  36. package/dist/appwrite/tableContract/operational.d.ts.map +1 -1
  37. package/dist/appwrite/tableContract/operational.js +1 -1
  38. package/dist/appwrite/tableContract/shared.d.ts +1 -1
  39. package/dist/appwrite/tableContract/shared.d.ts.map +1 -1
  40. package/dist/appwrite/tableContract/shared.js +2 -2
  41. package/dist/index.test.js +5 -11
  42. package/dist/schemas/app.d.ts +1 -1
  43. package/dist/schemas/app.d.ts.map +1 -1
  44. package/dist/schemas/app.js +1 -1
  45. package/dist/schemas/auth.d.ts +1 -1
  46. package/dist/schemas/auth.d.ts.map +1 -1
  47. package/dist/schemas/auth.js +1 -1
  48. package/dist/schemas/emailAccount.d.ts +1 -1
  49. package/dist/schemas/emailAccount.d.ts.map +1 -1
  50. package/dist/schemas/emailAccount.js +1 -1
  51. package/dist/schemas/id.d.ts +1 -1
  52. package/dist/schemas/id.d.ts.map +1 -1
  53. package/dist/schemas/id.js +1 -1
  54. package/dist/schemas/models/account.d.ts +1 -1
  55. package/dist/schemas/models/account.d.ts.map +1 -1
  56. package/dist/schemas/models/account.js +1 -1
  57. package/dist/schemas/models/contact.d.ts +1 -1
  58. package/dist/schemas/models/contact.d.ts.map +1 -1
  59. package/dist/schemas/models/contact.js +1 -1
  60. package/dist/schemas/models/draft.d.ts +1 -1
  61. package/dist/schemas/models/draft.d.ts.map +1 -1
  62. package/dist/schemas/models/draft.js +1 -1
  63. package/dist/schemas/models/mailboxAddress.test.js +1 -1
  64. package/dist/schemas/models/numericSemantics.test.js +1 -1
  65. package/dist/schemas/models/thread.d.ts +1 -1
  66. package/dist/schemas/models/thread.d.ts.map +1 -1
  67. package/dist/schemas/models/thread.js +1 -1
  68. package/dist/schemas/models/user.d.ts +1 -1
  69. package/dist/schemas/models/user.d.ts.map +1 -1
  70. package/dist/schemas/models/user.js +1 -1
  71. package/dist/schemas/models/user.test.js +1 -1
  72. package/dist/schemas/number.d.ts +1 -1
  73. package/dist/schemas/number.d.ts.map +1 -1
  74. package/dist/schemas/number.js +1 -1
  75. package/dist/schemas/oauth.d.ts +1 -1
  76. package/dist/schemas/oauth.d.ts.map +1 -1
  77. package/dist/schemas/oauth.js +1 -1
  78. package/dist/schemas/pushNotifications.d.ts +1 -1
  79. package/dist/schemas/pushNotifications.d.ts.map +1 -1
  80. package/dist/schemas/pushNotifications.js +1 -1
  81. package/dist/schemas/scalars.d.ts +1 -1
  82. package/dist/schemas/scalars.d.ts.map +1 -1
  83. package/dist/schemas/scalars.js +1 -1
  84. package/dist/schemas/scalars.test.js +1 -1
  85. package/dist/schemas/schemaValues.test.js +1 -1
  86. package/dist/schemas/string.d.ts +1 -1
  87. package/dist/schemas/string.d.ts.map +1 -1
  88. package/dist/schemas/string.js +1 -1
  89. package/dist/utils/accounts/generateAccountColor.d.ts.map +1 -1
  90. package/dist/utils/accounts/generateAccountColor.js +10 -15
  91. package/dist/utils/valibot/index.d.ts +3 -0
  92. package/dist/utils/valibot/index.d.ts.map +1 -0
  93. package/dist/utils/valibot/index.js +2 -0
  94. package/package.json +1 -1
@@ -1,63 +1,86 @@
1
- import * as v from 'valibot';
2
- /* oxlint-disable eslint/sort-keys */
1
+ import { v } from '../../utils/valibot/index.js';
3
2
  import { accountProviders, accountStates, appwriteColumnDefinitions, appwriteRelationship, appwriteRelationshipIdSchema, canonicalTimestampSchema, colourSchema, defineAppwriteTableGroup, webEmailSchema, identifierSchema, labelSpecialUses, oauthOperations, oauthProviders, oauthReturnUriSchema, appwriteRowIdSchema, isoTimestampSchema, nonNegativeIntegerSchema, } from './shared.js';
4
3
  const { boolean, dateTime, enumValue, identifier, integer, longText, string: stringColumn, stringArray, text } = appwriteColumnDefinitions;
5
4
  export const identityTableInputs = defineAppwriteTableGroup({
6
5
  accounts: {
7
6
  fields: {
8
- profileAssignmentKey: identifier(identifierSchema),
9
- provider: enumValue(v.picklist(accountProviders), accountProviders),
10
- state: enumValue(v.picklist(accountStates), accountStates),
11
- primaryEmail: stringColumn(webEmailSchema, true, 320),
12
- displayName: stringColumn(v.nullable(identifierSchema), false),
13
7
  colour: stringColumn(colourSchema, true, 64),
14
- pollShardAssignmentId: identifier(v.nullable(identifierSchema), false),
15
- pollShardId: identifier(v.nullable(identifierSchema), false),
16
- lastSuccessfulSyncAt: dateTime(v.nullable(isoTimestampSchema), false),
8
+ credential: appwriteRelationship(v.nullable(appwriteRelationshipIdSchema), 'credentials', 'oneToOne'),
9
+ displayName: stringColumn(v.nullable(identifierSchema), false),
10
+ initialSyncCompletedAt: dateTime(v.nullable(isoTimestampSchema), false),
17
11
  lastErrorCode: stringColumn(v.nullable(identifierSchema), false),
12
+ lastSuccessfulSyncAt: dateTime(v.nullable(isoTimestampSchema), false),
13
+ mailboxSyncState: appwriteRelationship(v.nullable(appwriteRelationshipIdSchema), 'mailboxSyncStates', 'oneToOne'),
18
14
  mailProcessedCount: integer(nonNegativeIntegerSchema),
19
15
  mailTotalCount: integer(nonNegativeIntegerSchema),
20
- initialSyncCompletedAt: dateTime(v.nullable(isoTimestampSchema), false),
21
- credential: appwriteRelationship(v.nullable(appwriteRelationshipIdSchema), 'credentials', 'oneToOne'),
22
- mailboxSyncState: appwriteRelationship(v.nullable(appwriteRelationshipIdSchema), 'mailboxSyncStates', 'oneToOne'),
16
+ pollShardAssignmentId: identifier(v.nullable(identifierSchema), false),
17
+ pollShardId: identifier(v.nullable(identifierSchema), false),
23
18
  primaryAlias: appwriteRelationship(v.nullable(appwriteRelationshipIdSchema), 'aliases', 'oneToOne', 'setNull'),
19
+ primaryEmail: stringColumn(webEmailSchema, true, 320),
24
20
  profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
21
+ profileAssignmentKey: identifier(identifierSchema),
22
+ provider: enumValue(v.picklist(accountProviders), accountProviders),
23
+ state: enumValue(v.picklist(accountStates), accountStates),
25
24
  },
26
25
  indexes: [
27
- { attributes: ['profileAssignmentKey'], name: 'assignment_profile', type: 'key' },
28
- { attributes: ['profileAssignmentKey', 'state'], name: 'assignment_profile_state', type: 'key' },
26
+ {
27
+ attributes: ['profileAssignmentKey'],
28
+ name: 'assignment_profile',
29
+ type: 'key',
30
+ },
31
+ {
32
+ attributes: ['profileAssignmentKey', 'state'],
33
+ name: 'assignment_profile_state',
34
+ type: 'key',
35
+ },
29
36
  { attributes: ['state'], name: 'state', type: 'key' },
30
- { attributes: ['state', 'pollShardAssignmentId'], name: 'state_poll_shard_assignment', type: 'key' },
31
- { attributes: ['pollShardAssignmentId'], name: 'poll_shard_assignment', type: 'key' },
37
+ {
38
+ attributes: ['state', 'pollShardAssignmentId'],
39
+ name: 'state_poll_shard_assignment',
40
+ type: 'key',
41
+ },
42
+ {
43
+ attributes: ['pollShardAssignmentId'],
44
+ name: 'poll_shard_assignment',
45
+ type: 'key',
46
+ },
32
47
  { attributes: ['pollShardId'], name: 'poll_shard', type: 'key' },
33
48
  ],
34
49
  name: 'Accounts',
35
50
  },
36
51
  aliases: {
37
52
  fields: {
53
+ account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
38
54
  accountAssignmentKey: identifier(identifierSchema),
39
- providerId: stringColumn(identifierSchema),
40
55
  email: stringColumn(webEmailSchema, true, 320),
56
+ isPrimary: boolean(v.boolean()),
41
57
  name: stringColumn(v.nullable(identifierSchema), false),
58
+ providerId: stringColumn(identifierSchema),
42
59
  signature: text(v.nullable(v.string()), false),
43
- isPrimary: boolean(v.boolean()),
44
- account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
45
60
  },
46
61
  indexes: [
47
- { attributes: ['accountAssignmentKey'], name: 'assignment_account', type: 'key' },
48
- { attributes: ['accountAssignmentKey', 'providerId'], name: 'assignment_account_provider_unique', type: 'unique' },
62
+ {
63
+ attributes: ['accountAssignmentKey'],
64
+ name: 'assignment_account',
65
+ type: 'key',
66
+ },
67
+ {
68
+ attributes: ['accountAssignmentKey', 'providerId'],
69
+ name: 'assignment_account_provider_unique',
70
+ type: 'unique',
71
+ },
49
72
  ],
50
73
  name: 'Aliases',
51
74
  },
52
75
  credentials: {
53
76
  fields: {
54
- userId: stringColumn(identifierSchema),
55
77
  accountId: stringColumn(identifierSchema),
56
- provider: enumValue(v.picklist(accountProviders), accountProviders),
57
78
  encryptedPayload: longText(v.string()),
58
79
  expiresAt: dateTime(v.nullable(isoTimestampSchema), false),
80
+ provider: enumValue(v.picklist(accountProviders), accountProviders),
59
81
  refreshLeaseExpiresAt: dateTime(v.nullable(canonicalTimestampSchema), false),
60
82
  refreshLeaseId: stringColumn(v.nullable(identifierSchema), false, 36),
83
+ userId: stringColumn(identifierSchema),
61
84
  },
62
85
  indexes: [
63
86
  { attributes: ['userId'], name: 'user', type: 'key' },
@@ -67,42 +90,54 @@ export const identityTableInputs = defineAppwriteTableGroup({
67
90
  },
68
91
  labels: {
69
92
  fields: {
93
+ account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
70
94
  accountAssignmentKey: identifier(identifierSchema),
71
- providerId: stringColumn(identifierSchema),
72
95
  name: stringColumn(v.nullable(identifierSchema), false),
73
96
  path: stringColumn(identifierSchema),
97
+ providerId: stringColumn(identifierSchema),
74
98
  specialUse: enumValue(v.nullable(v.picklist(labelSpecialUses)), labelSpecialUses, false),
75
99
  totalCount: integer(nonNegativeIntegerSchema),
76
100
  unreadCount: integer(nonNegativeIntegerSchema),
77
- account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
78
101
  },
79
102
  indexes: [
80
- { attributes: ['accountAssignmentKey', 'specialUse'], name: 'assignment_account_special_use', type: 'key' },
81
- { attributes: ['accountAssignmentKey', 'path'], name: 'assignment_account_path_unique', type: 'unique' },
82
- { attributes: ['accountAssignmentKey', 'providerId'], name: 'assignment_account_provider_unique', type: 'unique' },
103
+ {
104
+ attributes: ['accountAssignmentKey', 'specialUse'],
105
+ name: 'assignment_account_special_use',
106
+ type: 'key',
107
+ },
108
+ {
109
+ attributes: ['accountAssignmentKey', 'path'],
110
+ name: 'assignment_account_path_unique',
111
+ type: 'unique',
112
+ },
113
+ {
114
+ attributes: ['accountAssignmentKey', 'providerId'],
115
+ name: 'assignment_account_provider_unique',
116
+ type: 'unique',
117
+ },
83
118
  ],
84
119
  name: 'Labels',
85
120
  },
86
121
  oauthStates: {
87
122
  fields: {
88
- userId: stringColumn(identifierSchema),
89
123
  accountId: stringColumn(identifierSchema),
90
124
  email: stringColumn(webEmailSchema, true, 320),
91
125
  expiresAt: dateTime(isoTimestampSchema),
92
126
  nonceHash: stringColumn(identifierSchema),
93
127
  operation: enumValue(v.picklist(oauthOperations), oauthOperations),
128
+ profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
94
129
  provider: enumValue(v.picklist(oauthProviders), oauthProviders),
95
130
  returnUri: stringColumn(oauthReturnUriSchema),
96
- profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
131
+ userId: stringColumn(identifierSchema),
97
132
  },
98
133
  indexes: [],
99
134
  name: 'OAuth states',
100
135
  },
101
136
  profileAvatarCleanups: {
102
137
  fields: {
103
- fileId: stringColumn(identifierSchema, true, 36),
104
- claimId: stringColumn(v.nullable(identifierSchema), false),
105
138
  claimedAt: dateTime(v.nullable(isoTimestampSchema), false),
139
+ claimId: stringColumn(v.nullable(identifierSchema), false),
140
+ fileId: stringColumn(identifierSchema, true, 36),
106
141
  profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
107
142
  },
108
143
  indexes: [],
@@ -111,9 +146,9 @@ export const identityTableInputs = defineAppwriteTableGroup({
111
146
  },
112
147
  profiles: {
113
148
  fields: {
114
- email: stringColumn(webEmailSchema, true, 320),
115
149
  avatarFileId: stringColumn(v.nullable(appwriteRowIdSchema), false, 36),
116
150
  deletionRequestedAt: dateTime(v.nullable(isoTimestampSchema), false),
151
+ email: stringColumn(webEmailSchema, true, 320),
117
152
  name: stringColumn(v.nullable(identifierSchema), false),
118
153
  onboardingState: stringColumn(v.nullable(identifierSchema), false),
119
154
  timezone: stringColumn(v.nullable(identifierSchema), false),
@@ -123,9 +158,9 @@ export const identityTableInputs = defineAppwriteTableGroup({
123
158
  },
124
159
  savedViews: {
125
160
  fields: {
126
- name: stringColumn(identifierSchema),
127
- icon: stringColumn(v.nullable(identifierSchema), false),
128
161
  aliasIds: stringArray(v.array(identifierSchema)),
162
+ icon: stringColumn(v.nullable(identifierSchema), false),
163
+ name: stringColumn(identifierSchema),
129
164
  profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
130
165
  },
131
166
  indexes: [],