@mediaviz/sdk 1.8.0-dev.97 → 1.8.0-dev.99
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/dist/sdk.cjs +3 -15
- package/dist/sdk.d.cts +2 -5
- package/dist/sdk.d.ts +2 -5
- package/dist/sdk.esm.d.ts +2 -5
- package/dist/sdk.esm.js +3 -15
- package/dist/sdk.umd.js +3 -15
- package/package.json +1 -1
package/dist/sdk.cjs
CHANGED
|
@@ -946,8 +946,6 @@ class Admin {
|
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
948
|
|
|
949
|
-
function stripUndef$8(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
950
|
-
|
|
951
949
|
class Company {
|
|
952
950
|
constructor(ctx) { this._ctx = ctx; }
|
|
953
951
|
|
|
@@ -969,16 +967,6 @@ class Company {
|
|
|
969
967
|
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
970
968
|
return data;
|
|
971
969
|
}
|
|
972
|
-
|
|
973
|
-
async updateCompanyPhotoUrlAllowlist(companyId, photoUrlAllowlist) {
|
|
974
|
-
this._ctx.requireTokens();
|
|
975
|
-
const path = `/api/v1/company/${encodeURIComponent(companyId)}/photo_url_allowlist/`;
|
|
976
|
-
const body = stripUndef$8({
|
|
977
|
-
photo_url_allowlist: photoUrlAllowlist,
|
|
978
|
-
});
|
|
979
|
-
const { data } = await this._ctx.client.request(path, 'PUT', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
980
|
-
return data;
|
|
981
|
-
}
|
|
982
970
|
}
|
|
983
971
|
|
|
984
972
|
function stripUndef$7(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
@@ -2023,7 +2011,7 @@ class Search {
|
|
|
2023
2011
|
return data;
|
|
2024
2012
|
}
|
|
2025
2013
|
|
|
2026
|
-
async searchProjectPhotosNaturalLanguage(projectTableName, searchText, { minCosine, labelMinCosine, labelTopK, labelDelta, bestOfSimilarSetsOnly, splitByTier } = {}) {
|
|
2014
|
+
async searchProjectPhotosNaturalLanguage(projectTableName, searchText, size = undefined, { minCosine, labelMinCosine, labelTopK, labelDelta, bestOfSimilarSetsOnly, splitByTier } = {}) {
|
|
2027
2015
|
this._ctx.requireTokens();
|
|
2028
2016
|
let path = `/api/v1/search/natural_language/${encodeURIComponent(projectTableName)}/`;
|
|
2029
2017
|
const query = new URLSearchParams();
|
|
@@ -2037,6 +2025,7 @@ class Search {
|
|
|
2037
2025
|
if (qs) path += '?' + qs;
|
|
2038
2026
|
const body = stripUndef$2({
|
|
2039
2027
|
search_text: searchText,
|
|
2028
|
+
size: size,
|
|
2040
2029
|
});
|
|
2041
2030
|
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
2042
2031
|
return data;
|
|
@@ -2179,7 +2168,7 @@ class Users {
|
|
|
2179
2168
|
return data;
|
|
2180
2169
|
}
|
|
2181
2170
|
|
|
2182
|
-
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined,
|
|
2171
|
+
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, { inviteToken } = {}) {
|
|
2183
2172
|
let path = `/api/v1/users/new_company/`;
|
|
2184
2173
|
const query = new URLSearchParams();
|
|
2185
2174
|
if (inviteToken !== undefined) (Array.isArray(inviteToken) ? inviteToken : [inviteToken]).forEach(v => query.append('invite_token', v));
|
|
@@ -2194,7 +2183,6 @@ class Users {
|
|
|
2194
2183
|
password: password,
|
|
2195
2184
|
company_name: companyName,
|
|
2196
2185
|
credits: credits,
|
|
2197
|
-
photo_url_allowlist: photoUrlAllowlist,
|
|
2198
2186
|
});
|
|
2199
2187
|
const resp = await fetch(this._ctx.baseUrl + path, {
|
|
2200
2188
|
method: 'POST',
|
package/dist/sdk.d.cts
CHANGED
|
@@ -155,7 +155,6 @@ export interface CompanyDisplay {
|
|
|
155
155
|
users?: number[];
|
|
156
156
|
active: boolean;
|
|
157
157
|
payment_plan_type: string;
|
|
158
|
-
photo_url_allowlist?: string[];
|
|
159
158
|
}
|
|
160
159
|
|
|
161
160
|
export interface CompanyKeywordListOverview {
|
|
@@ -184,7 +183,6 @@ export interface CuratedAlbumDisplay {
|
|
|
184
183
|
export interface EventPage {
|
|
185
184
|
events: PullEvent[];
|
|
186
185
|
next_cursor?: string;
|
|
187
|
-
size?: number;
|
|
188
186
|
}
|
|
189
187
|
|
|
190
188
|
export interface HealthCheck {
|
|
@@ -434,7 +432,6 @@ export class Admin {
|
|
|
434
432
|
export class Company {
|
|
435
433
|
getCompanyById(companyId: number): Promise<CompanyDisplay>;
|
|
436
434
|
confirmCompanyCreditBalance(companyId: number, options?: { photoCount?: number | number[], modelsList?: string[] | string[][] }): Promise<CreditBalanceOutput>;
|
|
437
|
-
updateCompanyPhotoUrlAllowlist(companyId: number, photoUrlAllowlist: string[]): Promise<Record<string, any>>;
|
|
438
435
|
}
|
|
439
436
|
|
|
440
437
|
export class CuratedAlbums {
|
|
@@ -566,7 +563,7 @@ export class Search {
|
|
|
566
563
|
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>>;
|
|
567
564
|
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>>;
|
|
568
565
|
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<any>;
|
|
569
|
-
searchProjectPhotosNaturalLanguage(projectTableName: string, searchText: string, options?: { minCosine?: number | number[], labelMinCosine?: number | number[], labelTopK?: number | number[], labelDelta?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
566
|
+
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>>;
|
|
570
567
|
getProjectSavedSearches(projectTableName: string): Promise<any>;
|
|
571
568
|
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
572
569
|
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>>;
|
|
@@ -585,7 +582,7 @@ export class Subscription {
|
|
|
585
582
|
|
|
586
583
|
export class Users {
|
|
587
584
|
createUser(name: string, email: string, accountType: number, companyId?: number, profilePicture?: string, paymentPlanType?: string): Promise<UserDisplay>;
|
|
588
|
-
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number,
|
|
585
|
+
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
589
586
|
changePassword(oldPassword: string, newPassword: string): Promise<Record<string, any>>;
|
|
590
587
|
getUserId(): Promise<Record<string, any>>;
|
|
591
588
|
getUser(userId: number): Promise<UserDisplay>;
|
package/dist/sdk.d.ts
CHANGED
|
@@ -155,7 +155,6 @@ export interface CompanyDisplay {
|
|
|
155
155
|
users?: number[];
|
|
156
156
|
active: boolean;
|
|
157
157
|
payment_plan_type: string;
|
|
158
|
-
photo_url_allowlist?: string[];
|
|
159
158
|
}
|
|
160
159
|
|
|
161
160
|
export interface CompanyKeywordListOverview {
|
|
@@ -184,7 +183,6 @@ export interface CuratedAlbumDisplay {
|
|
|
184
183
|
export interface EventPage {
|
|
185
184
|
events: PullEvent[];
|
|
186
185
|
next_cursor?: string;
|
|
187
|
-
size?: number;
|
|
188
186
|
}
|
|
189
187
|
|
|
190
188
|
export interface HealthCheck {
|
|
@@ -434,7 +432,6 @@ export class Admin {
|
|
|
434
432
|
export class Company {
|
|
435
433
|
getCompanyById(companyId: number): Promise<CompanyDisplay>;
|
|
436
434
|
confirmCompanyCreditBalance(companyId: number, options?: { photoCount?: number | number[], modelsList?: string[] | string[][] }): Promise<CreditBalanceOutput>;
|
|
437
|
-
updateCompanyPhotoUrlAllowlist(companyId: number, photoUrlAllowlist: string[]): Promise<Record<string, any>>;
|
|
438
435
|
}
|
|
439
436
|
|
|
440
437
|
export class CuratedAlbums {
|
|
@@ -566,7 +563,7 @@ export class Search {
|
|
|
566
563
|
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>>;
|
|
567
564
|
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>>;
|
|
568
565
|
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<any>;
|
|
569
|
-
searchProjectPhotosNaturalLanguage(projectTableName: string, searchText: string, options?: { minCosine?: number | number[], labelMinCosine?: number | number[], labelTopK?: number | number[], labelDelta?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
566
|
+
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>>;
|
|
570
567
|
getProjectSavedSearches(projectTableName: string): Promise<any>;
|
|
571
568
|
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
572
569
|
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>>;
|
|
@@ -585,7 +582,7 @@ export class Subscription {
|
|
|
585
582
|
|
|
586
583
|
export class Users {
|
|
587
584
|
createUser(name: string, email: string, accountType: number, companyId?: number, profilePicture?: string, paymentPlanType?: string): Promise<UserDisplay>;
|
|
588
|
-
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number,
|
|
585
|
+
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
589
586
|
changePassword(oldPassword: string, newPassword: string): Promise<Record<string, any>>;
|
|
590
587
|
getUserId(): Promise<Record<string, any>>;
|
|
591
588
|
getUser(userId: number): Promise<UserDisplay>;
|
package/dist/sdk.esm.d.ts
CHANGED
|
@@ -155,7 +155,6 @@ export interface CompanyDisplay {
|
|
|
155
155
|
users?: number[];
|
|
156
156
|
active: boolean;
|
|
157
157
|
payment_plan_type: string;
|
|
158
|
-
photo_url_allowlist?: string[];
|
|
159
158
|
}
|
|
160
159
|
|
|
161
160
|
export interface CompanyKeywordListOverview {
|
|
@@ -184,7 +183,6 @@ export interface CuratedAlbumDisplay {
|
|
|
184
183
|
export interface EventPage {
|
|
185
184
|
events: PullEvent[];
|
|
186
185
|
next_cursor?: string;
|
|
187
|
-
size?: number;
|
|
188
186
|
}
|
|
189
187
|
|
|
190
188
|
export interface HealthCheck {
|
|
@@ -434,7 +432,6 @@ export class Admin {
|
|
|
434
432
|
export class Company {
|
|
435
433
|
getCompanyById(companyId: number): Promise<CompanyDisplay>;
|
|
436
434
|
confirmCompanyCreditBalance(companyId: number, options?: { photoCount?: number | number[], modelsList?: string[] | string[][] }): Promise<CreditBalanceOutput>;
|
|
437
|
-
updateCompanyPhotoUrlAllowlist(companyId: number, photoUrlAllowlist: string[]): Promise<Record<string, any>>;
|
|
438
435
|
}
|
|
439
436
|
|
|
440
437
|
export class CuratedAlbums {
|
|
@@ -566,7 +563,7 @@ export class Search {
|
|
|
566
563
|
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>>;
|
|
567
564
|
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>>;
|
|
568
565
|
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<any>;
|
|
569
|
-
searchProjectPhotosNaturalLanguage(projectTableName: string, searchText: string, options?: { minCosine?: number | number[], labelMinCosine?: number | number[], labelTopK?: number | number[], labelDelta?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
566
|
+
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>>;
|
|
570
567
|
getProjectSavedSearches(projectTableName: string): Promise<any>;
|
|
571
568
|
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
572
569
|
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>>;
|
|
@@ -585,7 +582,7 @@ export class Subscription {
|
|
|
585
582
|
|
|
586
583
|
export class Users {
|
|
587
584
|
createUser(name: string, email: string, accountType: number, companyId?: number, profilePicture?: string, paymentPlanType?: string): Promise<UserDisplay>;
|
|
588
|
-
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number,
|
|
585
|
+
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
589
586
|
changePassword(oldPassword: string, newPassword: string): Promise<Record<string, any>>;
|
|
590
587
|
getUserId(): Promise<Record<string, any>>;
|
|
591
588
|
getUser(userId: number): Promise<UserDisplay>;
|
package/dist/sdk.esm.js
CHANGED
|
@@ -944,8 +944,6 @@ class Admin {
|
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
946
|
|
|
947
|
-
function stripUndef$8(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
948
|
-
|
|
949
947
|
class Company {
|
|
950
948
|
constructor(ctx) { this._ctx = ctx; }
|
|
951
949
|
|
|
@@ -967,16 +965,6 @@ class Company {
|
|
|
967
965
|
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
968
966
|
return data;
|
|
969
967
|
}
|
|
970
|
-
|
|
971
|
-
async updateCompanyPhotoUrlAllowlist(companyId, photoUrlAllowlist) {
|
|
972
|
-
this._ctx.requireTokens();
|
|
973
|
-
const path = `/api/v1/company/${encodeURIComponent(companyId)}/photo_url_allowlist/`;
|
|
974
|
-
const body = stripUndef$8({
|
|
975
|
-
photo_url_allowlist: photoUrlAllowlist,
|
|
976
|
-
});
|
|
977
|
-
const { data } = await this._ctx.client.request(path, 'PUT', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
978
|
-
return data;
|
|
979
|
-
}
|
|
980
968
|
}
|
|
981
969
|
|
|
982
970
|
function stripUndef$7(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
@@ -2021,7 +2009,7 @@ class Search {
|
|
|
2021
2009
|
return data;
|
|
2022
2010
|
}
|
|
2023
2011
|
|
|
2024
|
-
async searchProjectPhotosNaturalLanguage(projectTableName, searchText, { minCosine, labelMinCosine, labelTopK, labelDelta, bestOfSimilarSetsOnly, splitByTier } = {}) {
|
|
2012
|
+
async searchProjectPhotosNaturalLanguage(projectTableName, searchText, size = undefined, { minCosine, labelMinCosine, labelTopK, labelDelta, bestOfSimilarSetsOnly, splitByTier } = {}) {
|
|
2025
2013
|
this._ctx.requireTokens();
|
|
2026
2014
|
let path = `/api/v1/search/natural_language/${encodeURIComponent(projectTableName)}/`;
|
|
2027
2015
|
const query = new URLSearchParams();
|
|
@@ -2035,6 +2023,7 @@ class Search {
|
|
|
2035
2023
|
if (qs) path += '?' + qs;
|
|
2036
2024
|
const body = stripUndef$2({
|
|
2037
2025
|
search_text: searchText,
|
|
2026
|
+
size: size,
|
|
2038
2027
|
});
|
|
2039
2028
|
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
2040
2029
|
return data;
|
|
@@ -2177,7 +2166,7 @@ class Users {
|
|
|
2177
2166
|
return data;
|
|
2178
2167
|
}
|
|
2179
2168
|
|
|
2180
|
-
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined,
|
|
2169
|
+
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, { inviteToken } = {}) {
|
|
2181
2170
|
let path = `/api/v1/users/new_company/`;
|
|
2182
2171
|
const query = new URLSearchParams();
|
|
2183
2172
|
if (inviteToken !== undefined) (Array.isArray(inviteToken) ? inviteToken : [inviteToken]).forEach(v => query.append('invite_token', v));
|
|
@@ -2192,7 +2181,6 @@ class Users {
|
|
|
2192
2181
|
password: password,
|
|
2193
2182
|
company_name: companyName,
|
|
2194
2183
|
credits: credits,
|
|
2195
|
-
photo_url_allowlist: photoUrlAllowlist,
|
|
2196
2184
|
});
|
|
2197
2185
|
const resp = await fetch(this._ctx.baseUrl + path, {
|
|
2198
2186
|
method: 'POST',
|
package/dist/sdk.umd.js
CHANGED
|
@@ -950,8 +950,6 @@
|
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
952
|
|
|
953
|
-
function stripUndef$8(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
954
|
-
|
|
955
953
|
class Company {
|
|
956
954
|
constructor(ctx) { this._ctx = ctx; }
|
|
957
955
|
|
|
@@ -973,16 +971,6 @@
|
|
|
973
971
|
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
974
972
|
return data;
|
|
975
973
|
}
|
|
976
|
-
|
|
977
|
-
async updateCompanyPhotoUrlAllowlist(companyId, photoUrlAllowlist) {
|
|
978
|
-
this._ctx.requireTokens();
|
|
979
|
-
const path = `/api/v1/company/${encodeURIComponent(companyId)}/photo_url_allowlist/`;
|
|
980
|
-
const body = stripUndef$8({
|
|
981
|
-
photo_url_allowlist: photoUrlAllowlist,
|
|
982
|
-
});
|
|
983
|
-
const { data } = await this._ctx.client.request(path, 'PUT', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
984
|
-
return data;
|
|
985
|
-
}
|
|
986
974
|
}
|
|
987
975
|
|
|
988
976
|
function stripUndef$7(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
@@ -2027,7 +2015,7 @@
|
|
|
2027
2015
|
return data;
|
|
2028
2016
|
}
|
|
2029
2017
|
|
|
2030
|
-
async searchProjectPhotosNaturalLanguage(projectTableName, searchText, { minCosine, labelMinCosine, labelTopK, labelDelta, bestOfSimilarSetsOnly, splitByTier } = {}) {
|
|
2018
|
+
async searchProjectPhotosNaturalLanguage(projectTableName, searchText, size = undefined, { minCosine, labelMinCosine, labelTopK, labelDelta, bestOfSimilarSetsOnly, splitByTier } = {}) {
|
|
2031
2019
|
this._ctx.requireTokens();
|
|
2032
2020
|
let path = `/api/v1/search/natural_language/${encodeURIComponent(projectTableName)}/`;
|
|
2033
2021
|
const query = new URLSearchParams();
|
|
@@ -2041,6 +2029,7 @@
|
|
|
2041
2029
|
if (qs) path += '?' + qs;
|
|
2042
2030
|
const body = stripUndef$2({
|
|
2043
2031
|
search_text: searchText,
|
|
2032
|
+
size: size,
|
|
2044
2033
|
});
|
|
2045
2034
|
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
2046
2035
|
return data;
|
|
@@ -2183,7 +2172,7 @@
|
|
|
2183
2172
|
return data;
|
|
2184
2173
|
}
|
|
2185
2174
|
|
|
2186
|
-
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined,
|
|
2175
|
+
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, { inviteToken } = {}) {
|
|
2187
2176
|
let path = `/api/v1/users/new_company/`;
|
|
2188
2177
|
const query = new URLSearchParams();
|
|
2189
2178
|
if (inviteToken !== undefined) (Array.isArray(inviteToken) ? inviteToken : [inviteToken]).forEach(v => query.append('invite_token', v));
|
|
@@ -2198,7 +2187,6 @@
|
|
|
2198
2187
|
password: password,
|
|
2199
2188
|
company_name: companyName,
|
|
2200
2189
|
credits: credits,
|
|
2201
|
-
photo_url_allowlist: photoUrlAllowlist,
|
|
2202
2190
|
});
|
|
2203
2191
|
const resp = await fetch(this._ctx.baseUrl + path, {
|
|
2204
2192
|
method: 'POST',
|