@mediaviz/react-native-sdk 1.10.0-rc.8 → 1.11.0-dev.125

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.esm.js CHANGED
@@ -1113,6 +1113,8 @@ class AiModelCredits {
1113
1113
  }
1114
1114
  }
1115
1115
 
1116
+ function stripUndef$a(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
1117
+
1116
1118
  class Admin {
1117
1119
  constructor(ctx) { this._ctx = ctx; }
1118
1120
 
@@ -1122,6 +1124,16 @@ class Admin {
1122
1124
  const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
1123
1125
  return data;
1124
1126
  }
1127
+
1128
+ async adminSetCompanyCanManageApiClients(companyId, canManageApiClients) {
1129
+ this._ctx.requireTokens();
1130
+ const path = `/api/v1/admin/companies/${encodeURIComponent(companyId)}/can_manage_api_clients`;
1131
+ const body = stripUndef$a({
1132
+ can_manage_api_clients: canManageApiClients,
1133
+ });
1134
+ const { data } = await this._ctx.client.request(path, 'PATCH', this._ctx.accessToken, this._ctx.refreshToken, body);
1135
+ return data;
1136
+ }
1125
1137
  }
1126
1138
 
1127
1139
  class Company {
@@ -1147,7 +1159,7 @@ class Company {
1147
1159
  }
1148
1160
  }
1149
1161
 
1150
- function stripUndef$8(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
1162
+ function stripUndef$9(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
1151
1163
 
1152
1164
  class CuratedAlbums {
1153
1165
  constructor(ctx) { this._ctx = ctx; }
@@ -1155,7 +1167,7 @@ class CuratedAlbums {
1155
1167
  async createCuratedAlbum(projectTableName, name, description = undefined, confidenceValue = undefined) {
1156
1168
  this._ctx.requireTokens();
1157
1169
  const path = `/api/v1/curated_album/project/${encodeURIComponent(projectTableName)}`;
1158
- const body = stripUndef$8({
1170
+ const body = stripUndef$9({
1159
1171
  name: name,
1160
1172
  description: description,
1161
1173
  confidence_value: confidenceValue,
@@ -1209,7 +1221,7 @@ class CuratedAlbums {
1209
1221
  async updateCuratedAlbum(albumId, { name, description, confidenceValue } = {}) {
1210
1222
  this._ctx.requireTokens();
1211
1223
  const path = `/api/v1/curated_album/${encodeURIComponent(albumId)}`;
1212
- const body = stripUndef$8({
1224
+ const body = stripUndef$9({
1213
1225
  name: name,
1214
1226
  description: description,
1215
1227
  confidence_value: confidenceValue,
@@ -1233,7 +1245,7 @@ class CuratedAlbums {
1233
1245
  }
1234
1246
  }
1235
1247
 
1236
- function stripUndef$7(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
1248
+ function stripUndef$8(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
1237
1249
 
1238
1250
  class CustomAlbums {
1239
1251
  constructor(ctx) { this._ctx = ctx; }
@@ -1281,7 +1293,7 @@ class CustomAlbums {
1281
1293
  async createProjectCustomAlbum(projectTableName, { name, description, photoIdInclusionList, photoIdRemovalList } = {}) {
1282
1294
  this._ctx.requireTokens();
1283
1295
  const path = `/api/v1/custom_album/project/${encodeURIComponent(projectTableName)}`;
1284
- const body = stripUndef$7({
1296
+ const body = stripUndef$8({
1285
1297
  name: name,
1286
1298
  description: description,
1287
1299
  photo_id_inclusion_list: photoIdInclusionList,
@@ -1294,7 +1306,7 @@ class CustomAlbums {
1294
1306
  async updateCustomAlbum(albumId, { name, description, photoIdInclusionList, photoIdRemovalList } = {}) {
1295
1307
  this._ctx.requireTokens();
1296
1308
  const path = `/api/v1/custom_album/${encodeURIComponent(albumId)}`;
1297
- const body = stripUndef$7({
1309
+ const body = stripUndef$8({
1298
1310
  name: name,
1299
1311
  description: description,
1300
1312
  photo_id_inclusion_list: photoIdInclusionList,
@@ -1394,7 +1406,7 @@ async function handleResponse(response) {
1394
1406
  }
1395
1407
  }
1396
1408
 
1397
- function stripUndef$6(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
1409
+ function stripUndef$7(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
1398
1410
 
1399
1411
  class EmailTokens {
1400
1412
  constructor(ctx) { this._ctx = ctx; }
@@ -1425,7 +1437,7 @@ class EmailTokens {
1425
1437
  }
1426
1438
 
1427
1439
  async validateToken(token) {
1428
- const body = stripUndef$6({
1440
+ const body = stripUndef$7({
1429
1441
  token: token,
1430
1442
  });
1431
1443
  const resp = await fetch(this._ctx.baseUrl + `/api/v1/validate-token`, {
@@ -1437,7 +1449,7 @@ class EmailTokens {
1437
1449
  }
1438
1450
 
1439
1451
  async resetPassword(token, newPassword) {
1440
- const body = stripUndef$6({
1452
+ const body = stripUndef$7({
1441
1453
  token: token,
1442
1454
  new_password: newPassword,
1443
1455
  });
@@ -1476,7 +1488,7 @@ class Health {
1476
1488
  }
1477
1489
  }
1478
1490
 
1479
- function stripUndef$5(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
1491
+ function stripUndef$6(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
1480
1492
 
1481
1493
  class Keywords {
1482
1494
  constructor(ctx) { this._ctx = ctx; }
@@ -1484,7 +1496,7 @@ class Keywords {
1484
1496
  async createKeywordFilteringList(name, projectList = undefined) {
1485
1497
  this._ctx.requireTokens();
1486
1498
  const path = `/api/v1/keyword/`;
1487
- const body = stripUndef$5({
1499
+ const body = stripUndef$6({
1488
1500
  name: name,
1489
1501
  project_list: projectList,
1490
1502
  });
@@ -1537,7 +1549,7 @@ class Keywords {
1537
1549
  async updateKeywordFilteringListLabels(keywordListId, listKeywordsToInclude, listKeywordsToExclude) {
1538
1550
  this._ctx.requireTokens();
1539
1551
  const path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}`;
1540
- const body = stripUndef$5({
1552
+ const body = stripUndef$6({
1541
1553
  list_keywords_to_include: listKeywordsToInclude,
1542
1554
  list_keywords_to_exclude: listKeywordsToExclude,
1543
1555
  });
@@ -1548,7 +1560,7 @@ class Keywords {
1548
1560
  async updateKeywordFilteringListDetails(keywordListId, { name, projectList } = {}) {
1549
1561
  this._ctx.requireTokens();
1550
1562
  const path = `/api/v1/keyword/details/${encodeURIComponent(keywordListId)}`;
1551
- const body = stripUndef$5({
1563
+ const body = stripUndef$6({
1552
1564
  name: name,
1553
1565
  project_list: projectList,
1554
1566
  });
@@ -1681,6 +1693,36 @@ class OauthAuthorization {
1681
1693
  }
1682
1694
  }
1683
1695
 
1696
+ function stripUndef$5(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
1697
+
1698
+ class OauthClients {
1699
+ constructor(ctx) { this._ctx = ctx; }
1700
+
1701
+ async createApiCredential(credentialName) {
1702
+ this._ctx.requireTokens();
1703
+ const path = `/oauth/clients/api-credentials`;
1704
+ const body = stripUndef$5({
1705
+ credential_name: credentialName,
1706
+ });
1707
+ const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
1708
+ return data;
1709
+ }
1710
+
1711
+ async getCompanyApiCredentials() {
1712
+ this._ctx.requireTokens();
1713
+ const path = `/oauth/clients/api-credentials`;
1714
+ const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
1715
+ return data;
1716
+ }
1717
+
1718
+ async revokeApiCredential(clientId) {
1719
+ this._ctx.requireTokens();
1720
+ const path = `/oauth/clients/api-credentials/${encodeURIComponent(clientId)}/revoke`;
1721
+ const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken);
1722
+ return data;
1723
+ }
1724
+ }
1725
+
1684
1726
  class OauthToken {
1685
1727
  constructor(ctx) { this._ctx = ctx; }
1686
1728
 
@@ -2531,6 +2573,7 @@ class MediaViz {
2531
2573
  this.health = new Health(_ctx);
2532
2574
  this.keywords = new Keywords(_ctx);
2533
2575
  this.oAuthAuthorization = new OauthAuthorization(_ctx);
2576
+ this.oAuthClients = new OauthClients(_ctx);
2534
2577
  this.oAuthToken = new OauthToken(_ctx);
2535
2578
  this.oauthLogin = new OauthLogin(_ctx);
2536
2579
  this.person = new Person(_ctx);
@@ -2952,4 +2995,4 @@ var _react_native = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
2952
2995
  // Auto-generated — do not edit
2953
2996
  const { createCryptoProvider, MemoryTokenStore, createSecureTokenStore, createKeychainTokenStore, startAuthSession, parseRedirectUrl, AuthSessionError, createSession } = _react_native;
2954
2997
 
2955
- export { Admin, AiModelCredits, ApiError, AuthSessionError, Company, CuratedAlbums, CustomAlbums, EmailTokens, Health, InMemoryWebhookStore, Keywords, MediaViz, MemoryTokenStore, NotFoundError, OAuthClient, OAuthError, OAuthErrorCode, OauthAuthorization, OauthLogin, OauthToken, Person, Photos, Photoupload, Projects, RateLimitError, Search, ServerError, Subscription, Users, ValidationError, WEBHOOK_MODEL_COLUMNS, WEBHOOK_OUTCOME_MODELS, WebhookConsumer, Webhookreceiver, configureCrypto, createCryptoProvider, createKeychainTokenStore, createSecureTokenStore, createSession, handleResponse, parseRedirectUrl, selectResultColumns, signWebhookPayload, startAuthSession, verifyWebhookSignature };
2998
+ export { Admin, AiModelCredits, ApiError, AuthSessionError, Company, CuratedAlbums, CustomAlbums, EmailTokens, Health, InMemoryWebhookStore, Keywords, MediaViz, MemoryTokenStore, NotFoundError, OAuthClient, OAuthError, OAuthErrorCode, OauthAuthorization, OauthClients, OauthLogin, OauthToken, Person, Photos, Photoupload, Projects, RateLimitError, Search, ServerError, Subscription, Users, ValidationError, WEBHOOK_MODEL_COLUMNS, WEBHOOK_OUTCOME_MODELS, WebhookConsumer, Webhookreceiver, configureCrypto, createCryptoProvider, createKeychainTokenStore, createSecureTokenStore, createSession, handleResponse, parseRedirectUrl, selectResultColumns, signWebhookPayload, startAuthSession, verifyWebhookSignature };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediaviz/react-native-sdk",
3
- "version": "1.10.0-rc.8",
3
+ "version": "1.11.0-dev.125",
4
4
  "description": "MediaViz React Native SDK \u2014 auto-generated endpoint client for React Native and Expo.",
5
5
  "license": "MIT",
6
6
  "repository": {