@mediaviz/sdk 1.8.0-dev.90 → 1.8.0-dev.91
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 +14 -1
- package/dist/sdk.d.cts +3 -1
- package/dist/sdk.d.ts +3 -1
- package/dist/sdk.esm.d.ts +3 -1
- package/dist/sdk.esm.js +14 -1
- package/dist/sdk.umd.js +14 -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; }
|
|
@@ -1718,7 +1730,7 @@ class Users {
|
|
|
1718
1730
|
return data;
|
|
1719
1731
|
}
|
|
1720
1732
|
|
|
1721
|
-
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, { inviteToken } = {}) {
|
|
1733
|
+
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, photoUrlAllowlist = undefined, { inviteToken } = {}) {
|
|
1722
1734
|
let path = `/api/v1/users/new_company/`;
|
|
1723
1735
|
const query = new URLSearchParams();
|
|
1724
1736
|
if (inviteToken !== undefined) (Array.isArray(inviteToken) ? inviteToken : [inviteToken]).forEach(v => query.append('invite_token', v));
|
|
@@ -1733,6 +1745,7 @@ class Users {
|
|
|
1733
1745
|
password: password,
|
|
1734
1746
|
company_name: companyName,
|
|
1735
1747
|
credits: credits,
|
|
1748
|
+
photo_url_allowlist: photoUrlAllowlist,
|
|
1736
1749
|
});
|
|
1737
1750
|
const resp = await fetch(this._ctx.baseUrl + path, {
|
|
1738
1751
|
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 {
|
|
@@ -508,7 +510,7 @@ export class Subscription {
|
|
|
508
510
|
|
|
509
511
|
export class Users {
|
|
510
512
|
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>;
|
|
513
|
+
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
514
|
changePassword(oldPassword: string, newPassword: string): Promise<Record<string, any>>;
|
|
513
515
|
getUserId(): Promise<Record<string, any>>;
|
|
514
516
|
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 {
|
|
@@ -508,7 +510,7 @@ export class Subscription {
|
|
|
508
510
|
|
|
509
511
|
export class Users {
|
|
510
512
|
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>;
|
|
513
|
+
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
514
|
changePassword(oldPassword: string, newPassword: string): Promise<Record<string, any>>;
|
|
513
515
|
getUserId(): Promise<Record<string, any>>;
|
|
514
516
|
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 {
|
|
@@ -508,7 +510,7 @@ export class Subscription {
|
|
|
508
510
|
|
|
509
511
|
export class Users {
|
|
510
512
|
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>;
|
|
513
|
+
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
514
|
changePassword(oldPassword: string, newPassword: string): Promise<Record<string, any>>;
|
|
513
515
|
getUserId(): Promise<Record<string, any>>;
|
|
514
516
|
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; }
|
|
@@ -1716,7 +1728,7 @@ class Users {
|
|
|
1716
1728
|
return data;
|
|
1717
1729
|
}
|
|
1718
1730
|
|
|
1719
|
-
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, { inviteToken } = {}) {
|
|
1731
|
+
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, photoUrlAllowlist = undefined, { inviteToken } = {}) {
|
|
1720
1732
|
let path = `/api/v1/users/new_company/`;
|
|
1721
1733
|
const query = new URLSearchParams();
|
|
1722
1734
|
if (inviteToken !== undefined) (Array.isArray(inviteToken) ? inviteToken : [inviteToken]).forEach(v => query.append('invite_token', v));
|
|
@@ -1731,6 +1743,7 @@ class Users {
|
|
|
1731
1743
|
password: password,
|
|
1732
1744
|
company_name: companyName,
|
|
1733
1745
|
credits: credits,
|
|
1746
|
+
photo_url_allowlist: photoUrlAllowlist,
|
|
1734
1747
|
});
|
|
1735
1748
|
const resp = await fetch(this._ctx.baseUrl + path, {
|
|
1736
1749
|
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; }
|
|
@@ -1722,7 +1734,7 @@
|
|
|
1722
1734
|
return data;
|
|
1723
1735
|
}
|
|
1724
1736
|
|
|
1725
|
-
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, { inviteToken } = {}) {
|
|
1737
|
+
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, photoUrlAllowlist = undefined, { inviteToken } = {}) {
|
|
1726
1738
|
let path = `/api/v1/users/new_company/`;
|
|
1727
1739
|
const query = new URLSearchParams();
|
|
1728
1740
|
if (inviteToken !== undefined) (Array.isArray(inviteToken) ? inviteToken : [inviteToken]).forEach(v => query.append('invite_token', v));
|
|
@@ -1737,6 +1749,7 @@
|
|
|
1737
1749
|
password: password,
|
|
1738
1750
|
company_name: companyName,
|
|
1739
1751
|
credits: credits,
|
|
1752
|
+
photo_url_allowlist: photoUrlAllowlist,
|
|
1740
1753
|
});
|
|
1741
1754
|
const resp = await fetch(this._ctx.baseUrl + path, {
|
|
1742
1755
|
method: 'POST',
|