@eluvio/elv-client-js 3.1.84 → 3.1.88

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.
@@ -1325,6 +1325,7 @@ exports.AvailableOfferings = async function({
1325
1325
  * @param {Object=} context - Additional audience data to include in the authorization request.
1326
1326
  * - Note: Context must be a map of string->string
1327
1327
  * @param {Object=} authorizationToken - Additional authorization token for authorizing this request
1328
+ * @param {Object=} options - Additional query parameters to pass when requesting available playout options, such as clipping parameters.
1328
1329
  */
1329
1330
  exports.PlayoutOptions = async function({
1330
1331
  offeringURI,
@@ -1340,7 +1341,8 @@ exports.PlayoutOptions = async function({
1340
1341
  drms=[],
1341
1342
  context,
1342
1343
  hlsjsProfile=true,
1343
- authorizationToken
1344
+ authorizationToken,
1345
+ options={}
1344
1346
  }) {
1345
1347
  if(offeringURI) {
1346
1348
  const uriInfo = offeringURI.match(/(hq__[^/]+)\/rep\/([^/]+)\/([^/]+)\/options.json/);
@@ -1421,7 +1423,8 @@ exports.PlayoutOptions = async function({
1421
1423
 
1422
1424
  let queryParams = {
1423
1425
  authorization,
1424
- resolve: !!linkPath
1426
+ resolve: !!linkPath,
1427
+ ...options
1425
1428
  };
1426
1429
 
1427
1430
  const playoutOptions = Object.values(
@@ -1590,6 +1593,7 @@ exports.PlayoutOptions = async function({
1590
1593
  * @param {Object=} context - Additional audience data to include in the authorization request
1591
1594
  * - Note: Context must be a map of string->string
1592
1595
  * @param {Object=} authorizationToken - Additional authorization token for authorizing this request
1596
+ * @param {Object=} options - Additional query parameters to pass when requesting available playout options, such as clipping parameters.
1593
1597
  */
1594
1598
  exports.BitmovinPlayoutOptions = async function({
1595
1599
  objectId,
@@ -1603,7 +1607,8 @@ exports.BitmovinPlayoutOptions = async function({
1603
1607
  offering="default",
1604
1608
  playoutType,
1605
1609
  context,
1606
- authorizationToken
1610
+ authorizationToken,
1611
+ options={}
1607
1612
  }) {
1608
1613
  versionHash ? ValidateVersion(versionHash) : ValidateObject(objectId);
1609
1614
 
@@ -1624,7 +1629,8 @@ exports.BitmovinPlayoutOptions = async function({
1624
1629
  playoutType,
1625
1630
  hlsjsProfile: false,
1626
1631
  context,
1627
- authorizationToken
1632
+ authorizationToken,
1633
+ options
1628
1634
  });
1629
1635
 
1630
1636
  delete playoutOptions.playoutMethods;
@@ -242,6 +242,7 @@ exports.CreateContentType = async function({name, metadata={}, bitcode}) {
242
242
  * @param {Object=} metadata - Metadata of library object
243
243
  * @param {string=} kmsId - ID of the KMS to use for content in this library. If not specified,
244
244
  * the default KMS will be used.
245
+ * @param {string=} tenantId - ID of the tenant to use for this library
245
246
  *
246
247
  * @returns {Promise<string>} - Library ID of created library
247
248
  */
@@ -252,6 +253,7 @@ exports.CreateContentLibrary = async function({
252
253
  imageName,
253
254
  metadata={},
254
255
  kmsId,
256
+ tenantId
255
257
  }) {
256
258
  if(!kmsId) {
257
259
  kmsId = `ikms${this.utils.AddressToHash(await this.DefaultKMSAddress())}`;
@@ -264,8 +266,15 @@ exports.CreateContentLibrary = async function({
264
266
 
265
267
 
266
268
  // Set tenant ID on the library if the user is associated with a tenant
267
- const tenantId = await this.userProfileClient.TenantId();
269
+ if(!tenantId) {
270
+ tenantId = await this.userProfileClient.TenantId();
271
+ }
272
+
268
273
  if(tenantId) {
274
+ if(!this.utils.ValidHash(tenantId)) {
275
+ throw Error(`Invalid tenant ID: ${tenantId}`);
276
+ }
277
+
269
278
  await this.CallContractMethod({
270
279
  contractAddress,
271
280
  methodName: "putMeta",