@mediaviz/sdk 1.8.0-dev.97 → 1.8.0-dev.98
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 +1 -14
- package/dist/sdk.d.cts +1 -3
- package/dist/sdk.d.ts +1 -3
- package/dist/sdk.esm.d.ts +1 -3
- package/dist/sdk.esm.js +1 -14
- package/dist/sdk.umd.js +1 -14
- 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; }
|
|
@@ -2179,7 +2167,7 @@ class Users {
|
|
|
2179
2167
|
return data;
|
|
2180
2168
|
}
|
|
2181
2169
|
|
|
2182
|
-
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined,
|
|
2170
|
+
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, { inviteToken } = {}) {
|
|
2183
2171
|
let path = `/api/v1/users/new_company/`;
|
|
2184
2172
|
const query = new URLSearchParams();
|
|
2185
2173
|
if (inviteToken !== undefined) (Array.isArray(inviteToken) ? inviteToken : [inviteToken]).forEach(v => query.append('invite_token', v));
|
|
@@ -2194,7 +2182,6 @@ class Users {
|
|
|
2194
2182
|
password: password,
|
|
2195
2183
|
company_name: companyName,
|
|
2196
2184
|
credits: credits,
|
|
2197
|
-
photo_url_allowlist: photoUrlAllowlist,
|
|
2198
2185
|
});
|
|
2199
2186
|
const resp = await fetch(this._ctx.baseUrl + path, {
|
|
2200
2187
|
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 {
|
|
@@ -434,7 +433,6 @@ export class Admin {
|
|
|
434
433
|
export class Company {
|
|
435
434
|
getCompanyById(companyId: number): Promise<CompanyDisplay>;
|
|
436
435
|
confirmCompanyCreditBalance(companyId: number, options?: { photoCount?: number | number[], modelsList?: string[] | string[][] }): Promise<CreditBalanceOutput>;
|
|
437
|
-
updateCompanyPhotoUrlAllowlist(companyId: number, photoUrlAllowlist: string[]): Promise<Record<string, any>>;
|
|
438
436
|
}
|
|
439
437
|
|
|
440
438
|
export class CuratedAlbums {
|
|
@@ -585,7 +583,7 @@ export class Subscription {
|
|
|
585
583
|
|
|
586
584
|
export class Users {
|
|
587
585
|
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,
|
|
586
|
+
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
589
587
|
changePassword(oldPassword: string, newPassword: string): Promise<Record<string, any>>;
|
|
590
588
|
getUserId(): Promise<Record<string, any>>;
|
|
591
589
|
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 {
|
|
@@ -434,7 +433,6 @@ export class Admin {
|
|
|
434
433
|
export class Company {
|
|
435
434
|
getCompanyById(companyId: number): Promise<CompanyDisplay>;
|
|
436
435
|
confirmCompanyCreditBalance(companyId: number, options?: { photoCount?: number | number[], modelsList?: string[] | string[][] }): Promise<CreditBalanceOutput>;
|
|
437
|
-
updateCompanyPhotoUrlAllowlist(companyId: number, photoUrlAllowlist: string[]): Promise<Record<string, any>>;
|
|
438
436
|
}
|
|
439
437
|
|
|
440
438
|
export class CuratedAlbums {
|
|
@@ -585,7 +583,7 @@ export class Subscription {
|
|
|
585
583
|
|
|
586
584
|
export class Users {
|
|
587
585
|
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,
|
|
586
|
+
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
589
587
|
changePassword(oldPassword: string, newPassword: string): Promise<Record<string, any>>;
|
|
590
588
|
getUserId(): Promise<Record<string, any>>;
|
|
591
589
|
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 {
|
|
@@ -434,7 +433,6 @@ export class Admin {
|
|
|
434
433
|
export class Company {
|
|
435
434
|
getCompanyById(companyId: number): Promise<CompanyDisplay>;
|
|
436
435
|
confirmCompanyCreditBalance(companyId: number, options?: { photoCount?: number | number[], modelsList?: string[] | string[][] }): Promise<CreditBalanceOutput>;
|
|
437
|
-
updateCompanyPhotoUrlAllowlist(companyId: number, photoUrlAllowlist: string[]): Promise<Record<string, any>>;
|
|
438
436
|
}
|
|
439
437
|
|
|
440
438
|
export class CuratedAlbums {
|
|
@@ -585,7 +583,7 @@ export class Subscription {
|
|
|
585
583
|
|
|
586
584
|
export class Users {
|
|
587
585
|
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,
|
|
586
|
+
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
589
587
|
changePassword(oldPassword: string, newPassword: string): Promise<Record<string, any>>;
|
|
590
588
|
getUserId(): Promise<Record<string, any>>;
|
|
591
589
|
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; }
|
|
@@ -2177,7 +2165,7 @@ class Users {
|
|
|
2177
2165
|
return data;
|
|
2178
2166
|
}
|
|
2179
2167
|
|
|
2180
|
-
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined,
|
|
2168
|
+
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, { inviteToken } = {}) {
|
|
2181
2169
|
let path = `/api/v1/users/new_company/`;
|
|
2182
2170
|
const query = new URLSearchParams();
|
|
2183
2171
|
if (inviteToken !== undefined) (Array.isArray(inviteToken) ? inviteToken : [inviteToken]).forEach(v => query.append('invite_token', v));
|
|
@@ -2192,7 +2180,6 @@ class Users {
|
|
|
2192
2180
|
password: password,
|
|
2193
2181
|
company_name: companyName,
|
|
2194
2182
|
credits: credits,
|
|
2195
|
-
photo_url_allowlist: photoUrlAllowlist,
|
|
2196
2183
|
});
|
|
2197
2184
|
const resp = await fetch(this._ctx.baseUrl + path, {
|
|
2198
2185
|
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; }
|
|
@@ -2183,7 +2171,7 @@
|
|
|
2183
2171
|
return data;
|
|
2184
2172
|
}
|
|
2185
2173
|
|
|
2186
|
-
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined,
|
|
2174
|
+
async createUserAndCompany(name, email, password, companyId = undefined, profilePicture = undefined, paymentPlanType = undefined, companyName = undefined, credits = undefined, { inviteToken } = {}) {
|
|
2187
2175
|
let path = `/api/v1/users/new_company/`;
|
|
2188
2176
|
const query = new URLSearchParams();
|
|
2189
2177
|
if (inviteToken !== undefined) (Array.isArray(inviteToken) ? inviteToken : [inviteToken]).forEach(v => query.append('invite_token', v));
|
|
@@ -2198,7 +2186,6 @@
|
|
|
2198
2186
|
password: password,
|
|
2199
2187
|
company_name: companyName,
|
|
2200
2188
|
credits: credits,
|
|
2201
|
-
photo_url_allowlist: photoUrlAllowlist,
|
|
2202
2189
|
});
|
|
2203
2190
|
const resp = await fetch(this._ctx.baseUrl + path, {
|
|
2204
2191
|
method: 'POST',
|