repzo 1.0.292 → 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.
- package/changelog.md +28 -0
- package/lib/index.d.ts +244 -2
- package/lib/index.js +541 -0
- package/lib/types/index.d.ts +4530 -1
- package/package.json +1 -1
- package/src/index.ts +1270 -0
- package/src/oas/activity-ai-object-detection-session-frame.yaml +600 -0
- package/src/oas/ai-object-detection-assigned-missions.yaml +283 -0
- package/src/oas/ai-object-detection-assignment-rule.yaml +357 -0
- package/src/oas/ai-object-detection-category.yaml +338 -0
- package/src/oas/ai-object-detection-dataset.yaml +342 -0
- package/src/oas/ai-object-detection-detection-settings.yaml +410 -0
- package/src/oas/ai-object-detection-inference.yaml +818 -0
- package/src/oas/ai-object-detection-label-group.yaml +265 -0
- package/src/oas/ai-object-detection-label-report.yaml +366 -0
- package/src/oas/ai-object-detection-label.yaml +395 -0
- package/src/oas/ai-object-detection-metric-result.yaml +734 -0
- package/src/oas/ai-object-detection-metric.yaml +559 -0
- package/src/oas/ai-object-detection-mission-results.yaml +370 -0
- package/src/oas/ai-object-detection-mission-set.yaml +250 -0
- package/src/oas/ai-object-detection-mission.yaml +349 -0
- package/src/oas/ai-object-detection-model-version-epoch.yaml +214 -0
- package/src/oas/ai-object-detection-model-version-train-agent.yaml +88 -0
- package/src/oas/ai-object-detection-model-version.yaml +567 -0
- package/src/oas/ai-object-detection-model.yaml +369 -0
- package/src/oas/ai-object-detection-segment.yaml +301 -0
- package/src/oas/ai-object-detection-session-analysis.yaml +1306 -0
- package/src/oas/ai-object-detection-session-election.yaml +193 -0
- package/src/oas/ai-object-detection-session-insight.yaml +418 -0
- package/src/oas/ai-object-detection-session.yaml +840 -0
- package/src/oas/ai-object-detection-settings.yaml +249 -0
- package/src/oas/ai-object-detection-task.yaml +1007 -0
- package/src/oas/object-detection-analytics-report.yaml +674 -0
- package/src/types/index.ts +5156 -1
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
openapi: 3.0.3
|
|
2
|
+
info:
|
|
3
|
+
title: Repzo API - AI Object Detection Label
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: |
|
|
6
|
+
Defines **object-detection label classes** — a named class (with an optional
|
|
7
|
+
annotation `keyboard_shortcut` and a reference crop `media_photo`) linked to
|
|
8
|
+
the products / variants / brands / categories / sub-categories / groups it
|
|
9
|
+
represents. Labels are the vocabulary every other object-detection service
|
|
10
|
+
speaks: datasets group them (`ai-object-detection-dataset`), task
|
|
11
|
+
annotations point at them, categories and segments list them, and the label
|
|
12
|
+
report (`ai-object-detection-label-report`) measures their annotation
|
|
13
|
+
health.
|
|
14
|
+
|
|
15
|
+
**Dims reclassifier inputs.** `label_group` places the label in a family of
|
|
16
|
+
sibling labels (size / flavour variants of one line); a detection may only
|
|
17
|
+
be re-labelled BETWEEN labels sharing a group. `physical_size` (`w_cm`,
|
|
18
|
+
`h_cm`, centimetres) is the expected front-face size — optional, and the
|
|
19
|
+
reclassifier skips labels without it. It can be filled by hand or from the
|
|
20
|
+
label report's `mode=dims` smart analyzer.
|
|
21
|
+
|
|
22
|
+
**Who calls it.** Back-office admins (label screen). Scoped by
|
|
23
|
+
`company_namespace[]` (injected from the caller's session); `name` is
|
|
24
|
+
unique per namespace and must match `^[a-zA-Z_][a-zA-Z0-9_\s]*$`.
|
|
25
|
+
Soft-delete via `disabled`; `DELETE` is blocked while any dataset still
|
|
26
|
+
lists the label in `dataset_labels`. Creating or updating a label with a
|
|
27
|
+
`media_photo` links that media document to the label so it is not swept as
|
|
28
|
+
orphaned media. `PATCH` is not allowed (400).
|
|
29
|
+
|
|
30
|
+
**Population.** `populatedKeys[]` on find/get embeds the linked documents
|
|
31
|
+
under `<field>_populated` (`label_group`, `media_photo`, `variants`,
|
|
32
|
+
`products`, `product_categories`, `product_subcategories`,
|
|
33
|
+
`product_brands`, `product_groups`).
|
|
34
|
+
servers:
|
|
35
|
+
- url: https://sv.api.repzo.me
|
|
36
|
+
security:
|
|
37
|
+
- ApiKeyAuth: []
|
|
38
|
+
- JwtAuth: []
|
|
39
|
+
paths:
|
|
40
|
+
/ai-object-detection-label:
|
|
41
|
+
get:
|
|
42
|
+
summary: Find labels
|
|
43
|
+
operationId: findAiObjectDetectionLabels
|
|
44
|
+
parameters:
|
|
45
|
+
- in: query
|
|
46
|
+
name: _id
|
|
47
|
+
description: Filter by label `_id`. Pass once or as `?_id[]=...` for multiple.
|
|
48
|
+
schema:
|
|
49
|
+
oneOf:
|
|
50
|
+
- type: string
|
|
51
|
+
- type: array
|
|
52
|
+
items: { type: string }
|
|
53
|
+
- in: query
|
|
54
|
+
name: name
|
|
55
|
+
description: Exact-match on `name` (single value or list).
|
|
56
|
+
schema:
|
|
57
|
+
oneOf:
|
|
58
|
+
- type: string
|
|
59
|
+
- type: array
|
|
60
|
+
items: { type: string }
|
|
61
|
+
- in: query
|
|
62
|
+
name: search
|
|
63
|
+
description: Case-insensitive substring / regex match on `name`.
|
|
64
|
+
schema: { type: string }
|
|
65
|
+
example: heinz
|
|
66
|
+
- in: query
|
|
67
|
+
name: label_group
|
|
68
|
+
description: Filter by `ai-object-detection-label-group` id(s).
|
|
69
|
+
schema:
|
|
70
|
+
oneOf:
|
|
71
|
+
- type: string
|
|
72
|
+
- type: array
|
|
73
|
+
items: { type: string }
|
|
74
|
+
- in: query
|
|
75
|
+
name: variants
|
|
76
|
+
description: Filter by linked variant id(s) — pass once or as `?variants[]=`.
|
|
77
|
+
schema:
|
|
78
|
+
oneOf:
|
|
79
|
+
- type: string
|
|
80
|
+
- type: array
|
|
81
|
+
items: { type: string }
|
|
82
|
+
- in: query
|
|
83
|
+
name: products
|
|
84
|
+
description: Filter by linked product id(s).
|
|
85
|
+
schema:
|
|
86
|
+
oneOf:
|
|
87
|
+
- type: string
|
|
88
|
+
- type: array
|
|
89
|
+
items: { type: string }
|
|
90
|
+
- in: query
|
|
91
|
+
name: product_categories
|
|
92
|
+
description: Filter by linked product category id(s).
|
|
93
|
+
schema:
|
|
94
|
+
oneOf:
|
|
95
|
+
- type: string
|
|
96
|
+
- type: array
|
|
97
|
+
items: { type: string }
|
|
98
|
+
- in: query
|
|
99
|
+
name: product_subcategories
|
|
100
|
+
description: Filter by linked product sub-category id(s).
|
|
101
|
+
schema:
|
|
102
|
+
oneOf:
|
|
103
|
+
- type: string
|
|
104
|
+
- type: array
|
|
105
|
+
items: { type: string }
|
|
106
|
+
- in: query
|
|
107
|
+
name: product_brands
|
|
108
|
+
description: Filter by linked product brand id(s).
|
|
109
|
+
schema:
|
|
110
|
+
oneOf:
|
|
111
|
+
- type: string
|
|
112
|
+
- type: array
|
|
113
|
+
items: { type: string }
|
|
114
|
+
- in: query
|
|
115
|
+
name: product_groups
|
|
116
|
+
description: Filter by linked product group id(s).
|
|
117
|
+
schema:
|
|
118
|
+
oneOf:
|
|
119
|
+
- type: string
|
|
120
|
+
- type: array
|
|
121
|
+
items: { type: string }
|
|
122
|
+
- in: query
|
|
123
|
+
name: disabled
|
|
124
|
+
description: "`true` returns only soft-deleted labels, `false` only live ones. Omitted returns both."
|
|
125
|
+
schema: { type: boolean }
|
|
126
|
+
- in: query
|
|
127
|
+
name: from_updatedAt
|
|
128
|
+
description: Return labels with `updatedAt` on/after this Unix timestamp (ms); snapped to start of day unless `exact_time=true`.
|
|
129
|
+
schema: { type: number }
|
|
130
|
+
- in: query
|
|
131
|
+
name: to_updatedAt
|
|
132
|
+
description: Return labels with `updatedAt` on/before this Unix timestamp (ms).
|
|
133
|
+
schema: { type: number }
|
|
134
|
+
- in: query
|
|
135
|
+
name: from_createdAt
|
|
136
|
+
description: Return labels with `createdAt` on/after this Unix timestamp (ms).
|
|
137
|
+
schema: { type: number }
|
|
138
|
+
- in: query
|
|
139
|
+
name: to_createdAt
|
|
140
|
+
description: Return labels with `createdAt` on/before this Unix timestamp (ms).
|
|
141
|
+
schema: { type: number }
|
|
142
|
+
- in: query
|
|
143
|
+
name: populatedKeys
|
|
144
|
+
description: Joins to embed under `<field>_populated`.
|
|
145
|
+
schema:
|
|
146
|
+
type: array
|
|
147
|
+
items:
|
|
148
|
+
type: string
|
|
149
|
+
enum:
|
|
150
|
+
- label_group
|
|
151
|
+
- media_photo
|
|
152
|
+
- variants
|
|
153
|
+
- products
|
|
154
|
+
- product_categories
|
|
155
|
+
- product_subcategories
|
|
156
|
+
- product_brands
|
|
157
|
+
- product_groups
|
|
158
|
+
- in: query
|
|
159
|
+
name: per_page
|
|
160
|
+
description: Page size (capped by the server's pagination max).
|
|
161
|
+
schema: { type: integer, minimum: 1 }
|
|
162
|
+
example: 20
|
|
163
|
+
- in: query
|
|
164
|
+
name: page
|
|
165
|
+
description: 1-based page number.
|
|
166
|
+
schema: { type: integer, minimum: 1 }
|
|
167
|
+
example: 1
|
|
168
|
+
- in: query
|
|
169
|
+
name: sort
|
|
170
|
+
description: Field to sort by. Defaults to `_id`.
|
|
171
|
+
schema: { type: string, default: _id }
|
|
172
|
+
- in: query
|
|
173
|
+
name: sortPageOrder
|
|
174
|
+
description: Sort direction. Defaults to descending.
|
|
175
|
+
schema: { type: string, enum: [asc, dsc], default: dsc }
|
|
176
|
+
responses:
|
|
177
|
+
"200":
|
|
178
|
+
description: Paginated list of labels.
|
|
179
|
+
content:
|
|
180
|
+
application/json:
|
|
181
|
+
schema:
|
|
182
|
+
$ref: "#/components/schemas/OdLabelFindResult"
|
|
183
|
+
post:
|
|
184
|
+
summary: Create a label
|
|
185
|
+
description: "Creates a label. When `media_photo` is set the media document is linked to the new label. `name` must be unique per namespace."
|
|
186
|
+
operationId: createAiObjectDetectionLabel
|
|
187
|
+
requestBody:
|
|
188
|
+
required: true
|
|
189
|
+
content:
|
|
190
|
+
application/json:
|
|
191
|
+
schema:
|
|
192
|
+
$ref: "#/components/schemas/OdLabelCreateBody"
|
|
193
|
+
responses:
|
|
194
|
+
"201":
|
|
195
|
+
description: The created label.
|
|
196
|
+
content:
|
|
197
|
+
application/json:
|
|
198
|
+
schema:
|
|
199
|
+
$ref: "#/components/schemas/OdLabelSchema"
|
|
200
|
+
/ai-object-detection-label/{id}:
|
|
201
|
+
get:
|
|
202
|
+
summary: Get a label by id
|
|
203
|
+
operationId: getAiObjectDetectionLabel
|
|
204
|
+
parameters:
|
|
205
|
+
- in: path
|
|
206
|
+
name: id
|
|
207
|
+
required: true
|
|
208
|
+
schema: { type: string }
|
|
209
|
+
- in: query
|
|
210
|
+
name: populatedKeys
|
|
211
|
+
description: Joins to embed under `<field>_populated` (same set as on find).
|
|
212
|
+
schema:
|
|
213
|
+
type: array
|
|
214
|
+
items:
|
|
215
|
+
type: string
|
|
216
|
+
enum:
|
|
217
|
+
- label_group
|
|
218
|
+
- media_photo
|
|
219
|
+
- variants
|
|
220
|
+
- products
|
|
221
|
+
- product_categories
|
|
222
|
+
- product_subcategories
|
|
223
|
+
- product_brands
|
|
224
|
+
- product_groups
|
|
225
|
+
responses:
|
|
226
|
+
"200":
|
|
227
|
+
description: The label.
|
|
228
|
+
content:
|
|
229
|
+
application/json:
|
|
230
|
+
schema:
|
|
231
|
+
$ref: "#/components/schemas/OdLabelSchema"
|
|
232
|
+
"400":
|
|
233
|
+
description: No label with that id in the caller's namespace.
|
|
234
|
+
put:
|
|
235
|
+
summary: Update a label
|
|
236
|
+
description: "Standard put (mongoose `updateOne` with validators). Set `disabled: true` to soft-delete. If the result carries a `media_photo` the media document is (re-)linked to the label."
|
|
237
|
+
operationId: updateAiObjectDetectionLabel
|
|
238
|
+
parameters:
|
|
239
|
+
- in: path
|
|
240
|
+
name: id
|
|
241
|
+
required: true
|
|
242
|
+
schema: { type: string }
|
|
243
|
+
requestBody:
|
|
244
|
+
required: true
|
|
245
|
+
content:
|
|
246
|
+
application/json:
|
|
247
|
+
schema:
|
|
248
|
+
$ref: "#/components/schemas/OdLabelUpdateBody"
|
|
249
|
+
responses:
|
|
250
|
+
"200":
|
|
251
|
+
description: The label after the update.
|
|
252
|
+
content:
|
|
253
|
+
application/json:
|
|
254
|
+
schema:
|
|
255
|
+
$ref: "#/components/schemas/OdLabelSchema"
|
|
256
|
+
"404":
|
|
257
|
+
description: No label with that id in the caller's namespace.
|
|
258
|
+
delete:
|
|
259
|
+
summary: Soft-delete a label
|
|
260
|
+
description: "Sets `disabled: true`. Rejected with 400 while the label is listed in any dataset's `dataset_labels` — remove it from those datasets first."
|
|
261
|
+
operationId: removeAiObjectDetectionLabel
|
|
262
|
+
parameters:
|
|
263
|
+
- in: path
|
|
264
|
+
name: id
|
|
265
|
+
required: true
|
|
266
|
+
schema: { type: string }
|
|
267
|
+
responses:
|
|
268
|
+
"200":
|
|
269
|
+
description: The label after soft-deletion.
|
|
270
|
+
content:
|
|
271
|
+
application/json:
|
|
272
|
+
schema:
|
|
273
|
+
$ref: "#/components/schemas/OdLabelSchema"
|
|
274
|
+
"400":
|
|
275
|
+
description: The label is still associated with one or more datasets, or was not found.
|
|
276
|
+
components:
|
|
277
|
+
securitySchemes:
|
|
278
|
+
ApiKeyAuth:
|
|
279
|
+
type: apiKey
|
|
280
|
+
in: header
|
|
281
|
+
name: api-key
|
|
282
|
+
description: |
|
|
283
|
+
Server-issued API key. Also accepted via the `x-api-key` header or the
|
|
284
|
+
`?apiKey=` query parameter as fallbacks.
|
|
285
|
+
JwtAuth:
|
|
286
|
+
type: apiKey
|
|
287
|
+
in: header
|
|
288
|
+
name: Authorization
|
|
289
|
+
description: |
|
|
290
|
+
Raw JWT in the `Authorization` header — **no `Bearer ` prefix**.
|
|
291
|
+
Obtained from `POST /authenticate` (admin / rep / client login).
|
|
292
|
+
schemas:
|
|
293
|
+
OdLabelPhysicalSize:
|
|
294
|
+
type: object
|
|
295
|
+
description: Expected physical front-face size in centimetres. Each axis accepts 0.1–500.
|
|
296
|
+
properties:
|
|
297
|
+
w_cm: { type: number, minimum: 0.1, maximum: 500 }
|
|
298
|
+
h_cm: { type: number, minimum: 0.1, maximum: 500 }
|
|
299
|
+
OdLabelSchema:
|
|
300
|
+
type: object
|
|
301
|
+
properties:
|
|
302
|
+
_id: { type: string }
|
|
303
|
+
name:
|
|
304
|
+
type: string
|
|
305
|
+
description: "Unique per namespace; must match `^[a-zA-Z_][a-zA-Z0-9_\\s]*$`."
|
|
306
|
+
keyboard_shortcut:
|
|
307
|
+
type: string
|
|
308
|
+
description: "Annotation hot-key — one lower-case letter or digit, excluding `i`, `o` and `_`."
|
|
309
|
+
media_photo:
|
|
310
|
+
type: string
|
|
311
|
+
description: Reference crop media id.
|
|
312
|
+
products: { type: array, items: { type: string } }
|
|
313
|
+
variants: { type: array, items: { type: string } }
|
|
314
|
+
product_brands: { type: array, items: { type: string } }
|
|
315
|
+
product_categories: { type: array, items: { type: string } }
|
|
316
|
+
product_subcategories: { type: array, items: { type: string } }
|
|
317
|
+
product_groups: { type: array, items: { type: string } }
|
|
318
|
+
label_group:
|
|
319
|
+
type: string
|
|
320
|
+
description: "`ai-object-detection-label-group` id — sibling family for the dims reclassifier."
|
|
321
|
+
physical_size:
|
|
322
|
+
$ref: "#/components/schemas/OdLabelPhysicalSize"
|
|
323
|
+
disabled: { type: boolean }
|
|
324
|
+
company_namespace:
|
|
325
|
+
type: array
|
|
326
|
+
items: { type: string }
|
|
327
|
+
description: Tenant key (server-injected).
|
|
328
|
+
createdAt: { type: string, format: date-time }
|
|
329
|
+
updatedAt: { type: string, format: date-time }
|
|
330
|
+
OdLabelCreateBody:
|
|
331
|
+
type: object
|
|
332
|
+
description: "Body for creating a label. `company_namespace` is optional for SDK callers and otherwise injected from the caller's session."
|
|
333
|
+
required: [name]
|
|
334
|
+
properties:
|
|
335
|
+
name:
|
|
336
|
+
type: string
|
|
337
|
+
description: "Unique per namespace; must match `^[a-zA-Z_][a-zA-Z0-9_\\s]*$`."
|
|
338
|
+
keyboard_shortcut:
|
|
339
|
+
type: string
|
|
340
|
+
description: "One lower-case letter or digit, excluding `i`, `o` and `_`."
|
|
341
|
+
media_photo:
|
|
342
|
+
type: string
|
|
343
|
+
description: Reference crop media id (linked to the label on save).
|
|
344
|
+
products: { type: array, items: { type: string } }
|
|
345
|
+
variants: { type: array, items: { type: string } }
|
|
346
|
+
product_brands: { type: array, items: { type: string } }
|
|
347
|
+
product_categories: { type: array, items: { type: string } }
|
|
348
|
+
product_subcategories: { type: array, items: { type: string } }
|
|
349
|
+
product_groups: { type: array, items: { type: string } }
|
|
350
|
+
label_group:
|
|
351
|
+
type: string
|
|
352
|
+
description: "`ai-object-detection-label-group` id."
|
|
353
|
+
physical_size:
|
|
354
|
+
$ref: "#/components/schemas/OdLabelPhysicalSize"
|
|
355
|
+
company_namespace:
|
|
356
|
+
type: array
|
|
357
|
+
items: { type: string }
|
|
358
|
+
description: Optional tenant namespace override for SDK callers.
|
|
359
|
+
OdLabelUpdateBody:
|
|
360
|
+
type: object
|
|
361
|
+
description: "Body for updating a label. `company_namespace` is derived from the caller's session — do not send it. Set `disabled: true` to soft-delete."
|
|
362
|
+
properties:
|
|
363
|
+
name: { type: string }
|
|
364
|
+
keyboard_shortcut: { type: string }
|
|
365
|
+
media_photo: { type: string }
|
|
366
|
+
products: { type: array, items: { type: string } }
|
|
367
|
+
variants: { type: array, items: { type: string } }
|
|
368
|
+
product_brands: { type: array, items: { type: string } }
|
|
369
|
+
product_categories: { type: array, items: { type: string } }
|
|
370
|
+
product_subcategories: { type: array, items: { type: string } }
|
|
371
|
+
product_groups: { type: array, items: { type: string } }
|
|
372
|
+
label_group: { type: string }
|
|
373
|
+
physical_size:
|
|
374
|
+
$ref: "#/components/schemas/OdLabelPhysicalSize"
|
|
375
|
+
disabled:
|
|
376
|
+
type: boolean
|
|
377
|
+
description: Soft-delete flag.
|
|
378
|
+
OdLabelFindResult:
|
|
379
|
+
type: object
|
|
380
|
+
description: Standard paginated result envelope.
|
|
381
|
+
properties:
|
|
382
|
+
data:
|
|
383
|
+
type: array
|
|
384
|
+
items:
|
|
385
|
+
$ref: "#/components/schemas/OdLabelSchema"
|
|
386
|
+
total_result: { type: number }
|
|
387
|
+
current_count: { type: number }
|
|
388
|
+
total_pages: { type: number }
|
|
389
|
+
current_page: { type: number }
|
|
390
|
+
per_page: { type: number }
|
|
391
|
+
first_page_url: { type: string }
|
|
392
|
+
last_page_url: { type: string }
|
|
393
|
+
next_page_url: { type: string, nullable: true }
|
|
394
|
+
prev_page_url: { type: string, nullable: true }
|
|
395
|
+
path: { type: string }
|