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,249 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: Repzo API - AI Object Detection Settings
4
+ version: 1.0.0
5
+ description: |
6
+ **Analyze defaults** — the per-namespace bag of analysis knobs that seeds
7
+ the dashboard's *Analyze session* dialog, so a team fixes its preferred
8
+ confidence / clustering / reclassify / size-gate values once instead of
9
+ re-tuning them on every run. The same document is the DRIFT BASELINE on
10
+ the analysis-result screen: when a session carries no detection category
11
+ (or none of the category's `model_settings` matches the analysis's model
12
+ version), the screen compares the analysis's stored config against these
13
+ defaults to show what would change on a re-run.
14
+
15
+ **One logical document per `company_namespace`** (keyed from the caller's
16
+ token — never sent in the body). `GET` NEVER 404s: an untouched namespace
17
+ answers `is_default: true` with an empty `analyze_config`, so clients can
18
+ always seed a form from the response. `POST` upserts (`PUT`/`PATCH` behave
19
+ identically) and `DELETE` restores factory defaults by dropping the
20
+ document — the path id is ignored, since there is only ever one document
21
+ (the dashboard calls `DELETE /ai-object-detection-settings/defaults`).
22
+
23
+ **Writes.** `analyze_config` is a free-form bag of analysis knobs
24
+ (`conf_threshold`, `cluster_eps_m`, `plane_merge`, `reclassify_labels`,
25
+ `size_gate`, `inference_concurrency`, …) — deliberately not filtered
26
+ against a fixed key list, exactly like the analyze endpoint's own
27
+ `config`, which merges over the engine defaults and picks the keys it
28
+ knows. That way the saved defaults round-trip whatever the Analyze dialog
29
+ can set. VALUES are strict: every knob must be a finite number or a
30
+ boolean (`null` is skipped, meaning "fall back"), anything else is
31
+ rejected with `400`, and the bag is capped at 200 keys. The known knob
32
+ names are the scene engine's `SceneMathConfig` (documented on
33
+ `ai-object-detection-inference`).
34
+
35
+ **Not to be confused with** `ai-object-detection-detection-settings`,
36
+ which holds the CAPTURE / frame-quality / election / session-gate knobs
37
+ the MOBILE app pulls on session start. This service is dashboard-only and
38
+ never reaches the device. Admin-facing. No query parameters are honoured
39
+ on any method; responses are single objects, never paginated.
40
+ servers:
41
+ - url: https://sv.api.repzo.me
42
+ security:
43
+ - ApiKeyAuth: []
44
+ - JwtAuth: []
45
+ paths:
46
+ /ai-object-detection-settings:
47
+ get:
48
+ summary: Read the namespace's saved analyze defaults
49
+ description: |
50
+ Never 404s — an untouched namespace answers `is_default: true` with an
51
+ empty `analyze_config`. Query parameters are ignored.
52
+ operationId: findAiObjectDetectionSettings
53
+ responses:
54
+ "200":
55
+ description: The namespace's analyze defaults (or the empty default state).
56
+ content:
57
+ application/json:
58
+ schema:
59
+ $ref: "#/components/schemas/AnalyzeDefaults"
60
+ post:
61
+ summary: Save the namespace's analyze defaults
62
+ description: |
63
+ Upserts the single document for the caller's namespace and returns the
64
+ fresh read. Keys are NOT filtered against a fixed list (the bag must
65
+ round-trip whatever the Analyze dialog can set); every VALUE must be a
66
+ finite number or a boolean — `null` knobs are skipped, anything else is
67
+ rejected with `400`. The bag is capped at 200 keys.
68
+ operationId: createAiObjectDetectionSettings
69
+ requestBody:
70
+ required: true
71
+ content:
72
+ application/json:
73
+ schema:
74
+ $ref: "#/components/schemas/AnalyzeDefaultsCreateBody"
75
+ responses:
76
+ "201":
77
+ description: The saved defaults, re-read after the upsert.
78
+ content:
79
+ application/json:
80
+ schema:
81
+ $ref: "#/components/schemas/AnalyzeDefaults"
82
+ "400":
83
+ description: "`analyze_config` is missing/not an object, a knob holds a non-numeric, non-boolean value, or the bag exceeds 200 keys."
84
+ /ai-object-detection-settings/{id}:
85
+ get:
86
+ summary: Read the analyze defaults (id ignored)
87
+ description: One logical document per namespace — this mirrors the collection read.
88
+ operationId: getAiObjectDetectionSettings
89
+ parameters:
90
+ - in: path
91
+ name: id
92
+ required: true
93
+ description: Ignored — there is a single document per namespace.
94
+ schema: { type: string }
95
+ responses:
96
+ "200":
97
+ description: Same shape as the collection read.
98
+ content:
99
+ application/json:
100
+ schema:
101
+ $ref: "#/components/schemas/AnalyzeDefaults"
102
+ put:
103
+ summary: Save the analyze defaults (id ignored)
104
+ description: Identical to POST — upserts the namespace's single document.
105
+ operationId: updateAiObjectDetectionSettings
106
+ parameters:
107
+ - in: path
108
+ name: id
109
+ required: true
110
+ description: Ignored — the namespace keys the document.
111
+ schema: { type: string }
112
+ requestBody:
113
+ required: true
114
+ content:
115
+ application/json:
116
+ schema:
117
+ $ref: "#/components/schemas/AnalyzeDefaultsWrite"
118
+ responses:
119
+ "200":
120
+ description: The saved defaults, re-read after the upsert.
121
+ content:
122
+ application/json:
123
+ schema:
124
+ $ref: "#/components/schemas/AnalyzeDefaults"
125
+ "400":
126
+ description: "`analyze_config` is missing/not an object, or a knob holds a non-numeric, non-boolean value."
127
+ patch:
128
+ summary: Save the analyze defaults (identical to PUT)
129
+ operationId: patchAiObjectDetectionSettings
130
+ parameters:
131
+ - in: path
132
+ name: id
133
+ required: true
134
+ description: Ignored — the namespace keys the document.
135
+ schema: { type: string }
136
+ requestBody:
137
+ required: true
138
+ content:
139
+ application/json:
140
+ schema:
141
+ $ref: "#/components/schemas/AnalyzeDefaultsWrite"
142
+ responses:
143
+ "200":
144
+ description: The saved defaults, re-read after the upsert.
145
+ content:
146
+ application/json:
147
+ schema:
148
+ $ref: "#/components/schemas/AnalyzeDefaults"
149
+ "400":
150
+ description: "`analyze_config` is missing/not an object, or a knob holds a non-numeric, non-boolean value."
151
+ delete:
152
+ summary: Restore factory defaults
153
+ description: |
154
+ Drops the namespace's overrides document. The id is ignored — the
155
+ dashboard calls `DELETE /ai-object-detection-settings/defaults`.
156
+ operationId: removeAiObjectDetectionSettings
157
+ parameters:
158
+ - in: path
159
+ name: id
160
+ required: true
161
+ description: "Ignored — any value works (the dashboard sends `defaults`)."
162
+ schema: { type: string }
163
+ example: defaults
164
+ responses:
165
+ "200":
166
+ description: "The empty default state (`_id: null`, `is_default: true`, `analyze_config: {}`, `updatedAt: null`)."
167
+ content:
168
+ application/json:
169
+ schema:
170
+ $ref: "#/components/schemas/AnalyzeDefaults"
171
+ components:
172
+ securitySchemes:
173
+ ApiKeyAuth:
174
+ type: apiKey
175
+ in: header
176
+ name: api-key
177
+ description: |
178
+ Server-issued API key. Also accepted via the `x-api-key` header or the
179
+ `?apiKey=` query parameter as fallbacks.
180
+ JwtAuth:
181
+ type: apiKey
182
+ in: header
183
+ name: Authorization
184
+ description: |
185
+ Raw JWT in the `Authorization` header — **no `Bearer ` prefix**.
186
+ Obtained from `POST /authenticate` (admin / rep / client login).
187
+ schemas:
188
+ AnalyzeConfig:
189
+ type: object
190
+ description: |
191
+ Partial bag of analysis knobs. Values must be numbers or booleans;
192
+ absent knobs fall back to the engine defaults at analyze time, and
193
+ keys the analyze pipeline does not know are simply ignored there.
194
+ Known keys are the scene engine's `SceneMathConfig` (depth sampling
195
+ `min_depth_m` / `max_depth_m` / `conf_threshold` / `front_percentile`
196
+ / `shelf_tolerance_m`, clustering `cluster_eps_m` / `plane_merge` /
197
+ `plane_merge_iou` / `plane_merge_depth_delta_m`, the `reclassify_*`
198
+ and `size_gate*` families, the `shelf_*` composition knobs, point
199
+ cloud `build_point_cloud` / `pc_stride` / `pc_voxel_size_m`, RANSAC
200
+ `ransac_*`) plus `inference_concurrency`.
201
+ additionalProperties:
202
+ oneOf:
203
+ - type: number
204
+ - type: boolean
205
+ example:
206
+ conf_threshold: 0.35
207
+ cluster_eps_m: 0.08
208
+ plane_merge: true
209
+ reclassify_labels: true
210
+ size_gate: true
211
+ inference_concurrency: 4
212
+ AnalyzeDefaults:
213
+ type: object
214
+ description: Response of every method — the projected defaults document.
215
+ properties:
216
+ _id:
217
+ type: string
218
+ nullable: true
219
+ description: "`null` while the namespace has never saved defaults."
220
+ is_default:
221
+ type: boolean
222
+ description: true = nothing saved; the client falls back to the engine defaults.
223
+ analyze_config:
224
+ $ref: "#/components/schemas/AnalyzeConfig"
225
+ updatedAt:
226
+ type: string
227
+ format: date-time
228
+ nullable: true
229
+ description: "When the defaults were last saved; `null` when `is_default`."
230
+ AnalyzeDefaultsWrite:
231
+ type: object
232
+ description: PUT / PATCH body — the same single document is upserted.
233
+ required: [analyze_config]
234
+ properties:
235
+ analyze_config:
236
+ $ref: "#/components/schemas/AnalyzeConfig"
237
+ AnalyzeDefaultsCreateBody:
238
+ description: |
239
+ POST body. The tenant key is taken from the caller's token; the
240
+ optional `company_namespace` exists for SDK-call uniformity and is not
241
+ read by this endpoint.
242
+ allOf:
243
+ - $ref: "#/components/schemas/AnalyzeDefaultsWrite"
244
+ - type: object
245
+ properties:
246
+ company_namespace:
247
+ type: array
248
+ items: { type: string }
249
+ description: Optional tenant namespace override for SDK callers. Not read by this endpoint — the document is keyed from the caller's token namespace.