repzo 1.0.291 → 1.0.293

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 (34) hide show
  1. package/changelog.md +28 -0
  2. package/lib/index.d.ts +244 -2
  3. package/lib/index.js +541 -0
  4. package/lib/types/index.d.ts +4533 -1
  5. package/package.json +1 -1
  6. package/src/index.ts +1270 -0
  7. package/src/oas/activity-ai-object-detection-session-frame.yaml +600 -0
  8. package/src/oas/ai-object-detection-assigned-missions.yaml +283 -0
  9. package/src/oas/ai-object-detection-assignment-rule.yaml +357 -0
  10. package/src/oas/ai-object-detection-category.yaml +338 -0
  11. package/src/oas/ai-object-detection-dataset.yaml +342 -0
  12. package/src/oas/ai-object-detection-detection-settings.yaml +410 -0
  13. package/src/oas/ai-object-detection-inference.yaml +818 -0
  14. package/src/oas/ai-object-detection-label-group.yaml +265 -0
  15. package/src/oas/ai-object-detection-label-report.yaml +366 -0
  16. package/src/oas/ai-object-detection-label.yaml +395 -0
  17. package/src/oas/ai-object-detection-metric-result.yaml +734 -0
  18. package/src/oas/ai-object-detection-metric.yaml +559 -0
  19. package/src/oas/ai-object-detection-mission-results.yaml +370 -0
  20. package/src/oas/ai-object-detection-mission-set.yaml +250 -0
  21. package/src/oas/ai-object-detection-mission.yaml +349 -0
  22. package/src/oas/ai-object-detection-model-version-epoch.yaml +214 -0
  23. package/src/oas/ai-object-detection-model-version-train-agent.yaml +88 -0
  24. package/src/oas/ai-object-detection-model-version.yaml +567 -0
  25. package/src/oas/ai-object-detection-model.yaml +369 -0
  26. package/src/oas/ai-object-detection-segment.yaml +301 -0
  27. package/src/oas/ai-object-detection-session-analysis.yaml +1306 -0
  28. package/src/oas/ai-object-detection-session-election.yaml +193 -0
  29. package/src/oas/ai-object-detection-session-insight.yaml +418 -0
  30. package/src/oas/ai-object-detection-session.yaml +840 -0
  31. package/src/oas/ai-object-detection-settings.yaml +249 -0
  32. package/src/oas/ai-object-detection-task.yaml +1007 -0
  33. package/src/oas/object-detection-analytics-report.yaml +674 -0
  34. package/src/types/index.ts +5159 -1
