@codecks/fetch 1.0.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/README.md +79 -32
  2. package/dist/_exploration/api-requester.d.ts +3 -4
  3. package/dist/_exploration/api-requester.js +2 -2
  4. package/dist/_exploration/create-hooks.d.ts +4313 -13097
  5. package/dist/_exploration/create-hooks.js +1 -1
  6. package/dist/_exploration/loader.d.ts +2 -2
  7. package/dist/_exploration/loader.js +1 -1
  8. package/dist/_exploration/store.d.ts +5 -4
  9. package/dist/_exploration/store.js +1 -1
  10. package/dist/{collection-utils-KmtGUuXm.js → collection-utils-Ia_ahcpI.js} +2 -1
  11. package/dist/index-g5c30upI.d.ts +39 -0
  12. package/dist/index.d.ts +4 -19
  13. package/dist/index.js +26 -15
  14. package/dist/{loader-types-fd5tV0FD.d.ts → loader-types-D2Pf8qzH.d.ts} +1 -1
  15. package/dist/loader-utils-BZWanWDZ.d.ts +2218 -0
  16. package/dist/query-helpers-DndWBcMF.js +1203 -0
  17. package/dist/{query-type-BqQ9oX_U.d.ts → query-type-DPNcQFpZ.d.ts} +27 -13
  18. package/dist/store-ztk8y6Pm.d.ts +1203 -0
  19. package/package.json +2 -1
  20. package/schema/actions.md +789 -0
  21. package/schema/models/account.md +57 -90
  22. package/schema/models/attachment.md +15 -11
  23. package/schema/models/card.md +91 -65
  24. package/schema/models/cardHistory.md +15 -9
  25. package/schema/models/deck.md +41 -36
  26. package/schema/models/file.md +13 -15
  27. package/schema/models/handCard.md +8 -5
  28. package/schema/models/milestone.md +27 -22
  29. package/schema/models/milestoneProgress.md +9 -3
  30. package/schema/models/milestoneProject.md +6 -4
  31. package/schema/models/project.md +15 -39
  32. package/schema/models/projectTag.md +12 -7
  33. package/schema/models/queueEntry.md +12 -8
  34. package/schema/models/release.md +8 -6
  35. package/schema/models/resolvable.md +19 -15
  36. package/schema/models/resolvableEntry.md +16 -13
  37. package/schema/models/resolvableEntryReaction.md +16 -12
  38. package/schema/models/sprint.md +35 -25
  39. package/schema/models/sprintConfig.md +24 -20
  40. package/schema/models/sprintConfigProgress.md +9 -3
  41. package/schema/models/sprintProgress.md +9 -3
  42. package/schema/models/sprintProject.md +7 -5
  43. package/schema/models/user.md +15 -56
  44. package/schema/models/workflowItem.md +47 -31
  45. package/schema/overview.md +40 -93
  46. package/schema/query-syntax.md +1 -1
  47. package/schema/types.md +103 -0
  48. package/dist/_root-BW9uzB79.d.ts +0 -34
  49. package/dist/index-k-KPWV9R.d.ts +0 -2680
  50. package/dist/loader-utils-hvdC-xsQ.d.ts +0 -42
  51. package/dist/query-helpers-iX1fiqLv.js +0 -3062
  52. package/dist/store-BvEJzUVp.d.ts +0 -2667
  53. package/schema/models/accountOnboarding.md +0 -15
  54. package/schema/models/accountOnboardingStep.md +0 -14
  55. package/schema/models/accountRole.md +0 -19
  56. package/schema/models/accountUserAchievement.md +0 -17
  57. package/schema/models/accountUserSetting.md +0 -20
  58. package/schema/models/activeTimeTracker.md +0 -19
  59. package/schema/models/activity.md +0 -30
  60. package/schema/models/affiliateCode.md +0 -30
  61. package/schema/models/affiliateCodeStat.md +0 -19
  62. package/schema/models/app.md +0 -10
  63. package/schema/models/appInstallation.md +0 -19
  64. package/schema/models/assigneeAssignment.md +0 -18
  65. package/schema/models/assigneeDeckAssignment.md +0 -20
  66. package/schema/models/autoFinishedTimeTrackingSegment.md +0 -20
  67. package/schema/models/cardDiffNotification.md +0 -22
  68. package/schema/models/cardOrder.md +0 -17
  69. package/schema/models/cardOrderInDeck.md +0 -18
  70. package/schema/models/cardPreset.md +0 -19
  71. package/schema/models/cardSubscription.md +0 -19
  72. package/schema/models/cardUpvote.md +0 -21
  73. package/schema/models/cardsEffortHistory.md +0 -9
  74. package/schema/models/cardsFinishedHistory.md +0 -16
  75. package/schema/models/cardsStatusHistory.md +0 -9
  76. package/schema/models/cardsTimeToFinished.md +0 -18
  77. package/schema/models/dailyDiscordGuildVoteMembership.md +0 -15
  78. package/schema/models/dailyPublicProjectMembership.md +0 -15
  79. package/schema/models/deckAssignment.md +0 -18
  80. package/schema/models/deckGuardian.md +0 -17
  81. package/schema/models/deckSubscription.md +0 -18
  82. package/schema/models/discordGuild.md +0 -30
  83. package/schema/models/discordMember.md +0 -21
  84. package/schema/models/discordProjectNotification.md +0 -19
  85. package/schema/models/discordSlashCommand.md +0 -28
  86. package/schema/models/dueCard.md +0 -18
  87. package/schema/models/integration.md +0 -23
  88. package/schema/models/invoice.md +0 -21
  89. package/schema/models/lastSeenCardUpvote.md +0 -17
  90. package/schema/models/pinnedMilestone.md +0 -22
  91. package/schema/models/projectOrder.md +0 -18
  92. package/schema/models/projectSelection.md +0 -18
  93. package/schema/models/projectUser.md +0 -18
  94. package/schema/models/projectUserSetting.md +0 -15
  95. package/schema/models/publicProjectInfo.md +0 -20
  96. package/schema/models/publicProjectMembership.md +0 -17
  97. package/schema/models/publicProjectVisit.md +0 -16
  98. package/schema/models/queueSelection.md +0 -19
  99. package/schema/models/resolvableEntryHistory.md +0 -20
  100. package/schema/models/resolvableNotification.md +0 -30
  101. package/schema/models/resolvableParticipant.md +0 -25
  102. package/schema/models/resolvableParticipantHistory.md +0 -23
  103. package/schema/models/savedSearch.md +0 -18
  104. package/schema/models/stripeAccountSync.md +0 -29
  105. package/schema/models/timeTrackingSegment.md +0 -24
  106. package/schema/models/timeTrackingSum.md +0 -18
  107. package/schema/models/userDismissedHint.md +0 -16
  108. package/schema/models/userEmail.md +0 -18
  109. package/schema/models/userInvitation.md +0 -20
  110. package/schema/models/userInviteCode.md +0 -23
  111. package/schema/models/userOnboarding.md +0 -14
  112. package/schema/models/userProjectAccess.md +0 -17
  113. package/schema/models/userReportEmail.md +0 -19
  114. package/schema/models/userReportSetting.md +0 -23
  115. package/schema/models/userReportToken.md +0 -18
  116. package/schema/models/userTag.md +0 -18
  117. package/schema/models/visionBoard.md +0 -21
  118. package/schema/models/visionBoardQuery.md +0 -22
  119. package/schema/models/wizard.md +0 -19
  120. package/schema/models/workflowItemHistory.md +0 -18
