@globus/sdk 4.4.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/core/authorization/index.js +98 -107
- package/dist/cjs/core/authorization/index.js.map +3 -3
- package/dist/cjs/core/info/index.js +1 -1
- package/dist/cjs/core/info/index.js.map +1 -1
- package/dist/cjs/index.js +98 -107
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/services/globus-connect-server/client.js +1 -1
- package/dist/cjs/services/globus-connect-server/client.js.map +1 -1
- package/dist/esm/core/authorization/AuthorizationManager.d.ts +21 -7
- package/dist/esm/core/authorization/AuthorizationManager.d.ts.map +1 -1
- package/dist/esm/core/authorization/AuthorizationManager.js +45 -14
- package/dist/esm/core/authorization/AuthorizationManager.js.map +1 -1
- package/dist/esm/core/authorization/{TokenLookup.d.ts → TokenManager.d.ts} +3 -7
- package/dist/esm/core/authorization/TokenManager.d.ts.map +1 -0
- package/dist/esm/core/authorization/{TokenLookup.js → TokenManager.js} +36 -46
- package/dist/esm/core/authorization/TokenManager.js.map +1 -0
- package/dist/esm/core/info/version.d.ts +1 -1
- package/dist/esm/core/info/version.js +1 -1
- package/dist/esm/core/storage/memory.d.ts +10 -6
- package/dist/esm/core/storage/memory.d.ts.map +1 -1
- package/dist/esm/core/storage/memory.js +13 -6
- package/dist/esm/core/storage/memory.js.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/umd/globus.production.js +2 -2
- package/dist/umd/globus.production.js.map +4 -4
- package/package.json +2 -2
- package/dist/esm/core/authorization/TokenLookup.d.ts.map +0 -1
- package/dist/esm/core/authorization/TokenLookup.js.map +0 -1
- package/dist/esm/core/storage/index.d.ts +0 -29
- package/dist/esm/core/storage/index.d.ts.map +0 -1
- package/dist/esm/core/storage/index.js +0 -37
- package/dist/esm/core/storage/index.js.map +0 -1
- package/dist/esm/core/storage/local-storage.d.ts +0 -10
- package/dist/esm/core/storage/local-storage.d.ts.map +0 -1
- package/dist/esm/core/storage/local-storage.js +0 -28
- package/dist/esm/core/storage/local-storage.js.map +0 -1
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.ts", "../../src/core/info/index.ts", "../../src/core/info/private.ts", "../../src/core/info/version.ts", "../../src/core/logger.ts", "../../src/core/authorization/index.ts", "../../src/core/authorization/AuthorizationManager.ts", "../../src/services/auth/index.ts", "../../src/services/auth/config.ts", "../../src/services/transfer/config.ts", "../../src/services/flows/config.ts", "../../src/services/timer/config.ts", "../../src/services/groups/config.ts", "../../src/services/search/config.ts", "../../src/services/compute/config.ts", "../../src/core/errors.ts", "../../src/core/global.ts", "../../src/core/url.ts", "../../src/services/auth/service/identities.ts", "../../src/services/shared.ts", "../../src/services/auth/service/oauth2/index.ts", "../../src/services/auth/service/oauth2/token.ts", "../../src/core/
|
|
4
|
-
"sourcesContent": ["/**\n * @module @globus/sdk\n * @description `@globus/sdk` provides modules for interacting with the various APIs that make up the Globus platform.\n *\n * ### Key Concepts\n * - All service methods return a `Promise` that resolves to a [Fetch API Response object](https://developer.mozilla.org/en-US/docs/Web/API/Response).\n * - Under the hood, we are returning the result of a composed [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).\n * - All service methods accept a `ServiceMethodOptions` object to pass query parameters, a payload, and headers.\n * - All service methods support a tail argument to pass options to the SDK, including the composed `fetch` call.\n *\n * #### Service Method Names\n *\n * Basic CRUD operations provided by services are exposed as the following:\n *\n * | Service Method Name | HTTP Method | Description | Example |\n * | --------------------| ----------- | ---------------------------- | ------- |\n * | `get` | `GET` | Fetch a single resource. | `transfer.endpoint.get()` |\n * | `getAll` | `GET` | Fetch a list of resources. | `flows.flows.getAll()` |\n * | `create` | `POST` | Create a new resource. | `gcs.roles.create()` |\n * | `update` | `PUT` | Update an existing resource. | `gcs.endpoint.update()` |\n * | `patch` | `PATCH` | Update an existing resource. | `gcs.endpoint.patch()` |\n * | `remove` | `DELETE` | Delete an existing resource. | `gcs.collections.remove()`|\n *\n * Methods that do not map to obvious CRUD operations are named according to the resource. i.e., `groups.groups.getMyGroups()`, `transfer.endpointSearch()`, `search.query.post()`\n *\n * @example <caption>Using the SDK to search for endpoints via Transfer API.</caption>\n * import { transfer } from \"@globus/sdk\";\n *\n * const result = await (\n * await globus.transfer.endpointSearch(\n * {\n * query: { filter_fulltext: \"Globus Tutorial\" }\n * headers: {\n * Authorization: \"Bearer MY_ACCESS_TOKEN\",\n * },\n * },\n * {\n * fetch: {\n * // Provide parameters to the underlying `fetch` call.\n * // https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters\n * options: {\n * priority: \"high\"\n * },\n * },\n * }\n * )\n * ).json();\n *\n * @example <caption>Using the SDK to fetch a single flow from the Flows API.</caption>\n * import { flows } from \"@globus/sdk\";\n *\n * const result = await (await flows.flows.get(\"452bbea3-5e3b-45a5-af08-50179839a4e8\")).json();\n */\n\n/// <reference types=\"@globus/types\" />\n/// <reference types=\"@globus/types/auth\" />\n/// <reference types=\"@globus/types/transfer\" />\n/// <reference types=\"@globus/types/search\" />\n\n/**\n * Core\n */\nexport * as info from './core/info/index.js';\nexport * as logger from './core/logger.js';\nexport * as authorization from './core/authorization/index.js';\nexport * as errors from './core/errors.js';\n\n/**\n * Services\n */\nexport * as auth from './services/auth/index.js';\nexport * as transfer from './services/transfer/index.js';\nexport * as search from './services/search/index.js';\nexport * as groups from './services/groups/index.js';\nexport * as flows from './services/flows/index.js';\nexport * as gcs from './services/globus-connect-server/index.js';\nexport * as timer from './services/timer/index.js';\nexport * as compute from './services/compute/index.js';\n\n/**\n * Applications\n */\nexport * as webapp from './apps/web.js';\n", "/**\n * @module Information\n * @description This module is mostly intended for internal use, but can be helpful\n * identifying information about the SDK package you are using at runtime.\n */\nimport { toString, isEnabled, CLIENT_INFO_HEADER } from './private.js';\nimport { VERSION as _VERSION } from './version.js';\n\nexport type Version = string;\n\n/**\n * The version of the `@globus/sdk` package that is in use.\n */\nexport const VERSION: Version = _VERSION;\n\nexport type Info = {\n product: string;\n version: Version;\n};\n\n/**\n * The client information identifier for this package.\n */\nexport const CLIENT_INFO: Info = {\n product: 'javascript-sdk',\n version: VERSION,\n};\n\nlet INFOS: Info[] = [CLIENT_INFO];\n\n/**\n * Add a client information identifier to the existing SDK information.\n */\nexport function addClientInfo(info: Info) {\n INFOS = INFOS.concat(info);\n}\n/**\n * Get the current client information as a string.\n */\nexport function getClientInfo(): string {\n return toString(INFOS);\n}\n\nexport function getClientInfoRequestHeaders(): Record<string, string> {\n if (!isEnabled()) {\n return {};\n }\n return {\n [CLIENT_INFO_HEADER]: getClientInfo(),\n };\n}\n", "import type { Info } from './index.js';\n\n/**\n * @private\n */\nexport const CLIENT_INFO_HEADER = `X-Globus-Client-Info`;\n\nlet ENABLED = true;\n/**\n * Disable the client information header from being included in requests (enabled by default).\n * @private\n */\nexport function disable() {\n ENABLED = false;\n}\n\n/**\n * Enables the client information header to be included in requests.\n * @private\n */\nexport function enable() {\n ENABLED = true;\n}\n\n/**\n * Whether or not the client information header should be sent with requests.\n * @private\n */\nexport function isEnabled() {\n return ENABLED;\n}\n\nconst INFOS_SEPERATOR = ';';\nconst INFO_ITEM_SEPARATOR = ',';\n\n/**\n * Exported for test purposes only.\n * @private\n */\nexport function toString(info: Info | Info[]) {\n const infos = Array.isArray(info) ? info : [info];\n return infos\n .map((i) =>\n Object.entries(i)\n .map(([key, value]) => `${key}=${value}`)\n .join(INFO_ITEM_SEPARATOR),\n )\n .join(INFOS_SEPERATOR);\n}\n", "// x-release-please-start-version\nexport const VERSION = '4.4.0';\n// x-release-please-end\n", "const LOG_LEVELS = ['debug', 'info', 'warn', 'error'] as const;\n\ntype LogLevel = (typeof LOG_LEVELS)[number];\n\ntype LogHandler = (...args: unknown[]) => void;\n\ntype Logger = {\n log: LogHandler;\n error?: LogHandler;\n warn?: LogHandler;\n info?: LogHandler;\n debug?: LogHandler;\n};\n/**\n * No logger is set by default.\n */\nlet logger: Logger | undefined;\n/**\n * By default, the logger is set to `error`.\n */\nlet level: number = LOG_LEVELS.indexOf('error');\n/**\n * Set the global logger for the SDK.\n * @param logMechanism The logger to use.\n * @example `log.setLogger(console)`\n */\nexport function setLogger(logMechanism: Logger) {\n logger = logMechanism;\n}\n/**\n * Set the global log level for the logger.\n * @param severity The severity to set the logger to.\n * @example `log.setLogLevel('info')`\n */\nexport function setLogLevel(severity: LogLevel) {\n level = LOG_LEVELS.indexOf(severity);\n}\n/**\n * Log a message to the logger.\n * @param severity The severity of the log entry.\n * @param args The message to log.\n * @private\n */\nexport function log(severity: LogLevel, ...args: unknown[]) {\n if (!logger) return;\n /**\n * If the severity of the entry is less than the logger's configured severity, do not log.\n */\n if (LOG_LEVELS.indexOf(severity) < level) {\n return;\n }\n /**\n * If the logger does not have a handler for the specified severity, use the default `log` handler.\n */\n const handler = logger[severity] ?? logger.log;\n handler(...args);\n}\n", "/**\n * @module Authorization\n * @description Provides modules for interacting with Globus-related authorization contexts in your application.\n * @example\n * import { authorization } from \"globus/sdk\";\n * const manager = authorization.create(...);\n */\nimport {\n AuthorizationManager,\n type AuthorizationManagerConfiguration,\n} from './AuthorizationManager.js';\n\n/**\n * Create an instance of the {@link AuthorizationManager}.\n */\nexport function create(configuration: AuthorizationManagerConfiguration) {\n return new AuthorizationManager(configuration);\n}\n\nexport { AuthorizationManager, AuthorizationManagerConfiguration };\n", "import { jwtDecode } from 'jwt-decode';\n\nimport { isGlobusAuthTokenResponse, isRefreshToken, oauth2 } from '../../services/auth/index.js';\nimport { RESOURCE_SERVERS } from '../../services/auth/config.js';\n\nimport { createStorage, getStorage, StorageOptions } from '../storage/index.js';\nimport { log } from '../logger.js';\n\nimport { Event } from './Event.js';\nimport {\n RedirectTransportOptions,\n GetTokenOptions,\n RedirectTransport,\n} from './RedirectTransport.js';\nimport { TokenLookup } from './TokenLookup.js';\n\nimport {\n isConsentRequiredError,\n isAuthorizationRequirementsError,\n AuthorizationRequirementsError,\n ConsentRequiredError,\n toAuthorizationQueryParams,\n} from '../errors.js';\n\nimport type {\n JwtUserInfo,\n Token,\n TokenResponse,\n TokenWithRefresh,\n} from '../../services/auth/types.js';\n\nexport type AuthorizationManagerConfiguration = {\n client: string;\n scopes?: string;\n redirect: string;\n /**\n * The storage system used by the `AuthorizationManager`.\n *\n * **BREAKING CHANGE NOTICE** In an upcoming release, the default storage system will be changed to `\"memory\"` in order to move toward a \"secure by default\" model.\n * @default \"localStorage\"\n */\n storage?: StorageOptions;\n /**\n * @private\n * @default DEFAULT_CONFIGURATION.useRefreshTokens\n */\n useRefreshTokens?: boolean;\n /**\n * @private\n * @default DEFAULT_CONFIGURATION.defaultScopes\n */\n defaultScopes?: string | false;\n /**\n * Provide an object with event listeners to attach to the instance.\n * This is useful if you need to listen to events that might dispatch immediately\n * after the creation of the instance (constructor), e.g., the `authenticated`.\n */\n events?: Partial<{\n [Event in keyof AuthorizationManager['events']]: Parameters<\n AuthorizationManager['events'][Event]['addListener']\n >[0];\n }>;\n};\n\nconst DEFAULT_CONFIGURATION = {\n useRefreshTokens: false,\n defaultScopes: 'openid profile email',\n};\n\nconst DEFAULT_HANDLE_ERROR_OPTIONS = {\n execute: true,\n additionalParams: undefined,\n};\n\n/**\n * Provides management of Globus authorization context for your application.\n * - Handles the OAuth protcol flow (via PKCE)\n * - Token lifecycle management\n * - Common errors (e.g., `ConsentRequired`, `authorization_requirements`)\n *\n * Once you configure your instance, you can determine the authenticated state using `manager.authenticated`.\n *\n * To prompt a user to authenticate, call `manager.login()` on user interaction \u2013 this will initiate the OAuth protocol flow with your configured client and scopes, resulting in an initial redirect to Globus Auth.\n *\n * Once the user authenticates with Globus Auth, they will be redirected to your application using the configured `redirect` URL. On this URL, you will need to call `manager.handleCodeRedirect` (using a manager instance configured in the same manner that initiated the `manager.login()` call) to complete the PKCE flow, exchanging the provided code for a valid token, or tokens.\n *\n * All tokens managed by the `AuthorizationManager` instance can be found on `manager.token`.\n *\n * ### Registering your Globus Application\n *\n * The `AuthorizationManager` expects your Globus Application to be registered as an OAuth public client.\n * In this Globus Web Application, this option is referenced as \"_Register a thick client or script that will be installed and run by users on their devices_\".\n *\n * @example <caption>Creating an AuthorizationManager instance.</caption>\n * import { authorization } from \"globus/sdk\";\n *\n * const manager = authorization.create({\n * // Your registered Globus Application client ID.\n * client: '...',\n * // The redirect URL for your application; Where you will call `manager.handleCodeRedirect()`\n * redirect: 'https://example.com/callback',\n * // Known scopes required by your application.\n * scopes: 'urn:globus:auth:scope:transfer.api.globus.org:all',\n * });\n */\nexport class AuthorizationManager {\n #transport!: RedirectTransport;\n\n configuration: AuthorizationManagerConfiguration;\n\n #authenticated = false;\n\n /**\n * The `AuthorizationManager` is considered `authenticated` if it has a valid Globus Auth token.\n * It does not necessarily mean that it has a valid token for a specific resource server.\n */\n get authenticated() {\n return this.#authenticated;\n }\n\n /**\n * Set the authenticated state and emit the `authenticated` event.\n */\n set authenticated(value: boolean) {\n /**\n * Avoid emitting the event if the value hasn't changed.\n */\n if (value === this.#authenticated) {\n return;\n }\n this.#authenticated = value;\n this.#emitAuthenticatedState();\n }\n\n tokens: TokenLookup;\n\n events = {\n /**\n * Emitted when the authenticated state changes.\n * @event AuthorizationManager.events#authenticated\n * @type {object}\n * @property {boolean} isAuthenticated - Whether the `AuthorizationManager` is authenticated.\n * @property {TokenResponse} [token] - The token response if the `AuthorizationManager` is authenticated.\n */\n authenticated: new Event<\n 'authenticated',\n {\n /**\n * Whether the `AuthorizationManager` is authenticated.\n * @see {@link AuthorizationManager.authenticated}\n */\n isAuthenticated: boolean;\n token?: TokenResponse;\n }\n >('authenticated'),\n /**\n * Emitted when the user revokes their authentication.\n * @event AuthorizationManager.events#revoke\n */\n revoke: new Event('revoke'),\n };\n\n constructor(configuration: AuthorizationManagerConfiguration) {\n createStorage(configuration.storage || 'localStorage');\n if (!configuration.client) {\n throw new Error('You must provide a `client` for your application.');\n }\n /**\n * Inject the `openid`, `profile`, `email`, and `offline_access` scopes by default unless\n * explicitly opted out of.\n */\n const scopes =\n configuration.defaultScopes === false\n ? ''\n : (configuration.defaultScopes ?? DEFAULT_CONFIGURATION.defaultScopes);\n\n this.configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n scopes: [configuration.scopes ? configuration.scopes : '', scopes]\n .filter((s) => s.length)\n .join(' '),\n };\n /**\n * If an `events` object is provided, add the listeners to the instance before\n * any event might be dispatched.\n */\n if (this.configuration.events) {\n Object.entries(this.configuration.events).forEach(([name, callback]) => {\n if (name in this.events) {\n this.events[name as keyof AuthorizationManager['events']].addListener(callback);\n }\n });\n }\n\n this.tokens = new TokenLookup({\n manager: this,\n });\n this.#checkAuthorizationState();\n }\n\n get storageKeyPrefix() {\n return `${this.configuration.client}:`;\n }\n\n /**\n * The user information decoded from the `id_token` (JWT) of the current Globus Auth token.\n * This method can be used instead of `auth.oauth2.userinfo` to get the user information without an additional request.\n *\n * **IMPORTANT**: The `id_token` can only be processed if the `openid` scope is requested during the authorization process.\n *\n * Additionally, the `profile` and `email` scopes are required to get the full user information.\n *\n * @see {@link https://docs.globus.org/api/auth/reference/#oidc_userinfo_endpoint}\n */\n get user() {\n const token = this.getGlobusAuthToken();\n return token && token.id_token ? jwtDecode<JwtUserInfo>(token.id_token) : null;\n }\n\n /**\n * Attempt to refresh all of the tokens managed by the instance.\n * This method will only attempt to refresh tokens that have a `refresh_token` attribute.\n */\n async refreshTokens() {\n log('debug', 'AuthorizationManager.refreshTokens');\n const tokens = await Promise.allSettled(\n this.tokens.getAll().map((token) => {\n if (isRefreshToken(token)) {\n return this.refreshToken(token);\n }\n return Promise.resolve(null);\n }),\n );\n this.#checkAuthorizationState();\n return tokens;\n }\n\n /**\n * Use the `refresh_token` attribute of a token to obtain a new access token.\n * @param token The well-formed token with a `refresh_token` attribute.\n */\n async refreshToken(token: TokenWithRefresh) {\n log('debug', `AuthorizationManager.refreshToken | resource_server=${token.resource_server}`);\n try {\n const response = await (\n await oauth2.token.refresh({\n payload: {\n client_id: this.configuration.client,\n refresh_token: token.refresh_token,\n grant_type: 'refresh_token',\n },\n })\n ).json();\n if (isGlobusAuthTokenResponse(response)) {\n this.addTokenResponse(response);\n return response;\n }\n } catch (error) {\n log('error', `AuthorizationManager.refreshToken | resource_server=${token.resource_server}`);\n }\n return null;\n }\n\n /**\n * Whether or not the instance has a reference to a Globus Auth token.\n */\n hasGlobusAuthToken() {\n return this.getGlobusAuthToken() !== null;\n }\n\n /**\n * Retrieve the Globus Auth token managed by the instance.\n */\n getGlobusAuthToken() {\n const entry = getStorage().get(`${this.storageKeyPrefix}${RESOURCE_SERVERS.AUTH}`);\n return entry ? JSON.parse(entry) : null;\n }\n\n #checkAuthorizationState() {\n log('debug', 'AuthorizationManager.#checkAuthorizationState');\n if (this.hasGlobusAuthToken()) {\n this.authenticated = true;\n }\n }\n\n async #emitAuthenticatedState() {\n const isAuthenticated = this.authenticated;\n const token = this.getGlobusAuthToken() ?? undefined;\n await this.events.authenticated.dispatch({\n isAuthenticated,\n token,\n });\n }\n\n /**\n * Reset the authenticated state and clear all tokens from storage.\n * This method **does not** emit the `revoke` event. If you need to emit the `revoke` event, use the `AuthorizationManager.revoke` method.\n */\n reset() {\n getStorage()\n .keys()\n .forEach((key) => {\n if (key.startsWith(this.storageKeyPrefix)) {\n getStorage().remove(key);\n }\n });\n this.authenticated = false;\n }\n\n /**\n * A private utility method to add the `offline_access` scope to a scope string if the `useRefreshTokens` configuration is set to `true`.\n * @param scopes The scope string to modify.\n */\n #withOfflineAccess(scopes: string) {\n return `${scopes}${this.configuration.useRefreshTokens ? ' offline_access' : ''}`;\n }\n\n #buildTransport(overrides?: Partial<RedirectTransportOptions>) {\n const scopes = this.#withOfflineAccess(overrides?.scopes ?? (this.configuration.scopes || ''));\n\n return new RedirectTransport({\n client: this.configuration.client,\n redirect: this.configuration.redirect,\n scopes,\n ...overrides,\n // @todo Decide if we want to include the `include_consented_scopes` parameter by default.\n params: {\n // include_consented_scopes: true,\n ...overrides?.params,\n },\n });\n }\n\n /**\n * Initiate the login process by redirecting to the Globus Auth login page.\n *\n * **IMPORTANT**: This method will reset the instance state before initiating the login process,\n * including clearing all tokens from storage. If you need to maintain the current state,\n * use the `AuthorizationManager.prompt` method.\n */\n async login(options = { additionalParams: {} }) {\n log('debug', 'AuthorizationManager.login');\n this.reset();\n /**\n * In the future, it's possible that we may want to support different types of transports.\n */\n const transport = this.#buildTransport({ params: options?.additionalParams });\n await transport.send();\n }\n\n /**\n * Prompt the user to authenticate with Globus Auth.\n */\n async prompt(options?: Partial<RedirectTransportOptions>) {\n log('debug', 'AuthorizationManager.prompt');\n const transport = this.#buildTransport(options);\n await transport.send();\n }\n\n /**\n * This method will attempt to complete the PKCE protocol flow.\n */\n async handleCodeRedirect(\n options: {\n shouldReplace: GetTokenOptions['shouldReplace'];\n additionalParams?: RedirectTransportOptions['params'];\n } = { shouldReplace: true, additionalParams: {} },\n ) {\n log('debug', 'AuthorizationManager.handleCodeRedirect');\n const response = await this.#buildTransport({ params: options?.additionalParams }).getToken({\n shouldReplace: options?.shouldReplace,\n });\n if (isGlobusAuthTokenResponse(response)) {\n log(\n 'debug',\n `AuthorizationManager.handleCodeRedirect | response=${JSON.stringify(response)}`,\n );\n this.addTokenResponse(response);\n }\n return response;\n }\n\n /**\n * Handle an error response from a Globus service in the context of this `AuthorizationManager`.\n * This method will introspect the response and attempt to handle any errors that should result\n * in some additional Globus Auth interaction.\n * @param response The error response from a Globus service.\n * @param {object|boolean} options Options for handling the error response. If a boolean is provided, this will be treated as the `options.execute` value.\n * @param options.execute Whether to execute the handler immediately.\n * @param options.additionalParms Additional query parameters to be included with the transport generated URL.\n */\n async handleErrorResponse(\n response: Record<string, unknown>,\n options?: { execute?: true; additionalParams?: RedirectTransportOptions['params'] } | true,\n ): Promise<void>;\n async handleErrorResponse(\n response: Record<string, unknown>,\n options?: { execute?: false; additionalParams?: RedirectTransportOptions['params'] } | false,\n ): Promise<() => Promise<void>>;\n async handleErrorResponse(\n response: Record<string, unknown>,\n options?:\n | { execute?: boolean; additionalParams?: RedirectTransportOptions['params'] }\n | boolean,\n ) {\n const opts =\n typeof options === 'boolean'\n ? {\n ...DEFAULT_HANDLE_ERROR_OPTIONS,\n execute: options,\n }\n : {\n ...DEFAULT_HANDLE_ERROR_OPTIONS,\n ...options,\n };\n log(\n 'debug',\n `AuthorizationManager.handleErrorResponse | response=${JSON.stringify(response)} execute=${opts.execute}`,\n );\n let handler = async () => {};\n if (isAuthorizationRequirementsError(response)) {\n log(\n 'debug',\n 'AuthorizationManager.handleErrorResponse | error=AuthorizationRequirementsError',\n );\n handler = async () => {\n await this.handleAuthorizationRequirementsError(response, {\n additionalParams: opts.additionalParams,\n });\n };\n }\n if (isConsentRequiredError(response)) {\n log('debug', 'AuthorizationManager.handleErrorResponse | error=ConsentRequiredError');\n handler = async () => {\n await this.handleConsentRequiredError(response, {\n additionalParams: opts.additionalParams,\n });\n };\n }\n if ('code' in response && response['code'] === 'AuthenticationFailed') {\n log('debug', 'AuthorizationManager.handleErrorResponse | error=AuthenticationFailed');\n handler = async () => {\n await this.revoke();\n };\n }\n\n const returnValue = opts.execute === true ? await handler() : handler;\n return returnValue;\n }\n\n /**\n * Process a well-formed Authorization Requirements error response from a Globus service\n * and redirect the user to the Globus Auth login page with the necessary parameters.\n */\n async handleAuthorizationRequirementsError(\n response: AuthorizationRequirementsError,\n options?: { additionalParams?: RedirectTransportOptions['params'] },\n ) {\n this.#transport = this.#buildTransport({\n params: {\n prompt: 'login',\n ...toAuthorizationQueryParams(response),\n ...options?.additionalParams,\n },\n });\n await this.#transport.send();\n }\n\n /**\n * Process a well-formed `ConsentRequired` error response from a Globus service\n * and redirect the user to the Globus Auth login page with the necessary parameters.\n */\n async handleConsentRequiredError(\n response: ConsentRequiredError,\n options?: { additionalParams?: RedirectTransportOptions['params'] },\n ) {\n this.#transport = this.#buildTransport({\n scopes: this.#withOfflineAccess(response.required_scopes.join(' ')),\n params: {\n ...options?.additionalParams,\n },\n });\n await this.#transport.send();\n }\n\n /**\n * Add a Globus Auth token response to storage, if `other_tokens` are present they are also added.\n * This method is mostly used internally by the `AuthorizationManager`, but can be used by downstream\n * consumers to add tokens to storage if necessary.\n */\n addTokenResponse = (token: Token | TokenResponse) => {\n this.tokens.add(token);\n this.#checkAuthorizationState();\n };\n\n /**\n * Call `AuthroizationManager.reset`, revoke all of the available tokns, and emit the `revoke` event.\n * @emits AuthorizationManager.events#revoke\n * @see AuthorizationManager.reset\n */\n async revoke() {\n log('debug', 'AuthorizationManager.revoke');\n const revocation = Promise.all(this.tokens.getAll().map(this.#revokeToken.bind(this)));\n this.reset();\n await revocation;\n await this.events.revoke.dispatch();\n }\n\n /**\n * Revoke a token from a resource server.\n */\n #revokeToken(token: Token) {\n log('debug', `AuthorizationManager.revokeToken | resource_server=${token.resource_server}`);\n return oauth2.token.revoke({\n payload: {\n client_id: this.configuration.client,\n token: token.access_token,\n },\n });\n }\n}\n", "/**\n * @description A wrapper around the Globus Auth service.\n * @group Service\n * @see [Globus Auth API Documentation](https://docs.globus.org/api/auth/)\n * @module\n */\nimport { build } from '../../core/url.js';\n\nimport * as AUTH from './config.js';\n\nimport type { Token, TokenWithRefresh, TokenResponse } from './types.js';\n\n/**\n * @private\n * @internal\n */\nexport const CONFIG = AUTH;\n\n/**\n * Query parameters that can be passed to the authorization endpoint.\n * @see https://docs.globus.org/api/auth/reference/#authorization_code_grant_preferred\n * @see https://docs.globus.org/api/auth/sessions/#client-initiated-authns\n */\nexport type AuthorizationQueryParameters = {\n prompt?: string;\n session_message?: string;\n session_required_identities?: string;\n session_required_single_domain?: string;\n session_required_mfa?: 'true' | 'false';\n session_required_policies?: string;\n};\n\nexport function getAuthorizationEndpoint() {\n return build(AUTH.ID, '/v2/oauth2/authorize');\n}\n\nexport function getTokenEndpoint() {\n return build(AUTH.ID, '/v2/oauth2/token');\n}\n\nexport * as identities from './service/identities.js';\nexport * as oauth2 from './service/oauth2/index.js';\n\nexport function isToken(check: unknown): check is Token {\n return typeof check === 'object' && check !== null && 'access_token' in check;\n}\n\nexport function isRefreshToken(check: unknown): check is TokenWithRefresh {\n return isToken(check) && check !== null && 'refresh_token' in check;\n}\n\nexport function isGlobusAuthTokenResponse(check: unknown): check is TokenResponse {\n /**\n * @todo This could be made more robust by checking whether the `resource_server` is a well-known value.\n */\n return isToken(check) && check !== null && 'resource_server' in check;\n}\n", "import { ID as TRANSFER } from '../transfer/config.js';\nimport { ID as FLOWS } from '../flows/config.js';\nimport { ID as TIMER } from '../timer/config.js';\nimport { ID as GROUPS } from '../groups/config.js';\nimport { ID as SEARCH } from '../search/config.js';\nimport { ID as COMPUTE } from '../compute/config.js';\n\nimport type { Environment } from '../../core/global.js';\n\nexport const ID = 'AUTH' as const;\nexport const HOSTS: Partial<Record<Environment, string>> = {\n integration: 'auth.integration.globuscs.info',\n sandbox: 'auth.sandbox.globuscs.info',\n production: 'auth.globus.org',\n test: 'auth.test.globuscs.info',\n staging: 'auth.staging.globuscs.info',\n preview: 'auth.preview.globus.org',\n};\n\nexport const SCOPES = {\n VIEW_IDENTITIES: 'urn:globus:auth:scope:auth.globus.org:view_identities',\n};\n\nexport const RESOURCE_SERVERS = {\n [ID]: 'auth.globus.org',\n [TRANSFER]: 'transfer.api.globus.org',\n [FLOWS]: 'flows.globus.org',\n [GROUPS]: 'groups.api.globus.org',\n [SEARCH]: 'search.api.globus.org',\n [TIMER]: '524230d7-ea86-4a52-8312-86065a9e0417',\n [COMPUTE]: 'funcx_service',\n};\n", "import type { Environment } from '../../core/global.js';\n\nexport const ID = 'TRANSFER' as const;\n\nexport const SCOPES = {\n ALL: 'urn:globus:auth:scope:transfer.api.globus.org:all',\n};\n\nexport const HOSTS: Partial<Record<Environment, string>> = {\n sandbox: 'transfer.api.sandbox.globuscs.info',\n production: 'transfer.api.globusonline.org',\n staging: 'transfer.api.staging.globuscs.info',\n integration: 'transfer.api.integration.globuscs.info',\n test: 'transfer.api.test.globuscs.info',\n preview: 'transfer.api.preview.globus.org',\n};\n", "import type { Environment } from '../../core/global.js';\n\nexport const ID = 'FLOWS' as const;\nexport const HOSTS: Partial<Record<Environment, string>> = {\n sandbox: 'sandbox.flows.automate.globus.org',\n production: 'flows.globus.org',\n staging: 'staging.flows.automate.globus.org',\n integration: 'integration.flows.automate.globus.org',\n test: 'test.flows.automate.globus.org',\n preview: 'preview.flows.automate.globus.org',\n};\n\n/**\n * @see https://docs.globus.org/api/flows/overview/#scopes\n */\nexport const SCOPES = {\n MANAGE_FLOWS: 'https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/manage_flows',\n VIEW_FLOWS: 'https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/view_flows',\n RUN: 'https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run',\n RUN_STATUS: 'https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run_status',\n RUN_MANAGE: 'https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run_manage',\n};\n", "import type { Environment } from '../../core/global.js';\n\nexport const ID = 'TIMER' as const;\nexport const HOSTS: Partial<Record<Environment, string>> = {\n sandbox: 'sandbox.timer.automate.globus.org',\n production: 'timer.automate.globus.org',\n staging: 'staging.timer.automate.globus.org',\n integration: 'integration.timer.automate.globus.org',\n test: 'test.timer.automate.globus.org',\n preview: 'preview.timer.automate.globus.org',\n};\n", "import type { Environment } from '../../core/global.js';\n\nexport const ID = 'GROUPS' as const;\nexport const HOSTS: Partial<Record<Environment, string>> = {\n sandbox: 'groups.api.sandbox.globuscs.info',\n production: 'groups.api.globus.org',\n staging: 'groups.api.staging.globuscs.info',\n integration: 'groups.api.integration.globuscs.info',\n test: 'groups.api.test.globuscs.info',\n preview: 'groups.api.preview.globuscs.info',\n};\n\n/**\n * @see https://docs.globus.org/api/groups/#scopes\n */\nexport const SCOPES = {\n ALL: 'urn:globus:auth:scope:groups.api.globus.org:all',\n VIEW_MY: 'urn:globus:auth:scope:groups.api.globus.org:view_my_groups_and_membership',\n};\n", "import type { Environment } from '../../core/global.js';\n\nexport const ID = 'SEARCH' as const;\nexport const HOSTS: Partial<Record<Environment, string>> = {\n sandbox: 'search.api.sandbox.globuscs.info',\n production: 'search.api.globus.org',\n staging: 'search.api.staging.globuscs.info',\n integration: 'search.api.integration.globuscs.info',\n test: 'search.api.test.globuscs.info',\n preview: 'search.api.preview.globus.org',\n};\n\n/**\n * @see https://docs.globus.org/api/search/api_usage/#scopes\n */\nexport const SCOPES = {\n ALL: 'urn:globus:auth:scope:search.api.globus.org:all',\n INGEST: 'urn:globus:auth:scope:search.api.globus.org:ingest',\n SEARCH: 'urn:globus:auth:scope:search.api.globus.org:search',\n};\n", "import type { Environment } from '../../core/global.js';\n\nexport const ID = 'COMPUTE' as const;\nexport const HOSTS: Partial<Record<Environment, string>> = {\n sandbox: 'compute.api.sandbox.globuscs.info',\n production: 'compute.api.globus.org',\n staging: 'compute.api.staging.globuscs.info',\n integration: 'compute.api.integration.globuscs.info',\n test: 'compute.api.test.globuscs.info',\n preview: 'compute.api.preview.globus.org',\n};\n\nexport const SCOPES = {\n ALL: 'https://auth.globus.org/scopes/facd7ccc-c5f4-42aa-916b-a0e270e2c2a9/all',\n};\n", "/**\n * @module Errors\n * @example\n * import { errors } from \"globus/sdk\";\n * if (errors.isConsentRequiredError(...)) { ... }\n */\nimport type { AuthorizationQueryParameters } from '../services/auth/index.js';\n\nexport class EnvironmentConfigurationError extends Error {\n override name = 'EnvironmentConfigurationError';\n\n constructor(variable: string, value: unknown) {\n super();\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n this.message = `Invalid configuration value provided for ${variable} (${value}).`;\n }\n}\n\nexport type WellFormedError = {\n code: string;\n message: string;\n};\n\nexport function isErrorWellFormed(test: unknown): test is WellFormedError {\n return typeof test === 'object' && test !== null && 'code' in test && 'message' in test;\n}\n\nexport type ConsentRequiredError = {\n code: 'ConsentRequired';\n required_scopes: string[];\n [key: string]: unknown;\n};\n\nexport function isConsentRequiredError(test: unknown): test is ConsentRequiredError {\n return (\n isErrorWellFormed(test) &&\n test.code === 'ConsentRequired' &&\n 'required_scopes' in test &&\n Array.isArray(test.required_scopes)\n );\n}\n\n/**\n * An error that includes an `authorization_parameters` property, a.k.a \"G.A.R.E\".\n *\n * A well-known error shape is provided by services when additional authorization requirements must be met by the session.\n * This object can be converted to parameters accepted by Globus Auth using `sdk.errors.toAuthorizationQueryParams()`.\n */\nexport type AuthorizationRequirementsError = {\n authorization_parameters: {\n session_message?: string;\n session_required_identities?: string[];\n session_required_mfa?: boolean;\n session_required_single_domain?: string[];\n session_required_policies?: string[];\n prompt?: string;\n required_scopes?: string[];\n };\n /**\n * @todo At the moment, most Globus services do not guarentee a `code` property for this error type.\n * Once it becomes more common, this type (and the `isAuthorizationRequirementsError` function) should be updated.\n * @see https://globus-sdk-python.readthedocs.io/en/stable/experimental/auth_requirements_errors.html\n */\n // code: string;\n [key: string]: unknown;\n};\n/**\n * Keys that should not be included in the query string object (not recognized by Globus Auth).\n */\nconst NO_OP_KEYS: (keyof AuthorizationRequirementsError)[] = ['required_scopes'];\n/**\n * Convert an `AuthorizationRequirementsError` to a query string object accepted by Globus Auth.\n */\nexport function toAuthorizationQueryParams(\n error: AuthorizationRequirementsError,\n): AuthorizationQueryParameters {\n return Object.entries(error.authorization_parameters).reduce((acc, [key, v]) => {\n /**\n * Remove keys that are not recognized by Globus Auth and empty values.\n */\n if (NO_OP_KEYS.includes(key) || v === undefined || v === null) {\n return acc;\n }\n /**\n * All other values are converted to strings.\n */\n let value = v;\n if (Array.isArray(value)) {\n value = value.join(',');\n } else if (typeof v === 'boolean') {\n value = value ? 'true' : 'false';\n }\n return { ...acc, [key]: value };\n }, {});\n}\n\n/**\n * Check if an object is an `AuthorizationRequirementsError`.\n * @see {@link AuthorizationRequirementsError}\n */\nexport function isAuthorizationRequirementsError(\n test: unknown,\n): test is AuthorizationRequirementsError {\n return (\n typeof test === 'object' &&\n test !== null &&\n 'authorization_parameters' in test &&\n typeof test.authorization_parameters === 'object' &&\n test.authorization_parameters !== null\n );\n}\n", "import * as AUTH from '../services/auth/config.js';\nimport * as TRANSFER from '../services/transfer/config.js';\nimport * as FLOWS from '../services/flows/config.js';\nimport * as GROUPS from '../services/groups/config.js';\nimport * as SEARCH from '../services/search/config.js';\nimport * as TIMER from '../services/timer/config.js';\nimport * as COMPUTE from '../services/compute/config.js';\n\nimport { EnvironmentConfigurationError } from './errors.js';\nimport { SDKOptions } from '../services/types.js';\nimport { log } from './logger.js';\n\nfunction getRuntime() {\n return typeof window !== 'undefined' ? window : process;\n}\n\nfunction isBrowser(runtime: Window | NodeJS.Process): runtime is Window {\n return typeof window === typeof runtime;\n}\n\nfunction env<T>(key: string, fallback: T): T {\n const runtime = getRuntime();\n let envConfiguration;\n if (isBrowser(runtime)) {\n envConfiguration = runtime;\n } else {\n envConfiguration = runtime.env;\n }\n if (key in envConfiguration) {\n return (envConfiguration as Record<typeof key, T>)[key];\n }\n return fallback;\n}\n\n/**\n * Handlers for: GLOBUS_SDK_ENVIRONMENT\n */\nexport const ENVIRONMENTS = {\n PRODUCTION: 'production',\n PREVIEW: 'preview',\n STAGING: 'staging',\n SANDBOX: 'sandbox',\n INTEGRATION: 'integration',\n TEST: 'test',\n} as const;\n\nexport type Environment = (typeof ENVIRONMENTS)[keyof typeof ENVIRONMENTS];\n\nexport const SERVICES = {\n [AUTH.ID]: AUTH.ID,\n [TRANSFER.ID]: TRANSFER.ID,\n [FLOWS.ID]: FLOWS.ID,\n [GROUPS.ID]: GROUPS.ID,\n [SEARCH.ID]: SEARCH.ID,\n [TIMER.ID]: TIMER.ID,\n [COMPUTE.ID]: COMPUTE.ID,\n};\n\nexport type Service = keyof typeof SERVICES;\n\nexport const SERVICE_HOSTS: Record<Service, Partial<Record<Environment, string>>> = {\n [AUTH.ID]: AUTH.HOSTS,\n [TRANSFER.ID]: TRANSFER.HOSTS,\n [FLOWS.ID]: FLOWS.HOSTS,\n [GROUPS.ID]: GROUPS.HOSTS,\n [SEARCH.ID]: SEARCH.HOSTS,\n [TIMER.ID]: TIMER.HOSTS,\n [COMPUTE.ID]: COMPUTE.HOSTS,\n};\n\n/**\n * Get the computed SDK options based on the runtime.\n * This should be used any time we're referencing the SDK options in\n * methods to ensure we're including any global overrides.\n */\nexport function getSDKOptions(options?: SDKOptions) {\n let globalOptions = env<string | SDKOptions>('GLOBUS_SDK_OPTIONS', {});\n if (typeof globalOptions === 'string') {\n globalOptions = JSON.parse(globalOptions) as SDKOptions;\n }\n return {\n ...globalOptions,\n ...options,\n fetch: {\n ...globalOptions?.fetch,\n ...options?.fetch,\n options: {\n ...globalOptions?.fetch?.options,\n ...options?.fetch?.options,\n headers: {\n ...globalOptions?.fetch?.options?.headers,\n ...options?.fetch?.options?.headers,\n },\n },\n },\n };\n}\n\nexport function getEnvironment(): Environment {\n const globalOptions = getSDKOptions();\n const environment = env<Environment>(\n 'GLOBUS_SDK_ENVIRONMENT',\n globalOptions?.environment ?? ENVIRONMENTS.PRODUCTION,\n );\n if (globalOptions?.environment && environment !== globalOptions.environment) {\n log(\n 'debug',\n 'GLOBUS_SDK_ENVIRONMENT and GLOBUS_SDK_OPTIONS.environment are set to different values. GLOBUS_SDK_ENVIRONMENT will take precedence',\n );\n }\n if (!environment || !Object.values(ENVIRONMENTS).includes(environment)) {\n throw new EnvironmentConfigurationError('GLOBUS_SDK_ENVIRONMENT', environment);\n }\n return environment;\n}\n\n/**\n * Handlers for: GLOBUS_SDK_VERIFY_SSL\n * Since disabling SSL is at least not-recommended, we consider\n * this value to always be true, but provide a warning when it set\n * to one of the falsey values for informational purposes.\n *\n * Taking direction from `globus-sdk-python` for possible false values\n * @see https://github.com/globus/globus-sdk-python/blob/18eced9c12e2ec41745d1be183148845198b999c/src/globus_sdk/config/env_vars.py#L20\n */\nexport function getVerifySSL(): boolean {\n const verifySSLTemp = env<string>('GLOBUS_SDK_VERIFY_SSL', 'true').toLowerCase();\n if (['n', 'no', 'f', 'false', 'off', '0'].includes(verifySSLTemp)) {\n log(\n 'warn',\n 'Setting GLOBUS_SDK_VERIFY_SSL to false is disallowed in the Globus JavaScript SDK. It will always true in this context',\n );\n }\n return true;\n}\n\n/**\n * Handlers for: GLOBUS_SDK_HTTP_TIMEOUT\n */\nexport function getHttpTimeout() {\n const timeout = Number(env<string | number>('GLOBUS_SDK_HTTP_TIMEOUT', 60));\n if (timeout === -1) {\n return null;\n }\n return timeout;\n}\n\nexport function getServiceHost(service: Service, environment: Environment = getEnvironment()) {\n return SERVICE_HOSTS[service][environment];\n}\n\nexport function getServiceBaseUrl(service: Service, environment: Environment = getEnvironment()) {\n const host = getServiceHost(service, environment);\n return env(`GLOBUS_SDK_SERVICE_URL_${service}`, host ? `https://${host}` : undefined);\n}\n", "import { getServiceBaseUrl, getEnvironment, Environment, Service } from './global.js';\nimport type { GCSConfiguration } from '../services/globus-connect-server/index.js';\nimport { SDKOptions } from '../services/types.js';\n\n/**\n * An extremely simplified parameter serializer based on our current needs.\n *\n * **This is intended for internal @globus/sdk use only.**\n *\n * @private\n */\nexport function stringifyParameters(parameters: {\n [key: string]:\n | string\n | number\n | boolean\n | Array<string | number | null | undefined>\n | null\n | undefined;\n}) {\n const search = new URLSearchParams();\n\n Array.from(Object.entries(parameters)).forEach(([key, value]) => {\n if (Array.isArray(value)) {\n /**\n * Arrays are converted to comma-separated strings.\n */\n search.set(key, value.join(','));\n } else if (value !== undefined) {\n search.set(key, String(value));\n }\n });\n\n return search.toString();\n}\n\n/**\n * Return the base URL for a service (based on the environment).\n * @param service The service to build the URL for.\n * @param path The path to the resource.\n * @param environment The environment to use.\n */\nexport function getServiceURL(\n service: Service,\n path = '',\n environment: Environment = getEnvironment(),\n): URL {\n const base = getServiceBaseUrl(service, environment);\n return new URL(path, base);\n}\n\n/**\n * Build a URL for a service or GCSConfiguration.\n *\n * @param service The service identifier or GCSConfiguration object to build the URL for.\n * @param path The path to the resource.\n * @param options Additional options for the URL.\n */\nexport function build(\n serviceOrConfiguration: Service | GCSConfiguration,\n path: string,\n options?: {\n search?: Parameters<typeof stringifyParameters>[0];\n },\n sdkOptions?: SDKOptions,\n): string {\n let url;\n if (typeof serviceOrConfiguration === 'object') {\n url = new URL(path, serviceOrConfiguration.host);\n } else {\n url = getServiceURL(serviceOrConfiguration, path, sdkOptions?.environment);\n }\n if (options && options.search) {\n url.search = stringifyParameters(options.search);\n }\n return url.toString();\n}\n", "import { ID, SCOPES } from '../config.js';\nimport { serviceRequest } from '../../../services/shared.js';\n\nimport type { ServiceMethod, ServiceMethodDynamicSegments } from '../../types.js';\n\n/**\n * Fetch a single Identity by ID.\n * @see https://docs.globus.org/api/auth/reference/#get_identities\n */\nexport const get = function (identity_id, options = {}, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.VIEW_IDENTITIES,\n path: `/identities/${identity_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<string, Record<string, any>>;\n\n/**\n * Return a list of identities that match provided query parameters.\n * @see https://docs.globus.org/api/auth/reference/#get_identities\n */\nexport const getAll = function (options = {}, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.VIEW_IDENTITIES,\n path: `/identities`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: {\n ids?: string | string[];\n usernames?: string | string[];\n };\n headers?: Record<string, string>;\n payload?: never;\n}>;\n", "import _fetch from 'cross-fetch';\nimport { getClientInfoRequestHeaders } from '../core/info/index.js';\nimport { build } from '../core/url.js';\nimport { getSDKOptions, Service } from '../core/global.js';\nimport { isAuthorizationRequirementsError } from '../core/errors.js';\nimport { RESOURCE_SERVERS } from './auth/config.js';\nimport { isRefreshToken } from './auth/index.js';\nimport type { ServiceMethodOptions, SDKOptions } from './types.js';\nimport type { GCSConfiguration } from '../services/globus-connect-server/index.js';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport enum HTTP_METHODS {\n POST = 'POST',\n GET = 'GET',\n DELETE = 'DELETE',\n PUT = 'PUT',\n PATCH = 'PATCH',\n}\n\n/**\n * Our domain-specific language for describing service requests.\n * @private\n */\ntype ServiceRequestDSL = {\n /**\n * The service that the request will be made to.\n */\n service: Service | GCSConfiguration;\n /**\n * A specific scope that is required for the request. If a scope is provided,\n * the `serviceRequest` function will attempt to get a token for the request\n * based on the the `service` => `resource_server` mapping.\n */\n scope?: string;\n /**\n * The resource server that the request will be made to. This can be provided\n * instead of (or addition to) the `scope` property. If this is provided, the\n * `serviceRequest` function will attempt to get a token for the resource server\n * when a `manager` instance is provided in the SDK options.\n */\n resource_server?: string;\n /**\n * The path of the resource (appended to the service's host).\n */\n path: string;\n /**\n * The HTTP method to use for the request.\n */\n method?: HTTP_METHODS;\n /**\n * For some resources, it doesn't make sense for requests to be retried.\n * Setting this to `true` will prevent any retry logic from being applied.\n */\n preventRetry?: boolean;\n};\n\n/**\n * A helper function for making service requests that will handle the arguments\n * of `ServiceMethod` and `ServiceMethodDynamicSegments` functions in a uniform\n * way.\n *\n * @example\n * ```ts\n * export const get = function (flow_id, options?, sdkOptions?) {\n * return serviceRequest({\n * service: FLOWS.ID,\n * scope: SCOPES.VIEW_FLOWS,\n * path: `/flows/${flow_id}`,\n * }, options, sdkOptions);\n * } satisfies ServiceMethodDynamicSegments<string, Record<string, any>>;\n * ```\n *\n * @private\n * @param config The ServiceRequestDSL for the request.\n * @param options The options passed to the service method.\n * @param passedSdkOptions The SDK options passed to the service method.\n * @returns\n */\nexport async function serviceRequest(\n this: unknown,\n config: ServiceRequestDSL,\n options?: ServiceMethodOptions,\n passedSdkOptions?: SDKOptions,\n): Promise<Response> {\n /**\n * Get the SDK options, merging any passed options with the global options.\n */\n const sdkOptions = getSDKOptions(passedSdkOptions);\n const injectedFetchOptions = sdkOptions?.fetch?.options || {};\n\n const headers: Record<string, string> = {\n ...getClientInfoRequestHeaders(),\n ...options?.headers,\n /**\n * Key/value pairs found in the `fetch` options override those found in the\n * service method options.\n */\n ...injectedFetchOptions.headers,\n };\n\n /**\n * The `AuthorizationManager` instance provided with the call.\n */\n const manager = sdkOptions?.manager;\n\n let token;\n /**\n * If a `resource_server` was provided, and the SDK is configured with a `manager`\n * instance, we'll try to get a token for the resource server and use it.\n */\n if (config.resource_server && manager) {\n token = manager.tokens.getByResourceServer(config.resource_server);\n if (token) {\n headers['Authorization'] = `Bearer ${token.access_token}`;\n }\n }\n /**\n * If the `scope` property is provided, and the SDK is configured with a `manager`,\n * we'll try to map the service to a resource server. This is mostly to support\n * backwards compatibility of the `scope` property being used in the `ServiceRequestDSL`.\n */\n if (config.scope && manager) {\n const resourceServer =\n typeof config.service === 'string'\n ? RESOURCE_SERVERS[config.service]\n : // For `GCSConfiguration` objects, the `endpoint_id` is the resource server.\n config.service.endpoint_id;\n\n token = manager.tokens.getByResourceServer(resourceServer);\n if (token) {\n headers['Authorization'] = `Bearer ${token.access_token}`;\n }\n }\n\n /**\n * If a raw body was provided, use that. Otherwise, if a payload was provided, serialize it.\n */\n let body = options?.body;\n if (!body && options?.payload) {\n body = JSON.stringify(options.payload);\n }\n\n /**\n * If `Content-Type` header was not provided, and there is a body, we assume it is JSON.\n */\n if (!headers?.['Content-Type'] && body) {\n headers['Content-Type'] = 'application/json';\n }\n\n const url = build(\n config.service,\n config.path,\n {\n search: options?.query,\n },\n sdkOptions,\n );\n\n const init = {\n method: config.method,\n body,\n ...injectedFetchOptions,\n /**\n * Merge the headers from the options and SDK options.\n */\n headers,\n };\n\n /**\n * The request handler for the fetch call. This can be overridden by providing a\n * `__callable` property in the `fetch` options.\n */\n let handler = _fetch;\n /* eslint-disable no-underscore-dangle */\n if (injectedFetchOptions?.__callable) {\n handler = injectedFetchOptions.__callable.bind(this);\n /**\n * Remove the `__callable` property from the `fetch` options before passing the options along.\n */\n delete init.__callable;\n }\n /* eslint-enable no-underscore-dangle */\n\n /**\n * If the resource is configured to prevent retries, there is no `manager` instance,\n * or token, the request will be made as-is.\n */\n if (config.preventRetry || !manager || !token || !isRefreshToken(token)) {\n return handler(url, init);\n }\n\n /**\n * Automatic Retry Handling\n */\n\n const initialResponse = await handler(url, init);\n /**\n * If the response is \"ok\", we can return it as-is.\n */\n if (initialResponse.ok) {\n return initialResponse;\n }\n /**\n * Do a safe check to see if the response contains any authorization requirements.\n */\n let hasAuthorizationRequirements;\n try {\n hasAuthorizationRequirements = isAuthorizationRequirementsError(\n /**\n * It is important to clone the response before calling `json` avoid\n * `body used already for [...]` errors when the initial response is\n * returned.\n */\n await initialResponse.clone().json(),\n );\n } catch (_e) {\n hasAuthorizationRequirements = false;\n }\n /**\n * We only attempt to refresh the original token supplied with teh request, if the\n * response status is 401 and the response does not contain any authorization requirements.\n */\n const shouldAttemptTokenRefresh = initialResponse.status === 401 && !hasAuthorizationRequirements;\n if (shouldAttemptTokenRefresh) {\n const newToken = await manager.refreshToken(token);\n if (!newToken) {\n return initialResponse;\n }\n /**\n * Retry the request with the new token.\n */\n return handler(url, {\n ...init,\n headers: {\n ...init.headers,\n Authorization: `Bearer ${newToken.access_token}`,\n },\n });\n }\n /**\n * No retry was attempted, return the initial response.\n */\n return initialResponse;\n}\n", "import { ID } from '../../config.js';\nimport { HTTP_METHODS, serviceRequest } from '../../../../services/shared.js';\n\nimport type { ServiceMethod } from '../../../types.js';\n\nexport const userinfo = function (options?, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: undefined,\n path: `/v2/oauth2/userinfo`,\n method: HTTP_METHODS.GET,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: never;\n}>;\n\nexport * as token from './token.js';\n", "import { ID } from '../../config.js';\nimport { HTTP_METHODS, serviceRequest } from '../../../../services/shared.js';\n\nimport type { ServiceMethod, ServiceMethodOptions } from '../../../types.js';\n\ntype IntrospectPayload = {\n token: string;\n include?: string;\n};\n\ntype RevokePayload = {\n token: string;\n /**\n * This is an undocumented property that is required for the request to be successful.\n */\n client_id: string;\n};\n\ntype ValidatePayload = {\n token: string;\n client_id: string;\n};\n\ntype RefreshPayload = {\n refresh_token: string;\n grant_type: 'refresh_token';\n /**\n * This is an undocumented property that is required for the request to be successful.\n */\n client_id: string;\n};\n\ntype ExchangePayload = {\n grant_type: 'authorization_code';\n code: string;\n client_id: string;\n code_verifier: string;\n redirect_uri: string;\n};\n\ntype SupportedPayloads =\n | IntrospectPayload\n | RevokePayload\n | ValidatePayload\n | RefreshPayload\n | ExchangePayload;\n\nfunction serialize(payload?: SupportedPayloads) {\n return new URLSearchParams(payload);\n}\n\n/**\n * Format and inject properties that are specific to the `/token` resources.\n */\nfunction injectServiceOptions(\n options: ServiceMethodOptions & {\n payload?: SupportedPayloads;\n },\n): ServiceMethodOptions {\n return {\n ...options,\n /**\n * The `token` service methods always expect a form-encoded body. We still allow\n * end-consumers to pass a raw body, but if `payload` is provided it is serialized.\n */\n body: options.payload ? serialize(options.payload) : undefined,\n headers: {\n ...(options?.headers || {}),\n Accept: 'application/json',\n /**\n * Force the `Content-Type` header to be `application/x-www-form-urlencoded` and `charset=UTF-8`.\n */\n 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',\n },\n };\n}\n\n/**\n * @see https://docs.globus.org/api/auth/reference/#dependent_token_grant_post_v2oauth2token\n */\nexport const token = function (options = {}, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: undefined,\n path: `/v2/oauth2/token`,\n method: HTTP_METHODS.POST,\n preventRetry: true,\n },\n injectServiceOptions(options),\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload?: ExchangePayload;\n}>;\n\n/**\n * @see https://docs.globus.org/api/auth/developer-guide/#obtaining-authorization\n */\nexport const exchange = token;\n\n/**\n * Token Introspection\n * @see https://docs.globus.org/api/auth/reference/#token-introspect\n */\nexport const introspect = function (options, sdkOptions?) {\n if (!options?.payload) {\n throw new Error(`'payload' is required for introspect`);\n }\n return serviceRequest(\n {\n service: ID,\n scope: undefined,\n path: `/v2/oauth2/token/introspect`,\n method: HTTP_METHODS.POST,\n preventRetry: true,\n },\n injectServiceOptions(options),\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: IntrospectPayload;\n}>;\n\n/**\n * Token Revocation\n * @see https://docs.globus.org/api/auth/reference/#token-revoke\n */\nexport const revoke = function (options, sdkOptions?) {\n if (!options?.payload) {\n throw new Error(`'payload' is required for revoke`);\n }\n return serviceRequest(\n {\n service: ID,\n scope: undefined,\n path: `/v2/oauth2/token/revoke`,\n method: HTTP_METHODS.POST,\n preventRetry: true,\n },\n injectServiceOptions(options),\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: RevokePayload;\n}>;\n\n/**\n * Token Refresh\n * @see https://docs.globus.org/api/auth/reference/#refresh_token_grant\n */\nexport const refresh = function (options, sdkOptions?) {\n if (!options?.payload) {\n throw new Error(`'payload' is required for revoke`);\n }\n return serviceRequest(\n {\n service: ID,\n scope: undefined,\n path: `/v2/oauth2/token`,\n method: HTTP_METHODS.POST,\n preventRetry: true,\n },\n injectServiceOptions(options),\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: RefreshPayload;\n}>;\n\n/**\n * @private\n * @deprecated Rather than using `validate` to check if a token is valid, it is recommended to make a request to the resource server with the token and handle the error response.\n */\nexport const validate = function (options, sdkOptions?) {\n if (!options?.payload) {\n throw new Error(`'payload' is required for validate`);\n }\n return serviceRequest(\n {\n service: ID,\n scope: undefined,\n path: `/v2/oauth2/token/validate`,\n method: HTTP_METHODS.POST,\n preventRetry: true,\n },\n injectServiceOptions(options),\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: ValidatePayload;\n}>;\n", "import { StorageSystem } from './index.js';\n\nexport class MemoryStorage implements StorageSystem {\n #storage: Record<string, string | null> = {};\n\n get(key: string) {\n return this.#storage[key] !== undefined ? this.#storage[key] : null;\n }\n\n set(key: string, value: unknown) {\n this.#storage[key] = typeof value !== 'string' ? JSON.stringify(value) : value;\n }\n\n remove(key: string) {\n delete this.#storage[key];\n }\n\n keys() {\n return Object.keys(this.#storage);\n }\n\n clear() {\n this.#storage = {};\n }\n}\n", "import { StorageSystem } from './index.js';\n\nexport class LocalStorage implements StorageSystem {\n #storage = globalThis.localStorage;\n\n get(key: string) {\n return this.#storage.getItem(key);\n }\n\n set(key: string, value: unknown) {\n this.#storage.setItem(key, typeof value !== 'string' ? JSON.stringify(value) : value);\n }\n\n keys() {\n return Object.keys(this.#storage);\n }\n\n remove(key: string) {\n this.#storage.removeItem(key);\n }\n\n clear() {\n this.#storage.clear();\n }\n}\n", "import { MemoryStorage } from './memory.js';\nimport { LocalStorage } from './local-storage.js';\n/**\n * Acts as a basic wrapper for storage layers to make their surface APIs consistent.\n */\nexport interface StorageSystem {\n get(key: string): string | null;\n set(key: string, value: unknown): void;\n remove(key: string): void;\n keys(): string[];\n clear(): void;\n}\n\nlet storage: StorageSystem | undefined;\n\nexport type StorageOptions =\n | 'localStorage'\n | 'memory'\n | {\n new (): StorageSystem;\n };\n\n/**\n * Returns the active storage system or creates an instance for the running process.\n */\nexport function createStorage(storageType: StorageOptions = 'memory'): StorageSystem {\n if (!storage) {\n let Factory: new () => StorageSystem;\n if (storageType === 'localStorage') {\n Factory = LocalStorage;\n } else if (storageType === 'memory') {\n Factory = MemoryStorage;\n } else {\n Factory = storageType;\n }\n storage = new Factory();\n }\n return storage;\n}\n\nexport default createStorage;\n\n/**\n * Returns the active storage system.\n */\nexport const getStorage = createStorage;\n\n/**\n * A private method for resetting the storage system. This is primarily used to reset\n * the storage system during testing.\n * @private\n */\n// eslint-disable-next-line no-underscore-dangle, @typescript-eslint/naming-convention\nexport function __reset() {\n storage = undefined;\n}\n", "/**\n * @todo It would be nice to not `| any` here, but ideally callers do not need to\n * fully type the payload to attach listeners.\n */\ntype ListenerCallback<P> = (payload?: P | any) => Promise<void> | void;\n\nexport class Event<EventName extends string, Payload extends unknown> {\n #callbacks: ListenerCallback<Payload>[] = [];\n\n constructor(readonly name: EventName) {}\n\n addListener(callback: ListenerCallback<Payload>) {\n this.#callbacks.push(callback);\n return () => this.removeListener(callback);\n }\n\n removeListener(callback: ListenerCallback<Payload>) {\n this.#callbacks = this.#callbacks.filter((cb) => cb !== callback);\n }\n\n clearListeners() {\n this.#callbacks = [];\n }\n\n async dispatch(payload?: Payload) {\n await Promise.all(this.#callbacks.map((callback) => callback(payload)));\n }\n}\n", "export function isSupported() {\n return 'crypto' in globalThis;\n}\n\nfunction getCrypto(): Crypto {\n return 'webcrypto' in globalThis.crypto\n ? (globalThis.crypto.webcrypto as unknown as Crypto)\n : globalThis.crypto;\n}\n\n/**\n * Base64 URL encode a string.\n * @see https://www.oauth.com/oauth2-servers/pkce/authorization-request/\n */\nconst encode = (value: string) =>\n btoa(value).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '');\n\nasync function sha256(input: string) {\n const hashBuffer = await getCrypto().subtle.digest('SHA-256', new TextEncoder().encode(input));\n return String.fromCharCode(...new Uint8Array(hashBuffer));\n}\n\n/**\n * Character set for generating random alpha-numeric strings.\n */\nconst CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\n/**\n * Character set allowed to be used in the PKCE `code_verifier`\n * @see https://www.rfc-editor.org/rfc/rfc7636#section-4.1\n */\nconst PKCE_SAFE_CHARSET = `${CHARSET}-._~`;\n/**\n * Create a Code Verifier for PKCE\n * @see https://www.rfc-editor.org/rfc/rfc7636#section-4.1\n */\nexport function generateCodeVerifier() {\n /**\n * @todo Make length random between 43 and 128 characters\n */\n return Array.from(getCrypto().getRandomValues(new Uint8Array(43)))\n .map((v) => PKCE_SAFE_CHARSET[v % PKCE_SAFE_CHARSET.length])\n .join('');\n}\n\n/**\n * Create a Code Challenge from a provided Code Verifier (assumes S256 `code_challenge_method`).\n * @see https://www.rfc-editor.org/rfc/rfc7636#section-4.2\n */\nexport async function generateCodeChallenge(verifier: string) {\n const hashed = await sha256(verifier);\n return encode(hashed);\n}\n\nexport function generateState() {\n return Array.from(getCrypto().getRandomValues(new Uint8Array(16)))\n .map((v) => CHARSET[v % CHARSET.length])\n .join('');\n}\n\n/**\n * @see https://www.oauth.com/oauth2-servers/pkce/authorization-code-exchange/\n */\nexport type AuthorizationCodeExchangeParameters = {\n code: string;\n code_verifier: string;\n client_id: string;\n client_secret?: string;\n redirect_uri: string;\n grant_type: 'authorization_code';\n};\n\n/**\n * @see https://www.oauth.com/oauth2-servers/pkce/authorization-request/\n */\nexport type AuthorizationRequestParameters = {\n client_id: string;\n redirect_uri: string;\n response_type: 'code';\n scope: string;\n state: string;\n code_challenge: string;\n code_challenge_method: 'S256' | 'plain';\n};\n", "import { getAuthorizationEndpoint, oauth2 } from '../../services/auth/index.js';\nimport {\n generateCodeChallenge,\n generateCodeVerifier,\n generateState,\n AuthorizationRequestParameters,\n AuthorizationCodeExchangeParameters,\n isSupported,\n} from './pkce.js';\n\nimport type { AuthorizationManagerConfiguration } from './AuthorizationManager';\n\nexport type GetTokenOptions = {\n /**\n * Whether or not the URL should be replaced after processing the token.\n * @default true\n */\n shouldReplace?: boolean;\n};\n\nexport type RedirectTransportOptions = Pick<\n AuthorizationManagerConfiguration,\n 'client' | 'redirect' | 'scopes'\n> & {\n /**\n * Query parameters to include in the authorization request.\n *\n * The `RedirectTransport` will include all parameters required for a default OAuth PKCE flow, but\n * these parameters can be overridden or extended with this option.\n */\n params?: {\n [key: string]: string;\n };\n};\n\n/**\n * @private\n */\nexport const KEYS = {\n PKCE_STATE: 'pkce_state',\n PKCE_CODE_VERIFIER: 'pkce_code_verifier',\n};\n\nfunction resetPKCE() {\n sessionStorage.removeItem(KEYS.PKCE_STATE);\n sessionStorage.removeItem(KEYS.PKCE_CODE_VERIFIER);\n}\n\nexport class RedirectTransport {\n #options: RedirectTransportOptions;\n\n constructor(options: RedirectTransportOptions) {\n this.#options = options;\n if (RedirectTransport.supported === false) {\n throw new Error('RedirectTransport is not supported in this environment.');\n }\n }\n\n static supported = isSupported();\n\n /**\n * For the redirect transport, sending the request will redirect the user to the authorization endpoint, initiating the OAuth flow.\n */\n async send() {\n /**\n * Since we'll be using PKCE, we need to generate a code verifier and challenge\n * for the OAuth handshake.\n */\n const verifier = generateCodeVerifier();\n const challenge = await generateCodeChallenge(verifier);\n /**\n * If there is caller-provided `state`, use it; Otherwise, generate a state parameter.\n */\n const state = this.#options.params?.['state'] ?? generateState();\n /**\n * The verifier and state are stored in session storage so that we can validate\n * the response when we receive it.\n */\n sessionStorage.setItem(KEYS.PKCE_CODE_VERIFIER, verifier);\n sessionStorage.setItem(KEYS.PKCE_STATE, state);\n\n const params: AuthorizationRequestParameters = {\n response_type: 'code',\n client_id: this.#options.client,\n scope: this.#options.scopes || '',\n redirect_uri: this.#options.redirect,\n state,\n code_challenge: challenge,\n code_challenge_method: 'S256',\n ...(this.#options.params || {}),\n };\n\n const url = new URL(getAuthorizationEndpoint());\n url.search = new URLSearchParams(params).toString();\n\n window.location.assign(url.toString());\n }\n\n /**\n * Parse the current URL for the authorization code (`?code=...`) and exchange it for an access token when available.\n * - When the URL is processed and exchanged for an access token, the page is redirected to the current URL without the `?code=...&state=...` parameters.\n */\n async getToken(options: GetTokenOptions = { shouldReplace: true }) {\n const url = new URL(window.location.href);\n const params = new URLSearchParams(url.search);\n /**\n * Check for an error in the OAuth flow.\n * @see https://www.oauth.com/oauth2-servers/pkce/authorization-request/\n */\n if (params.get('error')) {\n throw new Error(\n params.get('error_description') || 'An error occurred during the authorization process.',\n );\n }\n\n const code = params.get('code');\n\n /**\n * If we don't have a `code` parameter, we can't exchange it for an access token.\n */\n if (!code) return undefined;\n\n /**\n * Grab the PKCE information from session storage.\n */\n const state = sessionStorage.getItem(KEYS.PKCE_STATE);\n const verifier = sessionStorage.getItem(KEYS.PKCE_CODE_VERIFIER);\n /**\n * Now that we have the values in memory, we can remove them from session storage.\n */\n resetPKCE();\n\n /**\n * Validate the `state` parameter matches the preserved state (to prevent CSRF attacks).\n */\n if (params.get('state') !== state) {\n throw new Error(\n 'Invalid State. The received \"state\" parameter does not match the expected state.',\n );\n }\n /**\n * Ensure we have a valid code verifier.\n */\n if (!verifier) {\n throw new Error('Invalid Code Verifier');\n }\n\n /**\n * Prepare the payload for the PKCE token exchange.\n */\n const payload: AuthorizationCodeExchangeParameters = {\n code,\n client_id: this.#options.client,\n /**\n * Retrieve the code verifier from session storage.\n */\n code_verifier: verifier,\n redirect_uri: this.#options.redirect,\n grant_type: 'authorization_code',\n };\n\n const response = await (\n await oauth2.token.exchange({\n payload,\n })\n ).json();\n\n if (options.shouldReplace) {\n /**\n * Remove the `code` and `state` parameters from the URL.\n */\n params.delete('code');\n params.delete('state');\n /**\n * Update the URL with the new query string.\n */\n url.search = params.toString();\n /**\n * Redirect the page to the new URL (without the `code` and `state` parameters)/\n */\n window.location.replace(url);\n }\n return response;\n }\n}\n", "import { getStorage } from '../storage/index.js';\nimport { CONFIG, isToken } from '../../services/auth/index.js';\n\nimport { SERVICES, type Service } from '../global.js';\nimport { AuthorizationManager } from './AuthorizationManager.js';\n\nimport type { Token, TokenResponse } from '../../services/auth/types.js';\n\nexport type StoredToken = Token & {\n /**\n * Tokens stored before the introduction of the `__metadata` field will be missing this property.\n * @since 4.3.0\n */\n __metadata?: {\n /**\n * The timestamp when the token was added to the storage as a number of milliseconds since the Unix epoch.\n *\n * **IMPORTANT**: This value might **not** represent the time when the token was created by the authorization server.\n */\n created: number;\n /**\n * The timestamp when the token will expire as a number of milliseconds since the Unix epoch, based\n * on the `expires_in` value from the token response and the time when the token was stored.\n */\n expires: number | null;\n };\n};\n\nfunction getTokenFromStorage(key: string) {\n const raw = getStorage().get(key) || 'null';\n let token: StoredToken | null = null;\n try {\n const parsed = JSON.parse(raw);\n if (isToken(parsed)) {\n token = parsed;\n }\n } catch (e) {\n // no-op\n }\n return token;\n}\n\n/**\n * @todo In the next major version, we should consider renaming this class to `TokenManager`,\n * since it's usage has expanded beyond just looking up tokens.\n */\nexport class TokenLookup {\n #manager: AuthorizationManager;\n\n constructor(options: { manager: AuthorizationManager }) {\n this.#manager = options.manager;\n }\n\n #getClientStorageEntry(identifier: string) {\n return getTokenFromStorage(`${this.#manager.storageKeyPrefix}${identifier}`);\n }\n\n #getTokenForService(service: Service) {\n const resourceServer = CONFIG.RESOURCE_SERVERS?.[service];\n return this.#getClientStorageEntry(resourceServer);\n }\n\n get auth(): StoredToken | null {\n return this.#getTokenForService(SERVICES.AUTH);\n }\n\n get transfer(): StoredToken | null {\n return this.#getTokenForService(SERVICES.TRANSFER);\n }\n\n get flows(): StoredToken | null {\n return this.#getTokenForService(SERVICES.FLOWS);\n }\n\n get groups(): StoredToken | null {\n return this.#getTokenForService(SERVICES.GROUPS);\n }\n\n get search(): StoredToken | null {\n return this.#getTokenForService(SERVICES.SEARCH);\n }\n\n get timer(): StoredToken | null {\n return this.#getTokenForService(SERVICES.TIMER);\n }\n\n get compute(): StoredToken | null {\n return this.#getTokenForService(SERVICES.COMPUTE);\n }\n\n gcs(endpoint: string): StoredToken | null {\n return this.getByResourceServer(endpoint);\n }\n\n getByResourceServer(resourceServer: string): StoredToken | null {\n return this.#getClientStorageEntry(resourceServer);\n }\n\n getAll(): StoredToken[] {\n const entries = getStorage()\n .keys()\n .reduce((acc: (StoredToken | null)[], key) => {\n if (key.startsWith(this.#manager.storageKeyPrefix)) {\n acc.push(getTokenFromStorage(key));\n }\n return acc;\n }, []);\n return entries.filter(isToken);\n }\n\n /**\n * Add a token to the storage.\n */\n add(token: Token | TokenResponse) {\n const created = Date.now();\n const expires = created + token.expires_in * 1000;\n getStorage().set(`${this.#manager.storageKeyPrefix}${token.resource_server}`, {\n ...token,\n /**\n * Add metadata to the token to track when it was created and when it expires.\n */\n __metadata: {\n created,\n expires,\n },\n });\n if ('other_tokens' in token) {\n token.other_tokens?.forEach((t) => {\n this.add(t);\n });\n }\n }\n\n /**\n * Determines whether or not a stored token is expired.\n * @param token The token to check.\n * @param augment An optional number of milliseconds to add to the current time when checking the expiration.\n * @returns `true` if the token is expired, `false` if it is not expired, and `undefined` if the expiration status cannot be determined\n * based on the token's metadata. This can happen if the token is missing the `__metadata` field or the `expires` field.\n */\n static isTokenExpired(token: StoredToken | null, augment: number = 0): boolean | undefined {\n /* eslint-disable no-underscore-dangle */\n if (!token || !token.__metadata || typeof token.__metadata.expires !== 'number') {\n return undefined;\n }\n return Date.now() + augment >= token.__metadata.expires;\n /* eslint-enable no-underscore-dangle */\n }\n}\n", "/**\n * @description A wrapper around the Globus Transfer service.\n * @group Service\n * @see [Globus Transfer API Documentation](https://docs.globus.org/api/transfer/)\n * @module\n */\nimport * as TRANSFER from './config.js';\n\nimport { endpointSearch } from './service/endpoint-search.js';\n\n/**\n * @private\n * @internal\n */\nexport const CONFIG = TRANSFER;\n\nexport { endpointSearch };\nexport * as fileOperations from './service/file-operations.js';\nexport * as taskSubmission from './service/task-submission.js';\nexport * as endpoint from './service/endpoint.js';\nexport * as task from './service/task.js';\nexport * as access from './service/access.js';\nexport * as collectionBookmarks from './service/collection-bookmarks.js';\n\nexport * as endpointManager from './service/endpoint-manager/index.js';\n\nexport * as utils from './utils.js';\n", "import { serviceRequest } from '../../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type { BaseServiceMethodOptions, SDKOptions } from '../../../services/types.js';\n\n/**\n * Get a list of endpoints matching the search filters in a given search scope.\n * @see https://docs.globus.org/api/transfer/endpoint_search/#endpoint_search\n */\nexport const endpointSearch = function (\n /**\n * @see https://docs.globus.org/api/transfer/endpoint_search/#query_parameters\n */\n options?: {\n /**\n * @todo This type needs to be converted to a record and this method updated\n * to `satisfies` `ServiceMethod`.\n */\n query?: Globus.Transfer.EndpointSearchQuery;\n headers?: BaseServiceMethodOptions['headers'];\n },\n sdkOptions?: SDKOptions,\n) {\n const serviceRequestOptions = {\n ...options,\n /**\n * Since the exported type used here is an `interface`, we effectivley have to\n * \"seal\" the type, otherwise the compiler will complain about potentially mismatching index types.\n */\n query: options?.query as Readonly<Globus.Transfer.EndpointSearchQuery>,\n };\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_search`,\n },\n serviceRequestOptions,\n sdkOptions,\n );\n};\n\nexport default endpointSearch;\n", "import { HTTP_METHODS, serviceRequest } from '../../shared.js';\nimport { getHeadersForService } from '../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type { Transfer } from '../types.js';\nimport type { JSONFetchResponse, ServiceMethodDynamicSegments } from '../../types.js';\n\n/**\n * @see https://docs.globus.org/api/transfer/file_operations/#file_document\n */\nexport type FileDocument = {\n readonly DATA_TYPE: 'file';\n readonly name: string;\n readonly type: 'dir' | 'file' | 'invalid_symlink' | 'chr' | 'blk' | 'pipe' | 'other';\n readonly link_target?: string | null;\n readonly size?: number;\n readonly last_modified?: string;\n readonly permissions?: string;\n readonly user?: string | null;\n readonly group?: string | null;\n readonly link_size?: number | null;\n readonly link_user?: string | null;\n readonly link_group?: string | null;\n readonly link_last_modified?: string | null;\n};\n\n/**\n * @see https://docs.globus.org/api/transfer/file_operations/#file_list_document\n */\nexport type FileListDocument = {\n readonly DATA_TYPE: 'file_list';\n readonly endpoint: string;\n readonly path: string;\n readonly absolute_path: string | null;\n readonly rename_supported: boolean;\n readonly symlink_supported: boolean;\n readonly DATA: FileDocument[];\n /**\n * n.b. This is currently included in responses, but undocumented; use with care.\n */\n readonly length: number;\n /**\n * n.b. This is currently included in responses, but undocumented; use with care.\n */\n readonly total: number;\n};\n\nexport type DirectoryListingError = {\n /**\n * @see https://docs.globus.org/api/transfer/file_operations/#errors\n */\n code:\n | 'NotSupported'\n | 'ClientError.NotFound'\n | 'EndpointError'\n // Encountered Errors (not documented)\n | 'ExternalError.DirListingFailed.LoginFailed'\n | string;\n message: string;\n request_id: string;\n resource: string;\n};\n\n/**\n * List the contents of the directory at the specified path on an endpoint\u2019s filesystem.\n * The endpoint must be activated before performing this operation.\n *\n * @see https://docs.globus.org/api/transfer/file_operations/#list_directory_contents\n */\nexport const ls = function (\n endpoint_xid,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<FileListDocument | DirectoryListingError>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/operation/endpoint/${endpoint_xid}/ls`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['DirectoryListingQuery'];\n }\n>;\n\n/**\n * Create a directory at the specified path on an endpoint filesystem.\n * The endpoint must be activated before performing this operation.\n *\n * @see https://docs.globus.org/api/transfer/file_operations/#make_directory\n */\nexport const mkdir = function (endpoint_xid, options, sdkOptions?) {\n const serviceRequestOptions = {\n payload: {\n DATA_TYPE: 'mkdir',\n ...options?.payload,\n },\n headers: {\n ...getHeadersForService(HTTP_METHODS.POST),\n ...options?.headers,\n },\n };\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/operation/endpoint/${endpoint_xid}/mkdir`,\n method: HTTP_METHODS.POST,\n },\n serviceRequestOptions,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n payload: Omit<Transfer['Request']['Mkdir'], 'DATA_TYPE'>;\n }\n>;\n\n/**\n * Rename or move a file, directory, or symlink on an endpoint filesystem.\n * If the object is a symlink, the symlink itself is renamed, not its target\n * The endpoint must be activated before performing this operation.\n * When moving to a different parent directory, the parent directory of the new path must already exist.\n *\n * @see https://docs.globus.org/api/transfer/file_operations/#rename\n */\nexport const rename = function (endpoint_xid, options, sdkOptions?) {\n const serviceRequestOptions = {\n payload: {\n DATA_TYPE: 'rename',\n ...options?.payload,\n },\n headers: {\n ...getHeadersForService(HTTP_METHODS.POST),\n ...options?.headers,\n },\n };\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/operation/endpoint/${endpoint_xid}/rename`,\n method: HTTP_METHODS.POST,\n },\n serviceRequestOptions,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n payload: Omit<Transfer['Request']['Rename'], 'DATA_TYPE'>;\n }\n>;\n\n/**\n * Create a directory at the specified path on an endpoint filesystem.\n * The endpoint must be activated before performing this operation.\n *\n * @see https://docs.globus.org/api/transfer/file_operations/#symlink\n */\nexport const symlink = function (endpoint_xid, options, sdkOptions?) {\n const serviceRequestOptions = {\n payload: {\n DATA_TYPE: 'symlink',\n ...options?.payload,\n },\n headers: {\n ...getHeadersForService(HTTP_METHODS.POST),\n ...options?.headers,\n },\n };\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/operation/endpoint/${endpoint_xid}/symlink`,\n method: HTTP_METHODS.POST,\n },\n serviceRequestOptions,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n payload: Omit<Transfer['Request']['Symlink'], 'DATA_TYPE'>;\n }\n>;\n\n/**\n * Stat the file or directory at the specified path on a collection.\n *\n * @see https://docs.globus.org/api/transfer/file_operations/#stat\n */\nexport const stat = function (\n endpoint_xid,\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<FileDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/operation/endpoint/${endpoint_xid}/stat`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: {\n path: string;\n local_user?: string;\n };\n }\n>;\n", "import { HTTP_METHODS } from '../shared.js';\n\nexport function getHeadersForService(method: keyof typeof HTTP_METHODS): Record<string, any> {\n if (method === HTTP_METHODS.GET) {\n return {};\n }\n return {\n 'Content-Type': 'application/json',\n };\n}\n", "import { HTTP_METHODS, serviceRequest } from '../../shared.js';\n\nimport { getHeadersForService } from '../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type { Transfer } from '../types.js';\nimport type { JSONFetchResponse, SDKOptions, ServiceMethod } from '../../types.js';\n\ntype TaskLink = {\n DATA_TYPE: 'link';\n href: string;\n rel: string;\n resource: string;\n title: string;\n};\n\ninterface TaskSubmissionResult {\n DATA_TYPE: string;\n resource: string;\n /**\n * @see https://docs.globus.org/api/transfer/task_submit/#result_codes\n */\n code: 'Accpeted' | 'Duplicate';\n message: string;\n request_id: string;\n submission_id: string;\n task_id: string;\n /**\n * @deprecated Undocumented property.\n */\n task_link: TaskLink;\n}\n\nexport type TransferResult = TaskSubmissionResult & {\n DATA_TYPE: 'transfer_result';\n resource: '/transfer';\n};\n\nexport type DeleteResult = {\n DATA_TYPE: 'delete_result';\n resource: '/delete';\n} & TaskSubmissionResult;\n\ntype UndocumentedEncouneredErrorCodes = 'EndpointNotFound' | string;\n\ntype TaskSubmissionError = {\n /**\n * Known error codes provided by the Transfer documentation.\n *\n * Since the documentation does not provide an exhaustive list of error codes,\n * we also include a catch-all type (`string`) for any undocumented error codes.\n *\n * @see https://docs.globus.org/api/transfer/task_submit/#errors\n */\n code:\n | 'ClientError.BadRequest'\n | 'BadRequest'\n | 'PermissionDenied'\n | 'ConsentRequired'\n | 'ServiceUnavailable'\n | 'Conflict'\n | UndocumentedEncouneredErrorCodes;\n message: string;\n request_id: string;\n resource: string;\n};\n\nexport type TransferError = TaskSubmissionError & {\n resource: '/transfer';\n};\n\nexport type DeleteError = TaskSubmissionError & {\n resource: '/delete';\n};\n\n/**\n * Submit a delete task. A delete submission contains a single endpoint and a\n * list of paths to delete.\n *\n * @see https://docs.globus.org/api/transfer/task_submit/#submit_delete_task\n */\nexport const submitDelete = function (\n options,\n sdkOptions?: SDKOptions,\n): Promise<JSONFetchResponse<DeleteResult | DeleteError>> {\n const serviceRequestOptions = {\n payload: {\n DATA_TYPE: 'delete',\n ...options?.payload,\n },\n headers: {\n ...getHeadersForService(HTTP_METHODS.POST),\n ...options?.headers,\n },\n };\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/delete`,\n method: HTTP_METHODS.POST,\n },\n serviceRequestOptions,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: Omit<Transfer['Request']['Delete'], 'DATA_TYPE'>;\n}>;\n\n/**\n * @see https://docs.globus.org/api/transfer/task_submit/#submit_transfer_task\n */\nexport const submitTransfer = function (\n options,\n sdkOptions?: SDKOptions,\n): Promise<JSONFetchResponse<TransferResult | TransferError>> {\n const serviceRequestOptions = {\n payload: {\n DATA_TYPE: 'transfer',\n ...options?.payload,\n },\n headers: {\n ...getHeadersForService(HTTP_METHODS.POST),\n ...options?.headers,\n },\n };\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/transfer`,\n method: HTTP_METHODS.POST,\n },\n serviceRequestOptions,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: Omit<Transfer['Request']['Transfer'], 'DATA_TYPE'>;\n}>;\n\ntype SubmissionId = {\n DATA_TYPE: 'submission_id';\n value: string;\n};\n\n/**\n * Get a submission id, required when submitting transfer and delete tasks.\n * Note that this is different than the task id returned by the submit operations.\n *\n * @see https://docs.globus.org/api/transfer/task_submit/#get_submission_id\n */\nexport const submissionId = function (\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<SubmissionId>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/submission_id`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: never;\n payload?: never;\n}>;\n", "import { HTTP_METHODS, serviceRequest } from '../../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type {\n ServiceMethodDynamicSegments,\n JSONFetchResponse,\n ServiceMethod,\n} from '../../../services/types.js';\nimport type { Operations } from '../types.js';\n\nexport type GetResponse = Operations['GetEndpoint']['response'];\n/**\n * Fetch an endpoint by its UUID.\n */\nexport const get = function (\n endpoint_xid,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<GetResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint/${endpoint_xid}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\nexport type CreatePayload = Operations['CreateEndpoint']['payload'];\nexport type CreateResponse = Operations['CreateEndpoint']['response'];\n/**\n * Create a Globus Connect Personal guest collection.\n * As of 2024-04-17, this method (and the Transfer API) only supports creating Globus Connect Personal guest collections.\n *\n * Globus Connect Personal mapped collections are created from the Globus Connect Personal application.\n * All GCSv5 collections should be created using Globus Connect Server (i.e. {@link \"@globus/sdk\".gcs.collections.create | `gcs.collections.create`}).\n *\n * @see https://docs.globus.org/api/transfer/gcp_management/#create_guest_collection\n */\nexport const create = function (options?, sdkOptions?): Promise<JSONFetchResponse<CreateResponse>> {\n if (options?.payload) {\n Object.assign(options.payload, { DATA_TYPE: 'shared_endpoint' });\n }\n\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: '/v0.10/shared_endpoint',\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload?: CreatePayload;\n}>;\n\nexport type UpdatePayload = Operations['UpdateEndpoint']['payload'];\nexport type UpdateResponse = Operations['UpdateEndpoint']['response'];\n/**\n * Update a Globus Connect Personal collection.\n * As of 2024-04-17, this method (and the Transfer API) only supports updating Globus Connect Personal collections.\n *\n * All GCSv5 collections should be updated using Globus Connect Server (i.e. {@link \"@globus/sdk\".gcs.collections.update | `gcs.collections.update`}).\n *\n * @see https://docs.globus.org/api/transfer/gcp_management/#update_collection_by_id\n */\nexport const update = function (\n endpoint_xid,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<UpdateResponse>> {\n if (options?.payload) {\n Object.assign(options.payload, { DATA_TYPE: 'endpoint' });\n }\n\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint/${endpoint_xid}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n payload: UpdatePayload;\n query?: never;\n }\n>;\n\nexport type RemoveResponse = Operations['RemoveEndpoint']['response'];\n/**\n * Delete a Globus Connect Personal entity by its UUID.\n * As of 2024-01-08, this method (and the Transfer API) only supports deleting Globus Connect Personal entities.\n *\n * All GCSv5 endpoints and collections should be deleted (and managed) using Globus Connect Server (i.e. {@link \"@globus/sdk\".gcs.collections.remove | `gcs.collections.remove`}).\n *\n * @see https://docs.globus.org/api/transfer/gcp_management/#delete_endpoint_by_id\n */\nexport const remove = function (\n endpoint_xid,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<RemoveResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint/${endpoint_xid}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n", "import { HTTP_METHODS, serviceRequest } from '../../shared.js';\n\nimport { ID, SCOPES } from '../config.js';\n\nimport type {\n ServiceMethod,\n ServiceMethodDynamicSegments,\n JSONFetchResponse,\n} from '../../../services/types.js';\n\nimport type { Transfer } from '../types.js';\n\n/**\n * Get a list of tasks submitted by the current user.\n * @see https://docs.globus.org/api/transfer/task/#get_task_list\n */\nexport const getAll = function (\n options = {},\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n {\n DATA_TYPE: 'task_list';\n DATA: Globus.Transfer.TaskDocument[];\n } & Transfer['Paging']['Offset']['Response']\n >\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: Transfer['Paging']['Offset']['Query'];\n headers?: Record<string, string>;\n payload?: never;\n}>;\n\n/**\n * Fetch a task by its UUID.\n * @see https://docs.globus.org/api/transfer/task/#get_task_by_id\n */\nexport const get = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.TaskDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task/${task_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/task/#update_task_by_id\n */\nexport const update = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<{\n DATA_TYPE: 'result';\n code: 'Updated';\n message: string;\n request_id: string;\n resource: `/task/${string}/cancel`;\n }>\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task/${task_id}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload: Record<string, string>;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/task/#cancel_task_by_id\n */\nexport const cancel = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.TaskDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task/${task_id}/cancel`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/task/#remove_task_by_id\n */\nexport const remove = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.TaskDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task/${task_id}/remove`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/task/#get_event_list\n */\nexport const getEventList = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.TaskEventListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task/${task_id}/event_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Offset']['Query'];\n headers?: Record<string, string>;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/task/#get_task_successful_transfers\n */\nexport const getSuccessfulTransfers = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.SuccessfulTransfersListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task/${task_id}/successful_transfers`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Marker']['Query'];\n headers?: Record<string, string>;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/task/#get_task_skipped_errors\n */\nexport const getSkippedErrors = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.SkippedErrorsListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task/${task_id}/skipped_errors`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Marker']['Query'];\n headers?: Record<string, string>;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/task/#get_task_pause_info\n */\nexport const getPauseInfo = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.PauseInfoLimitedDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task/${task_id}/pause_info`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n headers?: Record<string, string>;\n payload?: never;\n }\n>;\n", "import { HTTP_METHODS, serviceRequest } from '../../shared.js';\nimport { ID, SCOPES } from '../config.js';\nimport { Transfer } from '../types.js';\n\nimport type { ServiceMethodDynamicSegments, JSONFetchResponse } from '../../../services/types.js';\n\n/**\n * @see https://docs.globus.org/api/transfer/acl/#rest_access_get_list\n */\nexport const getAll = function (\n endpoint_xid,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.AccessListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint/${endpoint_xid}/access_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Offset']['Query'];\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/acl/#rest_access_create\n */\nexport const create = function (\n endpoint_xid,\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.AccessDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint/${endpoint_xid}/access`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n payload: Partial<Globus.Transfer.AccessDocument>;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/acl/#get_access_rule_by_id\n */\nexport const get = function (\n { endpoint_xid, id },\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.AccessDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint/${endpoint_xid}/access/${id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n { endpoint_xid: string; id: string },\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/acl/#update_access_rule\n */\nexport const update = function (\n { endpoint_xid, id },\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<{\n DATA_TYPE: 'result';\n code: 'Updated';\n message: string;\n request_id: string;\n resource: `/endpoint/${string}/access/${string}`;\n }>\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint/${endpoint_xid}/access/${id}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n { endpoint_xid: string; id: string },\n {\n query?: never;\n payload: Partial<Globus.Transfer.AccessDocument>;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/acl/#delete_access_rule\n */\nexport const remove = function (\n { endpoint_xid, id },\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<{\n DATA_TYPE: 'result';\n code: 'Deleted';\n message: string;\n request_id: string;\n resource: `/endpoint/${string}/access/${string}`;\n }>\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint/${endpoint_xid}/access/${id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n { endpoint_xid: string; id: string },\n {\n query?: never;\n payload?: never;\n }\n>;\n", "import { HTTP_METHODS, serviceRequest } from '../../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type {\n ServiceMethodDynamicSegments,\n JSONFetchResponse,\n ServiceMethod,\n} from '../../types.js';\n\n/**\n * @see https://docs.globus.org/api/transfer/collection_bookmarks/#get_list_of_bookmarks\n */\nexport const getAll = function (\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.BookmarkListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/bookmark_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: never;\n payload?: never;\n}>;\n\n/**\n * @see https://docs.globus.org/api/transfer/collection_bookmarks/#create_bookmark\n */\nexport const create = function (\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.BookmarkDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/bookmark`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: Partial<Globus.Transfer.BookmarkDocument>;\n}>;\n\n/**\n * @see https://docs.globus.org/api/transfer/collection_bookmarks/#get_bookmark_by_id\n */\nexport const get = function (\n bookmark_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.BookmarkDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/bookmark/${bookmark_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/collection_bookmarks/#update_bookmark\n */\nexport const update = function (\n bookmark_id,\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.BookmarkDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/bookmark/${bookmark_id}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload: Partial<Globus.Transfer.BookmarkDocument> & { name: string };\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/collection_bookmarks/#delete_bookmark_by_id\n */\nexport const remove = function (\n bookmark_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<{\n DATA_TYPE: 'result';\n code: 'Deleted';\n message: string;\n resource: `/bookmark/${string}`;\n request_id: string;\n }>\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/bookmark/${bookmark_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n", "export * as endpoint from './endpoint.js';\nexport * as pauseRule from './pause-rule.js';\nexport * as task from './task.js';\n", "import { serviceRequest } from '../../../shared.js';\nimport { ID, SCOPES } from '../../config.js';\n\nimport type {\n ServiceMethodDynamicSegments,\n JSONFetchResponse,\n ServiceMethod,\n} from '../../../../services/types.js';\n\nimport type { Transfer } from '../../types.js';\n\n/**\n * Fetch an endpoint by its UUID as an administrator.\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#mc_get_endpoint\n */\nexport const get = function (\n endpoint_xid,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.EndpointDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/endpoint/${endpoint_xid}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_hosted_endpoint_list\n */\nexport const getHostedEndpoints = function (\n endpoint_xid,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.EndpointListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/endpoint/${endpoint_xid}/hosted_endpoint_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Offset']['Query'];\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_task_events\n */\nexport const getAccessList = function (\n endpoint_xid,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.AccessListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/endpoint/${endpoint_xid}/access_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Offset']['Query'];\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_monitored_endpoints\n */\nexport const getMonitoredEndpoints = function (\n options = {},\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n Omit<Globus.Transfer.EndpointListDocument, 'DATA_TYPE'> & { DATA_TYPE: 'monitored_endpoints' }\n >\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/monitored_endpoints`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: Transfer['Paging']['Offset']['Query'];\n payload?: never;\n}>;\n", "import { HTTP_METHODS, serviceRequest } from '../../../shared.js';\n\nimport { ID, SCOPES } from '../../config.js';\n\nimport type {\n ServiceMethod,\n ServiceMethodDynamicSegments,\n JSONFetchResponse,\n} from '../../../../services/types.js';\n\n/**\n * Get a list of pause rules on endpoints that the current user has the \"activity_monitor\" role on.\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_pause_rules\n */\nexport const getAll = function (\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<{\n DATA_TYPE: 'pause_rule_list';\n DATA: Globus.Transfer.PauseRuleDocument[];\n }>\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/pause_rule_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: { filter_endpoint?: string; filter_host_endpoint?: string };\n payload?: never;\n}>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#create_pause_rule\n */\nexport const create = function (\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.PauseRuleDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/pause_rule`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: Partial<Globus.Transfer.PauseRuleDocument>;\n}>;\n\n/**\n * Fetch a pause_rule by its UUID.\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_pause_rule\n */\nexport const get = function (\n pause_rule_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.PauseRuleDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/pause_rule/${pause_rule_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#update_pause_rule\n */\nexport const update = function (\n pause_rule_id,\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.PauseRuleDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/pause_rule/${pause_rule_id}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload: Partial<Globus.Transfer.PauseRuleDocument>;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#delete_pause_rule\n */\nexport const remove = function (\n pause_rule_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<{\n DATA_TYPE: 'result';\n code: 'Deleted';\n message: string;\n request_id: string;\n resource: string;\n }>\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/pause_rule/${pause_rule_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n", "import { HTTP_METHODS, serviceRequest } from '../../../shared.js';\nimport { ID, SCOPES } from '../../config.js';\n\nimport type {\n ServiceMethod,\n ServiceMethodDynamicSegments,\n JSONFetchResponse,\n} from '../../../../services/types.js';\n\nimport type { Transfer } from '../../types.js';\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_tasks\n */\nexport const getAll = function (\n options = {},\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n {\n DATA_TYPE: 'task_list';\n DATA: Globus.Transfer.EndpointManagerTaskDocument[];\n } & Transfer['Paging']['LastKey']['Response']\n >\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: Globus.Transfer.AdminTaskQuery;\n payload?: never;\n}>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_task\n */\nexport const get = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.EndpointManagerTaskDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/task/${task_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#admin_cancel\n */\nexport const cancel = function (\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.AdminCancelDocumentResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/admin_cancel`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: never;\n payload: Globus.Transfer.AdminCancelDocument;\n}>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_cancel_status_by_id\n */\nexport const getAdminCancel = function (\n admin_cancel_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.AdminCancelDocumentResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/admin_cancel/${admin_cancel_id}`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_task_events\n */\nexport const getEventList = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.TaskEventListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/task/${task_id}/event_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Offset']['Query'] & { filter_is_error?: 1 };\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_task_successful_transfers_as_admin\n */\nexport const getSuccessfulTransfers = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.SuccessfulTransfersListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/task/${task_id}/successful_transfers`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Marker']['Query'];\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_task_skipped_errors_transfers_as_admin\n */\nexport const getSkippedErrors = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.SkippedErrorsListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/task/${task_id}/skipped_errors`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Marker']['Query'];\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#pause_tasks_as_admin\n */\nexport const pause = function (\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.AdminPauseDocumentResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/admin_pause`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: never;\n payload?: Globus.Transfer.AdminPauseDocument;\n}>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#resume_tasks_as_admin\n */\nexport const resume = function (\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.AdminResumeDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/admin_resume`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: never;\n payload?: Globus.Transfer.AdminResumeDocument;\n}>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_task_pause_info_as_admin\n */\nexport const getPauseInfo = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.PauseInfoLimitedDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/task/${task_id}/pause_info`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n", "import type { FileDocument } from './service/file-operations.js';\n\n/**\n * Determines if the given entry is a Globus Transfer File Document.\n * @see https://docs.globus.org/api/transfer/file_operations/#file_document\n */\nexport function isFileDocument(entry: unknown): entry is FileDocument {\n return (\n typeof entry === 'object' &&\n entry !== null &&\n 'DATA_TYPE' in entry &&\n entry.DATA_TYPE === 'file'\n );\n}\n/**\n * Determines if the given entry is a directory.\n * @see https://docs.globus.org/api/transfer/file_operations/#file_document\n */\nexport function isDirectory(entry: unknown) {\n return isFileDocument(entry) && entry.type === 'dir';\n}\n\nconst KB = 1000;\nconst MB = KB * 1000;\nconst GB = MB * 1000;\nconst TB = GB * 1000;\nconst PB = TB * 1000;\n/**\n * Returns a readable string for the given bytes, **rounded and truncated** to the given number of decimal places.\n * @param bytes The number of bytes to convert to a readable string.\n * @param [truncate=2] The number of decimal places to truncate the result to.\n */\nexport function readableBytes(bytes: number, truncate = 2) {\n let unit = 'B';\n let bytesInUnit = 1;\n if (bytes < KB) {\n return `${bytes} ${unit}`;\n }\n if (bytes < MB) {\n unit = 'KB';\n bytesInUnit = KB;\n } else if (bytes < GB) {\n unit = 'MB';\n bytesInUnit = MB;\n } else if (bytes < TB) {\n unit = 'GB';\n bytesInUnit = GB;\n } else if (bytes < PB) {\n unit = 'TB';\n bytesInUnit = TB;\n } else {\n unit = 'PB';\n bytesInUnit = PB;\n }\n const value = bytes / bytesInUnit;\n const [int, dec] = `${value}`.split('.');\n let rendered = `${int}`;\n if (dec && dec.length) {\n const truncated = dec.slice(0, truncate);\n if (truncated.length) {\n rendered = `${int}.${truncated}`;\n }\n }\n return `${rendered} ${unit}`;\n}\n\n/**\n * Known Globus DNS domains.\n */\nconst GLOBUS_DNS_DOMAINS = ['dnsteam.globuscs.info', 'data.globus.org', 'dn.glob.us'];\n\n/**\n * Returns DNS domain, if any, for a collection or endpoint.\n *\n * - Custom domains will be displayed without any auto-generated wildcard subdomains.\n * - Globus domains will include the auto-generated section to make them identifiable.\n *\n * @param endpoint The endpoint to extract the domain from. While any object will be parsed, this function is intended for use with [Globus Transfer Endpoint or Collection Documents](https://docs.globus.org/api/transfer/endpoints_and_collections/#endpoint_or_collection_document).\n * @see https://docs.globus.org/globus-connect-server/v5.4/domain-guide/#custom_domains_new_in_v_5_4_13\n */\nexport function getDomainFromEndpoint(endpoint: Record<string, unknown>) {\n const { tlsftp_server: tls } = endpoint;\n if (!tls || typeof tls !== 'string') {\n return null;\n }\n /**\n * Swap the protocol to `https` so we can use the URL API to extract the hostname.\n */\n const { hostname } = new URL(tls.replace('tlsftp', 'https'));\n const hasCustomDomain = !GLOBUS_DNS_DOMAINS.find((d) => hostname.endsWith(d));\n const customDomain = hasCustomDomain && /(?:[gm]-\\w{6}.)?(\\w+(\\.\\w+)+)$/.exec(hostname)?.[1];\n\n return customDomain || hostname || null;\n}\n", "/**\n * @description A wrapper around the Globus Search service.\n * @group Service\n * @see [Globus Search API Documentation](https://docs.globus.org/api/search/reference/)\n * @module\n */\nimport * as SEARCH from './config.js';\n\n/**\n * @private\n * @internal\n */\nexport const CONFIG = SEARCH;\n\nexport * as query from './service/query.js';\nexport * as subject from './service/subject.js';\nexport * as entry from './service/entry.js';\nexport * as index from './service/search-index.js';\n", "import { HTTP_METHODS, serviceRequest } from '../../shared.js';\n\nimport type { JSONFetchResponse, ServiceMethodDynamicSegments } from '../../types.js';\n\nimport { ID, SCOPES } from '../config.js';\nimport { ResultFormatVersion } from '../types.js';\n\nexport type MatchedPrincipalSets = string[];\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gmetaresult\n */\nexport type GMetaResult = {\n subject: string;\n entries: {\n entry_id: string;\n content: Record<string, unknown>;\n matched_principal_sets: MatchedPrincipalSets;\n }[];\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gfacetresult\n */\nexport type GFacetResult = {\n name: string;\n value?: string;\n buckets?: GBucket[];\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gbucket\n */\nexport type GBucket = {\n value: string | GFilter;\n count: number;\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gsearchresult\n */\nexport type GSearchResult = {\n gmeta: GMetaResult[];\n facet_results?: GFacetResult[];\n offset: number;\n count: number;\n total: number;\n has_next_page: boolean;\n};\n\n/**\n * @param index_id The UUID of the index to query.\n *\n * @see https://docs.globus.org/api/search/reference/get_query/\n */\nexport const get = function (\n index_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<GSearchResult>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.SEARCH,\n path: `/v1/index/${index_id}/search`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n /**\n * @see https://docs.globus.org/api/search/reference/get_query/#parameters\n */\n query?: {\n q: string;\n offset?: `${number}` | number;\n limit?: `${number}` | number;\n advanced?: 'true' | 'false';\n bypass_visible_to?: 'true' | 'false';\n result_format_version?: string;\n filter_principal_sets?: string;\n };\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gsearchrequest\n */\nexport type GSearchRequest = {\n q: string;\n offset?: number;\n limit?: number;\n advanced?: boolean;\n bypass_visible_to?: boolean;\n result_format_version?: ResultFormatVersion;\n filter_principal_sets?: string[];\n filters?: GFilter[];\n facets?: GFacet[];\n boosts?: GBoost[];\n sort?: GSort[];\n};\n\n/**\n * @param index_id The UUID of the index to query.\n *\n * @see https://docs.globus.org/api/search/reference/post_query/\n */\nexport const post = function (\n index_id,\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<GSearchResult>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.SEARCH,\n path: `/v1/index/${index_id}/search`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n payload: GSearchRequest;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gfilter\n */\nexport type GFilter = GFilterMatch | GFilterRange | GFilterExists | GFilterNot;\n\ntype GFilterTypeMatch = 'match_any' | 'match_all';\ntype GFilterTypeRange = 'range';\n\ntype GFilterMatch = {\n type: GFilterTypeMatch;\n field_name: string;\n values: Array<string>;\n};\ntype GFilterRange = {\n type: GFilterTypeRange;\n field_name: string;\n values: Array<{ from: string; to: string }>;\n};\ntype GFilterExists = {\n type: 'exists';\n field_name: string;\n};\ntype GFilterNot = {\n type: 'not';\n filter: GFilter;\n};\n\ntype HistogramRange = { low: number | string; high: number | string };\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gfacet\n */\nexport type GFacet = {\n name: string;\n field_name: string;\n} & (\n | {\n type: 'terms';\n }\n | {\n type: 'sum' | 'avg';\n missing?: number;\n }\n | {\n type: 'date_histogram';\n date_interval: DateInterval;\n histogram_range?: HistogramRange;\n }\n | {\n type: 'numeric_histogram';\n size: string;\n interval: number;\n histogram_range: HistogramRange;\n }\n);\n\ntype DateInterval = 'year' | 'quarter' | 'month' | 'week' | 'day' | 'hour' | 'minute' | 'second';\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gboost\n */\nexport type GBoost = {\n field_name: string;\n factor: number;\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gsort\n */\nexport type GSort = {\n field_name: string;\n order: 'asc' | 'desc';\n};\n", "import { serviceRequest } from '../../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type { ServiceMethodDynamicSegments } from '../../types.js';\nimport type { ResultFormatVersion } from '../types.js';\n\n/**\n * Lookup a single Subject in a Search Index.\n * @param index_id The UUID of the Search index where the lookup will be performed.\n *\n * @see https://docs.globus.org/api/search/reference/get_subject/\n */\nexport const get = function (index_id, options?, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.SEARCH,\n path: `/v1/index/${index_id}/subject`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n /**\n * @see https://docs.globus.org/api/search/reference/get_subject/#parameters\n */\n query: {\n subject: string;\n result_format_version?: ResultFormatVersion | string;\n bypass_visible_to?: 'true' | 'false';\n };\n }\n>;\n", "import { serviceRequest } from '../../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type { ResultFormatVersion } from '../types.js';\nimport type { ServiceMethodDynamicSegments } from '../../types.js';\n\n/**\n * Lookup a single Entry in a Search Index.\n * @param index_id The UUID of the Search index where the lookup will be performed.\n *\n * @see https://docs.globus.org/api/search/reference/get_entry/\n */\nexport const get = function (index_id, options?, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.SEARCH,\n path: `/v1/index/${index_id}/entry`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n /**\n * @see https://docs.globus.org/api/search/reference/get_entry/#parameters\n */\n query: {\n subject: string;\n entry_id?: string;\n result_format_version?: ResultFormatVersion | string;\n bypass_visible_to?: 'true' | 'false';\n };\n }\n>;\n", "import { HTTP_METHODS, serviceRequest } from '../../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type {\n JSONFetchResponse,\n ServiceMethod,\n ServiceMethodDynamicSegments,\n} from '../../types.js';\n\n/**\n * @see https://docs.globus.org/api/search/reference/index_list/#indexwithpermissions\n */\nexport type IndexWithPermissions = GSearchIndex & {\n permissions: string[];\n};\n\nexport type GSearchIndex = {\n display_name: string;\n id: string;\n description: string;\n creation_date: string;\n is_trial: boolean;\n subscription_id: string;\n max_size_in_mb: number;\n size_in_mb: number;\n num_subjects: number;\n num_entries: number;\n status: 'open' | 'delete-pending' | string;\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/index_list/#indexlist\n */\nexport type IndexList = {\n index_list: IndexWithPermissions[];\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/index_show/\n */\nexport const get = function (\n index_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<GSearchIndex>> {\n return serviceRequest(\n {\n service: ID,\n // scope: SCOPES.ALL,\n path: `/v1/index/${index_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<string, {}>;\n\n/**\n * @see https://docs.globus.org/api/search/reference/index_list/\n */\nexport const getAll = function (options?, sdkOptions?): Promise<JSONFetchResponse<IndexList>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v1/index_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{}>;\n\ntype IndexCreate = {\n display_name: string;\n description: string;\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/index_create/\n */\nexport const create = function (options, sdkOptions?): Promise<JSONFetchResponse<GSearchIndex>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v1/index`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: IndexCreate;\n}>;\n\ntype IndexDeleteResponse = {\n index_id: string;\n acknowledged: boolean;\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/index_delete/\n */\nexport const remove = function (\n index_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<IndexDeleteResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v1/index/${index_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\ntype IndexReopenResponse = {\n index_id: string;\n acknowledged: boolean;\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/index_reopen/\n */\nexport const reopen = function (\n index_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<IndexReopenResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v1/index/${index_id}/reopen`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\ntype IngestResponse = {\n task_id: string;\n as_identity: string;\n success: boolean;\n num_documents_ingested: number;\n};\n\n/**\n * A mapping from field names (dotted) to the types for those fields. Currently only supports `geo_point` and `geo_shape` as types.\n */\ntype FieldMapping = Record<string, 'geo_point' | 'geo_shape' | string>;\n\n/**\n * A `GIngest` document is a wrapper around a {@link GMetaList} or {@link GMetaEntry} which supplies attributes relevant to the ingest and indexing of metadata into the Globus Search service.\n * @see https://docs.globus.org/api/search/reference/ingest/#gingest\n */\nexport type GIngest =\n | {\n ingest_type: string;\n ingest_data: Record<string, unknown>;\n field_mapping?: FieldMapping;\n }\n | {\n ingest_type: 'GMetaList';\n ingest_data: GMetaList;\n field_mapping?: FieldMapping;\n }\n | {\n ingest_type: 'GMetaEntry';\n ingest_data: GMetaEntry;\n field_mapping?: FieldMapping;\n };\n\n/**\n * A GMetaList is a collection of {@link GMetaEntry} documents.\n * @see https://docs.globus.org/api/search/reference/ingest/#gmetalist\n */\nexport type GMetaList = {\n gmeta: GMetaEntry[];\n};\n\n/**\n * A GMetaEntry is a single block of data pertaining to a given subject.\n * @see https://docs.globus.org/api/search/reference/ingest/#gmetaentry\n */\nexport type GMetaEntry = {\n id?: string;\n subject: string;\n visible_to: 'public' | 'all_authenticated_users' | string;\n principal_sets: Record<string, unknown>;\n content: Record<string, unknown>;\n};\n\nexport const ingest = function (\n index_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<IngestResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v1/index/${index_id}/ingest`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n payload: GIngest;\n }\n>;\n", "/**\n * @description A wrapper around the Groups API.\n * @group Service\n * @see [Groups API Documentation](https://docs.globus.org/api/groups/)\n * @module\n */\n\nimport * as GROUPS from './config.js';\n\n/**\n * @private\n * @internal\n */\nexport const CONFIG = GROUPS;\n\n/**\n * Service methods for the Groups API.\n */\nexport * as groups from './service/groups.js';\nexport * as policies from './service/policies.js';\nexport * as membership from './service/membership.js';\n", "import type { operations, components } from '@globus/types/groups';\nimport { ID, SCOPES } from '../config.js';\nimport { serviceRequest } from '../../shared.js';\n\nimport type {\n JSONFetchResponse,\n ServiceMethod,\n ServiceMethodDynamicSegments,\n} from '../../types.js';\n\n/**\n * @see https://groups.api.globus.org/redoc#tag/groups/operation/get_my_groups_and_memberships_v2_groups_my_groups_get\n */\nexport const getMyGroups = function (\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['get_my_groups_and_memberships_v2_groups_my_groups_get']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n scope: SCOPES.ALL,\n path: `/v2/groups/my_groups`,\n service: ID,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: {\n /**\n * @todo This should probably be replaced with a more specific type for the method's accepted query parameters once available.\n */\n statuses?: components['schemas']['StatusEnum'][];\n };\n}>;\n\n/**\n * @see https://groups.api.globus.org/redoc#tag/groups/operation/get_group_v2_groups__group_id__get\n */\nexport const get = function (\n group_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['get_group_v2_groups__group_id__get']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v2/groups/${group_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n operations['get_group_v2_groups__group_id__get']['parameters']['path']['group_id'],\n {\n query?: operations['get_group_v2_groups__group_id__get']['parameters']['query'];\n }\n>;\n", "import type { operations } from '@globus/types/groups';\nimport { ID, SCOPES } from '../config.js';\nimport { serviceRequest } from '../../shared.js';\n\nimport type { JSONFetchResponse, ServiceMethodDynamicSegments } from '../../types.js';\n\n/**\n * @see https://groups.api.globus.org/redoc#tag/groups/operation/get_policies_v2_groups__group_id__policies_get\n */\nexport const get = function (\n group_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['get_policies_v2_groups__group_id__policies_get']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n scope: SCOPES.ALL,\n path: `/v2/groups/${group_id}/policies`,\n service: ID,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n operations['get_policies_v2_groups__group_id__policies_get']['parameters']['path']['group_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n", "import type { operations } from '@globus/types/groups';\nimport { ID, SCOPES } from '../config.js';\nimport { HTTP_METHODS, serviceRequest } from '../../shared.js';\n\nimport type { JSONFetchResponse, ServiceMethodDynamicSegments } from '../../types.js';\n\n/**\n * Perform actions on members of the group.\n * @see https://groups.api.globus.org/redoc#tag/groups/operation/group_membership_post_actions_v2_groups__group_id__post\n */\nexport const act = function (\n group_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['group_membership_post_actions_v2_groups__group_id__post']['responses']['200']['content']['application/json']\n >\n> {\n if (!options?.payload) throw new Error('payload is required.');\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v2/groups/${group_id}`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n operations['update_group_v2_groups__group_id__put']['parameters']['path']['group_id'],\n {\n payload: operations['group_membership_post_actions_v2_groups__group_id__post']['requestBody']['content']['application/json'];\n }\n>;\n", "/**\n * @description A wrapper around the Globus Flows service.\n * @group Service\n * @see [Globus Flows API Documentation](https://docs.globus.org/api/flows/)\n * @module\n */\nimport * as FLOWS from './config.js';\n\n/**\n * @private\n * @internal\n */\nexport const CONFIG = FLOWS;\n\nexport * as flows from './service/flows.js';\nexport * as runs from './service/runs.js';\n", "import { ID, SCOPES } from '../config.js';\nimport { HTTP_METHODS, serviceRequest } from '../../../services/shared.js';\nimport type {\n JSONFetchResponse,\n ServiceMethod,\n ServiceMethodDynamicSegments,\n} from '../../types.js';\n\n/**\n * @see https://globusonline.github.io/globus-flows/#tag/Flows/paths/~1flows/get\n */\nexport const getAll = function (options?, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.VIEW_FLOWS,\n path: `/flows`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: Record<string, string>;\n headers?: Record<string, string>;\n}>;\n\n/**\n * @see https://globusonline.github.io/globus-flows/#tag/Flows/paths/~1flows~1{flow_id}/get\n */\nexport const get = function (flow_id, options?, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.VIEW_FLOWS,\n path: `/flows/${flow_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<string, Record<string, any>>;\n\n/**\n * @see https://globusonline.github.io/globus-flows/#tag/Flows/paths/~1flows~1{flow_id}/delete\n */\nexport const remove = function (flow_id, options?, sdkOptions?) {\n return serviceRequest(\n {\n scope: SCOPES.MANAGE_FLOWS,\n service: ID,\n path: `/flows/${flow_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * Run an instance of a particular Flow.\n * @see https://globusonline.github.io/globus-flows/#tag/Runs/paths/~1flows~1%7Bflow_id%7D~1run/post\n */\nexport const run = function (flow_id, options?, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.VIEW_FLOWS,\n path: `/flows/${flow_id}/run`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload: {\n label?: string;\n body: Record<string, any>;\n tags?: string[];\n };\n }\n>;\n\ntype ValidateSuccessResponse = {\n scopes: Record<string, any>;\n};\n\n/**\n * An error that was generated during validation that includes the location of the error.\n */\nexport type ValidationLocationError = {\n /**\n * The location of the error represents the path to the property that caused the error.\n */\n loc: string[];\n msg: string;\n type: string;\n};\n\ntype ValidateErrorResponse = {\n error: {\n code: string;\n /**\n * When `detail` is a string, it is a general error message and cannot be mapped to a specific location\n * in the provided payload.\n */\n detail: string | ValidationLocationError[];\n /**\n * `message` being available is dependent on the error code.\n */\n message?: string;\n };\n debug_id: string;\n};\n\n/**\n * Validate a flow definition and its schema.\n * @see https://globusonline.github.io/globus-flows/#tag/Flows/paths/~1flows~1validate/post\n */\nexport const validate = function (\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<ValidateSuccessResponse | ValidateErrorResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.MANAGE_FLOWS,\n path: `/flows/validate`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: never;\n payload: {\n definition: Record<string, any>;\n input_schema?: Record<string, any>;\n };\n}>;\n", "import { ID, SCOPES } from '../config.js';\nimport { HTTP_METHODS, serviceRequest } from '../../shared.js';\n\nimport type { ServiceMethod, ServiceMethodDynamicSegments } from '../../../services/types.js';\n\n/**\n * @see https://globusonline.github.io/globus-flows/#tag/Runs/paths/~1runs/get\n */\nexport const getAll = function (options = {}, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.RUN_MANAGE,\n path: `/runs`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: Record<string, string>;\n headers?: Record<string, string>;\n payload?: never;\n}>;\n\n/**\n * Cancel the execution for a particular Run of a Flow.\n * https://globusonline.github.io/globus-flows/#tag/Runs/paths/~1runs~1%7Brun_id%7D~1cancel/post\n */\nexport const cancel = function (run_id, options?, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.RUN_MANAGE,\n path: `/runs/${run_id}/cancel`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<string, Record<string, any>>;\n\n/**\n * Retrieve detailed execution information for a particular Flow Run.\n * @see https://globusonline.github.io/globus-flows/#tag/Runs/paths/~1runs~1%7Baction_id%7D~1log/get\n */\nexport const getLog = function (run_id, options?, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.RUN_MANAGE,\n path: `/runs/${run_id}/log`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: {\n limit?: number | string;\n reverse_order?: boolean;\n pagination_token?: string;\n };\n }\n>;\n", "/**\n * @description A wrapper around the Globus Connect Server Manager API.\n * @group Service\n * @see [Globus Connect Server Manager API Documentation](https://docs.globus.org/globus-connect-server/v5.4/api/)\n * @module\n */\nimport type {\n Segment,\n ServiceMethodOptions,\n SDKOptions,\n ServiceMethod,\n ServiceMethodDynamicSegments,\n BaseServiceMethodOptions,\n} from '../types.js';\n\n/**\n * Service methods for the Globus Connect Server Manager API.\n */\nexport * as collections from './service/collections.js';\nexport * as endpoint from './service/endpoint.js';\nexport * as https from './service/https.js';\nexport * as nodes from './service/nodes.js';\nexport * as roles from './service/roles.js';\nexport * as storageGateways from './service/storage-gateways.js';\nexport * as userCredentials from './service/user-credentials.js';\nexport * as versioning from './service/versioning.js';\n\nconst SCOPES = {\n HIGH_ASSURANCE: 'urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections',\n NON_HIGH_ASSURANCE:\n 'urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections[*https://auth.globus.org/scopes/<MAPPED_COLLECTION_ID>/data_access]',\n};\n\nexport function getRequiredScopes(configuration: GCSConfiguration) {\n return SCOPES.HIGH_ASSURANCE.replace('<ENDPOINT_ID>', configuration.endpoint_id);\n}\n\n/**\n * The configuration object used by all Globus Connect Server Manager API methods.\n */\nexport type GCSConfiguration = {\n /**\n * The host (base URL) for the Globus Connect Server Manager API.\n * @example https://fa5e.bd7c.data.globus.org\n */\n host: string;\n /**\n * The UUID\n */\n endpoint_id: Globus.UUID;\n};\n\n/**\n * The GCSServiceMethod type is similar to the core ServiceMethod type, but\n * the first parameter is always a GCSConfiguration object.\n */\nexport type GCSServiceMethod<O extends ServiceMethodOptions, R extends Response = Response> = (\n configuration: GCSConfiguration,\n methodOptions?: O & {\n query?: BaseServiceMethodOptions['query'];\n headers?: BaseServiceMethodOptions['headers'];\n },\n sdkOptions?: SDKOptions,\n) => ReturnType<ServiceMethod<O, R>>;\n\n/**\n * The GCSServiceMethodDynamicSegments type is similar to the core ServiceMethodDynamicSegments type, but\n * the first parameter is always a GCSConfiguration object.\n */\nexport type GCSServiceMethodDynamicSegments<\n S extends Segment,\n O extends ServiceMethodOptions,\n R extends Response = Response,\n> = (\n configuration: GCSConfiguration,\n segments: S,\n methodOptions?: O & {\n query?: BaseServiceMethodOptions['query'];\n headers?: BaseServiceMethodOptions['headers'];\n },\n sdkOptions?: SDKOptions,\n) => ReturnType<ServiceMethodDynamicSegments<S, O, R>>;\n", "import type { operations } from '@globus/types/gcs-manager/api';\nimport { getRequiredScopes } from '../index.js';\nimport { HTTP_METHODS, serviceRequest } from '../../shared.js';\n\nimport type { GCSServiceMethod, GCSServiceMethodDynamicSegments } from '../index';\n\nimport type { JSONFetchResponse } from '../../types';\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#listCollections\n */\nexport const getAll = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['listCollections']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/collections`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n query?: operations['listCollections']['parameters']['query'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#getCollection\n */\nexport const get = function (\n configuration,\n collection_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['getCollection']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/collections/${collection_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['getCollection']['parameters']['path']['collection_id'],\n {\n query?: operations['getCollection']['parameters']['query'];\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#deleteCollection\n */\nexport const remove = function (\n configuration,\n collection_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['deleteCollection']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/collections/${collection_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['deleteCollection']['parameters']['path']['collection_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#postCollection\n */\nexport const create = function (\n configuration,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['postCollection']['responses']['201']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/collections`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['postCollection']['requestBody']['content']['application/json'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#putCollection\n */\nexport const update = function (\n configuration,\n collection_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['putCollection']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/collections/${collection_id}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['putCollection']['parameters']['path']['collection_id'],\n {\n payload: operations['putCollection']['requestBody']['content']['application/json'];\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#patchCollection\n */\nexport const patch = function (\n configuration,\n collection_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['patchCollection']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/collections/${collection_id}`,\n method: HTTP_METHODS.PATCH,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['patchCollection']['parameters']['path']['collection_id'],\n {\n payload: Partial<operations['patchCollection']['requestBody']['content']['application/json']>;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#putCollectionOwnerString\n */\nexport const updateOwnerString = function (\n configuration,\n collection_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['putCollectionOwnerString']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/collections/${collection_id}/owner_string`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['putCollectionOwnerString']['parameters']['path']['collection_id'],\n {\n payload: Partial<\n operations['putCollectionOwnerString']['requestBody']['content']['application/json']\n >;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#deleteCollectionOwnerString\n */\nexport const resetOwnerString = function (\n configuration,\n collection_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['deleteCollectionOwnerString']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/collections/${collection_id}/owner_string`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['deleteCollectionOwnerString']['parameters']['path']['collection_id'],\n {}\n>;\n", "import type { operations } from '@globus/types/gcs-manager/api';\nimport { getRequiredScopes } from '../index.js';\nimport { HTTP_METHODS, serviceRequest } from '../../shared.js';\n\nimport type { GCSServiceMethod } from '../index';\nimport type { JSONFetchResponse } from '../../types';\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Endpoint/#getEndpoint\n */\nexport const get = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['getEndpoint']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/endpoint`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n query?: never;\n payload?: never;\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Endpoint/#putEndpoint\n */\nexport const update = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['putEndpoint']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/endpoint`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['putEndpoint']['requestBody']['content']['application/json'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Endpoint/#patchEndpoint\n */\nexport const patch = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['patchEndpoint']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/endpoint`,\n method: HTTP_METHODS.PATCH,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n /**\n * @todo The generated PATCH type is resolving to the Endpoint document, which\n * has some properties that are required (i.e. `display_name`). For now, we're\n * just allowing unknown properties to be passed in, but we should fix this\n * when the auotgenerated types are corrected.\n */\n payload:\n | operations['patchEndpoint']['requestBody']['content']['application/json']\n | Record<string, unknown>;\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Endpoint/#putEndpointSubscriptionId\n */\nexport const updateSubscriptionId = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['putEndpointSubscriptionId']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/endpoint/subscription_id`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['putEndpointSubscriptionId']['requestBody']['content']['application/json'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Endpoint/#putEndpointOwner\n */\nexport const updateOwner = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['putEndpointOwner']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/endpoint/owner`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['putEndpointOwner']['requestBody']['content']['application/json'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Endpoint/#putEndpointOwnerString\n */\nexport const updateOwnerString = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['putEndpointOwnerString']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/endpoint/owner_string`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['putEndpointOwnerString']['requestBody']['content']['application/json'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Endpoint/#deleteEndpointOwnerString\n */\nexport const resetOwnerString = function (\n configuration,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['deleteEndpointOwnerString']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/endpoint/owner_string`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{}>;\n", "import { getRequiredScopes } from '../index.js';\nimport { HTTP_METHODS, serviceRequest } from '../../shared.js';\n\nimport type { GCSServiceMethodDynamicSegments } from '../index.js';\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/https-access-collections/\n */\nexport const get = function (configuration, path, options?, sdkOptions?): Promise<Response> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n string,\n {\n query?: {\n /**\n * @see https://docs.globus.org/globus-connect-server/v5.4/https-access-collections/#request_a_browser_download\n */\n download?: boolean;\n };\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/https-access-collections/\n */\nexport const remove = function (configuration, path, options?, sdkOptions?): Promise<Response> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/https-access-collections/\n */\nexport const update = function (configuration, path, options, sdkOptions?): Promise<Response> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n", "import type { operations } from '@globus/types/gcs-manager/api';\nimport { getRequiredScopes } from '../index.js';\n\nimport { HTTP_METHODS, serviceRequest } from '../../../services/shared.js';\n\nimport type { GCSServiceMethod, GCSServiceMethodDynamicSegments } from '../index';\n\nimport type { JSONFetchResponse } from '../../types';\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Nodes/#listNodes\n */\nexport const getAll = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['listNodes']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/nodes`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n query?: operations['listNodes']['parameters']['query'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Nodes/#getNode\n */\nexport const get = function (\n configuration,\n node_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['getNode']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/nodes/${node_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['getNode']['parameters']['path']['node_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Nodes/#deleteNode\n */\nexport const remove = function (\n configuration,\n node_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['deleteNode']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/nodes/${node_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['deleteNode']['parameters']['path']['node_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Nodes/#postNodes\n */\nexport const create = function (\n configuration,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['postNode']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/nodes`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['postNode']['requestBody']['content']['application/json'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Nodes/#putNode\n */\nexport const update = function (\n configuration,\n node_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['putNode']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/nodes/${node_id}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['putNode']['parameters']['path']['node_id'],\n {\n payload: operations['putNode']['requestBody']['content']['application/json'];\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Nodes/#patchNode\n */\nexport const patch = function (\n configuration,\n node_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['patchNode']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/nodes/${node_id}`,\n method: HTTP_METHODS.PATCH,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['patchNode']['parameters']['path']['node_id'],\n {\n payload: Partial<operations['patchNode']['requestBody']['content']['application/json']>;\n }\n>;\n", "import type { operations } from '@globus/types/gcs-manager/api';\nimport { getRequiredScopes } from '../index.js';\n\nimport { HTTP_METHODS, serviceRequest } from '../../../services/shared.js';\n\nimport type { GCSServiceMethod, GCSServiceMethodDynamicSegments } from '../index';\n\nimport type { JSONFetchResponse } from '../../types';\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Roles/#listRoles\n */\nexport const getAll = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['listRoles']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/roles`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n query?: operations['listRoles']['parameters']['query'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Roles/#getRole\n */\nexport const get = function (\n configuration,\n role_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['getRole']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/roles/${role_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['getRole']['parameters']['path']['role_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Roles/#deleteRole\n */\nexport const remove = function (\n configuration,\n role_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['deleteRole']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/roles/${role_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['deleteRole']['parameters']['path']['role_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Roles/#postRoles\n */\nexport const create = function (\n configuration,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['postRoles']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/roles`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['postRoles']['requestBody']['content']['application/json'];\n}>;\n", "import type { operations } from '@globus/types/gcs-manager/api';\nimport { getRequiredScopes } from '../index.js';\nimport { HTTP_METHODS, serviceRequest } from '../../../services/shared.js';\n\nimport type { GCSServiceMethod, GCSServiceMethodDynamicSegments } from '../index';\n\nimport type { JSONFetchResponse } from '../../types';\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Storage_Gateways/#listStorageGateways\n */\nexport const getAll = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['listStorageGateways']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/storage_gateways`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n query?: operations['listStorageGateways']['parameters']['query'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Storage_Gateways/#getStorageGateway\n */\nexport const get = function (\n configuration,\n storage_gateway_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['getStorageGateway']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/storage_gateways/${storage_gateway_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['getStorageGateway']['parameters']['path']['storage_gateway_id'],\n {\n query?: operations['getStorageGateway']['parameters']['query'];\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Storage_Gateways/#deleteStorageGateway\n */\nexport const remove = function (\n configuration,\n storage_gateway_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['deleteStorageGateway']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/storage_gateways/${storage_gateway_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['deleteStorageGateway']['parameters']['path']['storage_gateway_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Storage_Gateways/#postStorageGateway\n */\nexport const create = function (\n configuration,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['postStorageGateway']['responses']['201']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/storage_gateways`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['postStorageGateway']['requestBody']['content']['application/json'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Storage_Gateways/#putStorageGateway\n */\nexport const update = function (\n configuration,\n storage_gateway_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['putStorageGateway']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/storage_gateways/${storage_gateway_id}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['putStorageGateway']['parameters']['path']['storage_gateway_id'],\n {\n payload: operations['putStorageGateway']['requestBody']['content']['application/json'];\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Storage_Gateways/#patchStorageGateway\n */\nexport const patch = function (\n configuration,\n storage_gateway_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['patchStorageGateway']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/storage_gateways/${storage_gateway_id}`,\n method: HTTP_METHODS.PATCH,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['patchStorageGateway']['parameters']['path']['storage_gateway_id'],\n {\n payload: Partial<\n operations['patchStorageGateway']['requestBody']['content']['application/json']\n >;\n }\n>;\n", "import type { operations } from '@globus/types/gcs-manager/api';\nimport { getRequiredScopes } from '../index.js';\nimport { HTTP_METHODS, serviceRequest } from '../../../services/shared.js';\n\nimport type { GCSServiceMethod, GCSServiceMethodDynamicSegments } from '../index';\n\nimport type { JSONFetchResponse } from '../../types';\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_User_Credentials/#listUserCredentials\n */\nexport const getAll = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['listUserCredentials']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/user_credentials`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n query?: operations['listUserCredentials']['parameters']['query'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_User_Credentials/#getUserCredential\n */\nexport const get = function (\n configuration,\n user_credential_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['getCollection']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/user_credentials/${user_credential_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['getUserCredential']['parameters']['path']['user_credential_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_User_Credentials/#deleteUserCredential\n */\nexport const remove = function (\n configuration,\n user_credential_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['deleteUserCredential']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/user_credentials/${user_credential_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['deleteUserCredential']['parameters']['path']['user_credential_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_User_Credentials/#postUserCredential\n */\nexport const create = function (\n configuration,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['postUserCredential']['responses']['201']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/user_credentials`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['postUserCredential']['requestBody']['content']['application/json'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_User_Credentials/#putUserCredential\n */\nexport const update = function (\n configuration,\n user_credential_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['putUserCredential']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/user_credentials/${user_credential_id}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['putUserCredential']['parameters']['path']['user_credential_id'],\n {\n payload: operations['putUserCredential']['requestBody']['content']['application/json'];\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_User_Credentials/#patchUserCredential\n */\nexport const patch = function (\n configuration,\n user_credential_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['patchUserCredential']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/user_credentials/${user_credential_id}`,\n method: HTTP_METHODS.PATCH,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['patchUserCredential']['parameters']['path']['user_credential_id'],\n {\n payload: Partial<\n operations['patchUserCredential']['requestBody']['content']['application/json']\n >;\n }\n>;\n", "import type { operations } from '@globus/types/gcs-manager/api';\nimport { getRequiredScopes } from '../index.js';\nimport { serviceRequest } from '../../../services/shared.js';\n\nimport type { GCSServiceMethod } from '../index';\nimport type { JSONFetchResponse } from '../../types';\n\n/**\n *\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Versioning/#getInfo\n */\nexport const info = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['getInfo']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/info`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n query?: never;\n payload?: never;\n}>;\n", "/**\n * @description A wrapper around the Globus Timer service.\n * @group Service\n * @see [Globus Timer API Documentation](https://timer.automate.globus.org/docs#/)\n * @module\n */\nimport * as TIMER from './config.js';\n\nimport { create } from './service/timer.js';\n\n/**\n * @private\n * @internal\n */\nexport const CONFIG = TIMER;\nexport { create };\n", "import type { components } from '@globus/types/timer';\nimport { HTTP_METHODS, serviceRequest } from '../../shared.js';\nimport { ID } from '../config.js';\n\nimport type { SDKOptions, ServiceMethod } from '../../types.js';\n\nexport const create = function (options, sdkOptions?: SDKOptions) {\n return serviceRequest(\n {\n service: ID,\n scope: 'https://auth.globus.org/scopes/524230d7-ea86-4a52-8312-86065a9e0417/timer',\n path: '/v2/timer',\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: components['schemas']['V2TimerCreate'];\n}>;\n", "/**\n * @description A wrapper around the Globus Compute service.\n * @group Service\n * @see [Globus Compute API Documentation](https://api2.funcx.org/redoc)\n * @module\n */\nimport * as COMPUTE from './config.js';\n\n/**\n * @private\n * @internal\n */\nexport const CONFIG = COMPUTE;\n\nexport * as endpoints from './service/endpoints.js';\n", "import type { operations } from '@globus/types/compute';\nimport { HTTP_METHODS, serviceRequest } from '../../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type {\n ServiceMethod,\n ServiceMethodDynamicSegments,\n JSONFetchResponse,\n} from '../../types.js';\n\nexport const getAll = function (\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['get_endpoints_v2_endpoints_get']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: '/v2/endpoints',\n method: HTTP_METHODS.GET,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query: operations['get_endpoints_v2_endpoints_get']['parameters']['query'];\n}>;\n\nexport const get = function (\n endpoint_uuid,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['get_endpoint_v2_endpoints__endpoint_uuid__get']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v2/endpoints/${endpoint_uuid}`,\n method: HTTP_METHODS.GET,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n operations['get_endpoint_v2_endpoints__endpoint_uuid__get']['parameters']['path']['endpoint_uuid'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\nexport const getStatus = function (\n endpoint_uuid,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['get_endpoint_status_v2_endpoints__endpoint_uuid__status_get']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v2/endpoints/${endpoint_uuid}/status`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n operations['get_endpoint_status_v2_endpoints__endpoint_uuid__status_get']['parameters']['path']['endpoint_uuid'],\n {\n query?: never;\n payload?: never;\n }\n>;\n", "/**\n * Utilities and methods related to the Globus Web App.\n * @see https://app.globus.org/\n */\n\nimport { getEnvironment, type Environment } from '../core/global.js';\nimport type { SDKOptions } from '../services/types';\n\n/**\n * The hostnames for the Globus Web App in each environment.\n */\nexport const HOSTS: Record<Environment, string> = {\n integration: 'app.integration.globuscs.info',\n sandbox: 'app.sandbox.globuscs.info',\n test: 'app.test.globuscs.info',\n staging: 'app.staging.globuscs.info',\n preview: 'app.preview.globus.org',\n production: 'app.globus.org',\n};\n\n/**\n * Return the hostname for the Globus Web App in the given environment.\n */\nexport function host(env: Environment = getEnvironment()) {\n return HOSTS[env];\n}\n\n/**\n * Return a URL for the Globus Web App.\n */\nexport function url(path?: string, sdkOptions?: SDKOptions) {\n return new URL(path || '', `https://${host(sdkOptions?.environment)}`);\n}\n\ntype WebAppURLIdentifier = 'TASK' | 'COLLECTION' | 'ENDPOINT';\n\nconst WEBAPP_URLS: Record<WebAppURLIdentifier, string> = {\n TASK: '/activity/%s/overview',\n COLLECTION: '/file-manager/collections/%s/overview',\n ENDPOINT: '/file-manager/collections/%s/overview',\n};\n\n/**\n * Obtain a URL for a specific page in the Globus Web App.\n * @example\n * ```typescript\n * const url = urlFor('TASK', ['example-uuid']);\n * ```\n */\nexport function urlFor(\n identifier: WebAppURLIdentifier,\n segments?: string[],\n sdkOptions?: SDKOptions,\n) {\n const path = WEBAPP_URLS[identifier].replace(/%s/g, segments?.join('/') || '');\n return url(path, sdkOptions);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA;AAAA,gBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA,iBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,qBAAqB;AAElC,IAAI,UAAU;AAqBP,SAAS,YAAY;AAC1B,SAAO;AACT;AAEA,IAAM,kBAAkB;AACxB,IAAM,sBAAsB;AAMrB,SAAS,SAASC,OAAqB;AAC5C,QAAM,QAAQ,MAAM,QAAQA,KAAI,IAAIA,QAAO,CAACA,KAAI;AAChD,SAAO,MACJ;AAAA,IAAI,CAAC,MACJ,OAAO,QAAQ,CAAC,EACb,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,GAAG,GAAG,IAAI,KAAK,EAAE,EACvC,KAAK,mBAAmB;AAAA,EAC7B,EACC,KAAK,eAAe;AACzB;;;AC/CO,IAAM,UAAU;;;AFYhB,IAAMC,WAAmB;AAUzB,IAAM,cAAoB;AAAA,EAC/B,SAAS;AAAA,EACT,SAASA;AACX;AAEA,IAAI,QAAgB,CAAC,WAAW;AAKzB,SAAS,cAAcC,OAAY;AACxC,UAAQ,MAAM,OAAOA,KAAI;AAC3B;AAIO,SAAS,gBAAwB;AACtC,SAAO,SAAS,KAAK;AACvB;AAEO,SAAS,8BAAsD;AACpE,MAAI,CAAC,UAAU,GAAG;AAChB,WAAO,CAAC;AAAA,EACV;AACA,SAAO;AAAA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"sources": ["../../src/index.ts", "../../src/core/info/index.ts", "../../src/core/info/private.ts", "../../src/core/info/version.ts", "../../src/core/logger.ts", "../../src/core/authorization/index.ts", "../../src/core/authorization/AuthorizationManager.ts", "../../src/services/auth/index.ts", "../../src/services/auth/config.ts", "../../src/services/transfer/config.ts", "../../src/services/flows/config.ts", "../../src/services/timer/config.ts", "../../src/services/groups/config.ts", "../../src/services/search/config.ts", "../../src/services/compute/config.ts", "../../src/core/errors.ts", "../../src/core/global.ts", "../../src/core/url.ts", "../../src/services/auth/service/identities.ts", "../../src/services/shared.ts", "../../src/services/auth/service/oauth2/index.ts", "../../src/services/auth/service/oauth2/token.ts", "../../src/core/authorization/Event.ts", "../../src/core/authorization/pkce.ts", "../../src/core/authorization/RedirectTransport.ts", "../../src/core/authorization/TokenManager.ts", "../../src/core/storage/memory.ts", "../../src/services/transfer/index.ts", "../../src/services/transfer/service/endpoint-search.ts", "../../src/services/transfer/service/file-operations.ts", "../../src/services/transfer/shared.ts", "../../src/services/transfer/service/task-submission.ts", "../../src/services/transfer/service/endpoint.ts", "../../src/services/transfer/service/task.ts", "../../src/services/transfer/service/access.ts", "../../src/services/transfer/service/collection-bookmarks.ts", "../../src/services/transfer/service/endpoint-manager/index.ts", "../../src/services/transfer/service/endpoint-manager/endpoint.ts", "../../src/services/transfer/service/endpoint-manager/pause-rule.ts", "../../src/services/transfer/service/endpoint-manager/task.ts", "../../src/services/transfer/utils.ts", "../../src/services/search/index.ts", "../../src/services/search/service/query.ts", "../../src/services/search/service/subject.ts", "../../src/services/search/service/entry.ts", "../../src/services/search/service/search-index.ts", "../../src/services/groups/index.ts", "../../src/services/groups/service/groups.ts", "../../src/services/groups/service/policies.ts", "../../src/services/groups/service/membership.ts", "../../src/services/flows/index.ts", "../../src/services/flows/service/flows.ts", "../../src/services/flows/service/runs.ts", "../../src/services/globus-connect-server/index.ts", "../../src/services/globus-connect-server/service/collections.ts", "../../src/services/globus-connect-server/service/endpoint.ts", "../../src/services/globus-connect-server/service/https.ts", "../../src/services/globus-connect-server/service/nodes.ts", "../../src/services/globus-connect-server/service/roles.ts", "../../src/services/globus-connect-server/service/storage-gateways.ts", "../../src/services/globus-connect-server/service/user-credentials.ts", "../../src/services/globus-connect-server/service/versioning.ts", "../../src/services/timer/index.ts", "../../src/services/timer/service/timer.ts", "../../src/services/compute/index.ts", "../../src/services/compute/service/endpoints.ts", "../../src/apps/web.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @module @globus/sdk\n * @description `@globus/sdk` provides modules for interacting with the various APIs that make up the Globus platform.\n *\n * ### Key Concepts\n * - All service methods return a `Promise` that resolves to a [Fetch API Response object](https://developer.mozilla.org/en-US/docs/Web/API/Response).\n * - Under the hood, we are returning the result of a composed [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).\n * - All service methods accept a `ServiceMethodOptions` object to pass query parameters, a payload, and headers.\n * - All service methods support a tail argument to pass options to the SDK, including the composed `fetch` call.\n *\n * #### Service Method Names\n *\n * Basic CRUD operations provided by services are exposed as the following:\n *\n * | Service Method Name | HTTP Method | Description | Example |\n * | --------------------| ----------- | ---------------------------- | ------- |\n * | `get` | `GET` | Fetch a single resource. | `transfer.endpoint.get()` |\n * | `getAll` | `GET` | Fetch a list of resources. | `flows.flows.getAll()` |\n * | `create` | `POST` | Create a new resource. | `gcs.roles.create()` |\n * | `update` | `PUT` | Update an existing resource. | `gcs.endpoint.update()` |\n * | `patch` | `PATCH` | Update an existing resource. | `gcs.endpoint.patch()` |\n * | `remove` | `DELETE` | Delete an existing resource. | `gcs.collections.remove()`|\n *\n * Methods that do not map to obvious CRUD operations are named according to the resource. i.e., `groups.groups.getMyGroups()`, `transfer.endpointSearch()`, `search.query.post()`\n *\n * @example <caption>Using the SDK to search for endpoints via Transfer API.</caption>\n * import { transfer } from \"@globus/sdk\";\n *\n * const result = await (\n * await globus.transfer.endpointSearch(\n * {\n * query: { filter_fulltext: \"Globus Tutorial\" }\n * headers: {\n * Authorization: \"Bearer MY_ACCESS_TOKEN\",\n * },\n * },\n * {\n * fetch: {\n * // Provide parameters to the underlying `fetch` call.\n * // https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters\n * options: {\n * priority: \"high\"\n * },\n * },\n * }\n * )\n * ).json();\n *\n * @example <caption>Using the SDK to fetch a single flow from the Flows API.</caption>\n * import { flows } from \"@globus/sdk\";\n *\n * const result = await (await flows.flows.get(\"452bbea3-5e3b-45a5-af08-50179839a4e8\")).json();\n */\n\n/// <reference types=\"@globus/types\" />\n/// <reference types=\"@globus/types/auth\" />\n/// <reference types=\"@globus/types/transfer\" />\n/// <reference types=\"@globus/types/search\" />\n\n/**\n * Core\n */\nexport * as info from './core/info/index.js';\nexport * as logger from './core/logger.js';\nexport * as authorization from './core/authorization/index.js';\nexport * as errors from './core/errors.js';\n\n/**\n * Services\n */\nexport * as auth from './services/auth/index.js';\nexport * as transfer from './services/transfer/index.js';\nexport * as search from './services/search/index.js';\nexport * as groups from './services/groups/index.js';\nexport * as flows from './services/flows/index.js';\nexport * as gcs from './services/globus-connect-server/index.js';\nexport * as timer from './services/timer/index.js';\nexport * as compute from './services/compute/index.js';\n\n/**\n * Applications\n */\nexport * as webapp from './apps/web.js';\n", "/**\n * @module Information\n * @description This module is mostly intended for internal use, but can be helpful\n * identifying information about the SDK package you are using at runtime.\n */\nimport { toString, isEnabled, CLIENT_INFO_HEADER } from './private.js';\nimport { VERSION as _VERSION } from './version.js';\n\nexport type Version = string;\n\n/**\n * The version of the `@globus/sdk` package that is in use.\n */\nexport const VERSION: Version = _VERSION;\n\nexport type Info = {\n product: string;\n version: Version;\n};\n\n/**\n * The client information identifier for this package.\n */\nexport const CLIENT_INFO: Info = {\n product: 'javascript-sdk',\n version: VERSION,\n};\n\nlet INFOS: Info[] = [CLIENT_INFO];\n\n/**\n * Add a client information identifier to the existing SDK information.\n */\nexport function addClientInfo(info: Info) {\n INFOS = INFOS.concat(info);\n}\n/**\n * Get the current client information as a string.\n */\nexport function getClientInfo(): string {\n return toString(INFOS);\n}\n\nexport function getClientInfoRequestHeaders(): Record<string, string> {\n if (!isEnabled()) {\n return {};\n }\n return {\n [CLIENT_INFO_HEADER]: getClientInfo(),\n };\n}\n", "import type { Info } from './index.js';\n\n/**\n * @private\n */\nexport const CLIENT_INFO_HEADER = `X-Globus-Client-Info`;\n\nlet ENABLED = true;\n/**\n * Disable the client information header from being included in requests (enabled by default).\n * @private\n */\nexport function disable() {\n ENABLED = false;\n}\n\n/**\n * Enables the client information header to be included in requests.\n * @private\n */\nexport function enable() {\n ENABLED = true;\n}\n\n/**\n * Whether or not the client information header should be sent with requests.\n * @private\n */\nexport function isEnabled() {\n return ENABLED;\n}\n\nconst INFOS_SEPERATOR = ';';\nconst INFO_ITEM_SEPARATOR = ',';\n\n/**\n * Exported for test purposes only.\n * @private\n */\nexport function toString(info: Info | Info[]) {\n const infos = Array.isArray(info) ? info : [info];\n return infos\n .map((i) =>\n Object.entries(i)\n .map(([key, value]) => `${key}=${value}`)\n .join(INFO_ITEM_SEPARATOR),\n )\n .join(INFOS_SEPERATOR);\n}\n", "// x-release-please-start-version\nexport const VERSION = '5.0.0';\n// x-release-please-end\n", "const LOG_LEVELS = ['debug', 'info', 'warn', 'error'] as const;\n\ntype LogLevel = (typeof LOG_LEVELS)[number];\n\ntype LogHandler = (...args: unknown[]) => void;\n\ntype Logger = {\n log: LogHandler;\n error?: LogHandler;\n warn?: LogHandler;\n info?: LogHandler;\n debug?: LogHandler;\n};\n/**\n * No logger is set by default.\n */\nlet logger: Logger | undefined;\n/**\n * By default, the logger is set to `error`.\n */\nlet level: number = LOG_LEVELS.indexOf('error');\n/**\n * Set the global logger for the SDK.\n * @param logMechanism The logger to use.\n * @example `log.setLogger(console)`\n */\nexport function setLogger(logMechanism: Logger) {\n logger = logMechanism;\n}\n/**\n * Set the global log level for the logger.\n * @param severity The severity to set the logger to.\n * @example `log.setLogLevel('info')`\n */\nexport function setLogLevel(severity: LogLevel) {\n level = LOG_LEVELS.indexOf(severity);\n}\n/**\n * Log a message to the logger.\n * @param severity The severity of the log entry.\n * @param args The message to log.\n * @private\n */\nexport function log(severity: LogLevel, ...args: unknown[]) {\n if (!logger) return;\n /**\n * If the severity of the entry is less than the logger's configured severity, do not log.\n */\n if (LOG_LEVELS.indexOf(severity) < level) {\n return;\n }\n /**\n * If the logger does not have a handler for the specified severity, use the default `log` handler.\n */\n const handler = logger[severity] ?? logger.log;\n handler(...args);\n}\n", "/**\n * @module Authorization\n * @description Provides modules for interacting with Globus-related authorization contexts in your application.\n * @example\n * import { authorization } from \"globus/sdk\";\n * const manager = authorization.create(...);\n */\nimport {\n AuthorizationManager,\n type AuthorizationManagerConfiguration,\n} from './AuthorizationManager.js';\n\n/**\n * Create an instance of the {@link AuthorizationManager}.\n */\nexport function create(configuration: AuthorizationManagerConfiguration) {\n return new AuthorizationManager(configuration);\n}\n\nexport { AuthorizationManager, AuthorizationManagerConfiguration };\n", "import { jwtDecode } from 'jwt-decode';\n\nimport { isGlobusAuthTokenResponse, isRefreshToken, oauth2 } from '../../services/auth/index.js';\nimport { RESOURCE_SERVERS } from '../../services/auth/config.js';\n\nimport { log } from '../logger.js';\n\nimport { Event } from './Event.js';\nimport {\n RedirectTransportOptions,\n GetTokenOptions,\n RedirectTransport,\n} from './RedirectTransport.js';\nimport { TokenManager } from './TokenManager.js';\n\nimport {\n isConsentRequiredError,\n isAuthorizationRequirementsError,\n AuthorizationRequirementsError,\n ConsentRequiredError,\n toAuthorizationQueryParams,\n} from '../errors.js';\n\nimport type {\n JwtUserInfo,\n Token,\n TokenResponse,\n TokenWithRefresh,\n} from '../../services/auth/types.js';\nimport { MemoryStorage } from '../storage/memory.js';\n// import { PopupTransport } from './PopupTransport.js';\n\nconst TRANSPORTS = {\n redirect: RedirectTransport,\n // popup: PopupTransport,\n};\n\nexport type AuthorizationManagerConfiguration = {\n client: string;\n scopes?: string;\n redirect: string;\n /**\n * The storage system used by the `AuthorizationManager`.\n *\n * By default, the `AuthorizationManager` uses an in-memory storage, this option is secure by default.\n *\n * If you want to persist the state of the `AuthorizationManager`, you can use `localStorage`, or provide your own storage system.\n * **It is important to note that using the `localStorage`, or any persistant storage option will preserve authorization and refresh tokens of users.**\n * Best practices for ensuring the security of your application should be followed to protect this data (e.g., ensuring XSS protection).\n *\n * @default MemoryStorage\n */\n storage?: Storage;\n transport?: keyof typeof TRANSPORTS;\n /**\n * @private\n * @default DEFAULT_CONFIGURATION.useRefreshTokens\n */\n useRefreshTokens?: boolean;\n /**\n * @private\n * @default DEFAULT_CONFIGURATION.defaultScopes\n */\n defaultScopes?: string | false;\n /**\n * Provide an object with event listeners to attach to the instance.\n * This is useful if you need to listen to events that might dispatch immediately\n * after the creation of the instance (constructor), e.g., the `authenticated`.\n */\n events?: Partial<{\n [Event in keyof AuthorizationManager['events']]: Parameters<\n AuthorizationManager['events'][Event]['addListener']\n >[0];\n }>;\n};\n\nconst DEFAULT_CONFIGURATION = {\n useRefreshTokens: false,\n defaultScopes: 'openid profile email',\n transport: 'redirect' as const,\n};\n\nconst DEFAULT_HANDLE_ERROR_OPTIONS = {\n execute: true,\n additionalParams: undefined,\n};\n\n/**\n * Provides management of Globus authorization context for your application.\n * - Handles the OAuth protcol flow (via PKCE)\n * - Token lifecycle management\n * - Common errors (e.g., `ConsentRequired`, `authorization_requirements`)\n *\n * Once you configure your instance, you can determine the authenticated state using `manager.authenticated`.\n *\n * To prompt a user to authenticate, call `manager.login()` on user interaction \u2013 this will initiate the OAuth protocol flow with your configured client and scopes, resulting in an initial redirect to Globus Auth.\n *\n * Once the user authenticates with Globus Auth, they will be redirected to your application using the configured `redirect` URL. On this URL, you will need to call `manager.handleCodeRedirect` (using a manager instance configured in the same manner that initiated the `manager.login()` call) to complete the PKCE flow, exchanging the provided code for a valid token, or tokens.\n *\n * All tokens managed by the `AuthorizationManager` instance can be found on `manager.token`.\n *\n * ### Registering your Globus Application\n *\n * The `AuthorizationManager` expects your Globus Application to be registered as an OAuth public client.\n * In this Globus Web Application, this option is referenced as \"_Register a thick client or script that will be installed and run by users on their devices_\".\n *\n * @example <caption>Creating an AuthorizationManager instance.</caption>\n * import { authorization } from \"globus/sdk\";\n *\n * const manager = authorization.create({\n * // Your registered Globus Application client ID.\n * client: '...',\n * // The redirect URL for your application; Where you will call `manager.handleCodeRedirect()`\n * redirect: 'https://example.com/callback',\n * // Known scopes required by your application.\n * scopes: 'urn:globus:auth:scope:transfer.api.globus.org:all',\n * });\n */\nexport class AuthorizationManager {\n #transport!: RedirectTransport;\n\n configuration: AuthorizationManagerConfiguration;\n\n /**\n * The storage system used by the `AuthorizationManager`.\n * @implements Storage\n */\n storage: Storage;\n\n #authenticated = false;\n\n /**\n * The `AuthorizationManager` is considered `authenticated` if it has a valid Globus Auth token.\n * It does not necessarily mean that it has a valid token for a specific resource server.\n */\n get authenticated() {\n return this.#authenticated;\n }\n\n /**\n * Set the authenticated state and emit the `authenticated` event.\n */\n set authenticated(value: boolean) {\n /**\n * Avoid emitting the event if the value hasn't changed.\n */\n if (value === this.#authenticated) {\n return;\n }\n this.#authenticated = value;\n this.#emitAuthenticatedState();\n }\n\n tokens: TokenManager;\n\n events = {\n /**\n * Emitted when the authenticated state changes.\n * @event AuthorizationManager.events#authenticated\n * @type {object}\n * @property {boolean} isAuthenticated - Whether the `AuthorizationManager` is authenticated.\n * @property {TokenResponse} [token] - The token response if the `AuthorizationManager` is authenticated.\n */\n authenticated: new Event<\n 'authenticated',\n {\n /**\n * Whether the `AuthorizationManager` is authenticated.\n * @see {@link AuthorizationManager.authenticated}\n */\n isAuthenticated: boolean;\n token?: TokenResponse;\n }\n >('authenticated'),\n /**\n * Emitted when the user revokes their authentication.\n * @event AuthorizationManager.events#revoke\n */\n revoke: new Event('revoke'),\n };\n\n constructor(configuration: AuthorizationManagerConfiguration) {\n /**\n * Configure the storage system for the instance, defaulting to an in-memory storage system.\n */\n\n if (!configuration.client) {\n throw new Error('You must provide a `client` for your application.');\n }\n /**\n * Inject the `openid`, `profile`, `email`, and `offline_access` scopes by default unless\n * explicitly opted out of.\n */\n const scopes =\n configuration.defaultScopes === false\n ? ''\n : (configuration.defaultScopes ?? DEFAULT_CONFIGURATION.defaultScopes);\n\n this.configuration = {\n ...DEFAULT_CONFIGURATION,\n ...configuration,\n scopes: [configuration.scopes ? configuration.scopes : '', scopes]\n .filter((s) => s.length)\n .join(' '),\n };\n\n this.storage = configuration.storage || new MemoryStorage();\n\n /**\n * If an `events` object is provided, add the listeners to the instance before\n * any event might be dispatched.\n */\n if (this.configuration.events) {\n Object.entries(this.configuration.events).forEach(([name, callback]) => {\n if (name in this.events) {\n this.events[name as keyof AuthorizationManager['events']].addListener(callback);\n }\n });\n }\n\n this.tokens = new TokenManager({\n manager: this,\n });\n this.#checkAuthorizationState();\n }\n\n get storageKeyPrefix() {\n return `${this.configuration.client}:`;\n }\n\n /**\n * The user information decoded from the `id_token` (JWT) of the current Globus Auth token.\n * This method can be used instead of `auth.oauth2.userinfo` to get the user information without an additional request.\n *\n * **IMPORTANT**: The `id_token` can only be processed if the `openid` scope is requested during the authorization process.\n *\n * Additionally, the `profile` and `email` scopes are required to get the full user information.\n *\n * @see {@link https://docs.globus.org/api/auth/reference/#oidc_userinfo_endpoint}\n */\n get user() {\n const token = this.getGlobusAuthToken();\n return token && token.id_token ? jwtDecode<JwtUserInfo>(token.id_token) : null;\n }\n\n /**\n * Attempt to refresh all of the tokens managed by the instance.\n * This method will only attempt to refresh tokens that have a `refresh_token` attribute.\n */\n async refreshTokens() {\n log('debug', 'AuthorizationManager.refreshTokens');\n const tokens = await Promise.allSettled(\n this.tokens.getAll().map((token) => {\n if (isRefreshToken(token)) {\n return this.refreshToken(token);\n }\n return Promise.resolve(null);\n }),\n );\n this.#checkAuthorizationState();\n return tokens;\n }\n\n /**\n * Use the `refresh_token` attribute of a token to obtain a new access token.\n * @param token The well-formed token with a `refresh_token` attribute.\n */\n async refreshToken(token: TokenWithRefresh) {\n log('debug', `AuthorizationManager.refreshToken | resource_server=${token.resource_server}`);\n try {\n const response = await (\n await oauth2.token.refresh({\n payload: {\n client_id: this.configuration.client,\n refresh_token: token.refresh_token,\n grant_type: 'refresh_token',\n },\n })\n ).json();\n if (isGlobusAuthTokenResponse(response)) {\n this.addTokenResponse(response);\n return response;\n }\n } catch (error) {\n log('error', `AuthorizationManager.refreshToken | resource_server=${token.resource_server}`);\n }\n return null;\n }\n\n /**\n * Whether or not the instance has a reference to a Globus Auth token.\n */\n hasGlobusAuthToken() {\n return this.getGlobusAuthToken() !== null;\n }\n\n /**\n * Retrieve the Globus Auth token managed by the instance.\n */\n getGlobusAuthToken() {\n const entry = this.storage.getItem(`${this.storageKeyPrefix}${RESOURCE_SERVERS.AUTH}`);\n return entry ? JSON.parse(entry) : null;\n }\n\n #checkAuthorizationState() {\n log('debug', 'AuthorizationManager.#checkAuthorizationState');\n if (this.hasGlobusAuthToken()) {\n this.authenticated = true;\n }\n }\n\n async #emitAuthenticatedState() {\n const isAuthenticated = this.authenticated;\n const token = this.getGlobusAuthToken() ?? undefined;\n await this.events.authenticated.dispatch({\n isAuthenticated,\n token,\n });\n }\n\n /**\n * Reset the authenticated state and clear all tokens from storage.\n * This method **does not** emit the `revoke` event. If you need to emit the `revoke` event, use the `AuthorizationManager.revoke` method.\n */\n reset() {\n Object.keys(this.storage).forEach((key) => {\n if (key.startsWith(this.storageKeyPrefix)) {\n this.storage.removeItem(key);\n }\n });\n this.authenticated = false;\n }\n\n /**\n * A private utility method to add the `offline_access` scope to a scope string if the `useRefreshTokens` configuration is set to `true`.\n * @param scopes The scope string to modify.\n */\n #withOfflineAccess(scopes: string) {\n return `${scopes}${this.configuration.useRefreshTokens ? ' offline_access' : ''}`;\n }\n\n #buildTransport(options?: Partial<RedirectTransportOptions>) {\n const { scopes, ...overrides } = options ?? {};\n const TransportFactory = TRANSPORTS[this.configuration.transport || 'redirect'];\n\n let scopesToRequest = this.#withOfflineAccess(scopes ?? (this.configuration.scopes || ''));\n\n if (this.storage instanceof MemoryStorage) {\n /**\n * If the in-memory storage is used, we have to make sure when requesting additional\n * consent the original configured scopes are included in the request.\n *\n * This will ensure we recieve a token for all of resource servers that were originally requested,\n * in addition to any new scopes that are requested.\n */\n scopesToRequest = [\n // Use a Set to deduplicate the scopes.\n ...new Set(\n scopesToRequest.split(' ').concat((this.configuration?.scopes || '').split(' ')),\n ),\n ].join(' ');\n }\n\n return new TransportFactory({\n client: this.configuration.client,\n redirect: this.configuration.redirect,\n scopes: scopesToRequest,\n ...overrides,\n params: {\n // @todo @todo Decide if we want to include the `include_consented_scopes` parameter by default.\n // include_consented_scopes: 'true',\n ...overrides?.params,\n },\n });\n }\n\n /**\n * Initiate the login process by redirecting to the Globus Auth login page.\n *\n * **IMPORTANT**: This method will reset the instance state before initiating the login process,\n * including clearing all tokens from storage. If you need to maintain the current state,\n * use the `AuthorizationManager.prompt` method.\n */\n async login(options = { additionalParams: {} }) {\n log('debug', 'AuthorizationManager.login');\n this.reset();\n /**\n * In the future, it's possible that we may want to support different types of transports.\n */\n const transport = this.#buildTransport({ params: options?.additionalParams });\n await transport.send();\n }\n\n /**\n * Prompt the user to authenticate with Globus Auth.\n */\n async prompt(options?: Partial<RedirectTransportOptions>) {\n log('debug', 'AuthorizationManager.prompt');\n const transport = this.#buildTransport(options);\n await transport.send();\n }\n\n /**\n * This method will attempt to complete the PKCE protocol flow.\n */\n async handleCodeRedirect(\n options: {\n shouldReplace: GetTokenOptions['shouldReplace'];\n additionalParams?: RedirectTransportOptions['params'];\n } = { shouldReplace: true, additionalParams: {} },\n ) {\n log('debug', 'AuthorizationManager.handleCodeRedirect');\n const response = await this.#buildTransport({ params: options?.additionalParams }).getToken({\n shouldReplace: options?.shouldReplace,\n });\n if (isGlobusAuthTokenResponse(response)) {\n log(\n 'debug',\n `AuthorizationManager.handleCodeRedirect | response=${JSON.stringify(response)}`,\n );\n this.addTokenResponse(response);\n }\n return response;\n }\n\n /**\n * Handle an error response from a Globus service in the context of this `AuthorizationManager`.\n * This method will introspect the response and attempt to handle any errors that should result\n * in some additional Globus Auth interaction.\n * @param response The error response from a Globus service.\n * @param {object|boolean} options Options for handling the error response. If a boolean is provided, this will be treated as the `options.execute` value.\n * @param options.execute Whether to execute the handler immediately.\n * @param options.additionalParms Additional query parameters to be included with the transport generated URL.\n */\n async handleErrorResponse(\n response: Record<string, unknown>,\n options?: { execute?: true; additionalParams?: RedirectTransportOptions['params'] } | true,\n ): Promise<void>;\n async handleErrorResponse(\n response: Record<string, unknown>,\n options?: { execute?: false; additionalParams?: RedirectTransportOptions['params'] } | false,\n ): Promise<() => Promise<void>>;\n async handleErrorResponse(\n response: Record<string, unknown>,\n options?:\n | { execute?: boolean; additionalParams?: RedirectTransportOptions['params'] }\n | boolean,\n ) {\n const opts =\n typeof options === 'boolean'\n ? {\n ...DEFAULT_HANDLE_ERROR_OPTIONS,\n execute: options,\n }\n : {\n ...DEFAULT_HANDLE_ERROR_OPTIONS,\n ...options,\n };\n log(\n 'debug',\n `AuthorizationManager.handleErrorResponse | response=${JSON.stringify(response)} execute=${opts.execute}`,\n );\n let handler = async () => {};\n if (isAuthorizationRequirementsError(response)) {\n log(\n 'debug',\n 'AuthorizationManager.handleErrorResponse | error=AuthorizationRequirementsError',\n );\n handler = async () => {\n await this.handleAuthorizationRequirementsError(response, {\n additionalParams: opts.additionalParams,\n });\n };\n }\n if (isConsentRequiredError(response)) {\n log('debug', 'AuthorizationManager.handleErrorResponse | error=ConsentRequiredError');\n handler = async () => {\n await this.handleConsentRequiredError(response, {\n additionalParams: opts.additionalParams,\n });\n };\n }\n if ('code' in response && response['code'] === 'AuthenticationFailed') {\n log('debug', 'AuthorizationManager.handleErrorResponse | error=AuthenticationFailed');\n handler = async () => {\n await this.revoke();\n };\n }\n\n const returnValue = opts.execute === true ? await handler() : handler;\n return returnValue;\n }\n\n /**\n * Process a well-formed Authorization Requirements error response from a Globus service\n * and redirect the user to the Globus Auth login page with the necessary parameters.\n */\n async handleAuthorizationRequirementsError(\n response: AuthorizationRequirementsError,\n options?: { additionalParams?: RedirectTransportOptions['params'] },\n ) {\n this.#transport = this.#buildTransport({\n params: {\n prompt: 'login',\n ...toAuthorizationQueryParams(response),\n ...options?.additionalParams,\n },\n });\n await this.#transport.send();\n }\n\n /**\n * Process a well-formed `ConsentRequired` error response from a Globus service\n * and redirect the user to the Globus Auth login page with the necessary parameters.\n */\n async handleConsentRequiredError(\n response: ConsentRequiredError,\n options?: { additionalParams?: RedirectTransportOptions['params'] },\n ) {\n this.#transport = this.#buildTransport({\n scopes: this.#withOfflineAccess(response.required_scopes.join(' ')),\n params: {\n ...options?.additionalParams,\n },\n });\n await this.#transport.send();\n }\n\n /**\n * Add a Globus Auth token response to storage, if `other_tokens` are present they are also added.\n * This method is mostly used internally by the `AuthorizationManager`, but can be used by downstream\n * consumers to add tokens to storage if necessary.\n */\n addTokenResponse = (token: Token | TokenResponse) => {\n this.tokens.add(token);\n this.#checkAuthorizationState();\n };\n\n /**\n * Call `AuthroizationManager.reset`, revoke all of the available tokns, and emit the `revoke` event.\n * @emits AuthorizationManager.events#revoke\n * @see AuthorizationManager.reset\n */\n async revoke() {\n log('debug', 'AuthorizationManager.revoke');\n const revocation = Promise.all(this.tokens.getAll().map(this.#revokeToken.bind(this)));\n this.reset();\n await revocation;\n await this.events.revoke.dispatch();\n }\n\n /**\n * Revoke a token from a resource server.\n */\n #revokeToken(token: Token) {\n log('debug', `AuthorizationManager.revokeToken | resource_server=${token.resource_server}`);\n return oauth2.token.revoke({\n payload: {\n client_id: this.configuration.client,\n token: token.access_token,\n },\n });\n }\n}\n", "/**\n * @description A wrapper around the Globus Auth service.\n * @group Service\n * @see [Globus Auth API Documentation](https://docs.globus.org/api/auth/)\n * @module\n */\nimport { build } from '../../core/url.js';\n\nimport * as AUTH from './config.js';\n\nimport type { Token, TokenWithRefresh, TokenResponse } from './types.js';\n\n/**\n * @private\n * @internal\n */\nexport const CONFIG = AUTH;\n\n/**\n * Query parameters that can be passed to the authorization endpoint.\n * @see https://docs.globus.org/api/auth/reference/#authorization_code_grant_preferred\n * @see https://docs.globus.org/api/auth/sessions/#client-initiated-authns\n */\nexport type AuthorizationQueryParameters = {\n prompt?: string;\n session_message?: string;\n session_required_identities?: string;\n session_required_single_domain?: string;\n session_required_mfa?: 'true' | 'false';\n session_required_policies?: string;\n};\n\nexport function getAuthorizationEndpoint() {\n return build(AUTH.ID, '/v2/oauth2/authorize');\n}\n\nexport function getTokenEndpoint() {\n return build(AUTH.ID, '/v2/oauth2/token');\n}\n\nexport * as identities from './service/identities.js';\nexport * as oauth2 from './service/oauth2/index.js';\n\nexport function isToken(check: unknown): check is Token {\n return typeof check === 'object' && check !== null && 'access_token' in check;\n}\n\nexport function isRefreshToken(check: unknown): check is TokenWithRefresh {\n return isToken(check) && check !== null && 'refresh_token' in check;\n}\n\nexport function isGlobusAuthTokenResponse(check: unknown): check is TokenResponse {\n /**\n * @todo This could be made more robust by checking whether the `resource_server` is a well-known value.\n */\n return isToken(check) && check !== null && 'resource_server' in check;\n}\n", "import { ID as TRANSFER } from '../transfer/config.js';\nimport { ID as FLOWS } from '../flows/config.js';\nimport { ID as TIMER } from '../timer/config.js';\nimport { ID as GROUPS } from '../groups/config.js';\nimport { ID as SEARCH } from '../search/config.js';\nimport { ID as COMPUTE } from '../compute/config.js';\n\nimport type { Environment } from '../../core/global.js';\n\nexport const ID = 'AUTH' as const;\nexport const HOSTS: Partial<Record<Environment, string>> = {\n integration: 'auth.integration.globuscs.info',\n sandbox: 'auth.sandbox.globuscs.info',\n production: 'auth.globus.org',\n test: 'auth.test.globuscs.info',\n staging: 'auth.staging.globuscs.info',\n preview: 'auth.preview.globus.org',\n};\n\nexport const SCOPES = {\n VIEW_IDENTITIES: 'urn:globus:auth:scope:auth.globus.org:view_identities',\n};\n\nexport const RESOURCE_SERVERS = {\n [ID]: 'auth.globus.org',\n [TRANSFER]: 'transfer.api.globus.org',\n [FLOWS]: 'flows.globus.org',\n [GROUPS]: 'groups.api.globus.org',\n [SEARCH]: 'search.api.globus.org',\n [TIMER]: '524230d7-ea86-4a52-8312-86065a9e0417',\n [COMPUTE]: 'funcx_service',\n};\n", "import type { Environment } from '../../core/global.js';\n\nexport const ID = 'TRANSFER' as const;\n\nexport const SCOPES = {\n ALL: 'urn:globus:auth:scope:transfer.api.globus.org:all',\n};\n\nexport const HOSTS: Partial<Record<Environment, string>> = {\n sandbox: 'transfer.api.sandbox.globuscs.info',\n production: 'transfer.api.globusonline.org',\n staging: 'transfer.api.staging.globuscs.info',\n integration: 'transfer.api.integration.globuscs.info',\n test: 'transfer.api.test.globuscs.info',\n preview: 'transfer.api.preview.globus.org',\n};\n", "import type { Environment } from '../../core/global.js';\n\nexport const ID = 'FLOWS' as const;\nexport const HOSTS: Partial<Record<Environment, string>> = {\n sandbox: 'sandbox.flows.automate.globus.org',\n production: 'flows.globus.org',\n staging: 'staging.flows.automate.globus.org',\n integration: 'integration.flows.automate.globus.org',\n test: 'test.flows.automate.globus.org',\n preview: 'preview.flows.automate.globus.org',\n};\n\n/**\n * @see https://docs.globus.org/api/flows/overview/#scopes\n */\nexport const SCOPES = {\n MANAGE_FLOWS: 'https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/manage_flows',\n VIEW_FLOWS: 'https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/view_flows',\n RUN: 'https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run',\n RUN_STATUS: 'https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run_status',\n RUN_MANAGE: 'https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run_manage',\n};\n", "import type { Environment } from '../../core/global.js';\n\nexport const ID = 'TIMER' as const;\nexport const HOSTS: Partial<Record<Environment, string>> = {\n sandbox: 'sandbox.timer.automate.globus.org',\n production: 'timer.automate.globus.org',\n staging: 'staging.timer.automate.globus.org',\n integration: 'integration.timer.automate.globus.org',\n test: 'test.timer.automate.globus.org',\n preview: 'preview.timer.automate.globus.org',\n};\n", "import type { Environment } from '../../core/global.js';\n\nexport const ID = 'GROUPS' as const;\nexport const HOSTS: Partial<Record<Environment, string>> = {\n sandbox: 'groups.api.sandbox.globuscs.info',\n production: 'groups.api.globus.org',\n staging: 'groups.api.staging.globuscs.info',\n integration: 'groups.api.integration.globuscs.info',\n test: 'groups.api.test.globuscs.info',\n preview: 'groups.api.preview.globuscs.info',\n};\n\n/**\n * @see https://docs.globus.org/api/groups/#scopes\n */\nexport const SCOPES = {\n ALL: 'urn:globus:auth:scope:groups.api.globus.org:all',\n VIEW_MY: 'urn:globus:auth:scope:groups.api.globus.org:view_my_groups_and_membership',\n};\n", "import type { Environment } from '../../core/global.js';\n\nexport const ID = 'SEARCH' as const;\nexport const HOSTS: Partial<Record<Environment, string>> = {\n sandbox: 'search.api.sandbox.globuscs.info',\n production: 'search.api.globus.org',\n staging: 'search.api.staging.globuscs.info',\n integration: 'search.api.integration.globuscs.info',\n test: 'search.api.test.globuscs.info',\n preview: 'search.api.preview.globus.org',\n};\n\n/**\n * @see https://docs.globus.org/api/search/api_usage/#scopes\n */\nexport const SCOPES = {\n ALL: 'urn:globus:auth:scope:search.api.globus.org:all',\n INGEST: 'urn:globus:auth:scope:search.api.globus.org:ingest',\n SEARCH: 'urn:globus:auth:scope:search.api.globus.org:search',\n};\n", "import type { Environment } from '../../core/global.js';\n\nexport const ID = 'COMPUTE' as const;\nexport const HOSTS: Partial<Record<Environment, string>> = {\n sandbox: 'compute.api.sandbox.globuscs.info',\n production: 'compute.api.globus.org',\n staging: 'compute.api.staging.globuscs.info',\n integration: 'compute.api.integration.globuscs.info',\n test: 'compute.api.test.globuscs.info',\n preview: 'compute.api.preview.globus.org',\n};\n\nexport const SCOPES = {\n ALL: 'https://auth.globus.org/scopes/facd7ccc-c5f4-42aa-916b-a0e270e2c2a9/all',\n};\n", "/**\n * @module Errors\n * @example\n * import { errors } from \"globus/sdk\";\n * if (errors.isConsentRequiredError(...)) { ... }\n */\nimport type { AuthorizationQueryParameters } from '../services/auth/index.js';\n\nexport class EnvironmentConfigurationError extends Error {\n override name = 'EnvironmentConfigurationError';\n\n constructor(variable: string, value: unknown) {\n super();\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n this.message = `Invalid configuration value provided for ${variable} (${value}).`;\n }\n}\n\nexport type WellFormedError = {\n code: string;\n message: string;\n};\n\nexport function isErrorWellFormed(test: unknown): test is WellFormedError {\n return typeof test === 'object' && test !== null && 'code' in test && 'message' in test;\n}\n\nexport type ConsentRequiredError = {\n code: 'ConsentRequired';\n required_scopes: string[];\n [key: string]: unknown;\n};\n\nexport function isConsentRequiredError(test: unknown): test is ConsentRequiredError {\n return (\n isErrorWellFormed(test) &&\n test.code === 'ConsentRequired' &&\n 'required_scopes' in test &&\n Array.isArray(test.required_scopes)\n );\n}\n\n/**\n * An error that includes an `authorization_parameters` property, a.k.a \"G.A.R.E\".\n *\n * A well-known error shape is provided by services when additional authorization requirements must be met by the session.\n * This object can be converted to parameters accepted by Globus Auth using `sdk.errors.toAuthorizationQueryParams()`.\n */\nexport type AuthorizationRequirementsError = {\n authorization_parameters: {\n session_message?: string;\n session_required_identities?: string[];\n session_required_mfa?: boolean;\n session_required_single_domain?: string[];\n session_required_policies?: string[];\n prompt?: string;\n required_scopes?: string[];\n };\n /**\n * @todo At the moment, most Globus services do not guarentee a `code` property for this error type.\n * Once it becomes more common, this type (and the `isAuthorizationRequirementsError` function) should be updated.\n * @see https://globus-sdk-python.readthedocs.io/en/stable/experimental/auth_requirements_errors.html\n */\n // code: string;\n [key: string]: unknown;\n};\n/**\n * Keys that should not be included in the query string object (not recognized by Globus Auth).\n */\nconst NO_OP_KEYS: (keyof AuthorizationRequirementsError)[] = ['required_scopes'];\n/**\n * Convert an `AuthorizationRequirementsError` to a query string object accepted by Globus Auth.\n */\nexport function toAuthorizationQueryParams(\n error: AuthorizationRequirementsError,\n): AuthorizationQueryParameters {\n return Object.entries(error.authorization_parameters).reduce((acc, [key, v]) => {\n /**\n * Remove keys that are not recognized by Globus Auth and empty values.\n */\n if (NO_OP_KEYS.includes(key) || v === undefined || v === null) {\n return acc;\n }\n /**\n * All other values are converted to strings.\n */\n let value = v;\n if (Array.isArray(value)) {\n value = value.join(',');\n } else if (typeof v === 'boolean') {\n value = value ? 'true' : 'false';\n }\n return { ...acc, [key]: value };\n }, {});\n}\n\n/**\n * Check if an object is an `AuthorizationRequirementsError`.\n * @see {@link AuthorizationRequirementsError}\n */\nexport function isAuthorizationRequirementsError(\n test: unknown,\n): test is AuthorizationRequirementsError {\n return (\n typeof test === 'object' &&\n test !== null &&\n 'authorization_parameters' in test &&\n typeof test.authorization_parameters === 'object' &&\n test.authorization_parameters !== null\n );\n}\n", "import * as AUTH from '../services/auth/config.js';\nimport * as TRANSFER from '../services/transfer/config.js';\nimport * as FLOWS from '../services/flows/config.js';\nimport * as GROUPS from '../services/groups/config.js';\nimport * as SEARCH from '../services/search/config.js';\nimport * as TIMER from '../services/timer/config.js';\nimport * as COMPUTE from '../services/compute/config.js';\n\nimport { EnvironmentConfigurationError } from './errors.js';\nimport { SDKOptions } from '../services/types.js';\nimport { log } from './logger.js';\n\nfunction getRuntime() {\n return typeof window !== 'undefined' ? window : process;\n}\n\nfunction isBrowser(runtime: Window | NodeJS.Process): runtime is Window {\n return typeof window === typeof runtime;\n}\n\nfunction env<T>(key: string, fallback: T): T {\n const runtime = getRuntime();\n let envConfiguration;\n if (isBrowser(runtime)) {\n envConfiguration = runtime;\n } else {\n envConfiguration = runtime.env;\n }\n if (key in envConfiguration) {\n return (envConfiguration as Record<typeof key, T>)[key];\n }\n return fallback;\n}\n\n/**\n * Handlers for: GLOBUS_SDK_ENVIRONMENT\n */\nexport const ENVIRONMENTS = {\n PRODUCTION: 'production',\n PREVIEW: 'preview',\n STAGING: 'staging',\n SANDBOX: 'sandbox',\n INTEGRATION: 'integration',\n TEST: 'test',\n} as const;\n\nexport type Environment = (typeof ENVIRONMENTS)[keyof typeof ENVIRONMENTS];\n\nexport const SERVICES = {\n [AUTH.ID]: AUTH.ID,\n [TRANSFER.ID]: TRANSFER.ID,\n [FLOWS.ID]: FLOWS.ID,\n [GROUPS.ID]: GROUPS.ID,\n [SEARCH.ID]: SEARCH.ID,\n [TIMER.ID]: TIMER.ID,\n [COMPUTE.ID]: COMPUTE.ID,\n};\n\nexport type Service = keyof typeof SERVICES;\n\nexport const SERVICE_HOSTS: Record<Service, Partial<Record<Environment, string>>> = {\n [AUTH.ID]: AUTH.HOSTS,\n [TRANSFER.ID]: TRANSFER.HOSTS,\n [FLOWS.ID]: FLOWS.HOSTS,\n [GROUPS.ID]: GROUPS.HOSTS,\n [SEARCH.ID]: SEARCH.HOSTS,\n [TIMER.ID]: TIMER.HOSTS,\n [COMPUTE.ID]: COMPUTE.HOSTS,\n};\n\n/**\n * Get the computed SDK options based on the runtime.\n * This should be used any time we're referencing the SDK options in\n * methods to ensure we're including any global overrides.\n */\nexport function getSDKOptions(options?: SDKOptions) {\n let globalOptions = env<string | SDKOptions>('GLOBUS_SDK_OPTIONS', {});\n if (typeof globalOptions === 'string') {\n globalOptions = JSON.parse(globalOptions) as SDKOptions;\n }\n return {\n ...globalOptions,\n ...options,\n fetch: {\n ...globalOptions?.fetch,\n ...options?.fetch,\n options: {\n ...globalOptions?.fetch?.options,\n ...options?.fetch?.options,\n headers: {\n ...globalOptions?.fetch?.options?.headers,\n ...options?.fetch?.options?.headers,\n },\n },\n },\n };\n}\n\nexport function getEnvironment(): Environment {\n const globalOptions = getSDKOptions();\n const environment = env<Environment>(\n 'GLOBUS_SDK_ENVIRONMENT',\n globalOptions?.environment ?? ENVIRONMENTS.PRODUCTION,\n );\n if (globalOptions?.environment && environment !== globalOptions.environment) {\n log(\n 'debug',\n 'GLOBUS_SDK_ENVIRONMENT and GLOBUS_SDK_OPTIONS.environment are set to different values. GLOBUS_SDK_ENVIRONMENT will take precedence',\n );\n }\n if (!environment || !Object.values(ENVIRONMENTS).includes(environment)) {\n throw new EnvironmentConfigurationError('GLOBUS_SDK_ENVIRONMENT', environment);\n }\n return environment;\n}\n\n/**\n * Handlers for: GLOBUS_SDK_VERIFY_SSL\n * Since disabling SSL is at least not-recommended, we consider\n * this value to always be true, but provide a warning when it set\n * to one of the falsey values for informational purposes.\n *\n * Taking direction from `globus-sdk-python` for possible false values\n * @see https://github.com/globus/globus-sdk-python/blob/18eced9c12e2ec41745d1be183148845198b999c/src/globus_sdk/config/env_vars.py#L20\n */\nexport function getVerifySSL(): boolean {\n const verifySSLTemp = env<string>('GLOBUS_SDK_VERIFY_SSL', 'true').toLowerCase();\n if (['n', 'no', 'f', 'false', 'off', '0'].includes(verifySSLTemp)) {\n log(\n 'warn',\n 'Setting GLOBUS_SDK_VERIFY_SSL to false is disallowed in the Globus JavaScript SDK. It will always true in this context',\n );\n }\n return true;\n}\n\n/**\n * Handlers for: GLOBUS_SDK_HTTP_TIMEOUT\n */\nexport function getHttpTimeout() {\n const timeout = Number(env<string | number>('GLOBUS_SDK_HTTP_TIMEOUT', 60));\n if (timeout === -1) {\n return null;\n }\n return timeout;\n}\n\nexport function getServiceHost(service: Service, environment: Environment = getEnvironment()) {\n return SERVICE_HOSTS[service][environment];\n}\n\nexport function getServiceBaseUrl(service: Service, environment: Environment = getEnvironment()) {\n const host = getServiceHost(service, environment);\n return env(`GLOBUS_SDK_SERVICE_URL_${service}`, host ? `https://${host}` : undefined);\n}\n", "import { getServiceBaseUrl, getEnvironment, Environment, Service } from './global.js';\nimport type { GCSConfiguration } from '../services/globus-connect-server/index.js';\nimport { SDKOptions } from '../services/types.js';\n\n/**\n * An extremely simplified parameter serializer based on our current needs.\n *\n * **This is intended for internal @globus/sdk use only.**\n *\n * @private\n */\nexport function stringifyParameters(parameters: {\n [key: string]:\n | string\n | number\n | boolean\n | Array<string | number | null | undefined>\n | null\n | undefined;\n}) {\n const search = new URLSearchParams();\n\n Array.from(Object.entries(parameters)).forEach(([key, value]) => {\n if (Array.isArray(value)) {\n /**\n * Arrays are converted to comma-separated strings.\n */\n search.set(key, value.join(','));\n } else if (value !== undefined) {\n search.set(key, String(value));\n }\n });\n\n return search.toString();\n}\n\n/**\n * Return the base URL for a service (based on the environment).\n * @param service The service to build the URL for.\n * @param path The path to the resource.\n * @param environment The environment to use.\n */\nexport function getServiceURL(\n service: Service,\n path = '',\n environment: Environment = getEnvironment(),\n): URL {\n const base = getServiceBaseUrl(service, environment);\n return new URL(path, base);\n}\n\n/**\n * Build a URL for a service or GCSConfiguration.\n *\n * @param service The service identifier or GCSConfiguration object to build the URL for.\n * @param path The path to the resource.\n * @param options Additional options for the URL.\n */\nexport function build(\n serviceOrConfiguration: Service | GCSConfiguration,\n path: string,\n options?: {\n search?: Parameters<typeof stringifyParameters>[0];\n },\n sdkOptions?: SDKOptions,\n): string {\n let url;\n if (typeof serviceOrConfiguration === 'object') {\n url = new URL(path, serviceOrConfiguration.host);\n } else {\n url = getServiceURL(serviceOrConfiguration, path, sdkOptions?.environment);\n }\n if (options && options.search) {\n url.search = stringifyParameters(options.search);\n }\n return url.toString();\n}\n", "import { ID, SCOPES } from '../config.js';\nimport { serviceRequest } from '../../../services/shared.js';\n\nimport type { ServiceMethod, ServiceMethodDynamicSegments } from '../../types.js';\n\n/**\n * Fetch a single Identity by ID.\n * @see https://docs.globus.org/api/auth/reference/#get_identities\n */\nexport const get = function (identity_id, options = {}, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.VIEW_IDENTITIES,\n path: `/identities/${identity_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<string, Record<string, any>>;\n\n/**\n * Return a list of identities that match provided query parameters.\n * @see https://docs.globus.org/api/auth/reference/#get_identities\n */\nexport const getAll = function (options = {}, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.VIEW_IDENTITIES,\n path: `/identities`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: {\n ids?: string | string[];\n usernames?: string | string[];\n };\n headers?: Record<string, string>;\n payload?: never;\n}>;\n", "import _fetch from 'cross-fetch';\nimport { getClientInfoRequestHeaders } from '../core/info/index.js';\nimport { build } from '../core/url.js';\nimport { getSDKOptions, Service } from '../core/global.js';\nimport { isAuthorizationRequirementsError } from '../core/errors.js';\nimport { RESOURCE_SERVERS } from './auth/config.js';\nimport { isRefreshToken } from './auth/index.js';\nimport type { ServiceMethodOptions, SDKOptions } from './types.js';\nimport type { GCSConfiguration } from '../services/globus-connect-server/index.js';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport enum HTTP_METHODS {\n POST = 'POST',\n GET = 'GET',\n DELETE = 'DELETE',\n PUT = 'PUT',\n PATCH = 'PATCH',\n}\n\n/**\n * Our domain-specific language for describing service requests.\n * @private\n */\ntype ServiceRequestDSL = {\n /**\n * The service that the request will be made to.\n */\n service: Service | GCSConfiguration;\n /**\n * A specific scope that is required for the request. If a scope is provided,\n * the `serviceRequest` function will attempt to get a token for the request\n * based on the the `service` => `resource_server` mapping.\n */\n scope?: string;\n /**\n * The resource server that the request will be made to. This can be provided\n * instead of (or addition to) the `scope` property. If this is provided, the\n * `serviceRequest` function will attempt to get a token for the resource server\n * when a `manager` instance is provided in the SDK options.\n */\n resource_server?: string;\n /**\n * The path of the resource (appended to the service's host).\n */\n path: string;\n /**\n * The HTTP method to use for the request.\n */\n method?: HTTP_METHODS;\n /**\n * For some resources, it doesn't make sense for requests to be retried.\n * Setting this to `true` will prevent any retry logic from being applied.\n */\n preventRetry?: boolean;\n};\n\n/**\n * A helper function for making service requests that will handle the arguments\n * of `ServiceMethod` and `ServiceMethodDynamicSegments` functions in a uniform\n * way.\n *\n * @example\n * ```ts\n * export const get = function (flow_id, options?, sdkOptions?) {\n * return serviceRequest({\n * service: FLOWS.ID,\n * scope: SCOPES.VIEW_FLOWS,\n * path: `/flows/${flow_id}`,\n * }, options, sdkOptions);\n * } satisfies ServiceMethodDynamicSegments<string, Record<string, any>>;\n * ```\n *\n * @private\n * @param config The ServiceRequestDSL for the request.\n * @param options The options passed to the service method.\n * @param passedSdkOptions The SDK options passed to the service method.\n * @returns\n */\nexport async function serviceRequest(\n this: unknown,\n config: ServiceRequestDSL,\n options?: ServiceMethodOptions,\n passedSdkOptions?: SDKOptions,\n): Promise<Response> {\n /**\n * Get the SDK options, merging any passed options with the global options.\n */\n const sdkOptions = getSDKOptions(passedSdkOptions);\n const injectedFetchOptions = sdkOptions?.fetch?.options || {};\n\n const headers: Record<string, string> = {\n ...getClientInfoRequestHeaders(),\n ...options?.headers,\n /**\n * Key/value pairs found in the `fetch` options override those found in the\n * service method options.\n */\n ...injectedFetchOptions.headers,\n };\n\n /**\n * The `AuthorizationManager` instance provided with the call.\n */\n const manager = sdkOptions?.manager;\n\n let token;\n /**\n * If a `resource_server` was provided, and the SDK is configured with a `manager`\n * instance, we'll try to get a token for the resource server and use it.\n */\n if (config.resource_server && manager) {\n token = manager.tokens.getByResourceServer(config.resource_server);\n if (token) {\n headers['Authorization'] = `Bearer ${token.access_token}`;\n }\n }\n /**\n * If the `scope` property is provided, and the SDK is configured with a `manager`,\n * we'll try to map the service to a resource server. This is mostly to support\n * backwards compatibility of the `scope` property being used in the `ServiceRequestDSL`.\n */\n if (config.scope && manager) {\n const resourceServer =\n typeof config.service === 'string'\n ? RESOURCE_SERVERS[config.service]\n : // For `GCSConfiguration` objects, the `endpoint_id` is the resource server.\n config.service.endpoint_id;\n\n token = manager.tokens.getByResourceServer(resourceServer);\n if (token) {\n headers['Authorization'] = `Bearer ${token.access_token}`;\n }\n }\n\n /**\n * If a raw body was provided, use that. Otherwise, if a payload was provided, serialize it.\n */\n let body = options?.body;\n if (!body && options?.payload) {\n body = JSON.stringify(options.payload);\n }\n\n /**\n * If `Content-Type` header was not provided, and there is a body, we assume it is JSON.\n */\n if (!headers?.['Content-Type'] && body) {\n headers['Content-Type'] = 'application/json';\n }\n\n const url = build(\n config.service,\n config.path,\n {\n search: options?.query,\n },\n sdkOptions,\n );\n\n const init = {\n method: config.method,\n body,\n ...injectedFetchOptions,\n /**\n * Merge the headers from the options and SDK options.\n */\n headers,\n };\n\n /**\n * The request handler for the fetch call. This can be overridden by providing a\n * `__callable` property in the `fetch` options.\n */\n let handler = _fetch;\n /* eslint-disable no-underscore-dangle */\n if (injectedFetchOptions?.__callable) {\n handler = injectedFetchOptions.__callable.bind(this);\n /**\n * Remove the `__callable` property from the `fetch` options before passing the options along.\n */\n delete init.__callable;\n }\n /* eslint-enable no-underscore-dangle */\n\n /**\n * If the resource is configured to prevent retries, there is no `manager` instance,\n * or token, the request will be made as-is.\n */\n if (config.preventRetry || !manager || !token || !isRefreshToken(token)) {\n return handler(url, init);\n }\n\n /**\n * Automatic Retry Handling\n */\n\n const initialResponse = await handler(url, init);\n /**\n * If the response is \"ok\", we can return it as-is.\n */\n if (initialResponse.ok) {\n return initialResponse;\n }\n /**\n * Do a safe check to see if the response contains any authorization requirements.\n */\n let hasAuthorizationRequirements;\n try {\n hasAuthorizationRequirements = isAuthorizationRequirementsError(\n /**\n * It is important to clone the response before calling `json` avoid\n * `body used already for [...]` errors when the initial response is\n * returned.\n */\n await initialResponse.clone().json(),\n );\n } catch (_e) {\n hasAuthorizationRequirements = false;\n }\n /**\n * We only attempt to refresh the original token supplied with teh request, if the\n * response status is 401 and the response does not contain any authorization requirements.\n */\n const shouldAttemptTokenRefresh = initialResponse.status === 401 && !hasAuthorizationRequirements;\n if (shouldAttemptTokenRefresh) {\n const newToken = await manager.refreshToken(token);\n if (!newToken) {\n return initialResponse;\n }\n /**\n * Retry the request with the new token.\n */\n return handler(url, {\n ...init,\n headers: {\n ...init.headers,\n Authorization: `Bearer ${newToken.access_token}`,\n },\n });\n }\n /**\n * No retry was attempted, return the initial response.\n */\n return initialResponse;\n}\n", "import { ID } from '../../config.js';\nimport { HTTP_METHODS, serviceRequest } from '../../../../services/shared.js';\n\nimport type { ServiceMethod } from '../../../types.js';\n\nexport const userinfo = function (options?, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: undefined,\n path: `/v2/oauth2/userinfo`,\n method: HTTP_METHODS.GET,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: never;\n}>;\n\nexport * as token from './token.js';\n", "import { ID } from '../../config.js';\nimport { HTTP_METHODS, serviceRequest } from '../../../../services/shared.js';\n\nimport type { ServiceMethod, ServiceMethodOptions } from '../../../types.js';\n\ntype IntrospectPayload = {\n token: string;\n include?: string;\n};\n\ntype RevokePayload = {\n token: string;\n /**\n * This is an undocumented property that is required for the request to be successful.\n */\n client_id: string;\n};\n\ntype ValidatePayload = {\n token: string;\n client_id: string;\n};\n\ntype RefreshPayload = {\n refresh_token: string;\n grant_type: 'refresh_token';\n /**\n * This is an undocumented property that is required for the request to be successful.\n */\n client_id: string;\n};\n\ntype ExchangePayload = {\n grant_type: 'authorization_code';\n code: string;\n client_id: string;\n code_verifier: string;\n redirect_uri: string;\n};\n\ntype SupportedPayloads =\n | IntrospectPayload\n | RevokePayload\n | ValidatePayload\n | RefreshPayload\n | ExchangePayload;\n\nfunction serialize(payload?: SupportedPayloads) {\n return new URLSearchParams(payload);\n}\n\n/**\n * Format and inject properties that are specific to the `/token` resources.\n */\nfunction injectServiceOptions(\n options: ServiceMethodOptions & {\n payload?: SupportedPayloads;\n },\n): ServiceMethodOptions {\n return {\n ...options,\n /**\n * The `token` service methods always expect a form-encoded body. We still allow\n * end-consumers to pass a raw body, but if `payload` is provided it is serialized.\n */\n body: options.payload ? serialize(options.payload) : undefined,\n headers: {\n ...(options?.headers || {}),\n Accept: 'application/json',\n /**\n * Force the `Content-Type` header to be `application/x-www-form-urlencoded` and `charset=UTF-8`.\n */\n 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',\n },\n };\n}\n\n/**\n * @see https://docs.globus.org/api/auth/reference/#dependent_token_grant_post_v2oauth2token\n */\nexport const token = function (options = {}, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: undefined,\n path: `/v2/oauth2/token`,\n method: HTTP_METHODS.POST,\n preventRetry: true,\n },\n injectServiceOptions(options),\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload?: ExchangePayload;\n}>;\n\n/**\n * @see https://docs.globus.org/api/auth/developer-guide/#obtaining-authorization\n */\nexport const exchange = token;\n\n/**\n * Token Introspection\n * @see https://docs.globus.org/api/auth/reference/#token-introspect\n */\nexport const introspect = function (options, sdkOptions?) {\n if (!options?.payload) {\n throw new Error(`'payload' is required for introspect`);\n }\n return serviceRequest(\n {\n service: ID,\n scope: undefined,\n path: `/v2/oauth2/token/introspect`,\n method: HTTP_METHODS.POST,\n preventRetry: true,\n },\n injectServiceOptions(options),\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: IntrospectPayload;\n}>;\n\n/**\n * Token Revocation\n * @see https://docs.globus.org/api/auth/reference/#token-revoke\n */\nexport const revoke = function (options, sdkOptions?) {\n if (!options?.payload) {\n throw new Error(`'payload' is required for revoke`);\n }\n return serviceRequest(\n {\n service: ID,\n scope: undefined,\n path: `/v2/oauth2/token/revoke`,\n method: HTTP_METHODS.POST,\n preventRetry: true,\n },\n injectServiceOptions(options),\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: RevokePayload;\n}>;\n\n/**\n * Token Refresh\n * @see https://docs.globus.org/api/auth/reference/#refresh_token_grant\n */\nexport const refresh = function (options, sdkOptions?) {\n if (!options?.payload) {\n throw new Error(`'payload' is required for revoke`);\n }\n return serviceRequest(\n {\n service: ID,\n scope: undefined,\n path: `/v2/oauth2/token`,\n method: HTTP_METHODS.POST,\n preventRetry: true,\n },\n injectServiceOptions(options),\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: RefreshPayload;\n}>;\n\n/**\n * @private\n * @deprecated Rather than using `validate` to check if a token is valid, it is recommended to make a request to the resource server with the token and handle the error response.\n */\nexport const validate = function (options, sdkOptions?) {\n if (!options?.payload) {\n throw new Error(`'payload' is required for validate`);\n }\n return serviceRequest(\n {\n service: ID,\n scope: undefined,\n path: `/v2/oauth2/token/validate`,\n method: HTTP_METHODS.POST,\n preventRetry: true,\n },\n injectServiceOptions(options),\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: ValidatePayload;\n}>;\n", "/**\n * @todo It would be nice to not `| any` here, but ideally callers do not need to\n * fully type the payload to attach listeners.\n */\ntype ListenerCallback<P> = (payload?: P | any) => Promise<void> | void;\n\nexport class Event<EventName extends string, Payload extends unknown> {\n #callbacks: ListenerCallback<Payload>[] = [];\n\n constructor(readonly name: EventName) {}\n\n addListener(callback: ListenerCallback<Payload>) {\n this.#callbacks.push(callback);\n return () => this.removeListener(callback);\n }\n\n removeListener(callback: ListenerCallback<Payload>) {\n this.#callbacks = this.#callbacks.filter((cb) => cb !== callback);\n }\n\n clearListeners() {\n this.#callbacks = [];\n }\n\n async dispatch(payload?: Payload) {\n await Promise.all(this.#callbacks.map((callback) => callback(payload)));\n }\n}\n", "export function isSupported() {\n return 'crypto' in globalThis;\n}\n\nfunction getCrypto(): Crypto {\n return 'webcrypto' in globalThis.crypto\n ? (globalThis.crypto.webcrypto as unknown as Crypto)\n : globalThis.crypto;\n}\n\n/**\n * Base64 URL encode a string.\n * @see https://www.oauth.com/oauth2-servers/pkce/authorization-request/\n */\nconst encode = (value: string) =>\n btoa(value).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '');\n\nasync function sha256(input: string) {\n const hashBuffer = await getCrypto().subtle.digest('SHA-256', new TextEncoder().encode(input));\n return String.fromCharCode(...new Uint8Array(hashBuffer));\n}\n\n/**\n * Character set for generating random alpha-numeric strings.\n */\nconst CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\n/**\n * Character set allowed to be used in the PKCE `code_verifier`\n * @see https://www.rfc-editor.org/rfc/rfc7636#section-4.1\n */\nconst PKCE_SAFE_CHARSET = `${CHARSET}-._~`;\n/**\n * Create a Code Verifier for PKCE\n * @see https://www.rfc-editor.org/rfc/rfc7636#section-4.1\n */\nexport function generateCodeVerifier() {\n /**\n * @todo Make length random between 43 and 128 characters\n */\n return Array.from(getCrypto().getRandomValues(new Uint8Array(43)))\n .map((v) => PKCE_SAFE_CHARSET[v % PKCE_SAFE_CHARSET.length])\n .join('');\n}\n\n/**\n * Create a Code Challenge from a provided Code Verifier (assumes S256 `code_challenge_method`).\n * @see https://www.rfc-editor.org/rfc/rfc7636#section-4.2\n */\nexport async function generateCodeChallenge(verifier: string) {\n const hashed = await sha256(verifier);\n return encode(hashed);\n}\n\nexport function generateState() {\n return Array.from(getCrypto().getRandomValues(new Uint8Array(16)))\n .map((v) => CHARSET[v % CHARSET.length])\n .join('');\n}\n\n/**\n * @see https://www.oauth.com/oauth2-servers/pkce/authorization-code-exchange/\n */\nexport type AuthorizationCodeExchangeParameters = {\n code: string;\n code_verifier: string;\n client_id: string;\n client_secret?: string;\n redirect_uri: string;\n grant_type: 'authorization_code';\n};\n\n/**\n * @see https://www.oauth.com/oauth2-servers/pkce/authorization-request/\n */\nexport type AuthorizationRequestParameters = {\n client_id: string;\n redirect_uri: string;\n response_type: 'code';\n scope: string;\n state: string;\n code_challenge: string;\n code_challenge_method: 'S256' | 'plain';\n};\n", "import { getAuthorizationEndpoint, oauth2 } from '../../services/auth/index.js';\nimport {\n generateCodeChallenge,\n generateCodeVerifier,\n generateState,\n AuthorizationRequestParameters,\n AuthorizationCodeExchangeParameters,\n isSupported,\n} from './pkce.js';\n\nimport type { AuthorizationManagerConfiguration } from './AuthorizationManager';\n\nexport type GetTokenOptions = {\n /**\n * Whether or not the URL should be replaced after processing the token.\n * @default true\n */\n shouldReplace?: boolean;\n};\n\nexport type RedirectTransportOptions = Pick<\n AuthorizationManagerConfiguration,\n 'client' | 'redirect' | 'scopes'\n> & {\n /**\n * Query parameters to include in the authorization request.\n *\n * The `RedirectTransport` will include all parameters required for a default OAuth PKCE flow, but\n * these parameters can be overridden or extended with this option.\n */\n params?: {\n [key: string]: string;\n };\n};\n\n/**\n * @private\n */\nexport const KEYS = {\n PKCE_STATE: 'pkce_state',\n PKCE_CODE_VERIFIER: 'pkce_code_verifier',\n};\n\nfunction resetPKCE() {\n sessionStorage.removeItem(KEYS.PKCE_STATE);\n sessionStorage.removeItem(KEYS.PKCE_CODE_VERIFIER);\n}\n\nexport class RedirectTransport {\n #options: RedirectTransportOptions;\n\n constructor(options: RedirectTransportOptions) {\n this.#options = options;\n if (RedirectTransport.supported === false) {\n throw new Error('RedirectTransport is not supported in this environment.');\n }\n }\n\n static supported = isSupported();\n\n /**\n * For the redirect transport, sending the request will redirect the user to the authorization endpoint, initiating the OAuth flow.\n */\n async send() {\n /**\n * Since we'll be using PKCE, we need to generate a code verifier and challenge\n * for the OAuth handshake.\n */\n const verifier = generateCodeVerifier();\n const challenge = await generateCodeChallenge(verifier);\n /**\n * If there is caller-provided `state`, use it; Otherwise, generate a state parameter.\n */\n const state = this.#options.params?.['state'] ?? generateState();\n /**\n * The verifier and state are stored in session storage so that we can validate\n * the response when we receive it.\n */\n sessionStorage.setItem(KEYS.PKCE_CODE_VERIFIER, verifier);\n sessionStorage.setItem(KEYS.PKCE_STATE, state);\n\n const params: AuthorizationRequestParameters = {\n response_type: 'code',\n client_id: this.#options.client,\n scope: this.#options.scopes || '',\n redirect_uri: this.#options.redirect,\n state,\n code_challenge: challenge,\n code_challenge_method: 'S256',\n ...(this.#options.params || {}),\n };\n\n const url = new URL(getAuthorizationEndpoint());\n url.search = new URLSearchParams(params).toString();\n\n window.location.assign(url.toString());\n }\n\n /**\n * Parse the current URL for the authorization code (`?code=...`) and exchange it for an access token when available.\n * - When the URL is processed and exchanged for an access token, the page is redirected to the current URL without the `?code=...&state=...` parameters.\n */\n async getToken(options: GetTokenOptions = { shouldReplace: true }) {\n const url = new URL(window.location.href);\n const params = new URLSearchParams(url.search);\n /**\n * Check for an error in the OAuth flow.\n * @see https://www.oauth.com/oauth2-servers/pkce/authorization-request/\n */\n if (params.get('error')) {\n throw new Error(\n params.get('error_description') || 'An error occurred during the authorization process.',\n );\n }\n\n const code = params.get('code');\n\n /**\n * If we don't have a `code` parameter, we can't exchange it for an access token.\n */\n if (!code) return undefined;\n\n /**\n * Grab the PKCE information from session storage.\n */\n const state = sessionStorage.getItem(KEYS.PKCE_STATE);\n const verifier = sessionStorage.getItem(KEYS.PKCE_CODE_VERIFIER);\n /**\n * Now that we have the values in memory, we can remove them from session storage.\n */\n resetPKCE();\n\n /**\n * Validate the `state` parameter matches the preserved state (to prevent CSRF attacks).\n */\n if (params.get('state') !== state) {\n throw new Error(\n 'Invalid State. The received \"state\" parameter does not match the expected state.',\n );\n }\n /**\n * Ensure we have a valid code verifier.\n */\n if (!verifier) {\n throw new Error('Invalid Code Verifier');\n }\n\n /**\n * Prepare the payload for the PKCE token exchange.\n */\n const payload: AuthorizationCodeExchangeParameters = {\n code,\n client_id: this.#options.client,\n /**\n * Retrieve the code verifier from session storage.\n */\n code_verifier: verifier,\n redirect_uri: this.#options.redirect,\n grant_type: 'authorization_code',\n };\n\n const response = await (\n await oauth2.token.exchange({\n payload,\n })\n ).json();\n\n if (options.shouldReplace) {\n /**\n * Remove the `code` and `state` parameters from the URL.\n */\n params.delete('code');\n params.delete('state');\n /**\n * Update the URL with the new query string.\n */\n url.search = params.toString();\n /**\n * Redirect the page to the new URL (without the `code` and `state` parameters)/\n */\n window.location.replace(url);\n }\n return response;\n }\n}\n", "import { CONFIG, isToken } from '../../services/auth/index.js';\n\nimport { SERVICES, type Service } from '../global.js';\nimport { AuthorizationManager } from './AuthorizationManager.js';\n\nimport type { Token, TokenResponse } from '../../services/auth/types.js';\n\nexport type StoredToken = Token & {\n /**\n * Tokens stored before the introduction of the `__metadata` field will be missing this property.\n * @since 4.3.0\n */\n __metadata?: {\n /**\n * The timestamp when the token was added to the storage as a number of milliseconds since the Unix epoch.\n *\n * **IMPORTANT**: This value might **not** represent the time when the token was created by the authorization server.\n */\n created: number;\n /**\n * The timestamp when the token will expire as a number of milliseconds since the Unix epoch, based\n * on the `expires_in` value from the token response and the time when the token was stored.\n */\n expires: number | null;\n };\n};\n\nexport class TokenManager {\n #manager: AuthorizationManager;\n\n constructor(options: { manager: AuthorizationManager }) {\n this.#manager = options.manager;\n }\n\n /**\n * Retrieve and parse an item from the storage.\n */\n #getTokenFromStorage(key: string) {\n const raw = this.#manager.storage.getItem(key) || 'null';\n let token: StoredToken | null = null;\n try {\n const parsed = JSON.parse(raw);\n if (isToken(parsed)) {\n token = parsed;\n }\n } catch (e) {\n // no-op\n }\n return token;\n }\n\n #getTokenForService(service: Service) {\n const resourceServer = CONFIG.RESOURCE_SERVERS?.[service];\n return this.getByResourceServer(resourceServer);\n }\n\n getByResourceServer(resourceServer: string): StoredToken | null {\n return this.#getTokenFromStorage(`${this.#manager.storageKeyPrefix}${resourceServer}`);\n }\n\n get auth(): StoredToken | null {\n return this.#getTokenForService(SERVICES.AUTH);\n }\n\n get transfer(): StoredToken | null {\n return this.#getTokenForService(SERVICES.TRANSFER);\n }\n\n get flows(): StoredToken | null {\n return this.#getTokenForService(SERVICES.FLOWS);\n }\n\n get groups(): StoredToken | null {\n return this.#getTokenForService(SERVICES.GROUPS);\n }\n\n get search(): StoredToken | null {\n return this.#getTokenForService(SERVICES.SEARCH);\n }\n\n get timer(): StoredToken | null {\n return this.#getTokenForService(SERVICES.TIMER);\n }\n\n get compute(): StoredToken | null {\n return this.#getTokenForService(SERVICES.COMPUTE);\n }\n\n gcs(endpoint: string): StoredToken | null {\n return this.getByResourceServer(endpoint);\n }\n\n getAll(): StoredToken[] {\n const entries = Object.keys(this.#manager.storage).reduce(\n (acc: (StoredToken | null)[], key) => {\n if (key.startsWith(this.#manager.storageKeyPrefix)) {\n acc.push(this.#getTokenFromStorage(key));\n }\n return acc;\n },\n [],\n );\n return entries.filter(isToken);\n }\n\n /**\n * Add a token to the storage.\n */\n add(token: Token | TokenResponse) {\n const created = Date.now();\n const expires = created + token.expires_in * 1000;\n this.#manager.storage.setItem(\n `${this.#manager.storageKeyPrefix}${token.resource_server}`,\n JSON.stringify({\n ...token,\n /**\n * Add metadata to the token to track when it was created and when it expires.\n */\n __metadata: {\n created,\n expires,\n },\n }),\n );\n if ('other_tokens' in token) {\n token.other_tokens?.forEach((t) => {\n this.add(t);\n });\n }\n }\n\n /**\n * Determines whether or not a stored token is expired.\n * @param token The token to check.\n * @param augment An optional number of milliseconds to add to the current time when checking the expiration.\n * @returns `true` if the token is expired, `false` if it is not expired, and `undefined` if the expiration status cannot be determined\n * based on the token's metadata. This can happen if the token is missing the `__metadata` field or the `expires` field.\n */\n static isTokenExpired(token: StoredToken | null, augment: number = 0): boolean | undefined {\n /* eslint-disable no-underscore-dangle */\n if (!token || !token.__metadata || typeof token.__metadata.expires !== 'number') {\n return undefined;\n }\n return Date.now() + augment >= token.__metadata.expires;\n /* eslint-enable no-underscore-dangle */\n }\n}\n", "/**\n * An in-memory implementation of the `Storage` interface.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Storage\n */\nexport class MemoryStorage implements Storage {\n #storage: Record<string, string | null> = {};\n\n getItem(key: string) {\n return this.#storage[key] !== undefined ? this.#storage[key] : null;\n }\n\n setItem(key: string, value: string) {\n this.#storage[key] = value;\n }\n\n removeItem(key: string) {\n delete this.#storage[key];\n }\n\n key(index: number) {\n return Object.keys(this.#storage)[index];\n }\n\n clear() {\n this.#storage = {};\n }\n\n get length() {\n return Object.keys(this.#storage).length;\n }\n}\n", "/**\n * @description A wrapper around the Globus Transfer service.\n * @group Service\n * @see [Globus Transfer API Documentation](https://docs.globus.org/api/transfer/)\n * @module\n */\nimport * as TRANSFER from './config.js';\n\nimport { endpointSearch } from './service/endpoint-search.js';\n\n/**\n * @private\n * @internal\n */\nexport const CONFIG = TRANSFER;\n\nexport { endpointSearch };\nexport * as fileOperations from './service/file-operations.js';\nexport * as taskSubmission from './service/task-submission.js';\nexport * as endpoint from './service/endpoint.js';\nexport * as task from './service/task.js';\nexport * as access from './service/access.js';\nexport * as collectionBookmarks from './service/collection-bookmarks.js';\n\nexport * as endpointManager from './service/endpoint-manager/index.js';\n\nexport * as utils from './utils.js';\n", "import { serviceRequest } from '../../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type { BaseServiceMethodOptions, SDKOptions } from '../../../services/types.js';\n\n/**\n * Get a list of endpoints matching the search filters in a given search scope.\n * @see https://docs.globus.org/api/transfer/endpoint_search/#endpoint_search\n */\nexport const endpointSearch = function (\n /**\n * @see https://docs.globus.org/api/transfer/endpoint_search/#query_parameters\n */\n options?: {\n /**\n * @todo This type needs to be converted to a record and this method updated\n * to `satisfies` `ServiceMethod`.\n */\n query?: Globus.Transfer.EndpointSearchQuery;\n headers?: BaseServiceMethodOptions['headers'];\n },\n sdkOptions?: SDKOptions,\n) {\n const serviceRequestOptions = {\n ...options,\n /**\n * Since the exported type used here is an `interface`, we effectivley have to\n * \"seal\" the type, otherwise the compiler will complain about potentially mismatching index types.\n */\n query: options?.query as Readonly<Globus.Transfer.EndpointSearchQuery>,\n };\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_search`,\n },\n serviceRequestOptions,\n sdkOptions,\n );\n};\n\nexport default endpointSearch;\n", "import { HTTP_METHODS, serviceRequest } from '../../shared.js';\nimport { getHeadersForService } from '../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type { Transfer } from '../types.js';\nimport type { JSONFetchResponse, ServiceMethodDynamicSegments } from '../../types.js';\n\n/**\n * @see https://docs.globus.org/api/transfer/file_operations/#file_document\n */\nexport type FileDocument = {\n readonly DATA_TYPE: 'file';\n readonly name: string;\n readonly type: 'dir' | 'file' | 'invalid_symlink' | 'chr' | 'blk' | 'pipe' | 'other';\n readonly link_target?: string | null;\n readonly size?: number;\n readonly last_modified?: string;\n readonly permissions?: string;\n readonly user?: string | null;\n readonly group?: string | null;\n readonly link_size?: number | null;\n readonly link_user?: string | null;\n readonly link_group?: string | null;\n readonly link_last_modified?: string | null;\n};\n\n/**\n * @see https://docs.globus.org/api/transfer/file_operations/#file_list_document\n */\nexport type FileListDocument = {\n readonly DATA_TYPE: 'file_list';\n readonly endpoint: string;\n readonly path: string;\n readonly absolute_path: string | null;\n readonly rename_supported: boolean;\n readonly symlink_supported: boolean;\n readonly DATA: FileDocument[];\n /**\n * n.b. This is currently included in responses, but undocumented; use with care.\n */\n readonly length: number;\n /**\n * n.b. This is currently included in responses, but undocumented; use with care.\n */\n readonly total: number;\n};\n\nexport type DirectoryListingError = {\n /**\n * @see https://docs.globus.org/api/transfer/file_operations/#errors\n */\n code:\n | 'NotSupported'\n | 'ClientError.NotFound'\n | 'EndpointError'\n // Encountered Errors (not documented)\n | 'ExternalError.DirListingFailed.LoginFailed'\n | string;\n message: string;\n request_id: string;\n resource: string;\n};\n\n/**\n * List the contents of the directory at the specified path on an endpoint\u2019s filesystem.\n * The endpoint must be activated before performing this operation.\n *\n * @see https://docs.globus.org/api/transfer/file_operations/#list_directory_contents\n */\nexport const ls = function (\n endpoint_xid,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<FileListDocument | DirectoryListingError>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/operation/endpoint/${endpoint_xid}/ls`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['DirectoryListingQuery'];\n }\n>;\n\n/**\n * Create a directory at the specified path on an endpoint filesystem.\n * The endpoint must be activated before performing this operation.\n *\n * @see https://docs.globus.org/api/transfer/file_operations/#make_directory\n */\nexport const mkdir = function (endpoint_xid, options, sdkOptions?) {\n const serviceRequestOptions = {\n payload: {\n DATA_TYPE: 'mkdir',\n ...options?.payload,\n },\n headers: {\n ...getHeadersForService(HTTP_METHODS.POST),\n ...options?.headers,\n },\n };\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/operation/endpoint/${endpoint_xid}/mkdir`,\n method: HTTP_METHODS.POST,\n },\n serviceRequestOptions,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n payload: Omit<Transfer['Request']['Mkdir'], 'DATA_TYPE'>;\n }\n>;\n\n/**\n * Rename or move a file, directory, or symlink on an endpoint filesystem.\n * If the object is a symlink, the symlink itself is renamed, not its target\n * The endpoint must be activated before performing this operation.\n * When moving to a different parent directory, the parent directory of the new path must already exist.\n *\n * @see https://docs.globus.org/api/transfer/file_operations/#rename\n */\nexport const rename = function (endpoint_xid, options, sdkOptions?) {\n const serviceRequestOptions = {\n payload: {\n DATA_TYPE: 'rename',\n ...options?.payload,\n },\n headers: {\n ...getHeadersForService(HTTP_METHODS.POST),\n ...options?.headers,\n },\n };\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/operation/endpoint/${endpoint_xid}/rename`,\n method: HTTP_METHODS.POST,\n },\n serviceRequestOptions,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n payload: Omit<Transfer['Request']['Rename'], 'DATA_TYPE'>;\n }\n>;\n\n/**\n * Create a directory at the specified path on an endpoint filesystem.\n * The endpoint must be activated before performing this operation.\n *\n * @see https://docs.globus.org/api/transfer/file_operations/#symlink\n */\nexport const symlink = function (endpoint_xid, options, sdkOptions?) {\n const serviceRequestOptions = {\n payload: {\n DATA_TYPE: 'symlink',\n ...options?.payload,\n },\n headers: {\n ...getHeadersForService(HTTP_METHODS.POST),\n ...options?.headers,\n },\n };\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/operation/endpoint/${endpoint_xid}/symlink`,\n method: HTTP_METHODS.POST,\n },\n serviceRequestOptions,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n payload: Omit<Transfer['Request']['Symlink'], 'DATA_TYPE'>;\n }\n>;\n\n/**\n * Stat the file or directory at the specified path on a collection.\n *\n * @see https://docs.globus.org/api/transfer/file_operations/#stat\n */\nexport const stat = function (\n endpoint_xid,\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<FileDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/operation/endpoint/${endpoint_xid}/stat`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: {\n path: string;\n local_user?: string;\n };\n }\n>;\n", "import { HTTP_METHODS } from '../shared.js';\n\nexport function getHeadersForService(method: keyof typeof HTTP_METHODS): Record<string, any> {\n if (method === HTTP_METHODS.GET) {\n return {};\n }\n return {\n 'Content-Type': 'application/json',\n };\n}\n", "import { HTTP_METHODS, serviceRequest } from '../../shared.js';\n\nimport { getHeadersForService } from '../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type { Transfer } from '../types.js';\nimport type { JSONFetchResponse, SDKOptions, ServiceMethod } from '../../types.js';\n\ntype TaskLink = {\n DATA_TYPE: 'link';\n href: string;\n rel: string;\n resource: string;\n title: string;\n};\n\ninterface TaskSubmissionResult {\n DATA_TYPE: string;\n resource: string;\n /**\n * @see https://docs.globus.org/api/transfer/task_submit/#result_codes\n */\n code: 'Accpeted' | 'Duplicate';\n message: string;\n request_id: string;\n submission_id: string;\n task_id: string;\n /**\n * @deprecated Undocumented property.\n */\n task_link: TaskLink;\n}\n\nexport type TransferResult = TaskSubmissionResult & {\n DATA_TYPE: 'transfer_result';\n resource: '/transfer';\n};\n\nexport type DeleteResult = {\n DATA_TYPE: 'delete_result';\n resource: '/delete';\n} & TaskSubmissionResult;\n\ntype UndocumentedEncouneredErrorCodes = 'EndpointNotFound' | string;\n\ntype TaskSubmissionError = {\n /**\n * Known error codes provided by the Transfer documentation.\n *\n * Since the documentation does not provide an exhaustive list of error codes,\n * we also include a catch-all type (`string`) for any undocumented error codes.\n *\n * @see https://docs.globus.org/api/transfer/task_submit/#errors\n */\n code:\n | 'ClientError.BadRequest'\n | 'BadRequest'\n | 'PermissionDenied'\n | 'ConsentRequired'\n | 'ServiceUnavailable'\n | 'Conflict'\n | UndocumentedEncouneredErrorCodes;\n message: string;\n request_id: string;\n resource: string;\n};\n\nexport type TransferError = TaskSubmissionError & {\n resource: '/transfer';\n};\n\nexport type DeleteError = TaskSubmissionError & {\n resource: '/delete';\n};\n\n/**\n * Submit a delete task. A delete submission contains a single endpoint and a\n * list of paths to delete.\n *\n * @see https://docs.globus.org/api/transfer/task_submit/#submit_delete_task\n */\nexport const submitDelete = function (\n options,\n sdkOptions?: SDKOptions,\n): Promise<JSONFetchResponse<DeleteResult | DeleteError>> {\n const serviceRequestOptions = {\n payload: {\n DATA_TYPE: 'delete',\n ...options?.payload,\n },\n headers: {\n ...getHeadersForService(HTTP_METHODS.POST),\n ...options?.headers,\n },\n };\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/delete`,\n method: HTTP_METHODS.POST,\n },\n serviceRequestOptions,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: Omit<Transfer['Request']['Delete'], 'DATA_TYPE'>;\n}>;\n\n/**\n * @see https://docs.globus.org/api/transfer/task_submit/#submit_transfer_task\n */\nexport const submitTransfer = function (\n options,\n sdkOptions?: SDKOptions,\n): Promise<JSONFetchResponse<TransferResult | TransferError>> {\n const serviceRequestOptions = {\n payload: {\n DATA_TYPE: 'transfer',\n ...options?.payload,\n },\n headers: {\n ...getHeadersForService(HTTP_METHODS.POST),\n ...options?.headers,\n },\n };\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/transfer`,\n method: HTTP_METHODS.POST,\n },\n serviceRequestOptions,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: Omit<Transfer['Request']['Transfer'], 'DATA_TYPE'>;\n}>;\n\ntype SubmissionId = {\n DATA_TYPE: 'submission_id';\n value: string;\n};\n\n/**\n * Get a submission id, required when submitting transfer and delete tasks.\n * Note that this is different than the task id returned by the submit operations.\n *\n * @see https://docs.globus.org/api/transfer/task_submit/#get_submission_id\n */\nexport const submissionId = function (\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<SubmissionId>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/submission_id`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: never;\n payload?: never;\n}>;\n", "import { HTTP_METHODS, serviceRequest } from '../../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type {\n ServiceMethodDynamicSegments,\n JSONFetchResponse,\n ServiceMethod,\n} from '../../../services/types.js';\nimport type { Operations } from '../types.js';\n\nexport type GetResponse = Operations['GetEndpoint']['response'];\n/**\n * Fetch an endpoint by its UUID.\n */\nexport const get = function (\n endpoint_xid,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<GetResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint/${endpoint_xid}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\nexport type CreatePayload = Operations['CreateEndpoint']['payload'];\nexport type CreateResponse = Operations['CreateEndpoint']['response'];\n/**\n * Create a Globus Connect Personal guest collection.\n * As of 2024-04-17, this method (and the Transfer API) only supports creating Globus Connect Personal guest collections.\n *\n * Globus Connect Personal mapped collections are created from the Globus Connect Personal application.\n * All GCSv5 collections should be created using Globus Connect Server (i.e. {@link \"@globus/sdk\".gcs.collections.create | `gcs.collections.create`}).\n *\n * @see https://docs.globus.org/api/transfer/gcp_management/#create_guest_collection\n */\nexport const create = function (options?, sdkOptions?): Promise<JSONFetchResponse<CreateResponse>> {\n if (options?.payload) {\n Object.assign(options.payload, { DATA_TYPE: 'shared_endpoint' });\n }\n\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: '/v0.10/shared_endpoint',\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload?: CreatePayload;\n}>;\n\nexport type UpdatePayload = Operations['UpdateEndpoint']['payload'];\nexport type UpdateResponse = Operations['UpdateEndpoint']['response'];\n/**\n * Update a Globus Connect Personal collection.\n * As of 2024-04-17, this method (and the Transfer API) only supports updating Globus Connect Personal collections.\n *\n * All GCSv5 collections should be updated using Globus Connect Server (i.e. {@link \"@globus/sdk\".gcs.collections.update | `gcs.collections.update`}).\n *\n * @see https://docs.globus.org/api/transfer/gcp_management/#update_collection_by_id\n */\nexport const update = function (\n endpoint_xid,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<UpdateResponse>> {\n if (options?.payload) {\n Object.assign(options.payload, { DATA_TYPE: 'endpoint' });\n }\n\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint/${endpoint_xid}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n payload: UpdatePayload;\n query?: never;\n }\n>;\n\nexport type RemoveResponse = Operations['RemoveEndpoint']['response'];\n/**\n * Delete a Globus Connect Personal entity by its UUID.\n * As of 2024-01-08, this method (and the Transfer API) only supports deleting Globus Connect Personal entities.\n *\n * All GCSv5 endpoints and collections should be deleted (and managed) using Globus Connect Server (i.e. {@link \"@globus/sdk\".gcs.collections.remove | `gcs.collections.remove`}).\n *\n * @see https://docs.globus.org/api/transfer/gcp_management/#delete_endpoint_by_id\n */\nexport const remove = function (\n endpoint_xid,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<RemoveResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint/${endpoint_xid}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n", "import { HTTP_METHODS, serviceRequest } from '../../shared.js';\n\nimport { ID, SCOPES } from '../config.js';\n\nimport type {\n ServiceMethod,\n ServiceMethodDynamicSegments,\n JSONFetchResponse,\n} from '../../../services/types.js';\n\nimport type { Transfer } from '../types.js';\n\n/**\n * Get a list of tasks submitted by the current user.\n * @see https://docs.globus.org/api/transfer/task/#get_task_list\n */\nexport const getAll = function (\n options = {},\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n {\n DATA_TYPE: 'task_list';\n DATA: Globus.Transfer.TaskDocument[];\n } & Transfer['Paging']['Offset']['Response']\n >\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: Transfer['Paging']['Offset']['Query'];\n headers?: Record<string, string>;\n payload?: never;\n}>;\n\n/**\n * Fetch a task by its UUID.\n * @see https://docs.globus.org/api/transfer/task/#get_task_by_id\n */\nexport const get = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.TaskDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task/${task_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/task/#update_task_by_id\n */\nexport const update = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<{\n DATA_TYPE: 'result';\n code: 'Updated';\n message: string;\n request_id: string;\n resource: `/task/${string}/cancel`;\n }>\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task/${task_id}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload: Record<string, string>;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/task/#cancel_task_by_id\n */\nexport const cancel = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.TaskDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task/${task_id}/cancel`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/task/#remove_task_by_id\n */\nexport const remove = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.TaskDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task/${task_id}/remove`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/task/#get_event_list\n */\nexport const getEventList = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.TaskEventListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task/${task_id}/event_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Offset']['Query'];\n headers?: Record<string, string>;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/task/#get_task_successful_transfers\n */\nexport const getSuccessfulTransfers = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.SuccessfulTransfersListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task/${task_id}/successful_transfers`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Marker']['Query'];\n headers?: Record<string, string>;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/task/#get_task_skipped_errors\n */\nexport const getSkippedErrors = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.SkippedErrorsListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task/${task_id}/skipped_errors`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Marker']['Query'];\n headers?: Record<string, string>;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/task/#get_task_pause_info\n */\nexport const getPauseInfo = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.PauseInfoLimitedDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task/${task_id}/pause_info`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n headers?: Record<string, string>;\n payload?: never;\n }\n>;\n", "import { HTTP_METHODS, serviceRequest } from '../../shared.js';\nimport { ID, SCOPES } from '../config.js';\nimport { Transfer } from '../types.js';\n\nimport type { ServiceMethodDynamicSegments, JSONFetchResponse } from '../../../services/types.js';\n\n/**\n * @see https://docs.globus.org/api/transfer/acl/#rest_access_get_list\n */\nexport const getAll = function (\n endpoint_xid,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.AccessListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint/${endpoint_xid}/access_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Offset']['Query'];\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/acl/#rest_access_create\n */\nexport const create = function (\n endpoint_xid,\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.AccessDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint/${endpoint_xid}/access`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n payload: Partial<Globus.Transfer.AccessDocument>;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/acl/#get_access_rule_by_id\n */\nexport const get = function (\n { endpoint_xid, id },\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.AccessDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint/${endpoint_xid}/access/${id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n { endpoint_xid: string; id: string },\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/acl/#update_access_rule\n */\nexport const update = function (\n { endpoint_xid, id },\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<{\n DATA_TYPE: 'result';\n code: 'Updated';\n message: string;\n request_id: string;\n resource: `/endpoint/${string}/access/${string}`;\n }>\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint/${endpoint_xid}/access/${id}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n { endpoint_xid: string; id: string },\n {\n query?: never;\n payload: Partial<Globus.Transfer.AccessDocument>;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/acl/#delete_access_rule\n */\nexport const remove = function (\n { endpoint_xid, id },\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<{\n DATA_TYPE: 'result';\n code: 'Deleted';\n message: string;\n request_id: string;\n resource: `/endpoint/${string}/access/${string}`;\n }>\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint/${endpoint_xid}/access/${id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n { endpoint_xid: string; id: string },\n {\n query?: never;\n payload?: never;\n }\n>;\n", "import { HTTP_METHODS, serviceRequest } from '../../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type {\n ServiceMethodDynamicSegments,\n JSONFetchResponse,\n ServiceMethod,\n} from '../../types.js';\n\n/**\n * @see https://docs.globus.org/api/transfer/collection_bookmarks/#get_list_of_bookmarks\n */\nexport const getAll = function (\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.BookmarkListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/bookmark_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: never;\n payload?: never;\n}>;\n\n/**\n * @see https://docs.globus.org/api/transfer/collection_bookmarks/#create_bookmark\n */\nexport const create = function (\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.BookmarkDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/bookmark`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: Partial<Globus.Transfer.BookmarkDocument>;\n}>;\n\n/**\n * @see https://docs.globus.org/api/transfer/collection_bookmarks/#get_bookmark_by_id\n */\nexport const get = function (\n bookmark_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.BookmarkDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/bookmark/${bookmark_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/collection_bookmarks/#update_bookmark\n */\nexport const update = function (\n bookmark_id,\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.BookmarkDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/bookmark/${bookmark_id}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload: Partial<Globus.Transfer.BookmarkDocument> & { name: string };\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/collection_bookmarks/#delete_bookmark_by_id\n */\nexport const remove = function (\n bookmark_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<{\n DATA_TYPE: 'result';\n code: 'Deleted';\n message: string;\n resource: `/bookmark/${string}`;\n request_id: string;\n }>\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/bookmark/${bookmark_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n", "export * as endpoint from './endpoint.js';\nexport * as pauseRule from './pause-rule.js';\nexport * as task from './task.js';\n", "import { serviceRequest } from '../../../shared.js';\nimport { ID, SCOPES } from '../../config.js';\n\nimport type {\n ServiceMethodDynamicSegments,\n JSONFetchResponse,\n ServiceMethod,\n} from '../../../../services/types.js';\n\nimport type { Transfer } from '../../types.js';\n\n/**\n * Fetch an endpoint by its UUID as an administrator.\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#mc_get_endpoint\n */\nexport const get = function (\n endpoint_xid,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.EndpointDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/endpoint/${endpoint_xid}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_hosted_endpoint_list\n */\nexport const getHostedEndpoints = function (\n endpoint_xid,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.EndpointListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/endpoint/${endpoint_xid}/hosted_endpoint_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Offset']['Query'];\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_task_events\n */\nexport const getAccessList = function (\n endpoint_xid,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.AccessListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/endpoint/${endpoint_xid}/access_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Offset']['Query'];\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_monitored_endpoints\n */\nexport const getMonitoredEndpoints = function (\n options = {},\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n Omit<Globus.Transfer.EndpointListDocument, 'DATA_TYPE'> & { DATA_TYPE: 'monitored_endpoints' }\n >\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/monitored_endpoints`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: Transfer['Paging']['Offset']['Query'];\n payload?: never;\n}>;\n", "import { HTTP_METHODS, serviceRequest } from '../../../shared.js';\n\nimport { ID, SCOPES } from '../../config.js';\n\nimport type {\n ServiceMethod,\n ServiceMethodDynamicSegments,\n JSONFetchResponse,\n} from '../../../../services/types.js';\n\n/**\n * Get a list of pause rules on endpoints that the current user has the \"activity_monitor\" role on.\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_pause_rules\n */\nexport const getAll = function (\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<{\n DATA_TYPE: 'pause_rule_list';\n DATA: Globus.Transfer.PauseRuleDocument[];\n }>\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/pause_rule_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: { filter_endpoint?: string; filter_host_endpoint?: string };\n payload?: never;\n}>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#create_pause_rule\n */\nexport const create = function (\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.PauseRuleDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/pause_rule`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: Partial<Globus.Transfer.PauseRuleDocument>;\n}>;\n\n/**\n * Fetch a pause_rule by its UUID.\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_pause_rule\n */\nexport const get = function (\n pause_rule_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.PauseRuleDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/pause_rule/${pause_rule_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#update_pause_rule\n */\nexport const update = function (\n pause_rule_id,\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.PauseRuleDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/pause_rule/${pause_rule_id}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload: Partial<Globus.Transfer.PauseRuleDocument>;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#delete_pause_rule\n */\nexport const remove = function (\n pause_rule_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<{\n DATA_TYPE: 'result';\n code: 'Deleted';\n message: string;\n request_id: string;\n resource: string;\n }>\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/pause_rule/${pause_rule_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n", "import { HTTP_METHODS, serviceRequest } from '../../../shared.js';\nimport { ID, SCOPES } from '../../config.js';\n\nimport type {\n ServiceMethod,\n ServiceMethodDynamicSegments,\n JSONFetchResponse,\n} from '../../../../services/types.js';\n\nimport type { Transfer } from '../../types.js';\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_tasks\n */\nexport const getAll = function (\n options = {},\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n {\n DATA_TYPE: 'task_list';\n DATA: Globus.Transfer.EndpointManagerTaskDocument[];\n } & Transfer['Paging']['LastKey']['Response']\n >\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/task_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: Globus.Transfer.AdminTaskQuery;\n payload?: never;\n}>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_task\n */\nexport const get = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.EndpointManagerTaskDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/task/${task_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#admin_cancel\n */\nexport const cancel = function (\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.AdminCancelDocumentResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/admin_cancel`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: never;\n payload: Globus.Transfer.AdminCancelDocument;\n}>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_cancel_status_by_id\n */\nexport const getAdminCancel = function (\n admin_cancel_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.AdminCancelDocumentResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/admin_cancel/${admin_cancel_id}`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_task_events\n */\nexport const getEventList = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.TaskEventListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/task/${task_id}/event_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Offset']['Query'] & { filter_is_error?: 1 };\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_task_successful_transfers_as_admin\n */\nexport const getSuccessfulTransfers = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.SuccessfulTransfersListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/task/${task_id}/successful_transfers`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Marker']['Query'];\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_task_skipped_errors_transfers_as_admin\n */\nexport const getSkippedErrors = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.SkippedErrorsListDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/task/${task_id}/skipped_errors`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: Transfer['Paging']['Marker']['Query'];\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#pause_tasks_as_admin\n */\nexport const pause = function (\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.AdminPauseDocumentResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/admin_pause`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: never;\n payload?: Globus.Transfer.AdminPauseDocument;\n}>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#resume_tasks_as_admin\n */\nexport const resume = function (\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.AdminResumeDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/admin_resume`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: never;\n payload?: Globus.Transfer.AdminResumeDocument;\n}>;\n\n/**\n * @see https://docs.globus.org/api/transfer/advanced_endpoint_management/#get_task_pause_info_as_admin\n */\nexport const getPauseInfo = function (\n task_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<Globus.Transfer.PauseInfoLimitedDocument>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v0.10/endpoint_manager/task/${task_id}/pause_info`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n", "import type { FileDocument } from './service/file-operations.js';\n\n/**\n * Determines if the given entry is a Globus Transfer File Document.\n * @see https://docs.globus.org/api/transfer/file_operations/#file_document\n */\nexport function isFileDocument(entry: unknown): entry is FileDocument {\n return (\n typeof entry === 'object' &&\n entry !== null &&\n 'DATA_TYPE' in entry &&\n entry.DATA_TYPE === 'file'\n );\n}\n/**\n * Determines if the given entry is a directory.\n * @see https://docs.globus.org/api/transfer/file_operations/#file_document\n */\nexport function isDirectory(entry: unknown) {\n return isFileDocument(entry) && entry.type === 'dir';\n}\n\nconst KB = 1000;\nconst MB = KB * 1000;\nconst GB = MB * 1000;\nconst TB = GB * 1000;\nconst PB = TB * 1000;\n/**\n * Returns a readable string for the given bytes, **rounded and truncated** to the given number of decimal places.\n * @param bytes The number of bytes to convert to a readable string.\n * @param [truncate=2] The number of decimal places to truncate the result to.\n */\nexport function readableBytes(bytes: number, truncate = 2) {\n let unit = 'B';\n let bytesInUnit = 1;\n if (bytes < KB) {\n return `${bytes} ${unit}`;\n }\n if (bytes < MB) {\n unit = 'KB';\n bytesInUnit = KB;\n } else if (bytes < GB) {\n unit = 'MB';\n bytesInUnit = MB;\n } else if (bytes < TB) {\n unit = 'GB';\n bytesInUnit = GB;\n } else if (bytes < PB) {\n unit = 'TB';\n bytesInUnit = TB;\n } else {\n unit = 'PB';\n bytesInUnit = PB;\n }\n const value = bytes / bytesInUnit;\n const [int, dec] = `${value}`.split('.');\n let rendered = `${int}`;\n if (dec && dec.length) {\n const truncated = dec.slice(0, truncate);\n if (truncated.length) {\n rendered = `${int}.${truncated}`;\n }\n }\n return `${rendered} ${unit}`;\n}\n\n/**\n * Known Globus DNS domains.\n */\nconst GLOBUS_DNS_DOMAINS = ['dnsteam.globuscs.info', 'data.globus.org', 'dn.glob.us'];\n\n/**\n * Returns DNS domain, if any, for a collection or endpoint.\n *\n * - Custom domains will be displayed without any auto-generated wildcard subdomains.\n * - Globus domains will include the auto-generated section to make them identifiable.\n *\n * @param endpoint The endpoint to extract the domain from. While any object will be parsed, this function is intended for use with [Globus Transfer Endpoint or Collection Documents](https://docs.globus.org/api/transfer/endpoints_and_collections/#endpoint_or_collection_document).\n * @see https://docs.globus.org/globus-connect-server/v5.4/domain-guide/#custom_domains_new_in_v_5_4_13\n */\nexport function getDomainFromEndpoint(endpoint: Record<string, unknown>) {\n const { tlsftp_server: tls } = endpoint;\n if (!tls || typeof tls !== 'string') {\n return null;\n }\n /**\n * Swap the protocol to `https` so we can use the URL API to extract the hostname.\n */\n const { hostname } = new URL(tls.replace('tlsftp', 'https'));\n const hasCustomDomain = !GLOBUS_DNS_DOMAINS.find((d) => hostname.endsWith(d));\n const customDomain = hasCustomDomain && /(?:[gm]-\\w{6}.)?(\\w+(\\.\\w+)+)$/.exec(hostname)?.[1];\n\n return customDomain || hostname || null;\n}\n", "/**\n * @description A wrapper around the Globus Search service.\n * @group Service\n * @see [Globus Search API Documentation](https://docs.globus.org/api/search/reference/)\n * @module\n */\nimport * as SEARCH from './config.js';\n\n/**\n * @private\n * @internal\n */\nexport const CONFIG = SEARCH;\n\nexport * as query from './service/query.js';\nexport * as subject from './service/subject.js';\nexport * as entry from './service/entry.js';\nexport * as index from './service/search-index.js';\n", "import { HTTP_METHODS, serviceRequest } from '../../shared.js';\n\nimport type { JSONFetchResponse, ServiceMethodDynamicSegments } from '../../types.js';\n\nimport { ID, SCOPES } from '../config.js';\nimport { ResultFormatVersion } from '../types.js';\n\nexport type MatchedPrincipalSets = string[];\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gmetaresult\n */\nexport type GMetaResult = {\n subject: string;\n entries: {\n entry_id: string;\n content: Record<string, unknown>;\n matched_principal_sets: MatchedPrincipalSets;\n }[];\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gfacetresult\n */\nexport type GFacetResult = {\n name: string;\n value?: string;\n buckets?: GBucket[];\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gbucket\n */\nexport type GBucket = {\n value: string | GFilter;\n count: number;\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gsearchresult\n */\nexport type GSearchResult = {\n gmeta: GMetaResult[];\n facet_results?: GFacetResult[];\n offset: number;\n count: number;\n total: number;\n has_next_page: boolean;\n};\n\n/**\n * @param index_id The UUID of the index to query.\n *\n * @see https://docs.globus.org/api/search/reference/get_query/\n */\nexport const get = function (\n index_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<GSearchResult>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.SEARCH,\n path: `/v1/index/${index_id}/search`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n /**\n * @see https://docs.globus.org/api/search/reference/get_query/#parameters\n */\n query?: {\n q: string;\n offset?: `${number}` | number;\n limit?: `${number}` | number;\n advanced?: 'true' | 'false';\n bypass_visible_to?: 'true' | 'false';\n result_format_version?: string;\n filter_principal_sets?: string;\n };\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gsearchrequest\n */\nexport type GSearchRequest = {\n q: string;\n offset?: number;\n limit?: number;\n advanced?: boolean;\n bypass_visible_to?: boolean;\n result_format_version?: ResultFormatVersion;\n filter_principal_sets?: string[];\n filters?: GFilter[];\n facets?: GFacet[];\n boosts?: GBoost[];\n sort?: GSort[];\n};\n\n/**\n * @param index_id The UUID of the index to query.\n *\n * @see https://docs.globus.org/api/search/reference/post_query/\n */\nexport const post = function (\n index_id,\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<GSearchResult>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.SEARCH,\n path: `/v1/index/${index_id}/search`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n payload: GSearchRequest;\n }\n>;\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gfilter\n */\nexport type GFilter = GFilterMatch | GFilterRange | GFilterExists | GFilterNot;\n\ntype GFilterTypeMatch = 'match_any' | 'match_all';\ntype GFilterTypeRange = 'range';\n\ntype GFilterMatch = {\n type: GFilterTypeMatch;\n field_name: string;\n values: Array<string>;\n};\ntype GFilterRange = {\n type: GFilterTypeRange;\n field_name: string;\n values: Array<{ from: string; to: string }>;\n};\ntype GFilterExists = {\n type: 'exists';\n field_name: string;\n};\ntype GFilterNot = {\n type: 'not';\n filter: GFilter;\n};\n\ntype HistogramRange = { low: number | string; high: number | string };\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gfacet\n */\nexport type GFacet = {\n name: string;\n field_name: string;\n} & (\n | {\n type: 'terms';\n }\n | {\n type: 'sum' | 'avg';\n missing?: number;\n }\n | {\n type: 'date_histogram';\n date_interval: DateInterval;\n histogram_range?: HistogramRange;\n }\n | {\n type: 'numeric_histogram';\n size: string;\n interval: number;\n histogram_range: HistogramRange;\n }\n);\n\ntype DateInterval = 'year' | 'quarter' | 'month' | 'week' | 'day' | 'hour' | 'minute' | 'second';\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gboost\n */\nexport type GBoost = {\n field_name: string;\n factor: number;\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/post_query/#gsort\n */\nexport type GSort = {\n field_name: string;\n order: 'asc' | 'desc';\n};\n", "import { serviceRequest } from '../../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type { ServiceMethodDynamicSegments } from '../../types.js';\nimport type { ResultFormatVersion } from '../types.js';\n\n/**\n * Lookup a single Subject in a Search Index.\n * @param index_id The UUID of the Search index where the lookup will be performed.\n *\n * @see https://docs.globus.org/api/search/reference/get_subject/\n */\nexport const get = function (index_id, options?, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.SEARCH,\n path: `/v1/index/${index_id}/subject`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n /**\n * @see https://docs.globus.org/api/search/reference/get_subject/#parameters\n */\n query: {\n subject: string;\n result_format_version?: ResultFormatVersion | string;\n bypass_visible_to?: 'true' | 'false';\n };\n }\n>;\n", "import { serviceRequest } from '../../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type { ResultFormatVersion } from '../types.js';\nimport type { ServiceMethodDynamicSegments } from '../../types.js';\n\n/**\n * Lookup a single Entry in a Search Index.\n * @param index_id The UUID of the Search index where the lookup will be performed.\n *\n * @see https://docs.globus.org/api/search/reference/get_entry/\n */\nexport const get = function (index_id, options?, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.SEARCH,\n path: `/v1/index/${index_id}/entry`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n /**\n * @see https://docs.globus.org/api/search/reference/get_entry/#parameters\n */\n query: {\n subject: string;\n entry_id?: string;\n result_format_version?: ResultFormatVersion | string;\n bypass_visible_to?: 'true' | 'false';\n };\n }\n>;\n", "import { HTTP_METHODS, serviceRequest } from '../../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type {\n JSONFetchResponse,\n ServiceMethod,\n ServiceMethodDynamicSegments,\n} from '../../types.js';\n\n/**\n * @see https://docs.globus.org/api/search/reference/index_list/#indexwithpermissions\n */\nexport type IndexWithPermissions = GSearchIndex & {\n permissions: string[];\n};\n\nexport type GSearchIndex = {\n display_name: string;\n id: string;\n description: string;\n creation_date: string;\n is_trial: boolean;\n subscription_id: string;\n max_size_in_mb: number;\n size_in_mb: number;\n num_subjects: number;\n num_entries: number;\n status: 'open' | 'delete-pending' | string;\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/index_list/#indexlist\n */\nexport type IndexList = {\n index_list: IndexWithPermissions[];\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/index_show/\n */\nexport const get = function (\n index_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<GSearchIndex>> {\n return serviceRequest(\n {\n service: ID,\n // scope: SCOPES.ALL,\n path: `/v1/index/${index_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<string, {}>;\n\n/**\n * @see https://docs.globus.org/api/search/reference/index_list/\n */\nexport const getAll = function (options?, sdkOptions?): Promise<JSONFetchResponse<IndexList>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v1/index_list`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{}>;\n\ntype IndexCreate = {\n display_name: string;\n description: string;\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/index_create/\n */\nexport const create = function (options, sdkOptions?): Promise<JSONFetchResponse<GSearchIndex>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v1/index`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: IndexCreate;\n}>;\n\ntype IndexDeleteResponse = {\n index_id: string;\n acknowledged: boolean;\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/index_delete/\n */\nexport const remove = function (\n index_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<IndexDeleteResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v1/index/${index_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\ntype IndexReopenResponse = {\n index_id: string;\n acknowledged: boolean;\n};\n\n/**\n * @see https://docs.globus.org/api/search/reference/index_reopen/\n */\nexport const reopen = function (\n index_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<IndexReopenResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v1/index/${index_id}/reopen`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\ntype IngestResponse = {\n task_id: string;\n as_identity: string;\n success: boolean;\n num_documents_ingested: number;\n};\n\n/**\n * A mapping from field names (dotted) to the types for those fields. Currently only supports `geo_point` and `geo_shape` as types.\n */\ntype FieldMapping = Record<string, 'geo_point' | 'geo_shape' | string>;\n\n/**\n * A `GIngest` document is a wrapper around a {@link GMetaList} or {@link GMetaEntry} which supplies attributes relevant to the ingest and indexing of metadata into the Globus Search service.\n * @see https://docs.globus.org/api/search/reference/ingest/#gingest\n */\nexport type GIngest =\n | {\n ingest_type: string;\n ingest_data: Record<string, unknown>;\n field_mapping?: FieldMapping;\n }\n | {\n ingest_type: 'GMetaList';\n ingest_data: GMetaList;\n field_mapping?: FieldMapping;\n }\n | {\n ingest_type: 'GMetaEntry';\n ingest_data: GMetaEntry;\n field_mapping?: FieldMapping;\n };\n\n/**\n * A GMetaList is a collection of {@link GMetaEntry} documents.\n * @see https://docs.globus.org/api/search/reference/ingest/#gmetalist\n */\nexport type GMetaList = {\n gmeta: GMetaEntry[];\n};\n\n/**\n * A GMetaEntry is a single block of data pertaining to a given subject.\n * @see https://docs.globus.org/api/search/reference/ingest/#gmetaentry\n */\nexport type GMetaEntry = {\n id?: string;\n subject: string;\n visible_to: 'public' | 'all_authenticated_users' | string;\n principal_sets: Record<string, unknown>;\n content: Record<string, unknown>;\n};\n\nexport const ingest = function (\n index_id,\n options?,\n sdkOptions?,\n): Promise<JSONFetchResponse<IngestResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v1/index/${index_id}/ingest`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n payload: GIngest;\n }\n>;\n", "/**\n * @description A wrapper around the Groups API.\n * @group Service\n * @see [Groups API Documentation](https://docs.globus.org/api/groups/)\n * @module\n */\n\nimport * as GROUPS from './config.js';\n\n/**\n * @private\n * @internal\n */\nexport const CONFIG = GROUPS;\n\n/**\n * Service methods for the Groups API.\n */\nexport * as groups from './service/groups.js';\nexport * as policies from './service/policies.js';\nexport * as membership from './service/membership.js';\n", "import type { operations, components } from '@globus/types/groups';\nimport { ID, SCOPES } from '../config.js';\nimport { serviceRequest } from '../../shared.js';\n\nimport type {\n JSONFetchResponse,\n ServiceMethod,\n ServiceMethodDynamicSegments,\n} from '../../types.js';\n\n/**\n * @see https://groups.api.globus.org/redoc#tag/groups/operation/get_my_groups_and_memberships_v2_groups_my_groups_get\n */\nexport const getMyGroups = function (\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['get_my_groups_and_memberships_v2_groups_my_groups_get']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n scope: SCOPES.ALL,\n path: `/v2/groups/my_groups`,\n service: ID,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: {\n /**\n * @todo This should probably be replaced with a more specific type for the method's accepted query parameters once available.\n */\n statuses?: components['schemas']['StatusEnum'][];\n };\n}>;\n\n/**\n * @see https://groups.api.globus.org/redoc#tag/groups/operation/get_group_v2_groups__group_id__get\n */\nexport const get = function (\n group_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['get_group_v2_groups__group_id__get']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v2/groups/${group_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n operations['get_group_v2_groups__group_id__get']['parameters']['path']['group_id'],\n {\n query?: operations['get_group_v2_groups__group_id__get']['parameters']['query'];\n }\n>;\n", "import type { operations } from '@globus/types/groups';\nimport { ID, SCOPES } from '../config.js';\nimport { serviceRequest } from '../../shared.js';\n\nimport type { JSONFetchResponse, ServiceMethodDynamicSegments } from '../../types.js';\n\n/**\n * @see https://groups.api.globus.org/redoc#tag/groups/operation/get_policies_v2_groups__group_id__policies_get\n */\nexport const get = function (\n group_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['get_policies_v2_groups__group_id__policies_get']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n scope: SCOPES.ALL,\n path: `/v2/groups/${group_id}/policies`,\n service: ID,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n operations['get_policies_v2_groups__group_id__policies_get']['parameters']['path']['group_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n", "import type { operations } from '@globus/types/groups';\nimport { ID, SCOPES } from '../config.js';\nimport { HTTP_METHODS, serviceRequest } from '../../shared.js';\n\nimport type { JSONFetchResponse, ServiceMethodDynamicSegments } from '../../types.js';\n\n/**\n * Perform actions on members of the group.\n * @see https://groups.api.globus.org/redoc#tag/groups/operation/group_membership_post_actions_v2_groups__group_id__post\n */\nexport const act = function (\n group_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['group_membership_post_actions_v2_groups__group_id__post']['responses']['200']['content']['application/json']\n >\n> {\n if (!options?.payload) throw new Error('payload is required.');\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v2/groups/${group_id}`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n operations['update_group_v2_groups__group_id__put']['parameters']['path']['group_id'],\n {\n payload: operations['group_membership_post_actions_v2_groups__group_id__post']['requestBody']['content']['application/json'];\n }\n>;\n", "/**\n * @description A wrapper around the Globus Flows service.\n * @group Service\n * @see [Globus Flows API Documentation](https://docs.globus.org/api/flows/)\n * @module\n */\nimport * as FLOWS from './config.js';\n\n/**\n * @private\n * @internal\n */\nexport const CONFIG = FLOWS;\n\nexport * as flows from './service/flows.js';\nexport * as runs from './service/runs.js';\n", "import { ID, SCOPES } from '../config.js';\nimport { HTTP_METHODS, serviceRequest } from '../../../services/shared.js';\nimport type {\n JSONFetchResponse,\n ServiceMethod,\n ServiceMethodDynamicSegments,\n} from '../../types.js';\n\n/**\n * @see https://globusonline.github.io/globus-flows/#tag/Flows/paths/~1flows/get\n */\nexport const getAll = function (options?, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.VIEW_FLOWS,\n path: `/flows`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: Record<string, string>;\n headers?: Record<string, string>;\n}>;\n\n/**\n * @see https://globusonline.github.io/globus-flows/#tag/Flows/paths/~1flows~1{flow_id}/get\n */\nexport const get = function (flow_id, options?, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.VIEW_FLOWS,\n path: `/flows/${flow_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<string, Record<string, any>>;\n\n/**\n * @see https://globusonline.github.io/globus-flows/#tag/Flows/paths/~1flows~1{flow_id}/delete\n */\nexport const remove = function (flow_id, options?, sdkOptions?) {\n return serviceRequest(\n {\n scope: SCOPES.MANAGE_FLOWS,\n service: ID,\n path: `/flows/${flow_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * Run an instance of a particular Flow.\n * @see https://globusonline.github.io/globus-flows/#tag/Runs/paths/~1flows~1%7Bflow_id%7D~1run/post\n */\nexport const run = function (flow_id, options?, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.VIEW_FLOWS,\n path: `/flows/${flow_id}/run`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload: {\n label?: string;\n body: Record<string, any>;\n tags?: string[];\n };\n }\n>;\n\ntype ValidateSuccessResponse = {\n scopes: Record<string, any>;\n};\n\n/**\n * An error that was generated during validation that includes the location of the error.\n */\nexport type ValidationLocationError = {\n /**\n * The location of the error represents the path to the property that caused the error.\n */\n loc: string[];\n msg: string;\n type: string;\n};\n\ntype ValidateErrorResponse = {\n error: {\n code: string;\n /**\n * When `detail` is a string, it is a general error message and cannot be mapped to a specific location\n * in the provided payload.\n */\n detail: string | ValidationLocationError[];\n /**\n * `message` being available is dependent on the error code.\n */\n message?: string;\n };\n debug_id: string;\n};\n\n/**\n * Validate a flow definition and its schema.\n * @see https://globusonline.github.io/globus-flows/#tag/Flows/paths/~1flows~1validate/post\n */\nexport const validate = function (\n options,\n sdkOptions?,\n): Promise<JSONFetchResponse<ValidateSuccessResponse | ValidateErrorResponse>> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.MANAGE_FLOWS,\n path: `/flows/validate`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: never;\n payload: {\n definition: Record<string, any>;\n input_schema?: Record<string, any>;\n };\n}>;\n", "import { ID, SCOPES } from '../config.js';\nimport { HTTP_METHODS, serviceRequest } from '../../shared.js';\n\nimport type { ServiceMethod, ServiceMethodDynamicSegments } from '../../../services/types.js';\n\n/**\n * @see https://globusonline.github.io/globus-flows/#tag/Runs/paths/~1runs/get\n */\nexport const getAll = function (options = {}, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.RUN_MANAGE,\n path: `/runs`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query?: Record<string, string>;\n headers?: Record<string, string>;\n payload?: never;\n}>;\n\n/**\n * Cancel the execution for a particular Run of a Flow.\n * https://globusonline.github.io/globus-flows/#tag/Runs/paths/~1runs~1%7Brun_id%7D~1cancel/post\n */\nexport const cancel = function (run_id, options?, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.RUN_MANAGE,\n path: `/runs/${run_id}/cancel`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<string, Record<string, any>>;\n\n/**\n * Retrieve detailed execution information for a particular Flow Run.\n * @see https://globusonline.github.io/globus-flows/#tag/Runs/paths/~1runs~1%7Baction_id%7D~1log/get\n */\nexport const getLog = function (run_id, options?, sdkOptions?) {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.RUN_MANAGE,\n path: `/runs/${run_id}/log`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n string,\n {\n query?: {\n limit?: number | string;\n reverse_order?: boolean;\n pagination_token?: string;\n };\n }\n>;\n", "/**\n * @description A wrapper around the Globus Connect Server Manager API.\n * @group Service\n * @see [Globus Connect Server Manager API Documentation](https://docs.globus.org/globus-connect-server/v5.4/api/)\n * @module\n */\nimport type {\n Segment,\n ServiceMethodOptions,\n SDKOptions,\n ServiceMethod,\n ServiceMethodDynamicSegments,\n BaseServiceMethodOptions,\n} from '../types.js';\n\n/**\n * Service methods for the Globus Connect Server Manager API.\n */\nexport * as collections from './service/collections.js';\nexport * as endpoint from './service/endpoint.js';\nexport * as https from './service/https.js';\nexport * as nodes from './service/nodes.js';\nexport * as roles from './service/roles.js';\nexport * as storageGateways from './service/storage-gateways.js';\nexport * as userCredentials from './service/user-credentials.js';\nexport * as versioning from './service/versioning.js';\n\nconst SCOPES = {\n HIGH_ASSURANCE: 'urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections',\n NON_HIGH_ASSURANCE:\n 'urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections[*https://auth.globus.org/scopes/<MAPPED_COLLECTION_ID>/data_access]',\n};\n\nexport function getRequiredScopes(configuration: GCSConfiguration) {\n return SCOPES.HIGH_ASSURANCE.replace('<ENDPOINT_ID>', configuration.endpoint_id);\n}\n\n/**\n * The configuration object used by all Globus Connect Server Manager API methods.\n */\nexport type GCSConfiguration = {\n /**\n * The host (base URL) for the Globus Connect Server Manager API.\n * @example https://fa5e.bd7c.data.globus.org\n */\n host: string;\n /**\n * The UUID\n */\n endpoint_id: Globus.UUID;\n};\n\n/**\n * The GCSServiceMethod type is similar to the core ServiceMethod type, but\n * the first parameter is always a GCSConfiguration object.\n */\nexport type GCSServiceMethod<O extends ServiceMethodOptions, R extends Response = Response> = (\n configuration: GCSConfiguration,\n methodOptions?: O & {\n query?: BaseServiceMethodOptions['query'];\n headers?: BaseServiceMethodOptions['headers'];\n },\n sdkOptions?: SDKOptions,\n) => ReturnType<ServiceMethod<O, R>>;\n\n/**\n * The GCSServiceMethodDynamicSegments type is similar to the core ServiceMethodDynamicSegments type, but\n * the first parameter is always a GCSConfiguration object.\n */\nexport type GCSServiceMethodDynamicSegments<\n S extends Segment,\n O extends ServiceMethodOptions,\n R extends Response = Response,\n> = (\n configuration: GCSConfiguration,\n segments: S,\n methodOptions?: O & {\n query?: BaseServiceMethodOptions['query'];\n headers?: BaseServiceMethodOptions['headers'];\n },\n sdkOptions?: SDKOptions,\n) => ReturnType<ServiceMethodDynamicSegments<S, O, R>>;\n", "import type { operations } from '@globus/types/gcs-manager/api';\nimport { getRequiredScopes } from '../index.js';\nimport { HTTP_METHODS, serviceRequest } from '../../shared.js';\n\nimport type { GCSServiceMethod, GCSServiceMethodDynamicSegments } from '../index';\n\nimport type { JSONFetchResponse } from '../../types';\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#listCollections\n */\nexport const getAll = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['listCollections']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/collections`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n query?: operations['listCollections']['parameters']['query'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#getCollection\n */\nexport const get = function (\n configuration,\n collection_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['getCollection']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/collections/${collection_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['getCollection']['parameters']['path']['collection_id'],\n {\n query?: operations['getCollection']['parameters']['query'];\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#deleteCollection\n */\nexport const remove = function (\n configuration,\n collection_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['deleteCollection']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/collections/${collection_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['deleteCollection']['parameters']['path']['collection_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#postCollection\n */\nexport const create = function (\n configuration,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['postCollection']['responses']['201']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/collections`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['postCollection']['requestBody']['content']['application/json'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#putCollection\n */\nexport const update = function (\n configuration,\n collection_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['putCollection']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/collections/${collection_id}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['putCollection']['parameters']['path']['collection_id'],\n {\n payload: operations['putCollection']['requestBody']['content']['application/json'];\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#patchCollection\n */\nexport const patch = function (\n configuration,\n collection_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['patchCollection']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/collections/${collection_id}`,\n method: HTTP_METHODS.PATCH,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['patchCollection']['parameters']['path']['collection_id'],\n {\n payload: Partial<operations['patchCollection']['requestBody']['content']['application/json']>;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#putCollectionOwnerString\n */\nexport const updateOwnerString = function (\n configuration,\n collection_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['putCollectionOwnerString']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/collections/${collection_id}/owner_string`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['putCollectionOwnerString']['parameters']['path']['collection_id'],\n {\n payload: Partial<\n operations['putCollectionOwnerString']['requestBody']['content']['application/json']\n >;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Collections/#deleteCollectionOwnerString\n */\nexport const resetOwnerString = function (\n configuration,\n collection_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['deleteCollectionOwnerString']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/collections/${collection_id}/owner_string`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['deleteCollectionOwnerString']['parameters']['path']['collection_id'],\n {}\n>;\n", "import type { operations } from '@globus/types/gcs-manager/api';\nimport { getRequiredScopes } from '../index.js';\nimport { HTTP_METHODS, serviceRequest } from '../../shared.js';\n\nimport type { GCSServiceMethod } from '../index';\nimport type { JSONFetchResponse } from '../../types';\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Endpoint/#getEndpoint\n */\nexport const get = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['getEndpoint']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/endpoint`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n query?: never;\n payload?: never;\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Endpoint/#putEndpoint\n */\nexport const update = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['putEndpoint']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/endpoint`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['putEndpoint']['requestBody']['content']['application/json'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Endpoint/#patchEndpoint\n */\nexport const patch = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['patchEndpoint']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/endpoint`,\n method: HTTP_METHODS.PATCH,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n /**\n * @todo The generated PATCH type is resolving to the Endpoint document, which\n * has some properties that are required (i.e. `display_name`). For now, we're\n * just allowing unknown properties to be passed in, but we should fix this\n * when the auotgenerated types are corrected.\n */\n payload:\n | operations['patchEndpoint']['requestBody']['content']['application/json']\n | Record<string, unknown>;\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Endpoint/#putEndpointSubscriptionId\n */\nexport const updateSubscriptionId = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['putEndpointSubscriptionId']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/endpoint/subscription_id`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['putEndpointSubscriptionId']['requestBody']['content']['application/json'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Endpoint/#putEndpointOwner\n */\nexport const updateOwner = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['putEndpointOwner']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/endpoint/owner`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['putEndpointOwner']['requestBody']['content']['application/json'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Endpoint/#putEndpointOwnerString\n */\nexport const updateOwnerString = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['putEndpointOwnerString']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/endpoint/owner_string`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['putEndpointOwnerString']['requestBody']['content']['application/json'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Endpoint/#deleteEndpointOwnerString\n */\nexport const resetOwnerString = function (\n configuration,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['deleteEndpointOwnerString']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/endpoint/owner_string`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{}>;\n", "import { getRequiredScopes } from '../index.js';\nimport { HTTP_METHODS, serviceRequest } from '../../shared.js';\n\nimport type { GCSServiceMethodDynamicSegments } from '../index.js';\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/https-access-collections/\n */\nexport const get = function (configuration, path, options?, sdkOptions?): Promise<Response> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n string,\n {\n query?: {\n /**\n * @see https://docs.globus.org/globus-connect-server/v5.4/https-access-collections/#request_a_browser_download\n */\n download?: boolean;\n };\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/https-access-collections/\n */\nexport const remove = function (configuration, path, options?, sdkOptions?): Promise<Response> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/https-access-collections/\n */\nexport const update = function (configuration, path, options, sdkOptions?): Promise<Response> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n string,\n {\n query?: never;\n payload?: never;\n }\n>;\n", "import type { operations } from '@globus/types/gcs-manager/api';\nimport { getRequiredScopes } from '../index.js';\n\nimport { HTTP_METHODS, serviceRequest } from '../../../services/shared.js';\n\nimport type { GCSServiceMethod, GCSServiceMethodDynamicSegments } from '../index';\n\nimport type { JSONFetchResponse } from '../../types';\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Nodes/#listNodes\n */\nexport const getAll = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['listNodes']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/nodes`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n query?: operations['listNodes']['parameters']['query'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Nodes/#getNode\n */\nexport const get = function (\n configuration,\n node_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['getNode']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/nodes/${node_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['getNode']['parameters']['path']['node_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Nodes/#deleteNode\n */\nexport const remove = function (\n configuration,\n node_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['deleteNode']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/nodes/${node_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['deleteNode']['parameters']['path']['node_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Nodes/#postNodes\n */\nexport const create = function (\n configuration,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['postNode']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/nodes`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['postNode']['requestBody']['content']['application/json'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Nodes/#putNode\n */\nexport const update = function (\n configuration,\n node_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['putNode']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/nodes/${node_id}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['putNode']['parameters']['path']['node_id'],\n {\n payload: operations['putNode']['requestBody']['content']['application/json'];\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Nodes/#patchNode\n */\nexport const patch = function (\n configuration,\n node_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['patchNode']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/nodes/${node_id}`,\n method: HTTP_METHODS.PATCH,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['patchNode']['parameters']['path']['node_id'],\n {\n payload: Partial<operations['patchNode']['requestBody']['content']['application/json']>;\n }\n>;\n", "import type { operations } from '@globus/types/gcs-manager/api';\nimport { getRequiredScopes } from '../index.js';\n\nimport { HTTP_METHODS, serviceRequest } from '../../../services/shared.js';\n\nimport type { GCSServiceMethod, GCSServiceMethodDynamicSegments } from '../index';\n\nimport type { JSONFetchResponse } from '../../types';\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Roles/#listRoles\n */\nexport const getAll = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['listRoles']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/roles`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n query?: operations['listRoles']['parameters']['query'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Roles/#getRole\n */\nexport const get = function (\n configuration,\n role_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['getRole']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/roles/${role_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['getRole']['parameters']['path']['role_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Roles/#deleteRole\n */\nexport const remove = function (\n configuration,\n role_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['deleteRole']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/roles/${role_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['deleteRole']['parameters']['path']['role_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Roles/#postRoles\n */\nexport const create = function (\n configuration,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['postRoles']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/roles`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['postRoles']['requestBody']['content']['application/json'];\n}>;\n", "import type { operations } from '@globus/types/gcs-manager/api';\nimport { getRequiredScopes } from '../index.js';\nimport { HTTP_METHODS, serviceRequest } from '../../../services/shared.js';\n\nimport type { GCSServiceMethod, GCSServiceMethodDynamicSegments } from '../index';\n\nimport type { JSONFetchResponse } from '../../types';\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Storage_Gateways/#listStorageGateways\n */\nexport const getAll = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['listStorageGateways']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/storage_gateways`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n query?: operations['listStorageGateways']['parameters']['query'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Storage_Gateways/#getStorageGateway\n */\nexport const get = function (\n configuration,\n storage_gateway_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['getStorageGateway']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/storage_gateways/${storage_gateway_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['getStorageGateway']['parameters']['path']['storage_gateway_id'],\n {\n query?: operations['getStorageGateway']['parameters']['query'];\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Storage_Gateways/#deleteStorageGateway\n */\nexport const remove = function (\n configuration,\n storage_gateway_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['deleteStorageGateway']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/storage_gateways/${storage_gateway_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['deleteStorageGateway']['parameters']['path']['storage_gateway_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Storage_Gateways/#postStorageGateway\n */\nexport const create = function (\n configuration,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['postStorageGateway']['responses']['201']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/storage_gateways`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['postStorageGateway']['requestBody']['content']['application/json'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Storage_Gateways/#putStorageGateway\n */\nexport const update = function (\n configuration,\n storage_gateway_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['putStorageGateway']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/storage_gateways/${storage_gateway_id}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['putStorageGateway']['parameters']['path']['storage_gateway_id'],\n {\n payload: operations['putStorageGateway']['requestBody']['content']['application/json'];\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Storage_Gateways/#patchStorageGateway\n */\nexport const patch = function (\n configuration,\n storage_gateway_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['patchStorageGateway']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/storage_gateways/${storage_gateway_id}`,\n method: HTTP_METHODS.PATCH,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['patchStorageGateway']['parameters']['path']['storage_gateway_id'],\n {\n payload: Partial<\n operations['patchStorageGateway']['requestBody']['content']['application/json']\n >;\n }\n>;\n", "import type { operations } from '@globus/types/gcs-manager/api';\nimport { getRequiredScopes } from '../index.js';\nimport { HTTP_METHODS, serviceRequest } from '../../../services/shared.js';\n\nimport type { GCSServiceMethod, GCSServiceMethodDynamicSegments } from '../index';\n\nimport type { JSONFetchResponse } from '../../types';\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_User_Credentials/#listUserCredentials\n */\nexport const getAll = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['listUserCredentials']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/user_credentials`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n query?: operations['listUserCredentials']['parameters']['query'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_User_Credentials/#getUserCredential\n */\nexport const get = function (\n configuration,\n user_credential_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['getCollection']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/user_credentials/${user_credential_id}`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['getUserCredential']['parameters']['path']['user_credential_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_User_Credentials/#deleteUserCredential\n */\nexport const remove = function (\n configuration,\n user_credential_id,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['deleteUserCredential']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/user_credentials/${user_credential_id}`,\n method: HTTP_METHODS.DELETE,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['deleteUserCredential']['parameters']['path']['user_credential_id'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_User_Credentials/#postUserCredential\n */\nexport const create = function (\n configuration,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['postUserCredential']['responses']['201']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/user_credentials`,\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n payload: operations['postUserCredential']['requestBody']['content']['application/json'];\n}>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_User_Credentials/#putUserCredential\n */\nexport const update = function (\n configuration,\n user_credential_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['putUserCredential']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/user_credentials/${user_credential_id}`,\n method: HTTP_METHODS.PUT,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['putUserCredential']['parameters']['path']['user_credential_id'],\n {\n payload: operations['putUserCredential']['requestBody']['content']['application/json'];\n }\n>;\n\n/**\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_User_Credentials/#patchUserCredential\n */\nexport const patch = function (\n configuration,\n user_credential_id,\n options,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['patchUserCredential']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/user_credentials/${user_credential_id}`,\n method: HTTP_METHODS.PATCH,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethodDynamicSegments<\n operations['patchUserCredential']['parameters']['path']['user_credential_id'],\n {\n payload: Partial<\n operations['patchUserCredential']['requestBody']['content']['application/json']\n >;\n }\n>;\n", "import type { operations } from '@globus/types/gcs-manager/api';\nimport { getRequiredScopes } from '../index.js';\nimport { serviceRequest } from '../../../services/shared.js';\n\nimport type { GCSServiceMethod } from '../index';\nimport type { JSONFetchResponse } from '../../types';\n\n/**\n *\n * @see https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Versioning/#getInfo\n */\nexport const info = function (\n configuration,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<operations['getInfo']['responses']['200']['content']['application/json']>\n> {\n return serviceRequest(\n {\n service: configuration,\n scope: getRequiredScopes(configuration),\n path: `/api/info`,\n },\n options,\n sdkOptions,\n );\n} satisfies GCSServiceMethod<{\n query?: never;\n payload?: never;\n}>;\n", "/**\n * @description A wrapper around the Globus Timer service.\n * @group Service\n * @see [Globus Timer API Documentation](https://timer.automate.globus.org/docs#/)\n * @module\n */\nimport * as TIMER from './config.js';\n\nimport { create } from './service/timer.js';\n\n/**\n * @private\n * @internal\n */\nexport const CONFIG = TIMER;\nexport { create };\n", "import type { components } from '@globus/types/timer';\nimport { HTTP_METHODS, serviceRequest } from '../../shared.js';\nimport { ID } from '../config.js';\n\nimport type { SDKOptions, ServiceMethod } from '../../types.js';\n\nexport const create = function (options, sdkOptions?: SDKOptions) {\n return serviceRequest(\n {\n service: ID,\n scope: 'https://auth.globus.org/scopes/524230d7-ea86-4a52-8312-86065a9e0417/timer',\n path: '/v2/timer',\n method: HTTP_METHODS.POST,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n payload: components['schemas']['V2TimerCreate'];\n}>;\n", "/**\n * @description A wrapper around the Globus Compute service.\n * @group Service\n * @see [Globus Compute API Documentation](https://api2.funcx.org/redoc)\n * @module\n */\nimport * as COMPUTE from './config.js';\n\n/**\n * @private\n * @internal\n */\nexport const CONFIG = COMPUTE;\n\nexport * as endpoints from './service/endpoints.js';\n", "import type { operations } from '@globus/types/compute';\nimport { HTTP_METHODS, serviceRequest } from '../../shared.js';\nimport { ID, SCOPES } from '../config.js';\n\nimport type {\n ServiceMethod,\n ServiceMethodDynamicSegments,\n JSONFetchResponse,\n} from '../../types.js';\n\nexport const getAll = function (\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['get_endpoints_v2_endpoints_get']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: '/v2/endpoints',\n method: HTTP_METHODS.GET,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethod<{\n query: operations['get_endpoints_v2_endpoints_get']['parameters']['query'];\n}>;\n\nexport const get = function (\n endpoint_uuid,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['get_endpoint_v2_endpoints__endpoint_uuid__get']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v2/endpoints/${endpoint_uuid}`,\n method: HTTP_METHODS.GET,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n operations['get_endpoint_v2_endpoints__endpoint_uuid__get']['parameters']['path']['endpoint_uuid'],\n {\n query?: never;\n payload?: never;\n }\n>;\n\nexport const getStatus = function (\n endpoint_uuid,\n options?,\n sdkOptions?,\n): Promise<\n JSONFetchResponse<\n operations['get_endpoint_status_v2_endpoints__endpoint_uuid__status_get']['responses']['200']['content']['application/json']\n >\n> {\n return serviceRequest(\n {\n service: ID,\n scope: SCOPES.ALL,\n path: `/v2/endpoints/${endpoint_uuid}/status`,\n },\n options,\n sdkOptions,\n );\n} satisfies ServiceMethodDynamicSegments<\n operations['get_endpoint_status_v2_endpoints__endpoint_uuid__status_get']['parameters']['path']['endpoint_uuid'],\n {\n query?: never;\n payload?: never;\n }\n>;\n", "/**\n * Utilities and methods related to the Globus Web App.\n * @see https://app.globus.org/\n */\n\nimport { getEnvironment, type Environment } from '../core/global.js';\nimport type { SDKOptions } from '../services/types';\n\n/**\n * The hostnames for the Globus Web App in each environment.\n */\nexport const HOSTS: Record<Environment, string> = {\n integration: 'app.integration.globuscs.info',\n sandbox: 'app.sandbox.globuscs.info',\n test: 'app.test.globuscs.info',\n staging: 'app.staging.globuscs.info',\n preview: 'app.preview.globus.org',\n production: 'app.globus.org',\n};\n\n/**\n * Return the hostname for the Globus Web App in the given environment.\n */\nexport function host(env: Environment = getEnvironment()) {\n return HOSTS[env];\n}\n\n/**\n * Return a URL for the Globus Web App.\n */\nexport function url(path?: string, sdkOptions?: SDKOptions) {\n return new URL(path || '', `https://${host(sdkOptions?.environment)}`);\n}\n\ntype WebAppURLIdentifier = 'TASK' | 'COLLECTION' | 'ENDPOINT';\n\nconst WEBAPP_URLS: Record<WebAppURLIdentifier, string> = {\n TASK: '/activity/%s/overview',\n COLLECTION: '/file-manager/collections/%s/overview',\n ENDPOINT: '/file-manager/collections/%s/overview',\n};\n\n/**\n * Obtain a URL for a specific page in the Globus Web App.\n * @example\n * ```typescript\n * const url = urlFor('TASK', ['example-uuid']);\n * ```\n */\nexport function urlFor(\n identifier: WebAppURLIdentifier,\n segments?: string[],\n sdkOptions?: SDKOptions,\n) {\n const path = WEBAPP_URLS[identifier].replace(/%s/g, segments?.join('/') || '');\n return url(path, sdkOptions);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA;AAAA,gBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA,iBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,qBAAqB;AAElC,IAAI,UAAU;AAqBP,SAAS,YAAY;AAC1B,SAAO;AACT;AAEA,IAAM,kBAAkB;AACxB,IAAM,sBAAsB;AAMrB,S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S;AAAA,EACT,YAAY;AACd;AAKO,SAAS,KAAKC,OAAmB,eAAe,GAAG;AACxD,SAAOD,OAAMC,IAAG;AAClB;AAKO,SAAS,IAAI,MAAe,YAAyB;AAC1D,SAAO,IAAI,IAAI,QAAQ,IAAI,WAAW,KAAK,YAAY,WAAW,CAAC,EAAE;AACvE;AAIA,IAAM,cAAmD;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,UAAU;AACZ;AASO,SAAS,OACd,YACA,UACA,YACA;AACA,QAAM,OAAO,YAAY,UAAU,EAAE,QAAQ,OAAO,UAAU,KAAK,GAAG,KAAK,EAAE;AAC7E,SAAO,IAAI,MAAM,UAAU;AAC7B;",
|
|
6
6
|
"names": ["flows_exports", "groups_exports", "VERSION", "info", "VERSION", "info", "config_exports", "HOSTS", "ID", "SCOPES", "config_exports", "HOSTS", "ID", "SCOPES", "config_exports", "HOSTS", "ID", "config_exports", "HOSTS", "ID", "SCOPES", "config_exports", "HOSTS", "ID", "SCOPES", "config_exports", "HOSTS", "ID", "SCOPES", "ID", "HOSTS", "SCOPES", "ID", "HOSTS", "host", "url", "token", "url", "_fetch", "ID", "SCOPES", "ID", "ID", "config_exports", "ID", "url", "token", "token", "CONFIG", "create", "get", "get", "create", "get", "getAll", "remove", "update", "getAll", "get", "update", "remove", "create", "get", "getAll", "remove", "update", "getAll", "create", "get", "update", "remove", "create", "get", "getAll", "remove", "update", "getAll", "create", "get", "update", "remove", "endpoint_exports", "task_exports", "endpoint_exports", "get", "get", "create", "get", "getAll", "remove", "update", "getAll", "create", "get", "update", "remove", "task_exports", "cancel", "get", "getAll", "getEventList", "getPauseInfo", "getSkippedErrors", "getSuccessfulTransfers", "getAll", "get", "cancel", "getEventList", "getSuccessfulTransfers", "getSkippedErrors", "getPauseInfo", "CONFIG", "CONFIG", "get", "get", "ID", "SCOPES", "get", "get", "ID", "SCOPES", "get", "get", "ID", "SCOPES", "create", "get", "getAll", "remove", "get", "ID", "getAll", "SCOPES", "create", "remove", "CONFIG", "config_exports", "groups_exports", "CONFIG", "get", "SCOPES", "ID", "get", "get", "get", "SCOPES", "ID", "ID", "SCOPES", "CONFIG", "config_exports", "flows_exports", "CONFIG", "get", "getAll", "remove", "validate", "getAll", "ID", "SCOPES", "get", "remove", "validate", "cancel", "getAll", "getAll", "ID", "SCOPES", "cancel", "CONFIG", "config_exports", "endpoint_exports", "create", "get", "getAll", "remove", "update", "getAll", "get", "remove", "create", "update", "endpoint_exports", "get", "patch", "resetOwnerString", "update", "updateOwnerString", "get", "update", "patch", "updateOwnerString", "resetOwnerString", "get", "remove", "update", "get", "remove", "update", "create", "get", "getAll", "patch", "remove", "update", "getAll", "get", "remove", "create", "update", "patch", "create", "get", "getAll", "remove", "getAll", "get", "remove", "create", "create", "get", "getAll", "patch", "remove", "update", "getAll", "get", "remove", "create", "update", "patch", "create", "get", "getAll", "patch", "remove", "update", "getAll", "get", "remove", "create", "update", "patch", "SCOPES", "CONFIG", "create", "create", "ID", "CONFIG", "config_exports", "CONFIG", "get", "getAll", "getAll", "ID", "SCOPES", "get", "CONFIG", "config_exports", "HOSTS", "HOSTS", "env"]
|
|
7
7
|
}
|