@globus/sdk
Advanced tools
Comparing version 5.1.2 to 5.2.0
@@ -338,3 +338,3 @@ var __create = Object.create; | ||
// src/core/info/version.ts | ||
var VERSION = "5.1.2"; | ||
var VERSION = "5.2.0"; | ||
@@ -381,3 +381,6 @@ // src/core/info/index.ts | ||
} | ||
if (config.scope && manager) { | ||
if (config.scope && manager && /** | ||
* Only attempt to get a token if the `service` property is a string or has an `endpoint_id` property (GCSConfiguration). | ||
*/ | ||
(typeof config.service === "string" || "endpoint_id" in config.service)) { | ||
const resourceServer = typeof config.service === "string" ? RESOURCE_SERVERS[config.service] : ( | ||
@@ -384,0 +387,0 @@ // For `GCSConfiguration` objects, the `endpoint_id` is the resource server. |
@@ -46,3 +46,3 @@ var __defProp = Object.defineProperty; | ||
// src/core/info/version.ts | ||
var VERSION = "5.1.2"; | ||
var VERSION = "5.2.0"; | ||
@@ -49,0 +49,0 @@ // src/core/info/index.ts |
@@ -55,3 +55,3 @@ var __create = Object.create; | ||
// src/core/info/version.ts | ||
var VERSION = "5.1.2"; | ||
var VERSION = "5.2.0"; | ||
@@ -339,3 +339,6 @@ // src/core/info/index.ts | ||
} | ||
if (config.scope && manager) { | ||
if (config.scope && manager && /** | ||
* Only attempt to get a token if the `service` property is a string or has an `endpoint_id` property (GCSConfiguration). | ||
*/ | ||
(typeof config.service === "string" || "endpoint_id" in config.service)) { | ||
const resourceServer = typeof config.service === "string" ? RESOURCE_SERVERS[config.service] : ( | ||
@@ -416,9 +419,9 @@ // For `GCSConfiguration` objects, the `endpoint_id` is the resource server. | ||
// src/services/globus-connect-server/service/endpoint.ts | ||
var get = function(configuration, options, sdkOptions) { | ||
// src/services/globus-connect-server/service/collections.ts | ||
var getAll = function(configuration, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/endpoint` | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/collections` | ||
}, | ||
@@ -429,9 +432,8 @@ options, | ||
}; | ||
var update = function(configuration, options, sdkOptions) { | ||
var get = function(configuration, collection_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/endpoint`, | ||
method: "PUT" /* PUT */ | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/collections/${collection_id}` | ||
}, | ||
@@ -442,9 +444,9 @@ options, | ||
}; | ||
var patch = function(configuration, options, sdkOptions) { | ||
var remove = function(configuration, collection_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/endpoint`, | ||
method: "PATCH" /* PATCH */ | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/collections/${collection_id}`, | ||
method: "DELETE" /* DELETE */ | ||
}, | ||
@@ -455,9 +457,9 @@ options, | ||
}; | ||
var updateSubscriptionId = function(configuration, options, sdkOptions) { | ||
var create = function(configuration, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/endpoint/subscription_id`, | ||
method: "PUT" /* PUT */ | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/collections`, | ||
method: "POST" /* POST */ | ||
}, | ||
@@ -468,8 +470,8 @@ options, | ||
}; | ||
var updateOwner = function(configuration, options, sdkOptions) { | ||
var update = function(configuration, collection_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/endpoint/owner`, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/collections/${collection_id}`, | ||
method: "PUT" /* PUT */ | ||
@@ -481,8 +483,20 @@ }, | ||
}; | ||
var updateOwnerString = function(configuration, options, sdkOptions) { | ||
var patch = function(configuration, collection_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/endpoint/owner_string`, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/collections/${collection_id}`, | ||
method: "PATCH" /* PATCH */ | ||
}, | ||
options, | ||
sdkOptions | ||
); | ||
}; | ||
var updateOwnerString = function(configuration, collection_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/collections/${collection_id}/owner_string`, | ||
method: "PUT" /* PUT */ | ||
@@ -494,8 +508,8 @@ }, | ||
}; | ||
var resetOwnerString = function(configuration, options, sdkOptions) { | ||
var resetOwnerString = function(configuration, collection_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/endpoint/owner_string`, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/collections/${collection_id}/owner_string`, | ||
method: "DELETE" /* DELETE */ | ||
@@ -508,9 +522,9 @@ }, | ||
// src/services/globus-connect-server/service/https.ts | ||
var get2 = function(configuration, path, options, sdkOptions) { | ||
// src/services/globus-connect-server/service/endpoint.ts | ||
var get2 = function(configuration, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/endpoint` | ||
}, | ||
@@ -521,9 +535,9 @@ options, | ||
}; | ||
var remove = function(configuration, path, options, sdkOptions) { | ||
var update2 = function(configuration, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path, | ||
method: "DELETE" /* DELETE */ | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/endpoint`, | ||
method: "PUT" /* PUT */ | ||
}, | ||
@@ -534,8 +548,20 @@ options, | ||
}; | ||
var update2 = function(configuration, path, options, sdkOptions) { | ||
var patch2 = function(configuration, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/endpoint`, | ||
method: "PATCH" /* PATCH */ | ||
}, | ||
options, | ||
sdkOptions | ||
); | ||
}; | ||
var updateSubscriptionId = function(configuration, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/endpoint/subscription_id`, | ||
method: "PUT" /* PUT */ | ||
@@ -547,10 +573,9 @@ }, | ||
}; | ||
// src/services/globus-connect-server/service/nodes.ts | ||
var getAll = function(configuration, options, sdkOptions) { | ||
var updateOwner = function(configuration, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/nodes` | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/endpoint/owner`, | ||
method: "PUT" /* PUT */ | ||
}, | ||
@@ -561,8 +586,9 @@ options, | ||
}; | ||
var get3 = function(configuration, node_id, options, sdkOptions) { | ||
var updateOwnerString2 = function(configuration, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/nodes/${node_id}` | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/endpoint/owner_string`, | ||
method: "PUT" /* PUT */ | ||
}, | ||
@@ -573,8 +599,8 @@ options, | ||
}; | ||
var remove2 = function(configuration, node_id, options, sdkOptions) { | ||
var resetOwnerString2 = function(configuration, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/nodes/${node_id}`, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/endpoint/owner_string`, | ||
method: "DELETE" /* DELETE */ | ||
@@ -586,9 +612,10 @@ }, | ||
}; | ||
var create = function(configuration, options, sdkOptions) { | ||
// src/services/globus-connect-server/service/https.ts | ||
var get3 = function(configuration, path, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/nodes`, | ||
method: "POST" /* POST */ | ||
resource_server: configuration.endpoint_id, | ||
path | ||
}, | ||
@@ -599,9 +626,9 @@ options, | ||
}; | ||
var update3 = function(configuration, node_id, options, sdkOptions) { | ||
var remove2 = function(configuration, path, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/nodes/${node_id}`, | ||
method: "PUT" /* PUT */ | ||
resource_server: configuration.endpoint_id, | ||
path, | ||
method: "DELETE" /* DELETE */ | ||
}, | ||
@@ -612,9 +639,9 @@ options, | ||
}; | ||
var patch2 = function(configuration, node_id, options, sdkOptions) { | ||
var update3 = function(configuration, path, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/nodes/${node_id}`, | ||
method: "PATCH" /* PATCH */ | ||
resource_server: configuration.endpoint_id, | ||
path, | ||
method: "PUT" /* PUT */ | ||
}, | ||
@@ -626,3 +653,3 @@ options, | ||
// src/services/globus-connect-server/service/roles.ts | ||
// src/services/globus-connect-server/service/nodes.ts | ||
var getAll2 = function(configuration, options, sdkOptions) { | ||
@@ -632,4 +659,4 @@ return serviceRequest( | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/roles` | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/nodes` | ||
}, | ||
@@ -640,8 +667,8 @@ options, | ||
}; | ||
var get4 = function(configuration, role_id, options, sdkOptions) { | ||
var get4 = function(configuration, node_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/roles/${role_id}` | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/nodes/${node_id}` | ||
}, | ||
@@ -652,8 +679,8 @@ options, | ||
}; | ||
var remove3 = function(configuration, role_id, options, sdkOptions) { | ||
var remove3 = function(configuration, node_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/roles/${role_id}`, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/nodes/${node_id}`, | ||
method: "DELETE" /* DELETE */ | ||
@@ -669,4 +696,4 @@ }, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/roles`, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/nodes`, | ||
method: "POST" /* POST */ | ||
@@ -678,10 +705,9 @@ }, | ||
}; | ||
// src/services/globus-connect-server/service/storage-gateways.ts | ||
var getAll3 = function(configuration, options, sdkOptions) { | ||
var update4 = function(configuration, node_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/storage_gateways` | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/nodes/${node_id}`, | ||
method: "PUT" /* PUT */ | ||
}, | ||
@@ -692,8 +718,9 @@ options, | ||
}; | ||
var get5 = function(configuration, storage_gateway_id, options, sdkOptions) { | ||
var patch3 = function(configuration, node_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/storage_gateways/${storage_gateway_id}` | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/nodes/${node_id}`, | ||
method: "PATCH" /* PATCH */ | ||
}, | ||
@@ -704,9 +731,10 @@ options, | ||
}; | ||
var remove4 = function(configuration, storage_gateway_id, options, sdkOptions) { | ||
// src/services/globus-connect-server/service/roles.ts | ||
var getAll3 = function(configuration, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/storage_gateways/${storage_gateway_id}`, | ||
method: "DELETE" /* DELETE */ | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/roles` | ||
}, | ||
@@ -717,9 +745,8 @@ options, | ||
}; | ||
var create3 = function(configuration, options, sdkOptions) { | ||
var get5 = function(configuration, role_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/storage_gateways`, | ||
method: "POST" /* POST */ | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/roles/${role_id}` | ||
}, | ||
@@ -730,9 +757,9 @@ options, | ||
}; | ||
var update4 = function(configuration, storage_gateway_id, options, sdkOptions) { | ||
var remove4 = function(configuration, role_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/storage_gateways/${storage_gateway_id}`, | ||
method: "PUT" /* PUT */ | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/roles/${role_id}`, | ||
method: "DELETE" /* DELETE */ | ||
}, | ||
@@ -743,9 +770,9 @@ options, | ||
}; | ||
var patch3 = function(configuration, storage_gateway_id, options, sdkOptions) { | ||
var create3 = function(configuration, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/storage_gateways/${storage_gateway_id}`, | ||
method: "PATCH" /* PATCH */ | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/roles`, | ||
method: "POST" /* POST */ | ||
}, | ||
@@ -757,3 +784,3 @@ options, | ||
// src/services/globus-connect-server/service/user-credentials.ts | ||
// src/services/globus-connect-server/service/storage-gateways.ts | ||
var getAll4 = function(configuration, options, sdkOptions) { | ||
@@ -763,4 +790,4 @@ return serviceRequest( | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/user_credentials` | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/storage_gateways` | ||
}, | ||
@@ -771,8 +798,8 @@ options, | ||
}; | ||
var get6 = function(configuration, user_credential_id, options, sdkOptions) { | ||
var get6 = function(configuration, storage_gateway_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/user_credentials/${user_credential_id}` | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/storage_gateways/${storage_gateway_id}` | ||
}, | ||
@@ -783,8 +810,8 @@ options, | ||
}; | ||
var remove5 = function(configuration, user_credential_id, options, sdkOptions) { | ||
var remove5 = function(configuration, storage_gateway_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/user_credentials/${user_credential_id}`, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/storage_gateways/${storage_gateway_id}`, | ||
method: "DELETE" /* DELETE */ | ||
@@ -800,4 +827,4 @@ }, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/user_credentials`, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/storage_gateways`, | ||
method: "POST" /* POST */ | ||
@@ -809,8 +836,8 @@ }, | ||
}; | ||
var update5 = function(configuration, user_credential_id, options, sdkOptions) { | ||
var update5 = function(configuration, storage_gateway_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/user_credentials/${user_credential_id}`, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/storage_gateways/${storage_gateway_id}`, | ||
method: "PUT" /* PUT */ | ||
@@ -822,8 +849,8 @@ }, | ||
}; | ||
var patch4 = function(configuration, user_credential_id, options, sdkOptions) { | ||
var patch4 = function(configuration, storage_gateway_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/user_credentials/${user_credential_id}`, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/storage_gateways/${storage_gateway_id}`, | ||
method: "PATCH" /* PATCH */ | ||
@@ -836,25 +863,3 @@ }, | ||
// src/services/globus-connect-server/service/versioning.ts | ||
var info = function(configuration, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/info` | ||
}, | ||
options, | ||
sdkOptions | ||
); | ||
}; | ||
// src/services/globus-connect-server/index.ts | ||
var SCOPES2 = { | ||
HIGH_ASSURANCE: "urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections", | ||
NON_HIGH_ASSURANCE: "urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections[*https://auth.globus.org/scopes/<MAPPED_COLLECTION_ID>/data_access]" | ||
}; | ||
function getRequiredScopes(configuration) { | ||
return SCOPES2.HIGH_ASSURANCE.replace("<ENDPOINT_ID>", configuration.endpoint_id); | ||
} | ||
// src/services/globus-connect-server/service/collections.ts | ||
// src/services/globus-connect-server/service/user-credentials.ts | ||
var getAll5 = function(configuration, options, sdkOptions) { | ||
@@ -864,4 +869,4 @@ return serviceRequest( | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/collections` | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/user_credentials` | ||
}, | ||
@@ -872,8 +877,8 @@ options, | ||
}; | ||
var get7 = function(configuration, collection_id, options, sdkOptions) { | ||
var get7 = function(configuration, user_credential_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/collections/${collection_id}` | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/user_credentials/${user_credential_id}` | ||
}, | ||
@@ -884,8 +889,8 @@ options, | ||
}; | ||
var remove6 = function(configuration, collection_id, options, sdkOptions) { | ||
var remove6 = function(configuration, user_credential_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/collections/${collection_id}`, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/user_credentials/${user_credential_id}`, | ||
method: "DELETE" /* DELETE */ | ||
@@ -901,4 +906,4 @@ }, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/collections`, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/user_credentials`, | ||
method: "POST" /* POST */ | ||
@@ -910,8 +915,8 @@ }, | ||
}; | ||
var update6 = function(configuration, collection_id, options, sdkOptions) { | ||
var update6 = function(configuration, user_credential_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/collections/${collection_id}`, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/user_credentials/${user_credential_id}`, | ||
method: "PUT" /* PUT */ | ||
@@ -923,8 +928,8 @@ }, | ||
}; | ||
var patch5 = function(configuration, collection_id, options, sdkOptions) { | ||
var patch5 = function(configuration, user_credential_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/collections/${collection_id}`, | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/user_credentials/${user_credential_id}`, | ||
method: "PATCH" /* PATCH */ | ||
@@ -936,9 +941,9 @@ }, | ||
}; | ||
var updateOwnerString2 = function(configuration, collection_id, options, sdkOptions) { | ||
// src/services/globus-connect-server/service/versioning.ts | ||
var info = function(configuration, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/collections/${collection_id}/owner_string`, | ||
method: "PUT" /* PUT */ | ||
path: `/api/info` | ||
}, | ||
@@ -949,14 +954,2 @@ options, | ||
}; | ||
var resetOwnerString2 = function(configuration, collection_id, options, sdkOptions) { | ||
return serviceRequest( | ||
{ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/collections/${collection_id}/owner_string`, | ||
method: "DELETE" /* DELETE */ | ||
}, | ||
options, | ||
sdkOptions | ||
); | ||
}; | ||
@@ -973,14 +966,32 @@ // src/services/globus-connect-server/client.ts | ||
endpoint: { | ||
get: bind(get2, configuration), | ||
update: bind(update2, configuration), | ||
patch: bind(patch2, configuration), | ||
updateSubscriptionId: bind(updateSubscriptionId, configuration), | ||
updateOwner: bind(updateOwner, configuration), | ||
updateOwnerString: bind(updateOwnerString2, configuration), | ||
resetOwnerString: bind(resetOwnerString2, configuration) | ||
}, | ||
versioning: { | ||
info: bind(info, configuration) | ||
}, | ||
collections: { | ||
get: bind(get, configuration), | ||
getAll: bind(getAll, configuration), | ||
create: bind(create, configuration), | ||
remove: bind(remove, configuration), | ||
update: bind(update, configuration), | ||
patch: bind(patch, configuration), | ||
updateSubscriptionId: bind(updateSubscriptionId, configuration), | ||
updateOwner: bind(updateOwner, configuration), | ||
updateOwnerString: bind(updateOwnerString, configuration), | ||
resetOwnerString: bind(resetOwnerString, configuration) | ||
}, | ||
versioning: { | ||
info: bind(info, configuration) | ||
nodes: { | ||
get: bind(get4, configuration), | ||
getAll: bind(getAll2, configuration), | ||
create: bind(create2, configuration), | ||
remove: bind(remove3, configuration), | ||
update: bind(update4, configuration), | ||
patch: bind(patch3, configuration) | ||
}, | ||
collections: { | ||
userCredentials: { | ||
get: bind(get7, configuration), | ||
@@ -991,15 +1002,5 @@ getAll: bind(getAll5, configuration), | ||
update: bind(update6, configuration), | ||
patch: bind(patch5, configuration), | ||
updateOwnerString: bind(updateOwnerString2, configuration), | ||
resetOwnerString: bind(resetOwnerString2, configuration) | ||
patch: bind(patch5, configuration) | ||
}, | ||
nodes: { | ||
get: bind(get3, configuration), | ||
getAll: bind(getAll, configuration), | ||
create: bind(create, configuration), | ||
remove: bind(remove2, configuration), | ||
update: bind(update3, configuration), | ||
patch: bind(patch2, configuration) | ||
}, | ||
userCredentials: { | ||
storageGateways: { | ||
get: bind(get6, configuration), | ||
@@ -1012,20 +1013,12 @@ getAll: bind(getAll4, configuration), | ||
}, | ||
storageGateways: { | ||
roles: { | ||
get: bind(get5, configuration), | ||
getAll: bind(getAll3, configuration), | ||
create: bind(create3, configuration), | ||
remove: bind(remove4, configuration), | ||
update: bind(update4, configuration), | ||
patch: bind(patch3, configuration) | ||
remove: bind(remove4, configuration) | ||
}, | ||
roles: { | ||
get: bind(get4, configuration), | ||
getAll: bind(getAll2, configuration), | ||
create: bind(create2, configuration), | ||
remove: bind(remove3, configuration) | ||
}, | ||
https: { | ||
get: bind(get2, configuration), | ||
remove: bind(remove, configuration), | ||
update: bind(update2, configuration) | ||
get: bind(get3, configuration), | ||
remove: bind(remove2, configuration), | ||
update: bind(update3, configuration) | ||
} | ||
@@ -1032,0 +1025,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "5.1.2"; | ||
export declare const VERSION = "5.2.0"; | ||
//# sourceMappingURL=version.d.ts.map |
// x-release-please-start-version | ||
export const VERSION = '5.1.2'; | ||
export const VERSION = '5.2.0'; | ||
// x-release-please-end | ||
//# sourceMappingURL=version.js.map |
import { Environment, Service } from './global.js'; | ||
import type { GCSConfiguration } from '../services/globus-connect-server/index.js'; | ||
import type { GCSConfiguration, UnauthenticatedGCSConfiguration } from '../services/globus-connect-server/index.js'; | ||
import { SDKOptions } from '../services/types.js'; | ||
@@ -28,5 +28,5 @@ /** | ||
*/ | ||
export declare function build(serviceOrConfiguration: Service | GCSConfiguration, path: string, options?: { | ||
export declare function build(serviceOrConfiguration: Service | GCSConfiguration | UnauthenticatedGCSConfiguration, path: string, options?: { | ||
search?: Parameters<typeof stringifyParameters>[0]; | ||
}, sdkOptions?: SDKOptions): string; | ||
//# sourceMappingURL=url.d.ts.map |
{ | ||
"type": "module", | ||
"version": "5.1.2" | ||
"version": "5.2.0" | ||
} |
@@ -23,3 +23,3 @@ import * as AUTH from './config.js'; | ||
export declare function getTokenEndpoint(): string; | ||
export * as identities from './service/identities.js'; | ||
export * as identities from './service/identities/index.js'; | ||
export * as oauth2 from './service/oauth2/index.js'; | ||
@@ -26,0 +26,0 @@ export declare function isToken(check: unknown): check is Token; |
@@ -20,3 +20,3 @@ /** | ||
} | ||
export * as identities from './service/identities.js'; | ||
export * as identities from './service/identities/index.js'; | ||
export * as oauth2 from './service/oauth2/index.js'; | ||
@@ -23,0 +23,0 @@ export function isToken(check) { |
@@ -19,3 +19,8 @@ /** | ||
export * as versioning from './service/versioning.js'; | ||
export declare function getRequiredScopes(configuration: GCSConfiguration): string; | ||
export * as utils from './utils.js'; | ||
declare const SCOPES: { | ||
HIGH_ASSURANCE: string; | ||
NON_HIGH_ASSURANCE: string; | ||
}; | ||
export declare function getScopes(configuration: GCSConfiguration, scope?: keyof typeof SCOPES): {}; | ||
/** | ||
@@ -31,11 +36,19 @@ * The configuration object used by all Globus Connect Server Manager API methods. | ||
/** | ||
* The UUID | ||
* The UUID of the endpoint the GCS API is associated with. | ||
*/ | ||
endpoint_id: Globus.UUID; | ||
endpoint_id: string; | ||
}; | ||
/** | ||
* In the case of a resource that allows unauthenticated access, the only property required is the `host`. | ||
*/ | ||
export type UnauthenticatedGCSConfiguration = Pick<GCSConfiguration, 'host'>; | ||
/** | ||
* The GCSServiceMethod type is similar to the core ServiceMethod type, but | ||
* the first parameter is always a GCSConfiguration object. | ||
*/ | ||
export type GCSServiceMethod<O extends ServiceMethodOptions, R extends Response = Response> = (configuration: GCSConfiguration, methodOptions?: O & { | ||
export type GCSServiceMethod<O extends ServiceMethodOptions, R extends Response = Response, | ||
/** | ||
* If `true`, the service method allows unauthenticated access (will not attempt to send an `Authorization` header). | ||
*/ | ||
AllowUnauthenticated extends Boolean = false> = (configuration: AllowUnauthenticated extends false ? GCSConfiguration : UnauthenticatedGCSConfiguration, methodOptions?: O & { | ||
query?: BaseServiceMethodOptions['query']; | ||
@@ -42,0 +55,0 @@ headers?: BaseServiceMethodOptions['headers']; |
@@ -12,2 +12,3 @@ /** | ||
export * as versioning from './service/versioning.js'; | ||
export * as utils from './utils.js'; | ||
const SCOPES = { | ||
@@ -17,5 +18,18 @@ HIGH_ASSURANCE: 'urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections', | ||
}; | ||
export function getRequiredScopes(configuration) { | ||
return SCOPES.HIGH_ASSURANCE.replace('<ENDPOINT_ID>', configuration.endpoint_id); | ||
export function getScopes(configuration, scope) { | ||
const { endpoint_id: id } = configuration; | ||
if (!id) { | ||
throw new Error(`An 'endpoint_id' is required to determine the required scopes`); | ||
} | ||
/** | ||
* If a specific scope is requested, return the scope with the `<ENDPOINT_ID>` placeholder replaced | ||
*/ | ||
if (scope) { | ||
return SCOPES[scope].replace('<ENDPOINT_ID>', id); | ||
} | ||
/** | ||
* Otherwise, return all scopes with the `<ENDPOINT_ID>` placeholder replaced. | ||
*/ | ||
return Object.entries(SCOPES).reduce((reduc, [key, value]) => (Object.assign(Object.assign({}, reduc), { [key]: value.replace('<ENDPOINT_ID>', id) })), {}); | ||
} | ||
//# sourceMappingURL=index.js.map |
@@ -6,3 +6,3 @@ import type { operations } from '@globus/types/gcs-manager/api'; | ||
*/ | ||
export declare const getAll: (configuration: import("../index.js").GCSConfiguration, options?: ({ | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
query?: operations["listCollections"]["parameters"]["query"]; | ||
@@ -16,3 +16,3 @@ } & { | ||
*/ | ||
export declare const get: (configuration: import("../index.js").GCSConfiguration, collection_id: string, options?: ({ | ||
export declare const get: (configuration: import("../index").GCSConfiguration, collection_id: string, options?: ({ | ||
query?: operations["getCollection"]["parameters"]["query"]; | ||
@@ -26,3 +26,3 @@ } & { | ||
*/ | ||
export declare const remove: (configuration: import("../index.js").GCSConfiguration, collection_id: string, options?: ({ | ||
export declare const remove: (configuration: import("../index").GCSConfiguration, collection_id: string, options?: ({ | ||
query?: never; | ||
@@ -37,3 +37,3 @@ payload?: never; | ||
*/ | ||
export declare const create: (configuration: import("../index.js").GCSConfiguration, options: ({ | ||
export declare const create: (configuration: import("../index").GCSConfiguration, options: ({ | ||
payload: operations["postCollection"]["requestBody"]["content"]["application/json"]; | ||
@@ -47,3 +47,3 @@ } & { | ||
*/ | ||
export declare const update: (configuration: import("../index.js").GCSConfiguration, collection_id: string, options: ({ | ||
export declare const update: (configuration: import("../index").GCSConfiguration, collection_id: string, options: ({ | ||
payload: operations["putCollection"]["requestBody"]["content"]["application/json"]; | ||
@@ -57,3 +57,3 @@ } & { | ||
*/ | ||
export declare const patch: (configuration: import("../index.js").GCSConfiguration, collection_id: string, options: ({ | ||
export declare const patch: (configuration: import("../index").GCSConfiguration, collection_id: string, options: ({ | ||
payload: Partial<operations["patchCollection"]["requestBody"]["content"]["application/json"]>; | ||
@@ -67,3 +67,3 @@ } & { | ||
*/ | ||
export declare const updateOwnerString: (configuration: import("../index.js").GCSConfiguration, collection_id: string, options: ({ | ||
export declare const updateOwnerString: (configuration: import("../index").GCSConfiguration, collection_id: string, options: ({ | ||
payload: Partial<operations["putCollectionOwnerString"]["requestBody"]["content"]["application/json"]>; | ||
@@ -77,3 +77,3 @@ } & { | ||
*/ | ||
export declare const resetOwnerString: (configuration: import("../index.js").GCSConfiguration, collection_id: string, options: { | ||
export declare const resetOwnerString: (configuration: import("../index").GCSConfiguration, collection_id: string, options: { | ||
query?: import("../../types").BaseServiceMethodOptions["query"]; | ||
@@ -80,0 +80,0 @@ headers?: import("../../types").BaseServiceMethodOptions["headers"]; |
@@ -1,2 +0,1 @@ | ||
import { getRequiredScopes } from '../index.js'; | ||
import { HTTP_METHODS, serviceRequest } from '../../shared.js'; | ||
@@ -9,3 +8,3 @@ /** | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/collections`, | ||
@@ -20,3 +19,3 @@ }, options, sdkOptions); | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/collections/${collection_id}`, | ||
@@ -31,3 +30,3 @@ }, options, sdkOptions); | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/collections/${collection_id}`, | ||
@@ -43,3 +42,3 @@ method: HTTP_METHODS.DELETE, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/collections`, | ||
@@ -55,3 +54,3 @@ method: HTTP_METHODS.POST, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/collections/${collection_id}`, | ||
@@ -67,3 +66,3 @@ method: HTTP_METHODS.PUT, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/collections/${collection_id}`, | ||
@@ -79,3 +78,3 @@ method: HTTP_METHODS.PATCH, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/collections/${collection_id}/owner_string`, | ||
@@ -91,3 +90,3 @@ method: HTTP_METHODS.PUT, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/collections/${collection_id}/owner_string`, | ||
@@ -94,0 +93,0 @@ method: HTTP_METHODS.DELETE, |
@@ -6,3 +6,3 @@ import type { operations } from '@globus/types/gcs-manager/api'; | ||
*/ | ||
export declare const get: (configuration: import("../index.js").GCSConfiguration, options?: ({ | ||
export declare const get: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
query?: never; | ||
@@ -17,3 +17,3 @@ payload?: never; | ||
*/ | ||
export declare const update: (configuration: import("../index.js").GCSConfiguration, options?: ({ | ||
export declare const update: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
payload: operations["putEndpoint"]["requestBody"]["content"]["application/json"]; | ||
@@ -27,3 +27,3 @@ } & { | ||
*/ | ||
export declare const patch: (configuration: import("../index.js").GCSConfiguration, options?: ({ | ||
export declare const patch: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
/** | ||
@@ -43,3 +43,3 @@ * @todo The generated PATCH type is resolving to the Endpoint document, which | ||
*/ | ||
export declare const updateSubscriptionId: (configuration: import("../index.js").GCSConfiguration, options?: ({ | ||
export declare const updateSubscriptionId: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
payload: operations["putEndpointSubscriptionId"]["requestBody"]["content"]["application/json"]; | ||
@@ -53,3 +53,3 @@ } & { | ||
*/ | ||
export declare const updateOwner: (configuration: import("../index.js").GCSConfiguration, options?: ({ | ||
export declare const updateOwner: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
payload: operations["putEndpointOwner"]["requestBody"]["content"]["application/json"]; | ||
@@ -63,3 +63,3 @@ } & { | ||
*/ | ||
export declare const updateOwnerString: (configuration: import("../index.js").GCSConfiguration, options?: ({ | ||
export declare const updateOwnerString: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
payload: operations["putEndpointOwnerString"]["requestBody"]["content"]["application/json"]; | ||
@@ -73,3 +73,3 @@ } & { | ||
*/ | ||
export declare const resetOwnerString: (configuration: import("../index.js").GCSConfiguration, options: { | ||
export declare const resetOwnerString: (configuration: import("../index").GCSConfiguration, options: { | ||
query?: import("../../types").BaseServiceMethodOptions["query"]; | ||
@@ -76,0 +76,0 @@ headers?: import("../../types").BaseServiceMethodOptions["headers"]; |
@@ -1,2 +0,1 @@ | ||
import { getRequiredScopes } from '../index.js'; | ||
import { HTTP_METHODS, serviceRequest } from '../../shared.js'; | ||
@@ -9,3 +8,3 @@ /** | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/endpoint`, | ||
@@ -20,3 +19,3 @@ }, options, sdkOptions); | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/endpoint`, | ||
@@ -32,3 +31,3 @@ method: HTTP_METHODS.PUT, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/endpoint`, | ||
@@ -44,3 +43,3 @@ method: HTTP_METHODS.PATCH, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/endpoint/subscription_id`, | ||
@@ -56,3 +55,3 @@ method: HTTP_METHODS.PUT, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/endpoint/owner`, | ||
@@ -68,3 +67,3 @@ method: HTTP_METHODS.PUT, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/endpoint/owner_string`, | ||
@@ -80,3 +79,3 @@ method: HTTP_METHODS.PUT, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/endpoint/owner_string`, | ||
@@ -83,0 +82,0 @@ method: HTTP_METHODS.DELETE, |
@@ -1,2 +0,1 @@ | ||
import { getRequiredScopes } from '../index.js'; | ||
import { HTTP_METHODS, serviceRequest } from '../../shared.js'; | ||
@@ -9,3 +8,3 @@ /** | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path, | ||
@@ -20,3 +19,3 @@ }, options, sdkOptions); | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path, | ||
@@ -32,3 +31,3 @@ method: HTTP_METHODS.DELETE, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path, | ||
@@ -35,0 +34,0 @@ method: HTTP_METHODS.PUT, |
@@ -6,3 +6,3 @@ import type { operations } from '@globus/types/gcs-manager/api'; | ||
*/ | ||
export declare const getAll: (configuration: import("../index.js").GCSConfiguration, options?: ({ | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
query?: operations["listNodes"]["parameters"]["query"]; | ||
@@ -16,3 +16,3 @@ } & { | ||
*/ | ||
export declare const get: (configuration: import("../index.js").GCSConfiguration, node_id: string, options?: ({ | ||
export declare const get: (configuration: import("../index").GCSConfiguration, node_id: string, options?: ({ | ||
query?: never; | ||
@@ -27,3 +27,3 @@ payload?: never; | ||
*/ | ||
export declare const remove: (configuration: import("../index.js").GCSConfiguration, node_id: string, options?: ({ | ||
export declare const remove: (configuration: import("../index").GCSConfiguration, node_id: string, options?: ({ | ||
query?: never; | ||
@@ -38,3 +38,3 @@ payload?: never; | ||
*/ | ||
export declare const create: (configuration: import("../index.js").GCSConfiguration, options: ({ | ||
export declare const create: (configuration: import("../index").GCSConfiguration, options: ({ | ||
payload: operations["postNode"]["requestBody"]["content"]["application/json"]; | ||
@@ -48,3 +48,3 @@ } & { | ||
*/ | ||
export declare const update: (configuration: import("../index.js").GCSConfiguration, node_id: string, options: ({ | ||
export declare const update: (configuration: import("../index").GCSConfiguration, node_id: string, options: ({ | ||
payload: operations["putNode"]["requestBody"]["content"]["application/json"]; | ||
@@ -58,3 +58,3 @@ } & { | ||
*/ | ||
export declare const patch: (configuration: import("../index.js").GCSConfiguration, node_id: string, options: ({ | ||
export declare const patch: (configuration: import("../index").GCSConfiguration, node_id: string, options: ({ | ||
payload: Partial<operations["patchNode"]["requestBody"]["content"]["application/json"]>; | ||
@@ -61,0 +61,0 @@ } & { |
@@ -1,2 +0,1 @@ | ||
import { getRequiredScopes } from '../index.js'; | ||
import { HTTP_METHODS, serviceRequest } from '../../../services/shared.js'; | ||
@@ -9,3 +8,3 @@ /** | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/nodes`, | ||
@@ -20,3 +19,3 @@ }, options, sdkOptions); | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/nodes/${node_id}`, | ||
@@ -31,3 +30,3 @@ }, options, sdkOptions); | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/nodes/${node_id}`, | ||
@@ -43,3 +42,3 @@ method: HTTP_METHODS.DELETE, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/nodes`, | ||
@@ -55,3 +54,3 @@ method: HTTP_METHODS.POST, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/nodes/${node_id}`, | ||
@@ -67,3 +66,3 @@ method: HTTP_METHODS.PUT, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/nodes/${node_id}`, | ||
@@ -70,0 +69,0 @@ method: HTTP_METHODS.PATCH, |
@@ -6,3 +6,3 @@ import type { operations } from '@globus/types/gcs-manager/api'; | ||
*/ | ||
export declare const getAll: (configuration: import("../index.js").GCSConfiguration, options?: ({ | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
query?: operations["listRoles"]["parameters"]["query"]; | ||
@@ -16,3 +16,3 @@ } & { | ||
*/ | ||
export declare const get: (configuration: import("../index.js").GCSConfiguration, role_id: string, options?: ({ | ||
export declare const get: (configuration: import("../index").GCSConfiguration, role_id: string, options?: ({ | ||
query?: never; | ||
@@ -27,3 +27,3 @@ payload?: never; | ||
*/ | ||
export declare const remove: (configuration: import("../index.js").GCSConfiguration, role_id: string, options?: ({ | ||
export declare const remove: (configuration: import("../index").GCSConfiguration, role_id: string, options?: ({ | ||
query?: never; | ||
@@ -38,3 +38,3 @@ payload?: never; | ||
*/ | ||
export declare const create: (configuration: import("../index.js").GCSConfiguration, options: ({ | ||
export declare const create: (configuration: import("../index").GCSConfiguration, options: ({ | ||
payload: operations["postRoles"]["requestBody"]["content"]["application/json"]; | ||
@@ -41,0 +41,0 @@ } & { |
@@ -1,2 +0,1 @@ | ||
import { getRequiredScopes } from '../index.js'; | ||
import { HTTP_METHODS, serviceRequest } from '../../../services/shared.js'; | ||
@@ -9,3 +8,3 @@ /** | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/roles`, | ||
@@ -20,3 +19,3 @@ }, options, sdkOptions); | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/roles/${role_id}`, | ||
@@ -31,3 +30,3 @@ }, options, sdkOptions); | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/roles/${role_id}`, | ||
@@ -43,3 +42,3 @@ method: HTTP_METHODS.DELETE, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/roles`, | ||
@@ -46,0 +45,0 @@ method: HTTP_METHODS.POST, |
@@ -6,3 +6,3 @@ import type { operations } from '@globus/types/gcs-manager/api'; | ||
*/ | ||
export declare const getAll: (configuration: import("../index.js").GCSConfiguration, options?: ({ | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
query?: operations["listStorageGateways"]["parameters"]["query"]; | ||
@@ -16,3 +16,3 @@ } & { | ||
*/ | ||
export declare const get: (configuration: import("../index.js").GCSConfiguration, storage_gateway_id: string, options?: ({ | ||
export declare const get: (configuration: import("../index").GCSConfiguration, storage_gateway_id: string, options?: ({ | ||
query?: operations["getStorageGateway"]["parameters"]["query"]; | ||
@@ -26,3 +26,3 @@ } & { | ||
*/ | ||
export declare const remove: (configuration: import("../index.js").GCSConfiguration, storage_gateway_id: string, options?: ({ | ||
export declare const remove: (configuration: import("../index").GCSConfiguration, storage_gateway_id: string, options?: ({ | ||
query?: never; | ||
@@ -37,3 +37,3 @@ payload?: never; | ||
*/ | ||
export declare const create: (configuration: import("../index.js").GCSConfiguration, options: ({ | ||
export declare const create: (configuration: import("../index").GCSConfiguration, options: ({ | ||
payload: operations["postStorageGateway"]["requestBody"]["content"]["application/json"]; | ||
@@ -47,3 +47,3 @@ } & { | ||
*/ | ||
export declare const update: (configuration: import("../index.js").GCSConfiguration, storage_gateway_id: string, options: ({ | ||
export declare const update: (configuration: import("../index").GCSConfiguration, storage_gateway_id: string, options: ({ | ||
payload: operations["putStorageGateway"]["requestBody"]["content"]["application/json"]; | ||
@@ -57,3 +57,3 @@ } & { | ||
*/ | ||
export declare const patch: (configuration: import("../index.js").GCSConfiguration, storage_gateway_id: string, options: ({ | ||
export declare const patch: (configuration: import("../index").GCSConfiguration, storage_gateway_id: string, options: ({ | ||
payload: Partial<operations["patchStorageGateway"]["requestBody"]["content"]["application/json"]>; | ||
@@ -60,0 +60,0 @@ } & { |
@@ -1,2 +0,1 @@ | ||
import { getRequiredScopes } from '../index.js'; | ||
import { HTTP_METHODS, serviceRequest } from '../../../services/shared.js'; | ||
@@ -9,3 +8,3 @@ /** | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/storage_gateways`, | ||
@@ -20,3 +19,3 @@ }, options, sdkOptions); | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/storage_gateways/${storage_gateway_id}`, | ||
@@ -31,3 +30,3 @@ }, options, sdkOptions); | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/storage_gateways/${storage_gateway_id}`, | ||
@@ -43,3 +42,3 @@ method: HTTP_METHODS.DELETE, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/storage_gateways`, | ||
@@ -55,3 +54,3 @@ method: HTTP_METHODS.POST, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/storage_gateways/${storage_gateway_id}`, | ||
@@ -67,3 +66,3 @@ method: HTTP_METHODS.PUT, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/storage_gateways/${storage_gateway_id}`, | ||
@@ -70,0 +69,0 @@ method: HTTP_METHODS.PATCH, |
@@ -6,3 +6,3 @@ import type { operations } from '@globus/types/gcs-manager/api'; | ||
*/ | ||
export declare const getAll: (configuration: import("../index.js").GCSConfiguration, options?: ({ | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
query?: operations["listUserCredentials"]["parameters"]["query"]; | ||
@@ -16,3 +16,3 @@ } & { | ||
*/ | ||
export declare const get: (configuration: import("../index.js").GCSConfiguration, user_credential_id: string, options?: ({ | ||
export declare const get: (configuration: import("../index").GCSConfiguration, user_credential_id: string, options?: ({ | ||
query?: never; | ||
@@ -27,3 +27,3 @@ payload?: never; | ||
*/ | ||
export declare const remove: (configuration: import("../index.js").GCSConfiguration, user_credential_id: string, options?: ({ | ||
export declare const remove: (configuration: import("../index").GCSConfiguration, user_credential_id: string, options?: ({ | ||
query?: never; | ||
@@ -38,3 +38,3 @@ payload?: never; | ||
*/ | ||
export declare const create: (configuration: import("../index.js").GCSConfiguration, options: ({ | ||
export declare const create: (configuration: import("../index").GCSConfiguration, options: ({ | ||
payload: operations["postUserCredential"]["requestBody"]["content"]["application/json"]; | ||
@@ -48,3 +48,3 @@ } & { | ||
*/ | ||
export declare const update: (configuration: import("../index.js").GCSConfiguration, user_credential_id: string, options: ({ | ||
export declare const update: (configuration: import("../index").GCSConfiguration, user_credential_id: string, options: ({ | ||
payload: operations["putUserCredential"]["requestBody"]["content"]["application/json"]; | ||
@@ -58,3 +58,3 @@ } & { | ||
*/ | ||
export declare const patch: (configuration: import("../index.js").GCSConfiguration, user_credential_id: string, options: ({ | ||
export declare const patch: (configuration: import("../index").GCSConfiguration, user_credential_id: string, options: ({ | ||
payload: Partial<operations["patchUserCredential"]["requestBody"]["content"]["application/json"]>; | ||
@@ -61,0 +61,0 @@ } & { |
@@ -1,2 +0,1 @@ | ||
import { getRequiredScopes } from '../index.js'; | ||
import { HTTP_METHODS, serviceRequest } from '../../../services/shared.js'; | ||
@@ -9,3 +8,3 @@ /** | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/user_credentials`, | ||
@@ -20,3 +19,3 @@ }, options, sdkOptions); | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/user_credentials/${user_credential_id}`, | ||
@@ -31,3 +30,3 @@ }, options, sdkOptions); | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/user_credentials/${user_credential_id}`, | ||
@@ -43,3 +42,3 @@ method: HTTP_METHODS.DELETE, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/user_credentials`, | ||
@@ -55,3 +54,3 @@ method: HTTP_METHODS.POST, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/user_credentials/${user_credential_id}`, | ||
@@ -67,3 +66,3 @@ method: HTTP_METHODS.PUT, | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
resource_server: configuration.endpoint_id, | ||
path: `/api/user_credentials/${user_credential_id}`, | ||
@@ -70,0 +69,0 @@ method: HTTP_METHODS.PATCH, |
import type { operations } from '@globus/types/gcs-manager/api'; | ||
import type { JSONFetchResponse } from '../../types'; | ||
/** | ||
* | ||
* **This operation can be performed without an `Authorization` header.** | ||
* @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Versioning/#getInfo | ||
*/ | ||
export declare const info: (configuration: import("../index.js").GCSConfiguration, options?: ({ | ||
export declare const info: (configuration: import("../index").UnauthenticatedGCSConfiguration, options?: ({ | ||
query?: never; | ||
@@ -9,0 +9,0 @@ payload?: never; |
@@ -1,5 +0,4 @@ | ||
import { getRequiredScopes } from '../index.js'; | ||
import { serviceRequest } from '../../../services/shared.js'; | ||
/** | ||
* | ||
* **This operation can be performed without an `Authorization` header.** | ||
* @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Versioning/#getInfo | ||
@@ -10,3 +9,2 @@ */ | ||
service: configuration, | ||
scope: getRequiredScopes(configuration), | ||
path: `/api/info`, | ||
@@ -13,0 +11,0 @@ }, options, sdkOptions); |
import { Service } from '../core/global.js'; | ||
import type { ServiceMethodOptions, SDKOptions } from './types.js'; | ||
import type { GCSConfiguration } from '../services/globus-connect-server/index.js'; | ||
import type { GCSConfiguration, UnauthenticatedGCSConfiguration } from '../services/globus-connect-server/index.js'; | ||
export declare enum HTTP_METHODS { | ||
@@ -19,3 +19,3 @@ POST = "POST", | ||
*/ | ||
service: Service | GCSConfiguration; | ||
service: Service | GCSConfiguration | UnauthenticatedGCSConfiguration; | ||
/** | ||
@@ -22,0 +22,0 @@ * A specific scope that is required for the request. If a scope is provided, |
@@ -76,4 +76,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
* backwards compatibility of the `scope` property being used in the `ServiceRequestDSL`. | ||
* | ||
* @todo This condition will likely be removed in a future version in favor of using `resource_server` to | ||
* configure a service request. | ||
*/ | ||
if (config.scope && manager) { | ||
if (config.scope && | ||
manager && | ||
/** | ||
* Only attempt to get a token if the `service` property is a string or has an `endpoint_id` property (GCSConfiguration). | ||
*/ | ||
(typeof config.service === 'string' || 'endpoint_id' in config.service)) { | ||
const resourceServer = typeof config.service === 'string' | ||
@@ -80,0 +88,0 @@ ? RESOURCE_SERVERS[config.service] |
@@ -1,3 +0,3 @@ | ||
var globus=(()=>{var Er=Object.create;var ae=Object.defineProperty;var Or=Object.getOwnPropertyDescriptor;var br=Object.getOwnPropertyNames;var Pr=Object.getPrototypeOf,xr=Object.prototype.hasOwnProperty;var Dr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),u=(e,t)=>{for(var r in t)ae(e,r,{get:t[r],enumerable:!0})},Ft=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let p of br(t))!xr.call(e,p)&&p!==r&&ae(e,p,{get:()=>t[p],enumerable:!(s=Or(t,p))||s.enumerable});return e};var Ar=(e,t,r)=>(r=e!=null?Er(Pr(e)):{},Ft(t||!e||!e.__esModule?ae(r,"default",{value:e,enumerable:!0}):r,e)),Mr=e=>Ft(ae({},"__esModule",{value:!0}),e);var Xt=Dr((F,Qt)=>{var ye=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,Se=function(){function e(){this.fetch=!1,this.DOMException=ye.DOMException}return e.prototype=ye,new e}();(function(e){var t=function(r){var s=typeof e<"u"&&e||typeof self<"u"&&self||typeof s<"u"&&s,p={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function m(n){return n&&DataView.prototype.isPrototypeOf(n)}if(p.arrayBuffer)var O=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],E=ArrayBuffer.isView||function(n){return n&&O.indexOf(Object.prototype.toString.call(n))>-1};function b(n){if(typeof n!="string"&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(n)||n==="")throw new TypeError('Invalid character in header field name: "'+n+'"');return n.toLowerCase()}function j(n){return typeof n!="string"&&(n=String(n)),n}function L(n){var i={next:function(){var l=n.shift();return{done:l===void 0,value:l}}};return p.iterable&&(i[Symbol.iterator]=function(){return i}),i}function f(n){this.map={},n instanceof f?n.forEach(function(i,l){this.append(l,i)},this):Array.isArray(n)?n.forEach(function(i){this.append(i[0],i[1])},this):n&&Object.getOwnPropertyNames(n).forEach(function(i){this.append(i,n[i])},this)}f.prototype.append=function(n,i){n=b(n),i=j(i);var l=this.map[n];this.map[n]=l?l+", "+i:i},f.prototype.delete=function(n){delete this.map[b(n)]},f.prototype.get=function(n){return n=b(n),this.has(n)?this.map[n]:null},f.prototype.has=function(n){return this.map.hasOwnProperty(b(n))},f.prototype.set=function(n,i){this.map[b(n)]=j(i)},f.prototype.forEach=function(n,i){for(var l in this.map)this.map.hasOwnProperty(l)&&n.call(i,this.map[l],l,this)},f.prototype.keys=function(){var n=[];return this.forEach(function(i,l){n.push(l)}),L(n)},f.prototype.values=function(){var n=[];return this.forEach(function(i){n.push(i)}),L(n)},f.prototype.entries=function(){var n=[];return this.forEach(function(i,l){n.push([l,i])}),L(n)},p.iterable&&(f.prototype[Symbol.iterator]=f.prototype.entries);function C(n){if(n.bodyUsed)return Promise.reject(new TypeError("Already read"));n.bodyUsed=!0}function $(n){return new Promise(function(i,l){n.onload=function(){i(n.result)},n.onerror=function(){l(n.error)}})}function Nt(n){var i=new FileReader,l=$(i);return i.readAsArrayBuffer(n),l}function U(n){var i=new FileReader,l=$(i);return i.readAsText(n),l}function gr(n){for(var i=new Uint8Array(n),l=new Array(i.length),g=0;g<i.length;g++)l[g]=String.fromCharCode(i[g]);return l.join("")}function qt(n){if(n.slice)return n.slice(0);var i=new Uint8Array(n.byteLength);return i.set(new Uint8Array(n)),i.buffer}function It(){return this.bodyUsed=!1,this._initBody=function(n){this.bodyUsed=this.bodyUsed,this._bodyInit=n,n?typeof n=="string"?this._bodyText=n:p.blob&&Blob.prototype.isPrototypeOf(n)?this._bodyBlob=n:p.formData&&FormData.prototype.isPrototypeOf(n)?this._bodyFormData=n:p.searchParams&&URLSearchParams.prototype.isPrototypeOf(n)?this._bodyText=n.toString():p.arrayBuffer&&p.blob&&m(n)?(this._bodyArrayBuffer=qt(n.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):p.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(n)||E(n))?this._bodyArrayBuffer=qt(n):this._bodyText=n=Object.prototype.toString.call(n):this._bodyText="",this.headers.get("content-type")||(typeof n=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):p.searchParams&&URLSearchParams.prototype.isPrototypeOf(n)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},p.blob&&(this.blob=function(){var n=C(this);if(n)return n;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var n=C(this);return n||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(Nt)}),this.text=function(){var n=C(this);if(n)return n;if(this._bodyBlob)return U(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(gr(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},p.formData&&(this.formData=function(){return this.text().then(vr)}),this.json=function(){return this.text().then(JSON.parse)},this}var yr=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Sr(n){var i=n.toUpperCase();return yr.indexOf(i)>-1?i:n}function N(n,i){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');i=i||{};var l=i.body;if(n instanceof N){if(n.bodyUsed)throw new TypeError("Already read");this.url=n.url,this.credentials=n.credentials,i.headers||(this.headers=new f(n.headers)),this.method=n.method,this.mode=n.mode,this.signal=n.signal,!l&&n._bodyInit!=null&&(l=n._bodyInit,n.bodyUsed=!0)}else this.url=String(n);if(this.credentials=i.credentials||this.credentials||"same-origin",(i.headers||!this.headers)&&(this.headers=new f(i.headers)),this.method=Sr(i.method||this.method||"GET"),this.mode=i.mode||this.mode||null,this.signal=i.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&l)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(l),(this.method==="GET"||this.method==="HEAD")&&(i.cache==="no-store"||i.cache==="no-cache")){var g=/([?&])_=[^&]*/;if(g.test(this.url))this.url=this.url.replace(g,"$1_="+new Date().getTime());else{var S=/\?/;this.url+=(S.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}N.prototype.clone=function(){return new N(this,{body:this._bodyInit})};function vr(n){var i=new FormData;return n.trim().split("&").forEach(function(l){if(l){var g=l.split("="),S=g.shift().replace(/\+/g," "),h=g.join("=").replace(/\+/g," ");i.append(decodeURIComponent(S),decodeURIComponent(h))}}),i}function _r(n){var i=new f,l=n.replace(/\r?\n[\t ]+/g," ");return l.split("\r").map(function(g){return g.indexOf(` | ||
`)===0?g.substr(1,g.length):g}).forEach(function(g){var S=g.split(":"),h=S.shift().trim();if(h){var ne=S.join(":").trim();i.append(h,ne)}}),i}It.call(N.prototype);function M(n,i){if(!(this instanceof M))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');i||(i={}),this.type="default",this.status=i.status===void 0?200:i.status,this.ok=this.status>=200&&this.status<300,this.statusText=i.statusText===void 0?"":""+i.statusText,this.headers=new f(i.headers),this.url=i.url||"",this._initBody(n)}It.call(M.prototype),M.prototype.clone=function(){return new M(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},M.error=function(){var n=new M(null,{status:0,statusText:""});return n.type="error",n};var Tr=[301,302,303,307,308];M.redirect=function(n,i){if(Tr.indexOf(i)===-1)throw new RangeError("Invalid status code");return new M(null,{status:i,headers:{location:n}})},r.DOMException=s.DOMException;try{new r.DOMException}catch{r.DOMException=function(i,l){this.message=i,this.name=l;var g=Error(i);this.stack=g.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function Re(n,i){return new Promise(function(l,g){var S=new N(n,i);if(S.signal&&S.signal.aborted)return g(new r.DOMException("Aborted","AbortError"));var h=new XMLHttpRequest;function ne(){h.abort()}h.onload=function(){var D={status:h.status,statusText:h.statusText,headers:_r(h.getAllResponseHeaders()||"")};D.url="responseURL"in h?h.responseURL:D.headers.get("X-Request-URL");var ie="response"in h?h.response:h.responseText;setTimeout(function(){l(new M(ie,D))},0)},h.onerror=function(){setTimeout(function(){g(new TypeError("Network request failed"))},0)},h.ontimeout=function(){setTimeout(function(){g(new TypeError("Network request failed"))},0)},h.onabort=function(){setTimeout(function(){g(new r.DOMException("Aborted","AbortError"))},0)};function Rr(D){try{return D===""&&s.location.href?s.location.href:D}catch{return D}}h.open(S.method,Rr(S.url),!0),S.credentials==="include"?h.withCredentials=!0:S.credentials==="omit"&&(h.withCredentials=!1),"responseType"in h&&(p.blob?h.responseType="blob":p.arrayBuffer&&S.headers.get("Content-Type")&&S.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(h.responseType="arraybuffer")),i&&typeof i.headers=="object"&&!(i.headers instanceof f)?Object.getOwnPropertyNames(i.headers).forEach(function(D){h.setRequestHeader(D,j(i.headers[D]))}):S.headers.forEach(function(D,ie){h.setRequestHeader(ie,D)}),S.signal&&(S.signal.addEventListener("abort",ne),h.onreadystatechange=function(){h.readyState===4&&S.signal.removeEventListener("abort",ne)}),h.send(typeof S._bodyInit>"u"?null:S._bodyInit)})}return Re.polyfill=!0,s.fetch||(s.fetch=Re,s.Headers=f,s.Request=N,s.Response=M),r.Headers=f,r.Request=N,r.Response=M,r.fetch=Re,r}({})})(Se);Se.fetch.ponyfill=!0;delete Se.fetch.polyfill;var z=ye.fetch?ye:Se;F=z.fetch;F.default=z.fetch;F.fetch=z.fetch;F.Headers=z.Headers;F.Request=z.Request;F.Response=z.Response;Qt.exports=F});var wn={};u(wn,{auth:()=>$e,authorization:()=>Ve,compute:()=>Lt,errors:()=>Ie,flows:()=>Tt,gcs:()=>Mt,groups:()=>St,info:()=>be,logger:()=>xe,search:()=>ht,timer:()=>wt,transfer:()=>ct,webapp:()=>kt});var be={};u(be,{CLIENT_INFO:()=>$t,VERSION:()=>Jt,addClientInfo:()=>kr,getClientInfo:()=>Bt,getClientInfoRequestHeaders:()=>Oe});var Gt="X-Globus-Client-Info",wr=!0;function jt(){return wr}var Cr=";",Lr=",";function Ut(e){return(Array.isArray(e)?e:[e]).map(r=>Object.entries(r).map(([s,p])=>`${s}=${p}`).join(Lr)).join(Cr)}var Ht="5.1.2";var Jt=Ht,$t={product:"javascript-sdk",version:Jt},Ee=[$t];function kr(e){Ee=Ee.concat(e)}function Bt(){return Ut(Ee)}function Oe(){return jt()?{[Gt]:Bt()}:{}}var xe={};u(xe,{log:()=>T,setLogLevel:()=>qr,setLogger:()=>Nr});var Pe=["debug","info","warn","error"],pe,zt=Pe.indexOf("error");function Nr(e){pe=e}function qr(e){zt=Pe.indexOf(e)}function T(e,...t){if(!pe||Pe.indexOf(e)<zt)return;(pe[e]??pe.log)(...t)}var Ve={};u(Ve,{AuthorizationManager:()=>se,create:()=>io});var H=class extends Error{};H.prototype.name="InvalidTokenError";function Ir(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,r)=>{let s=r.charCodeAt(0).toString(16).toUpperCase();return s.length<2&&(s="0"+s),"%"+s}))}function Fr(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Ir(t)}catch{return atob(t)}}function Vt(e,t){if(typeof e!="string")throw new H("Invalid token specified: must be a string");t||(t={});let r=t.header===!0?0:1,s=e.split(".")[r];if(typeof s!="string")throw new H(`Invalid token specified: missing part #${r+1}`);let p;try{p=Fr(s)}catch(m){throw new H(`Invalid token specified: invalid base64 for part #${r+1} (${m.message})`)}try{return JSON.parse(p)}catch(m){throw new H(`Invalid token specified: invalid json for part #${r+1} (${m.message})`)}}var $e={};u($e,{CONFIG:()=>He,getAuthorizationEndpoint:()=>Je,getTokenEndpoint:()=>to,identities:()=>je,isGlobusAuthTokenResponse:()=>ve,isRefreshToken:()=>ee,isToken:()=>V,oauth2:()=>G});var ge={};u(ge,{HOSTS:()=>ke,ID:()=>_,RESOURCE_SERVERS:()=>Y,SCOPES:()=>fe});var ce={};u(ce,{HOSTS:()=>De,ID:()=>a,SCOPES:()=>c});var a="TRANSFER",c={ALL:"urn:globus:auth:scope:transfer.api.globus.org:all"},De={sandbox:"transfer.api.sandbox.globuscs.info",production:"transfer.api.globusonline.org",staging:"transfer.api.staging.globuscs.info",integration:"transfer.api.integration.globuscs.info",test:"transfer.api.test.globuscs.info",preview:"transfer.api.preview.globus.org"};var ue={};u(ue,{HOSTS:()=>Ae,ID:()=>R,SCOPES:()=>A});var R="FLOWS",Ae={sandbox:"sandbox.flows.automate.globus.org",production:"flows.globus.org",staging:"staging.flows.automate.globus.org",integration:"integration.flows.automate.globus.org",test:"test.flows.automate.globus.org",preview:"preview.flows.automate.globus.org"},A={MANAGE_FLOWS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/manage_flows",VIEW_FLOWS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/view_flows",RUN:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run",RUN_STATUS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run_status",RUN_MANAGE:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run_manage"};var de={};u(de,{HOSTS:()=>Me,ID:()=>k});var k="TIMER",Me={sandbox:"sandbox.timer.automate.globus.org",production:"timer.automate.globus.org",staging:"staging.timer.automate.globus.org",integration:"integration.timer.automate.globus.org",test:"test.timer.automate.globus.org",preview:"preview.timer.automate.globus.org"};var le={};u(le,{HOSTS:()=>we,ID:()=>P,SCOPES:()=>q});var P="GROUPS",we={sandbox:"groups.api.sandbox.globuscs.info",production:"groups.api.globus.org",staging:"groups.api.staging.globuscs.info",integration:"groups.api.integration.globuscs.info",test:"groups.api.test.globuscs.info",preview:"groups.api.preview.globuscs.info"},q={ALL:"urn:globus:auth:scope:groups.api.globus.org:all",VIEW_MY:"urn:globus:auth:scope:groups.api.globus.org:view_my_groups_and_membership"};var me={};u(me,{HOSTS:()=>Ce,ID:()=>v,SCOPES:()=>x});var v="SEARCH",Ce={sandbox:"search.api.sandbox.globuscs.info",production:"search.api.globus.org",staging:"search.api.staging.globuscs.info",integration:"search.api.integration.globuscs.info",test:"search.api.test.globuscs.info",preview:"search.api.preview.globus.org"},x={ALL:"urn:globus:auth:scope:search.api.globus.org:all",INGEST:"urn:globus:auth:scope:search.api.globus.org:ingest",SEARCH:"urn:globus:auth:scope:search.api.globus.org:search"};var he={};u(he,{HOSTS:()=>Le,ID:()=>w,SCOPES:()=>W});var w="COMPUTE",Le={sandbox:"compute.api.sandbox.globuscs.info",production:"compute.api.globus.org",staging:"compute.api.staging.globuscs.info",integration:"compute.api.integration.globuscs.info",test:"compute.api.test.globuscs.info",preview:"compute.api.preview.globus.org"},W={ALL:"https://auth.globus.org/scopes/facd7ccc-c5f4-42aa-916b-a0e270e2c2a9/all"};var _="AUTH",ke={integration:"auth.integration.globuscs.info",sandbox:"auth.sandbox.globuscs.info",production:"auth.globus.org",test:"auth.test.globuscs.info",staging:"auth.staging.globuscs.info",preview:"auth.preview.globus.org"},fe={VIEW_IDENTITIES:"urn:globus:auth:scope:auth.globus.org:view_identities"},Y={[_]:"auth.globus.org",[a]:"transfer.api.globus.org",[R]:"flows.globus.org",[P]:"groups.api.globus.org",[v]:"search.api.globus.org",[k]:"524230d7-ea86-4a52-8312-86065a9e0417",[w]:"funcx_service"};var Ie={};u(Ie,{EnvironmentConfigurationError:()=>Q,isAuthorizationRequirementsError:()=>X,isConsentRequiredError:()=>Ne,isErrorWellFormed:()=>Kt,toAuthorizationQueryParams:()=>qe});var Q=class extends Error{name="EnvironmentConfigurationError";constructor(t,r){super(),this.message=`Invalid configuration value provided for ${t} (${r}).`}};function Kt(e){return typeof e=="object"&&e!==null&&"code"in e&&"message"in e}function Ne(e){return Kt(e)&&e.code==="ConsentRequired"&&"required_scopes"in e&&Array.isArray(e.required_scopes)}var Gr=["required_scopes"];function qe(e){let t={scope:e.authorization_parameters.required_scopes?.join(" "),...e.authorization_parameters};return Object.entries(t).reduce((r,[s,p])=>{if(Gr.includes(s)||p===void 0||p===null)return r;let m=p;return Array.isArray(m)?m=m.join(","):typeof p=="boolean"&&(m=m?"true":"false"),{...r,[s]:m}},{})}function X(e){return typeof e=="object"&&e!==null&&"authorization_parameters"in e&&typeof e.authorization_parameters=="object"&&e.authorization_parameters!==null}function jr(){return typeof window<"u"?window:process}function Ur(e){return typeof window==typeof e}function Fe(e,t){let r=jr(),s;return Ur(r)?s=r:s=r.env,e in s?s[e]:t}var Wt={PRODUCTION:"production",PREVIEW:"preview",STAGING:"staging",SANDBOX:"sandbox",INTEGRATION:"integration",TEST:"test"},I={[_]:_,[a]:a,[R]:R,[P]:P,[v]:v,[k]:k,[w]:w},Hr={[_]:ke,[a]:De,[R]:Ae,[P]:we,[v]:Ce,[k]:Me,[w]:Le};function Ge(e){let t=Fe("GLOBUS_SDK_OPTIONS",{});return typeof t=="string"&&(t=JSON.parse(t)),{...t,...e,fetch:{...t?.fetch,...e?.fetch,options:{...t?.fetch?.options,...e?.fetch?.options,headers:{...t?.fetch?.options?.headers,...e?.fetch?.options?.headers}}}}}function B(){let e=Ge(),t=Fe("GLOBUS_SDK_ENVIRONMENT",e?.environment??Wt.PRODUCTION);if(e?.environment&&t!==e.environment&&T("debug","GLOBUS_SDK_ENVIRONMENT and GLOBUS_SDK_OPTIONS.environment are set to different values. GLOBUS_SDK_ENVIRONMENT will take precedence"),!t||!Object.values(Wt).includes(t))throw new Q("GLOBUS_SDK_ENVIRONMENT",t);return t}function Jr(e,t=B()){return Hr[e][t]}function Yt(e,t=B()){let r=Jr(e,t);return Fe(`GLOBUS_SDK_SERVICE_URL_${e}`,r?`https://${r}`:void 0)}function $r(e){let t=new URLSearchParams;return Array.from(Object.entries(e)).forEach(([r,s])=>{Array.isArray(s)?t.set(r,s.join(",")):s!==void 0&&t.set(r,String(s))}),t.toString()}function Br(e,t="",r=B()){let s=Yt(e,r);return new URL(t,s)}function Z(e,t,r,s){let p;return typeof e=="object"?p=new URL(t,e.host):p=Br(e,t,s?.environment),r&&r.search&&(p.search=$r(r.search)),p.toString()}var je={};u(je,{get:()=>zr,getAll:()=>Vr});var Zt=Ar(Xt());async function o(e,t,r){let s=Ge(r),p=s?.fetch?.options||{},m={...Oe(),...t?.headers,...p.headers},O=s?.manager,E;if(e.resource_server&&O&&(E=O.tokens.getByResourceServer(e.resource_server),E&&(m.Authorization=`Bearer ${E.access_token}`)),e.scope&&O){let U=typeof e.service=="string"?Y[e.service]:e.service.endpoint_id;E=O.tokens.getByResourceServer(U),E&&(m.Authorization=`Bearer ${E.access_token}`)}let b=t?.body;!b&&t?.payload&&(b=JSON.stringify(t.payload)),!m?.["Content-Type"]&&b&&(m["Content-Type"]="application/json");let j=Z(e.service,e.path,{search:t?.query},s),L={method:e.method,body:b,...p,headers:m},f=Zt.default;if(p?.__callable&&(f=p.__callable.bind(this),delete L.__callable),e.preventRetry||!O||!E||!ee(E))return f(j,L);let C=await f(j,L);if(C.ok)return C;let $;try{$=X(await C.clone().json())}catch{$=!1}if(C.status===401&&!$){let U=await O.refreshToken(E);return U?f(j,{...L,headers:{...L.headers,Authorization:`Bearer ${U.access_token}`}}):C}return C}var zr=function(e,t={},r){return o({service:_,scope:fe.VIEW_IDENTITIES,path:`/identities/${e}`},t,r)},Vr=function(e={},t){return o({service:_,scope:fe.VIEW_IDENTITIES,path:"/identities"},e,t)};var G={};u(G,{token:()=>Ue,userinfo:()=>eo});var Ue={};u(Ue,{exchange:()=>Wr,introspect:()=>Yr,refresh:()=>Xr,revoke:()=>Qr,token:()=>er,validate:()=>Zr});function Kr(e){return new URLSearchParams(e)}function te(e){return{...e,body:e.payload?Kr(e.payload):void 0,headers:{...e?.headers||{},Accept:"application/json","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}}var er=function(e={},t){return o({service:_,scope:void 0,path:"/v2/oauth2/token",method:"POST",preventRetry:!0},te(e),t)},Wr=er,Yr=function(e,t){if(!e?.payload)throw new Error("'payload' is required for introspect");return o({service:_,scope:void 0,path:"/v2/oauth2/token/introspect",method:"POST",preventRetry:!0},te(e),t)},Qr=function(e,t){if(!e?.payload)throw new Error("'payload' is required for revoke");return o({service:_,scope:void 0,path:"/v2/oauth2/token/revoke",method:"POST",preventRetry:!0},te(e),t)},Xr=function(e,t){if(!e?.payload)throw new Error("'payload' is required for revoke");return o({service:_,scope:void 0,path:"/v2/oauth2/token",method:"POST",preventRetry:!0},te(e),t)},Zr=function(e,t){if(!e?.payload)throw new Error("'payload' is required for validate");return o({service:_,scope:void 0,path:"/v2/oauth2/token/validate",method:"POST",preventRetry:!0},te(e),t)};var eo=function(e,t){return o({service:_,scope:void 0,path:"/v2/oauth2/userinfo",method:"GET"},e,t)};var He=ge;function Je(){return Z(_,"/v2/oauth2/authorize")}function to(){return Z(_,"/v2/oauth2/token")}function V(e){return typeof e=="object"&&e!==null&&"access_token"in e}function ee(e){return V(e)&&e!==null&&"refresh_token"in e}function ve(e){return V(e)&&e!==null&&"resource_server"in e}var re=class{constructor(t){this.name=t}#e=[];addListener(t){return this.#e.push(t),()=>this.removeListener(t)}removeListener(t){this.#e=this.#e.filter(r=>r!==t)}clearListeners(){this.#e=[]}async dispatch(t){await Promise.all(this.#e.map(r=>r(t)))}};function rr(){return"crypto"in globalThis}function ze(){return"webcrypto"in globalThis.crypto?globalThis.crypto.webcrypto:globalThis.crypto}var ro=e=>btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");async function oo(e){let t=await ze().subtle.digest("SHA-256",new TextEncoder().encode(e));return String.fromCharCode(...new Uint8Array(t))}var Be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",tr=`${Be}-._~`;function or(){return Array.from(ze().getRandomValues(new Uint8Array(43))).map(e=>tr[e%tr.length]).join("")}async function sr(e){let t=await oo(e);return ro(t)}function nr(){return Array.from(ze().getRandomValues(new Uint8Array(16))).map(e=>Be[e%Be.length]).join("")}var K={PKCE_STATE:"pkce_state",PKCE_CODE_VERIFIER:"pkce_code_verifier"};function so(){sessionStorage.removeItem(K.PKCE_STATE),sessionStorage.removeItem(K.PKCE_CODE_VERIFIER)}var _e=class e{#e;constructor(t){if(this.#e=t,e.supported===!1)throw new Error("RedirectTransport is not supported in this environment.")}static supported=rr();async send(){let t=or(),r=await sr(t),s=this.#e.params?.state??nr();sessionStorage.setItem(K.PKCE_CODE_VERIFIER,t),sessionStorage.setItem(K.PKCE_STATE,s);let p={response_type:"code",client_id:this.#e.client,scope:this.#e.scopes||"",redirect_uri:this.#e.redirect,state:s,code_challenge:r,code_challenge_method:"S256",...this.#e.params||{}},m=new URL(Je());m.search=new URLSearchParams(p).toString(),window.location.assign(m.toString())}async getToken(t={shouldReplace:!0}){let r=new URL(window.location.href),s=new URLSearchParams(r.search);if(s.get("error"))throw new Error(s.get("error_description")||"An error occurred during the authorization process.");let p=s.get("code");if(!p)return;let m=sessionStorage.getItem(K.PKCE_STATE),O=sessionStorage.getItem(K.PKCE_CODE_VERIFIER);if(so(),s.get("state")!==m)throw new Error('Invalid State. The received "state" parameter does not match the expected state.');if(!O)throw new Error("Invalid Code Verifier");let E={code:p,client_id:this.#e.client,code_verifier:O,redirect_uri:this.#e.redirect,grant_type:"authorization_code"},b=await(await G.token.exchange({payload:E})).json();return t.shouldReplace&&(s.delete("code"),s.delete("state"),r.search=s.toString(),window.location.replace(r)),b}};var Te=class{#e;constructor(t){this.#e=t.manager}#r(t){let r=this.#e.storage.getItem(t)||"null",s=null;try{let p=JSON.parse(r);V(p)&&(s=p)}catch{}return s}#t(t){let r=He.RESOURCE_SERVERS?.[t];return this.getByResourceServer(r)}getByResourceServer(t){return this.#r(`${this.#e.storageKeyPrefix}${t}`)}get auth(){return this.#t(I.AUTH)}get transfer(){return this.#t(I.TRANSFER)}get flows(){return this.#t(I.FLOWS)}get groups(){return this.#t(I.GROUPS)}get search(){return this.#t(I.SEARCH)}get timer(){return this.#t(I.TIMER)}get compute(){return this.#t(I.COMPUTE)}gcs(t){return this.getByResourceServer(t)}getAll(){return Object.keys(this.#e.storage).reduce((r,s)=>(s.startsWith(this.#e.storageKeyPrefix)&&r.push(this.#r(s)),r),[]).filter(V)}add(t){let r=Date.now(),s=r+t.expires_in*1e3;this.#e.storage.setItem(`${this.#e.storageKeyPrefix}${t.resource_server}`,JSON.stringify({...t,__metadata:{created:r,expires:s}})),"other_tokens"in t&&t.other_tokens?.forEach(p=>{this.add(p)})}static isTokenExpired(t,r=0){if(!(!t||!t.__metadata||typeof t.__metadata.expires!="number"))return Date.now()+r>=t.__metadata.expires}};var oe=class{#e={};getItem(t){return this.#e[t]!==void 0?this.#e[t]:null}setItem(t,r){this.#e[t]=r}removeItem(t){delete this.#e[t]}key(t){return Object.keys(this.#e)[t]}clear(){this.#e={}}get length(){return Object.keys(this.#e).length}};var no={redirect:_e},ir={useRefreshTokens:!1,defaultScopes:"openid profile email",transport:"redirect"},ar={execute:!0,additionalParams:void 0},se=class{#e;configuration;storage;#r=!1;get authenticated(){return this.#r}set authenticated(t){t!==this.#r&&(this.#r=t,this.#n())}tokens;events={authenticated:new re("authenticated"),revoke:new re("revoke")};constructor(t){if(!t.client)throw new Error("You must provide a `client` for your application.");let r=t.defaultScopes===!1?"":t.defaultScopes??ir.defaultScopes;this.configuration={...ir,...t,scopes:[t.scopes?t.scopes:"",r].filter(s=>s.length).join(" ")},this.storage=t.storage||new oe,this.configuration.events&&Object.entries(this.configuration.events).forEach(([s,p])=>{s in this.events&&this.events[s].addListener(p)}),this.tokens=new Te({manager:this}),this.#t()}get storageKeyPrefix(){return`${this.configuration.client}:`}get user(){let t=this.getGlobusAuthToken();return t&&t.id_token?Vt(t.id_token):null}async refreshTokens(){T("debug","AuthorizationManager.refreshTokens");let t=await Promise.allSettled(this.tokens.getAll().map(r=>ee(r)?this.refreshToken(r):Promise.resolve(null)));return this.#t(),t}async refreshToken(t){T("debug",`AuthorizationManager.refreshToken | resource_server=${t.resource_server}`);try{let r=await(await G.token.refresh({payload:{client_id:this.configuration.client,refresh_token:t.refresh_token,grant_type:"refresh_token"}})).json();if(ve(r))return this.addTokenResponse(r),r}catch{T("error",`AuthorizationManager.refreshToken | resource_server=${t.resource_server}`)}return null}hasGlobusAuthToken(){return this.getGlobusAuthToken()!==null}getGlobusAuthToken(){let t=this.storage.getItem(`${this.storageKeyPrefix}${Y.AUTH}`);return t?JSON.parse(t):null}#t(){T("debug","AuthorizationManager.#checkAuthorizationState"),this.hasGlobusAuthToken()&&(this.authenticated=!0)}async#n(){let t=this.authenticated,r=this.getGlobusAuthToken()??void 0;await this.events.authenticated.dispatch({isAuthenticated:t,token:r})}reset(){Object.keys(this.storage).forEach(t=>{t.startsWith(this.storageKeyPrefix)&&this.storage.removeItem(t)}),this.authenticated=!1}#s(t){return`${t}${this.configuration.useRefreshTokens?" offline_access":""}`}#o(t){let{scopes:r,...s}=t??{},p=no[this.configuration.transport||"redirect"],m=this.#s(r??(this.configuration.scopes||""));return this.storage instanceof oe&&(m=[...new Set(m.split(" ").concat((this.configuration?.scopes||"").split(" ")))].join(" ")),new p({client:this.configuration.client,redirect:this.configuration.redirect,scopes:m,...s,params:{...s?.params}})}async login(t={additionalParams:{}}){T("debug","AuthorizationManager.login"),this.reset(),await this.#o({params:t?.additionalParams}).send()}async prompt(t){T("debug","AuthorizationManager.prompt"),await this.#o(t).send()}async handleCodeRedirect(t={shouldReplace:!0,additionalParams:{}}){T("debug","AuthorizationManager.handleCodeRedirect");let r=await this.#o({params:t?.additionalParams}).getToken({shouldReplace:t?.shouldReplace});return ve(r)&&(T("debug",`AuthorizationManager.handleCodeRedirect | response=${JSON.stringify(r)}`),this.addTokenResponse(r)),r}async handleErrorResponse(t,r){let s=typeof r=="boolean"?{...ar,execute:r}:{...ar,...r};T("debug",`AuthorizationManager.handleErrorResponse | response=${JSON.stringify(t)} execute=${s.execute}`);let p=async()=>{};return X(t)&&(T("debug","AuthorizationManager.handleErrorResponse | error=AuthorizationRequirementsError"),p=async()=>{await this.handleAuthorizationRequirementsError(t,{additionalParams:s.additionalParams})}),Ne(t)&&(T("debug","AuthorizationManager.handleErrorResponse | error=ConsentRequiredError"),p=async()=>{await this.handleConsentRequiredError(t,{additionalParams:s.additionalParams})}),"code"in t&&t.code==="AuthenticationFailed"&&(T("debug","AuthorizationManager.handleErrorResponse | error=AuthenticationFailed"),p=async()=>{await this.revoke()}),s.execute===!0?await p():p}async handleAuthorizationRequirementsError(t,r){this.#e=this.#o({params:{prompt:"login",...qe(t),...r?.additionalParams}}),await this.#e.send()}async handleConsentRequiredError(t,r){this.#e=this.#o({scopes:this.#s(t.required_scopes.join(" ")),params:{...r?.additionalParams}}),await this.#e.send()}addTokenResponse=t=>{this.tokens.add(t),this.#t()};async revoke(){T("debug","AuthorizationManager.revoke");let t=Promise.all(this.tokens.getAll().map(this.#i.bind(this)));this.reset(),await t,await this.events.revoke.dispatch()}#i(t){return T("debug",`AuthorizationManager.revokeToken | resource_server=${t.resource_server}`),G.token.revoke({payload:{client_id:this.configuration.client,token:t.access_token}})}};function io(e){return new se(e)}var ct={};u(ct,{CONFIG:()=>ps,access:()=>Xe,collectionBookmarks:()=>Ze,endpoint:()=>Ye,endpointManager:()=>ot,endpointSearch:()=>pr,fileOperations:()=>Ke,task:()=>Qe,taskSubmission:()=>We,utils:()=>pt});var pr=function(e,t){let r={...e,query:e?.query};return o({service:a,scope:c.ALL,path:"/v0.10/endpoint_search"},r,t)};var Ke={};u(Ke,{ls:()=>ao,mkdir:()=>po,rename:()=>co,stat:()=>lo,symlink:()=>uo});function J(e){return e==="GET"?{}:{"Content-Type":"application/json"}}var ao=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/ls`},t,r)},po=function(e,t,r){let s={payload:{DATA_TYPE:"mkdir",...t?.payload},headers:{...J("POST"),...t?.headers}};return o({service:a,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/mkdir`,method:"POST"},s,r)},co=function(e,t,r){let s={payload:{DATA_TYPE:"rename",...t?.payload},headers:{...J("POST"),...t?.headers}};return o({service:a,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/rename`,method:"POST"},s,r)},uo=function(e,t,r){let s={payload:{DATA_TYPE:"symlink",...t?.payload},headers:{...J("POST"),...t?.headers}};return o({service:a,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/symlink`,method:"POST"},s,r)},lo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/stat`},t,r)};var We={};u(We,{submissionId:()=>fo,submitDelete:()=>mo,submitTransfer:()=>ho});var mo=function(e,t){let r={payload:{DATA_TYPE:"delete",...e?.payload},headers:{...J("POST"),...e?.headers}};return o({service:a,scope:c.ALL,path:"/v0.10/delete",method:"POST"},r,t)},ho=function(e,t){let r={payload:{DATA_TYPE:"transfer",...e?.payload},headers:{...J("POST"),...e?.headers}};return o({service:a,scope:c.ALL,path:"/v0.10/transfer",method:"POST"},r,t)},fo=function(e,t){return o({service:a,scope:c.ALL,path:"/v0.10/submission_id"},e,t)};var Ye={};u(Ye,{create:()=>yo,get:()=>go,remove:()=>vo,update:()=>So});var go=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint/${e}`},t,r)},yo=function(e,t){return e?.payload&&Object.assign(e.payload,{DATA_TYPE:"shared_endpoint"}),o({service:a,scope:c.ALL,path:"/v0.10/shared_endpoint",method:"POST"},e,t)},So=function(e,t,r){return t?.payload&&Object.assign(t.payload,{DATA_TYPE:"endpoint"}),o({service:a,scope:c.ALL,path:`/v0.10/endpoint/${e}`,method:"PUT"},t,r)},vo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint/${e}`,method:"DELETE"},t,r)};var Qe={};u(Qe,{cancel:()=>Eo,get:()=>To,getAll:()=>_o,getEventList:()=>bo,getPauseInfo:()=>Do,getSkippedErrors:()=>xo,getSuccessfulTransfers:()=>Po,remove:()=>Oo,update:()=>Ro});var _o=function(e={},t){return o({service:a,scope:c.ALL,path:"/v0.10/task_list"},e,t)},To=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/task/${e}`},t,r)},Ro=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/task/${e}`,method:"PUT"},t,r)},Eo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/task/${e}/cancel`,method:"POST"},t,r)},Oo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/task/${e}/remove`,method:"POST"},t,r)},bo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/task/${e}/event_list`},t,r)},Po=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/task/${e}/successful_transfers`},t,r)},xo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/task/${e}/skipped_errors`},t,r)},Do=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/task/${e}/pause_info`},t,r)};var Xe={};u(Xe,{create:()=>Mo,get:()=>wo,getAll:()=>Ao,remove:()=>Lo,update:()=>Co});var Ao=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint/${e}/access_list`},t,r)},Mo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint/${e}/access`,method:"POST"},t,r)},wo=function({endpoint_xid:e,id:t},r,s){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`},r,s)},Co=function({endpoint_xid:e,id:t},r,s){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`,method:"PUT"},r,s)},Lo=function({endpoint_xid:e,id:t},r,s){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`,method:"DELETE"},r,s)};var Ze={};u(Ze,{create:()=>No,get:()=>qo,getAll:()=>ko,remove:()=>Fo,update:()=>Io});var ko=function(e,t){return o({service:a,scope:c.ALL,path:"/v0.10/bookmark_list"},e,t)},No=function(e,t){return o({service:a,scope:c.ALL,path:"/v0.10/bookmark",method:"POST"},e,t)},qo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/bookmark/${e}`},t,r)},Io=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/bookmark/${e}`,method:"PUT"},t,r)},Fo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/bookmark/${e}`,method:"DELETE"},t,r)};var ot={};u(ot,{endpoint:()=>et,pauseRule:()=>tt,task:()=>rt});var et={};u(et,{get:()=>Go,getAccessList:()=>Uo,getHostedEndpoints:()=>jo,getMonitoredEndpoints:()=>Ho});var Go=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}`},t,r)},jo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}/hosted_endpoint_list`},t,r)},Uo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}/access_list`},t,r)},Ho=function(e={},t){return o({service:a,scope:c.ALL,path:"/v0.10/endpoint_manager/monitored_endpoints"},e,t)};var tt={};u(tt,{create:()=>$o,get:()=>Bo,getAll:()=>Jo,remove:()=>Vo,update:()=>zo});var Jo=function(e,t){return o({service:a,scope:c.ALL,path:"/v0.10/endpoint_manager/pause_rule_list"},e,t)},$o=function(e,t){return o({service:a,scope:c.ALL,path:"/v0.10/endpoint_manager/pause_rule",method:"POST"},e,t)},Bo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`},t,r)},zo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`,method:"PUT"},t,r)},Vo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`,method:"DELETE"},t,r)};var rt={};u(rt,{cancel:()=>Yo,get:()=>Wo,getAdminCancel:()=>Qo,getAll:()=>Ko,getEventList:()=>Xo,getPauseInfo:()=>os,getSkippedErrors:()=>es,getSuccessfulTransfers:()=>Zo,pause:()=>ts,resume:()=>rs});var Ko=function(e={},t){return o({service:a,scope:c.ALL,path:"/v0.10/task_list"},e,t)},Wo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}`},t,r)},Yo=function(e,t){return o({service:a,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_cancel",method:"POST"},e,t)},Qo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint_manager/admin_cancel/${e}`,method:"POST"},t,r)},Xo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/event_list`},t,r)},Zo=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/successful_transfers`},t,r)},es=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/skipped_errors`},t,r)},ts=function(e,t){return o({service:a,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_pause",method:"POST"},e,t)},rs=function(e,t){return o({service:a,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_resume",method:"POST"},e,t)},os=function(e,t,r){return o({service:a,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/pause_info`},t,r)};var pt={};u(pt,{getDomainFromEndpoint:()=>as,isDirectory:()=>ss,isFileDocument:()=>ur,readableBytes:()=>ns});function ur(e){return typeof e=="object"&&e!==null&&"DATA_TYPE"in e&&e.DATA_TYPE==="file"}function ss(e){return ur(e)&&e.type==="dir"}var st=1e3,nt=st*1e3,it=nt*1e3,at=it*1e3,cr=at*1e3;function ns(e,t=2){let r="B",s=1;if(e<st)return`${e} ${r}`;e<nt?(r="KB",s=st):e<it?(r="MB",s=nt):e<at?(r="GB",s=it):e<cr?(r="TB",s=at):(r="PB",s=cr);let p=e/s,[m,O]=`${p}`.split("."),E=`${m}`;if(O&&O.length){let b=O.slice(0,t);b.length&&(E=`${m}.${b}`)}return`${E} ${r}`}var is=["dnsteam.globuscs.info","data.globus.org","dn.glob.us"];function as(e){let{tlsftp_server:t}=e;if(!t||typeof t!="string")return null;let{hostname:r}=new URL(t.replace("tlsftp","https"));return!is.find(m=>r.endsWith(m))&&/(?:[gm]-\w{6}.)?(\w+(\.\w+)+)$/.exec(r)?.[1]||r||null}var ps=ce;var ht={};u(ht,{CONFIG:()=>vs,entry:()=>lt,index:()=>mt,query:()=>ut,subject:()=>dt});var ut={};u(ut,{get:()=>cs,post:()=>us});var cs=function(e,t,r){return o({service:v,scope:x.SEARCH,path:`/v1/index/${e}/search`},t,r)},us=function(e,t,r){return o({service:v,scope:x.SEARCH,path:`/v1/index/${e}/search`,method:"POST"},t,r)};var dt={};u(dt,{get:()=>ds});var ds=function(e,t,r){return o({service:v,scope:x.SEARCH,path:`/v1/index/${e}/subject`},t,r)};var lt={};u(lt,{get:()=>ls});var ls=function(e,t,r){return o({service:v,scope:x.SEARCH,path:`/v1/index/${e}/entry`},t,r)};var mt={};u(mt,{create:()=>fs,get:()=>ms,getAll:()=>hs,ingest:()=>Ss,remove:()=>gs,reopen:()=>ys});var ms=function(e,t,r){return o({service:v,path:`/v1/index/${e}`},t,r)},hs=function(e,t){return o({service:v,scope:x.ALL,path:"/v1/index_list"},e,t)},fs=function(e,t){return o({service:v,scope:x.ALL,path:"/v1/index",method:"POST"},e,t)},gs=function(e,t,r){return o({service:v,scope:x.ALL,path:`/v1/index/${e}`,method:"DELETE"},t,r)},ys=function(e,t,r){return o({service:v,scope:x.ALL,path:`/v1/index/${e}/reopen`,method:"POST"},t,r)},Ss=function(e,t,r){return o({service:v,scope:x.ALL,path:`/v1/index/${e}/ingest`,method:"POST"},t,r)};var vs=me;var St={};u(St,{CONFIG:()=>Os,groups:()=>ft,membership:()=>yt,policies:()=>gt});var ft={};u(ft,{get:()=>Ts,getMyGroups:()=>_s});var _s=function(e,t){return o({scope:q.ALL,path:"/v2/groups/my_groups",service:P},e,t)},Ts=function(e,t,r){return o({service:P,scope:q.ALL,path:`/v2/groups/${e}`},t,r)};var gt={};u(gt,{get:()=>Rs});var Rs=function(e,t,r){return o({scope:q.ALL,path:`/v2/groups/${e}/policies`,service:P},t,r)};var yt={};u(yt,{act:()=>Es});var Es=function(e,t,r){if(!t?.payload)throw new Error("payload is required.");return o({service:P,scope:q.ALL,path:`/v2/groups/${e}`,method:"POST"},t,r)};var Os=le;var Tt={};u(Tt,{CONFIG:()=>ks,flows:()=>vt,runs:()=>_t});var vt={};u(vt,{create:()=>dr,deploy:()=>Ms,get:()=>Ps,getAll:()=>bs,remove:()=>xs,run:()=>Ds,validate:()=>As});var bs=function(e,t){return o({service:R,scope:A.VIEW_FLOWS,path:"/flows"},e,t)},Ps=function(e,t,r){return o({service:R,scope:A.VIEW_FLOWS,path:`/flows/${e}`},t,r)},xs=function(e,t,r){return o({scope:A.MANAGE_FLOWS,service:R,path:`/flows/${e}`,method:"DELETE"},t,r)},Ds=function(e,t,r){return o({service:R,scope:A.VIEW_FLOWS,path:`/flows/${e}/run`,method:"POST"},t,r)},As=function(e,t){return o({service:R,scope:A.MANAGE_FLOWS,path:"/flows/validate",method:"POST"},e,t)},dr=function(e,t){return o({service:R,scope:A.MANAGE_FLOWS,path:"/flows",method:"POST"},e,t)},Ms=dr;var _t={};u(_t,{cancel:()=>Cs,getAll:()=>ws,getLog:()=>Ls});var ws=function(e={},t){return o({service:R,scope:A.RUN_MANAGE,path:"/runs"},e,t)},Cs=function(e,t,r){return o({service:R,scope:A.RUN_MANAGE,path:`/runs/${e}/cancel`,method:"POST"},t,r)},Ls=function(e,t,r){return o({service:R,scope:A.RUN_MANAGE,path:`/runs/${e}/log`},t,r)};var ks=ue;var Mt={};u(Mt,{collections:()=>Rt,endpoint:()=>Et,getRequiredScopes:()=>d,https:()=>Ot,nodes:()=>bt,roles:()=>Pt,storageGateways:()=>xt,userCredentials:()=>Dt,versioning:()=>At});var Rt={};u(Rt,{create:()=>Fs,get:()=>qs,getAll:()=>Ns,patch:()=>js,remove:()=>Is,resetOwnerString:()=>Hs,update:()=>Gs,updateOwnerString:()=>Us});var Ns=function(e,t,r){return o({service:e,scope:d(e),path:"/api/collections"},t,r)},qs=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/collections/${t}`},r,s)},Is=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/collections/${t}`,method:"DELETE"},r,s)},Fs=function(e,t,r){return o({service:e,scope:d(e),path:"/api/collections",method:"POST"},t,r)},Gs=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/collections/${t}`,method:"PUT"},r,s)},js=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/collections/${t}`,method:"PATCH"},r,s)},Us=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/collections/${t}/owner_string`,method:"PUT"},r,s)},Hs=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/collections/${t}/owner_string`,method:"DELETE"},r,s)};var Et={};u(Et,{get:()=>Js,patch:()=>Bs,resetOwnerString:()=>Ws,update:()=>$s,updateOwner:()=>Vs,updateOwnerString:()=>Ks,updateSubscriptionId:()=>zs});var Js=function(e,t,r){return o({service:e,scope:d(e),path:"/api/endpoint"},t,r)},$s=function(e,t,r){return o({service:e,scope:d(e),path:"/api/endpoint",method:"PUT"},t,r)},Bs=function(e,t,r){return o({service:e,scope:d(e),path:"/api/endpoint",method:"PATCH"},t,r)},zs=function(e,t,r){return o({service:e,scope:d(e),path:"/api/endpoint/subscription_id",method:"PUT"},t,r)},Vs=function(e,t,r){return o({service:e,scope:d(e),path:"/api/endpoint/owner",method:"PUT"},t,r)},Ks=function(e,t,r){return o({service:e,scope:d(e),path:"/api/endpoint/owner_string",method:"PUT"},t,r)},Ws=function(e,t,r){return o({service:e,scope:d(e),path:"/api/endpoint/owner_string",method:"DELETE"},t,r)};var Ot={};u(Ot,{get:()=>Ys,remove:()=>Qs,update:()=>Xs});var Ys=function(e,t,r,s){return o({service:e,scope:d(e),path:t},r,s)},Qs=function(e,t,r,s){return o({service:e,scope:d(e),path:t,method:"DELETE"},r,s)},Xs=function(e,t,r,s){return o({service:e,scope:d(e),path:t,method:"PUT"},r,s)};var bt={};u(bt,{create:()=>rn,get:()=>en,getAll:()=>Zs,patch:()=>sn,remove:()=>tn,update:()=>on});var Zs=function(e,t,r){return o({service:e,scope:d(e),path:"/api/nodes"},t,r)},en=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/nodes/${t}`},r,s)},tn=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/nodes/${t}`,method:"DELETE"},r,s)},rn=function(e,t,r){return o({service:e,scope:d(e),path:"/api/nodes",method:"POST"},t,r)},on=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/nodes/${t}`,method:"PUT"},r,s)},sn=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/nodes/${t}`,method:"PATCH"},r,s)};var Pt={};u(Pt,{create:()=>cn,get:()=>an,getAll:()=>nn,remove:()=>pn});var nn=function(e,t,r){return o({service:e,scope:d(e),path:"/api/roles"},t,r)},an=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/roles/${t}`},r,s)},pn=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/roles/${t}`,method:"DELETE"},r,s)},cn=function(e,t,r){return o({service:e,scope:d(e),path:"/api/roles",method:"POST"},t,r)};var xt={};u(xt,{create:()=>mn,get:()=>dn,getAll:()=>un,patch:()=>fn,remove:()=>ln,update:()=>hn});var un=function(e,t,r){return o({service:e,scope:d(e),path:"/api/storage_gateways"},t,r)},dn=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/storage_gateways/${t}`},r,s)},ln=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/storage_gateways/${t}`,method:"DELETE"},r,s)},mn=function(e,t,r){return o({service:e,scope:d(e),path:"/api/storage_gateways",method:"POST"},t,r)},hn=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/storage_gateways/${t}`,method:"PUT"},r,s)},fn=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/storage_gateways/${t}`,method:"PATCH"},r,s)};var Dt={};u(Dt,{create:()=>vn,get:()=>yn,getAll:()=>gn,patch:()=>Tn,remove:()=>Sn,update:()=>_n});var gn=function(e,t,r){return o({service:e,scope:d(e),path:"/api/user_credentials"},t,r)},yn=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/user_credentials/${t}`},r,s)},Sn=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/user_credentials/${t}`,method:"DELETE"},r,s)},vn=function(e,t,r){return o({service:e,scope:d(e),path:"/api/user_credentials",method:"POST"},t,r)},_n=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/user_credentials/${t}`,method:"PUT"},r,s)},Tn=function(e,t,r,s){return o({service:e,scope:d(e),path:`/api/user_credentials/${t}`,method:"PATCH"},r,s)};var At={};u(At,{info:()=>Rn});var Rn=function(e,t,r){return o({service:e,scope:d(e),path:"/api/info"},t,r)};var En={HIGH_ASSURANCE:"urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections",NON_HIGH_ASSURANCE:"urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections[*https://auth.globus.org/scopes/<MAPPED_COLLECTION_ID>/data_access]"};function d(e){return En.HIGH_ASSURANCE.replace("<ENDPOINT_ID>",e.endpoint_id)}var wt={};u(wt,{CONFIG:()=>On,create:()=>lr});var lr=function(e,t){return o({service:k,scope:"https://auth.globus.org/scopes/524230d7-ea86-4a52-8312-86065a9e0417/timer",path:"/v2/timer",method:"POST"},e,t)};var On=de;var Lt={};u(Lt,{CONFIG:()=>Dn,endpoints:()=>Ct});var Ct={};u(Ct,{get:()=>Pn,getAll:()=>bn,getStatus:()=>xn});var bn=function(e,t){return o({service:w,scope:W.ALL,path:"/v2/endpoints",method:"GET"},e,t)},Pn=function(e,t,r){return o({service:w,scope:W.ALL,path:`/v2/endpoints/${e}`,method:"GET"},t,r)},xn=function(e,t,r){return o({service:w,scope:W.ALL,path:`/v2/endpoints/${e}/status`},t,r)};var Dn=he;var kt={};u(kt,{HOSTS:()=>mr,host:()=>hr,url:()=>fr,urlFor:()=>Mn});var mr={integration:"app.integration.globuscs.info",sandbox:"app.sandbox.globuscs.info",test:"app.test.globuscs.info",staging:"app.staging.globuscs.info",preview:"app.preview.globus.org",production:"app.globus.org"};function hr(e=B()){return mr[e]}function fr(e,t){return new URL(e||"",`https://${hr(t?.environment)}`)}var An={TASK:"/activity/%s/overview",COLLECTION:"/file-manager/collections/%s/overview",ENDPOINT:"/file-manager/collections/%s/overview"};function Mn(e,t,r){let s=An[e].replace(/%s/g,t?.join("/")||"");return fr(s,r)}return Mr(wn);})(); | ||
var globus=(()=>{var Ar=Object.create;var pe=Object.defineProperty;var Mr=Object.getOwnPropertyDescriptor;var wr=Object.getOwnPropertyNames;var Cr=Object.getPrototypeOf,Lr=Object.prototype.hasOwnProperty;var kr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),u=(e,t)=>{for(var r in t)pe(e,r,{get:t[r],enumerable:!0})},Jt=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of wr(t))!Lr.call(e,a)&&a!==r&&pe(e,a,{get:()=>t[a],enumerable:!(s=Mr(t,a))||s.enumerable});return e};var Nr=(e,t,r)=>(r=e!=null?Ar(Cr(e)):{},Jt(t||!e||!e.__esModule?pe(r,"default",{value:e,enumerable:!0}):r,e)),Ir=e=>Jt(pe({},"__esModule",{value:!0}),e);var or=kr((G,rr)=>{var ye=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,Se=function(){function e(){this.fetch=!1,this.DOMException=ye.DOMException}return e.prototype=ye,new e}();(function(e){var t=function(r){var s=typeof e<"u"&&e||typeof self<"u"&&self||typeof global<"u"&&global||{},a={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function l(n){return n&&DataView.prototype.isPrototypeOf(n)}if(a.arrayBuffer)var b=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],E=ArrayBuffer.isView||function(n){return n&&b.indexOf(Object.prototype.toString.call(n))>-1};function O(n){if(typeof n!="string"&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(n)||n==="")throw new TypeError('Invalid character in header field name: "'+n+'"');return n.toLowerCase()}function q(n){return typeof n!="string"&&(n=String(n)),n}function C(n){var i={next:function(){var d=n.shift();return{done:d===void 0,value:d}}};return a.iterable&&(i[Symbol.iterator]=function(){return i}),i}function f(n){this.map={},n instanceof f?n.forEach(function(i,d){this.append(d,i)},this):Array.isArray(n)?n.forEach(function(i){if(i.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+i.length);this.append(i[0],i[1])},this):n&&Object.getOwnPropertyNames(n).forEach(function(i){this.append(i,n[i])},this)}f.prototype.append=function(n,i){n=O(n),i=q(i);var d=this.map[n];this.map[n]=d?d+", "+i:i},f.prototype.delete=function(n){delete this.map[O(n)]},f.prototype.get=function(n){return n=O(n),this.has(n)?this.map[n]:null},f.prototype.has=function(n){return this.map.hasOwnProperty(O(n))},f.prototype.set=function(n,i){this.map[O(n)]=q(i)},f.prototype.forEach=function(n,i){for(var d in this.map)this.map.hasOwnProperty(d)&&n.call(i,this.map[d],d,this)},f.prototype.keys=function(){var n=[];return this.forEach(function(i,d){n.push(d)}),C(n)},f.prototype.values=function(){var n=[];return this.forEach(function(i){n.push(i)}),C(n)},f.prototype.entries=function(){var n=[];return this.forEach(function(i,d){n.push([d,i])}),C(n)},a.iterable&&(f.prototype[Symbol.iterator]=f.prototype.entries);function w(n){if(!n._noBody){if(n.bodyUsed)return Promise.reject(new TypeError("Already read"));n.bodyUsed=!0}}function $(n){return new Promise(function(i,d){n.onload=function(){i(n.result)},n.onerror=function(){d(n.error)}})}function qt(n){var i=new FileReader,d=$(i);return i.readAsArrayBuffer(n),d}function j(n){var i=new FileReader,d=$(i),h=/charset=([A-Za-z0-9_-]+)/.exec(n.type),y=h?h[1]:"utf-8";return i.readAsText(n,y),d}function Er(n){for(var i=new Uint8Array(n),d=new Array(i.length),h=0;h<i.length;h++)d[h]=String.fromCharCode(i[h]);return d.join("")}function jt(n){if(n.slice)return n.slice(0);var i=new Uint8Array(n.byteLength);return i.set(new Uint8Array(n)),i.buffer}function Ut(){return this.bodyUsed=!1,this._initBody=function(n){this.bodyUsed=this.bodyUsed,this._bodyInit=n,n?typeof n=="string"?this._bodyText=n:a.blob&&Blob.prototype.isPrototypeOf(n)?this._bodyBlob=n:a.formData&&FormData.prototype.isPrototypeOf(n)?this._bodyFormData=n:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(n)?this._bodyText=n.toString():a.arrayBuffer&&a.blob&&l(n)?(this._bodyArrayBuffer=jt(n.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(n)||E(n))?this._bodyArrayBuffer=jt(n):this._bodyText=n=Object.prototype.toString.call(n):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof n=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(n)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var n=w(this);if(n)return n;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var n=w(this);return n||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(a.blob)return this.blob().then(qt);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var n=w(this);if(n)return n;if(this._bodyBlob)return j(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Er(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(Pr)}),this.json=function(){return this.text().then(JSON.parse)},this}var Or=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function br(n){var i=n.toUpperCase();return Or.indexOf(i)>-1?i:n}function k(n,i){if(!(this instanceof k))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');i=i||{};var d=i.body;if(n instanceof k){if(n.bodyUsed)throw new TypeError("Already read");this.url=n.url,this.credentials=n.credentials,i.headers||(this.headers=new f(n.headers)),this.method=n.method,this.mode=n.mode,this.signal=n.signal,!d&&n._bodyInit!=null&&(d=n._bodyInit,n.bodyUsed=!0)}else this.url=String(n);if(this.credentials=i.credentials||this.credentials||"same-origin",(i.headers||!this.headers)&&(this.headers=new f(i.headers)),this.method=br(i.method||this.method||"GET"),this.mode=i.mode||this.mode||null,this.signal=i.signal||this.signal||function(){if("AbortController"in s){var m=new AbortController;return m.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&d)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(d),(this.method==="GET"||this.method==="HEAD")&&(i.cache==="no-store"||i.cache==="no-cache")){var h=/([?&])_=[^&]*/;if(h.test(this.url))this.url=this.url.replace(h,"$1_="+new Date().getTime());else{var y=/\?/;this.url+=(y.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}k.prototype.clone=function(){return new k(this,{body:this._bodyInit})};function Pr(n){var i=new FormData;return n.trim().split("&").forEach(function(d){if(d){var h=d.split("="),y=h.shift().replace(/\+/g," "),m=h.join("=").replace(/\+/g," ");i.append(decodeURIComponent(y),decodeURIComponent(m))}}),i}function xr(n){var i=new f,d=n.replace(/\r?\n[\t ]+/g," ");return d.split("\r").map(function(h){return h.indexOf(` | ||
`)===0?h.substr(1,h.length):h}).forEach(function(h){var y=h.split(":"),m=y.shift().trim();if(m){var ae=y.join(":").trim();try{i.append(m,ae)}catch(Ee){console.warn("Response "+Ee.message)}}}),i}Ut.call(k.prototype);function A(n,i){if(!(this instanceof A))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(i||(i={}),this.type="default",this.status=i.status===void 0?200:i.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=i.statusText===void 0?"":""+i.statusText,this.headers=new f(i.headers),this.url=i.url||"",this._initBody(n)}Ut.call(A.prototype),A.prototype.clone=function(){return new A(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},A.error=function(){var n=new A(null,{status:200,statusText:""});return n.ok=!1,n.status=0,n.type="error",n};var Dr=[301,302,303,307,308];A.redirect=function(n,i){if(Dr.indexOf(i)===-1)throw new RangeError("Invalid status code");return new A(null,{status:i,headers:{location:n}})},r.DOMException=s.DOMException;try{new r.DOMException}catch{r.DOMException=function(i,d){this.message=i,this.name=d;var h=Error(i);this.stack=h.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function Re(n,i){return new Promise(function(d,h){var y=new k(n,i);if(y.signal&&y.signal.aborted)return h(new r.DOMException("Aborted","AbortError"));var m=new XMLHttpRequest;function ae(){m.abort()}m.onload=function(){var R={statusText:m.statusText,headers:xr(m.getAllResponseHeaders()||"")};y.url.indexOf("file://")===0&&(m.status<200||m.status>599)?R.status=200:R.status=m.status,R.url="responseURL"in m?m.responseURL:R.headers.get("X-Request-URL");var U="response"in m?m.response:m.responseText;setTimeout(function(){d(new A(U,R))},0)},m.onerror=function(){setTimeout(function(){h(new TypeError("Network request failed"))},0)},m.ontimeout=function(){setTimeout(function(){h(new TypeError("Network request timed out"))},0)},m.onabort=function(){setTimeout(function(){h(new r.DOMException("Aborted","AbortError"))},0)};function Ee(R){try{return R===""&&s.location.href?s.location.href:R}catch{return R}}if(m.open(y.method,Ee(y.url),!0),y.credentials==="include"?m.withCredentials=!0:y.credentials==="omit"&&(m.withCredentials=!1),"responseType"in m&&(a.blob?m.responseType="blob":a.arrayBuffer&&(m.responseType="arraybuffer")),i&&typeof i.headers=="object"&&!(i.headers instanceof f||s.Headers&&i.headers instanceof s.Headers)){var Ht=[];Object.getOwnPropertyNames(i.headers).forEach(function(R){Ht.push(O(R)),m.setRequestHeader(R,q(i.headers[R]))}),y.headers.forEach(function(R,U){Ht.indexOf(U)===-1&&m.setRequestHeader(U,R)})}else y.headers.forEach(function(R,U){m.setRequestHeader(U,R)});y.signal&&(y.signal.addEventListener("abort",ae),m.onreadystatechange=function(){m.readyState===4&&y.signal.removeEventListener("abort",ae)}),m.send(typeof y._bodyInit>"u"?null:y._bodyInit)})}return Re.polyfill=!0,s.fetch||(s.fetch=Re,s.Headers=f,s.Request=k,s.Response=A),r.Headers=f,r.Request=k,r.Response=A,r.fetch=Re,r}({})})(Se);Se.fetch.ponyfill=!0;delete Se.fetch.polyfill;var V=ye.fetch?ye:Se;G=V.fetch;G.default=V.fetch;G.fetch=V.fetch;G.Headers=V.Headers;G.Request=V.Request;G.Response=V.Response;rr.exports=G});var Fn={};u(Fn,{auth:()=>ze,authorization:()=>We,compute:()=>Gt,errors:()=>Fe,flows:()=>Et,gcs:()=>kt,groups:()=>_t,info:()=>Pe,logger:()=>De,search:()=>gt,timer:()=>Nt,transfer:()=>dt,webapp:()=>Ft});var Pe={};u(Pe,{CLIENT_INFO:()=>Wt,VERSION:()=>Kt,addClientInfo:()=>jr,getClientInfo:()=>Yt,getClientInfoRequestHeaders:()=>be});var $t="X-Globus-Client-Info",Gr=!0;function Bt(){return Gr}var Fr=";",qr=",";function zt(e){return(Array.isArray(e)?e:[e]).map(r=>Object.entries(r).map(([s,a])=>`${s}=${a}`).join(qr)).join(Fr)}var Vt="5.2.0";var Kt=Vt,Wt={product:"javascript-sdk",version:Kt},Oe=[Wt];function jr(e){Oe=Oe.concat(e)}function Yt(){return zt(Oe)}function be(){return Bt()?{[$t]:Yt()}:{}}var De={};u(De,{log:()=>_,setLogLevel:()=>Hr,setLogger:()=>Ur});var xe=["debug","info","warn","error"],ce,Qt=xe.indexOf("error");function Ur(e){ce=e}function Hr(e){Qt=xe.indexOf(e)}function _(e,...t){if(!ce||xe.indexOf(e)<Qt)return;(ce[e]??ce.log)(...t)}var We={};u(We,{AuthorizationManager:()=>ne,create:()=>ho});var H=class extends Error{};H.prototype.name="InvalidTokenError";function Jr(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,r)=>{let s=r.charCodeAt(0).toString(16).toUpperCase();return s.length<2&&(s="0"+s),"%"+s}))}function $r(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Jr(t)}catch{return atob(t)}}function Xt(e,t){if(typeof e!="string")throw new H("Invalid token specified: must be a string");t||(t={});let r=t.header===!0?0:1,s=e.split(".")[r];if(typeof s!="string")throw new H(`Invalid token specified: missing part #${r+1}`);let a;try{a=$r(s)}catch(l){throw new H(`Invalid token specified: invalid base64 for part #${r+1} (${l.message})`)}try{return JSON.parse(a)}catch(l){throw new H(`Invalid token specified: invalid json for part #${r+1} (${l.message})`)}}var ze={};u(ze,{CONFIG:()=>$e,getAuthorizationEndpoint:()=>Be,getTokenEndpoint:()=>po,identities:()=>He,isGlobusAuthTokenResponse:()=>ve,isRefreshToken:()=>te,isToken:()=>K,oauth2:()=>F});var ge={};u(ge,{HOSTS:()=>Ne,ID:()=>S,RESOURCE_SERVERS:()=>Q,SCOPES:()=>B});var ue={};u(ue,{HOSTS:()=>Ae,ID:()=>p,SCOPES:()=>c});var p="TRANSFER",c={ALL:"urn:globus:auth:scope:transfer.api.globus.org:all"},Ae={sandbox:"transfer.api.sandbox.globuscs.info",production:"transfer.api.globusonline.org",staging:"transfer.api.staging.globuscs.info",integration:"transfer.api.integration.globuscs.info",test:"transfer.api.test.globuscs.info",preview:"transfer.api.preview.globus.org"};var de={};u(de,{HOSTS:()=>Me,ID:()=>T,SCOPES:()=>D});var T="FLOWS",Me={sandbox:"sandbox.flows.automate.globus.org",production:"flows.globus.org",staging:"staging.flows.automate.globus.org",integration:"integration.flows.automate.globus.org",test:"test.flows.automate.globus.org",preview:"preview.flows.automate.globus.org"},D={MANAGE_FLOWS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/manage_flows",VIEW_FLOWS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/view_flows",RUN:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run",RUN_STATUS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run_status",RUN_MANAGE:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run_manage"};var le={};u(le,{HOSTS:()=>we,ID:()=>L});var L="TIMER",we={sandbox:"sandbox.timer.automate.globus.org",production:"timer.automate.globus.org",staging:"staging.timer.automate.globus.org",integration:"integration.timer.automate.globus.org",test:"test.timer.automate.globus.org",preview:"preview.timer.automate.globus.org"};var me={};u(me,{HOSTS:()=>Ce,ID:()=>P,SCOPES:()=>N});var P="GROUPS",Ce={sandbox:"groups.api.sandbox.globuscs.info",production:"groups.api.globus.org",staging:"groups.api.staging.globuscs.info",integration:"groups.api.integration.globuscs.info",test:"groups.api.test.globuscs.info",preview:"groups.api.preview.globuscs.info"},N={ALL:"urn:globus:auth:scope:groups.api.globus.org:all",VIEW_MY:"urn:globus:auth:scope:groups.api.globus.org:view_my_groups_and_membership"};var he={};u(he,{HOSTS:()=>Le,ID:()=>v,SCOPES:()=>x});var v="SEARCH",Le={sandbox:"search.api.sandbox.globuscs.info",production:"search.api.globus.org",staging:"search.api.staging.globuscs.info",integration:"search.api.integration.globuscs.info",test:"search.api.test.globuscs.info",preview:"search.api.preview.globus.org"},x={ALL:"urn:globus:auth:scope:search.api.globus.org:all",INGEST:"urn:globus:auth:scope:search.api.globus.org:ingest",SEARCH:"urn:globus:auth:scope:search.api.globus.org:search"};var fe={};u(fe,{HOSTS:()=>ke,ID:()=>M,SCOPES:()=>Y});var M="COMPUTE",ke={sandbox:"compute.api.sandbox.globuscs.info",production:"compute.api.globus.org",staging:"compute.api.staging.globuscs.info",integration:"compute.api.integration.globuscs.info",test:"compute.api.test.globuscs.info",preview:"compute.api.preview.globus.org"},Y={ALL:"https://auth.globus.org/scopes/facd7ccc-c5f4-42aa-916b-a0e270e2c2a9/all"};var S="AUTH",Ne={integration:"auth.integration.globuscs.info",sandbox:"auth.sandbox.globuscs.info",production:"auth.globus.org",test:"auth.test.globuscs.info",staging:"auth.staging.globuscs.info",preview:"auth.preview.globus.org"},B={VIEW_IDENTITIES:"urn:globus:auth:scope:auth.globus.org:view_identities"},Q={[S]:"auth.globus.org",[p]:"transfer.api.globus.org",[T]:"flows.globus.org",[P]:"groups.api.globus.org",[v]:"search.api.globus.org",[L]:"524230d7-ea86-4a52-8312-86065a9e0417",[M]:"funcx_service"};var Fe={};u(Fe,{EnvironmentConfigurationError:()=>X,isAuthorizationRequirementsError:()=>Z,isConsentRequiredError:()=>Ie,isErrorWellFormed:()=>Zt,toAuthorizationQueryParams:()=>Ge});var X=class extends Error{name="EnvironmentConfigurationError";constructor(t,r){super(),this.message=`Invalid configuration value provided for ${t} (${r}).`}};function Zt(e){return typeof e=="object"&&e!==null&&"code"in e&&"message"in e}function Ie(e){return Zt(e)&&e.code==="ConsentRequired"&&"required_scopes"in e&&Array.isArray(e.required_scopes)}var Br=["required_scopes"];function Ge(e){let t={scope:e.authorization_parameters.required_scopes?.join(" "),...e.authorization_parameters};return Object.entries(t).reduce((r,[s,a])=>{if(Br.includes(s)||a===void 0||a===null)return r;let l=a;return Array.isArray(l)?l=l.join(","):typeof a=="boolean"&&(l=l?"true":"false"),{...r,[s]:l}},{})}function Z(e){return typeof e=="object"&&e!==null&&"authorization_parameters"in e&&typeof e.authorization_parameters=="object"&&e.authorization_parameters!==null}function zr(){return typeof window<"u"?window:process}function Vr(e){return typeof window==typeof e}function qe(e,t){let r=zr(),s;return Vr(r)?s=r:s=r.env,e in s?s[e]:t}var er={PRODUCTION:"production",PREVIEW:"preview",STAGING:"staging",SANDBOX:"sandbox",INTEGRATION:"integration",TEST:"test"},I={[S]:S,[p]:p,[T]:T,[P]:P,[v]:v,[L]:L,[M]:M},Kr={[S]:Ne,[p]:Ae,[T]:Me,[P]:Ce,[v]:Le,[L]:we,[M]:ke};function je(e){let t=qe("GLOBUS_SDK_OPTIONS",{});return typeof t=="string"&&(t=JSON.parse(t)),{...t,...e,fetch:{...t?.fetch,...e?.fetch,options:{...t?.fetch?.options,...e?.fetch?.options,headers:{...t?.fetch?.options?.headers,...e?.fetch?.options?.headers}}}}}function z(){let e=je(),t=qe("GLOBUS_SDK_ENVIRONMENT",e?.environment??er.PRODUCTION);if(e?.environment&&t!==e.environment&&_("debug","GLOBUS_SDK_ENVIRONMENT and GLOBUS_SDK_OPTIONS.environment are set to different values. GLOBUS_SDK_ENVIRONMENT will take precedence"),!t||!Object.values(er).includes(t))throw new X("GLOBUS_SDK_ENVIRONMENT",t);return t}function Wr(e,t=z()){return Kr[e][t]}function tr(e,t=z()){let r=Wr(e,t);return qe(`GLOBUS_SDK_SERVICE_URL_${e}`,r?`https://${r}`:void 0)}function Yr(e){let t=new URLSearchParams;return Array.from(Object.entries(e)).forEach(([r,s])=>{Array.isArray(s)?t.set(r,s.join(",")):s!==void 0&&t.set(r,String(s))}),t.toString()}function Qr(e,t="",r=z()){let s=tr(e,r);return new URL(t,s)}function ee(e,t,r,s){let a;return typeof e=="object"?a=new URL(t,e.host):a=Qr(e,t,s?.environment),r&&r.search&&(a.search=Yr(r.search)),a.toString()}var He={};u(He,{consents:()=>Ue,get:()=>Zr,getAll:()=>eo});var sr=Nr(or());async function o(e,t,r){let s=je(r),a=s?.fetch?.options||{},l={...be(),...t?.headers,...a.headers},b=s?.manager,E;if(e.resource_server&&b&&(E=b.tokens.getByResourceServer(e.resource_server),E&&(l.Authorization=`Bearer ${E.access_token}`)),e.scope&&b&&(typeof e.service=="string"||"endpoint_id"in e.service)){let j=typeof e.service=="string"?Q[e.service]:e.service.endpoint_id;E=b.tokens.getByResourceServer(j),E&&(l.Authorization=`Bearer ${E.access_token}`)}let O=t?.body;!O&&t?.payload&&(O=JSON.stringify(t.payload)),!l?.["Content-Type"]&&O&&(l["Content-Type"]="application/json");let q=ee(e.service,e.path,{search:t?.query},s),C={method:e.method,body:O,...a,headers:l},f=sr.default;if(a?.__callable&&(f=a.__callable.bind(this),delete C.__callable),e.preventRetry||!b||!E||!te(E))return f(q,C);let w=await f(q,C);if(w.ok)return w;let $;try{$=Z(await w.clone().json())}catch{$=!1}if(w.status===401&&!$){let j=await b.refreshToken(E);return j?f(q,{...C,headers:{...C.headers,Authorization:`Bearer ${j.access_token}`}}):w}return w}var Ue={};u(Ue,{getAll:()=>Xr});var Xr=function(e,t={},r){return o({service:S,scope:B.VIEW_IDENTITIES,path:`/identities/${e}/consents`},t,r)};var Zr=function(e,t={},r){return o({service:S,scope:B.VIEW_IDENTITIES,path:`/identities/${e}`},t,r)},eo=function(e={},t){return o({service:S,scope:B.VIEW_IDENTITIES,path:"/identities"},e,t)};var F={};u(F,{token:()=>Je,userinfo:()=>ao});var Je={};u(Je,{exchange:()=>ro,introspect:()=>oo,refresh:()=>no,revoke:()=>so,token:()=>nr,validate:()=>io});function to(e){return new URLSearchParams(e)}function re(e){return{...e,body:e.payload?to(e.payload):void 0,headers:{...e?.headers||{},Accept:"application/json","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}}var nr=function(e={},t){return o({service:S,scope:void 0,path:"/v2/oauth2/token",method:"POST",preventRetry:!0},re(e),t)},ro=nr,oo=function(e,t){if(!e?.payload)throw new Error("'payload' is required for introspect");return o({service:S,scope:void 0,path:"/v2/oauth2/token/introspect",method:"POST",preventRetry:!0},re(e),t)},so=function(e,t){if(!e?.payload)throw new Error("'payload' is required for revoke");return o({service:S,scope:void 0,path:"/v2/oauth2/token/revoke",method:"POST",preventRetry:!0},re(e),t)},no=function(e,t){if(!e?.payload)throw new Error("'payload' is required for revoke");return o({service:S,scope:void 0,path:"/v2/oauth2/token",method:"POST",preventRetry:!0},re(e),t)},io=function(e,t){if(!e?.payload)throw new Error("'payload' is required for validate");return o({service:S,scope:void 0,path:"/v2/oauth2/token/validate",method:"POST",preventRetry:!0},re(e),t)};var ao=function(e,t){return o({service:S,scope:void 0,path:"/v2/oauth2/userinfo",method:"GET"},e,t)};var $e=ge;function Be(){return ee(S,"/v2/oauth2/authorize")}function po(){return ee(S,"/v2/oauth2/token")}function K(e){return typeof e=="object"&&e!==null&&"access_token"in e}function te(e){return K(e)&&e!==null&&"refresh_token"in e}function ve(e){return K(e)&&e!==null&&"resource_server"in e}var oe=class{constructor(t){this.name=t}#e=[];addListener(t){return this.#e.push(t),()=>this.removeListener(t)}removeListener(t){this.#e=this.#e.filter(r=>r!==t)}clearListeners(){this.#e=[]}async dispatch(t){await Promise.all(this.#e.map(r=>r(t)))}};function ar(){return"crypto"in globalThis}function Ke(){return"webcrypto"in globalThis.crypto?globalThis.crypto.webcrypto:globalThis.crypto}var co=e=>btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");async function uo(e){let t=await Ke().subtle.digest("SHA-256",new TextEncoder().encode(e));return String.fromCharCode(...new Uint8Array(t))}var Ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",ir=`${Ve}-._~`;function pr(){return Array.from(Ke().getRandomValues(new Uint8Array(43))).map(e=>ir[e%ir.length]).join("")}async function cr(e){let t=await uo(e);return co(t)}function ur(){return Array.from(Ke().getRandomValues(new Uint8Array(16))).map(e=>Ve[e%Ve.length]).join("")}var W={PKCE_STATE:"pkce_state",PKCE_CODE_VERIFIER:"pkce_code_verifier"};function lo(){sessionStorage.removeItem(W.PKCE_STATE),sessionStorage.removeItem(W.PKCE_CODE_VERIFIER)}var _e=class e{#e;constructor(t){if(this.#e=t,e.supported===!1)throw new Error("RedirectTransport is not supported in this environment.")}static supported=ar();async send(){let t=pr(),r=await cr(t),s=this.#e.params?.state??ur();sessionStorage.setItem(W.PKCE_CODE_VERIFIER,t),sessionStorage.setItem(W.PKCE_STATE,s);let a={response_type:"code",client_id:this.#e.client,scope:this.#e.scopes||"",redirect_uri:this.#e.redirect,state:s,code_challenge:r,code_challenge_method:"S256",...this.#e.params||{}},l=new URL(Be());l.search=new URLSearchParams(a).toString(),window.location.assign(l.toString())}async getToken(t={shouldReplace:!0}){let r=new URL(window.location.href),s=new URLSearchParams(r.search);if(s.get("error"))throw new Error(s.get("error_description")||"An error occurred during the authorization process.");let a=s.get("code");if(!a)return;let l=sessionStorage.getItem(W.PKCE_STATE),b=sessionStorage.getItem(W.PKCE_CODE_VERIFIER);if(lo(),s.get("state")!==l)throw new Error('Invalid State. The received "state" parameter does not match the expected state.');if(!b)throw new Error("Invalid Code Verifier");let E={code:a,client_id:this.#e.client,code_verifier:b,redirect_uri:this.#e.redirect,grant_type:"authorization_code"},O=await(await F.token.exchange({payload:E})).json();return t.shouldReplace&&(s.delete("code"),s.delete("state"),r.search=s.toString(),window.location.replace(r)),O}};var Te=class{#e;constructor(t){this.#e=t.manager}#r(t){let r=this.#e.storage.getItem(t)||"null",s=null;try{let a=JSON.parse(r);K(a)&&(s=a)}catch{}return s}#t(t){let r=$e.RESOURCE_SERVERS?.[t];return this.getByResourceServer(r)}getByResourceServer(t){return this.#r(`${this.#e.storageKeyPrefix}${t}`)}get auth(){return this.#t(I.AUTH)}get transfer(){return this.#t(I.TRANSFER)}get flows(){return this.#t(I.FLOWS)}get groups(){return this.#t(I.GROUPS)}get search(){return this.#t(I.SEARCH)}get timer(){return this.#t(I.TIMER)}get compute(){return this.#t(I.COMPUTE)}gcs(t){return this.getByResourceServer(t)}getAll(){return Object.keys(this.#e.storage).reduce((r,s)=>(s.startsWith(this.#e.storageKeyPrefix)&&r.push(this.#r(s)),r),[]).filter(K)}add(t){let r=Date.now(),s=r+t.expires_in*1e3;this.#e.storage.setItem(`${this.#e.storageKeyPrefix}${t.resource_server}`,JSON.stringify({...t,__metadata:{created:r,expires:s}})),"other_tokens"in t&&t.other_tokens?.forEach(a=>{this.add(a)})}static isTokenExpired(t,r=0){if(!(!t||!t.__metadata||typeof t.__metadata.expires!="number"))return Date.now()+r>=t.__metadata.expires}};var se=class{#e={};getItem(t){return this.#e[t]!==void 0?this.#e[t]:null}setItem(t,r){this.#e[t]=r}removeItem(t){delete this.#e[t]}key(t){return Object.keys(this.#e)[t]}clear(){this.#e={}}get length(){return Object.keys(this.#e).length}};var mo={redirect:_e},dr={useRefreshTokens:!1,defaultScopes:"openid profile email",transport:"redirect"},lr={execute:!0,additionalParams:void 0},ne=class{#e;configuration;storage;#r=!1;get authenticated(){return this.#r}set authenticated(t){t!==this.#r&&(this.#r=t,this.#n())}tokens;events={authenticated:new oe("authenticated"),revoke:new oe("revoke")};constructor(t){if(!t.client)throw new Error("You must provide a `client` for your application.");let r=t.defaultScopes===!1?"":t.defaultScopes??dr.defaultScopes;this.configuration={...dr,...t,scopes:[t.scopes?t.scopes:"",r].filter(s=>s.length).join(" ")},this.storage=t.storage||new se,this.configuration.events&&Object.entries(this.configuration.events).forEach(([s,a])=>{s in this.events&&this.events[s].addListener(a)}),this.tokens=new Te({manager:this}),this.#t()}get storageKeyPrefix(){return`${this.configuration.client}:`}get user(){let t=this.getGlobusAuthToken();return t&&t.id_token?Xt(t.id_token):null}async refreshTokens(){_("debug","AuthorizationManager.refreshTokens");let t=await Promise.allSettled(this.tokens.getAll().map(r=>te(r)?this.refreshToken(r):Promise.resolve(null)));return this.#t(),t}async refreshToken(t){_("debug",`AuthorizationManager.refreshToken | resource_server=${t.resource_server}`);try{let r=await(await F.token.refresh({payload:{client_id:this.configuration.client,refresh_token:t.refresh_token,grant_type:"refresh_token"}})).json();if(ve(r))return this.addTokenResponse(r),r}catch{_("error",`AuthorizationManager.refreshToken | resource_server=${t.resource_server}`)}return null}hasGlobusAuthToken(){return this.getGlobusAuthToken()!==null}getGlobusAuthToken(){let t=this.storage.getItem(`${this.storageKeyPrefix}${Q.AUTH}`);return t?JSON.parse(t):null}#t(){_("debug","AuthorizationManager.#checkAuthorizationState"),this.hasGlobusAuthToken()&&(this.authenticated=!0)}async#n(){let t=this.authenticated,r=this.getGlobusAuthToken()??void 0;await this.events.authenticated.dispatch({isAuthenticated:t,token:r})}reset(){Object.keys(this.storage).forEach(t=>{t.startsWith(this.storageKeyPrefix)&&this.storage.removeItem(t)}),this.authenticated=!1}#s(t){return`${t}${this.configuration.useRefreshTokens?" offline_access":""}`}#o(t){let{scopes:r,...s}=t??{},a=mo[this.configuration.transport||"redirect"],l=this.#s(r??(this.configuration.scopes||""));return this.storage instanceof se&&(l=[...new Set(l.split(" ").concat((this.configuration?.scopes||"").split(" ")))].join(" ")),new a({client:this.configuration.client,redirect:this.configuration.redirect,scopes:l,...s,params:{...s?.params}})}async login(t={additionalParams:{}}){_("debug","AuthorizationManager.login"),this.reset(),await this.#o({params:t?.additionalParams}).send()}async prompt(t){_("debug","AuthorizationManager.prompt"),await this.#o(t).send()}async handleCodeRedirect(t={shouldReplace:!0,additionalParams:{}}){_("debug","AuthorizationManager.handleCodeRedirect");let r=await this.#o({params:t?.additionalParams}).getToken({shouldReplace:t?.shouldReplace});return ve(r)&&(_("debug",`AuthorizationManager.handleCodeRedirect | response=${JSON.stringify(r)}`),this.addTokenResponse(r)),r}async handleErrorResponse(t,r){let s=typeof r=="boolean"?{...lr,execute:r}:{...lr,...r};_("debug",`AuthorizationManager.handleErrorResponse | response=${JSON.stringify(t)} execute=${s.execute}`);let a=async()=>{};return Z(t)&&(_("debug","AuthorizationManager.handleErrorResponse | error=AuthorizationRequirementsError"),a=async()=>{await this.handleAuthorizationRequirementsError(t,{additionalParams:s.additionalParams})}),Ie(t)&&(_("debug","AuthorizationManager.handleErrorResponse | error=ConsentRequiredError"),a=async()=>{await this.handleConsentRequiredError(t,{additionalParams:s.additionalParams})}),"code"in t&&t.code==="AuthenticationFailed"&&(_("debug","AuthorizationManager.handleErrorResponse | error=AuthenticationFailed"),a=async()=>{await this.revoke()}),s.execute===!0?await a():a}async handleAuthorizationRequirementsError(t,r){this.#e=this.#o({params:{prompt:"login",...Ge(t),...r?.additionalParams}}),await this.#e.send()}async handleConsentRequiredError(t,r){this.#e=this.#o({scopes:this.#s(t.required_scopes.join(" ")),params:{...r?.additionalParams}}),await this.#e.send()}addTokenResponse=t=>{this.tokens.add(t),this.#t()};async revoke(){_("debug","AuthorizationManager.revoke");let t=Promise.all(this.tokens.getAll().map(this.#i.bind(this)));this.reset(),await t,await this.events.revoke.dispatch()}#i(t){return _("debug",`AuthorizationManager.revokeToken | resource_server=${t.resource_server}`),F.token.revoke({payload:{client_id:this.configuration.client,token:t.access_token}})}};function ho(e){return new ne(e)}var dt={};u(dt,{CONFIG:()=>fs,access:()=>et,collectionBookmarks:()=>tt,endpoint:()=>Xe,endpointManager:()=>nt,endpointSearch:()=>mr,fileOperations:()=>Ye,task:()=>Ze,taskSubmission:()=>Qe,utils:()=>ut});var mr=function(e,t){let r={...e,query:e?.query};return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_search"},r,t)};var Ye={};u(Ye,{ls:()=>fo,mkdir:()=>go,rename:()=>yo,stat:()=>vo,symlink:()=>So});function J(e){return e==="GET"?{}:{"Content-Type":"application/json"}}var fo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/ls`},t,r)},go=function(e,t,r){let s={payload:{DATA_TYPE:"mkdir",...t?.payload},headers:{...J("POST"),...t?.headers}};return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/mkdir`,method:"POST"},s,r)},yo=function(e,t,r){let s={payload:{DATA_TYPE:"rename",...t?.payload},headers:{...J("POST"),...t?.headers}};return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/rename`,method:"POST"},s,r)},So=function(e,t,r){let s={payload:{DATA_TYPE:"symlink",...t?.payload},headers:{...J("POST"),...t?.headers}};return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/symlink`,method:"POST"},s,r)},vo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/stat`},t,r)};var Qe={};u(Qe,{submissionId:()=>Ro,submitDelete:()=>_o,submitTransfer:()=>To});var _o=function(e,t){let r={payload:{DATA_TYPE:"delete",...e?.payload},headers:{...J("POST"),...e?.headers}};return o({service:p,scope:c.ALL,path:"/v0.10/delete",method:"POST"},r,t)},To=function(e,t){let r={payload:{DATA_TYPE:"transfer",...e?.payload},headers:{...J("POST"),...e?.headers}};return o({service:p,scope:c.ALL,path:"/v0.10/transfer",method:"POST"},r,t)},Ro=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/submission_id"},e,t)};var Xe={};u(Xe,{create:()=>Oo,get:()=>Eo,remove:()=>Po,update:()=>bo});var Eo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`},t,r)},Oo=function(e,t){return e?.payload&&Object.assign(e.payload,{DATA_TYPE:"shared_endpoint"}),o({service:p,scope:c.ALL,path:"/v0.10/shared_endpoint",method:"POST"},e,t)},bo=function(e,t,r){return t?.payload&&Object.assign(t.payload,{DATA_TYPE:"endpoint"}),o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`,method:"PUT"},t,r)},Po=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`,method:"DELETE"},t,r)};var Ze={};u(Ze,{cancel:()=>Mo,get:()=>Do,getAll:()=>xo,getEventList:()=>Co,getPauseInfo:()=>No,getSkippedErrors:()=>ko,getSuccessfulTransfers:()=>Lo,remove:()=>wo,update:()=>Ao});var xo=function(e={},t){return o({service:p,scope:c.ALL,path:"/v0.10/task_list"},e,t)},Do=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}`},t,r)},Ao=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}`,method:"PUT"},t,r)},Mo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/cancel`,method:"POST"},t,r)},wo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/remove`,method:"POST"},t,r)},Co=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/event_list`},t,r)},Lo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/successful_transfers`},t,r)},ko=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/skipped_errors`},t,r)},No=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/pause_info`},t,r)};var et={};u(et,{create:()=>Go,get:()=>Fo,getAll:()=>Io,remove:()=>jo,update:()=>qo});var Io=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access_list`},t,r)},Go=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access`,method:"POST"},t,r)},Fo=function({endpoint_xid:e,id:t},r,s){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`},r,s)},qo=function({endpoint_xid:e,id:t},r,s){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`,method:"PUT"},r,s)},jo=function({endpoint_xid:e,id:t},r,s){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`,method:"DELETE"},r,s)};var tt={};u(tt,{create:()=>Ho,get:()=>Jo,getAll:()=>Uo,remove:()=>Bo,update:()=>$o});var Uo=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/bookmark_list"},e,t)},Ho=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/bookmark",method:"POST"},e,t)},Jo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`},t,r)},$o=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`,method:"PUT"},t,r)},Bo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`,method:"DELETE"},t,r)};var nt={};u(nt,{endpoint:()=>rt,pauseRule:()=>ot,task:()=>st});var rt={};u(rt,{get:()=>zo,getAccessList:()=>Ko,getHostedEndpoints:()=>Vo,getMonitoredEndpoints:()=>Wo});var zo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}`},t,r)},Vo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}/hosted_endpoint_list`},t,r)},Ko=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}/access_list`},t,r)},Wo=function(e={},t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/monitored_endpoints"},e,t)};var ot={};u(ot,{create:()=>Qo,get:()=>Xo,getAll:()=>Yo,remove:()=>es,update:()=>Zo});var Yo=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/pause_rule_list"},e,t)},Qo=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/pause_rule",method:"POST"},e,t)},Xo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`},t,r)},Zo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`,method:"PUT"},t,r)},es=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`,method:"DELETE"},t,r)};var st={};u(st,{cancel:()=>os,get:()=>rs,getAdminCancel:()=>ss,getAll:()=>ts,getEventList:()=>ns,getPauseInfo:()=>us,getSkippedErrors:()=>as,getSuccessfulTransfers:()=>is,pause:()=>ps,resume:()=>cs});var ts=function(e={},t){return o({service:p,scope:c.ALL,path:"/v0.10/task_list"},e,t)},rs=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}`},t,r)},os=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_cancel",method:"POST"},e,t)},ss=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/admin_cancel/${e}`,method:"POST"},t,r)},ns=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/event_list`},t,r)},is=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/successful_transfers`},t,r)},as=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/skipped_errors`},t,r)},ps=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_pause",method:"POST"},e,t)},cs=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_resume",method:"POST"},e,t)},us=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/pause_info`},t,r)};var ut={};u(ut,{getDomainFromEndpoint:()=>hs,isDirectory:()=>ds,isFileDocument:()=>fr,readableBytes:()=>ls});function fr(e){return typeof e=="object"&&e!==null&&"DATA_TYPE"in e&&e.DATA_TYPE==="file"}function ds(e){return fr(e)&&e.type==="dir"}var it=1e3,at=it*1e3,pt=at*1e3,ct=pt*1e3,hr=ct*1e3;function ls(e,t=2){let r="B",s=1;if(e<it)return`${e} ${r}`;e<at?(r="KB",s=it):e<pt?(r="MB",s=at):e<ct?(r="GB",s=pt):e<hr?(r="TB",s=ct):(r="PB",s=hr);let a=e/s,[l,b]=`${a}`.split("."),E=`${l}`;if(b&&b.length){let O=b.slice(0,t);O.length&&(E=`${l}.${O}`)}return`${E} ${r}`}var ms=["dnsteam.globuscs.info","data.globus.org","dn.glob.us"];function hs(e){let{tlsftp_server:t}=e;if(!t||typeof t!="string")return null;let{hostname:r}=new URL(t.replace("tlsftp","https"));return!ms.find(l=>r.endsWith(l))&&/(?:[gm]-\w{6}.)?(\w+(\.\w+)+)$/.exec(r)?.[1]||r||null}var fs=ue;var gt={};u(gt,{CONFIG:()=>Ps,entry:()=>ht,index:()=>ft,query:()=>lt,subject:()=>mt});var lt={};u(lt,{get:()=>gs,post:()=>ys});var gs=function(e,t,r){return o({service:v,scope:x.SEARCH,path:`/v1/index/${e}/search`},t,r)},ys=function(e,t,r){return o({service:v,scope:x.SEARCH,path:`/v1/index/${e}/search`,method:"POST"},t,r)};var mt={};u(mt,{get:()=>Ss});var Ss=function(e,t,r){return o({service:v,scope:x.SEARCH,path:`/v1/index/${e}/subject`},t,r)};var ht={};u(ht,{get:()=>vs});var vs=function(e,t,r){return o({service:v,scope:x.SEARCH,path:`/v1/index/${e}/entry`},t,r)};var ft={};u(ft,{create:()=>Rs,get:()=>_s,getAll:()=>Ts,ingest:()=>bs,remove:()=>Es,reopen:()=>Os});var _s=function(e,t,r){return o({service:v,path:`/v1/index/${e}`},t,r)},Ts=function(e,t){return o({service:v,scope:x.ALL,path:"/v1/index_list"},e,t)},Rs=function(e,t){return o({service:v,scope:x.ALL,path:"/v1/index",method:"POST"},e,t)},Es=function(e,t,r){return o({service:v,scope:x.ALL,path:`/v1/index/${e}`,method:"DELETE"},t,r)},Os=function(e,t,r){return o({service:v,scope:x.ALL,path:`/v1/index/${e}/reopen`,method:"POST"},t,r)},bs=function(e,t,r){return o({service:v,scope:x.ALL,path:`/v1/index/${e}/ingest`,method:"POST"},t,r)};var Ps=he;var _t={};u(_t,{CONFIG:()=>ws,groups:()=>yt,membership:()=>vt,policies:()=>St});var yt={};u(yt,{get:()=>Ds,getMyGroups:()=>xs});var xs=function(e,t){return o({scope:N.ALL,path:"/v2/groups/my_groups",service:P},e,t)},Ds=function(e,t,r){return o({service:P,scope:N.ALL,path:`/v2/groups/${e}`},t,r)};var St={};u(St,{get:()=>As});var As=function(e,t,r){return o({scope:N.ALL,path:`/v2/groups/${e}/policies`,service:P},t,r)};var vt={};u(vt,{act:()=>Ms});var Ms=function(e,t,r){if(!t?.payload)throw new Error("payload is required.");return o({service:P,scope:N.ALL,path:`/v2/groups/${e}`,method:"POST"},t,r)};var ws=me;var Et={};u(Et,{CONFIG:()=>Us,flows:()=>Tt,runs:()=>Rt});var Tt={};u(Tt,{create:()=>gr,deploy:()=>Gs,get:()=>Ls,getAll:()=>Cs,remove:()=>ks,run:()=>Ns,validate:()=>Is});var Cs=function(e,t){return o({service:T,scope:D.VIEW_FLOWS,path:"/flows"},e,t)},Ls=function(e,t,r){return o({service:T,scope:D.VIEW_FLOWS,path:`/flows/${e}`},t,r)},ks=function(e,t,r){return o({scope:D.MANAGE_FLOWS,service:T,path:`/flows/${e}`,method:"DELETE"},t,r)},Ns=function(e,t,r){return o({service:T,scope:D.VIEW_FLOWS,path:`/flows/${e}/run`,method:"POST"},t,r)},Is=function(e,t){return o({service:T,scope:D.MANAGE_FLOWS,path:"/flows/validate",method:"POST"},e,t)},gr=function(e,t){return o({service:T,scope:D.MANAGE_FLOWS,path:"/flows",method:"POST"},e,t)},Gs=gr;var Rt={};u(Rt,{cancel:()=>qs,getAll:()=>Fs,getLog:()=>js});var Fs=function(e={},t){return o({service:T,scope:D.RUN_MANAGE,path:"/runs"},e,t)},qs=function(e,t,r){return o({service:T,scope:D.RUN_MANAGE,path:`/runs/${e}/cancel`,method:"POST"},t,r)},js=function(e,t,r){return o({service:T,scope:D.RUN_MANAGE,path:`/runs/${e}/log`},t,r)};var Us=de;var kt={};u(kt,{collections:()=>Ot,endpoint:()=>bt,getScopes:()=>Mn,https:()=>Pt,nodes:()=>xt,roles:()=>Dt,storageGateways:()=>At,userCredentials:()=>Mt,utils:()=>Lt,versioning:()=>Ct});var Ot={};u(Ot,{create:()=>Bs,get:()=>Js,getAll:()=>Hs,patch:()=>Vs,remove:()=>$s,resetOwnerString:()=>Ws,update:()=>zs,updateOwnerString:()=>Ks});var Hs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/collections"},t,r)},Js=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`},r,s)},$s=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"DELETE"},r,s)},Bs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/collections",method:"POST"},t,r)},zs=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"PUT"},r,s)},Vs=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"PATCH"},r,s)},Ks=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}/owner_string`,method:"PUT"},r,s)},Ws=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}/owner_string`,method:"DELETE"},r,s)};var bt={};u(bt,{get:()=>Ys,patch:()=>Xs,resetOwnerString:()=>rn,update:()=>Qs,updateOwner:()=>en,updateOwnerString:()=>tn,updateSubscriptionId:()=>Zs});var Ys=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint"},t,r)},Qs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint",method:"PUT"},t,r)},Xs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint",method:"PATCH"},t,r)},Zs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/subscription_id",method:"PUT"},t,r)},en=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner",method:"PUT"},t,r)},tn=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner_string",method:"PUT"},t,r)},rn=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner_string",method:"DELETE"},t,r)};var Pt={};u(Pt,{get:()=>on,remove:()=>sn,update:()=>nn});var on=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:t},r,s)},sn=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:t,method:"DELETE"},r,s)},nn=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:t,method:"PUT"},r,s)};var xt={};u(xt,{create:()=>un,get:()=>pn,getAll:()=>an,patch:()=>ln,remove:()=>cn,update:()=>dn});var an=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/nodes"},t,r)},pn=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`},r,s)},cn=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"DELETE"},r,s)},un=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/nodes",method:"POST"},t,r)},dn=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"PUT"},r,s)},ln=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"PATCH"},r,s)};var Dt={};u(Dt,{create:()=>gn,get:()=>hn,getAll:()=>mn,remove:()=>fn});var mn=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/roles"},t,r)},hn=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/roles/${t}`},r,s)},fn=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/roles/${t}`,method:"DELETE"},r,s)},gn=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/roles",method:"POST"},t,r)};var At={};u(At,{create:()=>_n,get:()=>Sn,getAll:()=>yn,patch:()=>Rn,remove:()=>vn,update:()=>Tn});var yn=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/storage_gateways"},t,r)},Sn=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`},r,s)},vn=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"DELETE"},r,s)},_n=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/storage_gateways",method:"POST"},t,r)},Tn=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"PUT"},r,s)},Rn=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"PATCH"},r,s)};var Mt={};u(Mt,{create:()=>Pn,get:()=>On,getAll:()=>En,patch:()=>Dn,remove:()=>bn,update:()=>xn});var En=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/user_credentials"},t,r)},On=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`},r,s)},bn=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"DELETE"},r,s)},Pn=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/user_credentials",method:"POST"},t,r)},xn=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"PUT"},r,s)},Dn=function(e,t,r,s){return o({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"PATCH"},r,s)};var Ct={};u(Ct,{info:()=>wt});var wt=function(e,t,r){return o({service:e,path:"/api/info"},t,r)};var Lt={};u(Lt,{getEndpointIdFromURL:()=>An,getGCSDomainFromURL:()=>yr});var ie="data.globus.org";function yr(e){let{host:t}=typeof e=="string"?new URL(e):e;if(!t.endsWith(ie))return t;let[r]=t.split(`.${ie}`),s=r.split(".");return(s.length===2?[...s,ie]:[s[1],s[2],ie]).join(".")}async function An(e){let t=typeof e=="string"?new URL(e):e;if(!t.host.endsWith(ie))return null;let a=(await(await wt({host:`https://${yr(t)}`})).json()).data?.filter(l=>l.DATA_TYPE.startsWith("info#"))[0];return a&&"endpoint_id"in a?a.endpoint_id:null}var Sr={HIGH_ASSURANCE:"urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections",NON_HIGH_ASSURANCE:"urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections[*https://auth.globus.org/scopes/<MAPPED_COLLECTION_ID>/data_access]"};function Mn(e,t){let{endpoint_id:r}=e;if(!r)throw new Error("An 'endpoint_id' is required to determine the required scopes");return t?Sr[t].replace("<ENDPOINT_ID>",r):Object.entries(Sr).reduce((s,[a,l])=>({...s,[a]:l.replace("<ENDPOINT_ID>",r)}),{})}var Nt={};u(Nt,{CONFIG:()=>wn,create:()=>vr});var vr=function(e,t){return o({service:L,scope:"https://auth.globus.org/scopes/524230d7-ea86-4a52-8312-86065a9e0417/timer",path:"/v2/timer",method:"POST"},e,t)};var wn=le;var Gt={};u(Gt,{CONFIG:()=>Nn,endpoints:()=>It});var It={};u(It,{get:()=>Ln,getAll:()=>Cn,getStatus:()=>kn});var Cn=function(e,t){return o({service:M,scope:Y.ALL,path:"/v2/endpoints",method:"GET"},e,t)},Ln=function(e,t,r){return o({service:M,scope:Y.ALL,path:`/v2/endpoints/${e}`,method:"GET"},t,r)},kn=function(e,t,r){return o({service:M,scope:Y.ALL,path:`/v2/endpoints/${e}/status`},t,r)};var Nn=fe;var Ft={};u(Ft,{HOSTS:()=>_r,host:()=>Tr,url:()=>Rr,urlFor:()=>Gn});var _r={integration:"app.integration.globuscs.info",sandbox:"app.sandbox.globuscs.info",test:"app.test.globuscs.info",staging:"app.staging.globuscs.info",preview:"app.preview.globus.org",production:"app.globus.org"};function Tr(e=z()){return _r[e]}function Rr(e,t){return new URL(e||"",`https://${Tr(t?.environment)}`)}var In={TASK:"/activity/%s/overview",COLLECTION:"/file-manager/collections/%s/overview",ENDPOINT:"/file-manager/collections/%s/overview"};function Gn(e,t,r){let s=In[e].replace(/%s/g,t?.join("/")||"");return Rr(s,r)}return Ir(Fn);})(); | ||
//# sourceMappingURL=globus.production.js.map |
{ | ||
"name": "@globus/sdk", | ||
"version": "5.1.2", | ||
"version": "5.2.0", | ||
"description": "The Globus SDK for JavaScript", | ||
@@ -100,3 +100,3 @@ "main": "dist/cjs/index.js", | ||
"dotenv": "^16.4.5", | ||
"esbuild": "0.24.0", | ||
"esbuild": "0.24.2", | ||
"eslint": "^8.57.0", | ||
@@ -103,0 +103,0 @@ "eslint-config-airbnb-base": "^15.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1508684
320
14604