@mediaviz/react-native-sdk 1.9.0-dev.116
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/LICENSE +21 -0
- package/dist/react.cjs +404 -0
- package/dist/react.d.cts +48 -0
- package/dist/react.d.ts +48 -0
- package/dist/react.esm.js +400 -0
- package/dist/sdk.cjs +3032 -0
- package/dist/sdk.d.cts +650 -0
- package/dist/sdk.d.ts +650 -0
- package/dist/sdk.esm.d.ts +650 -0
- package/dist/sdk.esm.js +2986 -0
- package/package.json +60 -0
|
@@ -0,0 +1,650 @@
|
|
|
1
|
+
// Auto-generated — do not edit. TypeScript declarations for the MediaViz SDK.
|
|
2
|
+
export interface TokenResponse {
|
|
3
|
+
access_token: string;
|
|
4
|
+
token_type: string;
|
|
5
|
+
expires_in: number;
|
|
6
|
+
refresh_token: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface AuthorizationUrlResult {
|
|
10
|
+
url: string;
|
|
11
|
+
state: string;
|
|
12
|
+
code_verifier: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface MediaVizConfig {
|
|
16
|
+
clientId?: string;
|
|
17
|
+
clientSecret?: string;
|
|
18
|
+
baseUrl?: string;
|
|
19
|
+
redirectUri?: string;
|
|
20
|
+
hosts?: Record<string, string>;
|
|
21
|
+
accessToken?: string;
|
|
22
|
+
refreshToken?: string;
|
|
23
|
+
onTokenRefresh?: (tokens: TokenResponse) => void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export class OAuthClient {
|
|
27
|
+
constructor(config: { baseUrl?: string; clientId?: string; clientSecret?: string; redirectUri?: string });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export class OAuthError extends Error {
|
|
31
|
+
code: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const OAuthErrorCode: { [key: string]: string };
|
|
35
|
+
|
|
36
|
+
export class ApiError extends Error {
|
|
37
|
+
status: number;
|
|
38
|
+
requestId: string | null;
|
|
39
|
+
body: any;
|
|
40
|
+
constructor(message: string, status: number, requestId: string | null, body: any);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export class ValidationError extends ApiError {
|
|
44
|
+
fieldErrors: Array<{ loc: (string | number)[]; msg: string; type: string }>;
|
|
45
|
+
constructor(body: any, status: number, requestId: string | null);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export class NotFoundError extends ApiError {
|
|
49
|
+
constructor(body: any, status: number, requestId: string | null);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export class RateLimitError extends ApiError {
|
|
53
|
+
retryAfter: number | null;
|
|
54
|
+
constructor(body: any, status: number, requestId: string | null, headers: Headers);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export class ServerError extends ApiError {
|
|
58
|
+
constructor(body: any, status: number, requestId: string | null);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function handleResponse(response: Response): Promise<any>;
|
|
62
|
+
|
|
63
|
+
export type WebhookAck = 'handled' | 'duplicate' | 'bad_signature';
|
|
64
|
+
|
|
65
|
+
export interface WebhookDeliveryEvent {
|
|
66
|
+
event_id: string;
|
|
67
|
+
event_type: string;
|
|
68
|
+
schema_version?: string;
|
|
69
|
+
subscription_id: string;
|
|
70
|
+
project_table_name: string;
|
|
71
|
+
photo_id: number;
|
|
72
|
+
target: string;
|
|
73
|
+
completed_at?: string;
|
|
74
|
+
result_location?: string;
|
|
75
|
+
[key: string]: any;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface WebhookStoreLike {
|
|
79
|
+
markSeen(eventId: string, ttlS: number): boolean;
|
|
80
|
+
unmarkSeen(eventId: string): void;
|
|
81
|
+
saveSecret(subscriptionId: string, secret: string): void;
|
|
82
|
+
rotateSecret(subscriptionId: string, newSecret: string, windowS: number): void;
|
|
83
|
+
getSecrets(subscriptionId: string): [string | null, string | null];
|
|
84
|
+
getCursor(subscriptionId: string): string | null;
|
|
85
|
+
setCursor(subscriptionId: string, cursor: string): void;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export class InMemoryWebhookStore implements WebhookStoreLike {
|
|
89
|
+
markSeen(eventId: string, ttlS: number): boolean;
|
|
90
|
+
unmarkSeen(eventId: string): void;
|
|
91
|
+
saveSecret(subscriptionId: string, secret: string): void;
|
|
92
|
+
rotateSecret(subscriptionId: string, newSecret: string, windowS: number): void;
|
|
93
|
+
getSecrets(subscriptionId: string): [string | null, string | null];
|
|
94
|
+
getCursor(subscriptionId: string): string | null;
|
|
95
|
+
setCursor(subscriptionId: string, cursor: string): void;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export class WebhookConsumer {
|
|
99
|
+
constructor(ctx: any, subscriptionApi: any, options?: {
|
|
100
|
+
store?: WebhookStoreLike;
|
|
101
|
+
onEvent?: (event: WebhookDeliveryEvent) => void | Promise<void>;
|
|
102
|
+
skewToleranceS?: number;
|
|
103
|
+
rotationWindowS?: number;
|
|
104
|
+
dedupeTtlS?: number;
|
|
105
|
+
pageLimit?: number;
|
|
106
|
+
});
|
|
107
|
+
store: WebhookStoreLike;
|
|
108
|
+
skewToleranceS: number;
|
|
109
|
+
rotationWindowS: number;
|
|
110
|
+
dedupeTtlS: number;
|
|
111
|
+
pageLimit: number;
|
|
112
|
+
onEvent(fn: (event: WebhookDeliveryEvent) => void | Promise<void>): (event: WebhookDeliveryEvent) => void | Promise<void>;
|
|
113
|
+
useStore(store: WebhookStoreLike): void;
|
|
114
|
+
classifyMessage(body: any): 'verification' | 'delivery' | 'unknown';
|
|
115
|
+
handleChallenge(body: any): { challenge: string };
|
|
116
|
+
handleDelivery(headers: any, rawBody: string | Uint8Array | ArrayBuffer): Promise<WebhookAck>;
|
|
117
|
+
handleRequest(headers: any, rawBody: string | Uint8Array | ArrayBuffer): Promise<{ status: number; body: any }>;
|
|
118
|
+
register(projectTableName: string, callbackUrl: string, targets: string[]): Promise<any>;
|
|
119
|
+
confirm(subscriptionId: string): Promise<any>;
|
|
120
|
+
rotateSecret(subscriptionId: string): Promise<string>;
|
|
121
|
+
updateCallback(subscriptionId: string, callbackUrl: string): Promise<any>;
|
|
122
|
+
disable(subscriptionId: string): Promise<any>;
|
|
123
|
+
listSubscriptions(): Promise<any>;
|
|
124
|
+
pullEvents(subscriptionId: string, options?: { since?: string; limit?: number }): Promise<any>;
|
|
125
|
+
reconcile(subscriptionId: string, projectTableName: string): Promise<{ pulled: number; dispatched: number }>;
|
|
126
|
+
fetchResult(event: WebhookDeliveryEvent): Promise<{ photo: any; selected: Record<string, any> | null }>;
|
|
127
|
+
saveSecret(subscriptionId: string, secret: string): void;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function signWebhookPayload(secret: string, timestamp: string, rawBody: string | Uint8Array | ArrayBuffer): Promise<string>;
|
|
131
|
+
export function verifyWebhookSignature(secretCurrent: string | null, secretPrevious: string | null, headers: any, rawBody: string | Uint8Array | ArrayBuffer, options?: { skewToleranceS?: number; now?: number }): Promise<boolean>;
|
|
132
|
+
export function selectResultColumns(photo: any, target: string): Record<string, any> | null;
|
|
133
|
+
export const WEBHOOK_MODEL_COLUMNS: Record<string, string[]>;
|
|
134
|
+
export const WEBHOOK_OUTCOME_MODELS: Record<string, string[]>;
|
|
135
|
+
|
|
136
|
+
// ── response schemas ──
|
|
137
|
+
export interface AlbumDisplay {
|
|
138
|
+
name?: string;
|
|
139
|
+
description?: string;
|
|
140
|
+
id: number;
|
|
141
|
+
project_table_name: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface AnalysisStatusResponse {
|
|
145
|
+
project_table_name: string;
|
|
146
|
+
model_or_process: string;
|
|
147
|
+
status: string;
|
|
148
|
+
last_updated_at: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface CompanyDisplay {
|
|
152
|
+
name: string;
|
|
153
|
+
id: number;
|
|
154
|
+
owner_id: number;
|
|
155
|
+
users?: number[];
|
|
156
|
+
active: boolean;
|
|
157
|
+
payment_plan_type: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface CompanyKeywordListOverview {
|
|
161
|
+
id: number;
|
|
162
|
+
name: string;
|
|
163
|
+
active_keywords: number;
|
|
164
|
+
excluded_keywords: number;
|
|
165
|
+
project_ids?: string[];
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface CreditBalanceOutput {
|
|
169
|
+
sufficient_credits: boolean;
|
|
170
|
+
current_credit_balance: number;
|
|
171
|
+
credit_cost: number;
|
|
172
|
+
required_credits: number;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface CuratedAlbumDisplay {
|
|
176
|
+
id: number;
|
|
177
|
+
project_table_name: string;
|
|
178
|
+
name: string;
|
|
179
|
+
description?: string;
|
|
180
|
+
confidence_value?: number;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface EventPage {
|
|
184
|
+
events: PullEvent[];
|
|
185
|
+
next_cursor?: string;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export interface HealthCheck {
|
|
189
|
+
status?: string;
|
|
190
|
+
timestamp?: string;
|
|
191
|
+
checks?: Record<string, any>;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export interface KeywordListDisplayWithList {
|
|
195
|
+
id: number;
|
|
196
|
+
user_id: number;
|
|
197
|
+
company_id: number;
|
|
198
|
+
name: string;
|
|
199
|
+
date_created: string;
|
|
200
|
+
date_last_updated: string;
|
|
201
|
+
is_inclusion?: boolean;
|
|
202
|
+
gsheet_view_link?: string;
|
|
203
|
+
gsheet_csv_link?: string;
|
|
204
|
+
gsheet_xlsx_link?: string;
|
|
205
|
+
list_keywords_included_or_excluded?: number[];
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export interface KeywordListDisplayWithProjects {
|
|
209
|
+
id: number;
|
|
210
|
+
user_id: number;
|
|
211
|
+
company_id: number;
|
|
212
|
+
name: string;
|
|
213
|
+
date_created: string;
|
|
214
|
+
date_last_updated: string;
|
|
215
|
+
is_inclusion?: boolean;
|
|
216
|
+
list_projects_associated?: string[];
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface MediaAccessQueryDisplay {
|
|
220
|
+
query_string: string;
|
|
221
|
+
url_prefix: string;
|
|
222
|
+
expires_at: string;
|
|
223
|
+
project_table_name: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface PhotoDisplay {
|
|
227
|
+
photo_s3_link?: string;
|
|
228
|
+
client_side_id?: string;
|
|
229
|
+
moment_id?: number;
|
|
230
|
+
file_path?: string;
|
|
231
|
+
image_metadata?: Record<string, any>;
|
|
232
|
+
tags?: string[];
|
|
233
|
+
title?: string;
|
|
234
|
+
description?: string;
|
|
235
|
+
format?: string;
|
|
236
|
+
size?: string;
|
|
237
|
+
source_resolution_x?: number;
|
|
238
|
+
source_resolution_y?: number;
|
|
239
|
+
date_taken?: string;
|
|
240
|
+
date_modified?: string;
|
|
241
|
+
date_guessed?: string;
|
|
242
|
+
date_uploaded?: string;
|
|
243
|
+
latitude?: number;
|
|
244
|
+
longitude?: number;
|
|
245
|
+
country_code?: string;
|
|
246
|
+
country?: string;
|
|
247
|
+
state?: string;
|
|
248
|
+
city?: string;
|
|
249
|
+
average_hash?: string;
|
|
250
|
+
perceptual_hash?: string;
|
|
251
|
+
difference_hash?: string;
|
|
252
|
+
wavelet_hash_haar?: string;
|
|
253
|
+
color_hash?: string;
|
|
254
|
+
reference_1_average_distance?: number;
|
|
255
|
+
reference_2_average_distance?: number;
|
|
256
|
+
reference_3_average_distance?: number;
|
|
257
|
+
main_color_palette?: string[];
|
|
258
|
+
color_averages?: string[];
|
|
259
|
+
labels_from_classifications_model?: Record<string, any>;
|
|
260
|
+
ocr_output?: Record<string, any>;
|
|
261
|
+
bounding_boxes_from_faces_model?: Record<string, any>[];
|
|
262
|
+
number_of_faces?: number;
|
|
263
|
+
blur_value?: number;
|
|
264
|
+
feature_extraction_output?: number[];
|
|
265
|
+
similar_photo_ids_high?: number[];
|
|
266
|
+
similar_photo_ids_medium?: number[];
|
|
267
|
+
similar_photo_ids_low?: number[];
|
|
268
|
+
evidence_score?: number;
|
|
269
|
+
face_score?: number;
|
|
270
|
+
content_score?: number;
|
|
271
|
+
aesthetic_score?: number;
|
|
272
|
+
similarity_set_ranking?: number;
|
|
273
|
+
topic?: string;
|
|
274
|
+
rank?: number;
|
|
275
|
+
hue_values?: number[];
|
|
276
|
+
light_values?: number[];
|
|
277
|
+
saturation_values?: number[];
|
|
278
|
+
aesthetic_appeal?: number;
|
|
279
|
+
lighting?: number;
|
|
280
|
+
subject_significance?: number;
|
|
281
|
+
emotional_intensity?: number;
|
|
282
|
+
positive_emotion?: number;
|
|
283
|
+
universal_relatability?: number;
|
|
284
|
+
memorability?: number;
|
|
285
|
+
composition?: number;
|
|
286
|
+
judgment_overall_score?: number;
|
|
287
|
+
user_id: number;
|
|
288
|
+
company_id: number;
|
|
289
|
+
id: number;
|
|
290
|
+
project_table_name: string;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export interface PhotoFace {
|
|
294
|
+
smile_value?: boolean;
|
|
295
|
+
smile_confidence?: number;
|
|
296
|
+
eyeglasses_value?: boolean;
|
|
297
|
+
eyeglasses_confidence?: number;
|
|
298
|
+
sunglasses_value?: boolean;
|
|
299
|
+
sunglasses_confidence?: number;
|
|
300
|
+
eyes_open_value?: boolean;
|
|
301
|
+
eyes_open_confidence?: number;
|
|
302
|
+
emotion_happy_confidence?: number;
|
|
303
|
+
emotion_sad_confidence?: number;
|
|
304
|
+
landmark_eyeleft_x?: number;
|
|
305
|
+
landmark_eyeleft_y?: number;
|
|
306
|
+
landmark_eyeright_x?: number;
|
|
307
|
+
landmark_eyeright_y?: number;
|
|
308
|
+
landmark_mouthleft_x?: number;
|
|
309
|
+
landmark_mouthleft_y?: number;
|
|
310
|
+
landmark_mouthright_x?: number;
|
|
311
|
+
landmark_mouthright_y?: number;
|
|
312
|
+
landmark_nose_x?: number;
|
|
313
|
+
landmark_nose_y?: number;
|
|
314
|
+
pose_roll?: number;
|
|
315
|
+
pose_yaw?: number;
|
|
316
|
+
pose_pitch?: number;
|
|
317
|
+
quality_brightness?: number;
|
|
318
|
+
quality_sharpness?: number;
|
|
319
|
+
face_occluded_value?: boolean;
|
|
320
|
+
eye_direction_yaw?: number;
|
|
321
|
+
eye_direction_pitch?: number;
|
|
322
|
+
eye_direction_confidence?: number;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export interface PhotoPersonLight {
|
|
326
|
+
id: number;
|
|
327
|
+
person_id: string;
|
|
328
|
+
bounding_box: Record<string, any>;
|
|
329
|
+
confidence: number;
|
|
330
|
+
person_name: string;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export interface PhotoPersonWithS3Link {
|
|
334
|
+
id: number;
|
|
335
|
+
person_id: string;
|
|
336
|
+
bounding_box: Record<string, any>;
|
|
337
|
+
confidence: number;
|
|
338
|
+
person_name: string;
|
|
339
|
+
photo_s3_link?: string;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export interface ProjectRunDisplay {
|
|
343
|
+
name: string;
|
|
344
|
+
private?: boolean;
|
|
345
|
+
type: number;
|
|
346
|
+
description?: string;
|
|
347
|
+
directory?: string;
|
|
348
|
+
photo_upload_vector?: number;
|
|
349
|
+
thumbnail?: string;
|
|
350
|
+
run_name?: string;
|
|
351
|
+
id: string;
|
|
352
|
+
user_id: number;
|
|
353
|
+
company_id: number;
|
|
354
|
+
active: boolean;
|
|
355
|
+
project_table_name: string;
|
|
356
|
+
date_created: string;
|
|
357
|
+
number_of_photos?: number;
|
|
358
|
+
date_photos_uploaded?: string;
|
|
359
|
+
date_deleted?: string;
|
|
360
|
+
top_tier?: number;
|
|
361
|
+
tier_2?: number;
|
|
362
|
+
total_photos_uploaded?: number;
|
|
363
|
+
gsheet_view_link?: string;
|
|
364
|
+
gsheet_csv_link?: string;
|
|
365
|
+
gsheet_xlsx_link?: string;
|
|
366
|
+
insights_view_link?: string;
|
|
367
|
+
similarity_level?: string;
|
|
368
|
+
blur_model?: boolean;
|
|
369
|
+
colors_model?: boolean;
|
|
370
|
+
face_recognition_model?: boolean;
|
|
371
|
+
image_classification_model?: boolean;
|
|
372
|
+
image_comparison_model?: boolean;
|
|
373
|
+
image_describe_model?: boolean;
|
|
374
|
+
ocr_model?: boolean;
|
|
375
|
+
judgment_model?: boolean;
|
|
376
|
+
similarity_model?: boolean;
|
|
377
|
+
personhood_model?: boolean;
|
|
378
|
+
evidence_model?: boolean;
|
|
379
|
+
insights_model?: boolean;
|
|
380
|
+
normalize?: boolean;
|
|
381
|
+
is_continuous_upload?: boolean;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export interface PullEvent {
|
|
385
|
+
event_id: string;
|
|
386
|
+
photo_id: number;
|
|
387
|
+
target: string;
|
|
388
|
+
completed_at: string;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export interface SearchDisplay {
|
|
392
|
+
id: number;
|
|
393
|
+
project_table_name: string;
|
|
394
|
+
search_name: string;
|
|
395
|
+
and_params?: string[];
|
|
396
|
+
and_string_params?: string[];
|
|
397
|
+
or_params?: string[];
|
|
398
|
+
or_string_params?: string[];
|
|
399
|
+
not_params?: string[];
|
|
400
|
+
not_string_params?: string[];
|
|
401
|
+
date_min?: string;
|
|
402
|
+
date_max?: string;
|
|
403
|
+
date_null_and?: boolean;
|
|
404
|
+
date_null_or?: boolean;
|
|
405
|
+
date_order?: string;
|
|
406
|
+
custom_album_id?: number;
|
|
407
|
+
best_of_similar_sets_only?: boolean;
|
|
408
|
+
curated_album_id?: number;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export interface SubscriptionActivated {
|
|
412
|
+
subscription_id: string;
|
|
413
|
+
status: string;
|
|
414
|
+
signing_secret: string;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
export interface SubscriptionDisplay {
|
|
418
|
+
id: string;
|
|
419
|
+
project_table_name: string;
|
|
420
|
+
callback_url: string;
|
|
421
|
+
targets: string[];
|
|
422
|
+
status: string;
|
|
423
|
+
consecutive_failures: number;
|
|
424
|
+
last_delivery_at?: string;
|
|
425
|
+
last_status_code?: number;
|
|
426
|
+
created_at: string;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export interface UserDisplay {
|
|
430
|
+
id: number;
|
|
431
|
+
company_id: number;
|
|
432
|
+
name: string;
|
|
433
|
+
email: string;
|
|
434
|
+
account_type: number;
|
|
435
|
+
location?: string;
|
|
436
|
+
phone_number?: string;
|
|
437
|
+
birthday?: string;
|
|
438
|
+
profile_picture?: string;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
export class AiModelCredits {
|
|
442
|
+
getModelCreditRelationship(modelName: string): Promise<Record<string, any>>;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export class Admin {
|
|
446
|
+
getCategoryLabels(category: string): Promise<Record<string, any>>;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
export class Company {
|
|
450
|
+
getCompanyById(companyId: number): Promise<CompanyDisplay>;
|
|
451
|
+
confirmCompanyCreditBalance(companyId: number, options?: { photoCount?: number | number[], modelsList?: any }): Promise<CreditBalanceOutput>;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
export class CuratedAlbums {
|
|
455
|
+
createCuratedAlbum(projectTableName: string, name: string, description?: string, confidenceValue?: number): Promise<CuratedAlbumDisplay>;
|
|
456
|
+
getAllProjectCuratedAlbums(projectTableName: string): Promise<CuratedAlbumDisplay[]>;
|
|
457
|
+
getCuratedAlbumPhotos(albumId: number, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], confidenceValue?: number | number[] }): Promise<any[]>;
|
|
458
|
+
getCuratedAlbumPhotosRanked(albumId: number, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], confidenceValue?: number | number[] }): Promise<Record<string, any>>;
|
|
459
|
+
getCuratedAlbumById(albumId: number): Promise<CuratedAlbumDisplay>;
|
|
460
|
+
updateCuratedAlbum(albumId: number, body?: { name?: string, description?: string, confidenceValue?: number }): Promise<CuratedAlbumDisplay>;
|
|
461
|
+
deleteCuratedAlbum(albumId: number): Promise<Record<string, any>>;
|
|
462
|
+
convertCuratedAlbumToCustom(albumId: number): Promise<CuratedAlbumDisplay>;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
export class CustomAlbums {
|
|
466
|
+
getCustomAlbumDetailById(customAlbumId: number): Promise<AlbumDisplay>;
|
|
467
|
+
getAllProjectCustomAlbums(projectTableName: string): Promise<AlbumDisplay[]>;
|
|
468
|
+
getCustomAlbumPhotosById(customAlbumId: number, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[] }): Promise<any>;
|
|
469
|
+
getRankedCustomAlbumById(customAlbumId: number, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>>;
|
|
470
|
+
createProjectCustomAlbum(projectTableName: string, body?: { name?: string, description?: string, photoIdInclusionList?: number[], photoIdRemovalList?: number[] }): Promise<AlbumDisplay>;
|
|
471
|
+
updateCustomAlbum(albumId: number, body?: { name?: string, description?: string, photoIdInclusionList?: number[], photoIdRemovalList?: number[] }): Promise<AlbumDisplay>;
|
|
472
|
+
deleteCustomAlbum(albumId: number): Promise<Record<string, any>>;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export class EmailTokens {
|
|
476
|
+
requestEmailVerification(options?: { email?: string | string[] }): Promise<Record<string, any>>;
|
|
477
|
+
verifyEmail(token: string): Promise<Record<string, any>>;
|
|
478
|
+
requestPasswordReset(options?: { email?: string | string[] }): Promise<Record<string, any>>;
|
|
479
|
+
validateToken(token: string): Promise<Record<string, any>>;
|
|
480
|
+
resetPassword(token: string, newPassword: string): Promise<Record<string, any>>;
|
|
481
|
+
deleteUserEmailTokens(userId: number): Promise<Record<string, any>>;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export class Health {
|
|
485
|
+
healthCheck(): Promise<HealthCheck>;
|
|
486
|
+
livenessCheck(): Promise<HealthCheck>;
|
|
487
|
+
readinessCheck(): Promise<HealthCheck>;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
export class Keywords {
|
|
491
|
+
createKeywordFilteringList(name: string, projectList?: string[]): Promise<KeywordListDisplayWithProjects>;
|
|
492
|
+
getUserKeywordFilteringLists(): Promise<KeywordListDisplayWithProjects[]>;
|
|
493
|
+
getCompanyKeywordLists(companyId: number): Promise<CompanyKeywordListOverview[]>;
|
|
494
|
+
getKeywordFilteringListAndProjectsById(keywordListId: number): Promise<KeywordListDisplayWithProjects>;
|
|
495
|
+
getKeywordFilteringListById(keywordListId: number): Promise<KeywordListDisplayWithList>;
|
|
496
|
+
getExistingKeywordFilteringListByProject(projectTableName: string): Promise<Record<string, any>>;
|
|
497
|
+
getDefaultKeywordFilteringListByProject(projectTableName: string): Promise<Record<string, any>>;
|
|
498
|
+
updateKeywordFilteringListLabels(keywordListId: number, listKeywordsToInclude: number[], listKeywordsToExclude: number[]): Promise<KeywordListDisplayWithList>;
|
|
499
|
+
updateKeywordFilteringListDetails(keywordListId: number, body?: { name?: string, projectList?: string[] }): Promise<KeywordListDisplayWithProjects>;
|
|
500
|
+
addProjectsToKeywordFilteringList(keywordListId: number, options?: { projectIds?: any }): Promise<Record<string, any>>;
|
|
501
|
+
addCompanyToKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
502
|
+
requestKeywordListExport(keywordListId: number): Promise<Record<string, any>>;
|
|
503
|
+
requestKeywordListExportStatus(keywordListId: number): Promise<AnalysisStatusResponse>;
|
|
504
|
+
getKeywordsAndIds(): Promise<any>;
|
|
505
|
+
removeProjectsFromKeywordFilteringList(keywordListId: number, options?: { projectIds?: any }): Promise<Record<string, any>>;
|
|
506
|
+
removeCompanyFromKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
507
|
+
deleteKeywordFilteringListById(keywordListId: number): Promise<Record<string, any>>;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
export class Media {
|
|
511
|
+
getProjectAccessQuery(projectTableName: string): Promise<MediaAccessQueryDisplay>;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
export class OauthAuthorization {
|
|
515
|
+
authorize(options?: { responseType?: string | string[], clientId?: string | string[], redirectUri?: string | string[], state?: string | string[], codeChallenge?: string | string[], codeChallengeMethod?: string | string[] }): Promise<any>;
|
|
516
|
+
getConsent(sessionId: string): Promise<any>;
|
|
517
|
+
postApproveConsent(sessionId: string, body: { restartUrl: string }): Promise<any>;
|
|
518
|
+
postDenyConsent(sessionId: string, body: { restartUrl: string }): Promise<any>;
|
|
519
|
+
getSwitchUser(sessionId: string, options?: { restartUrl?: string | string[] }): Promise<any>;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export class OauthToken {
|
|
523
|
+
token(body: { grantType: string, code: string, redirectUri: string, clientId: string, codeVerifier: string, refreshToken: string, clientSecret: string }): Promise<Record<string, any>>;
|
|
524
|
+
adminRevokeUserTokens(userId: number): Promise<Record<string, any>>;
|
|
525
|
+
revoke(body: { token: string, tokenTypeHint: string, clientId: string }): Promise<Record<string, any>>;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
export class OauthLogin {
|
|
529
|
+
getLogin(options?: { next?: string | string[] }): Promise<any>;
|
|
530
|
+
postLogin(body: { email: string, password: string, next: string }): Promise<any>;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export class Person {
|
|
534
|
+
updatePerson(projectTableName: string, personId: string, options?: { personName?: string | string[] }): Promise<any>;
|
|
535
|
+
removePersonName(projectTableName: string, personId: string): Promise<PhotoPersonLight>;
|
|
536
|
+
combinePersons(projectTableName: string, destinationPersonId: string, oldPersonId: string): Promise<PhotoPersonLight>;
|
|
537
|
+
splitPersons(projectTableName: string, id: number, options?: { newName?: string | string[], destinationPersonId?: string | string[] }): Promise<PhotoPersonLight>;
|
|
538
|
+
getAllPersonsFromProject(projectTableName: string): Promise<PhotoPersonWithS3Link[]>;
|
|
539
|
+
getAllPersonNamesFromProject(projectTableName: string): Promise<any>;
|
|
540
|
+
getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<any>;
|
|
541
|
+
getAllPersonsFromPhoto(projectTableName: string, photoId: number): Promise<PhotoPersonLight[]>;
|
|
542
|
+
removePerson(projectTableName: string, personId: string): Promise<Record<string, any>>;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
export class Photoupload {
|
|
546
|
+
uploadPhotoToMediaviz(fileContent: string, filePath: string, mimetype: string, companyId: string, userId: string, projectTableName: string, blur: boolean | string, colors: boolean | string, faceRecognition: boolean | string, imageClassification: boolean | string, imageComparison: boolean | string, imageDescribe: boolean | string, ocr: boolean | string, judgment: boolean | string, options?: { clientSideId?: string, format?: string, size?: string, sourceResolutionX?: number | string, sourceResolutionY?: number | string, dateTaken?: string, latitude?: number | string, longitude?: number | string }): Promise<any>;
|
|
547
|
+
uploadPhoto(companyId: string, userId: string, projectTableName: string, photo: Record<string, any>): Promise<any>;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
export class Photos {
|
|
551
|
+
getPhotoFromProject(tableName: string, photoId: number, options?: { keywordListId?: number | number[] }): Promise<PhotoDisplay>;
|
|
552
|
+
getPhotoFaceDetailsFromProject(tableName: string, photoId: number): Promise<PhotoFace[]>;
|
|
553
|
+
getProjectPhotoIdsByTableName(tableName: string, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], includeAll?: boolean | boolean[], startDate?: string | string[], endDate?: string | string[], noDateTaken?: boolean | boolean[] }): Promise<any>;
|
|
554
|
+
getRankedProjectPhotoIdsByTableName(tableName: string, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], startDate?: string | string[], endDate?: string | string[], noDateTaken?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
555
|
+
getProjectMonthYearsWithPhotos(tableName: string): Promise<any>;
|
|
556
|
+
updatePhotoInProject(tableName: string, photoId: number, body?: { filePath?: string, title?: string, description?: string, tags?: string[] }): Promise<PhotoDisplay>;
|
|
557
|
+
updatePhotoRanking(tableName: string, photoId: number, newCategory: string): Promise<Record<string, any>>;
|
|
558
|
+
deletePhotoFromProject(tableName: string, options?: { photoIds?: any }): Promise<Record<string, any>>;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
export class Projects {
|
|
562
|
+
createProjectAndRun(name: string, type: number, private_?: boolean, description?: string, directory?: string, photoUploadVector?: number, thumbnail?: string, runName?: string, options?: { outcomes?: any, models?: any }): Promise<ProjectRunDisplay>;
|
|
563
|
+
markProjectUploadComplete(projectTableName: string, options?: { skippedFileCount?: number | number[] }): Promise<any>;
|
|
564
|
+
checkProjectStatus(projectTableName: string): Promise<any>;
|
|
565
|
+
getProjectPrelimModelRequestTemplate(projectTableName: string): Promise<Record<string, any>>;
|
|
566
|
+
getUserProjects(): Promise<ProjectRunDisplay[]>;
|
|
567
|
+
getAdminProjects(): Promise<ProjectRunDisplay[]>;
|
|
568
|
+
getProjectById(projectId: string): Promise<ProjectRunDisplay>;
|
|
569
|
+
getProjectByDirectory(directory: string): Promise<ProjectRunDisplay>;
|
|
570
|
+
updateProject(projectId: string, body?: { private?: boolean, type?: number, description?: string, directory?: string, name?: string, thumbnail?: string }): Promise<ProjectRunDisplay>;
|
|
571
|
+
updateProjectPhotoCount(tableName: string, options?: { filesFailedCount?: number | number[] }): Promise<Record<string, any>>;
|
|
572
|
+
updateProjectCreateUploadReport(tableName: string, options?: { filesFailedCount?: number | number[] }): Promise<any>;
|
|
573
|
+
requestProjectSimilarityQueue(projectTableName: string, level: string): Promise<Record<string, any>>;
|
|
574
|
+
requestProjectEvidenceQueue(projectTableName: string): Promise<Record<string, any>>;
|
|
575
|
+
requestProjectPersonhoodQueue(projectTableName: string): Promise<Record<string, any>>;
|
|
576
|
+
requestInsightsQueue(analysisLevel: string, identifier: string): Promise<Record<string, any>>;
|
|
577
|
+
requestProjectExport(projectTableName: string): Promise<Record<string, any>>;
|
|
578
|
+
getProjectProcessStatus(projectTableName: string, modelName: string): Promise<AnalysisStatusResponse>;
|
|
579
|
+
addProjectEvent(projectTableName: string, event: string, detail?: string): Promise<Record<string, any>>;
|
|
580
|
+
deleteProject(projectId: string): Promise<Record<string, any>>;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
export class Search {
|
|
584
|
+
searchProjectPhotos(projectTableName: string, options?: { andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], curatedAlbumId?: number | number[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
585
|
+
searchProjectPhotosParametrized(projectTableName: string, options?: { andSearchText?: any, orSearchText?: any, notSearchText?: any, city?: any, country?: any, state?: any, albums?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>>;
|
|
586
|
+
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<any>;
|
|
587
|
+
searchProjectPhotosNaturalLanguage(projectTableName: string, searchText: string, size?: number, options?: { minCosine?: number | number[], labelMinCosine?: number | number[], labelTopK?: number | number[], labelDelta?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
588
|
+
getProjectSavedSearches(projectTableName: string): Promise<any>;
|
|
589
|
+
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
590
|
+
saveProjectPhotosSearch(projectTableName: string, options?: { searchName?: string | string[], andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], curatedAlbumId?: number | number[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
591
|
+
deleteSavedSearchById(searchId: number): Promise<Record<string, any>>;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
export class Subscription {
|
|
595
|
+
createSubscription(projectTableName: string, callbackUrl: string, targets: string[]): Promise<SubscriptionActivated>;
|
|
596
|
+
verifySubscription(subscriptionId: string): Promise<SubscriptionActivated>;
|
|
597
|
+
listSubscriptions(): Promise<SubscriptionDisplay[]>;
|
|
598
|
+
listSubscriptionEvents(subscriptionId: string, options?: { since?: string | string[], limit?: number | number[] }): Promise<EventPage>;
|
|
599
|
+
updateSubscription(subscriptionId: string, body?: { callbackUrl?: string, targets?: string[] }): Promise<SubscriptionDisplay>;
|
|
600
|
+
deleteSubscription(subscriptionId: string): Promise<Record<string, any>>;
|
|
601
|
+
rotateSubscriptionSecret(subscriptionId: string): Promise<SubscriptionActivated>;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
export class Users {
|
|
605
|
+
createUser(name: string, email: string, accountType: number, companyId?: number, profilePicture?: string, paymentPlanType?: string): Promise<UserDisplay>;
|
|
606
|
+
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
607
|
+
changePassword(oldPassword: string, newPassword: string): Promise<Record<string, any>>;
|
|
608
|
+
getUserId(): Promise<Record<string, any>>;
|
|
609
|
+
getUser(userId: number): Promise<UserDisplay>;
|
|
610
|
+
getAllUsersByCompany(companyId: number): Promise<UserDisplay[]>;
|
|
611
|
+
updateUser(userId: number, body?: { name?: string, email?: string, password?: string, companyId?: number, accountType?: number, profilePicture?: string, location?: string, phoneNumber?: string, birthday?: string }): Promise<UserDisplay>;
|
|
612
|
+
deleteUser(userId: number, options?: { newCompanyOwnerId?: number | number[] }): Promise<Record<string, any>>;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
export interface MediaVizUtils {
|
|
616
|
+
getMediaAccessQuery(projectTableName: string): Promise<any>;
|
|
617
|
+
authorizeMediaUrl(photoUrl: string, projectTableName: string): Promise<any>;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
export class MediaViz {
|
|
621
|
+
constructor(config?: MediaVizConfig);
|
|
622
|
+
authenticate(): Promise<TokenResponse>;
|
|
623
|
+
getAuthorizationUrl(state?: string): Promise<AuthorizationUrlResult>;
|
|
624
|
+
handleCallback(code: string, codeVerifier: string): Promise<TokenResponse>;
|
|
625
|
+
setTokens(accessToken: string, refreshToken: string): void;
|
|
626
|
+
readonly accessToken: string | null;
|
|
627
|
+
readonly refreshToken: string | null;
|
|
628
|
+
readonly aiModelCredits: AiModelCredits;
|
|
629
|
+
readonly admin: Admin;
|
|
630
|
+
readonly company: Company;
|
|
631
|
+
readonly curatedAlbums: CuratedAlbums;
|
|
632
|
+
readonly customAlbums: CustomAlbums;
|
|
633
|
+
readonly emailTokens: EmailTokens;
|
|
634
|
+
readonly health: Health;
|
|
635
|
+
readonly keywords: Keywords;
|
|
636
|
+
readonly media: Media;
|
|
637
|
+
readonly oAuthAuthorization: OauthAuthorization;
|
|
638
|
+
readonly oAuthToken: OauthToken;
|
|
639
|
+
readonly oauthLogin: OauthLogin;
|
|
640
|
+
readonly person: Person;
|
|
641
|
+
readonly photoUpload: Photoupload;
|
|
642
|
+
readonly photos: Photos;
|
|
643
|
+
readonly projects: Projects;
|
|
644
|
+
readonly search: Search;
|
|
645
|
+
readonly subscription: Subscription;
|
|
646
|
+
readonly users: Users;
|
|
647
|
+
readonly webhooks: WebhookConsumer;
|
|
648
|
+
readonly utils: MediaVizUtils;
|
|
649
|
+
}
|
|
650
|
+
|