Bin
2025-12-17 05a69820e0c402b0b33c063d3b922f0a0571cbbb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
/** @type {import("../utils/api-proxy").APIProxyOptions} */
export const APIConfig = {
  gateway: "/api/dm",
  endpoints: {
    /** Project base info */
    project: "/project",
 
    /** users list */
    users: "/../users",
 
    /** user info */
    user: "/../users/:pk",
 
    /** Available columns/fields of the dataset */
    columns: "/columns",
 
    /** Tabs (materialized views) */
    tabs: "/views",
 
    /** Single tab */
    tab: "/views/:tabId",
 
    /** Creates a new tab */
    createTab: {
      path: "/views",
      method: "post",
    },
 
    /** Update particular tab (PATCH) */
    updateTab: {
      path: "/views/:tabID",
      method: "patch",
    },
 
    orderTab: {
      path: "/views/order/",
      method: "post",
    },
 
    /** Delete particular tab (DELETE) */
    deleteTab: {
      path: "/views/:tabID",
      method: "delete",
    },
 
    userLabelsForProject: "/../label_links",
    saveUserLabels: {
      path: "/../labels",
      method: "post",
    },
 
    /** List of tasks (samples) in the dataset */
    tasks: "/tasks",
 
    /** List of task history */
    taskHistory: "/../projects/:projectId/label-stream-history",
 
    /** Per-task annotations (annotations, predictions) */
    annotations: "/views/:tabID/annotations",
 
    /** Single task (sample) */
    task: "/tasks/:taskID",
 
    /** Next task (labelstream, default sequential) */
    nextTask: "/tasks/next",
 
    /** Single annotation */
    annotation: "/tasks/:taskID/annotations/:id",
 
    /** Presign url */
    presignUrlForTask: "/../../tasks/:taskID/presign",
 
    /** Presign url outside of task context */
    presignUrlForProject: "/../../projects/:projectId/presign",
 
    /** Submit annotation */
    submitAnnotation: {
      path: "/../tasks/:taskID/annotations",
      method: "post",
    },
 
    /** Update annotation */
    updateAnnotation: {
      path: "/../annotations/:annotationID",
      method: "patch",
    },
 
    /** Delete annotation */
    deleteAnnotation: {
      path: "/../annotations/:annotationID",
      method: "delete",
    },
 
    /** Task drafts */
    taskDrafts: "/../tasks/:taskID/drafts",
 
    /** Update draft by id */
    updateDraft: {
      path: "/../drafts/:draftID",
      method: "patch",
    },
 
    /** Delete draft by id */
    deleteDraft: {
      path: "/../drafts/:draftID",
      method: "delete",
    },
 
    /** Create draft for existing annotation */
    createDraftForAnnotation: {
      path: "/../tasks/:taskID/annotations/:annotationID/drafts",
      method: "post",
    },
 
    /** Create draft for new annotation */
    createDraftForTask: {
      path: "/../tasks/:taskID/drafts",
      method: "post",
    },
 
    /** Convert an annotation to draft */
    convertToDraft: {
      path: "/../annotations/:annotationID/convert-to-draft",
      method: "post",
    },
 
    /** Override selected items list (checkboxes) */
    setSelectedItems: {
      path: "/views/:tabID/selected-items",
      method: "post",
    },
 
    /** Add item to the current selection */
    addSelectedItem: {
      path: "/views/:tabID/selected-items",
      method: "patch",
    },
 
    /** List of available actions */
    actions: "/actions",
 
    /** Get action form */
    actionForm: "/actions/:actionId/form",
 
    /** Subtract item from the current selection */
    deleteSelectedItem: {
      path: "/views/:tabID/selected-items",
      method: "delete",
    },
 
    /** Invoke a particular action */
    invokeAction: {
      path: "/actions",
      method: "post",
    },
 
    /** List comments ?annotation=<annotation_id> **/
    listComments: "/../comments",
 
    /** Create a new comment **/
    createComment: {
      path: "/../comments",
      method: "post",
    },
 
    /** Update a comment **/
    updateComment: {
      path: "/../comments/:id",
      method: "patch",
    },
 
    /** Update a comment **/
    deleteComment: {
      path: "/../comments/:id",
      method: "delete",
    },
  },
};