@@ -0,0 +1,338 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: Repzo API - AI Object Detection Category
4
+ version: 1.0.0
5
+ description: |
6
+ Detection categories group what a shelf-scan session is ABOUT. A category
7
+ carries a `name`, an array of `model_settings` — each item naming a
8
+ trained model / model version plus the full analyze-session `config`
9
+ (confidence, IoU, walk, dims-reclassifier, size-gate knobs) — and a
10
+ `labels` array (the `ai-object-detection-label` ids the category tracks,
11
+ inputs for the upcoming jobs & metrics).
12
+
13
+ The mobile AR app lists categories and lets the rep pick one before
14
+ calibration (optional). The picked id rides every uploaded frame's
15
+ `meta_inline.category` and is stamped onto the session. When the device
16
+ posts the upload-complete marker, a session WITH a category is
17
+ auto-analyzed once per `model_settings` item — serially, skipped when the
18
+ session verdict is `rejected`. A session without a category is never
19
+ auto-analyzed.
20
+
21
+ Multi-tenant (`company_namespace`, injected from the caller's token) with
22
+ soft-delete (`disabled: true`). Names are unique per namespace among
23
+ non-deleted categories. Deleting a category still referenced by sessions
24
+ fails unless `?force=true`, which detaches it from those sessions first.
25
+ Callable by admins (dashboard CRUD) and reps (mobile list). `PATCH` is not
26
+ allowed (400).
27
+
28
+ **Population.** `populatedKeys[]` on find embeds `labels` under
29
+ `labels_populated`; the nested `model_settings.model` and
30
+ `model_settings.model_version` joins are applied IN PLACE (the id inside
31
+ each `model_settings[]` item is replaced by the document).
32
+ servers:
33
+ - url: https://sv.api.repzo.me
34
+ security:
35
+ - ApiKeyAuth: []
36
+ - JwtAuth: []
37
+ paths:
38
+ /ai-object-detection-category:
39
+ get:
40
+ summary: List detection categories
41
+ operationId: findAiObjectDetectionCategories
42
+ parameters:
43
+ - in: query
44
+ name: _id
45
+ description: Filter by category `_id`. Pass once or as `?_id[]=...` for multiple.
46
+ schema:
47
+ oneOf:
48
+ - type: string
49
+ - type: array
50
+ items: { type: string }
51
+ - in: query
52
+ name: name
53
+ description: Exact-match on `name` (single value or list).
54
+ schema:
55
+ oneOf:
56
+ - type: string
57
+ - type: array
58
+ items: { type: string }
59
+ - in: query
60
+ name: search
61
+ description: Case-insensitive substring / regex match on `name`.
62
+ schema: { type: string }
63
+ - in: query
64
+ name: labels
65
+ description: Filter to categories tracking the given label id(s).
66
+ schema:
67
+ oneOf:
68
+ - type: string
69
+ - type: array
70
+ items: { type: string }
71
+ - in: query
72
+ name: disabled
73
+ description: "`true` returns only soft-deleted categories, `false` only live ones. Omitted returns both."
74
+ schema: { type: boolean }
75
+ - in: query
76
+ name: from_updatedAt
77
+ description: Return categories with `updatedAt` on/after this Unix timestamp (ms); snapped to start of day unless `exact_time=true`.
78
+ schema: { type: number }
79
+ - in: query
80
+ name: to_updatedAt
81
+ description: Return categories with `updatedAt` on/before this Unix timestamp (ms).
82
+ schema: { type: number }
83
+ - in: query
84
+ name: from_createdAt
85
+ description: Return categories with `createdAt` on/after this Unix timestamp (ms).
86
+ schema: { type: number }
87
+ - in: query
88
+ name: to_createdAt
89
+ description: Return categories with `createdAt` on/before this Unix timestamp (ms).
90
+ schema: { type: number }
91
+ - in: query
92
+ name: populatedKeys
93
+ description: |
94
+ Joins to include. `labels` is emitted under `labels_populated`;
95
+ `model_settings.model` / `model_settings.model_version` replace the
96
+ ids inside each `model_settings[]` item in place.
97
+ schema:
98
+ type: array
99
+ items:
100
+ type: string
101
+ enum: [labels, model_settings.model, model_settings.model_version]
102
+ - in: query
103
+ name: per_page
104
+ description: Page size (capped by the server's pagination max).
105
+ schema: { type: integer, minimum: 1 }
106
+ example: 20
107
+ - in: query
108
+ name: page
109
+ description: 1-based page number.
110
+ schema: { type: integer, minimum: 1 }
111
+ example: 1
112
+ - in: query
113
+ name: sort
114
+ description: Field to sort by. Defaults to `_id`.
115
+ schema: { type: string, default: _id }
116
+ - in: query
117
+ name: sortPageOrder
118
+ description: Sort direction. Defaults to descending.
119
+ schema: { type: string, enum: [asc, dsc], default: dsc }
120
+ responses:
121
+ "200":
122
+ description: Paginated categories.
123
+ content:
124
+ application/json:
125
+ schema:
126
+ $ref: "#/components/schemas/CategoryFindResult"
127
+ post:
128
+ summary: Create a detection category
129
+ description: 'Each `model_settings` item must name a `model` (400 otherwise). A `model_version` of `latest`, `""` or `null` is normalised to unset (= track the model''s current version).'
130
+ operationId: createAiObjectDetectionCategory
131
+ requestBody:
132
+ required: true
133
+ content:
134
+ application/json:
135
+ schema:
136
+ $ref: "#/components/schemas/CategoryCreateBody"
137
+ responses:
138
+ "201":
139
+ description: The created category.
140
+ content:
141
+ application/json:
142
+ schema:
143
+ $ref: "#/components/schemas/CategorySchema"
144
+ "400":
145
+ description: "`model_settings` is not an array, an item lacks `model`, or the name already exists among live categories."
146
+ /ai-object-detection-category/{id}:
147
+ get:
148
+ summary: Get one detection category
149
+ operationId: getAiObjectDetectionCategory
150
+ parameters:
151
+ - in: path
152
+ name: id
153
+ required: true
154
+ schema: { type: string }
155
+ responses:
156
+ "200":
157
+ description: The category document (no population on get).
158
+ content:
159
+ application/json:
160
+ schema:
161
+ $ref: "#/components/schemas/CategorySchema"
162
+ "400":
163
+ description: No category with that id in the caller's namespace.
164
+ put:
165
+ summary: Update a detection category
166
+ description: "Standard put (mongoose `updateOne` with validators). `model_settings`, when present, is normalised and validated as on create."
167
+ operationId: updateAiObjectDetectionCategory
168
+ parameters:
169
+ - in: path
170
+ name: id
171
+ required: true
172
+ schema: { type: string }
173
+ requestBody:
174
+ required: true
175
+ content:
176
+ application/json:
177
+ schema:
178
+ $ref: "#/components/schemas/CategoryUpdateBody"
179
+ responses:
180
+ "200":
181
+ description: The category document after the update is applied.
182
+ content:
183
+ application/json:
184
+ schema:
185
+ $ref: "#/components/schemas/CategorySchema"
186
+ "404":
187
+ description: No category with that id in the caller's namespace.
188
+ delete:
189
+ summary: Soft-delete a detection category
190
+ description: |
191
+ Sets `disabled: true`. Fails with 400 when live sessions still reference
192
+ the category (error data `{ assigned_sessions: <n>, requires_force: true }`)
193
+ — retry with `?force=true` to detach it from those sessions first (the
194
+ dashboard asks for explicit confirmation).
195
+ operationId: removeAiObjectDetectionCategory
196
+ parameters:
197
+ - in: path
198
+ name: id
199
+ required: true
200
+ schema: { type: string }
201
+ - in: query
202
+ name: force
203
+ description: |
204
+ When `true`, a category still referenced by sessions is detached
205
+ from them (their `category` field is unset) and then deleted.
206
+ schema: { type: boolean, default: false }
207
+ responses:
208
+ "200":
209
+ description: The soft-deleted category document.
210
+ content:
211
+ application/json:
212
+ schema:
213
+ $ref: "#/components/schemas/CategorySchema"
214
+ "400":
215
+ description: Sessions still reference the category (and `force` was not set), or it was not found.
216
+ components:
217
+ securitySchemes:
218
+ ApiKeyAuth:
219
+ type: apiKey
220
+ in: header
221
+ name: api-key
222
+ description: |
223
+ Server-issued API key. Also accepted via the `x-api-key` header or the
224
+ `?apiKey=` query parameter as fallbacks.
225
+ JwtAuth:
226
+ type: apiKey
227
+ in: header
228
+ name: Authorization
229
+ description: |
230
+ Raw JWT in the `Authorization` header — **no `Bearer ` prefix**.
231
+ Obtained from `POST /authenticate` (admin / rep / client login).
232
+ schemas:
233
+ ModelSetting:
234
+ type: object
235
+ description: |
236
+ One auto-analysis recipe. A category with N items produces N analyses
237
+ per received session (run serially).
238
+ required:
239
+ - model
240
+ properties:
241
+ _id:
242
+ type: string
243
+ description: Sub-document id (server-assigned).
244
+ model:
245
+ type: string
246
+ description: |
247
+ `ai-object-detection-model` `_id`. Required — it names which model to
248
+ run, and (when `model_version` is omitted) the target whose
249
+ `current_model_version` resolves the "latest" version.
250
+ model_version:
251
+ type: string
252
+ nullable: true
253
+ description: |
254
+ `ai-object-detection-model-version` `_id` the auto-analysis infers
255
+ with. Omit (or send the sentinel `latest`, `""` or `null`, all
256
+ normalised to unset) to track the model's `current_model_version` —
257
+ the latest trained version at analysis time.
258
+ config:
259
+ type: object
260
+ additionalProperties: true
261
+ description: |
262
+ Analyze-session settings applied to the run — the same object the
263
+ dashboard's Analyze 3D Scene dialog posts (`conf`, `iou`, walk
264
+ params, `reclassify_*`, `size_gate*`, `build_point_cloud`, ...).
265
+ Unset keys fall back to the scene-math defaults.
266
+ CategoryCreateBody:
267
+ type: object
268
+ description: "Body for creating a category. `company_namespace` is optional for SDK callers and otherwise injected from the caller's session."
269
+ required:
270
+ - name
271
+ properties:
272
+ name:
273
+ type: string
274
+ description: Unique per namespace among non-deleted categories.
275
+ model_settings:
276
+ type: array
277
+ items:
278
+ $ref: "#/components/schemas/ModelSetting"
279
+ labels:
280
+ type: array
281
+ items: { type: string }
282
+ description: "`ai-object-detection-label` ids the category tracks (jobs/metrics inputs)."
283
+ company_namespace:
284
+ type: array
285
+ items: { type: string }
286
+ description: Optional tenant namespace override for SDK callers.
287
+ CategoryUpdateBody:
288
+ type: object
289
+ description: "Body for updating a category. `company_namespace` is derived from the caller's session — do not send it."
290
+ properties:
291
+ name: { type: string }
292
+ model_settings:
293
+ type: array
294
+ items:
295
+ $ref: "#/components/schemas/ModelSetting"
296
+ labels:
297
+ type: array
298
+ items: { type: string }
299
+ disabled:
300
+ type: boolean
301
+ description: "Soft-delete flag — set `true` to disable via update."
302
+ CategorySchema:
303
+ type: object
304
+ properties:
305
+ _id: { type: string }
306
+ name: { type: string }
307
+ model_settings:
308
+ type: array
309
+ items:
310
+ $ref: "#/components/schemas/ModelSetting"
311
+ labels:
312
+ type: array
313
+ items: { type: string }
314
+ disabled: { type: boolean }
315
+ company_namespace:
316
+ type: array
317
+ items: { type: string }
318
+ description: Tenant key (server-injected).
319
+ createdAt: { type: string, format: date-time }
320
+ updatedAt: { type: string, format: date-time }
321
+ CategoryFindResult:
322
+ type: object
323
+ description: Standard paginated result envelope.
324
+ properties:
325
+ data:
326
+ type: array
327
+ items:
328
+ $ref: "#/components/schemas/CategorySchema"
329
+ total_result: { type: number }
330
+ current_count: { type: number }
331
+ total_pages: { type: number }
332
+ current_page: { type: number }
333
+ per_page: { type: number }
334
+ first_page_url: { type: string }
335
+ last_page_url: { type: string }
336
+ next_page_url: { type: string, nullable: true }
337
+ prev_page_url: { type: string, nullable: true }
338
+ path: { type: string }
@@ -0,0 +1,342 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: Repzo API - AI Object Detection Dataset
4
+ version: 1.0.0
5
+ description: |
6
+ Training **datasets** for the AI object-detection pipeline — a named set of
7
+ `dataset_labels` (see `ai-object-detection-label`) plus a `default_model` and
8
+ `default_model_version` used when training/predicting.
9
+
10
+ **Who calls it.** Back-office admins (AI configuration). Scoped by
11
+ `company_namespace[]`; soft-delete via `disabled`. `PATCH` is not allowed
12
+ (400). Part of the `ai-object-detection-*` family.
13
+
14
+ **Key relationships.** `dataset_labels[]` → `ai-object-detection-label`;
15
+ `default_model` → `ai-object-detection-model`; `default_model_version` →
16
+ `ai-object-detection-model-version`. Tasks join a dataset through their own
17
+ `task_dataset[]` (see `ai-object-detection-task`), and a model version pins
18
+ one or more datasets when it is created. Any of the three refs can be
19
+ populated with `populatedKeys[]`; the populated document is returned under
20
+ `<field>_populated` while the original field keeps the id.
21
+
22
+ **The `latest` sentinel.** `default_model_version` may be sent as a version
23
+ `_id`, or as `latest` / `""` / `null`. The sentinel is normalized to `null`
24
+ server-side (never cast to an ObjectId) and `null` resolves to the model's
25
+ `current_model_version` at inference time — which auto-advances to the
26
+ newest trained version. Sending the sentinel on update actively clears a
27
+ previously pinned version. `name` is unique per namespace.
28
+ servers:
29
+ - url: https://sv.api.repzo.me
30
+ security:
31
+ - ApiKeyAuth: []
32
+ - JwtAuth: []
33
+ paths:
34
+ /ai-object-detection-dataset:
35
+ get:
36
+ summary: Find datasets
37
+ operationId: findAiObjectDetectionDatasets
38
+ parameters:
39
+ - in: query
40
+ name: _id
41
+ description: "Filter by dataset `_id`. Pass once or as `?_id[]=...` for multiple."
42
+ schema:
43
+ oneOf:
44
+ - type: string
45
+ - type: array
46
+ items: { type: string }
47
+ - in: query
48
+ name: name
49
+ description: Exact-match on `name` (one or many).
50
+ schema:
51
+ oneOf:
52
+ - type: string
53
+ - type: array
54
+ items: { type: string }
55
+ - in: query
56
+ name: dataset_labels
57
+ description: Datasets containing any of the given label ids.
58
+ schema:
59
+ oneOf:
60
+ - type: string
61
+ - type: array
62
+ items: { type: string }
63
+ - in: query
64
+ name: default_model
65
+ description: Filter by default model id (one or many).
66
+ schema:
67
+ oneOf:
68
+ - type: string
69
+ - type: array
70
+ items: { type: string }
71
+ - in: query
72
+ name: default_model_version
73
+ description: Filter by pinned default model-version id (one or many).
74
+ schema:
75
+ oneOf:
76
+ - type: string
77
+ - type: array
78
+ items: { type: string }
79
+ - in: query
80
+ name: search
81
+ description: Case-insensitive regex match on `name` (whitespace matches any run of characters).
82
+ schema: { type: string }
83
+ example: shelf
84
+ - in: query
85
+ name: disabled
86
+ description: Include soft-deleted datasets. Defaults to `false`.
87
+ schema: { type: boolean, default: false }
88
+ - in: query
89
+ name: from_updatedAt
90
+ description: Only datasets with `updatedAt` on/after this Unix timestamp (ms), start of that day in the caller's timezone.
91
+ schema: { type: number }
92
+ - in: query
93
+ name: to_updatedAt
94
+ description: Only datasets with `updatedAt` on/before this Unix timestamp (ms), end of that day.
95
+ schema: { type: number }
96
+ - in: query
97
+ name: from_createdAt
98
+ description: Only datasets with `createdAt` on/after this Unix timestamp (ms).
99
+ schema: { type: number }
100
+ - in: query
101
+ name: to_createdAt
102
+ description: Only datasets with `createdAt` on/before this Unix timestamp (ms).
103
+ schema: { type: number }
104
+ - in: query
105
+ name: populatedKeys
106
+ description: "Refs to populate. Each is returned under `<field>_populated`; the original field keeps the id(s). Encode as `?populatedKeys[]=default_model`."
107
+ schema:
108
+ type: array
109
+ items:
110
+ type: string
111
+ enum: [dataset_labels, default_model, default_model_version]
112
+ - in: query
113
+ name: per_page
114
+ schema: { type: integer, minimum: 1, maximum: 50000 }
115
+ example: 20
116
+ - in: query
117
+ name: page
118
+ schema: { type: integer, minimum: 1 }
119
+ example: 1
120
+ - in: query
121
+ name: sort
122
+ description: Field to sort by. Defaults to `_id`.
123
+ schema: { type: string }
124
+ - in: query
125
+ name: sortPageOrder
126
+ description: Sort direction. Defaults to descending.
127
+ schema: { type: string, enum: [asc, dsc] }
128
+ responses:
129
+ "200":
130
+ {
131
+ description: Paginated list of datasets.,
132
+ content:
133
+ {
134
+ application/json:
135
+ {
136
+ schema:
137
+ { $ref: "#/components/schemas/OdDatasetFindResult" },
138
+ },
139
+ },
140
+ }
141
+ post:
142
+ summary: Create a dataset
143
+ operationId: createAiObjectDetectionDataset
144
+ requestBody:
145
+ {
146
+ required: true,
147
+ content:
148
+ {
149
+ application/json:
150
+ {
151
+ schema: { $ref: "#/components/schemas/OdDatasetCreateBody" },
152
+ },
153
+ },
154
+ }
155
+ responses:
156
+ "201":
157
+ {
158
+ description: The created dataset.,
159
+ content:
160
+ {
161
+ application/json:
162
+ { schema: { $ref: "#/components/schemas/OdDatasetSchema" } },
163
+ },
164
+ }
165
+ /ai-object-detection-dataset/{id}:
166
+ get:
167
+ summary: Get a dataset by id
168
+ operationId: getAiObjectDetectionDataset
169
+ parameters:
170
+ - { in: path, name: id, required: true, schema: { type: string } }
171
+ - in: query
172
+ name: populatedKeys
173
+ description: Refs to populate (same semantics as on find).
174
+ schema:
175
+ type: array
176
+ items:
177
+ type: string
178
+ enum: [dataset_labels, default_model, default_model_version]
179
+ responses:
180
+ "200":
181
+ {
182
+ description: The dataset.,
183
+ content:
184
+ {
185
+ application/json:
186
+ { schema: { $ref: "#/components/schemas/OdDatasetSchema" } },
187
+ },
188
+ }
189
+ "400": { description: No dataset with that id. }
190
+ put:
191
+ summary: Update a dataset
192
+ description: 'Full-document style update (`updateOne` with validators). The `latest` / `""` / `null` sentinel on `default_model_version` clears the pin.'
193
+ operationId: updateAiObjectDetectionDataset
194
+ parameters:
195
+ [{ in: path, name: id, required: true, schema: { type: string } }]
196
+ requestBody:
197
+ {
198
+ required: true,
199
+ content:
200
+ {
201
+ application/json:
202
+ {
203
+ schema: { $ref: "#/components/schemas/OdDatasetUpdateBody" },
204
+ },
205
+ },
206
+ }
207
+ responses:
208
+ "200":
209
+ {
210
+ description: The dataset after the update.,
211
+ content:
212
+ {
213
+ application/json:
214
+ { schema: { $ref: "#/components/schemas/OdDatasetSchema" } },
215
+ },
216
+ }
217
+ "404": { description: No dataset with that id. }
218
+ delete:
219
+ summary: Soft-delete a dataset
220
+ description: "Sets `disabled: true`."
221
+ operationId: removeAiObjectDetectionDataset
222
+ parameters:
223
+ [{ in: path, name: id, required: true, schema: { type: string } }]
224
+ responses:
225
+ "200":
226
+ {
227
+ description: The dataset after soft-deletion.,
228
+ content:
229
+ {
230
+ application/json:
231
+ { schema: { $ref: "#/components/schemas/OdDatasetSchema" } },
232
+ },
233
+ }
234
+ components:
235
+ securitySchemes:
236
+ ApiKeyAuth:
237
+ {
238
+ type: apiKey,
239
+ in: header,
240
+ name: api-key,
241
+ description: "Server-issued API key. Also `x-api-key` header or `?apiKey=` query.",
242
+ }
243
+ JwtAuth:
244
+ {
245
+ type: apiKey,
246
+ in: header,
247
+ name: Authorization,
248
+ description: "Raw JWT — no `Bearer ` prefix. From `POST /authenticate`.",
249
+ }
250
+ schemas:
251
+ OdDatasetSchema:
252
+ type: object
253
+ properties:
254
+ _id: { type: string }
255
+ name: { type: string, description: Unique per namespace. }
256
+ dataset_labels:
257
+ {
258
+ type: array,
259
+ items: { type: string },
260
+ description: Label ids in the dataset.,
261
+ }
262
+ default_model:
263
+ { type: string, description: "`ai-object-detection-model` id." }
264
+ default_model_version:
265
+ {
266
+ type: string,
267
+ nullable: true,
268
+ description: "Pinned default version, or `null` = latest (resolves to the model's `current_model_version` at inference time).",
269
+ }
270
+ dataset_labels_populated:
271
+ type: array
272
+ description: "Present when `populatedKeys[]` includes `dataset_labels` — the `ai-object-detection-label` documents."
273
+ items: { type: object, additionalProperties: true }
274
+ default_model_populated:
275
+ type: object
276
+ nullable: true
277
+ additionalProperties: true
278
+ description: "Present when `populatedKeys[]` includes `default_model` — the `ai-object-detection-model` document."
279
+ default_model_version_populated:
280
+ type: object
281
+ nullable: true
282
+ additionalProperties: true
283
+ description: "Present when `populatedKeys[]` includes `default_model_version` — the `ai-object-detection-model-version` document."
284
+ disabled: { type: boolean }
285
+ company_namespace: { type: array, items: { type: string } }
286
+ createdAt: { type: string, format: date-time }
287
+ updatedAt: { type: string, format: date-time }
288
+ OdDatasetCreateBody:
289
+ type: object
290
+ description: "Body for creating a dataset. The tenant key (`company_namespace`) is optional for SDK callers and is otherwise injected from the caller's session."
291
+ required: [name, dataset_labels]
292
+ properties:
293
+ name: { type: string }
294
+ dataset_labels:
295
+ {
296
+ type: array,
297
+ items: { type: string },
298
+ description: "`ai-object-detection-label` ids.",
299
+ }
300
+ default_model: { type: string }
301
+ default_model_version:
302
+ {
303
+ type: string,
304
+ nullable: true,
305
+ description: 'Pinned version `_id`; or send `latest` / `""` / `null` to track the model''s `current_model_version` (the sentinel is normalized to `null` server-side, never cast to an ObjectId).',
306
+ }
307
+ company_namespace:
308
+ type: array
309
+ items: { type: string }
310
+ description: Optional tenant namespace override for SDK callers.
311
+ OdDatasetUpdateBody:
312
+ type: object
313
+ description: "Body for updating a dataset. `company_namespace` is derived from the caller's session — do not send it. Set `disabled: true` to soft-delete."
314
+ properties:
315
+ name: { type: string }
316
+ dataset_labels: { type: array, items: { type: string } }
317
+ default_model: { type: string }
318
+ default_model_version:
319
+ {
320
+ type: string,
321
+ nullable: true,
322
+ description: 'Pinned version `_id`; `latest` / `""` / `null` actively clears a previously pinned version.',
323
+ }
324
+ disabled: { type: boolean }
325
+ OdDatasetFindResult:
326
+ type: object
327
+ properties:
328
+ data:
329
+ {
330
+ type: array,
331
+ items: { $ref: "#/components/schemas/OdDatasetSchema" },
332
+ }
333
+ total_result: { type: number }
334
+ current_count: { type: number }
335
+ total_pages: { type: number }
336
+ current_page: { type: number }
337
+ per_page: { type: number }
338
+ first_page_url: { type: string }
339
+ last_page_url: { type: string }
340
+ next_page_url: { type: string, nullable: true }
341
+ prev_page_url: { type: string, nullable: true }
342
+ path: { type: string }