@globus/sdk
Advanced tools
Comparing version 0.4.2-alpha.0 to 0.5.0
/** | ||
* @module @globus/sdk | ||
* @description `@globus/sdk` provides modules for interacting with the various APIs that make up the Globus platform. | ||
* | ||
* ### Key Concepts | ||
* - All service methods return a `Promise` that resolves to a [Fetch API Response object](https://developer.mozilla.org/en-US/docs/Web/API/Response). | ||
* - Under the hood, we are returning the result of a composed [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch). | ||
* - All service methods accept a `ServiceMethodOptions` object to pass query parameters and a payload. | ||
* - All service methods support a tail argument to pass options to the SDK, including the composed `fetch` call. | ||
* | ||
* @example <caption>Using the SDK to search for endpoints via Transfer API.</caption> | ||
* import { transfer } from "@globus/sdk"; | ||
* | ||
* const result = await (await transfer.endpointSearch({ query: { filter_fulltext: 'Globus Tutorial' }}, { | ||
* fetch: { | ||
* // Provide parameters to the underlying `fetch` call. | ||
* // https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters | ||
* headers: { | ||
* Authorization: `Bearer MY_ACCESS_TOKEN` | ||
* } | ||
* } | ||
* })).json(); | ||
* | ||
* @example <caption>Using the SDK to fetch a single flow from the Flows API.</caption> | ||
* import { flows } from "@globus/sdk"; | ||
* | ||
* const result = await (await flows.flows.get("452bbea3-5e3b-45a5-af08-50179839a4e8")).json(); | ||
*/ | ||
export * from "./lib/sdk"; | ||
export * as authorization from "./lib/core/authorization"; | ||
@@ -9,3 +33,5 @@ export * as auth from "./lib/services/auth"; | ||
export * as search from "./lib/services/search"; | ||
export * as groups from "./lib/services/groups"; | ||
export * as flows from "./lib/services/flows"; | ||
export * as gcs from "./lib/services/globus-connect-server"; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
/** | ||
* @module @globus/sdk | ||
* @description `@globus/sdk` provides modules for interacting with the various APIs that make up the Globus platform. | ||
* | ||
* ### Key Concepts | ||
* - All service methods return a `Promise` that resolves to a [Fetch API Response object](https://developer.mozilla.org/en-US/docs/Web/API/Response). | ||
* - Under the hood, we are returning the result of a composed [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch). | ||
* - All service methods accept a `ServiceMethodOptions` object to pass query parameters and a payload. | ||
* - All service methods support a tail argument to pass options to the SDK, including the composed `fetch` call. | ||
* | ||
* @example <caption>Using the SDK to search for endpoints via Transfer API.</caption> | ||
* import { transfer } from "@globus/sdk"; | ||
* | ||
* const result = await (await transfer.endpointSearch({ query: { filter_fulltext: 'Globus Tutorial' }}, { | ||
* fetch: { | ||
* // Provide parameters to the underlying `fetch` call. | ||
* // https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters | ||
* headers: { | ||
* Authorization: `Bearer MY_ACCESS_TOKEN` | ||
* } | ||
* } | ||
* })).json(); | ||
* | ||
* @example <caption>Using the SDK to fetch a single flow from the Flows API.</caption> | ||
* import { flows } from "@globus/sdk"; | ||
* | ||
* const result = await (await flows.flows.get("452bbea3-5e3b-45a5-af08-50179839a4e8")).json(); | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.gcs = exports.flows = exports.groups = exports.search = exports.transfer = exports.auth = exports.authorization = void 0; | ||
/// <reference types="@globus/types" /> | ||
/// <reference types="@globus/types/auth" /> | ||
/// <reference types="@globus/types/transfer" /> | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.gcs = exports.search = exports.transfer = exports.auth = exports.authorization = void 0; | ||
__exportStar(require("./lib/sdk"), exports); | ||
exports.authorization = require("./lib/core/authorization"); | ||
@@ -29,3 +39,5 @@ exports.auth = require("./lib/services/auth"); | ||
exports.search = require("./lib/services/search"); | ||
exports.groups = require("./lib/services/groups"); | ||
exports.flows = require("./lib/services/flows"); | ||
exports.gcs = require("./lib/services/globus-connect-server"); | ||
//# sourceMappingURL=index.js.map |
@@ -7,2 +7,5 @@ import type IConfig from "js-pkce/dist/IConfig"; | ||
}; | ||
/** | ||
* @experimental | ||
*/ | ||
export declare class PKCEAuthorization { | ||
@@ -19,5 +22,11 @@ #private; | ||
} | ||
/** | ||
* @experimental | ||
*/ | ||
export declare function pkce(configuration: PKCEConfiguration): PKCEAuthorization; | ||
/** | ||
* @experimental | ||
*/ | ||
export declare function incremental(configuration: PKCEConfiguration): PKCEAuthorization; | ||
export {}; | ||
//# sourceMappingURL=authorization.d.ts.map |
@@ -25,2 +25,8 @@ "use strict"; | ||
exports.incremental = exports.pkce = exports.PKCEAuthorization = void 0; | ||
/** | ||
* @description Session and authorization management via PKCE. | ||
* @group Core | ||
* @module | ||
* @experimental | ||
*/ | ||
const js_pkce_1 = require("js-pkce"); | ||
@@ -31,2 +37,5 @@ const auth_1 = require("../services/auth"); | ||
let storage; | ||
/** | ||
* @experimental | ||
*/ | ||
class PKCEAuthorization { | ||
@@ -91,2 +100,5 @@ constructor(configuration) { | ||
}; | ||
/** | ||
* @experimental | ||
*/ | ||
function pkce(configuration) { | ||
@@ -96,2 +108,5 @@ return new PKCEAuthorization(configuration); | ||
exports.pkce = pkce; | ||
/** | ||
* @experimental | ||
*/ | ||
function incremental(configuration) { | ||
@@ -98,0 +113,0 @@ return new PKCEAuthorization(configuration); |
import * as AUTH from "./config"; | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
export declare const CONFIG: typeof AUTH; | ||
@@ -3,0 +7,0 @@ import type ITokenResponse from "js-pkce/dist/ITokenResponse"; |
@@ -6,3 +6,3 @@ "use strict"; | ||
* @description A wrapper around the Globus Auth service. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Auth API Documentation](https://docs.globus.org/api/auth/) | ||
@@ -13,2 +13,6 @@ * @module | ||
const AUTH = require("./config"); | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
exports.CONFIG = AUTH; | ||
@@ -15,0 +19,0 @@ function getAuthorizationEndpoint() { |
/** | ||
* @description A wrapper around the Globus Flows service. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Flows API Documentation](https://docs.globus.org/api/flows/) | ||
@@ -8,6 +8,9 @@ * @module | ||
import * as FLOWS from "./config"; | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
export declare const CONFIG: typeof FLOWS; | ||
export * as flows from "./service/flows"; | ||
export * as runs from "./service/runs"; | ||
export * as batch from "./service/batch"; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.batch = exports.runs = exports.flows = exports.CONFIG = void 0; | ||
exports.runs = exports.flows = exports.CONFIG = void 0; | ||
/** | ||
* @description A wrapper around the Globus Flows service. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Flows API Documentation](https://docs.globus.org/api/flows/) | ||
@@ -11,6 +11,9 @@ * @module | ||
const FLOWS = require("./config"); | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
exports.CONFIG = FLOWS; | ||
exports.flows = require("./service/flows"); | ||
exports.runs = require("./service/runs"); | ||
exports.batch = require("./service/batch"); | ||
//# sourceMappingURL=index.js.map |
/** | ||
* @see https://globusonline.github.io/flows/#tag/Flows/paths/~1flows/get | ||
*/ | ||
export declare const getAll: (parameters?: Record<string, string> | undefined, options?: import("../../../services/types").SDKOptions | undefined) => Promise<Response>; | ||
export declare const getAll: (parameters?: (Record<string, string> & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, options?: import("../../../services/types").SDKOptions | undefined) => Promise<Response>; | ||
/** | ||
@@ -6,0 +10,0 @@ * @see https://globusonline.github.io/flows/#tag/Flows/paths/~1flows~1{flow_id}/get |
@@ -5,3 +5,7 @@ /** | ||
*/ | ||
export declare const getAll: (parameters?: Record<string, string> | undefined, options?: import("../../../services/types").SDKOptions | undefined) => Promise<Response>; | ||
export declare const getAll: (parameters?: (Record<string, string> & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, options?: import("../../../services/types").SDKOptions | undefined) => Promise<Response>; | ||
//# sourceMappingURL=runs.d.ts.map |
/** | ||
* @description A wrapper around the Globus Connect Server Manager API. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Connect Server Manager API Documentation](https://docs.globus.org/globus-connect-server/v5.4/api/) | ||
@@ -8,3 +8,3 @@ * @module | ||
/// <reference types="@globus/types" /> | ||
import type { Segment, Options, SDKOptions, ServiceMethod, ServiceMethodDynamicSegments } from "../types"; | ||
import type { Segment, ServiceMethodOptions, SDKOptions, ServiceMethod, ServiceMethodDynamicSegments, UnknownQueryParameters } from "../types"; | ||
/** | ||
@@ -38,3 +38,5 @@ * Service methods for the Globus Connect Server Manager API. | ||
*/ | ||
export type GCSServiceMethod<O extends Options, R extends Response = Response> = (configuration: GCSConfiguration, methodOptions?: O, sdkOptions?: SDKOptions) => ReturnType<ServiceMethod<O, R>>; | ||
export type GCSServiceMethod<O extends ServiceMethodOptions, R extends Response = Response> = (configuration: GCSConfiguration, methodOptions?: O & { | ||
query?: UnknownQueryParameters; | ||
}, sdkOptions?: SDKOptions) => ReturnType<ServiceMethod<O, R>>; | ||
/** | ||
@@ -44,3 +46,5 @@ * The GCSServiceMethodDynamicSegments type is similar to the core ServiceMethodDynamicSegments type, but | ||
*/ | ||
export type GCSServiceMethodDynamicSegments<S extends Segment, O extends Options, R extends Response = Response> = (configuration: GCSConfiguration, segments: S, methodOptions?: O, sdkOptions?: SDKOptions) => ReturnType<ServiceMethodDynamicSegments<S, O, R>>; | ||
export type GCSServiceMethodDynamicSegments<S extends Segment, O extends ServiceMethodOptions, R extends Response = Response> = (configuration: GCSConfiguration, segments: S, methodOptions?: O & { | ||
query?: UnknownQueryParameters; | ||
}, sdkOptions?: SDKOptions) => ReturnType<ServiceMethodDynamicSegments<S, O, R>>; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
/** | ||
* @description A wrapper around the Globus Connect Server Manager API. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Connect Server Manager API Documentation](https://docs.globus.org/globus-connect-server/v5.4/api/) | ||
@@ -6,0 +6,0 @@ * @module |
@@ -6,13 +6,25 @@ import type { JSONFetchResponse } from "../../types"; | ||
*/ | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, parameters?: { | ||
include?: "private_policies"[] | undefined; | ||
filter?: ("mapped_collections" | "guest_collections" | "managed_by_me" | "created_by_me")[] | undefined; | ||
mapped_collection_id?: string | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["listCollections"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
query?: { | ||
include?: "private_policies"[] | undefined; | ||
filter?: ("mapped_collections" | "guest_collections" | "managed_by_me" | "created_by_me")[] | undefined; | ||
mapped_collection_id?: string | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["listCollections"]["responses"]["200"]["content"]["application/json"]>>; | ||
/** | ||
* @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#getCollection | ||
*/ | ||
export declare const get: (configuration: import("../index").GCSConfiguration, collection_id: string, parameters?: { | ||
include?: "private_policies"[] | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["getCollection"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const get: (configuration: import("../index").GCSConfiguration, collection_id: string, options?: ({ | ||
query?: { | ||
include?: "private_policies"[] | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["getCollection"]["responses"]["200"]["content"]["application/json"]>>; | ||
//# sourceMappingURL=collections.d.ts.map |
@@ -10,5 +10,5 @@ "use strict"; | ||
*/ | ||
exports.getAll = function (configuration, parameters, sdkOptions) { | ||
exports.getAll = function (configuration, options, sdkOptions) { | ||
var _a; | ||
return (0, fetch_1.fetchWithScope)((0, index_1.getRequiredScopes)(configuration), (0, url_1.build)(configuration, `/api/collections`, { search: parameters }), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
return (0, fetch_1.fetchWithScope)((0, index_1.getRequiredScopes)(configuration), (0, url_1.build)(configuration, `/api/collections`, { search: options === null || options === void 0 ? void 0 : options.query }), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
@@ -18,8 +18,8 @@ /** | ||
*/ | ||
exports.get = function (configuration, collection_id, parameters, sdkOptions) { | ||
exports.get = function (configuration, collection_id, options, sdkOptions) { | ||
var _a; | ||
return (0, fetch_1.fetchWithScope)((0, index_1.getRequiredScopes)(configuration), (0, url_1.build)(configuration, `/api/collections/${collection_id}`, { | ||
search: parameters, | ||
search: options === null || options === void 0 ? void 0 : options.query, | ||
}), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
//# sourceMappingURL=collections.js.map |
@@ -6,3 +6,3 @@ import type { JSONFetchResponse } from "../../types"; | ||
*/ | ||
export declare const get: (configuration: import("../index").GCSConfiguration, _parameters?: undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["getEndpoint"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const get: (configuration: import("../index").GCSConfiguration, _options?: undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["getEndpoint"]["responses"]["200"]["content"]["application/json"]>>; | ||
//# sourceMappingURL=endpoint.d.ts.map |
@@ -10,3 +10,3 @@ "use strict"; | ||
*/ | ||
exports.get = function (configuration, _parameters, sdkOptions) { | ||
exports.get = function (configuration, _options, sdkOptions) { | ||
var _a; | ||
@@ -13,0 +13,0 @@ return (0, fetch_1.fetchWithScope)((0, index_1.getRequiredScopes)(configuration), (0, url_1.build)(configuration, `/api/endpoint`), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); |
@@ -6,5 +6,11 @@ import type { JSONFetchResponse } from "../../types"; | ||
*/ | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, parameters?: { | ||
include?: "all_roles"[] | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["listRoles"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
query?: { | ||
include?: "all_roles"[] | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["listRoles"]["responses"]["200"]["content"]["application/json"]>>; | ||
/** | ||
@@ -11,0 +17,0 @@ * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Roles/#getRole |
@@ -10,6 +10,6 @@ "use strict"; | ||
*/ | ||
exports.getAll = function (configuration, parameters, sdkOptions) { | ||
exports.getAll = function (configuration, options, sdkOptions) { | ||
var _a; | ||
return (0, fetch_1.fetchWithScope)((0, index_1.getRequiredScopes)(configuration), (0, url_1.build)(configuration, `/api/roles`, { | ||
search: parameters, | ||
search: options === null || options === void 0 ? void 0 : options.query, | ||
}), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
@@ -16,0 +16,0 @@ }; |
@@ -6,11 +6,23 @@ import type { JSONFetchResponse } from "../../types"; | ||
*/ | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, parameters?: { | ||
include?: ("private_policies" | "accounts")[] | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["listStorageGateways"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
query?: { | ||
include?: ("private_policies" | "accounts")[] | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["listStorageGateways"]["responses"]["200"]["content"]["application/json"]>>; | ||
/** | ||
* @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Storage_Gateways/#getStorageGateway | ||
*/ | ||
export declare const get: (configuration: import("../index").GCSConfiguration, storage_gateway_id: string, parameters?: { | ||
include?: ("private_policies" | "accounts")[] | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["getStorageGateway"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const get: (configuration: import("../index").GCSConfiguration, storage_gateway_id: string, options?: ({ | ||
query?: { | ||
include?: ("private_policies" | "accounts")[] | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["getStorageGateway"]["responses"]["200"]["content"]["application/json"]>>; | ||
//# sourceMappingURL=storage-gateways.d.ts.map |
@@ -10,6 +10,6 @@ "use strict"; | ||
*/ | ||
exports.getAll = function (configuration, parameters, sdkOptions) { | ||
exports.getAll = function (configuration, options, sdkOptions) { | ||
var _a; | ||
return (0, fetch_1.fetchWithScope)((0, index_1.getRequiredScopes)(configuration), (0, url_1.build)(configuration, `/api/storage_gateways`, { | ||
search: parameters, | ||
search: options === null || options === void 0 ? void 0 : options.query, | ||
}), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
@@ -20,8 +20,8 @@ }; | ||
*/ | ||
exports.get = function (configuration, storage_gateway_id, parameters, sdkOptions) { | ||
exports.get = function (configuration, storage_gateway_id, options, sdkOptions) { | ||
var _a; | ||
return (0, fetch_1.fetchWithScope)((0, index_1.getRequiredScopes)(configuration), (0, url_1.build)(configuration, `/api/storage_gateways/${storage_gateway_id}`, { | ||
search: parameters, | ||
search: options === null || options === void 0 ? void 0 : options.query, | ||
}), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
//# sourceMappingURL=storage-gateways.js.map |
@@ -6,10 +6,16 @@ import type { JSONFetchResponse } from "../../types"; | ||
*/ | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, parameters?: { | ||
include?: "all"[] | undefined; | ||
storage_gateway?: string | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["listUserCredentials"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
query?: { | ||
include?: "all"[] | undefined; | ||
storage_gateway?: string | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["listUserCredentials"]["responses"]["200"]["content"]["application/json"]>>; | ||
/** | ||
* @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_User_Credentials/#getUserCredential | ||
*/ | ||
export declare const get: (configuration: import("../index").GCSConfiguration, user_credential_id: string, _parameters?: undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["getCollection"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const get: (configuration: import("../index").GCSConfiguration, user_credential_id: string, options?: undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["getCollection"]["responses"]["200"]["content"]["application/json"]>>; | ||
//# sourceMappingURL=user-credentials.d.ts.map |
@@ -10,6 +10,6 @@ "use strict"; | ||
*/ | ||
exports.getAll = function (configuration, parameters, sdkOptions) { | ||
exports.getAll = function (configuration, options, sdkOptions) { | ||
var _a; | ||
return (0, fetch_1.fetchWithScope)((0, index_1.getRequiredScopes)(configuration), (0, url_1.build)(configuration, `/api/user_credentials`, { | ||
search: parameters, | ||
search: options === null || options === void 0 ? void 0 : options.query, | ||
}), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
@@ -20,3 +20,3 @@ }; | ||
*/ | ||
exports.get = function (configuration, user_credential_id, _parameters, sdkOptions) { | ||
exports.get = function (configuration, user_credential_id, options, sdkOptions) { | ||
var _a; | ||
@@ -23,0 +23,0 @@ return (0, fetch_1.fetchWithScope)((0, index_1.getRequiredScopes)(configuration), (0, url_1.build)(configuration, `/api/user_credentials/${user_credential_id}`), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); |
/** | ||
* @description A wrapper around the Groups API. | ||
* @category Service | ||
* @group Service | ||
* @see [Groups API Documentation](https://docs.globus.org/api/groups/) | ||
@@ -8,2 +8,6 @@ * @module | ||
import * as GROUPS from "./config"; | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
export declare const CONFIG: typeof GROUPS; | ||
@@ -10,0 +14,0 @@ /** |
"use strict"; | ||
/** | ||
* @description A wrapper around the Groups API. | ||
* @category Service | ||
* @group Service | ||
* @see [Groups API Documentation](https://docs.globus.org/api/groups/) | ||
@@ -11,2 +11,6 @@ * @module | ||
const GROUPS = require("./config"); | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
exports.CONFIG = GROUPS; | ||
@@ -13,0 +17,0 @@ /** |
@@ -6,14 +6,24 @@ import type { JSONFetchResponse } from "../../types"; | ||
*/ | ||
export declare const getMyGroups: (parameters?: { | ||
/** | ||
* @todo This should probably be replaced with a more specific type for the method's accepted query parameters once available. | ||
*/ | ||
statuses?: ("active" | "invited" | "pending" | "rejected" | "removed" | "left" | "declined")[] | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["get_my_groups_and_memberships_v2_groups_my_groups_get"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const getMyGroups: (options?: ({ | ||
query?: { | ||
/** | ||
* @todo This should probably be replaced with a more specific type for the method's accepted query parameters once available. | ||
*/ | ||
statuses?: ("active" | "invited" | "pending" | "rejected" | "removed" | "left" | "declined")[] | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["get_my_groups_and_memberships_v2_groups_my_groups_get"]["responses"]["200"]["content"]["application/json"]>>; | ||
/** | ||
* @see https://groups.api.globus.org/redoc#tag/groups/operation/get_group_v2_groups__group_id__get | ||
*/ | ||
export declare const get: (group_id: string, parameters?: (Record<string, any> & { | ||
include?: string[] | undefined; | ||
export declare const get: (group_id: string, options?: ({ | ||
query?: operations["get_group_v2_groups__group_id__get"]["parameters"]["query"]; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["get_group_v2_groups__group_id__get"]["responses"]["200"]["content"]["application/json"]>>; | ||
//# sourceMappingURL=groups.d.ts.map |
@@ -10,6 +10,6 @@ "use strict"; | ||
*/ | ||
exports.getMyGroups = function (parameters, sdkOptions) { | ||
exports.getMyGroups = function (options = {}, sdkOptions) { | ||
var _a; | ||
return (0, fetch_1.fetchWithScope)(config_1.SCOPES.ALL, (0, url_1.build)(config_1.ID, `/v2/groups/my_groups`, { | ||
search: parameters, | ||
search: options.query, | ||
}), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
@@ -20,8 +20,8 @@ }; | ||
*/ | ||
exports.get = function (group_id, parameters, sdkOptions) { | ||
exports.get = function (group_id, options = {}, sdkOptions) { | ||
var _a; | ||
return (0, fetch_1.fetchWithScope)(config_1.SCOPES.ALL, (0, url_1.build)(config_1.ID, `/v2/groups/${group_id}`, { | ||
search: parameters, | ||
search: options.query, | ||
}), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
//# sourceMappingURL=groups.js.map |
@@ -7,5 +7,9 @@ import type { JSONFetchResponse } from "../../types"; | ||
*/ | ||
export declare const act: (group_id: string, options: { | ||
export declare const act: (group_id: string, options: ({ | ||
payload: operations["group_membership_post_actions_v2_groups__group_id__post"]["requestBody"]["content"]["application/json"]; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["group_membership_post_actions_v2_groups__group_id__post"]["responses"]["200"]["content"]["application/json"]>>; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["group_membership_post_actions_v2_groups__group_id__post"]["responses"]["200"]["content"]["application/json"]>>; | ||
//# sourceMappingURL=membership.d.ts.map |
@@ -6,3 +6,3 @@ import type { JSONFetchResponse } from "../../types"; | ||
*/ | ||
export declare const get: (group_id: string, _parameters?: undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["get_policies_v2_groups__group_id__policies_get"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const get: (group_id: string, _options?: undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["get_policies_v2_groups__group_id__policies_get"]["responses"]["200"]["content"]["application/json"]>>; | ||
//# sourceMappingURL=policies.d.ts.map |
@@ -10,3 +10,3 @@ "use strict"; | ||
*/ | ||
exports.get = function (group_id, _parameters, sdkOptions) { | ||
exports.get = function (group_id, _options, sdkOptions) { | ||
var _a; | ||
@@ -13,0 +13,0 @@ return (0, fetch_1.fetchWithScope)(config_1.SCOPES.ALL, (0, url_1.build)(config_1.ID, `/v2/groups/${group_id}/policies`), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); |
/** | ||
* @description A wrapper around the Globus Search service. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Search API Documentation](https://docs.globus.org/api/search/reference/) | ||
@@ -8,4 +8,8 @@ * @module | ||
import * as SEARCH from "./config"; | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
export declare const CONFIG: typeof SEARCH; | ||
export * as query from "./service/query"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
* @description A wrapper around the Globus Search service. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Search API Documentation](https://docs.globus.org/api/search/reference/) | ||
@@ -12,4 +12,8 @@ * @module | ||
const SEARCH = require("./config"); | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
exports.CONFIG = SEARCH; | ||
exports.query = require("./service/query"); | ||
//# sourceMappingURL=index.js.map |
/** | ||
* @param index_id The UUID of the index to query. | ||
* @param parameters The query parameters. | ||
* @param sdkOptions Optional SDK options and overrides. | ||
* | ||
* @see https://docs.globus.org/api/search/reference/get_query/ | ||
*/ | ||
export declare const get: (index_id: string, parameters: { | ||
q: string; | ||
offset?: `${number}` | undefined; | ||
limit?: `${number}` | undefined; | ||
advanced?: "true" | "false" | undefined; | ||
bypass_visible_to?: "true" | "false" | undefined; | ||
result_format_version?: string | undefined; | ||
filter_principal_sets?: string | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
export declare const get: (index_id: string, options?: ({ | ||
/** | ||
* @see https://docs.globus.org/api/search/reference/get_query/#parameters | ||
*/ | ||
query?: { | ||
q: string; | ||
offset?: `${number}` | undefined; | ||
limit?: `${number}` | undefined; | ||
advanced?: "true" | "false" | undefined; | ||
bypass_visible_to?: "true" | "false" | undefined; | ||
result_format_version?: string | undefined; | ||
filter_principal_sets?: string | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
//# sourceMappingURL=query.d.ts.map |
@@ -9,13 +9,11 @@ "use strict"; | ||
* @param index_id The UUID of the index to query. | ||
* @param parameters The query parameters. | ||
* @param sdkOptions Optional SDK options and overrides. | ||
* | ||
* @see https://docs.globus.org/api/search/reference/get_query/ | ||
*/ | ||
exports.get = function (index_id, parameters, sdkOptions) { | ||
exports.get = function (index_id, options, sdkOptions) { | ||
var _a; | ||
return (0, fetch_1.fetchWithScope)(config_1.SCOPES.SEARCH, (0, url_1.build)(config_1.ID, `/v1/index/${index_id}/search`, { | ||
search: parameters, | ||
search: options === null || options === void 0 ? void 0 : options.query, | ||
}), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
//# sourceMappingURL=query.js.map |
export declare enum HTTP_METHODS { | ||
post = "post", | ||
get = "get", | ||
delete = "delete" | ||
POST = "POST", | ||
GET = "GET", | ||
DELETE = "DELETE", | ||
PUT = "PUT" | ||
} | ||
//# sourceMappingURL=shared.d.ts.map |
@@ -6,6 +6,7 @@ "use strict"; | ||
(function (HTTP_METHODS) { | ||
HTTP_METHODS["post"] = "post"; | ||
HTTP_METHODS["get"] = "get"; | ||
HTTP_METHODS["delete"] = "delete"; | ||
HTTP_METHODS["POST"] = "POST"; | ||
HTTP_METHODS["GET"] = "GET"; | ||
HTTP_METHODS["DELETE"] = "DELETE"; | ||
HTTP_METHODS["PUT"] = "PUT"; | ||
})(HTTP_METHODS || (exports.HTTP_METHODS = HTTP_METHODS = {})); | ||
//# sourceMappingURL=shared.js.map |
@@ -1,5 +0,4 @@ | ||
/// <reference types="@globus/types/transfer" /> | ||
/** | ||
* @description A wrapper around the Globus Transfer service. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Transfer API Documentation](https://docs.globus.org/api/transfer/) | ||
@@ -9,4 +8,9 @@ * @module | ||
import * as TRANSFER from "./config"; | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
export declare const CONFIG: typeof TRANSFER; | ||
export declare const endpointSearch: (parameters?: Globus.Transfer.EndpointSearchQuery | undefined, options?: import("../types").SDKOptions | undefined) => Promise<Response>; | ||
import { endpointSearch } from "./service/endpoint-search"; | ||
export { endpointSearch }; | ||
export * as fileOperations from "./service/file-operations"; | ||
@@ -13,0 +17,0 @@ export * as taskSubmission from "./service/task-submission"; |
@@ -6,3 +6,3 @@ "use strict"; | ||
* @description A wrapper around the Globus Transfer service. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Transfer API Documentation](https://docs.globus.org/api/transfer/) | ||
@@ -12,5 +12,9 @@ * @module | ||
const TRANSFER = require("./config"); | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
exports.CONFIG = TRANSFER; | ||
const endpoint_search_1 = require("./service/endpoint-search"); | ||
exports.endpointSearch = endpoint_search_1.default; | ||
Object.defineProperty(exports, "endpointSearch", { enumerable: true, get: function () { return endpoint_search_1.endpointSearch; } }); | ||
exports.fileOperations = require("./service/file-operations"); | ||
@@ -17,0 +21,0 @@ exports.taskSubmission = require("./service/task-submission"); |
@@ -1,9 +0,14 @@ | ||
/// <reference types="@globus/types" /> | ||
/// <reference types="@globus/types/auth" /> | ||
/// <reference types="@globus/types/transfer" /> | ||
import type { SDKOptions } from "../../../services/types"; | ||
/** | ||
* Get a list of endpoints matching the search filters in a given search scope. | ||
* @see https://docs.globus.org/api/transfer/endpoint_search/#endpoint_search | ||
*/ | ||
export declare const endpointSearch: (parameters?: Globus.Transfer.EndpointSearchQuery, options?: import("../../../services/types").SDKOptions | undefined) => Promise<Response>; | ||
export declare const endpointSearch: (options?: { | ||
/** | ||
* @todo This type needs to be converted to a record and this method updated | ||
* to `satisfies` `ServiceMethod`. | ||
*/ | ||
query?: Globus.Transfer.EndpointSearchQuery; | ||
}, sdkOptions?: SDKOptions) => Promise<Response>; | ||
export default endpointSearch; | ||
//# sourceMappingURL=endpoint-search.d.ts.map |
@@ -8,9 +8,10 @@ "use strict"; | ||
/** | ||
* Get a list of endpoints matching the search filters in a given search scope. | ||
* @see https://docs.globus.org/api/transfer/endpoint_search/#endpoint_search | ||
*/ | ||
exports.endpointSearch = function ( | ||
const endpointSearch = function ( | ||
/** | ||
* @see https://docs.globus.org/api/transfer/endpoint_search/#query_parameters | ||
*/ | ||
parameters, options) { | ||
options, sdkOptions) { | ||
var _a; | ||
@@ -22,6 +23,7 @@ return (0, fetch_1.fetchWithScope)("urn:globus:auth:scope:transfer.api.globus.org:all", (0, url_1.build)(config_1.ID, `/v0.10/endpoint_search`, { | ||
*/ | ||
search: parameters, | ||
}), (_a = options === null || options === void 0 ? void 0 : options.fetch) === null || _a === void 0 ? void 0 : _a.options); | ||
search: options === null || options === void 0 ? void 0 : options.query, | ||
}), (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options); | ||
}; | ||
exports.endpointSearch = endpointSearch; | ||
exports.default = exports.endpointSearch; | ||
//# sourceMappingURL=endpoint-search.js.map |
@@ -8,10 +8,16 @@ import type { Transfer } from "../types"; | ||
*/ | ||
export declare const ls: (endpoint_xid: string, parameters?: { | ||
path?: string | undefined; | ||
show_hidden?: "true" | "false" | undefined; | ||
limit?: `${number}` | undefined; | ||
offset?: `${number}` | undefined; | ||
orderby?: string | undefined; | ||
filter?: string | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
export declare const ls: (endpoint_xid: string, options?: ({ | ||
query?: { | ||
path?: string | undefined; | ||
show_hidden?: "true" | "false" | undefined; | ||
limit?: `${number}` | undefined; | ||
offset?: `${number}` | undefined; | ||
orderby?: string | undefined; | ||
filter?: string | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
/** | ||
@@ -23,5 +29,9 @@ * Create a directory at the specified path on an endpoint filesystem. | ||
*/ | ||
export declare const mkdir: (endpoint_xid: string, options: { | ||
export declare const mkdir: (endpoint_xid: string, options: ({ | ||
payload: Omit<Transfer["Request"]["Mkdir"], "DATA_TYPE">; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
/** | ||
@@ -35,5 +45,9 @@ * Rename or move a file, directory, or symlink on an endpoint filesystem. | ||
*/ | ||
export declare const rename: (endpoint_xid: string, options: { | ||
export declare const rename: (endpoint_xid: string, options: ({ | ||
payload: Omit<Transfer["Request"]["Rename"], "DATA_TYPE">; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
/** | ||
@@ -45,5 +59,9 @@ * Create a directory at the specified path on an endpoint filesystem. | ||
*/ | ||
export declare const symlink: (endpoint_xid: string, options: { | ||
export declare const symlink: (endpoint_xid: string, options: ({ | ||
payload: Omit<Transfer["Request"]["Symlink"], "DATA_TYPE">; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
//# sourceMappingURL=file-operations.d.ts.map |
@@ -15,6 +15,6 @@ "use strict"; | ||
*/ | ||
exports.ls = function (endpoint_xid, parameters, sdkOptions) { | ||
exports.ls = function (endpoint_xid, options, sdkOptions) { | ||
var _a; | ||
return (0, fetch_1.fetchWithScope)("urn:globus:auth:scope:transfer.api.globus.org:all", (0, url_1.build)(config_1.ID, `/v0.10/operation/endpoint/${endpoint_xid}/ls`, { | ||
search: parameters, | ||
search: options === null || options === void 0 ? void 0 : options.query, | ||
}), (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options); | ||
@@ -30,4 +30,3 @@ }; | ||
var _a; | ||
const reqBody = Object.assign({ DATA_TYPE: "mkdir" }, options === null || options === void 0 ? void 0 : options.payload); | ||
return (0, fetch_1.fetchWithScope)("urn:globus:auth:scope:transfer.api.globus.org:all", (0, url_1.build)(config_1.ID, `/v0.10/operation/endpoint/${endpoint_xid}/mkdir`), Object.assign({ method: shared_1.HTTP_METHODS.post, body: JSON.stringify(reqBody), headers: (0, shared_2.getHeadersForService)(shared_1.HTTP_METHODS.post) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
return (0, fetch_1.fetchWithScope)("urn:globus:auth:scope:transfer.api.globus.org:all", (0, url_1.build)(config_1.ID, `/v0.10/operation/endpoint/${endpoint_xid}/mkdir`), Object.assign({ method: shared_1.HTTP_METHODS.POST, body: JSON.stringify(Object.assign({ DATA_TYPE: "mkdir" }, options === null || options === void 0 ? void 0 : options.payload)), headers: (0, shared_2.getHeadersForService)(shared_1.HTTP_METHODS.POST) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
@@ -44,4 +43,3 @@ /** | ||
var _a; | ||
const reqBody = Object.assign({ DATA_TYPE: "rename" }, options === null || options === void 0 ? void 0 : options.payload); | ||
return (0, fetch_1.fetchWithScope)("urn:globus:auth:scope:transfer.api.globus.org:all", (0, url_1.build)(config_1.ID, `/v0.10/operation/endpoint/${endpoint_xid}/rename`), Object.assign({ method: shared_1.HTTP_METHODS.post, body: JSON.stringify(reqBody), headers: (0, shared_2.getHeadersForService)(shared_1.HTTP_METHODS.post) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
return (0, fetch_1.fetchWithScope)("urn:globus:auth:scope:transfer.api.globus.org:all", (0, url_1.build)(config_1.ID, `/v0.10/operation/endpoint/${endpoint_xid}/rename`), Object.assign({ method: shared_1.HTTP_METHODS.POST, body: JSON.stringify(Object.assign({ DATA_TYPE: "rename" }, options === null || options === void 0 ? void 0 : options.payload)), headers: (0, shared_2.getHeadersForService)(shared_1.HTTP_METHODS.POST) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
@@ -56,5 +54,4 @@ /** | ||
var _a; | ||
const reqBody = Object.assign({ DATA_TYPE: "symlink" }, options === null || options === void 0 ? void 0 : options.payload); | ||
return (0, fetch_1.fetchWithScope)("urn:globus:auth:scope:transfer.api.globus.org:all", (0, url_1.build)(config_1.ID, `/v0.10/operation/endpoint/${endpoint_xid}/symlink`), Object.assign({ method: shared_1.HTTP_METHODS.post, body: JSON.stringify(reqBody), headers: (0, shared_2.getHeadersForService)(shared_1.HTTP_METHODS.post) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
return (0, fetch_1.fetchWithScope)("urn:globus:auth:scope:transfer.api.globus.org:all", (0, url_1.build)(config_1.ID, `/v0.10/operation/endpoint/${endpoint_xid}/symlink`), Object.assign({ method: shared_1.HTTP_METHODS.POST, body: JSON.stringify(Object.assign({ DATA_TYPE: "symlink" }, options === null || options === void 0 ? void 0 : options.payload)), headers: (0, shared_2.getHeadersForService)(shared_1.HTTP_METHODS.POST) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
//# sourceMappingURL=file-operations.js.map |
@@ -1,2 +0,2 @@ | ||
import type { SDKOptions, ServiceMethod } from "../../types"; | ||
import type { SDKOptions } from "../../types"; | ||
import type { Transfer } from "../types"; | ||
@@ -9,8 +9,16 @@ /** | ||
*/ | ||
export declare const submitDelete: ServiceMethod<{ | ||
export declare const submitDelete: (options: ({ | ||
payload: Omit<Transfer["Request"]["Delete"], "DATA_TYPE">; | ||
}>; | ||
export declare const submitTransfer: ServiceMethod<{ | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: SDKOptions) => Promise<Response>; | ||
export declare const submitTransfer: (options: ({ | ||
payload: Omit<Transfer["Request"]["Transfer"], "DATA_TYPE">; | ||
}>; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: SDKOptions) => Promise<Response>; | ||
/** | ||
@@ -17,0 +25,0 @@ * Get a submission id, required when submitting transfer and delete tasks. |
@@ -15,13 +15,10 @@ "use strict"; | ||
*/ | ||
const submitDelete = function (options, sdkOptions) { | ||
exports.submitDelete = function (options, sdkOptions) { | ||
var _a; | ||
const reqBody = Object.assign({ DATA_TYPE: "delete" }, options === null || options === void 0 ? void 0 : options.payload); | ||
return (0, fetch_1.fetchWithScope)("urn:globus:auth:scope:transfer.api.globus.org:all", (0, url_1.build)(config_1.ID, `/v0.10/delete`), Object.assign({ method: shared_1.HTTP_METHODS.post, body: JSON.stringify(reqBody), headers: (0, shared_2.getHeadersForService)(shared_1.HTTP_METHODS.post) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
return (0, fetch_1.fetchWithScope)("urn:globus:auth:scope:transfer.api.globus.org:all", (0, url_1.build)(config_1.ID, `/v0.10/delete`), Object.assign({ method: shared_1.HTTP_METHODS.POST, body: JSON.stringify(Object.assign({ DATA_TYPE: "delete" }, options === null || options === void 0 ? void 0 : options.payload)), headers: (0, shared_2.getHeadersForService)(shared_1.HTTP_METHODS.POST) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
exports.submitDelete = submitDelete; | ||
const submitTransfer = function (options, sdkOptions) { | ||
exports.submitTransfer = function (options, sdkOptions) { | ||
var _a; | ||
return (0, fetch_1.fetchWithScope)("urn:globus:auth:scope:transfer.api.globus.org:all", (0, url_1.build)(config_1.ID, `/v0.10/transfer`), Object.assign({ method: shared_1.HTTP_METHODS.post, body: JSON.stringify(Object.assign({ DATA_TYPE: "transfer" }, options === null || options === void 0 ? void 0 : options.payload)), headers: (0, shared_2.getHeadersForService)(shared_1.HTTP_METHODS.post) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
return (0, fetch_1.fetchWithScope)("urn:globus:auth:scope:transfer.api.globus.org:all", (0, url_1.build)(config_1.ID, `/v0.10/transfer`), Object.assign({ method: shared_1.HTTP_METHODS.POST, body: JSON.stringify(Object.assign({ DATA_TYPE: "transfer" }, options === null || options === void 0 ? void 0 : options.payload)), headers: (0, shared_2.getHeadersForService)(shared_1.HTTP_METHODS.POST) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
exports.submitTransfer = submitTransfer; | ||
/** | ||
@@ -28,0 +25,0 @@ * Get a submission id, required when submitting transfer and delete tasks. |
@@ -6,3 +6,3 @@ "use strict"; | ||
function getHeadersForService(method) { | ||
if (method === shared_1.HTTP_METHODS.get) { | ||
if (method === shared_1.HTTP_METHODS.GET) { | ||
return {}; | ||
@@ -9,0 +9,0 @@ } |
import type { FetchOverrides } from "../core/fetch"; | ||
import { stringifyParameters } from "../core/url"; | ||
export interface JSONFetchResponse<Res> extends Response { | ||
@@ -10,2 +11,7 @@ json(): Promise<Res>; | ||
}; | ||
/** | ||
* This isn't used yet, but might be one day. | ||
* @private | ||
* @experimental | ||
*/ | ||
export type ServiceMethodResponse = { | ||
@@ -15,3 +21,3 @@ /** | ||
*/ | ||
_raw: Record<string, Record<string, any>>; | ||
_raw: Record<string, Record<string, unknown>>; | ||
/** | ||
@@ -21,13 +27,21 @@ * Information we deem worthwhile to augment responses with. | ||
*/ | ||
_metadata: Record<string, any>; | ||
data: Record<string, any>; | ||
_metadata: Record<string, unknown>; | ||
data: Record<string, unknown>; | ||
}; | ||
export type ServiceMethodOptions<Q extends Record<string, string>, P extends Record<string, string>> = { | ||
query?: Record<string, any> & Q; | ||
payload?: Record<string, any> & P; | ||
}; | ||
/** | ||
* Our `stringifyParameters` function defines what types of query parameters | ||
* can actually be serialized as part of the URL. | ||
*/ | ||
export type UnknownQueryParameters = Parameters<typeof stringifyParameters>[0]; | ||
export type ServiceMethodOptions = { | ||
query?: UnknownQueryParameters; | ||
payload?: Record<string, unknown>; | ||
} | undefined | never; | ||
export type Segment = string | Record<string, string>; | ||
export type Options = Record<string, never> | Record<string, any> | ServiceMethodOptions<any, any>; | ||
export type ServiceMethod<Options, R extends Response = Response> = (methodOptions?: Options, sdkOptions?: SDKOptions) => Promise<R>; | ||
export type ServiceMethodDynamicSegments<S extends Segment, O extends Options, R extends Response = Response> = (segments: S, methodOptions?: O, sdkOptions?: SDKOptions) => Promise<R>; | ||
export type ServiceMethod<O extends ServiceMethodOptions, R extends Response = Response> = (methodOptions?: O & { | ||
query?: UnknownQueryParameters; | ||
}, sdkOptions?: SDKOptions) => Promise<R>; | ||
export type ServiceMethodDynamicSegments<S extends Segment, O extends ServiceMethodOptions, R extends Response = Response> = (segments: S, methodOptions?: O & { | ||
query?: UnknownQueryParameters; | ||
}, sdkOptions?: SDKOptions) => Promise<R>; | ||
//# sourceMappingURL=types.d.ts.map |
/** | ||
* @module @globus/sdk | ||
* @description `@globus/sdk` provides modules for interacting with the various APIs that make up the Globus platform. | ||
* | ||
* ### Key Concepts | ||
* - All service methods return a `Promise` that resolves to a [Fetch API Response object](https://developer.mozilla.org/en-US/docs/Web/API/Response). | ||
* - Under the hood, we are returning the result of a composed [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch). | ||
* - All service methods accept a `ServiceMethodOptions` object to pass query parameters and a payload. | ||
* - All service methods support a tail argument to pass options to the SDK, including the composed `fetch` call. | ||
* | ||
* @example <caption>Using the SDK to search for endpoints via Transfer API.</caption> | ||
* import { transfer } from "@globus/sdk"; | ||
* | ||
* const result = await (await transfer.endpointSearch({ query: { filter_fulltext: 'Globus Tutorial' }}, { | ||
* fetch: { | ||
* // Provide parameters to the underlying `fetch` call. | ||
* // https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters | ||
* headers: { | ||
* Authorization: `Bearer MY_ACCESS_TOKEN` | ||
* } | ||
* } | ||
* })).json(); | ||
* | ||
* @example <caption>Using the SDK to fetch a single flow from the Flows API.</caption> | ||
* import { flows } from "@globus/sdk"; | ||
* | ||
* const result = await (await flows.flows.get("452bbea3-5e3b-45a5-af08-50179839a4e8")).json(); | ||
*/ | ||
export * from "./lib/sdk"; | ||
export * as authorization from "./lib/core/authorization"; | ||
@@ -9,3 +33,5 @@ export * as auth from "./lib/services/auth"; | ||
export * as search from "./lib/services/search"; | ||
export * as groups from "./lib/services/groups"; | ||
export * as flows from "./lib/services/flows"; | ||
export * as gcs from "./lib/services/globus-connect-server"; | ||
//# sourceMappingURL=index.d.ts.map |
/** | ||
* @module @globus/sdk | ||
* @description `@globus/sdk` provides modules for interacting with the various APIs that make up the Globus platform. | ||
* | ||
* ### Key Concepts | ||
* - All service methods return a `Promise` that resolves to a [Fetch API Response object](https://developer.mozilla.org/en-US/docs/Web/API/Response). | ||
* - Under the hood, we are returning the result of a composed [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch). | ||
* - All service methods accept a `ServiceMethodOptions` object to pass query parameters and a payload. | ||
* - All service methods support a tail argument to pass options to the SDK, including the composed `fetch` call. | ||
* | ||
* @example <caption>Using the SDK to search for endpoints via Transfer API.</caption> | ||
* import { transfer } from "@globus/sdk"; | ||
* | ||
* const result = await (await transfer.endpointSearch({ query: { filter_fulltext: 'Globus Tutorial' }}, { | ||
* fetch: { | ||
* // Provide parameters to the underlying `fetch` call. | ||
* // https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters | ||
* headers: { | ||
* Authorization: `Bearer MY_ACCESS_TOKEN` | ||
* } | ||
* } | ||
* })).json(); | ||
* | ||
* @example <caption>Using the SDK to fetch a single flow from the Flows API.</caption> | ||
* import { flows } from "@globus/sdk"; | ||
* | ||
* const result = await (await flows.flows.get("452bbea3-5e3b-45a5-af08-50179839a4e8")).json(); | ||
*/ | ||
/// <reference types="@globus/types" /> | ||
/// <reference types="@globus/types/auth" /> | ||
/// <reference types="@globus/types/transfer" /> | ||
export * from "./lib/sdk"; | ||
import * as authorization_1 from "./lib/core/authorization"; | ||
@@ -16,4 +37,8 @@ export { authorization_1 as authorization }; | ||
export { search_1 as search }; | ||
import * as groups_1 from "./lib/services/groups"; | ||
export { groups_1 as groups }; | ||
import * as flows_1 from "./lib/services/flows"; | ||
export { flows_1 as flows }; | ||
import * as gcs_1 from "./lib/services/globus-connect-server"; | ||
export { gcs_1 as gcs }; | ||
//# sourceMappingURL=index.js.map |
@@ -7,2 +7,5 @@ import type IConfig from "js-pkce/dist/IConfig"; | ||
}; | ||
/** | ||
* @experimental | ||
*/ | ||
export declare class PKCEAuthorization { | ||
@@ -19,5 +22,11 @@ #private; | ||
} | ||
/** | ||
* @experimental | ||
*/ | ||
export declare function pkce(configuration: PKCEConfiguration): PKCEAuthorization; | ||
/** | ||
* @experimental | ||
*/ | ||
export declare function incremental(configuration: PKCEConfiguration): PKCEAuthorization; | ||
export {}; | ||
//# sourceMappingURL=authorization.d.ts.map |
var _PKCEAuthorization_instances, _PKCEAuthorization_pkce, _PKCEAuthorization_configuration, _PKCEAuthorization_response, _PKCEAuthorization_createPKCEInstance, _PKCEAuthorization_resetPKCE; | ||
import { __awaiter, __classPrivateFieldGet, __classPrivateFieldSet } from "tslib"; | ||
/** | ||
* @description Session and authorization management via PKCE. | ||
* @group Core | ||
* @module | ||
* @experimental | ||
*/ | ||
import PKCE from "js-pkce"; | ||
@@ -8,2 +14,5 @@ import { getAuthorizationEndpoint, getTokenEndpoint } from "../services/auth"; | ||
let storage; | ||
/** | ||
* @experimental | ||
*/ | ||
export class PKCEAuthorization { | ||
@@ -67,5 +76,11 @@ constructor(configuration) { | ||
}; | ||
/** | ||
* @experimental | ||
*/ | ||
export function pkce(configuration) { | ||
return new PKCEAuthorization(configuration); | ||
} | ||
/** | ||
* @experimental | ||
*/ | ||
export function incremental(configuration) { | ||
@@ -72,0 +87,0 @@ return new PKCEAuthorization(configuration); |
import * as AUTH from "./config"; | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
export declare const CONFIG: typeof AUTH; | ||
@@ -3,0 +7,0 @@ import type ITokenResponse from "js-pkce/dist/ITokenResponse"; |
/** | ||
* @description A wrapper around the Globus Auth service. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Auth API Documentation](https://docs.globus.org/api/auth/) | ||
@@ -9,2 +9,6 @@ * @module | ||
import * as AUTH from "./config"; | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
export const CONFIG = AUTH; | ||
@@ -11,0 +15,0 @@ export function getAuthorizationEndpoint() { |
/** | ||
* @description A wrapper around the Globus Flows service. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Flows API Documentation](https://docs.globus.org/api/flows/) | ||
@@ -8,6 +8,9 @@ * @module | ||
import * as FLOWS from "./config"; | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
export declare const CONFIG: typeof FLOWS; | ||
export * as flows from "./service/flows"; | ||
export * as runs from "./service/runs"; | ||
export * as batch from "./service/batch"; | ||
//# sourceMappingURL=index.d.ts.map |
/** | ||
* @description A wrapper around the Globus Flows service. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Flows API Documentation](https://docs.globus.org/api/flows/) | ||
@@ -8,2 +8,6 @@ * @module | ||
import * as FLOWS from "./config"; | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
export const CONFIG = FLOWS; | ||
@@ -14,4 +18,2 @@ import * as flows_1 from "./service/flows"; | ||
export { runs_1 as runs }; | ||
import * as batch_1 from "./service/batch"; | ||
export { batch_1 as batch }; | ||
//# sourceMappingURL=index.js.map |
/** | ||
* @see https://globusonline.github.io/flows/#tag/Flows/paths/~1flows/get | ||
*/ | ||
export declare const getAll: (parameters?: Record<string, string> | undefined, options?: import("../../../services/types").SDKOptions | undefined) => Promise<Response>; | ||
export declare const getAll: (parameters?: (Record<string, string> & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, options?: import("../../../services/types").SDKOptions | undefined) => Promise<Response>; | ||
/** | ||
@@ -6,0 +10,0 @@ * @see https://globusonline.github.io/flows/#tag/Flows/paths/~1flows~1{flow_id}/get |
@@ -5,3 +5,7 @@ /** | ||
*/ | ||
export declare const getAll: (parameters?: Record<string, string> | undefined, options?: import("../../../services/types").SDKOptions | undefined) => Promise<Response>; | ||
export declare const getAll: (parameters?: (Record<string, string> & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, options?: import("../../../services/types").SDKOptions | undefined) => Promise<Response>; | ||
//# sourceMappingURL=runs.d.ts.map |
/** | ||
* @description A wrapper around the Globus Connect Server Manager API. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Connect Server Manager API Documentation](https://docs.globus.org/globus-connect-server/v5.4/api/) | ||
@@ -8,3 +8,3 @@ * @module | ||
/// <reference types="@globus/types" /> | ||
import type { Segment, Options, SDKOptions, ServiceMethod, ServiceMethodDynamicSegments } from "../types"; | ||
import type { Segment, ServiceMethodOptions, SDKOptions, ServiceMethod, ServiceMethodDynamicSegments, UnknownQueryParameters } from "../types"; | ||
/** | ||
@@ -38,3 +38,5 @@ * Service methods for the Globus Connect Server Manager API. | ||
*/ | ||
export type GCSServiceMethod<O extends Options, R extends Response = Response> = (configuration: GCSConfiguration, methodOptions?: O, sdkOptions?: SDKOptions) => ReturnType<ServiceMethod<O, R>>; | ||
export type GCSServiceMethod<O extends ServiceMethodOptions, R extends Response = Response> = (configuration: GCSConfiguration, methodOptions?: O & { | ||
query?: UnknownQueryParameters; | ||
}, sdkOptions?: SDKOptions) => ReturnType<ServiceMethod<O, R>>; | ||
/** | ||
@@ -44,3 +46,5 @@ * The GCSServiceMethodDynamicSegments type is similar to the core ServiceMethodDynamicSegments type, but | ||
*/ | ||
export type GCSServiceMethodDynamicSegments<S extends Segment, O extends Options, R extends Response = Response> = (configuration: GCSConfiguration, segments: S, methodOptions?: O, sdkOptions?: SDKOptions) => ReturnType<ServiceMethodDynamicSegments<S, O, R>>; | ||
export type GCSServiceMethodDynamicSegments<S extends Segment, O extends ServiceMethodOptions, R extends Response = Response> = (configuration: GCSConfiguration, segments: S, methodOptions?: O & { | ||
query?: UnknownQueryParameters; | ||
}, sdkOptions?: SDKOptions) => ReturnType<ServiceMethodDynamicSegments<S, O, R>>; | ||
//# sourceMappingURL=index.d.ts.map |
/** | ||
* @description A wrapper around the Globus Connect Server Manager API. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Connect Server Manager API Documentation](https://docs.globus.org/globus-connect-server/v5.4/api/) | ||
@@ -5,0 +5,0 @@ * @module |
@@ -6,13 +6,25 @@ import type { JSONFetchResponse } from "../../types"; | ||
*/ | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, parameters?: { | ||
include?: "private_policies"[] | undefined; | ||
filter?: ("mapped_collections" | "guest_collections" | "managed_by_me" | "created_by_me")[] | undefined; | ||
mapped_collection_id?: string | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["listCollections"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
query?: { | ||
include?: "private_policies"[] | undefined; | ||
filter?: ("mapped_collections" | "guest_collections" | "managed_by_me" | "created_by_me")[] | undefined; | ||
mapped_collection_id?: string | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["listCollections"]["responses"]["200"]["content"]["application/json"]>>; | ||
/** | ||
* @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#getCollection | ||
*/ | ||
export declare const get: (configuration: import("../index").GCSConfiguration, collection_id: string, parameters?: { | ||
include?: "private_policies"[] | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["getCollection"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const get: (configuration: import("../index").GCSConfiguration, collection_id: string, options?: ({ | ||
query?: { | ||
include?: "private_policies"[] | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["getCollection"]["responses"]["200"]["content"]["application/json"]>>; | ||
//# sourceMappingURL=collections.d.ts.map |
@@ -7,5 +7,5 @@ import { getRequiredScopes } from "../index"; | ||
*/ | ||
export const getAll = function (configuration, parameters, sdkOptions) { | ||
export const getAll = function (configuration, options, sdkOptions) { | ||
var _a; | ||
return fetchWithScope(getRequiredScopes(configuration), build(configuration, `/api/collections`, { search: parameters }), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
return fetchWithScope(getRequiredScopes(configuration), build(configuration, `/api/collections`, { search: options === null || options === void 0 ? void 0 : options.query }), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
@@ -15,8 +15,8 @@ /** | ||
*/ | ||
export const get = function (configuration, collection_id, parameters, sdkOptions) { | ||
export const get = function (configuration, collection_id, options, sdkOptions) { | ||
var _a; | ||
return fetchWithScope(getRequiredScopes(configuration), build(configuration, `/api/collections/${collection_id}`, { | ||
search: parameters, | ||
search: options === null || options === void 0 ? void 0 : options.query, | ||
}), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
//# sourceMappingURL=collections.js.map |
@@ -6,3 +6,3 @@ import type { JSONFetchResponse } from "../../types"; | ||
*/ | ||
export declare const get: (configuration: import("../index").GCSConfiguration, _parameters?: undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["getEndpoint"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const get: (configuration: import("../index").GCSConfiguration, _options?: undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["getEndpoint"]["responses"]["200"]["content"]["application/json"]>>; | ||
//# sourceMappingURL=endpoint.d.ts.map |
@@ -7,3 +7,3 @@ import { getRequiredScopes } from "../index"; | ||
*/ | ||
export const get = function (configuration, _parameters, sdkOptions) { | ||
export const get = function (configuration, _options, sdkOptions) { | ||
var _a; | ||
@@ -10,0 +10,0 @@ return fetchWithScope(getRequiredScopes(configuration), build(configuration, `/api/endpoint`), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); |
@@ -6,5 +6,11 @@ import type { JSONFetchResponse } from "../../types"; | ||
*/ | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, parameters?: { | ||
include?: "all_roles"[] | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["listRoles"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
query?: { | ||
include?: "all_roles"[] | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["listRoles"]["responses"]["200"]["content"]["application/json"]>>; | ||
/** | ||
@@ -11,0 +17,0 @@ * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Roles/#getRole |
@@ -7,6 +7,6 @@ import { getRequiredScopes } from "../index"; | ||
*/ | ||
export const getAll = function (configuration, parameters, sdkOptions) { | ||
export const getAll = function (configuration, options, sdkOptions) { | ||
var _a; | ||
return fetchWithScope(getRequiredScopes(configuration), build(configuration, `/api/roles`, { | ||
search: parameters, | ||
search: options === null || options === void 0 ? void 0 : options.query, | ||
}), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
@@ -13,0 +13,0 @@ }; |
@@ -6,11 +6,23 @@ import type { JSONFetchResponse } from "../../types"; | ||
*/ | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, parameters?: { | ||
include?: ("private_policies" | "accounts")[] | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["listStorageGateways"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
query?: { | ||
include?: ("private_policies" | "accounts")[] | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["listStorageGateways"]["responses"]["200"]["content"]["application/json"]>>; | ||
/** | ||
* @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Storage_Gateways/#getStorageGateway | ||
*/ | ||
export declare const get: (configuration: import("../index").GCSConfiguration, storage_gateway_id: string, parameters?: { | ||
include?: ("private_policies" | "accounts")[] | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["getStorageGateway"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const get: (configuration: import("../index").GCSConfiguration, storage_gateway_id: string, options?: ({ | ||
query?: { | ||
include?: ("private_policies" | "accounts")[] | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["getStorageGateway"]["responses"]["200"]["content"]["application/json"]>>; | ||
//# sourceMappingURL=storage-gateways.d.ts.map |
@@ -7,6 +7,6 @@ import { getRequiredScopes } from "../index"; | ||
*/ | ||
export const getAll = function (configuration, parameters, sdkOptions) { | ||
export const getAll = function (configuration, options, sdkOptions) { | ||
var _a; | ||
return fetchWithScope(getRequiredScopes(configuration), build(configuration, `/api/storage_gateways`, { | ||
search: parameters, | ||
search: options === null || options === void 0 ? void 0 : options.query, | ||
}), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
@@ -17,8 +17,8 @@ }; | ||
*/ | ||
export const get = function (configuration, storage_gateway_id, parameters, sdkOptions) { | ||
export const get = function (configuration, storage_gateway_id, options, sdkOptions) { | ||
var _a; | ||
return fetchWithScope(getRequiredScopes(configuration), build(configuration, `/api/storage_gateways/${storage_gateway_id}`, { | ||
search: parameters, | ||
search: options === null || options === void 0 ? void 0 : options.query, | ||
}), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
//# sourceMappingURL=storage-gateways.js.map |
@@ -6,10 +6,16 @@ import type { JSONFetchResponse } from "../../types"; | ||
*/ | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, parameters?: { | ||
include?: "all"[] | undefined; | ||
storage_gateway?: string | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["listUserCredentials"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const getAll: (configuration: import("../index").GCSConfiguration, options?: ({ | ||
query?: { | ||
include?: "all"[] | undefined; | ||
storage_gateway?: string | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["listUserCredentials"]["responses"]["200"]["content"]["application/json"]>>; | ||
/** | ||
* @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_User_Credentials/#getUserCredential | ||
*/ | ||
export declare const get: (configuration: import("../index").GCSConfiguration, user_credential_id: string, _parameters?: undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["getCollection"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const get: (configuration: import("../index").GCSConfiguration, user_credential_id: string, options?: undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["getCollection"]["responses"]["200"]["content"]["application/json"]>>; | ||
//# sourceMappingURL=user-credentials.d.ts.map |
@@ -7,6 +7,6 @@ import { getRequiredScopes } from "../index"; | ||
*/ | ||
export const getAll = function (configuration, parameters, sdkOptions) { | ||
export const getAll = function (configuration, options, sdkOptions) { | ||
var _a; | ||
return fetchWithScope(getRequiredScopes(configuration), build(configuration, `/api/user_credentials`, { | ||
search: parameters, | ||
search: options === null || options === void 0 ? void 0 : options.query, | ||
}), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
@@ -17,3 +17,3 @@ }; | ||
*/ | ||
export const get = function (configuration, user_credential_id, _parameters, sdkOptions) { | ||
export const get = function (configuration, user_credential_id, options, sdkOptions) { | ||
var _a; | ||
@@ -20,0 +20,0 @@ return fetchWithScope(getRequiredScopes(configuration), build(configuration, `/api/user_credentials/${user_credential_id}`), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); |
/** | ||
* @description A wrapper around the Groups API. | ||
* @category Service | ||
* @group Service | ||
* @see [Groups API Documentation](https://docs.globus.org/api/groups/) | ||
@@ -8,2 +8,6 @@ * @module | ||
import * as GROUPS from "./config"; | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
export declare const CONFIG: typeof GROUPS; | ||
@@ -10,0 +14,0 @@ /** |
/** | ||
* @description A wrapper around the Groups API. | ||
* @category Service | ||
* @group Service | ||
* @see [Groups API Documentation](https://docs.globus.org/api/groups/) | ||
@@ -8,2 +8,6 @@ * @module | ||
import * as GROUPS from "./config"; | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
export const CONFIG = GROUPS; | ||
@@ -10,0 +14,0 @@ import * as groups_1 from "./service/groups"; |
@@ -6,14 +6,24 @@ import type { JSONFetchResponse } from "../../types"; | ||
*/ | ||
export declare const getMyGroups: (parameters?: { | ||
/** | ||
* @todo This should probably be replaced with a more specific type for the method's accepted query parameters once available. | ||
*/ | ||
statuses?: ("active" | "invited" | "pending" | "rejected" | "removed" | "left" | "declined")[] | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["get_my_groups_and_memberships_v2_groups_my_groups_get"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const getMyGroups: (options?: ({ | ||
query?: { | ||
/** | ||
* @todo This should probably be replaced with a more specific type for the method's accepted query parameters once available. | ||
*/ | ||
statuses?: ("active" | "invited" | "pending" | "rejected" | "removed" | "left" | "declined")[] | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["get_my_groups_and_memberships_v2_groups_my_groups_get"]["responses"]["200"]["content"]["application/json"]>>; | ||
/** | ||
* @see https://groups.api.globus.org/redoc#tag/groups/operation/get_group_v2_groups__group_id__get | ||
*/ | ||
export declare const get: (group_id: string, parameters?: (Record<string, any> & { | ||
include?: string[] | undefined; | ||
export declare const get: (group_id: string, options?: ({ | ||
query?: operations["get_group_v2_groups__group_id__get"]["parameters"]["query"]; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["get_group_v2_groups__group_id__get"]["responses"]["200"]["content"]["application/json"]>>; | ||
//# sourceMappingURL=groups.d.ts.map |
@@ -7,6 +7,6 @@ import { ID, SCOPES } from "../config"; | ||
*/ | ||
export const getMyGroups = function (parameters, sdkOptions) { | ||
export const getMyGroups = function (options = {}, sdkOptions) { | ||
var _a; | ||
return fetchWithScope(SCOPES.ALL, build(ID, `/v2/groups/my_groups`, { | ||
search: parameters, | ||
search: options.query, | ||
}), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
@@ -17,8 +17,8 @@ }; | ||
*/ | ||
export const get = function (group_id, parameters, sdkOptions) { | ||
export const get = function (group_id, options = {}, sdkOptions) { | ||
var _a; | ||
return fetchWithScope(SCOPES.ALL, build(ID, `/v2/groups/${group_id}`, { | ||
search: parameters, | ||
search: options.query, | ||
}), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
//# sourceMappingURL=groups.js.map |
@@ -7,5 +7,9 @@ import type { JSONFetchResponse } from "../../types"; | ||
*/ | ||
export declare const act: (group_id: string, options: { | ||
export declare const act: (group_id: string, options: ({ | ||
payload: operations["group_membership_post_actions_v2_groups__group_id__post"]["requestBody"]["content"]["application/json"]; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["group_membership_post_actions_v2_groups__group_id__post"]["responses"]["200"]["content"]["application/json"]>>; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["group_membership_post_actions_v2_groups__group_id__post"]["responses"]["200"]["content"]["application/json"]>>; | ||
//# sourceMappingURL=membership.d.ts.map |
@@ -6,3 +6,3 @@ import type { JSONFetchResponse } from "../../types"; | ||
*/ | ||
export declare const get: (group_id: string, _parameters?: undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["get_policies_v2_groups__group_id__policies_get"]["responses"]["200"]["content"]["application/json"]>>; | ||
export declare const get: (group_id: string, _options?: undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<JSONFetchResponse<operations["get_policies_v2_groups__group_id__policies_get"]["responses"]["200"]["content"]["application/json"]>>; | ||
//# sourceMappingURL=policies.d.ts.map |
@@ -7,3 +7,3 @@ import { ID, SCOPES } from "../config"; | ||
*/ | ||
export const get = function (group_id, _parameters, sdkOptions) { | ||
export const get = function (group_id, _options, sdkOptions) { | ||
var _a; | ||
@@ -10,0 +10,0 @@ return fetchWithScope(SCOPES.ALL, build(ID, `/v2/groups/${group_id}/policies`), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); |
/** | ||
* @description A wrapper around the Globus Search service. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Search API Documentation](https://docs.globus.org/api/search/reference/) | ||
@@ -8,4 +8,8 @@ * @module | ||
import * as SEARCH from "./config"; | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
export declare const CONFIG: typeof SEARCH; | ||
export * as query from "./service/query"; | ||
//# sourceMappingURL=index.d.ts.map |
/** | ||
* @description A wrapper around the Globus Search service. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Search API Documentation](https://docs.globus.org/api/search/reference/) | ||
@@ -8,2 +8,6 @@ * @module | ||
import * as SEARCH from "./config"; | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
export const CONFIG = SEARCH; | ||
@@ -10,0 +14,0 @@ import * as query_1 from "./service/query"; |
/** | ||
* @param index_id The UUID of the index to query. | ||
* @param parameters The query parameters. | ||
* @param sdkOptions Optional SDK options and overrides. | ||
* | ||
* @see https://docs.globus.org/api/search/reference/get_query/ | ||
*/ | ||
export declare const get: (index_id: string, parameters: { | ||
q: string; | ||
offset?: `${number}` | undefined; | ||
limit?: `${number}` | undefined; | ||
advanced?: "true" | "false" | undefined; | ||
bypass_visible_to?: "true" | "false" | undefined; | ||
result_format_version?: string | undefined; | ||
filter_principal_sets?: string | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
export declare const get: (index_id: string, options?: ({ | ||
/** | ||
* @see https://docs.globus.org/api/search/reference/get_query/#parameters | ||
*/ | ||
query?: { | ||
q: string; | ||
offset?: `${number}` | undefined; | ||
limit?: `${number}` | undefined; | ||
advanced?: "true" | "false" | undefined; | ||
bypass_visible_to?: "true" | "false" | undefined; | ||
result_format_version?: string | undefined; | ||
filter_principal_sets?: string | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
//# sourceMappingURL=query.d.ts.map |
@@ -6,13 +6,11 @@ import { build } from "../../../core/url"; | ||
* @param index_id The UUID of the index to query. | ||
* @param parameters The query parameters. | ||
* @param sdkOptions Optional SDK options and overrides. | ||
* | ||
* @see https://docs.globus.org/api/search/reference/get_query/ | ||
*/ | ||
export const get = function (index_id, parameters, sdkOptions) { | ||
export const get = function (index_id, options, sdkOptions) { | ||
var _a; | ||
return fetchWithScope(SCOPES.SEARCH, build(ID, `/v1/index/${index_id}/search`, { | ||
search: parameters, | ||
search: options === null || options === void 0 ? void 0 : options.query, | ||
}), Object.assign({}, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
//# sourceMappingURL=query.js.map |
export declare enum HTTP_METHODS { | ||
post = "post", | ||
get = "get", | ||
delete = "delete" | ||
POST = "POST", | ||
GET = "GET", | ||
DELETE = "DELETE", | ||
PUT = "PUT" | ||
} | ||
//# sourceMappingURL=shared.d.ts.map |
export var HTTP_METHODS; | ||
(function (HTTP_METHODS) { | ||
HTTP_METHODS["post"] = "post"; | ||
HTTP_METHODS["get"] = "get"; | ||
HTTP_METHODS["delete"] = "delete"; | ||
HTTP_METHODS["POST"] = "POST"; | ||
HTTP_METHODS["GET"] = "GET"; | ||
HTTP_METHODS["DELETE"] = "DELETE"; | ||
HTTP_METHODS["PUT"] = "PUT"; | ||
})(HTTP_METHODS || (HTTP_METHODS = {})); | ||
//# sourceMappingURL=shared.js.map |
@@ -1,5 +0,4 @@ | ||
/// <reference types="@globus/types/transfer" /> | ||
/** | ||
* @description A wrapper around the Globus Transfer service. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Transfer API Documentation](https://docs.globus.org/api/transfer/) | ||
@@ -9,4 +8,9 @@ * @module | ||
import * as TRANSFER from "./config"; | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
export declare const CONFIG: typeof TRANSFER; | ||
export declare const endpointSearch: (parameters?: Globus.Transfer.EndpointSearchQuery | undefined, options?: import("../types").SDKOptions | undefined) => Promise<Response>; | ||
import { endpointSearch } from "./service/endpoint-search"; | ||
export { endpointSearch }; | ||
export * as fileOperations from "./service/file-operations"; | ||
@@ -13,0 +17,0 @@ export * as taskSubmission from "./service/task-submission"; |
/** | ||
* @description A wrapper around the Globus Transfer service. | ||
* @category Service | ||
* @group Service | ||
* @see [Globus Transfer API Documentation](https://docs.globus.org/api/transfer/) | ||
@@ -8,5 +8,9 @@ * @module | ||
import * as TRANSFER from "./config"; | ||
/** | ||
* @private | ||
* @internal | ||
*/ | ||
export const CONFIG = TRANSFER; | ||
import _endpointSearch from "./service/endpoint-search"; | ||
export const endpointSearch = _endpointSearch; | ||
import { endpointSearch } from "./service/endpoint-search"; | ||
export { endpointSearch }; | ||
import * as fileOperations_1 from "./service/file-operations"; | ||
@@ -13,0 +17,0 @@ export { fileOperations_1 as fileOperations }; |
@@ -1,9 +0,14 @@ | ||
/// <reference types="@globus/types" /> | ||
/// <reference types="@globus/types/auth" /> | ||
/// <reference types="@globus/types/transfer" /> | ||
import type { SDKOptions } from "../../../services/types"; | ||
/** | ||
* Get a list of endpoints matching the search filters in a given search scope. | ||
* @see https://docs.globus.org/api/transfer/endpoint_search/#endpoint_search | ||
*/ | ||
export declare const endpointSearch: (parameters?: Globus.Transfer.EndpointSearchQuery, options?: import("../../../services/types").SDKOptions | undefined) => Promise<Response>; | ||
export declare const endpointSearch: (options?: { | ||
/** | ||
* @todo This type needs to be converted to a record and this method updated | ||
* to `satisfies` `ServiceMethod`. | ||
*/ | ||
query?: Globus.Transfer.EndpointSearchQuery; | ||
}, sdkOptions?: SDKOptions) => Promise<Response>; | ||
export default endpointSearch; | ||
//# sourceMappingURL=endpoint-search.d.ts.map |
@@ -5,2 +5,3 @@ import { build } from "../../../core/url"; | ||
/** | ||
* Get a list of endpoints matching the search filters in a given search scope. | ||
* @see https://docs.globus.org/api/transfer/endpoint_search/#endpoint_search | ||
@@ -12,3 +13,3 @@ */ | ||
*/ | ||
parameters, options) { | ||
options, sdkOptions) { | ||
var _a; | ||
@@ -20,6 +21,6 @@ return fetchWithScope("urn:globus:auth:scope:transfer.api.globus.org:all", build(ID, `/v0.10/endpoint_search`, { | ||
*/ | ||
search: parameters, | ||
}), (_a = options === null || options === void 0 ? void 0 : options.fetch) === null || _a === void 0 ? void 0 : _a.options); | ||
search: options === null || options === void 0 ? void 0 : options.query, | ||
}), (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options); | ||
}; | ||
export default endpointSearch; | ||
//# sourceMappingURL=endpoint-search.js.map |
@@ -8,10 +8,16 @@ import type { Transfer } from "../types"; | ||
*/ | ||
export declare const ls: (endpoint_xid: string, parameters?: { | ||
path?: string | undefined; | ||
show_hidden?: "true" | "false" | undefined; | ||
limit?: `${number}` | undefined; | ||
offset?: `${number}` | undefined; | ||
orderby?: string | undefined; | ||
filter?: string | undefined; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
export declare const ls: (endpoint_xid: string, options?: ({ | ||
query?: { | ||
path?: string | undefined; | ||
show_hidden?: "true" | "false" | undefined; | ||
limit?: `${number}` | undefined; | ||
offset?: `${number}` | undefined; | ||
orderby?: string | undefined; | ||
filter?: string | undefined; | ||
} | undefined; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
/** | ||
@@ -23,5 +29,9 @@ * Create a directory at the specified path on an endpoint filesystem. | ||
*/ | ||
export declare const mkdir: (endpoint_xid: string, options: { | ||
export declare const mkdir: (endpoint_xid: string, options: ({ | ||
payload: Omit<Transfer["Request"]["Mkdir"], "DATA_TYPE">; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
/** | ||
@@ -35,5 +45,9 @@ * Rename or move a file, directory, or symlink on an endpoint filesystem. | ||
*/ | ||
export declare const rename: (endpoint_xid: string, options: { | ||
export declare const rename: (endpoint_xid: string, options: ({ | ||
payload: Omit<Transfer["Request"]["Rename"], "DATA_TYPE">; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
/** | ||
@@ -45,5 +59,9 @@ * Create a directory at the specified path on an endpoint filesystem. | ||
*/ | ||
export declare const symlink: (endpoint_xid: string, options: { | ||
export declare const symlink: (endpoint_xid: string, options: ({ | ||
payload: Omit<Transfer["Request"]["Symlink"], "DATA_TYPE">; | ||
} | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: import("../../types").SDKOptions | undefined) => Promise<Response>; | ||
//# sourceMappingURL=file-operations.d.ts.map |
@@ -12,6 +12,6 @@ import { build } from "../../../core/url"; | ||
*/ | ||
export const ls = function (endpoint_xid, parameters, sdkOptions) { | ||
export const ls = function (endpoint_xid, options, sdkOptions) { | ||
var _a; | ||
return fetchWithScope("urn:globus:auth:scope:transfer.api.globus.org:all", build(ID, `/v0.10/operation/endpoint/${endpoint_xid}/ls`, { | ||
search: parameters, | ||
search: options === null || options === void 0 ? void 0 : options.query, | ||
}), (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options); | ||
@@ -27,4 +27,3 @@ }; | ||
var _a; | ||
const reqBody = Object.assign({ DATA_TYPE: "mkdir" }, options === null || options === void 0 ? void 0 : options.payload); | ||
return fetchWithScope("urn:globus:auth:scope:transfer.api.globus.org:all", build(ID, `/v0.10/operation/endpoint/${endpoint_xid}/mkdir`), Object.assign({ method: HTTP_METHODS.post, body: JSON.stringify(reqBody), headers: getHeadersForService(HTTP_METHODS.post) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
return fetchWithScope("urn:globus:auth:scope:transfer.api.globus.org:all", build(ID, `/v0.10/operation/endpoint/${endpoint_xid}/mkdir`), Object.assign({ method: HTTP_METHODS.POST, body: JSON.stringify(Object.assign({ DATA_TYPE: "mkdir" }, options === null || options === void 0 ? void 0 : options.payload)), headers: getHeadersForService(HTTP_METHODS.POST) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
@@ -41,4 +40,3 @@ /** | ||
var _a; | ||
const reqBody = Object.assign({ DATA_TYPE: "rename" }, options === null || options === void 0 ? void 0 : options.payload); | ||
return fetchWithScope("urn:globus:auth:scope:transfer.api.globus.org:all", build(ID, `/v0.10/operation/endpoint/${endpoint_xid}/rename`), Object.assign({ method: HTTP_METHODS.post, body: JSON.stringify(reqBody), headers: getHeadersForService(HTTP_METHODS.post) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
return fetchWithScope("urn:globus:auth:scope:transfer.api.globus.org:all", build(ID, `/v0.10/operation/endpoint/${endpoint_xid}/rename`), Object.assign({ method: HTTP_METHODS.POST, body: JSON.stringify(Object.assign({ DATA_TYPE: "rename" }, options === null || options === void 0 ? void 0 : options.payload)), headers: getHeadersForService(HTTP_METHODS.POST) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
@@ -53,5 +51,4 @@ /** | ||
var _a; | ||
const reqBody = Object.assign({ DATA_TYPE: "symlink" }, options === null || options === void 0 ? void 0 : options.payload); | ||
return fetchWithScope("urn:globus:auth:scope:transfer.api.globus.org:all", build(ID, `/v0.10/operation/endpoint/${endpoint_xid}/symlink`), Object.assign({ method: HTTP_METHODS.post, body: JSON.stringify(reqBody), headers: getHeadersForService(HTTP_METHODS.post) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
return fetchWithScope("urn:globus:auth:scope:transfer.api.globus.org:all", build(ID, `/v0.10/operation/endpoint/${endpoint_xid}/symlink`), Object.assign({ method: HTTP_METHODS.POST, body: JSON.stringify(Object.assign({ DATA_TYPE: "symlink" }, options === null || options === void 0 ? void 0 : options.payload)), headers: getHeadersForService(HTTP_METHODS.POST) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
//# sourceMappingURL=file-operations.js.map |
@@ -1,2 +0,2 @@ | ||
import type { SDKOptions, ServiceMethod } from "../../types"; | ||
import type { SDKOptions } from "../../types"; | ||
import type { Transfer } from "../types"; | ||
@@ -9,8 +9,16 @@ /** | ||
*/ | ||
export declare const submitDelete: ServiceMethod<{ | ||
export declare const submitDelete: (options: ({ | ||
payload: Omit<Transfer["Request"]["Delete"], "DATA_TYPE">; | ||
}>; | ||
export declare const submitTransfer: ServiceMethod<{ | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: SDKOptions) => Promise<Response>; | ||
export declare const submitTransfer: (options: ({ | ||
payload: Omit<Transfer["Request"]["Transfer"], "DATA_TYPE">; | ||
}>; | ||
} & { | ||
query?: { | ||
[key: string]: string | number | (string | number | null | undefined)[] | null | undefined; | ||
} | undefined; | ||
}) | undefined, sdkOptions?: SDKOptions) => Promise<Response>; | ||
/** | ||
@@ -17,0 +25,0 @@ * Get a submission id, required when submitting transfer and delete tasks. |
@@ -14,8 +14,7 @@ import { build } from "../../../core/url"; | ||
var _a; | ||
const reqBody = Object.assign({ DATA_TYPE: "delete" }, options === null || options === void 0 ? void 0 : options.payload); | ||
return fetchWithScope("urn:globus:auth:scope:transfer.api.globus.org:all", build(ID, `/v0.10/delete`), Object.assign({ method: HTTP_METHODS.post, body: JSON.stringify(reqBody), headers: getHeadersForService(HTTP_METHODS.post) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
return fetchWithScope("urn:globus:auth:scope:transfer.api.globus.org:all", build(ID, `/v0.10/delete`), Object.assign({ method: HTTP_METHODS.POST, body: JSON.stringify(Object.assign({ DATA_TYPE: "delete" }, options === null || options === void 0 ? void 0 : options.payload)), headers: getHeadersForService(HTTP_METHODS.POST) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
export const submitTransfer = function (options, sdkOptions) { | ||
var _a; | ||
return fetchWithScope("urn:globus:auth:scope:transfer.api.globus.org:all", build(ID, `/v0.10/transfer`), Object.assign({ method: HTTP_METHODS.post, body: JSON.stringify(Object.assign({ DATA_TYPE: "transfer" }, options === null || options === void 0 ? void 0 : options.payload)), headers: getHeadersForService(HTTP_METHODS.post) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
return fetchWithScope("urn:globus:auth:scope:transfer.api.globus.org:all", build(ID, `/v0.10/transfer`), Object.assign({ method: HTTP_METHODS.POST, body: JSON.stringify(Object.assign({ DATA_TYPE: "transfer" }, options === null || options === void 0 ? void 0 : options.payload)), headers: getHeadersForService(HTTP_METHODS.POST) }, (_a = sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.fetch) === null || _a === void 0 ? void 0 : _a.options)); | ||
}; | ||
@@ -22,0 +21,0 @@ /** |
import { HTTP_METHODS } from "../shared"; | ||
export function getHeadersForService(method) { | ||
if (method === HTTP_METHODS.get) { | ||
if (method === HTTP_METHODS.GET) { | ||
return {}; | ||
@@ -5,0 +5,0 @@ } |
import type { FetchOverrides } from "../core/fetch"; | ||
import { stringifyParameters } from "../core/url"; | ||
export interface JSONFetchResponse<Res> extends Response { | ||
@@ -10,2 +11,7 @@ json(): Promise<Res>; | ||
}; | ||
/** | ||
* This isn't used yet, but might be one day. | ||
* @private | ||
* @experimental | ||
*/ | ||
export type ServiceMethodResponse = { | ||
@@ -15,3 +21,3 @@ /** | ||
*/ | ||
_raw: Record<string, Record<string, any>>; | ||
_raw: Record<string, Record<string, unknown>>; | ||
/** | ||
@@ -21,13 +27,21 @@ * Information we deem worthwhile to augment responses with. | ||
*/ | ||
_metadata: Record<string, any>; | ||
data: Record<string, any>; | ||
_metadata: Record<string, unknown>; | ||
data: Record<string, unknown>; | ||
}; | ||
export type ServiceMethodOptions<Q extends Record<string, string>, P extends Record<string, string>> = { | ||
query?: Record<string, any> & Q; | ||
payload?: Record<string, any> & P; | ||
}; | ||
/** | ||
* Our `stringifyParameters` function defines what types of query parameters | ||
* can actually be serialized as part of the URL. | ||
*/ | ||
export type UnknownQueryParameters = Parameters<typeof stringifyParameters>[0]; | ||
export type ServiceMethodOptions = { | ||
query?: UnknownQueryParameters; | ||
payload?: Record<string, unknown>; | ||
} | undefined | never; | ||
export type Segment = string | Record<string, string>; | ||
export type Options = Record<string, never> | Record<string, any> | ServiceMethodOptions<any, any>; | ||
export type ServiceMethod<Options, R extends Response = Response> = (methodOptions?: Options, sdkOptions?: SDKOptions) => Promise<R>; | ||
export type ServiceMethodDynamicSegments<S extends Segment, O extends Options, R extends Response = Response> = (segments: S, methodOptions?: O, sdkOptions?: SDKOptions) => Promise<R>; | ||
export type ServiceMethod<O extends ServiceMethodOptions, R extends Response = Response> = (methodOptions?: O & { | ||
query?: UnknownQueryParameters; | ||
}, sdkOptions?: SDKOptions) => Promise<R>; | ||
export type ServiceMethodDynamicSegments<S extends Segment, O extends ServiceMethodOptions, R extends Response = Response> = (segments: S, methodOptions?: O & { | ||
query?: UnknownQueryParameters; | ||
}, sdkOptions?: SDKOptions) => Promise<R>; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@globus/sdk", | ||
"version": "0.4.2-alpha.0", | ||
"version": "0.5.0", | ||
"private": false, | ||
@@ -32,3 +32,3 @@ "description": "The Globus SDK for Javascript", | ||
"ts-jest": "^29.1.1", | ||
"typedoc": "^0.24.6", | ||
"typedoc": "^0.24.8", | ||
"typescript": "5.1.3" | ||
@@ -51,3 +51,3 @@ }, | ||
}, | ||
"gitHead": "e2c2e5efb91d418f28b3e17215e8ead90d32f35c" | ||
"gitHead": "e2a2575a25502645a9e840395d14fb66474db281" | ||
} |
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 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
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 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
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
678483
10458