@mediaviz/sdk 1.8.0-dev.90 → 1.8.0-dev.92
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 +21 -1
- package/dist/sdk.d.cts +4 -1
- package/dist/sdk.d.ts +4 -1
- package/dist/sdk.esm.d.ts +4 -1
- package/dist/sdk.esm.js +21 -1
- package/dist/sdk.umd.js +21 -1
- package/package.json +1 -1
package/dist/sdk.cjs
CHANGED
|
@@ -504,6 +504,8 @@ class Admin {
|
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
|
|
507
|
+
function stripUndef$8(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
508
|
+
|
|
507
509
|
class Company {
|
|
508
510
|
constructor(ctx) { this._ctx = ctx; }
|
|
509
511
|
|
|
@@ -525,6 +527,16 @@ class Company {
|
|
|
525
527
|
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
526
528
|
return data;
|
|
527
529
|
}
|
|
530
|
+
|
|
531
|
+
async updateCompanyPhotoUrlAllowlist(companyId, photoUrlAllowlist) {
|
|
532
|
+
this._ctx.requireTokens();
|
|
533
|
+
const path = `/api/v1/company/${encodeURIComponent(companyId)}/photo_url_allowlist/`;
|
|
534
|
+
const body = stripUndef$8({
|
|
535
|
+
photo_url_allowlist: photoUrlAllowlist,
|
|
536
|
+
});
|
|
537
|
+
const { data } = await this._ctx.client.request(path, 'PUT', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
538
|
+
return data;
|
|
539
|
+
}
|
|
528
540
|
}
|
|
529
541
|
|
|
530
542
|
function stripUndef$7(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
@@ -1184,6 +1196,13 @@ class Person {
|
|
|
1184
1196
|
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
1185
1197
|
return data;
|
|
1186
1198
|
}
|
|
1199
|
+
|
|
1200
|
+
async removePerson(projectTableName, personId) {
|
|
1201
|
+
this._ctx.requireTokens();
|
|
1202
|
+
const path = `/api/v1/person/${encodeURIComponent(projectTableName)}/${encodeURIComponent(personId)}`;
|
|
1203
|
+
const { data } = await this._ctx.client.request(path, 'DELETE', this._ctx.accessToken, this._ctx.refreshToken);
|
|
1204
|
+
return data;
|
|
1205
|
+
}
|
|
1187
1206
|
}
|
|
1188
1207
|
|
|
1189
1208
|
function stripUndef$3(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
@@ -1718,7 +1737,7 @@ class Users {
|
|
|
1718
1737
|
return data;
|
|
1719
1738
|
}
|
|
1720
1739
|
|
|
1721
|
-
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, { inviteToken } = {}) {
|
|
1740
|
+
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, photoUrlAllowlist = undefined, { inviteToken } = {}) {
|
|
1722
1741
|
let path = `/api/v1/users/new_company/`;
|
|
1723
1742
|
const query = new URLSearchParams();
|
|
1724
1743
|
if (inviteToken !== undefined) (Array.isArray(inviteToken) ? inviteToken : [inviteToken]).forEach(v => query.append('invite_token', v));
|
|
@@ -1733,6 +1752,7 @@ class Users {
|
|
|
1733
1752
|
password: password,
|
|
1734
1753
|
company_name: companyName,
|
|
1735
1754
|
credits: credits,
|
|
1755
|
+
photo_url_allowlist: photoUrlAllowlist,
|
|
1736
1756
|
});
|
|
1737
1757
|
const resp = await fetch(this._ctx.baseUrl + path, {
|
|
1738
1758
|
method: 'POST',
|
package/dist/sdk.d.cts
CHANGED
|
@@ -82,6 +82,7 @@ export interface CompanyDisplay {
|
|
|
82
82
|
users?: number[];
|
|
83
83
|
active: boolean;
|
|
84
84
|
payment_plan_type: string;
|
|
85
|
+
photo_url_allowlist?: string[];
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
export interface CompanyKeywordListOverview {
|
|
@@ -359,6 +360,7 @@ export class Admin {
|
|
|
359
360
|
export class Company {
|
|
360
361
|
getCompanyById(companyId: number): Promise<CompanyDisplay>;
|
|
361
362
|
confirmCompanyCreditBalance(companyId: number, options?: { photoCount?: number | number[], modelsList?: string[] | string[][] }): Promise<CreditBalanceOutput>;
|
|
363
|
+
updateCompanyPhotoUrlAllowlist(companyId: number, photoUrlAllowlist: string[]): Promise<Record<string, any>>;
|
|
362
364
|
}
|
|
363
365
|
|
|
364
366
|
export class CuratedAlbums {
|
|
@@ -445,6 +447,7 @@ export class Person {
|
|
|
445
447
|
getAllPersonNamesFromProject(projectTableName: string): Promise<any>;
|
|
446
448
|
getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<any>;
|
|
447
449
|
getAllPersonsFromPhoto(projectTableName: string, photoId: number): Promise<PhotoPersonLight[]>;
|
|
450
|
+
removePerson(projectTableName: string, personId: string): Promise<Record<string, any>>;
|
|
448
451
|
}
|
|
449
452
|
|
|
450
453
|
export class Photoupload {
|
|
@@ -508,7 +511,7 @@ export class Subscription {
|
|
|
508
511
|
|
|
509
512
|
export class Users {
|
|
510
513
|
createUser(name: string, email: string, accountType: number, companyId?: number, profilePicture?: string, paymentPlanType?: string): Promise<UserDisplay>;
|
|
511
|
-
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
514
|
+
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, photoUrlAllowlist?: string[], options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
512
515
|
changePassword(oldPassword: string, newPassword: string): Promise<Record<string, any>>;
|
|
513
516
|
getUserId(): Promise<Record<string, any>>;
|
|
514
517
|
getUser(userId: number): Promise<UserDisplay>;
|
package/dist/sdk.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ export interface CompanyDisplay {
|
|
|
82
82
|
users?: number[];
|
|
83
83
|
active: boolean;
|
|
84
84
|
payment_plan_type: string;
|
|
85
|
+
photo_url_allowlist?: string[];
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
export interface CompanyKeywordListOverview {
|
|
@@ -359,6 +360,7 @@ export class Admin {
|
|
|
359
360
|
export class Company {
|
|
360
361
|
getCompanyById(companyId: number): Promise<CompanyDisplay>;
|
|
361
362
|
confirmCompanyCreditBalance(companyId: number, options?: { photoCount?: number | number[], modelsList?: string[] | string[][] }): Promise<CreditBalanceOutput>;
|
|
363
|
+
updateCompanyPhotoUrlAllowlist(companyId: number, photoUrlAllowlist: string[]): Promise<Record<string, any>>;
|
|
362
364
|
}
|
|
363
365
|
|
|
364
366
|
export class CuratedAlbums {
|
|
@@ -445,6 +447,7 @@ export class Person {
|
|
|
445
447
|
getAllPersonNamesFromProject(projectTableName: string): Promise<any>;
|
|
446
448
|
getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<any>;
|
|
447
449
|
getAllPersonsFromPhoto(projectTableName: string, photoId: number): Promise<PhotoPersonLight[]>;
|
|
450
|
+
removePerson(projectTableName: string, personId: string): Promise<Record<string, any>>;
|
|
448
451
|
}
|
|
449
452
|
|
|
450
453
|
export class Photoupload {
|
|
@@ -508,7 +511,7 @@ export class Subscription {
|
|
|
508
511
|
|
|
509
512
|
export class Users {
|
|
510
513
|
createUser(name: string, email: string, accountType: number, companyId?: number, profilePicture?: string, paymentPlanType?: string): Promise<UserDisplay>;
|
|
511
|
-
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
514
|
+
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, photoUrlAllowlist?: string[], options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
512
515
|
changePassword(oldPassword: string, newPassword: string): Promise<Record<string, any>>;
|
|
513
516
|
getUserId(): Promise<Record<string, any>>;
|
|
514
517
|
getUser(userId: number): Promise<UserDisplay>;
|
package/dist/sdk.esm.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ export interface CompanyDisplay {
|
|
|
82
82
|
users?: number[];
|
|
83
83
|
active: boolean;
|
|
84
84
|
payment_plan_type: string;
|
|
85
|
+
photo_url_allowlist?: string[];
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
export interface CompanyKeywordListOverview {
|
|
@@ -359,6 +360,7 @@ export class Admin {
|
|
|
359
360
|
export class Company {
|
|
360
361
|
getCompanyById(companyId: number): Promise<CompanyDisplay>;
|
|
361
362
|
confirmCompanyCreditBalance(companyId: number, options?: { photoCount?: number | number[], modelsList?: string[] | string[][] }): Promise<CreditBalanceOutput>;
|
|
363
|
+
updateCompanyPhotoUrlAllowlist(companyId: number, photoUrlAllowlist: string[]): Promise<Record<string, any>>;
|
|
362
364
|
}
|
|
363
365
|
|
|
364
366
|
export class CuratedAlbums {
|
|
@@ -445,6 +447,7 @@ export class Person {
|
|
|
445
447
|
getAllPersonNamesFromProject(projectTableName: string): Promise<any>;
|
|
446
448
|
getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<any>;
|
|
447
449
|
getAllPersonsFromPhoto(projectTableName: string, photoId: number): Promise<PhotoPersonLight[]>;
|
|
450
|
+
removePerson(projectTableName: string, personId: string): Promise<Record<string, any>>;
|
|
448
451
|
}
|
|
449
452
|
|
|
450
453
|
export class Photoupload {
|
|
@@ -508,7 +511,7 @@ export class Subscription {
|
|
|
508
511
|
|
|
509
512
|
export class Users {
|
|
510
513
|
createUser(name: string, email: string, accountType: number, companyId?: number, profilePicture?: string, paymentPlanType?: string): Promise<UserDisplay>;
|
|
511
|
-
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
514
|
+
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, photoUrlAllowlist?: string[], options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
512
515
|
changePassword(oldPassword: string, newPassword: string): Promise<Record<string, any>>;
|
|
513
516
|
getUserId(): Promise<Record<string, any>>;
|
|
514
517
|
getUser(userId: number): Promise<UserDisplay>;
|
package/dist/sdk.esm.js
CHANGED
|
@@ -502,6 +502,8 @@ class Admin {
|
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
504
|
|
|
505
|
+
function stripUndef$8(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
506
|
+
|
|
505
507
|
class Company {
|
|
506
508
|
constructor(ctx) { this._ctx = ctx; }
|
|
507
509
|
|
|
@@ -523,6 +525,16 @@ class Company {
|
|
|
523
525
|
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
524
526
|
return data;
|
|
525
527
|
}
|
|
528
|
+
|
|
529
|
+
async updateCompanyPhotoUrlAllowlist(companyId, photoUrlAllowlist) {
|
|
530
|
+
this._ctx.requireTokens();
|
|
531
|
+
const path = `/api/v1/company/${encodeURIComponent(companyId)}/photo_url_allowlist/`;
|
|
532
|
+
const body = stripUndef$8({
|
|
533
|
+
photo_url_allowlist: photoUrlAllowlist,
|
|
534
|
+
});
|
|
535
|
+
const { data } = await this._ctx.client.request(path, 'PUT', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
536
|
+
return data;
|
|
537
|
+
}
|
|
526
538
|
}
|
|
527
539
|
|
|
528
540
|
function stripUndef$7(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
@@ -1182,6 +1194,13 @@ class Person {
|
|
|
1182
1194
|
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
1183
1195
|
return data;
|
|
1184
1196
|
}
|
|
1197
|
+
|
|
1198
|
+
async removePerson(projectTableName, personId) {
|
|
1199
|
+
this._ctx.requireTokens();
|
|
1200
|
+
const path = `/api/v1/person/${encodeURIComponent(projectTableName)}/${encodeURIComponent(personId)}`;
|
|
1201
|
+
const { data } = await this._ctx.client.request(path, 'DELETE', this._ctx.accessToken, this._ctx.refreshToken);
|
|
1202
|
+
return data;
|
|
1203
|
+
}
|
|
1185
1204
|
}
|
|
1186
1205
|
|
|
1187
1206
|
function stripUndef$3(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
@@ -1716,7 +1735,7 @@ class Users {
|
|
|
1716
1735
|
return data;
|
|
1717
1736
|
}
|
|
1718
1737
|
|
|
1719
|
-
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, { inviteToken } = {}) {
|
|
1738
|
+
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, photoUrlAllowlist = undefined, { inviteToken } = {}) {
|
|
1720
1739
|
let path = `/api/v1/users/new_company/`;
|
|
1721
1740
|
const query = new URLSearchParams();
|
|
1722
1741
|
if (inviteToken !== undefined) (Array.isArray(inviteToken) ? inviteToken : [inviteToken]).forEach(v => query.append('invite_token', v));
|
|
@@ -1731,6 +1750,7 @@ class Users {
|
|
|
1731
1750
|
password: password,
|
|
1732
1751
|
company_name: companyName,
|
|
1733
1752
|
credits: credits,
|
|
1753
|
+
photo_url_allowlist: photoUrlAllowlist,
|
|
1734
1754
|
});
|
|
1735
1755
|
const resp = await fetch(this._ctx.baseUrl + path, {
|
|
1736
1756
|
method: 'POST',
|
package/dist/sdk.umd.js
CHANGED
|
@@ -508,6 +508,8 @@
|
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
|
|
511
|
+
function stripUndef$8(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
512
|
+
|
|
511
513
|
class Company {
|
|
512
514
|
constructor(ctx) { this._ctx = ctx; }
|
|
513
515
|
|
|
@@ -529,6 +531,16 @@
|
|
|
529
531
|
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
530
532
|
return data;
|
|
531
533
|
}
|
|
534
|
+
|
|
535
|
+
async updateCompanyPhotoUrlAllowlist(companyId, photoUrlAllowlist) {
|
|
536
|
+
this._ctx.requireTokens();
|
|
537
|
+
const path = `/api/v1/company/${encodeURIComponent(companyId)}/photo_url_allowlist/`;
|
|
538
|
+
const body = stripUndef$8({
|
|
539
|
+
photo_url_allowlist: photoUrlAllowlist,
|
|
540
|
+
});
|
|
541
|
+
const { data } = await this._ctx.client.request(path, 'PUT', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
542
|
+
return data;
|
|
543
|
+
}
|
|
532
544
|
}
|
|
533
545
|
|
|
534
546
|
function stripUndef$7(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
@@ -1188,6 +1200,13 @@
|
|
|
1188
1200
|
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
1189
1201
|
return data;
|
|
1190
1202
|
}
|
|
1203
|
+
|
|
1204
|
+
async removePerson(projectTableName, personId) {
|
|
1205
|
+
this._ctx.requireTokens();
|
|
1206
|
+
const path = `/api/v1/person/${encodeURIComponent(projectTableName)}/${encodeURIComponent(personId)}`;
|
|
1207
|
+
const { data } = await this._ctx.client.request(path, 'DELETE', this._ctx.accessToken, this._ctx.refreshToken);
|
|
1208
|
+
return data;
|
|
1209
|
+
}
|
|
1191
1210
|
}
|
|
1192
1211
|
|
|
1193
1212
|
function stripUndef$3(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
@@ -1722,7 +1741,7 @@
|
|
|
1722
1741
|
return data;
|
|
1723
1742
|
}
|
|
1724
1743
|
|
|
1725
|
-
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, { inviteToken } = {}) {
|
|
1744
|
+
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, photoUrlAllowlist = undefined, { inviteToken } = {}) {
|
|
1726
1745
|
let path = `/api/v1/users/new_company/`;
|
|
1727
1746
|
const query = new URLSearchParams();
|
|
1728
1747
|
if (inviteToken !== undefined) (Array.isArray(inviteToken) ? inviteToken : [inviteToken]).forEach(v => query.append('invite_token', v));
|
|
@@ -1737,6 +1756,7 @@
|
|
|
1737
1756
|
password: password,
|
|
1738
1757
|
company_name: companyName,
|
|
1739
1758
|
credits: credits,
|
|
1759
|
+
photo_url_allowlist: photoUrlAllowlist,
|
|
1740
1760
|
});
|
|
1741
1761
|
const resp = await fetch(this._ctx.baseUrl + path, {
|
|
1742
1762
|
method: 'POST',
|