@@ -1,104 +1,71 @@
1
1
  # account
2
2
 
3
+ An organization and its settings.
4
+
3
5
  Key: `id`
4
6
 
5
7
  ## Fields
6
8
 
7
- - `id`: string
8
- - `subdomain`: string
9
- - `name`: string
10
- - `billingName`: string, optional
11
- - `billingLine1`: string, optional
12
- - `billingLine2`: string, optional
13
- - `billingZip`: string, optional
14
- - `billingCity`: string, optional
15
- - `billingCountryCode`: string, optional
16
- - `billingEmail`: string, optional
17
- - `netGiftAmount`: number
18
- - `persona`: string, optional
19
- - `createdAt`: Date (ISO string)
20
- - `disabledAt`: Date (ISO string), optional
21
- - `totalMediaByteUsage`: bigint
22
- - `isDisabled`: string
23
- - `milestonesEnabled`: string
24
- - `sprintsEnabled`: string
25
- - `priorityLabels`: object
26
- - `effortScale`: object
27
- - `statusChangeDurations`: object
28
- - `activeFeatureFlags`: object
29
- - `timeTrackingMode`: string
30
- - `maxTimeTrackingSegmentMsDuration`: number
31
- - `timeTrackingSwimLaneInfo`: boolean
32
- - `workdays`: string
33
- - `workflowMode`: string
34
- - `isLearning`: boolean
35
- - `isNonProfit`: boolean
36
- - `dependenciesEnabled`: boolean
37
- - `maxHandSlotCount`: number
38
- - `seats`: number
39
- - `activeProjectCount`: number
40
- - `billingType`: string
41
- - `allowInheritHeroCover`: boolean
42
- - `attachmentCoverMode`: string
43
- - `staffPermission`: string
44
- - `offeringTrial`: boolean
45
- - `coupon`: object, optional
46
- - `hideCompletedCardCountForDecks`: boolean
47
- - `visionBoardEnabled`: boolean
48
- - `fallbackEffort`: number
49
- - `timelineScaleType`: string
50
- - `startWeekday`: string
51
- - `disabledById`: string (foreign key ID) → user, optional
9
+ - `allowInheritHeroCover`: `boolean` — **preview**
10
+ `true` makes the web app show a hero card's cover image on its sub cards, in place of their own.
11
+ - `attachmentCoverMode`: `"none" | "first" | "last" | (string & {})` — **preview**
12
+ Which uploaded image attachment becomes the card's `coverFile`. `first` only sets it if the card has no cover yet, `last` always uses the newest image, `none` never sets it.
13
+ - `createdAt`: `Date` (sent as an ISO timestamp)
14
+ - `dependenciesEnabled`: `boolean`
15
+ - `dueDateEnabled`: `boolean`
16
+ - `effortScale`: `number[]`
17
+ The effort values the web app offers for a card. A card's `effort` may still be any other number.
18
+ - `fallbackEffort`: `number` — **preview**
19
+ The effort the web app counts for cards without an `effort`, e.g. in charts, hero cards and run capacity.
20
+ - `hideCompletedCardCountForDecks`: `boolean` — **preview**
21
+ `true` hides the number of done cards on decks in the web app.
22
+ - `id`: `AccountId`
23
+ - `maxHandSlotCount`: `number` — **preview**
24
+ How many cards that aren't done each user may have in their Hand, between 7 and 28. `handQueue/addCardsToHand`, `handQueue/setCardOrders` and `cards/create` with `putInQueue` fail beyond it. Starting a card and hand sync can still go beyond it.
25
+ - `milestonesEnabled`: `boolean`
26
+ - `name`: `string`
27
+ - `priorityLabels`: `{a: string; b: string; c: string}`
28
+ The names the web app shows for the card priorities `a`, `b` and `c`.
29
+ - `sprintsEnabled`: `boolean`
30
+ Whether the organization uses runs.
31
+ - `startWeekday`: [`StartWeekday`](../types.md#startweekday)
32
+ The first day of the week in the calendar and timeline. Users can override it for themselves.
33
+ - `statusChangeDurations`: `{snooze: number; archive: number | null}` — **preview**
34
+ In seconds. A started card without changes for `snooze` seconds becomes `snoozing`. A done card without changes and open comment threads for `archive` seconds gets archived. `archive` is `null` when done cards never get archived.
35
+ - `subdomain`: `string`
36
+ The part before `.codecks.io` in the organization's web address.
37
+ - `timeTrackingMode`: [`TimeTrackingMode`](../types.md#timetrackingmode) — **preview**
38
+ `none` turns time tracking off. `manual` allows only manual time entries. `strict` also adds a timer that users start with the play button on a card.
39
+ - `timelineScaleType`: [`TimelineScaleType`](../types.md#timelinescaletype) — **preview**
40
+ Whether the timeline shows days or weeks. Users can override it for themselves.
41
+ - `visionBoardEnabled`: `boolean` — **preview**
42
+ - `workdays`: [`Workdays`](../types.md#workdays)
43
+ The days the team works. The web app only counts these days, e.g. for the days left until a milestone.
44
+ - `workflowMode`: [`WorkflowMode`](../types.md#workflowmode) — **preview**
45
+ `journeys` when the organization uses journeys, `only_parent_cards` when not.
52
46
 
53
47
  ## Relations
54
48
 
55
- ### belongsTo
56
-
57
- - `disabledBy` → [user](user.md) (via `disabledById`)
58
-
59
- ### hasOne
60
-
61
- - `githubIntegration` → [integration](integration.md)
62
- - `slackIntegration` → [integration](integration.md)
63
- - `stripeAccountSync` → [stripeAccountSync](stripeAccountSync.md)
64
- - `accountOnboarding` → [accountOnboarding](accountOnboarding.md)
65
-
66
49
  ### hasMany
67
50
 
68
- - `cards` → [card](card.md)
69
- - `invoices` → [invoice](invoice.md)
70
- - `cardPresets` → [cardPreset](cardPreset.md)
51
+ - `archivedProjects` → [project](project.md)
71
52
  - `attachments` → [attachment](attachment.md)
72
- - `discordGuilds` → [discordGuild](discordGuild.md)
73
- - `timeTrackingSegments` → [timeTrackingSegment](timeTrackingSegment.md)
74
- - `workflowItems` → [workflowItem](workflowItem.md)
75
- - `deckAssignments` → [deckAssignment](deckAssignment.md)
76
- - `assigneeAssignments` → [assigneeAssignment](assigneeAssignment.md)
77
- - `assigneeDeckAssignments` → [assigneeDeckAssignment](assigneeDeckAssignment.md)
78
- - `wizards` → [wizard](wizard.md)
79
- - `milestones` → [milestone](milestone.md)
80
- - `sprints` → [sprint](sprint.md)
81
- - `sprintConfigs` → [sprintConfig](sprintConfig.md)
82
- - `handCards` → [handCard](handCard.md)
83
- - `resolvables` → [resolvable](resolvable.md)
84
- - `cardUpvotes` → [cardUpvote](cardUpvote.md)
85
- - `resolvableParticipants` → [resolvableParticipant](resolvableParticipant.md)
86
- - `userReportSettings` → [userReportSetting](userReportSetting.md)
87
- - `cardOrders` → [cardOrder](cardOrder.md)
88
- - `accountUserAchievements` → [accountUserAchievement](accountUserAchievement.md)
89
- - `userInviteCodes` → [userInviteCode](userInviteCode.md)
90
- - `visionBoards` → [visionBoard](visionBoard.md)
91
- - `deckSubscriptions` → [deckSubscription](deckSubscription.md)
92
- - `appInstallations` → [appInstallation](appInstallation.md)
93
- - `files` → [file](file.md)
53
+ - `cards` → [card](card.md)
94
54
  - `decks` → [deck](deck.md)
95
- - `queueEntries` → [queueEntry](queueEntry.md)
96
- - `visionBoardQueries` → [visionBoardQuery](visionBoardQuery.md)
97
- - `anyDecks` → [deck](deck.md)
55
+ Without deleted decks.
56
+ - `files` → [file](file.md)
57
+ - `handCards` → [handCard](handCard.md)
58
+ The bookmarked cards of all users.
59
+ - `milestones` → [milestone](milestone.md)
98
60
  - `projects` → [project](project.md)
99
- - `archivedProjects` → [project](project.md)
100
- - `anyProjects` → [project](project.md)
101
- - `roles` → [accountRole](accountRole.md)
102
- - `invitations` → [userInvitation](userInvitation.md)
103
- - `affiliateCodes` → [affiliateCode](affiliateCode.md)
104
- - `activities` → [activity](activity.md)
61
+ Projects that are neither archived nor deleted.
62
+ - `queueEntries` → [queueEntry](queueEntry.md)
63
+ The cards in the Card Hand of all users.
64
+ - `resolvables` → [resolvable](resolvable.md)
65
+ The comment threads of all cards.
66
+ - `sprintConfigs` → [sprintConfig](sprintConfig.md)
67
+ The organization's run configs.
68
+ - `sprints` → [sprint](sprint.md)
69
+ The organization's runs.
70
+ - `workflowItems` → [workflowItem](workflowItem.md) — **preview**
71
+ The organization's journey steps.
@@ -1,23 +1,27 @@
1
1
  # attachment
2
2
 
3
+ A file attached to a card.
4
+
3
5
  Key: `id`
4
6
 
5
7
  ## Fields
6
8
 
7
- - `id`: string
8
- - `content`: string
9
- - `title`: string
10
- - `createdAt`: Date (ISO string)
11
- - `fileId`: string (foreign key ID) → file
12
- - `cardId`: string (foreign key ID) → card
13
- - `accountId`: string (foreign key ID) → account
14
- - `creatorId`: string (foreign key ID) → user
9
+ - `accountId`: [`AccountId`](account.md), foreign key of `account`
10
+ - `cardId`: [`CardId`](card.md), foreign key of `card`
11
+ - `content`: `string`
12
+ The attachment's label as markdown. It starts as the file name.
13
+ - `createdAt`: `Date` (sent as an ISO timestamp)
14
+ - `creatorId`: [`UserId`](user.md)` | null`, foreign key of `creator`
15
+ - `fileId`: [`FileId`](file.md), foreign key of `file`
16
+ - `id`: `AttachmentId`
17
+ - `title`: `string`
18
+ The first line of `content` as plain text, cut to 80 characters.
15
19
 
16
20
  ## Relations
17
21
 
18
22
  ### belongsTo
19
23
 
20
- - `file` → [file](file.md) (via `fileId`)
21
- - `card` → [card](card.md) (via `cardId`)
22
24
  - `account` → [account](account.md) (via `accountId`)
23
- - `creator` → [user](user.md) (via `creatorId`)
25
+ - `card` → [card](card.md) (via `cardId`)
26
+ - `creator` → [user](user.md) (via `creatorId`), optional
27
+ - `file` → [file](file.md) (via `fileId`)
@@ -1,82 +1,108 @@
1
1
  # card
2
2
 
3
+ A task or a document card when `isDoc` is set or a hero card if it contains sub cards.
4
+ The card's color is derived from `status`, `visibility`, `isDoc` and whether it has sub cards or open block or review conversations.
5
+
3
6
  Key: `cardId`
4
7
 
5
8
  ## Fields
6
9
 
7
- - `cardId`: string
8
- - `version`: number
9
- - `accountSeq`: number
10
- - `content`: string
11
- - `status`: string
12
- - `derivedStatus`: string
13
- - `createdAt`: Date (ISO string)
14
- - `lastUpdatedAt`: Date (ISO string)
15
- - `tags`: array
16
- - `masterTags`: array
17
- - `mentionedUsers`: array
18
- - `title`: string
19
- - `priority`: string, optional
20
- - `effort`: number, optional
21
- - `checkboxStats`: object
22
- - `checkboxInfo`: array
23
- - `visibility`: string
24
- - `legacyProjectSeq`: number, optional
25
- - `meta`: object
26
- - `embeds`: object
27
- - `isPublic`: boolean
28
- - `hasBlockingDeps`: boolean
29
- - `dueDate`: {year, month, day}, optional
30
- - `isDoc`: boolean, optional
31
- - `childCardInfo`: string
32
- - `accountId`: string (foreign key ID) → account
33
- - `deckId`: string (foreign key ID) → deck, optional
34
- - `assigneeId`: string (foreign key ID) → user, optional
35
- - `creatorId`: string (foreign key ID) → user, optional
36
- - `milestoneId`: string (foreign key ID) → milestone, optional
37
- - `sprintId`: string (foreign key ID) → sprint, optional
38
- - `legacyProjectId`: string (foreign key ID) → project, optional
39
- - `coverFileId`: string (foreign key ID) → file, optional
40
- - `parentCardId`: string (foreign key ID) → card, optional
41
- - `sourceWorkflowItemId`: string (foreign key ID) → workflowItem, optional
42
- - `discordGuildId`: string (foreign key ID) → discordGuild
43
- - `visionBoardId`: string (foreign key ID) → visionBoard, optional
10
+ - `accountId`: [`AccountId`](account.md), foreign key of `account`
11
+ - `accountSeq`: `number`
12
+ The card's number within the organization. It's stored as a plain number starting at 1. The web app shows it encoded as a short code after a `$`, like `$12a`. Check [this gist](https://gist.github.com/danielberndt/19857421171dbb07a3681f0ea6634049) for how to translate the number into the shown string and vice versa.
13
+ - `assigneeId`: [`UserId`](user.md)` | null`, foreign key of `assignee`
14
+ The card's owner.
15
+ - `cardId`: `CardId`
16
+ - `checkboxInfo`: [`Checkbox`](../types.md#checkbox)`[]` — **preview**
17
+ The checkboxes in `content`, in order.
18
+ - `checkboxStats`: [`CheckboxStats`](../types.md#checkboxstats)
19
+ How many checkboxes `content` has, and how many of them are checked.
20
+ - `content`: `string`
21
+ The card's text as markdown. Its first line is the `title`. Tags, mentions, checkboxes and card references in it fill `tags`, `masterTags`, `mentionedUsers`, `checkboxStats`, `checkboxInfo` and `cardReferences`.
22
+ - `coverFileId`: [`FileId`](file.md)` | null`, foreign key of `coverFile`
23
+ The image shown on the card's front.
24
+ - `createdAt`: `Date` (sent as an ISO timestamp)
25
+ - `creatorId`: [`UserId`](user.md)` | null`, foreign key of `creator`
26
+ `null` for cards an import created.
27
+ - `deckId`: [`DeckId`](deck.md)` | null`, foreign key of `deck`
28
+ `null` for a private card, which only its creator sees.
29
+ - `derivedStatus`: [`DerivedStatus`](../types.md#derivedstatus) — **preview**
30
+ The state the web app shows, combining `status`, `visibility`, `isDoc`, open review and blocker threads, the assignee and whether it's a hero card: e.g. `blocked` for an open blocker thread, `unassigned` for a not started card without an assignee.
31
+ - `dueDate`: `{year: number; month: number; day: number} | null` (sent as `YYYY-MM-DD`)
32
+ - `effort`: `number | null`
33
+ On the organization's scale, `account.effortScale`.
34
+ - `hasBlockingDeps`: `boolean` — **preview**
35
+ One of `inDeps` isn't done yet.
36
+ - `isBlockingDep`: `boolean` — **preview**
37
+ The card isn't done yet, and one of its `outDeps` isn't either.
38
+ - `isDoc`: `boolean | null`
39
+ `true` for a document card: it holds information instead of a task, so it's never started or done.
40
+ - `lastUpdatedAt`: `Date` (sent as an ISO timestamp)
41
+ When the card last changed.
42
+ - `masterTags`: `string[]`
43
+ The card's project tags: the tags from the project's tag list, whether written as `#tag` in `content` or set directly, plus the deck's auto-tag. Writing them may change `content`.
44
+ - `mentionedUsers`: [`UserId`](user.md)`[]` — **preview**
45
+ The users mentioned in `content`.
46
+ - `milestoneId`: [`MilestoneId`](milestone.md)` | null`, foreign key of `milestone`
47
+ - `parentCardId`: `CardId | null`, foreign key of `parentCard`
48
+ The hero card this card is a sub card of.
49
+ - `priority`: [`Priority`](../types.md#priority)` | null`
50
+ `a`, `b` or `c`: High, Medium and Low, unless the organization renamed them (`account.priorityLabels`).
51
+ - `sourceWorkflowItemId`: [`WorkflowItemId`](workflowItem.md)` | null`, foreign key of `sourceWorkflowItem` — **preview**
52
+ The journey step the card was created from.
53
+ - `sprintId`: [`SprintId`](sprint.md)` | null`, foreign key of `sprint`
54
+ The run the card is planned into.
55
+ - `status`: `"not_started" | "started" | "snoozing" | "done" | (string & {})`
56
+ `snoozing` is only set on a `started` card that nobody changed for the organization's snooze time (`account.statusChangeDurations`). It can't be written. `derivedStatus` is the state the web app shows.
57
+ - `tags`: `string[]`
58
+ Every tag on the card: the `#tags` in `content` and the `masterTags`, each once.
59
+ - `title`: `string`
60
+ The first line of `content` as plain text, without markdown and cut to 80 characters. Write `content` to change it.
61
+ - `version`: `number`
62
+ Goes up with every change to the card.
63
+ - `visibility`: [`CardVisibility`](../types.md#cardvisibility)
64
+ `archived` cards are put away, `deleted` ones are in the trash. Both stay readable.
44
65
 
45
66
  ## Relations
46
67
 
47
68
  ### belongsTo
48
69
 
49
70
  - `account` → [account](account.md) (via `accountId`)
50
- - `deck` → [deck](deck.md) (via `deckId`)
51
- - `assignee` → [user](user.md) (via `assigneeId`)
52
- - `creator` → [user](user.md) (via `creatorId`)
53
- - `milestone` → [milestone](milestone.md) (via `milestoneId`)
54
- - `sprint` → [sprint](sprint.md) (via `sprintId`)
55
- - `legacyProject` → [project](project.md) (via `legacyProjectId`)
56
- - `coverFile` → [file](file.md) (via `coverFileId`)
57
- - `parentCard` → [card](card.md) (via `parentCardId`)
58
- - `sourceWorkflowItem` → [workflowItem](workflowItem.md) (via `sourceWorkflowItemId`)
59
- - `discordGuild` → [discordGuild](discordGuild.md) (via `discordGuildId`)
60
- - `visionBoard` → [visionBoard](visionBoard.md) (via `visionBoardId`)
61
-
62
- ### hasOne
63
-
64
- - `totalTimeTrackingSums` → [timeTrackingSum](timeTrackingSum.md)
71
+ - `assignee` → [user](user.md) (via `assigneeId`), optional
72
+ The card's owner.
73
+ - `coverFile` → [file](file.md) (via `coverFileId`), optional
74
+ The image shown on the card's front.
75
+ - `creator` → [user](user.md) (via `creatorId`), optional
76
+ `null` for cards an import created.
77
+ - `deck` → [deck](deck.md) (via `deckId`), optional
78
+ `null` for a private card, which only its creator sees.
79
+ - `milestone` → [milestone](milestone.md) (via `milestoneId`), optional
80
+ - `parentCard` → [card](card.md) (via `parentCardId`), optional
81
+ The hero card this card is a sub card of.
82
+ - `sourceWorkflowItem` → [workflowItem](workflowItem.md) (via `sourceWorkflowItemId`), optional — **preview**
83
+ The journey step the card was created from.
84
+ - `sprint` → [sprint](sprint.md) (via `sprintId`), optional
85
+ The run the card is planned into.
65
86
 
66
87
  ### hasMany
67
88
 
68
- - `resolvables` → [resolvable](resolvable.md)
69
- - `handCards` → [handCard](handCard.md)
70
- - `timeTrackingSegments` → [timeTrackingSegment](timeTrackingSegment.md)
71
- - `cardSubscriptions` → [cardSubscription](cardSubscription.md)
72
- - `cardOrders` → [cardOrder](cardOrder.md)
73
- - `resolvableEntries` → [resolvableEntry](resolvableEntry.md)
74
- - `queueEntries` → [queueEntry](queueEntry.md)
75
89
  - `attachments` → [attachment](attachment.md) — `fkAsArray` (plain selection + `count`/`exists` only; no `filter`/`orderBy`/`limit`/`offset`/`first`)
76
- - `diffs` → [cardHistory](cardHistory.md)
77
- - `userTimeTrackingSums` → [timeTrackingSum](timeTrackingSum.md)
90
+ In the order the card shows them.
91
+ - `cardReferences` → [card](card.md) — `fkAsArray` (plain selection + `count`/`exists` only; no `filter`/`orderBy`/`limit`/`offset`/`first`) — **preview**
92
+ The cards that `content` links to.
78
93
  - `childCards` → [card](card.md) — `fkAsArray` (plain selection + `count`/`exists` only; no `filter`/`orderBy`/`limit`/`offset`/`first`)
79
- - `inDeps` → [card](card.md) — `fkAsArray` (plain selection + `count`/`exists` only; no `filter`/`orderBy`/`limit`/`offset`/`first`)
80
- - `outDeps` → [card](card.md) — `fkAsArray` (plain selection + `count`/`exists` only; no `filter`/`orderBy`/`limit`/`offset`/`first`)
81
- - `cardReferences` → [card](card.md) — `fkAsArray` (plain selection + `count`/`exists` only; no `filter`/`orderBy`/`limit`/`offset`/`first`)
82
- - `upvotes` → [cardUpvote](cardUpvote.md)
94
+ A hero card's sub cards, in order.
95
+ - `diffs` → [cardHistory](cardHistory.md) — **preview**
96
+ The card's change history.
97
+ - `handCards` → [handCard](handCard.md)
98
+ One entry per user who bookmarked the card.
99
+ - `inDeps` → [card](card.md) — `fkAsArray` (plain selection + `count`/`exists` only; no `filter`/`orderBy`/`limit`/`offset`/`first`) — **preview**
100
+ The cards that have to be done before this one.
101
+ - `outDeps` → [card](card.md) — `fkAsArray` (plain selection + `count`/`exists` only; no `filter`/`orderBy`/`limit`/`offset`/`first`) — **preview**
102
+ The cards that wait for this one. The counterpart of their `inDeps`.
103
+ - `queueEntries` → [queueEntry](queueEntry.md)
104
+ One entry per user who has the card in their Card Hand.
105
+ - `resolvableEntries` → [resolvableEntry](resolvableEntry.md)
106
+ Every comment on the card, across its threads.
107
+ - `resolvables` → [resolvable](resolvable.md)
108
+ The card's comment threads, including reviews and blockers (`context`).
@@ -1,20 +1,26 @@
1
1
  # cardHistory
2
2
 
3
+ One version of a card and what changed in it. The web app shows these in the card's history.
4
+
5
+ **preview**: this model may change in any release. Each change is listed in the [API changelog](https://manual.codecks.io/api-changelog/).
6
+
3
7
  Key: `cardId`, `version`
4
8
 
5
9
  ## Fields
6
10
 
7
- - `diff`: object
8
- - `versionCreatedAt`: Date (ISO string)
9
- - `version`: number
10
- - `accountId`: string (foreign key ID) → account
11
- - `cardId`: string (foreign key ID) → card
12
- - `changerId`: string (foreign key ID) → user
11
+ - `accountId`: [`AccountId`](account.md), foreign key of `account` — **preview**
12
+ - `cardId`: [`CardId`](card.md), foreign key of `card` — **preview**
13
+ - `changerId`: [`UserId`](user.md)` | null`, foreign key of `changer` — **preview**
14
+ - `diff`: `{[key: string]: unknown}` — **preview**
15
+ The changed fields: `[old, new]` for single values, `{"+": added, "-": removed}` for lists, and an encoded text diff for `content` and `title`.
16
+ - `version`: `number` — **preview**
17
+ The card's `version` after this change.
18
+ - `versionCreatedAt`: `Date` (sent as an ISO timestamp) — **preview**
13
19
 
14
20
  ## Relations
15
21
 
16
22
  ### belongsTo
17
23
 
18
- - `account` → [account](account.md) (via `accountId`)
19
- - `card` → [card](card.md) (via `cardId`)
20
- - `changer` → [user](user.md) (via `changerId`)
24
+ - `account` → [account](account.md) (via `accountId`) — **preview**
25
+ - `card` → [card](card.md) (via `cardId`) — **preview**
26
+ - `changer` → [user](user.md) (via `changerId`), optional — **preview**
@@ -1,53 +1,58 @@
1
1
  # deck
2
2
 
3
+ A list of cards within a project. `deckType` says which kind of cards it is meant for.
4
+
3
5
  Key: `id`
4
6
 
5
7
  ## Fields
6
8
 
7
- - `id`: string
8
- - `content`: string
9
- - `description`: string
10
- - `title`: string
11
- - `sortValue`: string
12
- - `preferredOrder`: string, optional
13
- - `coverColor`: string, optional
14
- - `isDeleted`: string
15
- - `accountSeq`: number
16
- - `spaceId`: number, optional
17
- - `defaultCard`: object
18
- - `isOnboardingDeck`: boolean
19
- - `handSyncEnabled`: string
20
- - `stickyDefaultProjectTag`: string
21
- - `manualOrderLabels`: string
22
- - `workflowItemOrderLabels`: string
23
- - `createdAt`: Date (ISO string)
24
- - `stats`: object
25
- - `hasGuardians`: string
26
- - `allowedCardTypes`: string
27
- - `projectId`: string (foreign key ID) → project
28
- - `accountId`: string (foreign key ID) → account
29
- - `milestoneId`: string (foreign key ID) → milestone, optional
30
- - `creatorId`: string (foreign key ID) → user
31
- - `coverFileId`: string (foreign key ID) → file, optional
32
- - `descriptionCoverFileId`: string (foreign key ID) → file, optional
33
- - `defaultProjectTagId`: string (foreign key ID) → projectTag, optional
9
+ - `accountId`: [`AccountId`](account.md), foreign key of `account`
10
+ - `accountSeq`: `number`
11
+ The deck's number within the organization. The web app uses it in the deck's URL, like `/decks/12-my-deck`.
12
+ - `coverColor`: `string | null` — **preview**
13
+ A hex color like `#ff8800`.
14
+ - `coverFileId`: [`FileId`](file.md)` | null`, foreign key of `coverFile` — **preview**
15
+ - `createdAt`: `Date` (sent as an ISO timestamp)
16
+ - `creatorId`: [`UserId`](user.md), foreign key of `creator`
17
+ - `deckType`: `"task" | "hero" | "doc" | "mixed" | (string & {})`
18
+ The web app calls these Task (`task`), Asset (`hero`), Knowledge (`doc`) and Mixed (`mixed`) decks. Cards in a `hero` deck count as hero cards unless they are docs or sub cards. A started card that moves into a `hero` or `doc` deck goes back to `not_started`.
19
+ - `defaultCard`: [`DefaultCard`](../types.md#defaultcard) — **preview**
20
+ The deck's Template Card. The web app fills in these values when you create a card in this deck. `cards/create` doesn't use them.
21
+ - `defaultProjectTagId`: [`ProjectTagId`](projectTag.md)` | null`, foreign key of `defaultProjectTag`
22
+ The deck's auto tag. Cards that are created in or moved into the deck get this project tag.
23
+ - `description`: `string`
24
+ - `handSyncEnabled`: `boolean` — **preview**
25
+ Cards in this deck that have an assignee go into the assignee's Hand. This happens when a card is created, moved into the deck or gets a new assignee.
26
+ - `hasGuardians`: `boolean` — **preview**
27
+ The deck has [guardians](https://manual.codecks.io/guardians/). Then only guardians, producers and admins may mark its cards as done or not done, archive, delete, restore or move them.
28
+ - `id`: `DeckId`
29
+ - `isDeleted`: `boolean`
30
+ - `manualOrderLabels`: `(string | null)[]` — **preview**
31
+ The names of the zones in the deck's manual order, in order. `null` is a zone without a name. A card's zone is the `label` of its `cardOrder` in the `deck` context.
32
+ - `milestoneId`: [`MilestoneId`](milestone.md)` | null`, foreign key of `milestone`
33
+ Setting it also puts the deck's cards into this milestone.
34
+ - `projectId`: [`ProjectId`](project.md), foreign key of `project`
35
+ - `sortValue`: `string` — **preview**
36
+ Decks within a space are sorted by it. Change it with `decks/addToSpaceAfter` or `decks/addToSpaceBefore`.
37
+ - `spaceId`: `number | null` — **preview**
38
+ The space of the project the deck is in, one of the ids in `project.spaces`.
39
+ - `title`: `string`
34
40
 
35
41
  ## Relations
36
42
 
37
43
  ### belongsTo
38
44
 
39
- - `project` → [project](project.md) (via `projectId`)
40
45
  - `account` → [account](account.md) (via `accountId`)
41
- - `milestone` → [milestone](milestone.md) (via `milestoneId`)
46
+ - `coverFile` → [file](file.md) (via `coverFileId`), optional — **preview**
42
47
  - `creator` → [user](user.md) (via `creatorId`)
43
- - `coverFile` → [file](file.md) (via `coverFileId`)
44
- - `descriptionCoverFile` → [file](file.md) (via `descriptionCoverFileId`)
45
- - `defaultProjectTag` → [projectTag](projectTag.md) (via `defaultProjectTagId`)
48
+ - `defaultProjectTag` → [projectTag](projectTag.md) (via `defaultProjectTagId`), optional
49
+ The deck's auto tag. Cards that are created in or moved into the deck get this project tag.
50
+ - `milestone` → [milestone](milestone.md) (via `milestoneId`), optional
51
+ Setting it also puts the deck's cards into this milestone.
52
+ - `project` → [project](project.md) (via `projectId`)
46
53
 
47
54
  ### hasMany
48
55
 
49
56
  - `cards` → [card](card.md)
50
- - `workflowItems` → [workflowItem](workflowItem.md)
51
- - `cardOrderInDecks` → [cardOrderInDeck](cardOrderInDeck.md)
52
- - `activities` → [activity](activity.md)
53
- - `guardians` → [deckGuardian](deckGuardian.md)
57
+ - `workflowItems` → [workflowItem](workflowItem.md) — **preview**
58
+ The steps of the deck's journey.
@@ -1,26 +1,24 @@
1
1
  # file
2
2
 
3
+ An uploaded file, like a card attachment or a cover image.
4
+
3
5
  Key: `id`
4
6
 
5
7
  ## Fields
6
8
 
7
- - `id`: string
8
- - `name`: string
9
- - `url`: string
10
- - `size`: string
11
- - `isDeleted`: string
12
- - `meta`: object
13
- - `createdAt`: Date (ISO string)
14
- - `deletedAt`: Date (ISO string)
15
- - `selfHosted`: string
16
- - `accountId`: string (foreign key ID) → account
17
- - `uploaderId`: string (foreign key ID) → user
18
- - `deletedById`: string (foreign key ID) → user
9
+ - `accountId`: [`AccountId`](account.md)` | null`, foreign key of `account`
10
+ - `createdAt`: `Date` (sent as an ISO timestamp)
11
+ - `id`: `FileId`
12
+ - `name`: `string`
13
+ - `size`: `number`
14
+ In bytes. `0` once the file is deleted.
15
+ - `uploaderId`: [`UserId`](user.md)` | null`, foreign key of `uploader`
16
+ - `url`: `string`
17
+ Where to download the file. `""` once the file is deleted.
19
18
 
20
19
  ## Relations
21
20
 
22
21
  ### belongsTo
23
22
 
24
- - `account` → [account](account.md) (via `accountId`)
25
- - `uploader` → [user](user.md) (via `uploaderId`)
26
- - `deletedBy` → [user](user.md) (via `deletedById`)
23
+ - `account` → [account](account.md) (via `accountId`), optional
24
+ - `uploader` → [user](user.md) (via `uploaderId`), optional
@@ -1,18 +1,21 @@
1
1
  # handCard
2
2
 
3
+ A card a user bookmarked. Deleting the card removes its bookmarks.
4
+
3
5
  Key: `cardId`, `userId`, `accountId`
4
6
 
5
7
  ## Fields
6
8
 
7
- - `sortIndex`: number
8
- - `userId`: string (foreign key ID) → user
9
- - `accountId`: string (foreign key ID) → account
10
- - `cardId`: string (foreign key ID) → card
9
+ - `accountId`: [`AccountId`](account.md), foreign key of `account`
10
+ - `cardId`: [`CardId`](card.md), foreign key of `card`
11
+ - `sortIndex`: `number`
12
+ Bookmarks are listed by ascending `sortIndex`. There may be gaps.
13
+ - `userId`: [`UserId`](user.md), foreign key of `user`
11
14
 
12
15
  ## Relations
13
16
 
14
17
  ### belongsTo
15
18
 
16
- - `user` → [user](user.md) (via `userId`)
17
19
  - `account` → [account](account.md) (via `accountId`)
18
20
  - `card` → [card](card.md) (via `cardId`)
21
+ - `user` → [user](user.md) (via `userId`)