@marcoappio/marco-config 4.0.16 → 4.0.17

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 +1 @@
1
- {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/appwrite/tableContract/identity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AA2B5B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;CAaxB,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;CAYrC,CAAA;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;CAW1B,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BxB,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;CAgB3B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;CAiB3B,CAAA;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBvB,CAAA;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBtB,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAStB,CAAA"}
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/appwrite/tableContract/identity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AA0B5B,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiI9B,CAAA"}
@@ -1,158 +1,134 @@
1
1
  import * as v from 'valibot';
2
2
  /* oxlint-disable eslint/sort-keys */
3
- import { accountProviders, accountStates, appwriteColumnDefinitions, appwriteIds, appwriteRelationship, appwriteRelationshipIdSchema, canonicalTimestampSchema, colourSchema, defineAppwriteTable, webEmailSchema, identifierSchema, labelSpecialUses, oauthOperations, oauthProviders, oauthReturnUriSchema, appwriteRowIdSchema, isoTimestampSchema, nonNegativeIntegerSchema, } from './shared';
3
+ import { accountProviders, accountStates, appwriteColumnDefinitions, appwriteRelationship, appwriteRelationshipIdSchema, canonicalTimestampSchema, colourSchema, defineAppwriteTableGroup, webEmailSchema, identifierSchema, labelSpecialUses, oauthOperations, oauthProviders, oauthReturnUriSchema, appwriteRowIdSchema, isoTimestampSchema, nonNegativeIntegerSchema, } from './shared';
4
4
  const { boolean, dateTime, enumValue, identifier, integer, longText, string: stringColumn, stringArray, text } = appwriteColumnDefinitions;
5
- export const profilesTable = defineAppwriteTable({
6
- fields: {
7
- email: stringColumn(webEmailSchema, true, 320),
8
- avatarFileId: stringColumn(v.nullable(appwriteRowIdSchema), false, 36),
9
- deletionRequestedAt: dateTime(v.nullable(isoTimestampSchema), false),
10
- name: stringColumn(v.nullable(identifierSchema), false),
11
- onboardingState: stringColumn(v.nullable(identifierSchema), false),
12
- timezone: stringColumn(v.nullable(identifierSchema), false),
5
+ export const identityTableInputs = defineAppwriteTableGroup({
6
+ accounts: {
7
+ 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
+ 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),
17
+ lastErrorCode: stringColumn(v.nullable(identifierSchema), false),
18
+ mailProcessedCount: integer(nonNegativeIntegerSchema),
19
+ 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'),
23
+ primaryAlias: appwriteRelationship(v.nullable(appwriteRelationshipIdSchema), 'aliases', 'oneToOne', 'setNull'),
24
+ profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
25
+ },
26
+ indexes: [
27
+ { attributes: ['profileAssignmentKey'], name: 'assignment_profile', type: 'key' },
28
+ { attributes: ['profileAssignmentKey', 'state'], name: 'assignment_profile_state', type: 'key' },
29
+ { 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' },
32
+ { attributes: ['pollShardId'], name: 'poll_shard', type: 'key' },
33
+ ],
34
+ name: 'Accounts',
13
35
  },
14
- id: appwriteIds.tables.profiles,
15
- indexes: [{ attributes: ['email'], name: 'email_unique', type: 'unique' }],
16
- key: 'profiles',
17
- name: 'Profiles',
18
- });
19
- export const profileAvatarCleanupsTable = defineAppwriteTable({
20
- fields: {
21
- fileId: stringColumn(identifierSchema, true, 36),
22
- claimId: stringColumn(v.nullable(identifierSchema), false),
23
- claimedAt: dateTime(v.nullable(isoTimestampSchema), false),
24
- profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
36
+ aliases: {
37
+ fields: {
38
+ accountAssignmentKey: identifier(identifierSchema),
39
+ providerId: stringColumn(identifierSchema),
40
+ email: stringColumn(webEmailSchema, true, 320),
41
+ name: stringColumn(v.nullable(identifierSchema), false),
42
+ signature: text(v.nullable(v.string()), false),
43
+ isPrimary: boolean(v.boolean()),
44
+ account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
45
+ },
46
+ indexes: [
47
+ { attributes: ['accountAssignmentKey'], name: 'assignment_account', type: 'key' },
48
+ { attributes: ['accountAssignmentKey', 'providerId'], name: 'assignment_account_provider_unique', type: 'unique' },
49
+ ],
50
+ name: 'Aliases',
25
51
  },
26
- id: appwriteIds.tables.profileAvatarCleanups,
27
- indexes: [],
28
- key: 'profileAvatarCleanups',
29
- name: 'Profile avatar cleanups',
30
- wirePermissions: 'empty',
31
- });
32
- export const savedViewsTable = defineAppwriteTable({
33
- fields: {
34
- name: stringColumn(identifierSchema),
35
- icon: stringColumn(v.nullable(identifierSchema), false),
36
- aliasIds: stringArray(v.array(identifierSchema)),
37
- profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
52
+ credentials: {
53
+ fields: {
54
+ userId: stringColumn(identifierSchema),
55
+ accountId: stringColumn(identifierSchema),
56
+ provider: enumValue(v.picklist(accountProviders), accountProviders),
57
+ encryptedPayload: longText(v.string()),
58
+ expiresAt: dateTime(v.nullable(isoTimestampSchema), false),
59
+ refreshLeaseExpiresAt: dateTime(v.nullable(canonicalTimestampSchema), false),
60
+ refreshLeaseId: stringColumn(v.nullable(identifierSchema), false, 36),
61
+ },
62
+ indexes: [
63
+ { attributes: ['userId'], name: 'user', type: 'key' },
64
+ { attributes: ['accountId'], name: 'account_unique', type: 'unique' },
65
+ ],
66
+ name: 'Credentials',
38
67
  },
39
- id: appwriteIds.tables.savedViews,
40
- indexes: [],
41
- key: 'savedViews',
42
- name: 'Saved views',
43
- });
44
- export const accountsTable = defineAppwriteTable({
45
- fields: {
46
- profileAssignmentKey: identifier(identifierSchema),
47
- provider: enumValue(v.picklist(accountProviders), accountProviders),
48
- state: enumValue(v.picklist(accountStates), accountStates),
49
- primaryEmail: stringColumn(webEmailSchema, true, 320),
50
- displayName: stringColumn(v.nullable(identifierSchema), false),
51
- colour: stringColumn(colourSchema, true, 64),
52
- pollShardAssignmentId: identifier(v.nullable(identifierSchema), false),
53
- pollShardId: identifier(v.nullable(identifierSchema), false),
54
- lastSuccessfulSyncAt: dateTime(v.nullable(isoTimestampSchema), false),
55
- lastErrorCode: stringColumn(v.nullable(identifierSchema), false),
56
- mailProcessedCount: integer(nonNegativeIntegerSchema),
57
- mailTotalCount: integer(nonNegativeIntegerSchema),
58
- initialSyncCompletedAt: dateTime(v.nullable(isoTimestampSchema), false),
59
- credential: appwriteRelationship(v.nullable(appwriteRelationshipIdSchema), 'credentials', 'oneToOne'),
60
- mailboxSyncState: appwriteRelationship(v.nullable(appwriteRelationshipIdSchema), 'mailboxSyncStates', 'oneToOne'),
61
- primaryAlias: appwriteRelationship(v.nullable(appwriteRelationshipIdSchema), 'aliases', 'oneToOne', 'setNull'),
62
- profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
68
+ labels: {
69
+ fields: {
70
+ accountAssignmentKey: identifier(identifierSchema),
71
+ providerId: stringColumn(identifierSchema),
72
+ name: stringColumn(v.nullable(identifierSchema), false),
73
+ path: stringColumn(identifierSchema),
74
+ specialUse: enumValue(v.nullable(v.picklist(labelSpecialUses)), labelSpecialUses, false),
75
+ totalCount: integer(nonNegativeIntegerSchema),
76
+ unreadCount: integer(nonNegativeIntegerSchema),
77
+ account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
78
+ },
79
+ 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' },
83
+ ],
84
+ name: 'Labels',
63
85
  },
64
- id: appwriteIds.tables.accounts,
65
- indexes: [
66
- { attributes: ['profileAssignmentKey'], name: 'assignment_profile', type: 'key' },
67
- { attributes: ['profileAssignmentKey', 'state'], name: 'assignment_profile_state', type: 'key' },
68
- { attributes: ['state'], name: 'state', type: 'key' },
69
- { attributes: ['state', 'pollShardAssignmentId'], name: 'state_poll_shard_assignment', type: 'key' },
70
- { attributes: ['pollShardAssignmentId'], name: 'poll_shard_assignment', type: 'key' },
71
- { attributes: ['pollShardId'], name: 'poll_shard', type: 'key' },
72
- ],
73
- key: 'accounts',
74
- name: 'Accounts',
75
- });
76
- export const oauthStatesTable = defineAppwriteTable({
77
- fields: {
78
- userId: stringColumn(identifierSchema),
79
- accountId: stringColumn(identifierSchema),
80
- email: stringColumn(webEmailSchema, true, 320),
81
- expiresAt: dateTime(isoTimestampSchema),
82
- nonceHash: stringColumn(identifierSchema),
83
- operation: enumValue(v.picklist(oauthOperations), oauthOperations),
84
- provider: enumValue(v.picklist(oauthProviders), oauthProviders),
85
- returnUri: stringColumn(oauthReturnUriSchema),
86
- profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
86
+ oauthStates: {
87
+ fields: {
88
+ userId: stringColumn(identifierSchema),
89
+ accountId: stringColumn(identifierSchema),
90
+ email: stringColumn(webEmailSchema, true, 320),
91
+ expiresAt: dateTime(isoTimestampSchema),
92
+ nonceHash: stringColumn(identifierSchema),
93
+ operation: enumValue(v.picklist(oauthOperations), oauthOperations),
94
+ provider: enumValue(v.picklist(oauthProviders), oauthProviders),
95
+ returnUri: stringColumn(oauthReturnUriSchema),
96
+ profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
97
+ },
98
+ indexes: [],
99
+ name: 'OAuth states',
87
100
  },
88
- id: appwriteIds.tables.oauthStates,
89
- indexes: [],
90
- key: 'oauthStates',
91
- name: 'OAuth states',
92
- });
93
- export const credentialsTable = defineAppwriteTable({
94
- fields: {
95
- userId: stringColumn(identifierSchema),
96
- accountId: stringColumn(identifierSchema),
97
- provider: enumValue(v.picklist(accountProviders), accountProviders),
98
- encryptedPayload: longText(v.string()),
99
- expiresAt: dateTime(v.nullable(isoTimestampSchema), false),
100
- refreshLeaseExpiresAt: dateTime(v.nullable(canonicalTimestampSchema), false),
101
- refreshLeaseId: stringColumn(v.nullable(identifierSchema), false, 36),
101
+ profileAvatarCleanups: {
102
+ fields: {
103
+ fileId: stringColumn(identifierSchema, true, 36),
104
+ claimId: stringColumn(v.nullable(identifierSchema), false),
105
+ claimedAt: dateTime(v.nullable(isoTimestampSchema), false),
106
+ profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
107
+ },
108
+ indexes: [],
109
+ name: 'Profile avatar cleanups',
110
+ wirePermissions: 'empty',
102
111
  },
103
- id: appwriteIds.tables.credentials,
104
- indexes: [
105
- { attributes: ['userId'], name: 'user', type: 'key' },
106
- { attributes: ['accountId'], name: 'account_unique', type: 'unique' },
107
- ],
108
- key: 'credentials',
109
- name: 'Credentials',
110
- });
111
- export const aliasesTable = defineAppwriteTable({
112
- fields: {
113
- accountAssignmentKey: identifier(identifierSchema),
114
- providerId: stringColumn(identifierSchema),
115
- email: stringColumn(webEmailSchema, true, 320),
116
- name: stringColumn(v.nullable(identifierSchema), false),
117
- signature: text(v.nullable(v.string()), false),
118
- isPrimary: boolean(v.boolean()),
119
- account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
112
+ profiles: {
113
+ fields: {
114
+ email: stringColumn(webEmailSchema, true, 320),
115
+ avatarFileId: stringColumn(v.nullable(appwriteRowIdSchema), false, 36),
116
+ deletionRequestedAt: dateTime(v.nullable(isoTimestampSchema), false),
117
+ name: stringColumn(v.nullable(identifierSchema), false),
118
+ onboardingState: stringColumn(v.nullable(identifierSchema), false),
119
+ timezone: stringColumn(v.nullable(identifierSchema), false),
120
+ },
121
+ indexes: [{ attributes: ['email'], name: 'email_unique', type: 'unique' }],
122
+ name: 'Profiles',
120
123
  },
121
- id: appwriteIds.tables.aliases,
122
- indexes: [
123
- { attributes: ['accountAssignmentKey'], name: 'assignment_account', type: 'key' },
124
- { attributes: ['accountAssignmentKey', 'providerId'], name: 'assignment_account_provider_unique', type: 'unique' },
125
- ],
126
- key: 'aliases',
127
- name: 'Aliases',
128
- });
129
- export const labelsTable = defineAppwriteTable({
130
- fields: {
131
- accountAssignmentKey: identifier(identifierSchema),
132
- providerId: stringColumn(identifierSchema),
133
- name: stringColumn(v.nullable(identifierSchema), false),
134
- path: stringColumn(identifierSchema),
135
- specialUse: enumValue(v.nullable(v.picklist(labelSpecialUses)), labelSpecialUses, false),
136
- totalCount: integer(nonNegativeIntegerSchema),
137
- unreadCount: integer(nonNegativeIntegerSchema),
138
- account: appwriteRelationship(appwriteRelationshipIdSchema, 'accounts'),
124
+ savedViews: {
125
+ fields: {
126
+ name: stringColumn(identifierSchema),
127
+ icon: stringColumn(v.nullable(identifierSchema), false),
128
+ aliasIds: stringArray(v.array(identifierSchema)),
129
+ profile: appwriteRelationship(appwriteRelationshipIdSchema, 'profiles'),
130
+ },
131
+ indexes: [],
132
+ name: 'Saved views',
139
133
  },
140
- id: appwriteIds.tables.labels,
141
- indexes: [
142
- { attributes: ['accountAssignmentKey', 'specialUse'], name: 'assignment_account_special_use', type: 'key' },
143
- { attributes: ['accountAssignmentKey', 'path'], name: 'assignment_account_path_unique', type: 'unique' },
144
- { attributes: ['accountAssignmentKey', 'providerId'], name: 'assignment_account_provider_unique', type: 'unique' },
145
- ],
146
- key: 'labels',
147
- name: 'Labels',
148
134
  });
149
- export const identityTableInputs = {
150
- accounts: accountsTable,
151
- aliases: aliasesTable,
152
- credentials: credentialsTable,
153
- labels: labelsTable,
154
- oauthStates: oauthStatesTable,
155
- profileAvatarCleanups: profileAvatarCleanupsTable,
156
- profiles: profilesTable,
157
- savedViews: savedViewsTable,
158
- };