@globus/sdk 5.1.2 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/core/authorization/index.js +5 -2
- package/dist/cjs/core/authorization/index.js.map +2 -2
- package/dist/cjs/core/info/index.js +1 -1
- package/dist/cjs/core/info/index.js.map +1 -1
- package/dist/cjs/index.js +144 -81
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/services/globus-connect-server/client.js +191 -198
- package/dist/cjs/services/globus-connect-server/client.js.map +4 -4
- package/dist/esm/core/info/version.d.ts +1 -1
- package/dist/esm/core/info/version.js +1 -1
- package/dist/esm/core/url.d.ts +2 -2
- package/dist/esm/core/url.d.ts.map +1 -1
- package/dist/esm/core/url.js.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/services/auth/config.d.ts.map +1 -1
- package/dist/esm/services/auth/index.d.ts +1 -1
- package/dist/esm/services/auth/index.d.ts.map +1 -1
- package/dist/esm/services/auth/index.js +1 -1
- package/dist/esm/services/auth/index.js.map +1 -1
- package/dist/esm/services/auth/service/identities/consents.d.ts +26 -0
- package/dist/esm/services/auth/service/identities/consents.d.ts.map +1 -0
- package/dist/esm/services/auth/service/identities/consents.js +10 -0
- package/dist/esm/services/auth/service/identities/consents.js.map +1 -0
- package/dist/esm/services/auth/service/{identities.d.ts → identities/index.d.ts} +6 -5
- package/dist/esm/services/auth/service/identities/index.d.ts.map +1 -0
- package/dist/esm/services/auth/service/{identities.js → identities/index.js} +4 -3
- package/dist/esm/services/auth/service/identities/index.js.map +1 -0
- package/dist/esm/services/compute/config.d.ts.map +1 -1
- package/dist/esm/services/flows/config.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/client.d.ts +1 -7
- package/dist/esm/services/globus-connect-server/client.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/index.d.ts +17 -4
- package/dist/esm/services/globus-connect-server/index.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/index.js +16 -2
- package/dist/esm/services/globus-connect-server/index.js.map +1 -1
- package/dist/esm/services/globus-connect-server/service/collections.d.ts +8 -8
- package/dist/esm/services/globus-connect-server/service/collections.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/service/collections.js +8 -9
- package/dist/esm/services/globus-connect-server/service/collections.js.map +1 -1
- package/dist/esm/services/globus-connect-server/service/endpoint.d.ts +7 -7
- package/dist/esm/services/globus-connect-server/service/endpoint.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/service/endpoint.js +7 -8
- package/dist/esm/services/globus-connect-server/service/endpoint.js.map +1 -1
- package/dist/esm/services/globus-connect-server/service/https.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/service/https.js +3 -4
- package/dist/esm/services/globus-connect-server/service/https.js.map +1 -1
- package/dist/esm/services/globus-connect-server/service/nodes.d.ts +6 -6
- package/dist/esm/services/globus-connect-server/service/nodes.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/service/nodes.js +6 -7
- package/dist/esm/services/globus-connect-server/service/nodes.js.map +1 -1
- package/dist/esm/services/globus-connect-server/service/roles.d.ts +4 -4
- package/dist/esm/services/globus-connect-server/service/roles.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/service/roles.js +4 -5
- package/dist/esm/services/globus-connect-server/service/roles.js.map +1 -1
- package/dist/esm/services/globus-connect-server/service/storage-gateways.d.ts +6 -6
- package/dist/esm/services/globus-connect-server/service/storage-gateways.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/service/storage-gateways.js +6 -7
- package/dist/esm/services/globus-connect-server/service/storage-gateways.js.map +1 -1
- package/dist/esm/services/globus-connect-server/service/user-credentials.d.ts +6 -6
- package/dist/esm/services/globus-connect-server/service/user-credentials.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/service/user-credentials.js +6 -7
- package/dist/esm/services/globus-connect-server/service/user-credentials.js.map +1 -1
- package/dist/esm/services/globus-connect-server/service/versioning.d.ts +2 -2
- package/dist/esm/services/globus-connect-server/service/versioning.d.ts.map +1 -1
- package/dist/esm/services/globus-connect-server/service/versioning.js +1 -3
- package/dist/esm/services/globus-connect-server/service/versioning.js.map +1 -1
- package/dist/esm/services/globus-connect-server/utils.d.ts +11 -0
- package/dist/esm/services/globus-connect-server/utils.d.ts.map +1 -0
- package/dist/esm/services/globus-connect-server/utils.js +60 -0
- package/dist/esm/services/globus-connect-server/utils.js.map +1 -0
- package/dist/esm/services/groups/config.d.ts.map +1 -1
- package/dist/esm/services/search/config.d.ts.map +1 -1
- package/dist/esm/services/shared.d.ts +2 -2
- package/dist/esm/services/shared.d.ts.map +1 -1
- package/dist/esm/services/shared.js +9 -1
- package/dist/esm/services/shared.js.map +1 -1
- package/dist/esm/services/timer/config.d.ts.map +1 -1
- package/dist/esm/services/transfer/config.d.ts.map +1 -1
- package/dist/umd/globus.production.js +2 -2
- package/dist/umd/globus.production.js.map +4 -4
- package/package.json +2 -2
- package/dist/esm/services/auth/service/identities.d.ts.map +0 -1
- package/dist/esm/services/auth/service/identities.js.map +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -27,8 +27,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
29
|
// src/index.ts
|
|
30
|
-
var
|
|
31
|
-
__export(
|
|
30
|
+
var index_exports = {};
|
|
31
|
+
__export(index_exports, {
|
|
32
32
|
auth: () => auth_exports,
|
|
33
33
|
authorization: () => authorization_exports,
|
|
34
34
|
compute: () => compute_exports,
|
|
@@ -43,7 +43,7 @@ __export(src_exports, {
|
|
|
43
43
|
transfer: () => transfer_exports,
|
|
44
44
|
webapp: () => web_exports
|
|
45
45
|
});
|
|
46
|
-
module.exports = __toCommonJS(
|
|
46
|
+
module.exports = __toCommonJS(index_exports);
|
|
47
47
|
|
|
48
48
|
// src/core/info/index.ts
|
|
49
49
|
var info_exports = {};
|
|
@@ -71,7 +71,7 @@ function toString(info2) {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
// src/core/info/version.ts
|
|
74
|
-
var VERSION = "5.
|
|
74
|
+
var VERSION = "5.2.0";
|
|
75
75
|
|
|
76
76
|
// src/core/info/index.ts
|
|
77
77
|
var VERSION2 = VERSION;
|
|
@@ -474,11 +474,12 @@ function build(serviceOrConfiguration, path, options, sdkOptions) {
|
|
|
474
474
|
return url2.toString();
|
|
475
475
|
}
|
|
476
476
|
|
|
477
|
-
// src/services/auth/service/identities.ts
|
|
477
|
+
// src/services/auth/service/identities/index.ts
|
|
478
478
|
var identities_exports = {};
|
|
479
479
|
__export(identities_exports, {
|
|
480
|
+
consents: () => consents_exports,
|
|
480
481
|
get: () => get,
|
|
481
|
-
getAll: () =>
|
|
482
|
+
getAll: () => getAll2
|
|
482
483
|
});
|
|
483
484
|
|
|
484
485
|
// src/services/shared.ts
|
|
@@ -503,7 +504,10 @@ async function serviceRequest(config, options, passedSdkOptions) {
|
|
|
503
504
|
headers["Authorization"] = `Bearer ${token2.access_token}`;
|
|
504
505
|
}
|
|
505
506
|
}
|
|
506
|
-
if (config.scope && manager
|
|
507
|
+
if (config.scope && manager && /**
|
|
508
|
+
* Only attempt to get a token if the `service` property is a string or has an `endpoint_id` property (GCSConfiguration).
|
|
509
|
+
*/
|
|
510
|
+
(typeof config.service === "string" || "endpoint_id" in config.service)) {
|
|
507
511
|
const resourceServer = typeof config.service === "string" ? RESOURCE_SERVERS[config.service] : (
|
|
508
512
|
// For `GCSConfiguration` objects, the `endpoint_id` is the resource server.
|
|
509
513
|
config.service.endpoint_id
|
|
@@ -579,7 +583,24 @@ async function serviceRequest(config, options, passedSdkOptions) {
|
|
|
579
583
|
return initialResponse;
|
|
580
584
|
}
|
|
581
585
|
|
|
582
|
-
// src/services/auth/service/identities.ts
|
|
586
|
+
// src/services/auth/service/identities/consents.ts
|
|
587
|
+
var consents_exports = {};
|
|
588
|
+
__export(consents_exports, {
|
|
589
|
+
getAll: () => getAll
|
|
590
|
+
});
|
|
591
|
+
var getAll = function(identity_id, options = {}, sdkOptions) {
|
|
592
|
+
return serviceRequest(
|
|
593
|
+
{
|
|
594
|
+
service: ID7,
|
|
595
|
+
scope: SCOPES6.VIEW_IDENTITIES,
|
|
596
|
+
path: `/identities/${identity_id}/consents`
|
|
597
|
+
},
|
|
598
|
+
options,
|
|
599
|
+
sdkOptions
|
|
600
|
+
);
|
|
601
|
+
};
|
|
602
|
+
|
|
603
|
+
// src/services/auth/service/identities/index.ts
|
|
583
604
|
var get = function(identity_id, options = {}, sdkOptions) {
|
|
584
605
|
return serviceRequest(
|
|
585
606
|
{
|
|
@@ -591,7 +612,7 @@ var get = function(identity_id, options = {}, sdkOptions) {
|
|
|
591
612
|
sdkOptions
|
|
592
613
|
);
|
|
593
614
|
};
|
|
594
|
-
var
|
|
615
|
+
var getAll2 = function(options = {}, sdkOptions) {
|
|
595
616
|
return serviceRequest(
|
|
596
617
|
{
|
|
597
618
|
service: ID7,
|
|
@@ -1643,7 +1664,7 @@ var task_exports = {};
|
|
|
1643
1664
|
__export(task_exports, {
|
|
1644
1665
|
cancel: () => cancel,
|
|
1645
1666
|
get: () => get3,
|
|
1646
|
-
getAll: () =>
|
|
1667
|
+
getAll: () => getAll3,
|
|
1647
1668
|
getEventList: () => getEventList,
|
|
1648
1669
|
getPauseInfo: () => getPauseInfo,
|
|
1649
1670
|
getSkippedErrors: () => getSkippedErrors,
|
|
@@ -1651,7 +1672,7 @@ __export(task_exports, {
|
|
|
1651
1672
|
remove: () => remove2,
|
|
1652
1673
|
update: () => update2
|
|
1653
1674
|
});
|
|
1654
|
-
var
|
|
1675
|
+
var getAll3 = function(options = {}, sdkOptions) {
|
|
1655
1676
|
return serviceRequest(
|
|
1656
1677
|
{
|
|
1657
1678
|
service: ID,
|
|
@@ -1759,11 +1780,11 @@ var access_exports = {};
|
|
|
1759
1780
|
__export(access_exports, {
|
|
1760
1781
|
create: () => create3,
|
|
1761
1782
|
get: () => get4,
|
|
1762
|
-
getAll: () =>
|
|
1783
|
+
getAll: () => getAll4,
|
|
1763
1784
|
remove: () => remove3,
|
|
1764
1785
|
update: () => update3
|
|
1765
1786
|
});
|
|
1766
|
-
var
|
|
1787
|
+
var getAll4 = function(endpoint_xid, options, sdkOptions) {
|
|
1767
1788
|
return serviceRequest(
|
|
1768
1789
|
{
|
|
1769
1790
|
service: ID,
|
|
@@ -1827,11 +1848,11 @@ var collection_bookmarks_exports = {};
|
|
|
1827
1848
|
__export(collection_bookmarks_exports, {
|
|
1828
1849
|
create: () => create4,
|
|
1829
1850
|
get: () => get5,
|
|
1830
|
-
getAll: () =>
|
|
1851
|
+
getAll: () => getAll5,
|
|
1831
1852
|
remove: () => remove4,
|
|
1832
1853
|
update: () => update4
|
|
1833
1854
|
});
|
|
1834
|
-
var
|
|
1855
|
+
var getAll5 = function(options, sdkOptions) {
|
|
1835
1856
|
return serviceRequest(
|
|
1836
1857
|
{
|
|
1837
1858
|
service: ID,
|
|
@@ -1956,11 +1977,11 @@ var pause_rule_exports = {};
|
|
|
1956
1977
|
__export(pause_rule_exports, {
|
|
1957
1978
|
create: () => create5,
|
|
1958
1979
|
get: () => get7,
|
|
1959
|
-
getAll: () =>
|
|
1980
|
+
getAll: () => getAll6,
|
|
1960
1981
|
remove: () => remove5,
|
|
1961
1982
|
update: () => update5
|
|
1962
1983
|
});
|
|
1963
|
-
var
|
|
1984
|
+
var getAll6 = function(options, sdkOptions) {
|
|
1964
1985
|
return serviceRequest(
|
|
1965
1986
|
{
|
|
1966
1987
|
service: ID,
|
|
@@ -2025,7 +2046,7 @@ __export(task_exports2, {
|
|
|
2025
2046
|
cancel: () => cancel2,
|
|
2026
2047
|
get: () => get8,
|
|
2027
2048
|
getAdminCancel: () => getAdminCancel,
|
|
2028
|
-
getAll: () =>
|
|
2049
|
+
getAll: () => getAll7,
|
|
2029
2050
|
getEventList: () => getEventList2,
|
|
2030
2051
|
getPauseInfo: () => getPauseInfo2,
|
|
2031
2052
|
getSkippedErrors: () => getSkippedErrors2,
|
|
@@ -2033,7 +2054,7 @@ __export(task_exports2, {
|
|
|
2033
2054
|
pause: () => pause,
|
|
2034
2055
|
resume: () => resume
|
|
2035
2056
|
});
|
|
2036
|
-
var
|
|
2057
|
+
var getAll7 = function(options = {}, sdkOptions) {
|
|
2037
2058
|
return serviceRequest(
|
|
2038
2059
|
{
|
|
2039
2060
|
service: ID,
|
|
@@ -2294,7 +2315,7 @@ var search_index_exports = {};
|
|
|
2294
2315
|
__export(search_index_exports, {
|
|
2295
2316
|
create: () => create6,
|
|
2296
2317
|
get: () => get12,
|
|
2297
|
-
getAll: () =>
|
|
2318
|
+
getAll: () => getAll8,
|
|
2298
2319
|
ingest: () => ingest,
|
|
2299
2320
|
remove: () => remove6,
|
|
2300
2321
|
reopen: () => reopen
|
|
@@ -2310,7 +2331,7 @@ var get12 = function(index_id, options, sdkOptions) {
|
|
|
2310
2331
|
sdkOptions
|
|
2311
2332
|
);
|
|
2312
2333
|
};
|
|
2313
|
-
var
|
|
2334
|
+
var getAll8 = function(options, sdkOptions) {
|
|
2314
2335
|
return serviceRequest(
|
|
2315
2336
|
{
|
|
2316
2337
|
service: ID5,
|
|
@@ -2464,12 +2485,12 @@ __export(flows_exports, {
|
|
|
2464
2485
|
create: () => create7,
|
|
2465
2486
|
deploy: () => deploy,
|
|
2466
2487
|
get: () => get15,
|
|
2467
|
-
getAll: () =>
|
|
2488
|
+
getAll: () => getAll9,
|
|
2468
2489
|
remove: () => remove7,
|
|
2469
2490
|
run: () => run,
|
|
2470
2491
|
validate: () => validate2
|
|
2471
2492
|
});
|
|
2472
|
-
var
|
|
2493
|
+
var getAll9 = function(options, sdkOptions) {
|
|
2473
2494
|
return serviceRequest(
|
|
2474
2495
|
{
|
|
2475
2496
|
service: ID2,
|
|
@@ -2545,10 +2566,10 @@ var deploy = create7;
|
|
|
2545
2566
|
var runs_exports = {};
|
|
2546
2567
|
__export(runs_exports, {
|
|
2547
2568
|
cancel: () => cancel3,
|
|
2548
|
-
getAll: () =>
|
|
2569
|
+
getAll: () => getAll10,
|
|
2549
2570
|
getLog: () => getLog
|
|
2550
2571
|
});
|
|
2551
|
-
var
|
|
2572
|
+
var getAll10 = function(options = {}, sdkOptions) {
|
|
2552
2573
|
return serviceRequest(
|
|
2553
2574
|
{
|
|
2554
2575
|
service: ID2,
|
|
@@ -2591,12 +2612,13 @@ var globus_connect_server_exports = {};
|
|
|
2591
2612
|
__export(globus_connect_server_exports, {
|
|
2592
2613
|
collections: () => collections_exports,
|
|
2593
2614
|
endpoint: () => endpoint_exports3,
|
|
2594
|
-
|
|
2615
|
+
getScopes: () => getScopes,
|
|
2595
2616
|
https: () => https_exports,
|
|
2596
2617
|
nodes: () => nodes_exports,
|
|
2597
2618
|
roles: () => roles_exports,
|
|
2598
2619
|
storageGateways: () => storage_gateways_exports,
|
|
2599
2620
|
userCredentials: () => user_credentials_exports,
|
|
2621
|
+
utils: () => utils_exports2,
|
|
2600
2622
|
versioning: () => versioning_exports
|
|
2601
2623
|
});
|
|
2602
2624
|
|
|
@@ -2605,18 +2627,18 @@ var collections_exports = {};
|
|
|
2605
2627
|
__export(collections_exports, {
|
|
2606
2628
|
create: () => create8,
|
|
2607
2629
|
get: () => get16,
|
|
2608
|
-
getAll: () =>
|
|
2630
|
+
getAll: () => getAll11,
|
|
2609
2631
|
patch: () => patch,
|
|
2610
2632
|
remove: () => remove8,
|
|
2611
2633
|
resetOwnerString: () => resetOwnerString,
|
|
2612
2634
|
update: () => update6,
|
|
2613
2635
|
updateOwnerString: () => updateOwnerString
|
|
2614
2636
|
});
|
|
2615
|
-
var
|
|
2637
|
+
var getAll11 = function(configuration, options, sdkOptions) {
|
|
2616
2638
|
return serviceRequest(
|
|
2617
2639
|
{
|
|
2618
2640
|
service: configuration,
|
|
2619
|
-
|
|
2641
|
+
resource_server: configuration.endpoint_id,
|
|
2620
2642
|
path: `/api/collections`
|
|
2621
2643
|
},
|
|
2622
2644
|
options,
|
|
@@ -2627,7 +2649,7 @@ var get16 = function(configuration, collection_id, options, sdkOptions) {
|
|
|
2627
2649
|
return serviceRequest(
|
|
2628
2650
|
{
|
|
2629
2651
|
service: configuration,
|
|
2630
|
-
|
|
2652
|
+
resource_server: configuration.endpoint_id,
|
|
2631
2653
|
path: `/api/collections/${collection_id}`
|
|
2632
2654
|
},
|
|
2633
2655
|
options,
|
|
@@ -2638,7 +2660,7 @@ var remove8 = function(configuration, collection_id, options, sdkOptions) {
|
|
|
2638
2660
|
return serviceRequest(
|
|
2639
2661
|
{
|
|
2640
2662
|
service: configuration,
|
|
2641
|
-
|
|
2663
|
+
resource_server: configuration.endpoint_id,
|
|
2642
2664
|
path: `/api/collections/${collection_id}`,
|
|
2643
2665
|
method: "DELETE" /* DELETE */
|
|
2644
2666
|
},
|
|
@@ -2650,7 +2672,7 @@ var create8 = function(configuration, options, sdkOptions) {
|
|
|
2650
2672
|
return serviceRequest(
|
|
2651
2673
|
{
|
|
2652
2674
|
service: configuration,
|
|
2653
|
-
|
|
2675
|
+
resource_server: configuration.endpoint_id,
|
|
2654
2676
|
path: `/api/collections`,
|
|
2655
2677
|
method: "POST" /* POST */
|
|
2656
2678
|
},
|
|
@@ -2662,7 +2684,7 @@ var update6 = function(configuration, collection_id, options, sdkOptions) {
|
|
|
2662
2684
|
return serviceRequest(
|
|
2663
2685
|
{
|
|
2664
2686
|
service: configuration,
|
|
2665
|
-
|
|
2687
|
+
resource_server: configuration.endpoint_id,
|
|
2666
2688
|
path: `/api/collections/${collection_id}`,
|
|
2667
2689
|
method: "PUT" /* PUT */
|
|
2668
2690
|
},
|
|
@@ -2674,7 +2696,7 @@ var patch = function(configuration, collection_id, options, sdkOptions) {
|
|
|
2674
2696
|
return serviceRequest(
|
|
2675
2697
|
{
|
|
2676
2698
|
service: configuration,
|
|
2677
|
-
|
|
2699
|
+
resource_server: configuration.endpoint_id,
|
|
2678
2700
|
path: `/api/collections/${collection_id}`,
|
|
2679
2701
|
method: "PATCH" /* PATCH */
|
|
2680
2702
|
},
|
|
@@ -2686,7 +2708,7 @@ var updateOwnerString = function(configuration, collection_id, options, sdkOptio
|
|
|
2686
2708
|
return serviceRequest(
|
|
2687
2709
|
{
|
|
2688
2710
|
service: configuration,
|
|
2689
|
-
|
|
2711
|
+
resource_server: configuration.endpoint_id,
|
|
2690
2712
|
path: `/api/collections/${collection_id}/owner_string`,
|
|
2691
2713
|
method: "PUT" /* PUT */
|
|
2692
2714
|
},
|
|
@@ -2698,7 +2720,7 @@ var resetOwnerString = function(configuration, collection_id, options, sdkOption
|
|
|
2698
2720
|
return serviceRequest(
|
|
2699
2721
|
{
|
|
2700
2722
|
service: configuration,
|
|
2701
|
-
|
|
2723
|
+
resource_server: configuration.endpoint_id,
|
|
2702
2724
|
path: `/api/collections/${collection_id}/owner_string`,
|
|
2703
2725
|
method: "DELETE" /* DELETE */
|
|
2704
2726
|
},
|
|
@@ -2722,7 +2744,7 @@ var get17 = function(configuration, options, sdkOptions) {
|
|
|
2722
2744
|
return serviceRequest(
|
|
2723
2745
|
{
|
|
2724
2746
|
service: configuration,
|
|
2725
|
-
|
|
2747
|
+
resource_server: configuration.endpoint_id,
|
|
2726
2748
|
path: `/api/endpoint`
|
|
2727
2749
|
},
|
|
2728
2750
|
options,
|
|
@@ -2733,7 +2755,7 @@ var update7 = function(configuration, options, sdkOptions) {
|
|
|
2733
2755
|
return serviceRequest(
|
|
2734
2756
|
{
|
|
2735
2757
|
service: configuration,
|
|
2736
|
-
|
|
2758
|
+
resource_server: configuration.endpoint_id,
|
|
2737
2759
|
path: `/api/endpoint`,
|
|
2738
2760
|
method: "PUT" /* PUT */
|
|
2739
2761
|
},
|
|
@@ -2745,7 +2767,7 @@ var patch2 = function(configuration, options, sdkOptions) {
|
|
|
2745
2767
|
return serviceRequest(
|
|
2746
2768
|
{
|
|
2747
2769
|
service: configuration,
|
|
2748
|
-
|
|
2770
|
+
resource_server: configuration.endpoint_id,
|
|
2749
2771
|
path: `/api/endpoint`,
|
|
2750
2772
|
method: "PATCH" /* PATCH */
|
|
2751
2773
|
},
|
|
@@ -2757,7 +2779,7 @@ var updateSubscriptionId = function(configuration, options, sdkOptions) {
|
|
|
2757
2779
|
return serviceRequest(
|
|
2758
2780
|
{
|
|
2759
2781
|
service: configuration,
|
|
2760
|
-
|
|
2782
|
+
resource_server: configuration.endpoint_id,
|
|
2761
2783
|
path: `/api/endpoint/subscription_id`,
|
|
2762
2784
|
method: "PUT" /* PUT */
|
|
2763
2785
|
},
|
|
@@ -2769,7 +2791,7 @@ var updateOwner = function(configuration, options, sdkOptions) {
|
|
|
2769
2791
|
return serviceRequest(
|
|
2770
2792
|
{
|
|
2771
2793
|
service: configuration,
|
|
2772
|
-
|
|
2794
|
+
resource_server: configuration.endpoint_id,
|
|
2773
2795
|
path: `/api/endpoint/owner`,
|
|
2774
2796
|
method: "PUT" /* PUT */
|
|
2775
2797
|
},
|
|
@@ -2781,7 +2803,7 @@ var updateOwnerString2 = function(configuration, options, sdkOptions) {
|
|
|
2781
2803
|
return serviceRequest(
|
|
2782
2804
|
{
|
|
2783
2805
|
service: configuration,
|
|
2784
|
-
|
|
2806
|
+
resource_server: configuration.endpoint_id,
|
|
2785
2807
|
path: `/api/endpoint/owner_string`,
|
|
2786
2808
|
method: "PUT" /* PUT */
|
|
2787
2809
|
},
|
|
@@ -2793,7 +2815,7 @@ var resetOwnerString2 = function(configuration, options, sdkOptions) {
|
|
|
2793
2815
|
return serviceRequest(
|
|
2794
2816
|
{
|
|
2795
2817
|
service: configuration,
|
|
2796
|
-
|
|
2818
|
+
resource_server: configuration.endpoint_id,
|
|
2797
2819
|
path: `/api/endpoint/owner_string`,
|
|
2798
2820
|
method: "DELETE" /* DELETE */
|
|
2799
2821
|
},
|
|
@@ -2813,7 +2835,7 @@ var get18 = function(configuration, path, options, sdkOptions) {
|
|
|
2813
2835
|
return serviceRequest(
|
|
2814
2836
|
{
|
|
2815
2837
|
service: configuration,
|
|
2816
|
-
|
|
2838
|
+
resource_server: configuration.endpoint_id,
|
|
2817
2839
|
path
|
|
2818
2840
|
},
|
|
2819
2841
|
options,
|
|
@@ -2824,7 +2846,7 @@ var remove9 = function(configuration, path, options, sdkOptions) {
|
|
|
2824
2846
|
return serviceRequest(
|
|
2825
2847
|
{
|
|
2826
2848
|
service: configuration,
|
|
2827
|
-
|
|
2849
|
+
resource_server: configuration.endpoint_id,
|
|
2828
2850
|
path,
|
|
2829
2851
|
method: "DELETE" /* DELETE */
|
|
2830
2852
|
},
|
|
@@ -2836,7 +2858,7 @@ var update8 = function(configuration, path, options, sdkOptions) {
|
|
|
2836
2858
|
return serviceRequest(
|
|
2837
2859
|
{
|
|
2838
2860
|
service: configuration,
|
|
2839
|
-
|
|
2861
|
+
resource_server: configuration.endpoint_id,
|
|
2840
2862
|
path,
|
|
2841
2863
|
method: "PUT" /* PUT */
|
|
2842
2864
|
},
|
|
@@ -2850,16 +2872,16 @@ var nodes_exports = {};
|
|
|
2850
2872
|
__export(nodes_exports, {
|
|
2851
2873
|
create: () => create9,
|
|
2852
2874
|
get: () => get19,
|
|
2853
|
-
getAll: () =>
|
|
2875
|
+
getAll: () => getAll12,
|
|
2854
2876
|
patch: () => patch3,
|
|
2855
2877
|
remove: () => remove10,
|
|
2856
2878
|
update: () => update9
|
|
2857
2879
|
});
|
|
2858
|
-
var
|
|
2880
|
+
var getAll12 = function(configuration, options, sdkOptions) {
|
|
2859
2881
|
return serviceRequest(
|
|
2860
2882
|
{
|
|
2861
2883
|
service: configuration,
|
|
2862
|
-
|
|
2884
|
+
resource_server: configuration.endpoint_id,
|
|
2863
2885
|
path: `/api/nodes`
|
|
2864
2886
|
},
|
|
2865
2887
|
options,
|
|
@@ -2870,7 +2892,7 @@ var get19 = function(configuration, node_id, options, sdkOptions) {
|
|
|
2870
2892
|
return serviceRequest(
|
|
2871
2893
|
{
|
|
2872
2894
|
service: configuration,
|
|
2873
|
-
|
|
2895
|
+
resource_server: configuration.endpoint_id,
|
|
2874
2896
|
path: `/api/nodes/${node_id}`
|
|
2875
2897
|
},
|
|
2876
2898
|
options,
|
|
@@ -2881,7 +2903,7 @@ var remove10 = function(configuration, node_id, options, sdkOptions) {
|
|
|
2881
2903
|
return serviceRequest(
|
|
2882
2904
|
{
|
|
2883
2905
|
service: configuration,
|
|
2884
|
-
|
|
2906
|
+
resource_server: configuration.endpoint_id,
|
|
2885
2907
|
path: `/api/nodes/${node_id}`,
|
|
2886
2908
|
method: "DELETE" /* DELETE */
|
|
2887
2909
|
},
|
|
@@ -2893,7 +2915,7 @@ var create9 = function(configuration, options, sdkOptions) {
|
|
|
2893
2915
|
return serviceRequest(
|
|
2894
2916
|
{
|
|
2895
2917
|
service: configuration,
|
|
2896
|
-
|
|
2918
|
+
resource_server: configuration.endpoint_id,
|
|
2897
2919
|
path: `/api/nodes`,
|
|
2898
2920
|
method: "POST" /* POST */
|
|
2899
2921
|
},
|
|
@@ -2905,7 +2927,7 @@ var update9 = function(configuration, node_id, options, sdkOptions) {
|
|
|
2905
2927
|
return serviceRequest(
|
|
2906
2928
|
{
|
|
2907
2929
|
service: configuration,
|
|
2908
|
-
|
|
2930
|
+
resource_server: configuration.endpoint_id,
|
|
2909
2931
|
path: `/api/nodes/${node_id}`,
|
|
2910
2932
|
method: "PUT" /* PUT */
|
|
2911
2933
|
},
|
|
@@ -2917,7 +2939,7 @@ var patch3 = function(configuration, node_id, options, sdkOptions) {
|
|
|
2917
2939
|
return serviceRequest(
|
|
2918
2940
|
{
|
|
2919
2941
|
service: configuration,
|
|
2920
|
-
|
|
2942
|
+
resource_server: configuration.endpoint_id,
|
|
2921
2943
|
path: `/api/nodes/${node_id}`,
|
|
2922
2944
|
method: "PATCH" /* PATCH */
|
|
2923
2945
|
},
|
|
@@ -2931,14 +2953,14 @@ var roles_exports = {};
|
|
|
2931
2953
|
__export(roles_exports, {
|
|
2932
2954
|
create: () => create10,
|
|
2933
2955
|
get: () => get20,
|
|
2934
|
-
getAll: () =>
|
|
2956
|
+
getAll: () => getAll13,
|
|
2935
2957
|
remove: () => remove11
|
|
2936
2958
|
});
|
|
2937
|
-
var
|
|
2959
|
+
var getAll13 = function(configuration, options, sdkOptions) {
|
|
2938
2960
|
return serviceRequest(
|
|
2939
2961
|
{
|
|
2940
2962
|
service: configuration,
|
|
2941
|
-
|
|
2963
|
+
resource_server: configuration.endpoint_id,
|
|
2942
2964
|
path: `/api/roles`
|
|
2943
2965
|
},
|
|
2944
2966
|
options,
|
|
@@ -2949,7 +2971,7 @@ var get20 = function(configuration, role_id, options, sdkOptions) {
|
|
|
2949
2971
|
return serviceRequest(
|
|
2950
2972
|
{
|
|
2951
2973
|
service: configuration,
|
|
2952
|
-
|
|
2974
|
+
resource_server: configuration.endpoint_id,
|
|
2953
2975
|
path: `/api/roles/${role_id}`
|
|
2954
2976
|
},
|
|
2955
2977
|
options,
|
|
@@ -2960,7 +2982,7 @@ var remove11 = function(configuration, role_id, options, sdkOptions) {
|
|
|
2960
2982
|
return serviceRequest(
|
|
2961
2983
|
{
|
|
2962
2984
|
service: configuration,
|
|
2963
|
-
|
|
2985
|
+
resource_server: configuration.endpoint_id,
|
|
2964
2986
|
path: `/api/roles/${role_id}`,
|
|
2965
2987
|
method: "DELETE" /* DELETE */
|
|
2966
2988
|
},
|
|
@@ -2972,7 +2994,7 @@ var create10 = function(configuration, options, sdkOptions) {
|
|
|
2972
2994
|
return serviceRequest(
|
|
2973
2995
|
{
|
|
2974
2996
|
service: configuration,
|
|
2975
|
-
|
|
2997
|
+
resource_server: configuration.endpoint_id,
|
|
2976
2998
|
path: `/api/roles`,
|
|
2977
2999
|
method: "POST" /* POST */
|
|
2978
3000
|
},
|
|
@@ -2986,16 +3008,16 @@ var storage_gateways_exports = {};
|
|
|
2986
3008
|
__export(storage_gateways_exports, {
|
|
2987
3009
|
create: () => create11,
|
|
2988
3010
|
get: () => get21,
|
|
2989
|
-
getAll: () =>
|
|
3011
|
+
getAll: () => getAll14,
|
|
2990
3012
|
patch: () => patch4,
|
|
2991
3013
|
remove: () => remove12,
|
|
2992
3014
|
update: () => update10
|
|
2993
3015
|
});
|
|
2994
|
-
var
|
|
3016
|
+
var getAll14 = function(configuration, options, sdkOptions) {
|
|
2995
3017
|
return serviceRequest(
|
|
2996
3018
|
{
|
|
2997
3019
|
service: configuration,
|
|
2998
|
-
|
|
3020
|
+
resource_server: configuration.endpoint_id,
|
|
2999
3021
|
path: `/api/storage_gateways`
|
|
3000
3022
|
},
|
|
3001
3023
|
options,
|
|
@@ -3006,7 +3028,7 @@ var get21 = function(configuration, storage_gateway_id, options, sdkOptions) {
|
|
|
3006
3028
|
return serviceRequest(
|
|
3007
3029
|
{
|
|
3008
3030
|
service: configuration,
|
|
3009
|
-
|
|
3031
|
+
resource_server: configuration.endpoint_id,
|
|
3010
3032
|
path: `/api/storage_gateways/${storage_gateway_id}`
|
|
3011
3033
|
},
|
|
3012
3034
|
options,
|
|
@@ -3017,7 +3039,7 @@ var remove12 = function(configuration, storage_gateway_id, options, sdkOptions)
|
|
|
3017
3039
|
return serviceRequest(
|
|
3018
3040
|
{
|
|
3019
3041
|
service: configuration,
|
|
3020
|
-
|
|
3042
|
+
resource_server: configuration.endpoint_id,
|
|
3021
3043
|
path: `/api/storage_gateways/${storage_gateway_id}`,
|
|
3022
3044
|
method: "DELETE" /* DELETE */
|
|
3023
3045
|
},
|
|
@@ -3029,7 +3051,7 @@ var create11 = function(configuration, options, sdkOptions) {
|
|
|
3029
3051
|
return serviceRequest(
|
|
3030
3052
|
{
|
|
3031
3053
|
service: configuration,
|
|
3032
|
-
|
|
3054
|
+
resource_server: configuration.endpoint_id,
|
|
3033
3055
|
path: `/api/storage_gateways`,
|
|
3034
3056
|
method: "POST" /* POST */
|
|
3035
3057
|
},
|
|
@@ -3041,7 +3063,7 @@ var update10 = function(configuration, storage_gateway_id, options, sdkOptions)
|
|
|
3041
3063
|
return serviceRequest(
|
|
3042
3064
|
{
|
|
3043
3065
|
service: configuration,
|
|
3044
|
-
|
|
3066
|
+
resource_server: configuration.endpoint_id,
|
|
3045
3067
|
path: `/api/storage_gateways/${storage_gateway_id}`,
|
|
3046
3068
|
method: "PUT" /* PUT */
|
|
3047
3069
|
},
|
|
@@ -3053,7 +3075,7 @@ var patch4 = function(configuration, storage_gateway_id, options, sdkOptions) {
|
|
|
3053
3075
|
return serviceRequest(
|
|
3054
3076
|
{
|
|
3055
3077
|
service: configuration,
|
|
3056
|
-
|
|
3078
|
+
resource_server: configuration.endpoint_id,
|
|
3057
3079
|
path: `/api/storage_gateways/${storage_gateway_id}`,
|
|
3058
3080
|
method: "PATCH" /* PATCH */
|
|
3059
3081
|
},
|
|
@@ -3067,16 +3089,16 @@ var user_credentials_exports = {};
|
|
|
3067
3089
|
__export(user_credentials_exports, {
|
|
3068
3090
|
create: () => create12,
|
|
3069
3091
|
get: () => get22,
|
|
3070
|
-
getAll: () =>
|
|
3092
|
+
getAll: () => getAll15,
|
|
3071
3093
|
patch: () => patch5,
|
|
3072
3094
|
remove: () => remove13,
|
|
3073
3095
|
update: () => update11
|
|
3074
3096
|
});
|
|
3075
|
-
var
|
|
3097
|
+
var getAll15 = function(configuration, options, sdkOptions) {
|
|
3076
3098
|
return serviceRequest(
|
|
3077
3099
|
{
|
|
3078
3100
|
service: configuration,
|
|
3079
|
-
|
|
3101
|
+
resource_server: configuration.endpoint_id,
|
|
3080
3102
|
path: `/api/user_credentials`
|
|
3081
3103
|
},
|
|
3082
3104
|
options,
|
|
@@ -3087,7 +3109,7 @@ var get22 = function(configuration, user_credential_id, options, sdkOptions) {
|
|
|
3087
3109
|
return serviceRequest(
|
|
3088
3110
|
{
|
|
3089
3111
|
service: configuration,
|
|
3090
|
-
|
|
3112
|
+
resource_server: configuration.endpoint_id,
|
|
3091
3113
|
path: `/api/user_credentials/${user_credential_id}`
|
|
3092
3114
|
},
|
|
3093
3115
|
options,
|
|
@@ -3098,7 +3120,7 @@ var remove13 = function(configuration, user_credential_id, options, sdkOptions)
|
|
|
3098
3120
|
return serviceRequest(
|
|
3099
3121
|
{
|
|
3100
3122
|
service: configuration,
|
|
3101
|
-
|
|
3123
|
+
resource_server: configuration.endpoint_id,
|
|
3102
3124
|
path: `/api/user_credentials/${user_credential_id}`,
|
|
3103
3125
|
method: "DELETE" /* DELETE */
|
|
3104
3126
|
},
|
|
@@ -3110,7 +3132,7 @@ var create12 = function(configuration, options, sdkOptions) {
|
|
|
3110
3132
|
return serviceRequest(
|
|
3111
3133
|
{
|
|
3112
3134
|
service: configuration,
|
|
3113
|
-
|
|
3135
|
+
resource_server: configuration.endpoint_id,
|
|
3114
3136
|
path: `/api/user_credentials`,
|
|
3115
3137
|
method: "POST" /* POST */
|
|
3116
3138
|
},
|
|
@@ -3122,7 +3144,7 @@ var update11 = function(configuration, user_credential_id, options, sdkOptions)
|
|
|
3122
3144
|
return serviceRequest(
|
|
3123
3145
|
{
|
|
3124
3146
|
service: configuration,
|
|
3125
|
-
|
|
3147
|
+
resource_server: configuration.endpoint_id,
|
|
3126
3148
|
path: `/api/user_credentials/${user_credential_id}`,
|
|
3127
3149
|
method: "PUT" /* PUT */
|
|
3128
3150
|
},
|
|
@@ -3134,7 +3156,7 @@ var patch5 = function(configuration, user_credential_id, options, sdkOptions) {
|
|
|
3134
3156
|
return serviceRequest(
|
|
3135
3157
|
{
|
|
3136
3158
|
service: configuration,
|
|
3137
|
-
|
|
3159
|
+
resource_server: configuration.endpoint_id,
|
|
3138
3160
|
path: `/api/user_credentials/${user_credential_id}`,
|
|
3139
3161
|
method: "PATCH" /* PATCH */
|
|
3140
3162
|
},
|
|
@@ -3152,7 +3174,6 @@ var info = function(configuration, options, sdkOptions) {
|
|
|
3152
3174
|
return serviceRequest(
|
|
3153
3175
|
{
|
|
3154
3176
|
service: configuration,
|
|
3155
|
-
scope: getRequiredScopes(configuration),
|
|
3156
3177
|
path: `/api/info`
|
|
3157
3178
|
},
|
|
3158
3179
|
options,
|
|
@@ -3160,13 +3181,55 @@ var info = function(configuration, options, sdkOptions) {
|
|
|
3160
3181
|
);
|
|
3161
3182
|
};
|
|
3162
3183
|
|
|
3184
|
+
// src/services/globus-connect-server/utils.ts
|
|
3185
|
+
var utils_exports2 = {};
|
|
3186
|
+
__export(utils_exports2, {
|
|
3187
|
+
getEndpointIdFromURL: () => getEndpointIdFromURL,
|
|
3188
|
+
getGCSDomainFromURL: () => getGCSDomainFromURL
|
|
3189
|
+
});
|
|
3190
|
+
var GCS_DEFAULT_DOMAIN = "data.globus.org";
|
|
3191
|
+
function getGCSDomainFromURL(url2) {
|
|
3192
|
+
const { host: host2 } = typeof url2 === "string" ? new URL(url2) : url2;
|
|
3193
|
+
if (!host2.endsWith(GCS_DEFAULT_DOMAIN)) {
|
|
3194
|
+
return host2;
|
|
3195
|
+
}
|
|
3196
|
+
const [subdomain] = host2.split(`.${GCS_DEFAULT_DOMAIN}`);
|
|
3197
|
+
const parts = subdomain.split(".");
|
|
3198
|
+
return (parts.length === 2 ? [...parts, GCS_DEFAULT_DOMAIN] : [parts[1], parts[2], GCS_DEFAULT_DOMAIN]).join(".");
|
|
3199
|
+
}
|
|
3200
|
+
async function getEndpointIdFromURL(url2) {
|
|
3201
|
+
const u = typeof url2 === "string" ? new URL(url2) : url2;
|
|
3202
|
+
const isCustomDomain = !u.host.endsWith(GCS_DEFAULT_DOMAIN);
|
|
3203
|
+
if (isCustomDomain) {
|
|
3204
|
+
return null;
|
|
3205
|
+
}
|
|
3206
|
+
const res = await (await info({
|
|
3207
|
+
host: `https://${getGCSDomainFromURL(u)}`
|
|
3208
|
+
})).json();
|
|
3209
|
+
const i = res.data?.filter((d) => d.DATA_TYPE.startsWith("info#"))[0];
|
|
3210
|
+
return i && "endpoint_id" in i ? i.endpoint_id : null;
|
|
3211
|
+
}
|
|
3212
|
+
|
|
3163
3213
|
// src/services/globus-connect-server/index.ts
|
|
3164
3214
|
var SCOPES7 = {
|
|
3165
3215
|
HIGH_ASSURANCE: "urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections",
|
|
3166
3216
|
NON_HIGH_ASSURANCE: "urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections[*https://auth.globus.org/scopes/<MAPPED_COLLECTION_ID>/data_access]"
|
|
3167
3217
|
};
|
|
3168
|
-
function
|
|
3169
|
-
|
|
3218
|
+
function getScopes(configuration, scope) {
|
|
3219
|
+
const { endpoint_id: id } = configuration;
|
|
3220
|
+
if (!id) {
|
|
3221
|
+
throw new Error(`An 'endpoint_id' is required to determine the required scopes`);
|
|
3222
|
+
}
|
|
3223
|
+
if (scope) {
|
|
3224
|
+
return SCOPES7[scope].replace("<ENDPOINT_ID>", id);
|
|
3225
|
+
}
|
|
3226
|
+
return Object.entries(SCOPES7).reduce(
|
|
3227
|
+
(reduc, [key, value]) => ({
|
|
3228
|
+
...reduc,
|
|
3229
|
+
[key]: value.replace("<ENDPOINT_ID>", id)
|
|
3230
|
+
}),
|
|
3231
|
+
{}
|
|
3232
|
+
);
|
|
3170
3233
|
}
|
|
3171
3234
|
|
|
3172
3235
|
// src/services/timer/index.ts
|
|
@@ -3204,10 +3267,10 @@ __export(compute_exports, {
|
|
|
3204
3267
|
var endpoints_exports = {};
|
|
3205
3268
|
__export(endpoints_exports, {
|
|
3206
3269
|
get: () => get23,
|
|
3207
|
-
getAll: () =>
|
|
3270
|
+
getAll: () => getAll16,
|
|
3208
3271
|
getStatus: () => getStatus
|
|
3209
3272
|
});
|
|
3210
|
-
var
|
|
3273
|
+
var getAll16 = function(options, sdkOptions) {
|
|
3211
3274
|
return serviceRequest(
|
|
3212
3275
|
{
|
|
3213
3276
|
service: ID6,
|