@codecks/fetch 0.0.1

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.
@@ -0,0 +1,2895 @@
1
+ //#region src/models/_type-helpers.d.ts
2
+ declare const __nominal__type: unique symbol;
3
+ type FilterNeverKeys<T> = { [K in keyof T as T[K] extends never ? never : K]: T[K] };
4
+ type Nominal<Type, Identifier> = Type & {
5
+ readonly [__nominal__type]: Identifier;
6
+ };
7
+ //#endregion
8
+ //#region src/models/_fields.d.ts
9
+ type TypedField<K extends string, X, Opts extends BaseOpts> = {
10
+ type: K;
11
+ _: [X, Opts];
12
+ };
13
+ type BaseOpts = {
14
+ optional?: boolean;
15
+ };
16
+ type FieldEntry = TypedField<string, any, any>;
17
+ type InferSimpleFieldEntry<T extends FieldEntry> = T extends TypedField<any, infer X, infer Opts> ? Opts extends {
18
+ optional: true;
19
+ } ? X | null | "yes" : X : never;
20
+ //#endregion
21
+ //#region src/models/_desc.d.ts
22
+ type ModelDesc<TName extends string, TFields extends FieldDesc, TRelations extends RelationsDesc, TKey extends (keyof TFields & string)[]> = {
23
+ name: TName;
24
+ keys: TKey;
25
+ fields: TFields;
26
+ relations: TRelations;
27
+ };
28
+ type AnyDesc = ModelDesc<any, any, any, any[]>;
29
+ type FieldDesc = Record<string, FieldEntry>;
30
+ type BelongsToOpts<TFk extends string> = {
31
+ type: "belongsTo";
32
+ fk: TFk;
33
+ };
34
+ type HasManyOpts = {
35
+ type: "hasMany";
36
+ };
37
+ type HasOneOpts = {
38
+ type: "hasOne";
39
+ };
40
+ type RelationOpts = BelongsToOpts<any> | HasManyOpts | HasOneOpts;
41
+ type RelationEntry<TRelName extends string, TOpts extends RelationOpts> = {
42
+ relName: TRelName;
43
+ options: TOpts;
44
+ };
45
+ type RelationsDesc = Record<string, RelationEntry<any, any>>;
46
+ type InferFieldType<T extends FieldEntry> = T extends FieldEntry ? InferSimpleFieldEntry<T> : never;
47
+ //#endregion
48
+ //#region src/models/AccountOnboardingStep.d.ts
49
+ type AccountOnboardingStepId = Nominal<string, "accountOnboardingStep">;
50
+ //#endregion
51
+ //#region src/models/File.d.ts
52
+ type FileId = Nominal<string, "file">;
53
+ //#endregion
54
+ //#region src/models/Release.d.ts
55
+ type ReleaseId = Nominal<string, "release">;
56
+ //#endregion
57
+ //#region src/models/User.d.ts
58
+ type UserId = Nominal<string, "user">;
59
+ //#endregion
60
+ //#region src/models/Account.d.ts
61
+ type AccountId = Nominal<string, "account">;
62
+ //#endregion
63
+ //#region src/models/Project.d.ts
64
+ type ProjectId = Nominal<string, "project">;
65
+ //#endregion
66
+ //#region src/models/Milestone.d.ts
67
+ type MilestoneId = Nominal<string, "milestone">;
68
+ //#endregion
69
+ //#region src/models/ProjectTag.d.ts
70
+ type ProjectTagId = Nominal<string, "projectTag">;
71
+ //#endregion
72
+ //#region src/models/Deck.d.ts
73
+ type DeckId = Nominal<string, "deck">;
74
+ //#endregion
75
+ //#region src/models/SprintConfig.d.ts
76
+ type SprintConfigId = Nominal<string, "sprintConfig">;
77
+ //#endregion
78
+ //#region src/models/Sprint.d.ts
79
+ type SprintId = Nominal<string, "sprint">;
80
+ //#endregion
81
+ //#region src/models/WorkflowItem.d.ts
82
+ type WorkflowItemId = Nominal<string, "workflowItem">;
83
+ //#endregion
84
+ //#region src/models/DiscordGuild.d.ts
85
+ type DiscordGuildId = Nominal<string, "discordGuild">;
86
+ //#endregion
87
+ //#region src/models/VisionBoard.d.ts
88
+ type VisionBoardId = Nominal<string, "visionBoard">;
89
+ //#endregion
90
+ //#region src/models/Card.d.ts
91
+ type CardId = Nominal<string, "card">;
92
+ //#endregion
93
+ //#region src/models/ActiveTimeTracker.d.ts
94
+ type ActiveTimeTrackerId = Nominal<string, "activeTimeTracker">;
95
+ //#endregion
96
+ //#region src/models/Activity.d.ts
97
+ type ActivityId = Nominal<string, "activity">;
98
+ //#endregion
99
+ //#region src/models/AffiliateCode.d.ts
100
+ type AffiliateCodeId = Nominal<string, "affiliateCode">;
101
+ //#endregion
102
+ //#region src/models/App.d.ts
103
+ type AppId = Nominal<string, "app">;
104
+ //#endregion
105
+ //#region src/models/AppInstallation.d.ts
106
+ type AppInstallationId = Nominal<string, "appInstallation">;
107
+ //#endregion
108
+ //#region src/models/Attachment.d.ts
109
+ type AttachmentId = Nominal<string, "attachment">;
110
+ //#endregion
111
+ //#region src/models/TimeTrackingSegment.d.ts
112
+ type TimeTrackingSegmentId = Nominal<string, "timeTrackingSegment">;
113
+ //#endregion
114
+ //#region src/models/CardPreset.d.ts
115
+ type CardPresetId = Nominal<string, "cardPreset">;
116
+ //#endregion
117
+ //#region src/models/CardSubscription.d.ts
118
+ type CardSubscriptionId = Nominal<string, "cardSubscription">;
119
+ //#endregion
120
+ //#region src/models/CardUpvote.d.ts
121
+ type CardUpvoteId = Nominal<string, "cardUpvote">;
122
+ //#endregion
123
+ //#region src/models/DeckSubscription.d.ts
124
+ type DeckSubscriptionId = Nominal<string, "deckSubscription">;
125
+ //#endregion
126
+ //#region src/models/DiscordMember.d.ts
127
+ type DiscordMemberId = Nominal<string, "discordMember">;
128
+ //#endregion
129
+ //#region src/models/DiscordProjectNotification.d.ts
130
+ type DiscordProjectNotificationId = Nominal<string, "discordProjectNotification">;
131
+ //#endregion
132
+ //#region src/models/DiscordSlashCommand.d.ts
133
+ type DiscordSlashCommandId = Nominal<string, "discordSlashCommand">;
134
+ //#endregion
135
+ //#region src/models/Integration.d.ts
136
+ type IntegrationId = Nominal<string, "integration">;
137
+ //#endregion
138
+ //#region src/models/Invoice.d.ts
139
+ type InvoiceId = Nominal<string, "invoice">;
140
+ //#endregion
141
+ //#region src/models/PinnedMilestone.d.ts
142
+ type PinnedMilestoneId = Nominal<string, "pinnedMilestone">;
143
+ //#endregion
144
+ //#region src/models/ProjectSelection.d.ts
145
+ type ProjectSelectionId = Nominal<string, "projectSelection">;
146
+ //#endregion
147
+ //#region src/models/QueueEntry.d.ts
148
+ type QueueEntryId = Nominal<string, "queueEntry">;
149
+ //#endregion
150
+ //#region src/models/QueueSelection.d.ts
151
+ type QueueSelectionId = Nominal<string, "queueSelection">;
152
+ //#endregion
153
+ //#region src/models/Resolvable.d.ts
154
+ type ResolvableId = Nominal<string, "resolvable">;
155
+ //#endregion
156
+ //#region src/models/ResolvableEntry.d.ts
157
+ type ResolvableEntryId = Nominal<string, "resolvableEntry">;
158
+ //#endregion
159
+ //#region src/models/ResolvableEntryReaction.d.ts
160
+ type ResolvableEntryReactionId = Nominal<string, "resolvableEntryReaction">;
161
+ //#endregion
162
+ //#region src/models/SavedSearch.d.ts
163
+ type SavedSearchId = Nominal<string, "savedSearch">;
164
+ //#endregion
165
+ //#region src/models/UserEmail.d.ts
166
+ type UserEmailId = Nominal<string, "userEmail">;
167
+ //#endregion
168
+ //#region src/models/UserInvitation.d.ts
169
+ type UserInvitationId = Nominal<string, "userInvitation">;
170
+ //#endregion
171
+ //#region src/models/UserInviteCode.d.ts
172
+ type UserInviteCodeId = Nominal<string, "userInviteCode">;
173
+ //#endregion
174
+ //#region src/models/UserTag.d.ts
175
+ type UserTagId = Nominal<string, "userTag">;
176
+ //#endregion
177
+ //#region src/models/UserReportSetting.d.ts
178
+ type UserReportSettingId = Nominal<string, "userReportSetting">;
179
+ //#endregion
180
+ //#region src/models/UserReportEmail.d.ts
181
+ type UserReportEmailId = Nominal<string, "userReportEmail">;
182
+ //#endregion
183
+ //#region src/models/UserReportToken.d.ts
184
+ type UserReportTokenId = Nominal<string, "userReportToken">;
185
+ //#endregion
186
+ //#region src/models/VisionBoardQuery.d.ts
187
+ type VisionBoardQueryId = Nominal<string, "visionBoardQuery">;
188
+ //#endregion
189
+ //#region src/models/Wizard.d.ts
190
+ type WizardId = Nominal<string, "wizard">;
191
+ //#endregion
192
+ //#region src/models/index.d.ts
193
+ declare const modelMap: {
194
+ _root: ModelDesc<"_root", {}, {
195
+ releases: RelationEntry<"release", {
196
+ readonly type: "hasMany";
197
+ }>;
198
+ accountOnboardingSteps: RelationEntry<"accountOnboardingStep", {
199
+ readonly type: "hasMany";
200
+ }>;
201
+ apps: RelationEntry<"app", {
202
+ readonly type: "hasMany";
203
+ }>;
204
+ account: RelationEntry<"account", {
205
+ readonly type: "hasOne";
206
+ }>;
207
+ loggedInUser: RelationEntry<"user", {
208
+ readonly type: "hasOne";
209
+ }>;
210
+ cardsStatusHistory: RelationEntry<"cardsStatusHistory", {
211
+ readonly type: "hasMany";
212
+ }>;
213
+ cardsEffortHistory: RelationEntry<"cardsEffortHistory", {
214
+ readonly type: "hasMany";
215
+ }>;
216
+ cardsFinishedHistory: RelationEntry<"cardsFinishedHistory", {
217
+ readonly type: "hasMany";
218
+ }>;
219
+ cardsTimeToFinished: RelationEntry<"cardsTimeToFinished", {
220
+ readonly type: "hasMany";
221
+ }>;
222
+ }, []>;
223
+ accountOnboardingStep: ModelDesc<"accountOnboardingStep", {
224
+ key: TypedField<"id", AccountOnboardingStepId, {}>;
225
+ title: TypedField<"string", string, {}>;
226
+ description: TypedField<"string", string, {}>;
227
+ chapter: TypedField<"string", string, {}>;
228
+ sortValue: TypedField<"string", string, {}>;
229
+ variants: TypedField<"array", any[], {}>;
230
+ xp: TypedField<"int", number, {}>;
231
+ milestone: TypedField<"string", string, {}>;
232
+ }, {}, ["key"]>;
233
+ accountOnboarding: ModelDesc<"accountOnboarding", {
234
+ variants: TypedField<"array", any[], {}>;
235
+ steps: TypedField<"obj", any, {}>;
236
+ accountId: TypedField<"belongsTo", AccountId, {}>;
237
+ }, {
238
+ account: RelationEntry<"account", {
239
+ readonly type: "belongsTo";
240
+ readonly fk: "accountId";
241
+ }>;
242
+ }, ["accountId"]>;
243
+ accountRole: ModelDesc<"accountRole", {
244
+ role: TypedField<"string", string, {}>;
245
+ createdAt: TypedField<"date", Date, {}>;
246
+ lastChangedAt: TypedField<"date", Date, {}>;
247
+ roleAsPrio: TypedField<"int", number, {}>;
248
+ userId: TypedField<"belongsTo", UserId, {}>;
249
+ accountId: TypedField<"belongsTo", AccountId, {}>;
250
+ }, {
251
+ user: RelationEntry<"user", {
252
+ readonly type: "belongsTo";
253
+ readonly fk: "userId";
254
+ }>;
255
+ account: RelationEntry<"account", {
256
+ readonly type: "belongsTo";
257
+ readonly fk: "accountId";
258
+ }>;
259
+ }, ["accountId", "userId"]>;
260
+ accountUserAchievement: ModelDesc<"accountUserAchievement", {
261
+ value: TypedField<"obj", any, {}>;
262
+ context: TypedField<"obj", any, {}>;
263
+ accountId: TypedField<"belongsTo", AccountId, {}>;
264
+ userId: TypedField<"belongsTo", UserId, {}>;
265
+ }, {
266
+ account: RelationEntry<"account", {
267
+ readonly type: "belongsTo";
268
+ readonly fk: "accountId";
269
+ }>;
270
+ user: RelationEntry<"user", {
271
+ readonly type: "belongsTo";
272
+ readonly fk: "userId";
273
+ }>;
274
+ }, ["accountId", "userId", "key"]>;
275
+ accountUserSetting: ModelDesc<"accountUserSetting", {
276
+ wantsWeeklyDigestMail: TypedField<"bool", boolean, {}>;
277
+ timelineScaleTypeOverwrite: TypedField<"string", string, {}>;
278
+ startWeekdayOverwrite: TypedField<"string", string, {}>;
279
+ accountId: TypedField<"belongsTo", AccountId, {}>;
280
+ userId: TypedField<"belongsTo", UserId, {}>;
281
+ inboxDeckId: TypedField<"belongsTo", DeckId, {}>;
282
+ }, {
283
+ account: RelationEntry<"account", {
284
+ readonly type: "belongsTo";
285
+ readonly fk: "accountId";
286
+ }>;
287
+ user: RelationEntry<"user", {
288
+ readonly type: "belongsTo";
289
+ readonly fk: "userId";
290
+ }>;
291
+ inboxDeck: RelationEntry<"deck", {
292
+ readonly type: "belongsTo";
293
+ readonly fk: "inboxDeckId";
294
+ }>;
295
+ }, ["accountId", "userId"]>;
296
+ account: ModelDesc<"account", {
297
+ id: TypedField<"id", AccountId, {}>;
298
+ subdomain: TypedField<"string", string, {}>;
299
+ name: TypedField<"string", string, {}>;
300
+ billingName: TypedField<"string", string, {
301
+ readonly optional: true;
302
+ }>;
303
+ billingLine1: TypedField<"string", string, {
304
+ readonly optional: true;
305
+ }>;
306
+ billingLine2: TypedField<"string", string, {
307
+ readonly optional: true;
308
+ }>;
309
+ billingZip: TypedField<"string", string, {
310
+ readonly optional: true;
311
+ }>;
312
+ billingCity: TypedField<"string", string, {
313
+ readonly optional: true;
314
+ }>;
315
+ billingCountryCode: TypedField<"string", string, {
316
+ readonly optional: true;
317
+ }>;
318
+ billingEmail: TypedField<"string", string, {
319
+ readonly optional: true;
320
+ }>;
321
+ netGiftAmount: TypedField<"int", number, {}>;
322
+ persona: TypedField<"string", string, {
323
+ readonly optional: true;
324
+ }>;
325
+ createdAt: TypedField<"date", Date, {}>;
326
+ disabledAt: TypedField<"date", Date, {
327
+ readonly optional: true;
328
+ }>;
329
+ totalMediaByteUsage: TypedField<"bigint", bigint, {}>;
330
+ isDisabled: TypedField<"string", string, {}>;
331
+ milestonesEnabled: TypedField<"string", string, {}>;
332
+ sprintsEnabled: TypedField<"string", string, {}>;
333
+ priorityLabels: TypedField<"obj", any, {}>;
334
+ effortScale: TypedField<"obj", any, {}>;
335
+ statusChangeDurations: TypedField<"obj", any, {}>;
336
+ activeFeatureFlags: TypedField<"obj", any, {}>;
337
+ timeTrackingMode: TypedField<"string", string, {}>;
338
+ maxTimeTrackingSegmentMsDuration: TypedField<"int", number, {}>;
339
+ timeTrackingSwimLaneInfo: TypedField<"bool", boolean, {}>;
340
+ workdays: TypedField<"string", string, {}>;
341
+ workflowMode: TypedField<"string", string, {}>;
342
+ isLearning: TypedField<"bool", boolean, {}>;
343
+ isNonProfit: TypedField<"bool", boolean, {}>;
344
+ dependenciesEnabled: TypedField<"bool", boolean, {}>;
345
+ maxHandSlotCount: TypedField<"int", number, {}>;
346
+ seats: TypedField<"int", number, {}>;
347
+ activeProjectCount: TypedField<"int", number, {}>;
348
+ billingType: TypedField<"string", string, {}>;
349
+ allowInheritHeroCover: TypedField<"bool", boolean, {}>;
350
+ attachmentCoverMode: TypedField<"string", string, {}>;
351
+ staffPermission: TypedField<"string", string, {}>;
352
+ offeringTrial: TypedField<"bool", boolean, {}>;
353
+ coupon: TypedField<"obj", any, {
354
+ readonly optional: true;
355
+ }>;
356
+ hideCompletedCardCountForDecks: TypedField<"bool", boolean, {}>;
357
+ visionBoardEnabled: TypedField<"bool", boolean, {}>;
358
+ fallbackEffort: TypedField<"int", number, {}>;
359
+ timelineScaleType: TypedField<"string", string, {}>;
360
+ startWeekday: TypedField<"string", string, {}>;
361
+ disabledById: TypedField<"belongsTo", UserId, {
362
+ readonly optional: true;
363
+ }>;
364
+ }, {
365
+ disabledBy: RelationEntry<"user", {
366
+ readonly type: "belongsTo";
367
+ readonly fk: "disabledById";
368
+ }>;
369
+ cards: RelationEntry<"card", {
370
+ readonly type: "hasMany";
371
+ }>;
372
+ invoices: RelationEntry<"invoice", {
373
+ readonly type: "hasMany";
374
+ }>;
375
+ cardPresets: RelationEntry<"cardPreset", {
376
+ readonly type: "hasMany";
377
+ }>;
378
+ attachments: RelationEntry<"attachment", {
379
+ readonly type: "hasMany";
380
+ }>;
381
+ discordGuilds: RelationEntry<"discordGuild", {
382
+ readonly type: "hasMany";
383
+ }>;
384
+ timeTrackingSegments: RelationEntry<"timeTrackingSegment", {
385
+ readonly type: "hasMany";
386
+ }>;
387
+ workflowItems: RelationEntry<"workflowItem", {
388
+ readonly type: "hasMany";
389
+ }>;
390
+ deckAssignments: RelationEntry<"deckAssignment", {
391
+ readonly type: "hasMany";
392
+ }>;
393
+ assigneeAssignments: RelationEntry<"assigneeAssignment", {
394
+ readonly type: "hasMany";
395
+ }>;
396
+ assigneeDeckAssignments: RelationEntry<"assigneeDeckAssignment", {
397
+ readonly type: "hasMany";
398
+ }>;
399
+ wizards: RelationEntry<"wizard", {
400
+ readonly type: "hasMany";
401
+ }>;
402
+ milestones: RelationEntry<"milestone", {
403
+ readonly type: "hasMany";
404
+ }>;
405
+ sprints: RelationEntry<"sprint", {
406
+ readonly type: "hasMany";
407
+ }>;
408
+ sprintConfigs: RelationEntry<"sprintConfig", {
409
+ readonly type: "hasMany";
410
+ }>;
411
+ handCards: RelationEntry<"handCard", {
412
+ readonly type: "hasMany";
413
+ }>;
414
+ resolvables: RelationEntry<"resolvable", {
415
+ readonly type: "hasMany";
416
+ }>;
417
+ cardUpvotes: RelationEntry<"cardUpvote", {
418
+ readonly type: "hasMany";
419
+ }>;
420
+ resolvableParticipants: RelationEntry<"resolvableParticipant", {
421
+ readonly type: "hasMany";
422
+ }>;
423
+ userReportSettings: RelationEntry<"userReportSetting", {
424
+ readonly type: "hasMany";
425
+ }>;
426
+ cardOrders: RelationEntry<"cardOrder", {
427
+ readonly type: "hasMany";
428
+ }>;
429
+ accountUserAchievements: RelationEntry<"accountUserAchievement", {
430
+ readonly type: "hasMany";
431
+ }>;
432
+ userInviteCodes: RelationEntry<"userInviteCode", {
433
+ readonly type: "hasMany";
434
+ }>;
435
+ visionBoards: RelationEntry<"visionBoard", {
436
+ readonly type: "hasMany";
437
+ }>;
438
+ deckSubscriptions: RelationEntry<"deckSubscription", {
439
+ readonly type: "hasMany";
440
+ }>;
441
+ appInstallations: RelationEntry<"appInstallation", {
442
+ readonly type: "hasMany";
443
+ }>;
444
+ files: RelationEntry<"file", {
445
+ readonly type: "hasMany";
446
+ }>;
447
+ decks: RelationEntry<"deck", {
448
+ readonly type: "hasMany";
449
+ }>;
450
+ queueEntries: RelationEntry<"queueEntry", {
451
+ readonly type: "hasMany";
452
+ }>;
453
+ visionBoardQueries: RelationEntry<"visionBoardQuery", {
454
+ readonly type: "hasMany";
455
+ }>;
456
+ anyDecks: RelationEntry<"deck", {
457
+ readonly type: "hasMany";
458
+ }>;
459
+ projects: RelationEntry<"project", {
460
+ readonly type: "hasMany";
461
+ }>;
462
+ archivedProjects: RelationEntry<"project", {
463
+ readonly type: "hasMany";
464
+ }>;
465
+ anyProjects: RelationEntry<"project", {
466
+ readonly type: "hasMany";
467
+ }>;
468
+ roles: RelationEntry<"accountRole", {
469
+ readonly type: "hasMany";
470
+ }>;
471
+ invitations: RelationEntry<"userInvitation", {
472
+ readonly type: "hasMany";
473
+ }>;
474
+ githubIntegration: RelationEntry<"integration", {
475
+ readonly type: "hasOne";
476
+ }>;
477
+ slackIntegration: RelationEntry<"integration", {
478
+ readonly type: "hasOne";
479
+ }>;
480
+ affiliateCodes: RelationEntry<"affiliateCode", {
481
+ readonly type: "hasMany";
482
+ }>;
483
+ activities: RelationEntry<"activity", {
484
+ readonly type: "hasMany";
485
+ }>;
486
+ stripeAccountSync: RelationEntry<"stripeAccountSync", {
487
+ readonly type: "hasOne";
488
+ }>;
489
+ accountOnboarding: RelationEntry<"accountOnboarding", {
490
+ readonly type: "hasOne";
491
+ }>;
492
+ }, ["id"]>;
493
+ activeTimeTracker: ModelDesc<"activeTimeTracker", {
494
+ id: TypedField<"id", ActiveTimeTrackerId, {}>;
495
+ createdAt: TypedField<"date", Date, {}>;
496
+ cardId: TypedField<"belongsTo", CardId, {}>;
497
+ userId: TypedField<"belongsTo", UserId, {}>;
498
+ accountId: TypedField<"belongsTo", AccountId, {}>;
499
+ }, {
500
+ card: RelationEntry<"card", {
501
+ readonly type: "belongsTo";
502
+ readonly fk: "cardId";
503
+ }>;
504
+ user: RelationEntry<"user", {
505
+ readonly type: "belongsTo";
506
+ readonly fk: "userId";
507
+ }>;
508
+ account: RelationEntry<"account", {
509
+ readonly type: "belongsTo";
510
+ readonly fk: "accountId";
511
+ }>;
512
+ }, ["id"]>;
513
+ activity: ModelDesc<"activity", {
514
+ id: TypedField<"id", ActivityId, {}>;
515
+ type: TypedField<"string", string, {}>;
516
+ data: TypedField<"obj", any, {}>;
517
+ isRemovedFromDeckEntry: TypedField<"bool", boolean, {}>;
518
+ isRemovedFromMilestoneEntry: TypedField<"bool", boolean, {}>;
519
+ isRemovedFromSprintEntry: TypedField<"bool", boolean, {}>;
520
+ createdAt: TypedField<"date", Date, {}>;
521
+ cardId: TypedField<"belongsTo", CardId, {}>;
522
+ deckId: TypedField<"belongsTo", DeckId, {}>;
523
+ projectId: TypedField<"belongsTo", ProjectId, {}>;
524
+ milestoneId: TypedField<"belongsTo", MilestoneId, {}>;
525
+ sprintId: TypedField<"belongsTo", SprintId, {}>;
526
+ changerId: TypedField<"belongsTo", UserId, {}>;
527
+ }, {
528
+ card: RelationEntry<"card", {
529
+ readonly type: "belongsTo";
530
+ readonly fk: "cardId";
531
+ }>;
532
+ deck: RelationEntry<"deck", {
533
+ readonly type: "belongsTo";
534
+ readonly fk: "deckId";
535
+ }>;
536
+ project: RelationEntry<"project", {
537
+ readonly type: "belongsTo";
538
+ readonly fk: "projectId";
539
+ }>;
540
+ milestone: RelationEntry<"milestone", {
541
+ readonly type: "belongsTo";
542
+ readonly fk: "milestoneId";
543
+ }>;
544
+ sprint: RelationEntry<"sprint", {
545
+ readonly type: "belongsTo";
546
+ readonly fk: "sprintId";
547
+ }>;
548
+ changer: RelationEntry<"user", {
549
+ readonly type: "belongsTo";
550
+ readonly fk: "changerId";
551
+ }>;
552
+ }, ["id"]>;
553
+ affiliateCodeStat: ModelDesc<"affiliateCodeStat", {
554
+ month: TypedField<"int", number, {}>;
555
+ year: TypedField<"int", number, {}>;
556
+ visits: TypedField<"int", number, {}>;
557
+ newVisitors: TypedField<"int", number, {}>;
558
+ signups: TypedField<"int", number, {}>;
559
+ revenue: TypedField<"int", number, {}>;
560
+ affiliateCodeId: TypedField<"belongsTo", AffiliateCodeId, {}>;
561
+ }, {
562
+ affiliateCode: RelationEntry<"affiliateCode", {
563
+ readonly type: "belongsTo";
564
+ readonly fk: "affiliateCodeId";
565
+ }>;
566
+ }, ["affiliateCodeId", "month"]>;
567
+ affiliateCode: ModelDesc<"affiliateCode", {
568
+ id: TypedField<"id", AffiliateCodeId, {}>;
569
+ code: TypedField<"string", string, {}>;
570
+ vanityUrl: TypedField<"string", string, {}>;
571
+ message: TypedField<"string", string, {}>;
572
+ label: TypedField<"string", string, {}>;
573
+ isDisabled: TypedField<"string", string, {}>;
574
+ isDeleted: TypedField<"string", string, {}>;
575
+ validUntil: TypedField<"string", string, {}>;
576
+ remainingRedemptions: TypedField<"string", string, {}>;
577
+ reward: TypedField<"obj", any, {}>;
578
+ createdAt: TypedField<"date", Date, {}>;
579
+ accountId: TypedField<"belongsTo", AccountId, {}>;
580
+ creatorId: TypedField<"belongsTo", UserId, {}>;
581
+ }, {
582
+ account: RelationEntry<"account", {
583
+ readonly type: "belongsTo";
584
+ readonly fk: "accountId";
585
+ }>;
586
+ creator: RelationEntry<"user", {
587
+ readonly type: "belongsTo";
588
+ readonly fk: "creatorId";
589
+ }>;
590
+ stats: RelationEntry<"affiliateCodeStat", {
591
+ readonly type: "hasMany";
592
+ }>;
593
+ }, ["id"]>;
594
+ appInstallation: ModelDesc<"appInstallation", {
595
+ id: TypedField<"id", AppInstallationId, {}>;
596
+ createdAt: TypedField<"date", Date, {}>;
597
+ accountId: TypedField<"belongsTo", AccountId, {}>;
598
+ appId: TypedField<"belongsTo", AppId, {}>;
599
+ installerId: TypedField<"belongsTo", UserId, {}>;
600
+ }, {
601
+ account: RelationEntry<"account", {
602
+ readonly type: "belongsTo";
603
+ readonly fk: "accountId";
604
+ }>;
605
+ app: RelationEntry<"app", {
606
+ readonly type: "belongsTo";
607
+ readonly fk: "appId";
608
+ }>;
609
+ installer: RelationEntry<"user", {
610
+ readonly type: "belongsTo";
611
+ readonly fk: "installerId";
612
+ }>;
613
+ }, ["id"]>;
614
+ app: ModelDesc<"app", {
615
+ id: TypedField<"id", AppId, {}>;
616
+ name: TypedField<"string", string, {}>;
617
+ createdAt: TypedField<"date", Date, {}>;
618
+ payload: TypedField<"obj", any, {}>;
619
+ }, {}, ["id"]>;
620
+ assigneeAssignment: ModelDesc<"assigneeAssignment", {
621
+ lastAssignedAt: TypedField<"date", Date, {}>;
622
+ accountId: TypedField<"belongsTo", AccountId, {}>;
623
+ assigneeId: TypedField<"belongsTo", UserId, {}>;
624
+ assignedById: TypedField<"belongsTo", UserId, {}>;
625
+ }, {
626
+ account: RelationEntry<"account", {
627
+ readonly type: "belongsTo";
628
+ readonly fk: "accountId";
629
+ }>;
630
+ assignee: RelationEntry<"user", {
631
+ readonly type: "belongsTo";
632
+ readonly fk: "assigneeId";
633
+ }>;
634
+ assignedBy: RelationEntry<"user", {
635
+ readonly type: "belongsTo";
636
+ readonly fk: "assignedById";
637
+ }>;
638
+ }, ["assigneeId", "assignedById"]>;
639
+ assigneeDeckAssignment: ModelDesc<"assigneeDeckAssignment", {
640
+ lastAssignedAt: TypedField<"date", Date, {}>;
641
+ accountId: TypedField<"belongsTo", AccountId, {}>;
642
+ deckId: TypedField<"belongsTo", DeckId, {}>;
643
+ assigneeId: TypedField<"belongsTo", UserId, {}>;
644
+ assignedById: TypedField<"belongsTo", UserId, {}>;
645
+ }, {
646
+ account: RelationEntry<"account", {
647
+ readonly type: "belongsTo";
648
+ readonly fk: "accountId";
649
+ }>;
650
+ deck: RelationEntry<"deck", {
651
+ readonly type: "belongsTo";
652
+ readonly fk: "deckId";
653
+ }>;
654
+ assignee: RelationEntry<"user", {
655
+ readonly type: "belongsTo";
656
+ readonly fk: "assigneeId";
657
+ }>;
658
+ assignedBy: RelationEntry<"user", {
659
+ readonly type: "belongsTo";
660
+ readonly fk: "assignedById";
661
+ }>;
662
+ }, ["assigneeId", "assignedById", "deckId"]>;
663
+ attachment: ModelDesc<"attachment", {
664
+ id: TypedField<"id", AttachmentId, {}>;
665
+ content: TypedField<"string", string, {}>;
666
+ title: TypedField<"string", string, {}>;
667
+ createdAt: TypedField<"date", Date, {}>;
668
+ fileId: TypedField<"belongsTo", FileId, {}>;
669
+ cardId: TypedField<"belongsTo", CardId, {}>;
670
+ accountId: TypedField<"belongsTo", AccountId, {}>;
671
+ creatorId: TypedField<"belongsTo", UserId, {}>;
672
+ }, {
673
+ file: RelationEntry<"file", {
674
+ readonly type: "belongsTo";
675
+ readonly fk: "fileId";
676
+ }>;
677
+ card: RelationEntry<"card", {
678
+ readonly type: "belongsTo";
679
+ readonly fk: "cardId";
680
+ }>;
681
+ account: RelationEntry<"account", {
682
+ readonly type: "belongsTo";
683
+ readonly fk: "accountId";
684
+ }>;
685
+ creator: RelationEntry<"user", {
686
+ readonly type: "belongsTo";
687
+ readonly fk: "creatorId";
688
+ }>;
689
+ }, ["id"]>;
690
+ autoFinishedTimeTrackingSegment: ModelDesc<"autoFinishedTimeTrackingSegment", {
691
+ createdAt: TypedField<"date", Date, {}>;
692
+ userId: TypedField<"belongsTo", UserId, {}>;
693
+ accountId: TypedField<"belongsTo", AccountId, {}>;
694
+ cardId: TypedField<"belongsTo", CardId, {}>;
695
+ timeTrackingSegmentId: TypedField<"belongsTo", TimeTrackingSegmentId, {}>;
696
+ }, {
697
+ user: RelationEntry<"user", {
698
+ readonly type: "belongsTo";
699
+ readonly fk: "userId";
700
+ }>;
701
+ account: RelationEntry<"account", {
702
+ readonly type: "belongsTo";
703
+ readonly fk: "accountId";
704
+ }>;
705
+ card: RelationEntry<"card", {
706
+ readonly type: "belongsTo";
707
+ readonly fk: "cardId";
708
+ }>;
709
+ timeTrackingSegment: RelationEntry<"timeTrackingSegment", {
710
+ readonly type: "belongsTo";
711
+ readonly fk: "timeTrackingSegmentId";
712
+ }>;
713
+ }, ["userId", "accountId"]>;
714
+ cardDiffNotification: ModelDesc<"cardDiffNotification", {
715
+ changes: TypedField<"obj", any, {}>;
716
+ asOwner: TypedField<"bool", boolean, {}>;
717
+ changers: TypedField<"array", any[], {}>;
718
+ lastUpdatedAt: TypedField<"date", Date, {}>;
719
+ createdAt: TypedField<"date", Date, {}>;
720
+ userId: TypedField<"belongsTo", UserId, {}>;
721
+ cardId: TypedField<"belongsTo", CardId, {}>;
722
+ accountId: TypedField<"belongsTo", AccountId, {}>;
723
+ }, {
724
+ user: RelationEntry<"user", {
725
+ readonly type: "belongsTo";
726
+ readonly fk: "userId";
727
+ }>;
728
+ card: RelationEntry<"card", {
729
+ readonly type: "belongsTo";
730
+ readonly fk: "cardId";
731
+ }>;
732
+ account: RelationEntry<"account", {
733
+ readonly type: "belongsTo";
734
+ readonly fk: "accountId";
735
+ }>;
736
+ }, ["userId", "cardId"]>;
737
+ cardHistory: ModelDesc<"cardHistory", {
738
+ diff: TypedField<"obj", any, {}>;
739
+ versionCreatedAt: TypedField<"date", Date, {}>;
740
+ version: TypedField<"int", number, {}>;
741
+ accountId: TypedField<"belongsTo", AccountId, {}>;
742
+ cardId: TypedField<"belongsTo", CardId, {}>;
743
+ changerId: TypedField<"belongsTo", UserId, {}>;
744
+ }, {
745
+ account: RelationEntry<"account", {
746
+ readonly type: "belongsTo";
747
+ readonly fk: "accountId";
748
+ }>;
749
+ card: RelationEntry<"card", {
750
+ readonly type: "belongsTo";
751
+ readonly fk: "cardId";
752
+ }>;
753
+ changer: RelationEntry<"user", {
754
+ readonly type: "belongsTo";
755
+ readonly fk: "changerId";
756
+ }>;
757
+ }, ["cardId", "version"]>;
758
+ cardOrderInDeck: ModelDesc<"cardOrderInDeck", {
759
+ sortIndex: TypedField<"string", string, {}>;
760
+ cardId: TypedField<"belongsTo", CardId, {}>;
761
+ deckId: TypedField<"belongsTo", DeckId, {}>;
762
+ changerId: TypedField<"belongsTo", UserId, {}>;
763
+ }, {
764
+ card: RelationEntry<"card", {
765
+ readonly type: "belongsTo";
766
+ readonly fk: "cardId";
767
+ }>;
768
+ deck: RelationEntry<"deck", {
769
+ readonly type: "belongsTo";
770
+ readonly fk: "deckId";
771
+ }>;
772
+ changer: RelationEntry<"user", {
773
+ readonly type: "belongsTo";
774
+ readonly fk: "changerId";
775
+ }>;
776
+ }, ["cardId", "deckId"]>;
777
+ cardOrder: ModelDesc<"cardOrder", {
778
+ sortValue: TypedField<"string", string, {}>;
779
+ label: TypedField<"string", string, {}>;
780
+ cardId: TypedField<"belongsTo", CardId, {}>;
781
+ accountId: TypedField<"belongsTo", AccountId, {}>;
782
+ }, {
783
+ card: RelationEntry<"card", {
784
+ readonly type: "belongsTo";
785
+ readonly fk: "cardId";
786
+ }>;
787
+ account: RelationEntry<"account", {
788
+ readonly type: "belongsTo";
789
+ readonly fk: "accountId";
790
+ }>;
791
+ }, ["context", "cardId"]>;
792
+ cardPreset: ModelDesc<"cardPreset", {
793
+ id: TypedField<"id", CardPresetId, {}>;
794
+ name: TypedField<"string", string, {}>;
795
+ data: TypedField<"obj", any, {}>;
796
+ createdAt: TypedField<"date", Date, {}>;
797
+ accountId: TypedField<"belongsTo", AccountId, {}>;
798
+ creatorId: TypedField<"belongsTo", UserId, {}>;
799
+ }, {
800
+ account: RelationEntry<"account", {
801
+ readonly type: "belongsTo";
802
+ readonly fk: "accountId";
803
+ }>;
804
+ creator: RelationEntry<"user", {
805
+ readonly type: "belongsTo";
806
+ readonly fk: "creatorId";
807
+ }>;
808
+ }, ["id"]>;
809
+ cardSubscription: ModelDesc<"cardSubscription", {
810
+ id: TypedField<"id", CardSubscriptionId, {}>;
811
+ createdAt: TypedField<"date", Date, {}>;
812
+ userId: TypedField<"belongsTo", UserId, {}>;
813
+ cardId: TypedField<"belongsTo", CardId, {}>;
814
+ accountId: TypedField<"belongsTo", AccountId, {}>;
815
+ }, {
816
+ user: RelationEntry<"user", {
817
+ readonly type: "belongsTo";
818
+ readonly fk: "userId";
819
+ }>;
820
+ card: RelationEntry<"card", {
821
+ readonly type: "belongsTo";
822
+ readonly fk: "cardId";
823
+ }>;
824
+ account: RelationEntry<"account", {
825
+ readonly type: "belongsTo";
826
+ readonly fk: "accountId";
827
+ }>;
828
+ }, ["id"]>;
829
+ cardUpvote: ModelDesc<"cardUpvote", {
830
+ id: TypedField<"id", CardUpvoteId, {}>;
831
+ type: TypedField<"string", string, {}>;
832
+ createdAt: TypedField<"date", Date, {}>;
833
+ discordUserInfo: TypedField<"obj", any, {}>;
834
+ userId: TypedField<"belongsTo", UserId, {}>;
835
+ accountId: TypedField<"belongsTo", AccountId, {}>;
836
+ cardId: TypedField<"belongsTo", CardId, {}>;
837
+ }, {
838
+ user: RelationEntry<"user", {
839
+ readonly type: "belongsTo";
840
+ readonly fk: "userId";
841
+ }>;
842
+ account: RelationEntry<"account", {
843
+ readonly type: "belongsTo";
844
+ readonly fk: "accountId";
845
+ }>;
846
+ card: RelationEntry<"card", {
847
+ readonly type: "belongsTo";
848
+ readonly fk: "cardId";
849
+ }>;
850
+ }, ["id"]>;
851
+ card: ModelDesc<"card", {
852
+ cardId: TypedField<"id", CardId, {}>;
853
+ version: TypedField<"int", number, {}>;
854
+ accountSeq: TypedField<"int", number, {}>;
855
+ content: TypedField<"string", string, {}>;
856
+ status: TypedField<"string", string, {}>;
857
+ derivedStatus: TypedField<"string", string, {}>;
858
+ createdAt: TypedField<"date", Date, {}>;
859
+ lastUpdatedAt: TypedField<"date", Date, {}>;
860
+ tags: TypedField<"array", any[], {}>;
861
+ masterTags: TypedField<"array", any[], {}>;
862
+ mentionedUsers: TypedField<"array", any[], {}>;
863
+ title: TypedField<"string", string, {}>;
864
+ priority: TypedField<"string", string, {
865
+ readonly optional: true;
866
+ }>;
867
+ effort: TypedField<"int", number, {
868
+ readonly optional: true;
869
+ }>;
870
+ checkboxStats: TypedField<"obj", any, {}>;
871
+ checkboxInfo: TypedField<"array", any[], {}>;
872
+ visibility: TypedField<"string", string, {}>;
873
+ legacyProjectSeq: TypedField<"int", number, {
874
+ readonly optional: true;
875
+ }>;
876
+ meta: TypedField<"obj", any, {}>;
877
+ embeds: TypedField<"obj", any, {}>;
878
+ isPublic: TypedField<"bool", boolean, {}>;
879
+ hasBlockingDeps: TypedField<"bool", boolean, {}>;
880
+ dueDate: TypedField<"day", {
881
+ day: number;
882
+ month: number;
883
+ year: number;
884
+ }, {
885
+ readonly optional: true;
886
+ }>;
887
+ isDoc: TypedField<"bool", boolean, {
888
+ readonly optional: true;
889
+ }>;
890
+ childCardInfo: TypedField<"string", string, {}>;
891
+ accountId: TypedField<"belongsTo", AccountId, {}>;
892
+ deckId: TypedField<"belongsTo", DeckId, {
893
+ readonly optional: true;
894
+ }>;
895
+ assigneeId: TypedField<"belongsTo", UserId, {
896
+ readonly optional: true;
897
+ }>;
898
+ creatorId: TypedField<"belongsTo", UserId, {
899
+ readonly optional: true;
900
+ }>;
901
+ milestoneId: TypedField<"belongsTo", MilestoneId, {
902
+ readonly optional: true;
903
+ }>;
904
+ sprintId: TypedField<"belongsTo", SprintId, {
905
+ readonly optional: true;
906
+ }>;
907
+ legacyProjectId: TypedField<"belongsTo", ProjectId, {
908
+ readonly optional: true;
909
+ }>;
910
+ coverFileId: TypedField<"belongsTo", FileId, {
911
+ readonly optional: true;
912
+ }>;
913
+ parentCardId: TypedField<"belongsTo", CardId, {
914
+ readonly optional: true;
915
+ }>;
916
+ sourceWorkflowItemId: TypedField<"belongsTo", WorkflowItemId, {
917
+ readonly optional: true;
918
+ }>;
919
+ discordGuildId: TypedField<"belongsTo", DiscordGuildId, {}>;
920
+ visionBoardId: TypedField<"belongsTo", VisionBoardId, {
921
+ readonly optional: true;
922
+ }>;
923
+ }, {
924
+ account: RelationEntry<"account", {
925
+ readonly type: "belongsTo";
926
+ readonly fk: "accountId";
927
+ }>;
928
+ deck: RelationEntry<"deck", {
929
+ readonly type: "belongsTo";
930
+ readonly fk: "deckId";
931
+ }>;
932
+ assignee: RelationEntry<"user", {
933
+ readonly type: "belongsTo";
934
+ readonly fk: "assigneeId";
935
+ }>;
936
+ creator: RelationEntry<"user", {
937
+ readonly type: "belongsTo";
938
+ readonly fk: "creatorId";
939
+ }>;
940
+ milestone: RelationEntry<"milestone", {
941
+ readonly type: "belongsTo";
942
+ readonly fk: "milestoneId";
943
+ }>;
944
+ sprint: RelationEntry<"sprint", {
945
+ readonly type: "belongsTo";
946
+ readonly fk: "sprintId";
947
+ }>;
948
+ legacyProject: RelationEntry<"project", {
949
+ readonly type: "belongsTo";
950
+ readonly fk: "legacyProjectId";
951
+ }>;
952
+ coverFile: RelationEntry<"file", {
953
+ readonly type: "belongsTo";
954
+ readonly fk: "coverFileId";
955
+ }>;
956
+ parentCard: RelationEntry<"card", {
957
+ readonly type: "belongsTo";
958
+ readonly fk: "parentCardId";
959
+ }>;
960
+ sourceWorkflowItem: RelationEntry<"workflowItem", {
961
+ readonly type: "belongsTo";
962
+ readonly fk: "sourceWorkflowItemId";
963
+ }>;
964
+ discordGuild: RelationEntry<"discordGuild", {
965
+ readonly type: "belongsTo";
966
+ readonly fk: "discordGuildId";
967
+ }>;
968
+ visionBoard: RelationEntry<"visionBoard", {
969
+ readonly type: "belongsTo";
970
+ readonly fk: "visionBoardId";
971
+ }>;
972
+ resolvables: RelationEntry<"resolvable", {
973
+ readonly type: "hasMany";
974
+ }>;
975
+ handCards: RelationEntry<"handCard", {
976
+ readonly type: "hasMany";
977
+ }>;
978
+ timeTrackingSegments: RelationEntry<"timeTrackingSegment", {
979
+ readonly type: "hasMany";
980
+ }>;
981
+ cardSubscriptions: RelationEntry<"cardSubscription", {
982
+ readonly type: "hasMany";
983
+ }>;
984
+ cardOrders: RelationEntry<"cardOrder", {
985
+ readonly type: "hasMany";
986
+ }>;
987
+ resolvableEntries: RelationEntry<"resolvableEntry", {
988
+ readonly type: "hasMany";
989
+ }>;
990
+ queueEntries: RelationEntry<"queueEntry", {
991
+ readonly type: "hasMany";
992
+ }>;
993
+ attachments: RelationEntry<"attachment", {
994
+ readonly type: "hasMany";
995
+ }>;
996
+ diffs: RelationEntry<"cardHistory", {
997
+ readonly type: "hasMany";
998
+ }>;
999
+ totalTimeTrackingSums: RelationEntry<"timeTrackingSum", {
1000
+ readonly type: "hasOne";
1001
+ }>;
1002
+ userTimeTrackingSums: RelationEntry<"timeTrackingSum", {
1003
+ readonly type: "hasMany";
1004
+ }>;
1005
+ childCards: RelationEntry<"card", {
1006
+ readonly type: "hasMany";
1007
+ }>;
1008
+ inDeps: RelationEntry<"card", {
1009
+ readonly type: "hasMany";
1010
+ }>;
1011
+ outDeps: RelationEntry<"card", {
1012
+ readonly type: "hasMany";
1013
+ }>;
1014
+ cardReferences: RelationEntry<"card", {
1015
+ readonly type: "hasMany";
1016
+ }>;
1017
+ upvotes: RelationEntry<"cardUpvote", {
1018
+ readonly type: "hasMany";
1019
+ }>;
1020
+ }, ["cardId"]>;
1021
+ cardsEffortHistory: ModelDesc<"cardsEffortHistory", {
1022
+ effortSum: TypedField<"bigint", bigint, {}>;
1023
+ cardCount: TypedField<"bigint", bigint, {}>;
1024
+ date: TypedField<"day", {
1025
+ day: number;
1026
+ month: number;
1027
+ year: number;
1028
+ }, {}>;
1029
+ }, {}, ["date", "effortSum", "cardCount"]>;
1030
+ cardsFinishedHistory: ModelDesc<"cardsFinishedHistory", {
1031
+ effortSum: TypedField<"bigint", bigint, {}>;
1032
+ cardCount: TypedField<"bigint", bigint, {}>;
1033
+ date: TypedField<"day", {
1034
+ day: number;
1035
+ month: number;
1036
+ year: number;
1037
+ }, {}>;
1038
+ assigneeId: TypedField<"belongsTo", UserId, {}>;
1039
+ }, {
1040
+ assignee: RelationEntry<"user", {
1041
+ readonly type: "belongsTo";
1042
+ readonly fk: "assigneeId";
1043
+ }>;
1044
+ }, ["date", "effortSum", "cardCount", "assigneeId"]>;
1045
+ cardsStatusHistory: ModelDesc<"cardsStatusHistory", {
1046
+ status: TypedField<"string", string, {}>;
1047
+ count: TypedField<"int", number, {}>;
1048
+ date: TypedField<"day", {
1049
+ day: number;
1050
+ month: number;
1051
+ year: number;
1052
+ }, {}>;
1053
+ }, {}, ["date", "status", "count"]>;
1054
+ cardsTimeToFinished: ModelDesc<"cardsTimeToFinished", {
1055
+ effort: TypedField<"int", number, {}>;
1056
+ startedAt: TypedField<"date", Date, {}>;
1057
+ doneAt: TypedField<"date", Date, {}>;
1058
+ cardId: TypedField<"belongsTo", CardId, {}>;
1059
+ assigneeId: TypedField<"belongsTo", UserId, {}>;
1060
+ }, {
1061
+ card: RelationEntry<"card", {
1062
+ readonly type: "belongsTo";
1063
+ readonly fk: "cardId";
1064
+ }>;
1065
+ assignee: RelationEntry<"user", {
1066
+ readonly type: "belongsTo";
1067
+ readonly fk: "assigneeId";
1068
+ }>;
1069
+ }, ["cardId", "startedAt", "doneAt", "effort", "assigneeId"]>;
1070
+ dailyDiscordGuildVoteMembership: ModelDesc<"dailyDiscordGuildVoteMembership", {
1071
+ t: TypedField<"date", Date, {}>;
1072
+ membershipCount: TypedField<"int", number, {}>;
1073
+ discordGuildId: TypedField<"belongsTo", DiscordGuildId, {}>;
1074
+ }, {
1075
+ discordGuild: RelationEntry<"discordGuild", {
1076
+ readonly type: "belongsTo";
1077
+ readonly fk: "discordGuildId";
1078
+ }>;
1079
+ }, ["t", "guildId"]>;
1080
+ dailyPublicProjectMembership: ModelDesc<"dailyPublicProjectMembership", {
1081
+ t: TypedField<"date", Date, {}>;
1082
+ membershipCount: TypedField<"int", number, {}>;
1083
+ projectId: TypedField<"belongsTo", ProjectId, {}>;
1084
+ }, {
1085
+ project: RelationEntry<"project", {
1086
+ readonly type: "belongsTo";
1087
+ readonly fk: "projectId";
1088
+ }>;
1089
+ }, ["t", "projectId"]>;
1090
+ publicProjectVisit: ModelDesc<"publicProjectVisit", {
1091
+ t: TypedField<"date", Date, {}>;
1092
+ topReferrers: TypedField<"obj", any, {}>;
1093
+ visitCounts: TypedField<"int", number, {}>;
1094
+ projectId: TypedField<"belongsTo", ProjectId, {}>;
1095
+ }, {
1096
+ project: RelationEntry<"project", {
1097
+ readonly type: "belongsTo";
1098
+ readonly fk: "projectId";
1099
+ }>;
1100
+ }, ["t", "projectId"]>;
1101
+ deckAssignment: ModelDesc<"deckAssignment", {
1102
+ lastAssignedAt: TypedField<"date", Date, {}>;
1103
+ deckId: TypedField<"belongsTo", DeckId, {}>;
1104
+ userId: TypedField<"belongsTo", UserId, {}>;
1105
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1106
+ }, {
1107
+ deck: RelationEntry<"deck", {
1108
+ readonly type: "belongsTo";
1109
+ readonly fk: "deckId";
1110
+ }>;
1111
+ user: RelationEntry<"user", {
1112
+ readonly type: "belongsTo";
1113
+ readonly fk: "userId";
1114
+ }>;
1115
+ account: RelationEntry<"account", {
1116
+ readonly type: "belongsTo";
1117
+ readonly fk: "accountId";
1118
+ }>;
1119
+ }, ["userId", "deckId"]>;
1120
+ deckGuardian: ModelDesc<"deckGuardian", {
1121
+ userId: TypedField<"belongsTo", UserId, {}>;
1122
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1123
+ deckId: TypedField<"belongsTo", DeckId, {}>;
1124
+ }, {
1125
+ user: RelationEntry<"user", {
1126
+ readonly type: "belongsTo";
1127
+ readonly fk: "userId";
1128
+ }>;
1129
+ account: RelationEntry<"account", {
1130
+ readonly type: "belongsTo";
1131
+ readonly fk: "accountId";
1132
+ }>;
1133
+ deck: RelationEntry<"deck", {
1134
+ readonly type: "belongsTo";
1135
+ readonly fk: "deckId";
1136
+ }>;
1137
+ }, ["deckId", "userId"]>;
1138
+ deckSubscription: ModelDesc<"deckSubscription", {
1139
+ id: TypedField<"id", DeckSubscriptionId, {}>;
1140
+ userId: TypedField<"belongsTo", UserId, {}>;
1141
+ deckId: TypedField<"belongsTo", DeckId, {}>;
1142
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1143
+ }, {
1144
+ user: RelationEntry<"user", {
1145
+ readonly type: "belongsTo";
1146
+ readonly fk: "userId";
1147
+ }>;
1148
+ deck: RelationEntry<"deck", {
1149
+ readonly type: "belongsTo";
1150
+ readonly fk: "deckId";
1151
+ }>;
1152
+ account: RelationEntry<"account", {
1153
+ readonly type: "belongsTo";
1154
+ readonly fk: "accountId";
1155
+ }>;
1156
+ }, ["id"]>;
1157
+ deck: ModelDesc<"deck", {
1158
+ id: TypedField<"id", DeckId, {}>;
1159
+ content: TypedField<"string", string, {}>;
1160
+ description: TypedField<"string", string, {}>;
1161
+ title: TypedField<"string", string, {}>;
1162
+ sortValue: TypedField<"string", string, {}>;
1163
+ preferredOrder: TypedField<"string", string, {
1164
+ readonly optional: true;
1165
+ }>;
1166
+ coverColor: TypedField<"string", string, {
1167
+ readonly optional: true;
1168
+ }>;
1169
+ isDeleted: TypedField<"string", string, {}>;
1170
+ accountSeq: TypedField<"int", number, {}>;
1171
+ spaceId: TypedField<"int", number, {
1172
+ readonly optional: true;
1173
+ }>;
1174
+ defaultCard: TypedField<"obj", any, {}>;
1175
+ isOnboardingDeck: TypedField<"bool", boolean, {}>;
1176
+ handSyncEnabled: TypedField<"string", string, {}>;
1177
+ stickyDefaultProjectTag: TypedField<"string", string, {}>;
1178
+ manualOrderLabels: TypedField<"string", string, {}>;
1179
+ workflowItemOrderLabels: TypedField<"string", string, {}>;
1180
+ createdAt: TypedField<"date", Date, {}>;
1181
+ stats: TypedField<"obj", any, {}>;
1182
+ hasGuardians: TypedField<"string", string, {}>;
1183
+ allowedCardTypes: TypedField<"string", string, {}>;
1184
+ projectId: TypedField<"belongsTo", ProjectId, {}>;
1185
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1186
+ milestoneId: TypedField<"belongsTo", MilestoneId, {
1187
+ readonly optional: true;
1188
+ }>;
1189
+ creatorId: TypedField<"belongsTo", UserId, {}>;
1190
+ coverFileId: TypedField<"belongsTo", FileId, {
1191
+ readonly optional: true;
1192
+ }>;
1193
+ descriptionCoverFileId: TypedField<"belongsTo", FileId, {
1194
+ readonly optional: true;
1195
+ }>;
1196
+ defaultProjectTagId: TypedField<"belongsTo", ProjectTagId, {
1197
+ readonly optional: true;
1198
+ }>;
1199
+ }, {
1200
+ project: RelationEntry<"project", {
1201
+ readonly type: "belongsTo";
1202
+ readonly fk: "projectId";
1203
+ }>;
1204
+ account: RelationEntry<"account", {
1205
+ readonly type: "belongsTo";
1206
+ readonly fk: "accountId";
1207
+ }>;
1208
+ milestone: RelationEntry<"milestone", {
1209
+ readonly type: "belongsTo";
1210
+ readonly fk: "milestoneId";
1211
+ }>;
1212
+ creator: RelationEntry<"user", {
1213
+ readonly type: "belongsTo";
1214
+ readonly fk: "creatorId";
1215
+ }>;
1216
+ coverFile: RelationEntry<"file", {
1217
+ readonly type: "belongsTo";
1218
+ readonly fk: "coverFileId";
1219
+ }>;
1220
+ descriptionCoverFile: RelationEntry<"file", {
1221
+ readonly type: "belongsTo";
1222
+ readonly fk: "descriptionCoverFileId";
1223
+ }>;
1224
+ defaultProjectTag: RelationEntry<"projectTag", {
1225
+ readonly type: "belongsTo";
1226
+ readonly fk: "defaultProjectTagId";
1227
+ }>;
1228
+ cards: RelationEntry<"card", {
1229
+ readonly type: "hasMany";
1230
+ }>;
1231
+ workflowItems: RelationEntry<"workflowItem", {
1232
+ readonly type: "hasMany";
1233
+ }>;
1234
+ cardOrderInDecks: RelationEntry<"cardOrderInDeck", {
1235
+ readonly type: "hasMany";
1236
+ }>;
1237
+ activities: RelationEntry<"activity", {
1238
+ readonly type: "hasMany";
1239
+ }>;
1240
+ guardians: RelationEntry<"deckGuardian", {
1241
+ readonly type: "hasMany";
1242
+ }>;
1243
+ }, ["id"]>;
1244
+ discordGuild: ModelDesc<"discordGuild", {
1245
+ id: TypedField<"id", DiscordGuildId, {}>;
1246
+ discordGuildId: TypedField<"string", string, {}>;
1247
+ guildName: TypedField<"string", string, {}>;
1248
+ guildIconId: TypedField<"string", string, {}>;
1249
+ scope: TypedField<"string", string, {}>;
1250
+ karmaRoleThresholds: TypedField<"obj", any, {}>;
1251
+ removeCommandEnabled: TypedField<"string", string, {}>;
1252
+ removeCommandEmoji: TypedField<"string", string, {}>;
1253
+ removeCommandRoleId: TypedField<"string", string, {}>;
1254
+ createdAt: TypedField<"date", Date, {}>;
1255
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1256
+ }, {
1257
+ account: RelationEntry<"account", {
1258
+ readonly type: "belongsTo";
1259
+ readonly fk: "accountId";
1260
+ }>;
1261
+ slashCommands: RelationEntry<"discordSlashCommand", {
1262
+ readonly type: "hasMany";
1263
+ }>;
1264
+ projectNotifications: RelationEntry<"discordProjectNotification", {
1265
+ readonly type: "hasMany";
1266
+ }>;
1267
+ dailyDiscordGuildVoteMemberships: RelationEntry<"dailyDiscordGuildVoteMembership", {
1268
+ readonly type: "hasMany";
1269
+ }>;
1270
+ members: RelationEntry<"discordMember", {
1271
+ readonly type: "hasMany";
1272
+ }>;
1273
+ }, ["id"]>;
1274
+ discordMember: ModelDesc<"discordMember", {
1275
+ id: TypedField<"id", DiscordMemberId, {}>;
1276
+ discordUserId: TypedField<"string", string, {}>;
1277
+ name: TypedField<"string", string, {}>;
1278
+ nick: TypedField<"string", string, {}>;
1279
+ avatar: TypedField<"string", string, {}>;
1280
+ discriminator: TypedField<"string", string, {}>;
1281
+ createdAt: TypedField<"date", Date, {}>;
1282
+ deckyScore: TypedField<"int", number, {}>;
1283
+ discordGuildId: TypedField<"belongsTo", DiscordGuildId, {}>;
1284
+ }, {
1285
+ discordGuild: RelationEntry<"discordGuild", {
1286
+ readonly type: "belongsTo";
1287
+ readonly fk: "discordGuildId";
1288
+ }>;
1289
+ }, ["id"]>;
1290
+ discordProjectNotification: ModelDesc<"discordProjectNotification", {
1291
+ id: TypedField<"id", DiscordProjectNotificationId, {}>;
1292
+ discordChannelId: TypedField<"string", string, {}>;
1293
+ disabledTypes: TypedField<"obj", any, {}>;
1294
+ createdAt: TypedField<"date", Date, {}>;
1295
+ projectId: TypedField<"belongsTo", ProjectId, {}>;
1296
+ discordGuildId: TypedField<"belongsTo", DiscordGuildId, {}>;
1297
+ }, {
1298
+ project: RelationEntry<"project", {
1299
+ readonly type: "belongsTo";
1300
+ readonly fk: "projectId";
1301
+ }>;
1302
+ discordGuild: RelationEntry<"discordGuild", {
1303
+ readonly type: "belongsTo";
1304
+ readonly fk: "discordGuildId";
1305
+ }>;
1306
+ }, ["id"]>;
1307
+ discordSlashCommand: ModelDesc<"discordSlashCommand", {
1308
+ id: TypedField<"id", DiscordSlashCommandId, {}>;
1309
+ channelId: TypedField<"string", string, {}>;
1310
+ statusTargetChannelId: TypedField<"string", string, {}>;
1311
+ reaction: TypedField<"string", string, {}>;
1312
+ name: TypedField<"string", string, {}>;
1313
+ description: TypedField<"string", string, {}>;
1314
+ autoAddRoleToThread: TypedField<"string", string, {}>;
1315
+ leaderboard: TypedField<"obj", any, {}>;
1316
+ reactionThreshold: TypedField<"int", number, {}>;
1317
+ karmaForCompletion: TypedField<"int", number, {}>;
1318
+ maxFileSizeInBytes: TypedField<"int", number, {}>;
1319
+ statusMessages: TypedField<"obj", any, {}>;
1320
+ permissions: TypedField<"obj", any, {}>;
1321
+ deckId: TypedField<"belongsTo", DeckId, {}>;
1322
+ discordGuildId: TypedField<"belongsTo", DiscordGuildId, {}>;
1323
+ }, {
1324
+ deck: RelationEntry<"deck", {
1325
+ readonly type: "belongsTo";
1326
+ readonly fk: "deckId";
1327
+ }>;
1328
+ discordGuild: RelationEntry<"discordGuild", {
1329
+ readonly type: "belongsTo";
1330
+ readonly fk: "discordGuildId";
1331
+ }>;
1332
+ }, ["id"]>;
1333
+ dueCard: ModelDesc<"dueCard", {
1334
+ createdAt: TypedField<"date", Date, {}>;
1335
+ userId: TypedField<"belongsTo", UserId, {}>;
1336
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1337
+ cardId: TypedField<"belongsTo", CardId, {}>;
1338
+ }, {
1339
+ user: RelationEntry<"user", {
1340
+ readonly type: "belongsTo";
1341
+ readonly fk: "userId";
1342
+ }>;
1343
+ account: RelationEntry<"account", {
1344
+ readonly type: "belongsTo";
1345
+ readonly fk: "accountId";
1346
+ }>;
1347
+ card: RelationEntry<"card", {
1348
+ readonly type: "belongsTo";
1349
+ readonly fk: "cardId";
1350
+ }>;
1351
+ }, ["userId", "cardId"]>;
1352
+ file: ModelDesc<"file", {
1353
+ id: TypedField<"id", FileId, {}>;
1354
+ name: TypedField<"string", string, {}>;
1355
+ url: TypedField<"string", string, {}>;
1356
+ size: TypedField<"string", string, {}>;
1357
+ isDeleted: TypedField<"string", string, {}>;
1358
+ meta: TypedField<"obj", any, {}>;
1359
+ createdAt: TypedField<"date", Date, {}>;
1360
+ deletedAt: TypedField<"date", Date, {}>;
1361
+ selfHosted: TypedField<"string", string, {}>;
1362
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1363
+ uploaderId: TypedField<"belongsTo", UserId, {}>;
1364
+ deletedById: TypedField<"belongsTo", UserId, {}>;
1365
+ }, {
1366
+ account: RelationEntry<"account", {
1367
+ readonly type: "belongsTo";
1368
+ readonly fk: "accountId";
1369
+ }>;
1370
+ uploader: RelationEntry<"user", {
1371
+ readonly type: "belongsTo";
1372
+ readonly fk: "uploaderId";
1373
+ }>;
1374
+ deletedBy: RelationEntry<"user", {
1375
+ readonly type: "belongsTo";
1376
+ readonly fk: "deletedById";
1377
+ }>;
1378
+ }, ["id"]>;
1379
+ handCard: ModelDesc<"handCard", {
1380
+ sortIndex: TypedField<"int", number, {}>;
1381
+ userId: TypedField<"belongsTo", UserId, {}>;
1382
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1383
+ cardId: TypedField<"belongsTo", CardId, {}>;
1384
+ }, {
1385
+ user: RelationEntry<"user", {
1386
+ readonly type: "belongsTo";
1387
+ readonly fk: "userId";
1388
+ }>;
1389
+ account: RelationEntry<"account", {
1390
+ readonly type: "belongsTo";
1391
+ readonly fk: "accountId";
1392
+ }>;
1393
+ card: RelationEntry<"card", {
1394
+ readonly type: "belongsTo";
1395
+ readonly fk: "cardId";
1396
+ }>;
1397
+ }, ["cardId", "userId", "accountId"]>;
1398
+ integration: ModelDesc<"integration", {
1399
+ id: TypedField<"id", IntegrationId, {}>;
1400
+ type: TypedField<"string", string, {}>;
1401
+ disabled: TypedField<"string", string, {}>;
1402
+ userData: TypedField<"obj", any, {}>;
1403
+ createdAt: TypedField<"date", Date, {}>;
1404
+ version: TypedField<"int", number, {}>;
1405
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1406
+ userId: TypedField<"belongsTo", UserId, {}>;
1407
+ creatorId: TypedField<"belongsTo", UserId, {}>;
1408
+ }, {
1409
+ account: RelationEntry<"account", {
1410
+ readonly type: "belongsTo";
1411
+ readonly fk: "accountId";
1412
+ }>;
1413
+ user: RelationEntry<"user", {
1414
+ readonly type: "belongsTo";
1415
+ readonly fk: "userId";
1416
+ }>;
1417
+ creator: RelationEntry<"user", {
1418
+ readonly type: "belongsTo";
1419
+ readonly fk: "creatorId";
1420
+ }>;
1421
+ }, ["id"]>;
1422
+ invoice: ModelDesc<"invoice", {
1423
+ id: TypedField<"id", InvoiceId, {}>;
1424
+ invoiceNumber: TypedField<"string", string, {}>;
1425
+ url: TypedField<"string", string, {}>;
1426
+ createdAt: TypedField<"date", Date, {}>;
1427
+ total: TypedField<"int", number, {}>;
1428
+ subtotal: TypedField<"int", number, {}>;
1429
+ charged: TypedField<"int", number, {}>;
1430
+ chargeData: TypedField<"obj", any, {}>;
1431
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1432
+ }, {
1433
+ account: RelationEntry<"account", {
1434
+ readonly type: "belongsTo";
1435
+ readonly fk: "accountId";
1436
+ }>;
1437
+ }, ["id"]>;
1438
+ lastSeenCardUpvote: ModelDesc<"lastSeenCardUpvote", {
1439
+ lastSeenAt: TypedField<"date", Date, {}>;
1440
+ createdAt: TypedField<"date", Date, {}>;
1441
+ userId: TypedField<"belongsTo", UserId, {}>;
1442
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1443
+ }, {
1444
+ user: RelationEntry<"user", {
1445
+ readonly type: "belongsTo";
1446
+ readonly fk: "userId";
1447
+ }>;
1448
+ account: RelationEntry<"account", {
1449
+ readonly type: "belongsTo";
1450
+ readonly fk: "accountId";
1451
+ }>;
1452
+ }, ["userId", "accountId"]>;
1453
+ milestoneProgress: ModelDesc<"milestoneProgress", {
1454
+ progress: TypedField<"obj", any, {}>;
1455
+ milestoneId: TypedField<"belongsTo", MilestoneId, {}>;
1456
+ }, {
1457
+ milestone: RelationEntry<"milestone", {
1458
+ readonly type: "belongsTo";
1459
+ readonly fk: "milestoneId";
1460
+ }>;
1461
+ }, ["milestoneId", "date"]>;
1462
+ milestoneProject: ModelDesc<"milestoneProject", {
1463
+ milestoneId: TypedField<"belongsTo", MilestoneId, {}>;
1464
+ projectId: TypedField<"belongsTo", ProjectId, {}>;
1465
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1466
+ }, {
1467
+ milestone: RelationEntry<"milestone", {
1468
+ readonly type: "belongsTo";
1469
+ readonly fk: "milestoneId";
1470
+ }>;
1471
+ project: RelationEntry<"project", {
1472
+ readonly type: "belongsTo";
1473
+ readonly fk: "projectId";
1474
+ }>;
1475
+ account: RelationEntry<"account", {
1476
+ readonly type: "belongsTo";
1477
+ readonly fk: "accountId";
1478
+ }>;
1479
+ }, ["milestoneId", "projectId"]>;
1480
+ milestone: ModelDesc<"milestone", {
1481
+ id: TypedField<"id", MilestoneId, {}>;
1482
+ name: TypedField<"string", string, {}>;
1483
+ color: TypedField<"string", string, {}>;
1484
+ date: TypedField<"day", {
1485
+ day: number;
1486
+ month: number;
1487
+ year: number;
1488
+ }, {}>;
1489
+ startDate: TypedField<"day", {
1490
+ day: number;
1491
+ month: number;
1492
+ year: number;
1493
+ }, {
1494
+ readonly optional: true;
1495
+ }>;
1496
+ createdAt: TypedField<"date", Date, {}>;
1497
+ accountSeq: TypedField<"int", number, {}>;
1498
+ description: TypedField<"string", string, {
1499
+ readonly optional: true;
1500
+ }>;
1501
+ isGlobal: TypedField<"string", string, {}>;
1502
+ handSyncEnabled: TypedField<"string", string, {}>;
1503
+ manualOrderLabels: TypedField<"string", string, {}>;
1504
+ stats: TypedField<"obj", any, {}>;
1505
+ userCapacities: TypedField<"obj", any, {}>;
1506
+ isDeleted: TypedField<"bool", boolean, {}>;
1507
+ preferredOrder: TypedField<"string", string, {
1508
+ readonly optional: true;
1509
+ }>;
1510
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1511
+ creatorId: TypedField<"belongsTo", UserId, {}>;
1512
+ coverFileId: TypedField<"belongsTo", FileId, {
1513
+ readonly optional: true;
1514
+ }>;
1515
+ }, {
1516
+ account: RelationEntry<"account", {
1517
+ readonly type: "belongsTo";
1518
+ readonly fk: "accountId";
1519
+ }>;
1520
+ creator: RelationEntry<"user", {
1521
+ readonly type: "belongsTo";
1522
+ readonly fk: "creatorId";
1523
+ }>;
1524
+ coverFile: RelationEntry<"file", {
1525
+ readonly type: "belongsTo";
1526
+ readonly fk: "coverFileId";
1527
+ }>;
1528
+ milestoneProjects: RelationEntry<"milestoneProject", {
1529
+ readonly type: "hasMany";
1530
+ }>;
1531
+ cards: RelationEntry<"card", {
1532
+ readonly type: "hasMany";
1533
+ }>;
1534
+ activities: RelationEntry<"activity", {
1535
+ readonly type: "hasMany";
1536
+ }>;
1537
+ progress: RelationEntry<"milestoneProgress", {
1538
+ readonly type: "hasMany";
1539
+ }>;
1540
+ }, ["id"]>;
1541
+ pinnedMilestone: ModelDesc<"pinnedMilestone", {
1542
+ id: TypedField<"id", PinnedMilestoneId, {}>;
1543
+ autoAssignStartedCard: TypedField<"bool", boolean, {}>;
1544
+ autoAssignNewCard: TypedField<"bool", boolean, {}>;
1545
+ userId: TypedField<"belongsTo", UserId, {}>;
1546
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1547
+ sprintId: TypedField<"belongsTo", SprintId, {}>;
1548
+ milestoneId: TypedField<"belongsTo", MilestoneId, {}>;
1549
+ }, {
1550
+ user: RelationEntry<"user", {
1551
+ readonly type: "belongsTo";
1552
+ readonly fk: "userId";
1553
+ }>;
1554
+ account: RelationEntry<"account", {
1555
+ readonly type: "belongsTo";
1556
+ readonly fk: "accountId";
1557
+ }>;
1558
+ sprint: RelationEntry<"sprint", {
1559
+ readonly type: "belongsTo";
1560
+ readonly fk: "sprintId";
1561
+ }>;
1562
+ milestone: RelationEntry<"milestone", {
1563
+ readonly type: "belongsTo";
1564
+ readonly fk: "milestoneId";
1565
+ }>;
1566
+ }, ["id"]>;
1567
+ projectOrder: ModelDesc<"projectOrder", {
1568
+ sortIndex: TypedField<"int", number, {}>;
1569
+ userId: TypedField<"belongsTo", UserId, {}>;
1570
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1571
+ projectId: TypedField<"belongsTo", ProjectId, {}>;
1572
+ }, {
1573
+ user: RelationEntry<"user", {
1574
+ readonly type: "belongsTo";
1575
+ readonly fk: "userId";
1576
+ }>;
1577
+ account: RelationEntry<"account", {
1578
+ readonly type: "belongsTo";
1579
+ readonly fk: "accountId";
1580
+ }>;
1581
+ project: RelationEntry<"project", {
1582
+ readonly type: "belongsTo";
1583
+ readonly fk: "projectId";
1584
+ }>;
1585
+ }, ["projectId", "userId", "accountId"]>;
1586
+ projectSelection: ModelDesc<"projectSelection", {
1587
+ id: TypedField<"id", ProjectSelectionId, {}>;
1588
+ userId: TypedField<"belongsTo", UserId, {}>;
1589
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1590
+ projectId: TypedField<"belongsTo", ProjectId, {}>;
1591
+ }, {
1592
+ user: RelationEntry<"user", {
1593
+ readonly type: "belongsTo";
1594
+ readonly fk: "userId";
1595
+ }>;
1596
+ account: RelationEntry<"account", {
1597
+ readonly type: "belongsTo";
1598
+ readonly fk: "accountId";
1599
+ }>;
1600
+ project: RelationEntry<"project", {
1601
+ readonly type: "belongsTo";
1602
+ readonly fk: "projectId";
1603
+ }>;
1604
+ }, ["id"]>;
1605
+ projectTag: ModelDesc<"projectTag", {
1606
+ id: TypedField<"id", ProjectTagId, {}>;
1607
+ tag: TypedField<"string", string, {}>;
1608
+ color: TypedField<"string", string, {
1609
+ readonly optional: true;
1610
+ }>;
1611
+ emoji: TypedField<"string", string, {
1612
+ readonly optional: true;
1613
+ }>;
1614
+ description: TypedField<"string", string, {
1615
+ readonly optional: true;
1616
+ }>;
1617
+ createdAt: TypedField<"date", Date, {}>;
1618
+ projectId: TypedField<"belongsTo", ProjectId, {}>;
1619
+ }, {
1620
+ project: RelationEntry<"project", {
1621
+ readonly type: "belongsTo";
1622
+ readonly fk: "projectId";
1623
+ }>;
1624
+ }, ["id"]>;
1625
+ projectUserSetting: ModelDesc<"projectUserSetting", {
1626
+ projectId: TypedField<"belongsTo", ProjectId, {}>;
1627
+ userId: TypedField<"belongsTo", UserId, {}>;
1628
+ }, {
1629
+ project: RelationEntry<"project", {
1630
+ readonly type: "belongsTo";
1631
+ readonly fk: "projectId";
1632
+ }>;
1633
+ user: RelationEntry<"user", {
1634
+ readonly type: "belongsTo";
1635
+ readonly fk: "userId";
1636
+ }>;
1637
+ }, ["projectId", "userId"]>;
1638
+ projectUser: ModelDesc<"projectUser", {
1639
+ projectRole: TypedField<"string", string, {}>;
1640
+ userId: TypedField<"belongsTo", UserId, {}>;
1641
+ projectId: TypedField<"belongsTo", ProjectId, {}>;
1642
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1643
+ }, {
1644
+ user: RelationEntry<"user", {
1645
+ readonly type: "belongsTo";
1646
+ readonly fk: "userId";
1647
+ }>;
1648
+ project: RelationEntry<"project", {
1649
+ readonly type: "belongsTo";
1650
+ readonly fk: "projectId";
1651
+ }>;
1652
+ account: RelationEntry<"account", {
1653
+ readonly type: "belongsTo";
1654
+ readonly fk: "accountId";
1655
+ }>;
1656
+ }, ["projectId", "userId"]>;
1657
+ project: ModelDesc<"project", {
1658
+ id: TypedField<"id", ProjectId, {}>;
1659
+ name: TypedField<"string", string, {}>;
1660
+ visibility: TypedField<"string", string, {}>;
1661
+ defaultUserAccess: TypedField<"string", string, {}>;
1662
+ createdAt: TypedField<"date", Date, {}>;
1663
+ accountSeq: TypedField<"int", number, {}>;
1664
+ allowUpvotes: TypedField<"string", string, {}>;
1665
+ isPublic: TypedField<"string", string, {}>;
1666
+ commentsArePublic: TypedField<"string", string, {}>;
1667
+ publicRegistryAgreement: TypedField<"string", string, {
1668
+ readonly optional: true;
1669
+ }>;
1670
+ publicLayoutVersion: TypedField<"string", string, {}>;
1671
+ publicIsExplicit: TypedField<"string", string, {}>;
1672
+ markerColor: TypedField<"string", string, {
1673
+ readonly optional: true;
1674
+ }>;
1675
+ effortIcon: TypedField<"string", string, {
1676
+ readonly optional: true;
1677
+ }>;
1678
+ spaces: TypedField<"string", string, {}>;
1679
+ publicPath: TypedField<"string", string, {
1680
+ readonly optional: true;
1681
+ }>;
1682
+ publicMessage: TypedField<"string", string, {
1683
+ readonly optional: true;
1684
+ }>;
1685
+ publicHeading: TypedField<"string", string, {
1686
+ readonly optional: true;
1687
+ }>;
1688
+ publicBackgroundColor: TypedField<"string", string, {
1689
+ readonly optional: true;
1690
+ }>;
1691
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1692
+ coverFileId: TypedField<"belongsTo", FileId, {
1693
+ readonly optional: true;
1694
+ }>;
1695
+ publicBannerFileId: TypedField<"belongsTo", FileId, {
1696
+ readonly optional: true;
1697
+ }>;
1698
+ publicTileFileId: TypedField<"belongsTo", FileId, {
1699
+ readonly optional: true;
1700
+ }>;
1701
+ publicBackgroundImageId: TypedField<"belongsTo", FileId, {
1702
+ readonly optional: true;
1703
+ }>;
1704
+ }, {
1705
+ account: RelationEntry<"account", {
1706
+ readonly type: "belongsTo";
1707
+ readonly fk: "accountId";
1708
+ }>;
1709
+ coverFile: RelationEntry<"file", {
1710
+ readonly type: "belongsTo";
1711
+ readonly fk: "coverFileId";
1712
+ }>;
1713
+ publicBannerFile: RelationEntry<"file", {
1714
+ readonly type: "belongsTo";
1715
+ readonly fk: "publicBannerFileId";
1716
+ }>;
1717
+ publicTileFile: RelationEntry<"file", {
1718
+ readonly type: "belongsTo";
1719
+ readonly fk: "publicTileFileId";
1720
+ }>;
1721
+ publicBackgroundImage: RelationEntry<"file", {
1722
+ readonly type: "belongsTo";
1723
+ readonly fk: "publicBackgroundImageId";
1724
+ }>;
1725
+ decks: RelationEntry<"deck", {
1726
+ readonly type: "hasMany";
1727
+ }>;
1728
+ milestoneProjects: RelationEntry<"milestoneProject", {
1729
+ readonly type: "hasMany";
1730
+ }>;
1731
+ sprintProjects: RelationEntry<"sprintProject", {
1732
+ readonly type: "hasMany";
1733
+ }>;
1734
+ publicProjectVisits: RelationEntry<"publicProjectVisit", {
1735
+ readonly type: "hasMany";
1736
+ }>;
1737
+ dailyPublicProjectMembership: RelationEntry<"dailyPublicProjectMembership", {
1738
+ readonly type: "hasMany";
1739
+ }>;
1740
+ publicProjectMemberships: RelationEntry<"publicProjectMembership", {
1741
+ readonly type: "hasMany";
1742
+ }>;
1743
+ cardUpvotes: RelationEntry<"cardUpvote", {
1744
+ readonly type: "hasMany";
1745
+ }>;
1746
+ tags: RelationEntry<"projectTag", {
1747
+ readonly type: "hasMany";
1748
+ }>;
1749
+ activities: RelationEntry<"activity", {
1750
+ readonly type: "hasMany";
1751
+ }>;
1752
+ explicitProjectUsers: RelationEntry<"projectUser", {
1753
+ readonly type: "hasMany";
1754
+ }>;
1755
+ access: RelationEntry<"userProjectAccess", {
1756
+ readonly type: "hasMany";
1757
+ }>;
1758
+ publicProjectInfo: RelationEntry<"publicProjectInfo", {
1759
+ readonly type: "hasOne";
1760
+ }>;
1761
+ }, ["id"]>;
1762
+ publicProjectInfo: ModelDesc<"publicProjectInfo", {
1763
+ lastActivityAt: TypedField<"string", string, {}>;
1764
+ activities7d: TypedField<"string", string, {}>;
1765
+ cardCount: TypedField<"string", string, {}>;
1766
+ visits7d: TypedField<"string", string, {}>;
1767
+ cardDoneStreak: TypedField<"string", string, {}>;
1768
+ projectId: TypedField<"belongsTo", ProjectId, {}>;
1769
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1770
+ }, {
1771
+ project: RelationEntry<"project", {
1772
+ readonly type: "belongsTo";
1773
+ readonly fk: "projectId";
1774
+ }>;
1775
+ account: RelationEntry<"account", {
1776
+ readonly type: "belongsTo";
1777
+ readonly fk: "accountId";
1778
+ }>;
1779
+ }, ["projectId"]>;
1780
+ publicProjectMembership: ModelDesc<"publicProjectMembership", {
1781
+ digestFrequencyInDays: TypedField<"int", number, {}>;
1782
+ createdAt: TypedField<"date", Date, {}>;
1783
+ userId: TypedField<"belongsTo", UserId, {}>;
1784
+ projectId: TypedField<"belongsTo", ProjectId, {}>;
1785
+ }, {
1786
+ user: RelationEntry<"user", {
1787
+ readonly type: "belongsTo";
1788
+ readonly fk: "userId";
1789
+ }>;
1790
+ project: RelationEntry<"project", {
1791
+ readonly type: "belongsTo";
1792
+ readonly fk: "projectId";
1793
+ }>;
1794
+ }, ["userId", "projectId"]>;
1795
+ queueEntry: ModelDesc<"queueEntry", {
1796
+ id: TypedField<"id", QueueEntryId, {}>;
1797
+ sortIndex: TypedField<"int", number, {}>;
1798
+ cardDoneAt: TypedField<"date", Date, {}>;
1799
+ createdAt: TypedField<"date", Date, {}>;
1800
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1801
+ userId: TypedField<"belongsTo", UserId, {}>;
1802
+ cardId: TypedField<"belongsTo", CardId, {}>;
1803
+ }, {
1804
+ account: RelationEntry<"account", {
1805
+ readonly type: "belongsTo";
1806
+ readonly fk: "accountId";
1807
+ }>;
1808
+ user: RelationEntry<"user", {
1809
+ readonly type: "belongsTo";
1810
+ readonly fk: "userId";
1811
+ }>;
1812
+ card: RelationEntry<"card", {
1813
+ readonly type: "belongsTo";
1814
+ readonly fk: "cardId";
1815
+ }>;
1816
+ }, ["id"]>;
1817
+ queueSelection: ModelDesc<"queueSelection", {
1818
+ id: TypedField<"id", QueueSelectionId, {}>;
1819
+ sortIndex: TypedField<"int", number, {}>;
1820
+ userId: TypedField<"belongsTo", UserId, {}>;
1821
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1822
+ queueUserId: TypedField<"belongsTo", UserId, {}>;
1823
+ }, {
1824
+ user: RelationEntry<"user", {
1825
+ readonly type: "belongsTo";
1826
+ readonly fk: "userId";
1827
+ }>;
1828
+ account: RelationEntry<"account", {
1829
+ readonly type: "belongsTo";
1830
+ readonly fk: "accountId";
1831
+ }>;
1832
+ queueUser: RelationEntry<"user", {
1833
+ readonly type: "belongsTo";
1834
+ readonly fk: "queueUserId";
1835
+ }>;
1836
+ }, ["id"]>;
1837
+ release: ModelDesc<"release", {
1838
+ id: TypedField<"id", ReleaseId, {}>;
1839
+ version: TypedField<"string", string, {}>;
1840
+ isLive: TypedField<"string", string, {}>;
1841
+ content: TypedField<"string", string, {}>;
1842
+ title: TypedField<"string", string, {}>;
1843
+ createdAt: TypedField<"date", Date, {}>;
1844
+ }, {}, ["id"]>;
1845
+ resolvableEntryHistory: ModelDesc<"resolvableEntryHistory", {
1846
+ content: TypedField<"string", string, {}>;
1847
+ lastChangedAt: TypedField<"date", Date, {}>;
1848
+ version: TypedField<"int", number, {}>;
1849
+ resolvableId: TypedField<"belongsTo", ResolvableId, {}>;
1850
+ authorId: TypedField<"belongsTo", UserId, {}>;
1851
+ entryId: TypedField<"belongsTo", ResolvableEntryId, {}>;
1852
+ }, {
1853
+ resolvable: RelationEntry<"resolvable", {
1854
+ readonly type: "belongsTo";
1855
+ readonly fk: "resolvableId";
1856
+ }>;
1857
+ author: RelationEntry<"user", {
1858
+ readonly type: "belongsTo";
1859
+ readonly fk: "authorId";
1860
+ }>;
1861
+ entry: RelationEntry<"resolvableEntry", {
1862
+ readonly type: "belongsTo";
1863
+ readonly fk: "entryId";
1864
+ }>;
1865
+ }, ["entryId", "version"]>;
1866
+ resolvableEntryReaction: ModelDesc<"resolvableEntryReaction", {
1867
+ id: TypedField<"id", ResolvableEntryReactionId, {}>;
1868
+ value: TypedField<"obj", any, {}>;
1869
+ createdAt: TypedField<"date", Date, {}>;
1870
+ isPublic: TypedField<"bool", boolean, {}>;
1871
+ resolvableEntryId: TypedField<"belongsTo", ResolvableEntryId, {}>;
1872
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1873
+ userId: TypedField<"belongsTo", UserId, {}>;
1874
+ resolvableId: TypedField<"belongsTo", ResolvableId, {}>;
1875
+ }, {
1876
+ resolvableEntry: RelationEntry<"resolvableEntry", {
1877
+ readonly type: "belongsTo";
1878
+ readonly fk: "resolvableEntryId";
1879
+ }>;
1880
+ account: RelationEntry<"account", {
1881
+ readonly type: "belongsTo";
1882
+ readonly fk: "accountId";
1883
+ }>;
1884
+ user: RelationEntry<"user", {
1885
+ readonly type: "belongsTo";
1886
+ readonly fk: "userId";
1887
+ }>;
1888
+ resolvable: RelationEntry<"resolvable", {
1889
+ readonly type: "belongsTo";
1890
+ readonly fk: "resolvableId";
1891
+ }>;
1892
+ }, ["id"]>;
1893
+ resolvableEntry: ModelDesc<"resolvableEntry", {
1894
+ entryId: TypedField<"id", ResolvableEntryId, {}>;
1895
+ content: TypedField<"string", string, {}>;
1896
+ lastChangedAt: TypedField<"date", Date, {}>;
1897
+ createdAt: TypedField<"date", Date, {}>;
1898
+ version: TypedField<"int", number, {}>;
1899
+ meta: TypedField<"obj", any, {}>;
1900
+ resolvableId: TypedField<"belongsTo", ResolvableId, {}>;
1901
+ cardId: TypedField<"belongsTo", CardId, {}>;
1902
+ authorId: TypedField<"belongsTo", UserId, {}>;
1903
+ }, {
1904
+ resolvable: RelationEntry<"resolvable", {
1905
+ readonly type: "belongsTo";
1906
+ readonly fk: "resolvableId";
1907
+ }>;
1908
+ card: RelationEntry<"card", {
1909
+ readonly type: "belongsTo";
1910
+ readonly fk: "cardId";
1911
+ }>;
1912
+ author: RelationEntry<"user", {
1913
+ readonly type: "belongsTo";
1914
+ readonly fk: "authorId";
1915
+ }>;
1916
+ reactions: RelationEntry<"resolvableEntryReaction", {
1917
+ readonly type: "hasMany";
1918
+ }>;
1919
+ histories: RelationEntry<"resolvableEntryHistory", {
1920
+ readonly type: "hasMany";
1921
+ }>;
1922
+ }, ["entryId"]>;
1923
+ resolvableNotification: ModelDesc<"resolvableNotification", {
1924
+ isParticipating: TypedField<"bool", boolean, {}>;
1925
+ isSnoozing: TypedField<"bool", boolean, {}>;
1926
+ unseenEntryCount: TypedField<"int", number, {}>;
1927
+ unseenAuthors: TypedField<"array", any[], {}>;
1928
+ isLastParticipant: TypedField<"bool", boolean, {}>;
1929
+ lastUpdatedAt: TypedField<"date", Date, {}>;
1930
+ snoozeUntil: TypedField<"date", Date, {
1931
+ readonly optional: true;
1932
+ }>;
1933
+ remindMeOn: TypedField<"date", Date, {
1934
+ readonly optional: true;
1935
+ }>;
1936
+ createdAt: TypedField<"date", Date, {}>;
1937
+ userId: TypedField<"belongsTo", UserId, {}>;
1938
+ resolvableId: TypedField<"belongsTo", ResolvableId, {}>;
1939
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1940
+ latestEntryId: TypedField<"belongsTo", ResolvableEntryId, {}>;
1941
+ latestSeenEntryId: TypedField<"belongsTo", ResolvableEntryId, {}>;
1942
+ }, {
1943
+ user: RelationEntry<"user", {
1944
+ readonly type: "belongsTo";
1945
+ readonly fk: "userId";
1946
+ }>;
1947
+ resolvable: RelationEntry<"resolvable", {
1948
+ readonly type: "belongsTo";
1949
+ readonly fk: "resolvableId";
1950
+ }>;
1951
+ account: RelationEntry<"account", {
1952
+ readonly type: "belongsTo";
1953
+ readonly fk: "accountId";
1954
+ }>;
1955
+ latestEntry: RelationEntry<"resolvableEntry", {
1956
+ readonly type: "belongsTo";
1957
+ readonly fk: "latestEntryId";
1958
+ }>;
1959
+ latestSeenEntry: RelationEntry<"resolvableEntry", {
1960
+ readonly type: "belongsTo";
1961
+ readonly fk: "latestSeenEntryId";
1962
+ }>;
1963
+ }, ["userId", "resolvableId"]>;
1964
+ resolvableParticipantHistory: ModelDesc<"resolvableParticipantHistory", {
1965
+ firstJoinedAt: TypedField<"string", string, {}>;
1966
+ done: TypedField<"string", string, {}>;
1967
+ status: TypedField<"string", string, {}>;
1968
+ lastChangedAt: TypedField<"date", Date, {}>;
1969
+ version: TypedField<"int", number, {}>;
1970
+ reaction: TypedField<"string", string, {}>;
1971
+ resolvableId: TypedField<"belongsTo", ResolvableId, {}>;
1972
+ userId: TypedField<"belongsTo", UserId, {}>;
1973
+ addedById: TypedField<"belongsTo", UserId, {}>;
1974
+ }, {
1975
+ resolvable: RelationEntry<"resolvable", {
1976
+ readonly type: "belongsTo";
1977
+ readonly fk: "resolvableId";
1978
+ }>;
1979
+ user: RelationEntry<"user", {
1980
+ readonly type: "belongsTo";
1981
+ readonly fk: "userId";
1982
+ }>;
1983
+ addedBy: RelationEntry<"user", {
1984
+ readonly type: "belongsTo";
1985
+ readonly fk: "addedById";
1986
+ }>;
1987
+ }, ["participantId", "resolvableId", "version"]>;
1988
+ resolvableParticipant: ModelDesc<"resolvableParticipant", {
1989
+ firstJoinedAt: TypedField<"date", Date, {}>;
1990
+ lastChangedAt: TypedField<"date", Date, {}>;
1991
+ done: TypedField<"bool", boolean, {}>;
1992
+ status: TypedField<"string", string, {}>;
1993
+ discordUserId: TypedField<"string", string, {}>;
1994
+ resolvableIsClosed: TypedField<"bool", boolean, {}>;
1995
+ resolvableId: TypedField<"belongsTo", ResolvableId, {}>;
1996
+ accountId: TypedField<"belongsTo", AccountId, {}>;
1997
+ userId: TypedField<"belongsTo", UserId, {}>;
1998
+ addedById: TypedField<"belongsTo", UserId, {}>;
1999
+ }, {
2000
+ resolvable: RelationEntry<"resolvable", {
2001
+ readonly type: "belongsTo";
2002
+ readonly fk: "resolvableId";
2003
+ }>;
2004
+ account: RelationEntry<"account", {
2005
+ readonly type: "belongsTo";
2006
+ readonly fk: "accountId";
2007
+ }>;
2008
+ user: RelationEntry<"user", {
2009
+ readonly type: "belongsTo";
2010
+ readonly fk: "userId";
2011
+ }>;
2012
+ addedBy: RelationEntry<"user", {
2013
+ readonly type: "belongsTo";
2014
+ readonly fk: "addedById";
2015
+ }>;
2016
+ }, ["participantId", "resolvableId"]>;
2017
+ resolvable: ModelDesc<"resolvable", {
2018
+ id: TypedField<"id", ResolvableId, {}>;
2019
+ context: TypedField<"string", string, {}>;
2020
+ contextAsPrio: TypedField<"int", number, {}>;
2021
+ isClosed: TypedField<"bool", boolean, {}>;
2022
+ closedAt: TypedField<"date", Date, {
2023
+ readonly optional: true;
2024
+ }>;
2025
+ createdAt: TypedField<"date", Date, {}>;
2026
+ isPublic: TypedField<"bool", boolean, {}>;
2027
+ cardId: TypedField<"belongsTo", CardId, {}>;
2028
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2029
+ creatorId: TypedField<"belongsTo", UserId, {}>;
2030
+ closedById: TypedField<"belongsTo", UserId, {
2031
+ readonly optional: true;
2032
+ }>;
2033
+ }, {
2034
+ card: RelationEntry<"card", {
2035
+ readonly type: "belongsTo";
2036
+ readonly fk: "cardId";
2037
+ }>;
2038
+ account: RelationEntry<"account", {
2039
+ readonly type: "belongsTo";
2040
+ readonly fk: "accountId";
2041
+ }>;
2042
+ creator: RelationEntry<"user", {
2043
+ readonly type: "belongsTo";
2044
+ readonly fk: "creatorId";
2045
+ }>;
2046
+ closedBy: RelationEntry<"user", {
2047
+ readonly type: "belongsTo";
2048
+ readonly fk: "closedById";
2049
+ }>;
2050
+ participants: RelationEntry<"resolvableParticipant", {
2051
+ readonly type: "hasMany";
2052
+ }>;
2053
+ participantHistories: RelationEntry<"resolvableParticipantHistory", {
2054
+ readonly type: "hasMany";
2055
+ }>;
2056
+ entries: RelationEntry<"resolvableEntry", {
2057
+ readonly type: "hasMany";
2058
+ }>;
2059
+ }, ["id"]>;
2060
+ savedSearch: ModelDesc<"savedSearch", {
2061
+ id: TypedField<"id", SavedSearchId, {}>;
2062
+ tokens: TypedField<"array", any[], {}>;
2063
+ forceOr: TypedField<"bool", boolean, {}>;
2064
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2065
+ ownerId: TypedField<"belongsTo", UserId, {}>;
2066
+ }, {
2067
+ account: RelationEntry<"account", {
2068
+ readonly type: "belongsTo";
2069
+ readonly fk: "accountId";
2070
+ }>;
2071
+ owner: RelationEntry<"user", {
2072
+ readonly type: "belongsTo";
2073
+ readonly fk: "ownerId";
2074
+ }>;
2075
+ }, ["id"]>;
2076
+ sprintConfigProgress: ModelDesc<"sprintConfigProgress", {
2077
+ progress: TypedField<"obj", any, {}>;
2078
+ sprintConfigId: TypedField<"belongsTo", SprintConfigId, {}>;
2079
+ }, {
2080
+ sprintConfig: RelationEntry<"sprintConfig", {
2081
+ readonly type: "belongsTo";
2082
+ readonly fk: "sprintConfigId";
2083
+ }>;
2084
+ }, ["sprintConfigId", "date"]>;
2085
+ sprintConfig: ModelDesc<"sprintConfig", {
2086
+ id: TypedField<"id", SprintConfigId, {}>;
2087
+ name: TypedField<"string", string, {}>;
2088
+ color: TypedField<"string", string, {}>;
2089
+ stopOn: TypedField<"day", {
2090
+ day: number;
2091
+ month: number;
2092
+ year: number;
2093
+ }, {
2094
+ readonly optional: true;
2095
+ }>;
2096
+ isGlobal: TypedField<"string", string, {}>;
2097
+ upcomingSprints: TypedField<"int", number, {}>;
2098
+ sprintDurationWeeks: TypedField<"int", number, {}>;
2099
+ sprintStartWeekday: TypedField<"int", number, {}>;
2100
+ endHour: TypedField<"int", number, {}>;
2101
+ endHourTimezone: TypedField<"string", string, {}>;
2102
+ createdAt: TypedField<"date", Date, {}>;
2103
+ preferredOrder: TypedField<"string", string, {
2104
+ readonly optional: true;
2105
+ }>;
2106
+ moveOnFinish: TypedField<"string", string, {}>;
2107
+ autoBeastModeDurationHours: TypedField<"int", number, {
2108
+ readonly optional: true;
2109
+ }>;
2110
+ autoAssignStartedCard: TypedField<"bool", boolean, {}>;
2111
+ autoAssignNewCard: TypedField<"bool", boolean, {}>;
2112
+ beastGracePeriodHours: TypedField<"int", number, {}>;
2113
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2114
+ creatorId: TypedField<"belongsTo", UserId, {}>;
2115
+ }, {
2116
+ account: RelationEntry<"account", {
2117
+ readonly type: "belongsTo";
2118
+ readonly fk: "accountId";
2119
+ }>;
2120
+ creator: RelationEntry<"user", {
2121
+ readonly type: "belongsTo";
2122
+ readonly fk: "creatorId";
2123
+ }>;
2124
+ sprintProjects: RelationEntry<"sprintProject", {
2125
+ readonly type: "hasMany";
2126
+ }>;
2127
+ sprints: RelationEntry<"sprint", {
2128
+ readonly type: "hasMany";
2129
+ }>;
2130
+ progress: RelationEntry<"sprintConfigProgress", {
2131
+ readonly type: "hasMany";
2132
+ }>;
2133
+ }, ["id"]>;
2134
+ sprintProgress: ModelDesc<"sprintProgress", {
2135
+ progress: TypedField<"obj", any, {}>;
2136
+ sprintId: TypedField<"belongsTo", SprintId, {}>;
2137
+ }, {
2138
+ sprint: RelationEntry<"sprint", {
2139
+ readonly type: "belongsTo";
2140
+ readonly fk: "sprintId";
2141
+ }>;
2142
+ }, ["sprintId", "date"]>;
2143
+ sprintProject: ModelDesc<"sprintProject", {
2144
+ sprintConfigId: TypedField<"belongsTo", SprintConfigId, {}>;
2145
+ projectId: TypedField<"belongsTo", ProjectId, {}>;
2146
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2147
+ }, {
2148
+ sprintConfig: RelationEntry<"sprintConfig", {
2149
+ readonly type: "belongsTo";
2150
+ readonly fk: "sprintConfigId";
2151
+ }>;
2152
+ project: RelationEntry<"project", {
2153
+ readonly type: "belongsTo";
2154
+ readonly fk: "projectId";
2155
+ }>;
2156
+ account: RelationEntry<"account", {
2157
+ readonly type: "belongsTo";
2158
+ readonly fk: "accountId";
2159
+ }>;
2160
+ }, ["sprintConfigId", "projectId"]>;
2161
+ sprint: ModelDesc<"sprint", {
2162
+ id: TypedField<"id", SprintId, {}>;
2163
+ description: TypedField<"string", string, {}>;
2164
+ name: TypedField<"string", string, {
2165
+ readonly optional: true;
2166
+ }>;
2167
+ accountSeq: TypedField<"int", number, {}>;
2168
+ index: TypedField<"int", number, {}>;
2169
+ startDate: TypedField<"day", {
2170
+ day: number;
2171
+ month: number;
2172
+ year: number;
2173
+ }, {}>;
2174
+ endDate: TypedField<"day", {
2175
+ day: number;
2176
+ month: number;
2177
+ year: number;
2178
+ }, {}>;
2179
+ stats: TypedField<"obj", any, {}>;
2180
+ manualOrderLabels: TypedField<"string", string, {}>;
2181
+ userCapacities: TypedField<"obj", any, {}>;
2182
+ handSyncEnabled: TypedField<"string", string, {}>;
2183
+ createdAt: TypedField<"date", Date, {}>;
2184
+ isDeleted: TypedField<"bool", boolean, {}>;
2185
+ completedAt: TypedField<"date", Date, {
2186
+ readonly optional: true;
2187
+ }>;
2188
+ lockedAt: TypedField<"date", Date, {
2189
+ readonly optional: true;
2190
+ }>;
2191
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2192
+ sprintConfigId: TypedField<"belongsTo", SprintConfigId, {}>;
2193
+ creatorId: TypedField<"belongsTo", UserId, {}>;
2194
+ coverFileId: TypedField<"belongsTo", FileId, {
2195
+ readonly optional: true;
2196
+ }>;
2197
+ autoMilestoneId: TypedField<"belongsTo", MilestoneId, {
2198
+ readonly optional: true;
2199
+ }>;
2200
+ }, {
2201
+ account: RelationEntry<"account", {
2202
+ readonly type: "belongsTo";
2203
+ readonly fk: "accountId";
2204
+ }>;
2205
+ sprintConfig: RelationEntry<"sprintConfig", {
2206
+ readonly type: "belongsTo";
2207
+ readonly fk: "sprintConfigId";
2208
+ }>;
2209
+ creator: RelationEntry<"user", {
2210
+ readonly type: "belongsTo";
2211
+ readonly fk: "creatorId";
2212
+ }>;
2213
+ coverFile: RelationEntry<"file", {
2214
+ readonly type: "belongsTo";
2215
+ readonly fk: "coverFileId";
2216
+ }>;
2217
+ autoMilestone: RelationEntry<"milestone", {
2218
+ readonly type: "belongsTo";
2219
+ readonly fk: "autoMilestoneId";
2220
+ }>;
2221
+ cards: RelationEntry<"card", {
2222
+ readonly type: "hasMany";
2223
+ }>;
2224
+ progress: RelationEntry<"sprintProgress", {
2225
+ readonly type: "hasMany";
2226
+ }>;
2227
+ activities: RelationEntry<"activity", {
2228
+ readonly type: "hasMany";
2229
+ }>;
2230
+ }, ["id"]>;
2231
+ stripeAccountSync: ModelDesc<"stripeAccountSync", {
2232
+ status: TypedField<"string", string, {}>;
2233
+ euVatIdData: TypedField<"obj", any, {}>;
2234
+ vatCountryCode: TypedField<"string", string, {}>;
2235
+ vatTaxPercentage: TypedField<"int", number, {}>;
2236
+ centsPerSeat: TypedField<"int", number, {}>;
2237
+ billingCycleStart: TypedField<"date", Date, {}>;
2238
+ billingCycleEnd: TypedField<"date", Date, {}>;
2239
+ grossActualBalance: TypedField<"int", number, {}>;
2240
+ grossBonusBalance: TypedField<"int", number, {}>;
2241
+ netGiftBalance: TypedField<"int", number, {}>;
2242
+ paymentMethod: TypedField<"obj", any, {}>;
2243
+ hasBeenCancelledAt: TypedField<"date", Date, {}>;
2244
+ planType: TypedField<"string", string, {}>;
2245
+ planName: TypedField<"string", string, {}>;
2246
+ pendingPlanType: TypedField<"string", string, {}>;
2247
+ repeatingCoupon: TypedField<"obj", any, {}>;
2248
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2249
+ }, {
2250
+ account: RelationEntry<"account", {
2251
+ readonly type: "belongsTo";
2252
+ readonly fk: "accountId";
2253
+ }>;
2254
+ }, ["accountId"]>;
2255
+ timeTrackingSegment: ModelDesc<"timeTrackingSegment", {
2256
+ id: TypedField<"id", TimeTrackingSegmentId, {}>;
2257
+ createdAt: TypedField<"date", Date, {}>;
2258
+ finishedAt: TypedField<"date", Date, {
2259
+ readonly optional: true;
2260
+ }>;
2261
+ startedAt: TypedField<"date", Date, {}>;
2262
+ modifyDurationMsBy: TypedField<"int", number, {}>;
2263
+ addedManually: TypedField<"string", string, {}>;
2264
+ autoFinishedState: TypedField<"string", string, {}>;
2265
+ cardId: TypedField<"belongsTo", CardId, {}>;
2266
+ userId: TypedField<"belongsTo", UserId, {}>;
2267
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2268
+ }, {
2269
+ card: RelationEntry<"card", {
2270
+ readonly type: "belongsTo";
2271
+ readonly fk: "cardId";
2272
+ }>;
2273
+ user: RelationEntry<"user", {
2274
+ readonly type: "belongsTo";
2275
+ readonly fk: "userId";
2276
+ }>;
2277
+ account: RelationEntry<"account", {
2278
+ readonly type: "belongsTo";
2279
+ readonly fk: "accountId";
2280
+ }>;
2281
+ }, ["id"]>;
2282
+ timeTrackingSum: ModelDesc<"timeTrackingSum", {
2283
+ sumMs: TypedField<"int", number, {}>;
2284
+ runningStartedAt: TypedField<"date", Date, {}>;
2285
+ runningModifyDurationMsBy: TypedField<"int", number, {}>;
2286
+ cardId: TypedField<"belongsTo", CardId, {}>;
2287
+ userId: TypedField<"belongsTo", UserId, {}>;
2288
+ }, {
2289
+ card: RelationEntry<"card", {
2290
+ readonly type: "belongsTo";
2291
+ readonly fk: "cardId";
2292
+ }>;
2293
+ user: RelationEntry<"user", {
2294
+ readonly type: "belongsTo";
2295
+ readonly fk: "userId";
2296
+ }>;
2297
+ }, ["cardId", "userId"]>;
2298
+ userDismissedHint: ModelDesc<"userDismissedHint", {
2299
+ hintKey: TypedField<"string", string, {}>;
2300
+ createdAt: TypedField<"date", Date, {}>;
2301
+ returnAt: TypedField<"date", Date, {}>;
2302
+ userId: TypedField<"belongsTo", UserId, {}>;
2303
+ }, {
2304
+ user: RelationEntry<"user", {
2305
+ readonly type: "belongsTo";
2306
+ readonly fk: "userId";
2307
+ }>;
2308
+ }, ["userId", "hintKey"]>;
2309
+ userEmail: ModelDesc<"userEmail", {
2310
+ id: TypedField<"id", UserEmailId, {}>;
2311
+ email: TypedField<"string", string, {}>;
2312
+ createdAt: TypedField<"date", Date, {}>;
2313
+ isPrimary: TypedField<"bool", boolean, {}>;
2314
+ isVerified: TypedField<"bool", boolean, {}>;
2315
+ userId: TypedField<"belongsTo", UserId, {}>;
2316
+ }, {
2317
+ user: RelationEntry<"user", {
2318
+ readonly type: "belongsTo";
2319
+ readonly fk: "userId";
2320
+ }>;
2321
+ }, ["id"]>;
2322
+ userInvitation: ModelDesc<"userInvitation", {
2323
+ id: TypedField<"id", UserInvitationId, {}>;
2324
+ email: TypedField<"string", string, {}>;
2325
+ role: TypedField<"string", string, {}>;
2326
+ accessToProjectIds: TypedField<"array", any[], {}>;
2327
+ createdAt: TypedField<"date", Date, {}>;
2328
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2329
+ inviterId: TypedField<"belongsTo", UserId, {}>;
2330
+ }, {
2331
+ account: RelationEntry<"account", {
2332
+ readonly type: "belongsTo";
2333
+ readonly fk: "accountId";
2334
+ }>;
2335
+ inviter: RelationEntry<"user", {
2336
+ readonly type: "belongsTo";
2337
+ readonly fk: "inviterId";
2338
+ }>;
2339
+ }, ["id"]>;
2340
+ userInviteCode: ModelDesc<"userInviteCode", {
2341
+ id: TypedField<"id", UserInviteCodeId, {}>;
2342
+ token: TypedField<"string", string, {}>;
2343
+ role: TypedField<"string", string, {}>;
2344
+ useCount: TypedField<"string", string, {}>;
2345
+ isActive: TypedField<"string", string, {}>;
2346
+ accessToProjectIds: TypedField<"array", any[], {}>;
2347
+ validUntil: TypedField<"date", Date, {}>;
2348
+ createdAt: TypedField<"date", Date, {}>;
2349
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2350
+ creatorId: TypedField<"belongsTo", UserId, {}>;
2351
+ }, {
2352
+ account: RelationEntry<"account", {
2353
+ readonly type: "belongsTo";
2354
+ readonly fk: "accountId";
2355
+ }>;
2356
+ creator: RelationEntry<"user", {
2357
+ readonly type: "belongsTo";
2358
+ readonly fk: "creatorId";
2359
+ }>;
2360
+ }, ["id"]>;
2361
+ userOnboarding: ModelDesc<"userOnboarding", {
2362
+ steps: TypedField<"obj", any, {}>;
2363
+ userId: TypedField<"belongsTo", UserId, {}>;
2364
+ }, {
2365
+ user: RelationEntry<"user", {
2366
+ readonly type: "belongsTo";
2367
+ readonly fk: "userId";
2368
+ }>;
2369
+ }, ["userId"]>;
2370
+ userProjectAccess: ModelDesc<"userProjectAccess", {
2371
+ role: TypedField<"string", string, {}>;
2372
+ projectRole: TypedField<"string", string, {}>;
2373
+ userId: TypedField<"belongsTo", UserId, {}>;
2374
+ projectId: TypedField<"belongsTo", ProjectId, {}>;
2375
+ }, {
2376
+ user: RelationEntry<"user", {
2377
+ readonly type: "belongsTo";
2378
+ readonly fk: "userId";
2379
+ }>;
2380
+ project: RelationEntry<"project", {
2381
+ readonly type: "belongsTo";
2382
+ readonly fk: "projectId";
2383
+ }>;
2384
+ }, ["projectId", "userId"]>;
2385
+ userTag: ModelDesc<"userTag", {
2386
+ id: TypedField<"id", UserTagId, {}>;
2387
+ tag: TypedField<"string", string, {}>;
2388
+ createdAt: TypedField<"date", Date, {}>;
2389
+ userId: TypedField<"belongsTo", UserId, {}>;
2390
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2391
+ }, {
2392
+ user: RelationEntry<"user", {
2393
+ readonly type: "belongsTo";
2394
+ readonly fk: "userId";
2395
+ }>;
2396
+ account: RelationEntry<"account", {
2397
+ readonly type: "belongsTo";
2398
+ readonly fk: "accountId";
2399
+ }>;
2400
+ }, ["id"]>;
2401
+ user: ModelDesc<"user", {
2402
+ id: TypedField<"id", UserId, {}>;
2403
+ name: TypedField<"string", string, {}>;
2404
+ fullName: TypedField<"string", string, {
2405
+ readonly optional: true;
2406
+ }>;
2407
+ timezone: TypedField<"string", string, {
2408
+ readonly optional: true;
2409
+ }>;
2410
+ createdAt: TypedField<"date", Date, {}>;
2411
+ hasPassword: TypedField<"bool", boolean, {}>;
2412
+ showCardIdInTimer: TypedField<"bool", boolean, {}>;
2413
+ disableMovingImages: TypedField<"bool", boolean, {}>;
2414
+ autoMeFilterCardLimit: TypedField<"int", number, {
2415
+ readonly optional: true;
2416
+ }>;
2417
+ isIntegration: TypedField<"bool", boolean, {}>;
2418
+ statusColorPalette: TypedField<"string", string, {}>;
2419
+ wantsNewsletter: TypedField<"bool", boolean, {
2420
+ readonly optional: true;
2421
+ }>;
2422
+ wantsDailyDigestMail: TypedField<"bool", boolean, {
2423
+ readonly optional: true;
2424
+ }>;
2425
+ wantsConvoDigestMail: TypedField<"bool", boolean, {
2426
+ readonly optional: true;
2427
+ }>;
2428
+ disableAnimations: TypedField<"bool", boolean, {}>;
2429
+ enableClickToEditCards: TypedField<"bool", boolean, {}>;
2430
+ cdxRole: TypedField<"string", string, {}>;
2431
+ profileImageId: TypedField<"belongsTo", FileId, {
2432
+ readonly optional: true;
2433
+ }>;
2434
+ lastSeenReleaseId: TypedField<"belongsTo", ReleaseId, {}>;
2435
+ }, {
2436
+ profileImage: RelationEntry<"file", {
2437
+ readonly type: "belongsTo";
2438
+ readonly fk: "profileImageId";
2439
+ }>;
2440
+ lastSeenRelease: RelationEntry<"release", {
2441
+ readonly type: "belongsTo";
2442
+ readonly fk: "lastSeenReleaseId";
2443
+ }>;
2444
+ projectOrders: RelationEntry<"projectOrder", {
2445
+ readonly type: "hasMany";
2446
+ }>;
2447
+ projectSelections: RelationEntry<"projectSelection", {
2448
+ readonly type: "hasMany";
2449
+ }>;
2450
+ queueSelections: RelationEntry<"queueSelection", {
2451
+ readonly type: "hasMany";
2452
+ }>;
2453
+ accountRoles: RelationEntry<"accountRole", {
2454
+ readonly type: "hasMany";
2455
+ }>;
2456
+ cardDiffNotifications: RelationEntry<"cardDiffNotification", {
2457
+ readonly type: "hasMany";
2458
+ }>;
2459
+ resolvableNotifications: RelationEntry<"resolvableNotification", {
2460
+ readonly type: "hasMany";
2461
+ }>;
2462
+ publicProjectMembership: RelationEntry<"publicProjectMembership", {
2463
+ readonly type: "hasMany";
2464
+ }>;
2465
+ lastSeenCardUpvotes: RelationEntry<"lastSeenCardUpvote", {
2466
+ readonly type: "hasMany";
2467
+ }>;
2468
+ dueCards: RelationEntry<"dueCard", {
2469
+ readonly type: "hasMany";
2470
+ }>;
2471
+ assigneeDeckAssignments: RelationEntry<"assigneeDeckAssignment", {
2472
+ readonly type: "hasMany";
2473
+ }>;
2474
+ autoFinishedTimeTrackingSegments: RelationEntry<"autoFinishedTimeTrackingSegment", {
2475
+ readonly type: "hasMany";
2476
+ }>;
2477
+ savedSearches: RelationEntry<"savedSearch", {
2478
+ readonly type: "hasMany";
2479
+ }>;
2480
+ activities: RelationEntry<"activity", {
2481
+ readonly type: "hasMany";
2482
+ }>;
2483
+ emails: RelationEntry<"userEmail", {
2484
+ readonly type: "hasMany";
2485
+ }>;
2486
+ tags: RelationEntry<"userTag", {
2487
+ readonly type: "hasMany";
2488
+ }>;
2489
+ unverifiedEmails: RelationEntry<"userEmail", {
2490
+ readonly type: "hasMany";
2491
+ }>;
2492
+ primaryEmail: RelationEntry<"userEmail", {
2493
+ readonly type: "hasOne";
2494
+ }>;
2495
+ pinnedMilestoneNext: RelationEntry<"pinnedMilestone", {
2496
+ readonly type: "hasOne";
2497
+ }>;
2498
+ projectAccess: RelationEntry<"projectUser", {
2499
+ readonly type: "hasMany";
2500
+ }>;
2501
+ explicitProjectAccess: RelationEntry<"projectUser", {
2502
+ readonly type: "hasMany";
2503
+ }>;
2504
+ withProjectAccess: RelationEntry<"userProjectAccess", {
2505
+ readonly type: "hasMany";
2506
+ }>;
2507
+ projectSettings: RelationEntry<"projectUserSetting", {
2508
+ readonly type: "hasMany";
2509
+ }>;
2510
+ accountSettings: RelationEntry<"accountUserSetting", {
2511
+ readonly type: "hasMany";
2512
+ }>;
2513
+ dismissedHints: RelationEntry<"userDismissedHint", {
2514
+ readonly type: "hasMany";
2515
+ }>;
2516
+ slackIntegrations: RelationEntry<"integration", {
2517
+ readonly type: "hasMany";
2518
+ }>;
2519
+ activeTimeTracker: RelationEntry<"activeTimeTracker", {
2520
+ readonly type: "hasOne";
2521
+ }>;
2522
+ participations: RelationEntry<"resolvableParticipant", {
2523
+ readonly type: "hasMany";
2524
+ }>;
2525
+ upvotes: RelationEntry<"cardUpvote", {
2526
+ readonly type: "hasMany";
2527
+ }>;
2528
+ userOnboarding: RelationEntry<"userOnboarding", {
2529
+ readonly type: "hasOne";
2530
+ }>;
2531
+ }, ["id"]>;
2532
+ userReportEmail: ModelDesc<"userReportEmail", {
2533
+ id: TypedField<"id", UserReportEmailId, {}>;
2534
+ email: TypedField<"string", string, {}>;
2535
+ createdAt: TypedField<"date", Date, {}>;
2536
+ enabled: TypedField<"string", string, {}>;
2537
+ userReportSettingId: TypedField<"belongsTo", UserReportSettingId, {}>;
2538
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2539
+ }, {
2540
+ userReportSetting: RelationEntry<"userReportSetting", {
2541
+ readonly type: "belongsTo";
2542
+ readonly fk: "userReportSettingId";
2543
+ }>;
2544
+ account: RelationEntry<"account", {
2545
+ readonly type: "belongsTo";
2546
+ readonly fk: "accountId";
2547
+ }>;
2548
+ }, ["id"]>;
2549
+ userReportSetting: ModelDesc<"userReportSetting", {
2550
+ id: TypedField<"id", UserReportSettingId, {}>;
2551
+ name: TypedField<"string", string, {}>;
2552
+ fileSizeBytesLimit: TypedField<"bigint", bigint, {}>;
2553
+ createdAt: TypedField<"date", Date, {}>;
2554
+ deckMapping: TypedField<"obj", any, {}>;
2555
+ prioMapping: TypedField<"obj", any, {}>;
2556
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2557
+ }, {
2558
+ account: RelationEntry<"account", {
2559
+ readonly type: "belongsTo";
2560
+ readonly fk: "accountId";
2561
+ }>;
2562
+ reportTokens: RelationEntry<"userReportToken", {
2563
+ readonly type: "hasMany";
2564
+ }>;
2565
+ }, ["id"]>;
2566
+ userReportToken: ModelDesc<"userReportToken", {
2567
+ token: TypedField<"id", UserReportTokenId, {}>;
2568
+ label: TypedField<"string", string, {}>;
2569
+ reportCount: TypedField<"int", number, {}>;
2570
+ createdAt: TypedField<"date", Date, {}>;
2571
+ enabled: TypedField<"string", string, {}>;
2572
+ userReportSettingId: TypedField<"belongsTo", UserReportSettingId, {}>;
2573
+ }, {
2574
+ userReportSetting: RelationEntry<"userReportSetting", {
2575
+ readonly type: "belongsTo";
2576
+ readonly fk: "userReportSettingId";
2577
+ }>;
2578
+ }, ["token"]>;
2579
+ visionBoardQuery: ModelDesc<"visionBoardQuery", {
2580
+ id: TypedField<"id", VisionBoardQueryId, {}>;
2581
+ query: TypedField<"obj", any, {}>;
2582
+ lastUsedAt: TypedField<"date", Date, {}>;
2583
+ isStale: TypedField<"bool", boolean, {}>;
2584
+ type: TypedField<"string", string, {}>;
2585
+ payload: TypedField<"obj", any, {}>;
2586
+ createdAt: TypedField<"date", Date, {}>;
2587
+ cardId: TypedField<"belongsTo", CardId, {}>;
2588
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2589
+ }, {
2590
+ card: RelationEntry<"card", {
2591
+ readonly type: "belongsTo";
2592
+ readonly fk: "cardId";
2593
+ }>;
2594
+ account: RelationEntry<"account", {
2595
+ readonly type: "belongsTo";
2596
+ readonly fk: "accountId";
2597
+ }>;
2598
+ }, ["id"]>;
2599
+ visionBoard: ModelDesc<"visionBoard", {
2600
+ id: TypedField<"id", VisionBoardId, {}>;
2601
+ accountSeq: TypedField<"int", number, {}>;
2602
+ createdAt: TypedField<"date", Date, {}>;
2603
+ isDeleted: TypedField<"bool", boolean, {}>;
2604
+ cardId: TypedField<"belongsTo", CardId, {}>;
2605
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2606
+ creatorId: TypedField<"belongsTo", UserId, {}>;
2607
+ }, {
2608
+ card: RelationEntry<"card", {
2609
+ readonly type: "belongsTo";
2610
+ readonly fk: "cardId";
2611
+ }>;
2612
+ account: RelationEntry<"account", {
2613
+ readonly type: "belongsTo";
2614
+ readonly fk: "accountId";
2615
+ }>;
2616
+ creator: RelationEntry<"user", {
2617
+ readonly type: "belongsTo";
2618
+ readonly fk: "creatorId";
2619
+ }>;
2620
+ }, ["id"]>;
2621
+ wizard: ModelDesc<"wizard", {
2622
+ id: TypedField<"id", WizardId, {}>;
2623
+ name: TypedField<"string", string, {}>;
2624
+ currentStep: TypedField<"string", string, {}>;
2625
+ data: TypedField<"obj", any, {}>;
2626
+ createdAt: TypedField<"date", Date, {}>;
2627
+ finishedAt: TypedField<"date", Date, {}>;
2628
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2629
+ }, {
2630
+ account: RelationEntry<"account", {
2631
+ readonly type: "belongsTo";
2632
+ readonly fk: "accountId";
2633
+ }>;
2634
+ }, ["id"]>;
2635
+ workflowItemHistory: ModelDesc<"workflowItemHistory", {
2636
+ diff: TypedField<"obj", any, {}>;
2637
+ versionCreatedAt: TypedField<"date", Date, {}>;
2638
+ version: TypedField<"int", number, {}>;
2639
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2640
+ changerId: TypedField<"belongsTo", UserId, {}>;
2641
+ }, {
2642
+ account: RelationEntry<"account", {
2643
+ readonly type: "belongsTo";
2644
+ readonly fk: "accountId";
2645
+ }>;
2646
+ changer: RelationEntry<"user", {
2647
+ readonly type: "belongsTo";
2648
+ readonly fk: "changerId";
2649
+ }>;
2650
+ }, ["itemId", "version"]>;
2651
+ workflowItem: ModelDesc<"workflowItem", {
2652
+ itemId: TypedField<"id", WorkflowItemId, {}>;
2653
+ version: TypedField<"string", string, {}>;
2654
+ sortOrder: TypedField<"string", string, {}>;
2655
+ sortValue: TypedField<"string", string, {}>;
2656
+ priority: TypedField<"string", string, {
2657
+ readonly optional: true;
2658
+ }>;
2659
+ content: TypedField<"string", string, {}>;
2660
+ createdAt: TypedField<"date", Date, {}>;
2661
+ lastUpdatedAt: TypedField<"date", Date, {}>;
2662
+ tags: TypedField<"array", any[], {}>;
2663
+ masterTags: TypedField<"array", any[], {}>;
2664
+ mentionedUsers: TypedField<"array", any[], {}>;
2665
+ title: TypedField<"string", string, {}>;
2666
+ effort: TypedField<"int", number, {
2667
+ readonly optional: true;
2668
+ }>;
2669
+ label: TypedField<"string", string, {
2670
+ readonly optional: true;
2671
+ }>;
2672
+ checkboxStats: TypedField<"obj", any, {}>;
2673
+ accountSeq: TypedField<"int", number, {}>;
2674
+ checkboxInfo: TypedField<"array", any[], {}>;
2675
+ visibility: TypedField<"string", string, {}>;
2676
+ accountId: TypedField<"belongsTo", AccountId, {}>;
2677
+ deckId: TypedField<"belongsTo", DeckId, {}>;
2678
+ targetDeckId: TypedField<"belongsTo", DeckId, {
2679
+ readonly optional: true;
2680
+ }>;
2681
+ assigneeId: TypedField<"belongsTo", UserId, {
2682
+ readonly optional: true;
2683
+ }>;
2684
+ creatorId: TypedField<"belongsTo", UserId, {}>;
2685
+ }, {
2686
+ account: RelationEntry<"account", {
2687
+ readonly type: "belongsTo";
2688
+ readonly fk: "accountId";
2689
+ }>;
2690
+ deck: RelationEntry<"deck", {
2691
+ readonly type: "belongsTo";
2692
+ readonly fk: "deckId";
2693
+ }>;
2694
+ targetDeck: RelationEntry<"deck", {
2695
+ readonly type: "belongsTo";
2696
+ readonly fk: "targetDeckId";
2697
+ }>;
2698
+ assignee: RelationEntry<"user", {
2699
+ readonly type: "belongsTo";
2700
+ readonly fk: "assigneeId";
2701
+ }>;
2702
+ creator: RelationEntry<"user", {
2703
+ readonly type: "belongsTo";
2704
+ readonly fk: "creatorId";
2705
+ }>;
2706
+ diffs: RelationEntry<"workflowItemHistory", {
2707
+ readonly type: "hasMany";
2708
+ }>;
2709
+ inDeps: RelationEntry<"workflowItem", {
2710
+ readonly type: "hasMany";
2711
+ }>;
2712
+ outDeps: RelationEntry<"workflowItem", {
2713
+ readonly type: "hasMany";
2714
+ }>;
2715
+ }, ["itemId"]>;
2716
+ };
2717
+ //#endregion
2718
+ //#region src/has-many-filter-type.d.ts
2719
+ type ModelMap$2 = Record<string, AnyDesc>;
2720
+ type OneOrArray<T> = T | T[];
2721
+ type NormalAndNegatedKeys<T> = T & { [K in keyof T & string as `!${K}`]: T[K] };
2722
+ type OrderString<T extends string> = `${T}` | `-${T}`;
2723
+ type OrderExpr<T> = {
2724
+ field: T;
2725
+ dir: "asc" | "desc";
2726
+ };
2727
+ type Order<T extends AnyDesc> = OneOrArray<OrderString<keyof T["fields"] extends string ? keyof T["fields"] : never>> | OneOrArray<OrderExpr<T["fields"]>>;
2728
+ type Operators<T> = {
2729
+ op: "lt" | "lte" | "gt" | "gte";
2730
+ value: T;
2731
+ } | {
2732
+ op: "eq" | "neq";
2733
+ value: T | null;
2734
+ } | {
2735
+ op: "in" | "notIn";
2736
+ value: T[];
2737
+ } | (T extends string ? {
2738
+ op: "contains";
2739
+ value: string;
2740
+ } : never) | (T extends Array<infer El> ? {
2741
+ op: "has";
2742
+ value: El;
2743
+ } | {
2744
+ op: "overlaps";
2745
+ value: El[];
2746
+ } : never);
2747
+ type FieldQuery<T extends AnyDesc> = { [K in keyof T["fields"]]?: null | OneOrArray<InferFieldType<T["fields"][K]>> | Operators<InferFieldType<T["fields"][K]>> };
2748
+ type RelationQuery<T extends AnyDesc, TMap extends ModelMap$2> = NormalAndNegatedKeys<{ [K in keyof T["relations"]]?: SimpleFilter<TMap[T["relations"][K]["relName"]], TMap> }>;
2749
+ type SimpleFilter<T extends AnyDesc, TMap extends ModelMap$2> = FieldQuery<T> | RelationQuery<T, TMap>;
2750
+ type Filter<T extends AnyDesc, TMap extends ModelMap$2> = SimpleFilter<T, TMap> & {
2751
+ $and?: Filter<T, TMap>[];
2752
+ $or?: Filter<T, TMap>[];
2753
+ };
2754
+ //#endregion
2755
+ //#region src/query-type.d.ts
2756
+ type ModelMap$1 = Record<string, AnyDesc>;
2757
+ interface ModelQuery<T extends AnyDesc, TMap extends ModelMap$1> {
2758
+ fields?: (keyof T["fields"])[];
2759
+ relations?: RelQuery<T, TMap>;
2760
+ }
2761
+ interface SimpleHasManyQuery<T extends AnyDesc, TMap extends ModelMap$1> extends ModelQuery<T, TMap> {
2762
+ type?: "query";
2763
+ orderBy?: Order<T>;
2764
+ limit?: number;
2765
+ offset?: number;
2766
+ filter?: Filter<T, TMap>;
2767
+ as?: string;
2768
+ }
2769
+ interface CountOrExistQuery<T extends AnyDesc, TMap extends ModelMap$1> {
2770
+ type: "count" | "exists";
2771
+ filter?: Filter<T, TMap>;
2772
+ as: string;
2773
+ fields?: never;
2774
+ relations?: never;
2775
+ }
2776
+ interface FirstOrLastQuery<T extends AnyDesc, TMap extends ModelMap$1> extends ModelQuery<T, TMap> {
2777
+ type: "first";
2778
+ filter?: Filter<T, TMap>;
2779
+ as: string;
2780
+ orderBy: Order<T>;
2781
+ }
2782
+ type HasManyQuery<T extends AnyDesc, TMap extends ModelMap$1> = SimpleHasManyQuery<T, TMap> | CountOrExistQuery<T, TMap> | FirstOrLastQuery<T, TMap>;
2783
+ type AbstractHasManyQuery = (ModelQuery<any, any> & {
2784
+ type?: "query" | "first";
2785
+ as?: string;
2786
+ }) | {
2787
+ type: "count" | "exists";
2788
+ as: string;
2789
+ };
2790
+ type HasManyQueryWithAs<T extends AnyDesc, TMap extends ModelMap$1> = HasManyQuery<T, TMap> & {
2791
+ as: string;
2792
+ };
2793
+ type HasManyRelQueryEntry<T extends AnyDesc, TMap extends ModelMap$1, K extends keyof ExtractHasMany<T, TMap>> = HasManyQuery<TMap[T["relations"][K]["relName"]], TMap> | HasManyQueryWithAs<TMap[T["relations"][K]["relName"]], TMap>[];
2794
+ type RelQueryEntry<T extends AnyDesc, TMap extends ModelMap$1, K extends keyof T["relations"]> = K extends keyof ExtractHasMany<T, TMap> ? HasManyRelQueryEntry<T, TMap, K> : ModelQuery<TMap[T["relations"][K]["relName"]], TMap>;
2795
+ /**
2796
+ * examples for account:
2797
+ * {disabledBy: {fields: []}} // belongst
2798
+ * {cards: {fields: []}}
2799
+ * {cards: [{as: "myCards", fields: []}]}
2800
+ */
2801
+ type RelQuery<T extends AnyDesc, TMap extends ModelMap$1> = { [K in keyof T["relations"]]?: RelQueryEntry<T, TMap, K> };
2802
+ type EnsureModelQuery<T> = T extends ModelQuery<any, any> ? T : never;
2803
+ type EnsureHasManyQuery<T> = T extends AbstractHasManyQuery ? T : never;
2804
+ type EnrichBelongsTo<M extends AnyDesc, TMap extends ModelMap$1> = FilterNeverKeys<{ [K in keyof M["relations"]]: M["relations"][K] extends RelationEntry<any, infer Opts> ? Opts extends BelongsToOpts<infer TFk> ? {
2805
+ model: TMap[M["relations"][K]["relName"]];
2806
+ fk: TFk;
2807
+ field: M["fields"][TFk] extends TypedField<"belongsTo", infer FieldType, infer FieldOpts> ? {
2808
+ type: FieldType;
2809
+ } & FieldOpts : never;
2810
+ } : never : never }>;
2811
+ type ExtractHasMany<M extends AnyDesc, TMap extends ModelMap$1> = FilterNeverKeys<{ [K in keyof M["relations"]]: M["relations"][K] extends RelationEntry<infer RelName, {
2812
+ type: "hasMany";
2813
+ }> ? {
2814
+ model: TMap[RelName];
2815
+ } : never }>;
2816
+ type ExtractHasOne<M extends AnyDesc, TMap extends ModelMap$1> = FilterNeverKeys<{ [K in keyof M["relations"]]: M["relations"][K] extends RelationEntry<infer RelName, {
2817
+ type: "hasOne";
2818
+ }> ? {
2819
+ model: TMap[RelName];
2820
+ } : never }>;
2821
+ type InferModelQuery<M extends AnyDesc, Q extends ModelQuery<M, TMap>, TMap extends ModelMap$1> = (Q["fields"] extends (keyof M["fields"])[] ? { [K in Q["fields"][number]]: InferFieldType<M["fields"][K]> } : {}) & (Q["relations"] extends RelQuery<M, TMap> ? InferRelQuery<M, Q["relations"], TMap> : {}) & { [K in M["keys"][number] & string]: InferFieldType<M["fields"][K]> } & {
2822
+ "~model": M["name"];
2823
+ "~key": string;
2824
+ };
2825
+ type IsOptional<T, Test> = Test extends true ? T | null : T;
2826
+ type EmptyObjIfNever<T> = [T] extends [never] ? {} : T;
2827
+ type ExtractRelQueryArray<M extends AnyDesc, TMap extends ModelMap$1, Q extends RelQuery<M, TMap>> = { [K in keyof Q]: K extends keyof ExtractHasMany<M, TMap> ? Q[K] extends HasManyQueryWithAs<any, any>[] ? { [Item in Q[K][number] as Item["as"]]: InferHasMany<ExtractHasMany<M, TMap>[K]["model"], TMap, Item> } : never : never }[keyof Q];
2828
+ type InferHasMany<M extends AnyDesc, TMap extends ModelMap$1, QM extends HasManyQuery<M, TMap>> = QM extends {
2829
+ type: "count";
2830
+ } ? number : QM extends {
2831
+ type: "exist";
2832
+ } ? boolean : QM extends {
2833
+ type: "first";
2834
+ } ? InferModelQuery<M, EnsureModelQuery<QM>, TMap> | null : InferModelQuery<M, EnsureModelQuery<QM>, TMap>[];
2835
+ type InferRelEntry<M extends AnyDesc, TMap extends ModelMap$1, Q extends RelQuery<any, any>, K extends keyof Q> = K extends keyof EnrichBelongsTo<M, TMap> ? IsOptional<InferModelQuery<EnrichBelongsTo<M, TMap>[K]["model"], EnsureModelQuery<Q[K]>, TMap>, EnrichBelongsTo<M, TMap>[K]["field"]["optional"]> : K extends keyof ExtractHasMany<M, TMap> ? InferHasMany<ExtractHasMany<M, TMap>[K]["model"], TMap, EnsureHasManyQuery<Q[K]>> : K extends keyof ExtractHasOne<M, TMap> ? InferModelQuery<ExtractHasOne<M, TMap>[K]["model"], EnsureModelQuery<Q[K]>, TMap> : never;
2836
+ type InferKeyName<Q extends RelQuery<any, any>, K extends keyof Q> = Q[K] extends Array<any> ? never : Q[K] extends {
2837
+ as: string;
2838
+ } ? K extends keyof ExtractHasMany<any, any> ? Q[K]["as"] : K : K;
2839
+ type InferRelQuery<M extends AnyDesc, Q extends RelQuery<M, TMap>, TMap extends ModelMap$1> = EmptyObjIfNever<ExtractRelQueryArray<M, TMap, Q>> & EmptyObjIfNever<{ [K in keyof Q as InferKeyName<Q, K>]: InferRelEntry<M, TMap, Q, K> }>;
2840
+ type Instance<M extends keyof ModelMap$1> = {
2841
+ "~model": M;
2842
+ "~key": string;
2843
+ };
2844
+ //#endregion
2845
+ //#region src/models/_root.d.ts
2846
+ declare const _rootDesc: ModelDesc<"_root", {}, {
2847
+ releases: RelationEntry<"release", {
2848
+ readonly type: "hasMany";
2849
+ }>;
2850
+ accountOnboardingSteps: RelationEntry<"accountOnboardingStep", {
2851
+ readonly type: "hasMany";
2852
+ }>;
2853
+ apps: RelationEntry<"app", {
2854
+ readonly type: "hasMany";
2855
+ }>;
2856
+ account: RelationEntry<"account", {
2857
+ readonly type: "hasOne";
2858
+ }>;
2859
+ loggedInUser: RelationEntry<"user", {
2860
+ readonly type: "hasOne";
2861
+ }>;
2862
+ cardsStatusHistory: RelationEntry<"cardsStatusHistory", {
2863
+ readonly type: "hasMany";
2864
+ }>;
2865
+ cardsEffortHistory: RelationEntry<"cardsEffortHistory", {
2866
+ readonly type: "hasMany";
2867
+ }>;
2868
+ cardsFinishedHistory: RelationEntry<"cardsFinishedHistory", {
2869
+ readonly type: "hasMany";
2870
+ }>;
2871
+ cardsTimeToFinished: RelationEntry<"cardsTimeToFinished", {
2872
+ readonly type: "hasMany";
2873
+ }>;
2874
+ }, []>;
2875
+ //#endregion
2876
+ //#region src/index.d.ts
2877
+ type ModelMap = typeof modelMap;
2878
+ type Fetchers = {
2879
+ fetchFromRoot: <const Q extends RelQuery<typeof _rootDesc, ModelMap>>(q: Q) => Promise<InferRelQuery<typeof _rootDesc, Q, ModelMap>>;
2880
+ fetchFromInstance: <M extends keyof ModelMap, const Q extends ModelQuery<ModelMap[M], ModelMap>>(instance: Instance<M>, q: Q) => Promise<InferModelQuery<ModelMap[M], Q, ModelMap>>;
2881
+ fetchInstance: <K extends keyof ModelMap, const Q extends RelQuery<ModelMap[K], ModelMap>>(model: K, id: string, q: Q) => Promise<InferModelQuery<ModelMap[K], Q, ModelMap>>;
2882
+ fetchInstances: <K extends keyof ModelMap, Id extends string, const Q extends RelQuery<ModelMap[K], ModelMap>>(model: K, id: Id[], q: Q) => Promise<Record<Id, InferModelQuery<ModelMap[K], Q, ModelMap>>>;
2883
+ };
2884
+ type FetchFunction = (url: string, init?: RequestInit) => Promise<Response>;
2885
+ type FetcherOptions = {
2886
+ fetch?: FetchFunction;
2887
+ accessToken?: string;
2888
+ subdomain?: string;
2889
+ baseUrl?: string;
2890
+ headers?: Record<string, string>;
2891
+ timeout?: number;
2892
+ };
2893
+ declare const buildFetchers: (opts?: FetcherOptions) => Fetchers;
2894
+ //#endregion
2895
+ export { buildFetchers };