@eluvio/elv-client-js 3.1.63 → 3.1.67
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/README.md +13 -2
- package/dist/ElvClient-min.js +3 -3
- package/dist/ElvClient-node-min.js +3 -3
- package/dist/ElvFrameClient-min.js +1 -1
- package/dist/src/AuthorizationClient.js +21 -15
- package/dist/src/ElvClient.js +16 -4
- package/dist/src/FrameClient.js +1 -1
- package/dist/src/RemoteSigner.js +1 -0
- package/dist/src/client/ContentAccess.js +868 -818
- package/dist/src/client/NFT.js +11 -11
- package/package-lock.json +16 -11
- package/package.json +3 -1
- package/src/AuthorizationClient.js +6 -0
- package/src/ElvClient.js +11 -1
- package/src/FrameClient.js +1 -0
- package/src/RemoteSigner.js +2 -0
- package/src/client/ContentAccess.js +29 -0
- package/src/client/NFT.js +26 -23
- package/testScripts/InitializeTenant.js +32 -1
- package/testScripts/Test.js +19 -0
- package/typeSpecs/Default.js +80 -0
- package/typeSpecs/DropEventSite.js +673 -0
- package/typeSpecs/EventSite.js +776 -0
- package/typeSpecs/EventSiteExtras.js +59 -0
- package/typeSpecs/EventTenant.js +86 -0
- package/typeSpecs/LanguageCodes.js +221 -0
- package/typeSpecs/MainSite.js +279 -0
- package/typeSpecs/Marketplace.js +203 -0
- package/typeSpecs/NFTCollection.js +69 -0
- package/typeSpecs/NFTTemplate.js +269 -0
- package/utilities/ChannelCreate.js +205 -0
- package/utilities/ChannelStartVaLOffering.js +63 -29
- package/utilities/LibraryListObjects.js +26 -2
- package/utilities/MezUnifyAudioDrmKeys.js +69 -0
- package/utilities/lib/concerns/Logger.js +3 -2
- package/utilities/lib/models/PublicMetadataPath.js +19 -0
|
@@ -178,12 +178,18 @@ function () {
|
|
|
178
178
|
this.noCache = true;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
+
if (this.client.signer && this.client.signer.remoteSigner) {
|
|
182
|
+
// Channel auth not supported for remote signer, use a self-signed no-auth token instead
|
|
183
|
+
noAuth = true;
|
|
184
|
+
channelAuth = false;
|
|
185
|
+
}
|
|
186
|
+
|
|
181
187
|
if (!channelAuth) {
|
|
182
|
-
_context2.next =
|
|
188
|
+
_context2.next = 23;
|
|
183
189
|
break;
|
|
184
190
|
}
|
|
185
191
|
|
|
186
|
-
_context2.next =
|
|
192
|
+
_context2.next = 20;
|
|
187
193
|
return _regeneratorRuntime.awrap(this.GenerateChannelContentToken({
|
|
188
194
|
objectId: objectId,
|
|
189
195
|
versionHash: versionHash,
|
|
@@ -192,13 +198,13 @@ function () {
|
|
|
192
198
|
oauthToken: oauthToken
|
|
193
199
|
}));
|
|
194
200
|
|
|
195
|
-
case
|
|
201
|
+
case 20:
|
|
196
202
|
authorizationToken = _context2.sent;
|
|
197
|
-
_context2.next =
|
|
203
|
+
_context2.next = 26;
|
|
198
204
|
break;
|
|
199
205
|
|
|
200
|
-
case
|
|
201
|
-
_context2.next =
|
|
206
|
+
case 23:
|
|
207
|
+
_context2.next = 25;
|
|
202
208
|
return _regeneratorRuntime.awrap(this.GenerateAuthorizationToken({
|
|
203
209
|
libraryId: libraryId,
|
|
204
210
|
objectId: objectId,
|
|
@@ -209,28 +215,28 @@ function () {
|
|
|
209
215
|
noAuth: noAuth
|
|
210
216
|
}));
|
|
211
217
|
|
|
212
|
-
case
|
|
218
|
+
case 25:
|
|
213
219
|
authorizationToken = _context2.sent;
|
|
214
220
|
|
|
215
|
-
case
|
|
221
|
+
case 26:
|
|
216
222
|
return _context2.abrupt("return", authorizationToken);
|
|
217
223
|
|
|
218
|
-
case
|
|
219
|
-
_context2.prev =
|
|
224
|
+
case 29:
|
|
225
|
+
_context2.prev = 29;
|
|
220
226
|
_context2.t4 = _context2["catch"](14);
|
|
221
227
|
throw _context2.t4;
|
|
222
228
|
|
|
223
|
-
case
|
|
224
|
-
_context2.prev =
|
|
229
|
+
case 32:
|
|
230
|
+
_context2.prev = 32;
|
|
225
231
|
this.noCache = initialNoCache;
|
|
226
|
-
return _context2.finish(
|
|
232
|
+
return _context2.finish(32);
|
|
227
233
|
|
|
228
|
-
case
|
|
234
|
+
case 35:
|
|
229
235
|
case "end":
|
|
230
236
|
return _context2.stop();
|
|
231
237
|
}
|
|
232
238
|
}
|
|
233
|
-
}, null, this, [[14,
|
|
239
|
+
}, null, this, [[14, 29, 32, 35]]);
|
|
234
240
|
}
|
|
235
241
|
}, {
|
|
236
242
|
key: "GenerateAuthorizationToken",
|
package/dist/src/ElvClient.js
CHANGED
|
@@ -98,7 +98,7 @@ function () {
|
|
|
98
98
|
[this, this.authClient, this.ethClient, this.HttpClient, this.userProfileClient].forEach(setDebug);
|
|
99
99
|
|
|
100
100
|
if (enable) {
|
|
101
|
-
this.Log("Debug Logging Enabled:\n Content Space: ".concat(this.contentSpaceId, "\n Fabric URLs: [\n\t\t").concat(this.fabricURIs.join(", \n\t\t"), "\n\t]\n Ethereum URLs: [
|
|
101
|
+
this.Log("Debug Logging Enabled:\n Content Space: ".concat(this.contentSpaceId, "\n Fabric URLs: [\n\t\t").concat(this.fabricURIs.join(", \n\t\t"), "\n\t]\n Ethereum URLs: [\n\t\t").concat(this.ethereumURIs.join(", \n\t\t"), "\n\t]\n Auth Service URLs: [\n\t\t").concat(this.authServiceURIs.join(", \n\t\t"), "\n\t]\n "));
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
}, {
|
|
@@ -261,6 +261,7 @@ function () {
|
|
|
261
261
|
this.contentTypes = {};
|
|
262
262
|
this.encryptionConks = {};
|
|
263
263
|
this.stateChannelAccess = {};
|
|
264
|
+
this.objectTenantIds = {};
|
|
264
265
|
this.objectLibraryIds = {};
|
|
265
266
|
this.objectImageUrls = {};
|
|
266
267
|
this.visibilityInfo = {};
|
|
@@ -311,7 +312,7 @@ function () {
|
|
|
311
312
|
this.Crypto = Crypto;
|
|
312
313
|
this.Crypto.ElvCrypto();
|
|
313
314
|
|
|
314
|
-
case
|
|
315
|
+
case 17:
|
|
315
316
|
case "end":
|
|
316
317
|
return _context2.stop();
|
|
317
318
|
}
|
|
@@ -608,21 +609,23 @@ function () {
|
|
|
608
609
|
* @namedParams
|
|
609
610
|
* @param {string=} idToken - OAuth ID token
|
|
610
611
|
* @param {string=} authToken - Eluvio authorization token previously issued from OAuth ID token
|
|
612
|
+
* @param {string=} tenantId - If specified, user will be associated with the tenant
|
|
611
613
|
*/
|
|
612
614
|
|
|
613
615
|
}, {
|
|
614
616
|
key: "SetRemoteSigner",
|
|
615
617
|
value: function SetRemoteSigner(_ref9) {
|
|
616
|
-
var idToken, authToken, address, signer;
|
|
618
|
+
var idToken, authToken, tenantId, address, signer;
|
|
617
619
|
return _regeneratorRuntime.async(function SetRemoteSigner$(_context6) {
|
|
618
620
|
while (1) {
|
|
619
621
|
switch (_context6.prev = _context6.next) {
|
|
620
622
|
case 0:
|
|
621
|
-
idToken = _ref9.idToken, authToken = _ref9.authToken, address = _ref9.address;
|
|
623
|
+
idToken = _ref9.idToken, authToken = _ref9.authToken, tenantId = _ref9.tenantId, address = _ref9.address;
|
|
622
624
|
signer = new RemoteSigner({
|
|
623
625
|
rpcUris: this.authServiceURIs,
|
|
624
626
|
idToken: idToken,
|
|
625
627
|
authToken: authToken,
|
|
628
|
+
tenantId: tenantId,
|
|
626
629
|
address: address,
|
|
627
630
|
provider: this.ethClient.provider
|
|
628
631
|
});
|
|
@@ -1091,6 +1094,15 @@ function () {
|
|
|
1091
1094
|
|
|
1092
1095
|
this.staticToken = token;
|
|
1093
1096
|
}
|
|
1097
|
+
/**
|
|
1098
|
+
* Clear the set static token for the client
|
|
1099
|
+
*/
|
|
1100
|
+
|
|
1101
|
+
}, {
|
|
1102
|
+
key: "ClearStaticToken",
|
|
1103
|
+
value: function ClearStaticToken() {
|
|
1104
|
+
this.staticToken = undefined;
|
|
1105
|
+
}
|
|
1094
1106
|
/**
|
|
1095
1107
|
* Authorize the client against the specified policy.
|
|
1096
1108
|
*
|
package/dist/src/FrameClient.js
CHANGED
|
@@ -445,7 +445,7 @@ function () {
|
|
|
445
445
|
* @returns {Array<string>} - List of ElvClient methods available to a FrameClient
|
|
446
446
|
*/
|
|
447
447
|
value: function AllowedMethods() {
|
|
448
|
-
return ["AccessGroupManagers", "AccessGroupMembers", "AccessGroupOwner", "AccessInfo", "AccessRequest", "AccessType", "AddAccessGroupManager", "AddAccessGroupMember", "AddContentLibraryGroup", "AddContentObjectGroupPermission", "AddLibraryContentType", "AssetMetadata", "AvailableDRMs", "AvailableOfferings", "AwaitPending", "BitmovinPlayoutOptions", "BlockNumber", "CallBitcodeMethod", "CallContractMethod", "CallContractMethodAndWait", "ClearCache", "Collection", "ConfigUrl", "ContentLibraries", "ContentLibrary", "ContentLibraryGroupPermissions", "ContentLibraryOwner", "ContentObject", "ContentObjectAccessComplete", "ContentObjectGraph", "ContentObjectGroupPermissions", "ContentObjectImageUrl", "ContentObjectLibraryId", "ContentObjectMetadata", "ContentObjectOwner", "ContentObjectVersions", "ContentObjects", "ContentPart", "ContentParts", "ContentSpaceId", "ContentType", "ContentTypeOwner", "ContentTypes", "ContractAbi", "ContractEvents", "ContractMetadata", "ContractName", "CopyContentObject", "CreateABRMezzanine", "CreateAccessGroup", "CreateAndFinalizeContentObject", "CreateContentLibrary", "CreateContentObject", "CreateContentType", "CreateEncryptionConk", "CreateFileDirectories", "CreateFileUploadJob", "CreateLinks", "CreateNTPInstance", "CreatePart", "CreateProductionMaster", "CreateSignedToken", "CurrentAccountAddress", "CustomContractAddress", "Decrypt", "DecryptECIES", "DefaultKMSAddress", "DeleteAccessGroup", "DeleteContentLibrary", "DeleteContentObject", "DeleteContentVersion", "DeleteFiles", "DeleteMetadata", "DeleteNTPInstance", "DeletePart", "DeployContract", "Download", "DownloadEncrypted", "DownloadFile", "DownloadPart", "EditAndFinalizeContentObject", "EditContentObject", "Encrypt", "EncryptECIES", "EncryptionConk", "Events", "ExtractEventFromLogs", "ExtractValueFromEvent", "FabricUrl", "FileUrl", "FinalizeABRMezzanine", "FinalizeContentObject", "FinalizePart", "FinalizeStateChannelAccess", "FinalizeUploadJob", "FormatContractArguments", "GenerateStateChannelToken", "GetBalance", "InitializeAuthPolicy", "IssueNTPCode", "IssueSignedNTPCode", "LatestVersionHash", "LibraryContentTypes", "LinkAccessGroupToOauth", "LinkData", "LinkTarget", "LinkUrl", "ListAccessGroups", "ListFiles", "ListNTPInstances", "LROStatus", "MergeContractMetadata", "MergeMetadata", "MetadataAuth", "MintNFT", "NetworkInfo", "NodeId", "Nodes", "NTPInstance", "Permission", "PlayoutOptions", "PlayoutPathResolution", "ProduceMetadataLinks", "Proofs", "PublicRep", "PublishContentVersion", "QParts", "RedeemCode", "RemoveAccessGroupManager", "RemoveAccessGroupMember", "RemoveContentObjectGroupPermission", "RemoveContentLibraryGroup", "RemoveLibraryContentType", "Rep", "ReplaceContractMetadata", "ReplaceMetadata", "Request", "ResetRegion", "SendFunds", "SetAccessCharge", "SetAuth", "SetAuthContext", "SetAuthPolicy", "SetContentLibraryImage", "SetContentObjectImage", "SetCustomContentContract", "SetGroupPermission", "SetNodes", "SetOauthToken", "SetPolicyAuthorization", "SetSignerFromOauthToken", "SetStaticToken", "SetVisibility", "SetPermission", "StartABRMezzanineJobs", "SuspendNTPInstance", "UnlinkAccessGroupFromOauth", "UpdateContentObjectGraph", "UpdateNTPInstance", "UploadFileData", "UploadFiles", "UploadFilesFromS3", "UploadJobStatus", "UploadPart", "UploadPartChunk", "UploadStatus", "UseRegion", "VerifyContentObject", "Visibility"];
|
|
448
|
+
return ["AccessGroupManagers", "AccessGroupMembers", "AccessGroupOwner", "AccessInfo", "AccessRequest", "AccessType", "AddAccessGroupManager", "AddAccessGroupMember", "AddContentLibraryGroup", "AddContentObjectGroupPermission", "AddLibraryContentType", "AssetMetadata", "AvailableDRMs", "AvailableOfferings", "AwaitPending", "BitmovinPlayoutOptions", "BlockNumber", "CallBitcodeMethod", "CallContractMethod", "CallContractMethodAndWait", "ClearCache", "ClearStaticToken", "Collection", "ConfigUrl", "ContentLibraries", "ContentLibrary", "ContentLibraryGroupPermissions", "ContentLibraryOwner", "ContentObject", "ContentObjectAccessComplete", "ContentObjectGraph", "ContentObjectGroupPermissions", "ContentObjectImageUrl", "ContentObjectLibraryId", "ContentObjectMetadata", "ContentObjectOwner", "ContentObjectVersions", "ContentObjects", "ContentPart", "ContentParts", "ContentSpaceId", "ContentType", "ContentTypeOwner", "ContentTypes", "ContractAbi", "ContractEvents", "ContractMetadata", "ContractName", "CopyContentObject", "CreateABRMezzanine", "CreateAccessGroup", "CreateAndFinalizeContentObject", "CreateContentLibrary", "CreateContentObject", "CreateContentType", "CreateEncryptionConk", "CreateFileDirectories", "CreateFileUploadJob", "CreateLinks", "CreateNTPInstance", "CreatePart", "CreateProductionMaster", "CreateSignedToken", "CurrentAccountAddress", "CustomContractAddress", "Decrypt", "DecryptECIES", "DefaultKMSAddress", "DeleteAccessGroup", "DeleteContentLibrary", "DeleteContentObject", "DeleteContentVersion", "DeleteFiles", "DeleteMetadata", "DeleteNTPInstance", "DeletePart", "DeployContract", "Download", "DownloadEncrypted", "DownloadFile", "DownloadPart", "EditAndFinalizeContentObject", "EditContentObject", "Encrypt", "EncryptECIES", "EncryptionConk", "Events", "ExtractEventFromLogs", "ExtractValueFromEvent", "FabricUrl", "FileUrl", "FinalizeABRMezzanine", "FinalizeContentObject", "FinalizePart", "FinalizeStateChannelAccess", "FinalizeUploadJob", "FormatContractArguments", "GenerateStateChannelToken", "GetBalance", "InitializeAuthPolicy", "IssueNTPCode", "IssueSignedNTPCode", "LatestVersionHash", "LibraryContentTypes", "LinkAccessGroupToOauth", "LinkData", "LinkTarget", "LinkUrl", "ListAccessGroups", "ListFiles", "ListNTPInstances", "LROStatus", "MergeContractMetadata", "MergeMetadata", "MetadataAuth", "MintNFT", "NetworkInfo", "NodeId", "Nodes", "NTPInstance", "Permission", "PlayoutOptions", "PlayoutPathResolution", "ProduceMetadataLinks", "Proofs", "PublicRep", "PublishContentVersion", "QParts", "RedeemCode", "RemoveAccessGroupManager", "RemoveAccessGroupMember", "RemoveContentObjectGroupPermission", "RemoveContentLibraryGroup", "RemoveLibraryContentType", "Rep", "ReplaceContractMetadata", "ReplaceMetadata", "Request", "ResetRegion", "SendFunds", "SetAccessCharge", "SetAuth", "SetAuthContext", "SetAuthPolicy", "SetContentLibraryImage", "SetContentObjectImage", "SetCustomContentContract", "SetGroupPermission", "SetNodes", "SetOauthToken", "SetPolicyAuthorization", "SetSignerFromOauthToken", "SetStaticToken", "SetVisibility", "SetPermission", "StartABRMezzanineJobs", "SuspendNTPInstance", "UnlinkAccessGroupFromOauth", "UpdateContentObjectGraph", "UpdateNTPInstance", "UploadFileData", "UploadFiles", "UploadFilesFromS3", "UploadJobStatus", "UploadPart", "UploadPartChunk", "UploadStatus", "UseRegion", "VerifyContentObject", "Visibility"];
|
|
449
449
|
}
|
|
450
450
|
}, {
|
|
451
451
|
key: "AllowedUserProfileMethods",
|
package/dist/src/RemoteSigner.js
CHANGED