@globus/sdk 6.2.0-canary.14.cdac808 → 6.2.0-canary.16.9181bc2
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 +1 -0
- package/dist/cjs/core/authorization/index.js.map +2 -2
- package/dist/cjs/index.js +577 -211
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/services/globus-connect-server/client.js.map +2 -2
- package/dist/esm/package.json +1 -1
- package/dist/esm/services/auth/config.d.ts +1 -0
- package/dist/esm/services/auth/config.d.ts.map +1 -1
- package/dist/esm/services/auth/config.js +1 -0
- package/dist/esm/services/auth/config.js.map +1 -1
- package/dist/esm/services/auth/index.d.ts +1 -0
- package/dist/esm/services/auth/index.d.ts.map +1 -1
- package/dist/esm/services/auth/index.js +1 -0
- package/dist/esm/services/auth/index.js.map +1 -1
- package/dist/esm/services/auth/service/developers/clients/credentials.d.ts +52 -0
- package/dist/esm/services/auth/service/developers/clients/credentials.d.ts.map +1 -0
- package/dist/esm/services/auth/service/developers/clients/credentials.js +39 -0
- package/dist/esm/services/auth/service/developers/clients/credentials.js.map +1 -0
- package/dist/esm/services/auth/service/developers/clients/index.d.ts +98 -0
- package/dist/esm/services/auth/service/developers/clients/index.d.ts.map +1 -0
- package/dist/esm/services/auth/service/developers/clients/index.js +77 -0
- package/dist/esm/services/auth/service/developers/clients/index.js.map +1 -0
- package/dist/esm/services/auth/service/developers/clients/scopes.d.ts +25 -0
- package/dist/esm/services/auth/service/developers/clients/scopes.d.ts.map +1 -0
- package/dist/esm/services/auth/service/developers/clients/scopes.js +26 -0
- package/dist/esm/services/auth/service/developers/clients/scopes.js.map +1 -0
- package/dist/esm/services/auth/service/developers/index.d.ts +8 -0
- package/dist/esm/services/auth/service/developers/index.d.ts.map +1 -0
- package/dist/esm/services/auth/service/developers/index.js +5 -0
- package/dist/esm/services/auth/service/developers/index.js.map +1 -0
- package/dist/esm/services/auth/service/developers/policies.d.ts +66 -0
- package/dist/esm/services/auth/service/developers/policies.d.ts.map +1 -0
- package/dist/esm/services/auth/service/developers/policies.js +61 -0
- package/dist/esm/services/auth/service/developers/policies.js.map +1 -0
- package/dist/esm/services/auth/service/developers/projects.d.ts +85 -0
- package/dist/esm/services/auth/service/developers/projects.d.ts.map +1 -0
- package/dist/esm/services/auth/service/developers/projects.js +66 -0
- package/dist/esm/services/auth/service/developers/projects.js.map +1 -0
- package/dist/esm/services/auth/service/developers/scopes.d.ts +70 -0
- package/dist/esm/services/auth/service/developers/scopes.d.ts.map +1 -0
- package/dist/esm/services/auth/service/developers/scopes.js +49 -0
- package/dist/esm/services/auth/service/developers/scopes.js.map +1 -0
- package/dist/esm/services/auth/service/identities/index.d.ts +12 -1
- package/dist/esm/services/auth/service/identities/index.d.ts.map +1 -1
- package/dist/esm/services/auth/service/identities/index.js +1 -1
- package/dist/esm/services/auth/service/identities/index.js.map +1 -1
- package/dist/umd/globus.production.js +2 -2
- package/dist/umd/globus.production.js.map +4 -4
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ID, SCOPES } from '../../../config.js';
|
|
2
|
+
import { HTTP_METHODS, serviceRequest } from '../../../../shared.js';
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves a list of all credentials owned by the authenticated entity.
|
|
5
|
+
* @see https://docs.globus.org/api/auth/reference/#get_client_credentials
|
|
6
|
+
*/
|
|
7
|
+
export const getAll = function (client_id, options = {}, sdkOptions) {
|
|
8
|
+
return serviceRequest({
|
|
9
|
+
service: ID,
|
|
10
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
11
|
+
path: `/v2/api/clients/${client_id}/credentials`,
|
|
12
|
+
method: HTTP_METHODS.GET,
|
|
13
|
+
}, options, sdkOptions);
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Create a credential for the specified client.
|
|
17
|
+
* @see https://docs.globus.org/api/auth/reference/#create_client_credential
|
|
18
|
+
*/
|
|
19
|
+
export const create = function (client_id, options, sdkOptions) {
|
|
20
|
+
return serviceRequest({
|
|
21
|
+
service: ID,
|
|
22
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
23
|
+
path: `/v2/api/clients/${client_id}/credentials`,
|
|
24
|
+
method: HTTP_METHODS.POST,
|
|
25
|
+
}, Object.assign(Object.assign({}, options), { payload: { credential: options === null || options === void 0 ? void 0 : options.payload } }), sdkOptions);
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Delete a credential by id.
|
|
29
|
+
* @see https://docs.globus.org/api/auth/reference/#delete_client_credential
|
|
30
|
+
*/
|
|
31
|
+
export const remove = function ({ client_id, credential_id }, options, sdkOptions) {
|
|
32
|
+
return serviceRequest({
|
|
33
|
+
service: ID,
|
|
34
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
35
|
+
path: `/v2/api/clients/${client_id}/credentials/${credential_id}`,
|
|
36
|
+
method: HTTP_METHODS.DELETE,
|
|
37
|
+
}, options, sdkOptions);
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../../../../../../src/services/auth/service/developers/clients/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAkBrE;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UACpB,SAAS,EACT,OAAO,GAAG,EAAE,EACZ,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,eAAe;QAC7B,IAAI,EAAE,mBAAmB,SAAS,cAAc;QAChD,MAAM,EAAE,YAAY,CAAC,GAAG;KACzB,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAAoD,CAAC;AAMrD;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UACpB,SAAS,EACT,OAAO,EACP,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,eAAe;QAC7B,IAAI,EAAE,mBAAmB,SAAS,cAAc;QAChD,MAAM,EAAE,YAAY,CAAC,IAAI;KAC1B,kCACI,OAAO,KAAE,OAAO,EAAE,EAAE,UAAU,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE,KACvD,UAAU,CACX,CAAC;AACJ,CAMC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UACpB,EAAE,SAAS,EAAE,aAAa,EAAgD,EAC1E,OAAQ,EACR,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,eAAe;QAC7B,IAAI,EAAE,mBAAmB,SAAS,gBAAgB,aAAa,EAAE;QACjE,MAAM,EAAE,YAAY,CAAC,MAAM;KAC5B,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAMC,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { JSONFetchResponse } from '../../../../types.js';
|
|
2
|
+
import { ResourceEnvelope } from '../index.js';
|
|
3
|
+
export * as credentials from './credentials.js';
|
|
4
|
+
export * as scopes from './scopes.js';
|
|
5
|
+
type ClientGrantType = 'authorization_code' | 'client_credentials' | 'refresh_token' | 'urn:globus:auth:grant_type:dependent_token';
|
|
6
|
+
type ClientType = 'confidential_client' | 'public_installed_client' | 'client_identity' | 'resource_server' | 'globus_connect_server' | 'hybrid_confidential_client_resource_server' | 'public_webapp_client';
|
|
7
|
+
/**
|
|
8
|
+
* @see https://docs.globus.org/api/auth/reference/#client_resource
|
|
9
|
+
*/
|
|
10
|
+
export type Client = {
|
|
11
|
+
id: string;
|
|
12
|
+
parent_client: string | null;
|
|
13
|
+
name: string;
|
|
14
|
+
public_client: boolean;
|
|
15
|
+
grant_types: ClientGrantType[];
|
|
16
|
+
visibility: 'public' | 'private';
|
|
17
|
+
scopes: string[];
|
|
18
|
+
fqdns: string[];
|
|
19
|
+
redirect_uris: string[];
|
|
20
|
+
links: {
|
|
21
|
+
terms_and_conditions?: string;
|
|
22
|
+
privacy_policy?: string;
|
|
23
|
+
};
|
|
24
|
+
required_idp: string | null;
|
|
25
|
+
preselect_idp: string | null;
|
|
26
|
+
project: string | null;
|
|
27
|
+
client_type: ClientType;
|
|
28
|
+
userinfo_from_effective_identity: boolean;
|
|
29
|
+
prompt_for_named_grant: boolean;
|
|
30
|
+
};
|
|
31
|
+
type WrappedClient = ResourceEnvelope<'client', Client>;
|
|
32
|
+
type WrappedClients = ResourceEnvelope<'clients', Client[]>;
|
|
33
|
+
/**
|
|
34
|
+
* Return a specific client by id.
|
|
35
|
+
* @see https://docs.globus.org/api/auth/reference/#get_clients
|
|
36
|
+
*/
|
|
37
|
+
export declare const get: (client_id: string, options?: {
|
|
38
|
+
query?: import("../../../../types.js").BaseServiceMethodOptions["query"];
|
|
39
|
+
headers?: import("../../../../types.js").BaseServiceMethodOptions["headers"];
|
|
40
|
+
} | undefined, sdkOptions?: import("../../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedClient>>;
|
|
41
|
+
/**
|
|
42
|
+
* Return a list of clients the authenticated entity is an owner of, or the client
|
|
43
|
+
* associated with the specified fqdn.
|
|
44
|
+
* @see https://docs.globus.org/api/auth/reference/#get_clients
|
|
45
|
+
*/
|
|
46
|
+
export declare const getAll: (options?: ({
|
|
47
|
+
query?: {
|
|
48
|
+
fqdn?: string;
|
|
49
|
+
project_id?: string;
|
|
50
|
+
};
|
|
51
|
+
payload?: never;
|
|
52
|
+
} & import("../../../../types.js").BaseServiceMethodOptions) | undefined, sdkOptions?: import("../../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedClients>>;
|
|
53
|
+
type OptionalClientCreateFields = Omit<Client, 'id' | 'name' | 'grant_types' | 'scopes' | 'fqdns'>;
|
|
54
|
+
type ClientCreate = (Pick<Client, 'name' | 'public_client'> | Pick<Client, 'name' | 'client_type'>) & Partial<OptionalClientCreateFields>;
|
|
55
|
+
/**
|
|
56
|
+
* Create a new client
|
|
57
|
+
* @see https://docs.globus.org/api/auth/reference/#create_client
|
|
58
|
+
*/
|
|
59
|
+
export declare const create: (options: ({
|
|
60
|
+
query?: never;
|
|
61
|
+
payload: ClientCreate;
|
|
62
|
+
} & import("../../../../types.js").BaseServiceMethodOptions) | undefined, sdkOptions?: import("../../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedClient>>;
|
|
63
|
+
type NativeAppCreate = {
|
|
64
|
+
name: string;
|
|
65
|
+
template_id: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Create a new native app. This call is unauthenticated.
|
|
69
|
+
* @see https://docs.globus.org/api/auth/reference/#create_native_app_instance
|
|
70
|
+
*/
|
|
71
|
+
export declare const createNativeApp: (options: ({
|
|
72
|
+
query?: never;
|
|
73
|
+
payload: NativeAppCreate;
|
|
74
|
+
} & import("../../../../types.js").BaseServiceMethodOptions) | undefined, sdkOptions?: import("../../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedClient>>;
|
|
75
|
+
type ClientUpdate = Partial<Omit<ClientCreate, 'public_client' | 'project' | 'parent_client' | 'client_type' | 'userinfo_from_effective_identity' | 'prompt_for_named_grant'>>;
|
|
76
|
+
/**
|
|
77
|
+
* Update a client by id. All fields are optional.
|
|
78
|
+
* @see https://docs.globus.org/api/auth/reference/#update_client
|
|
79
|
+
*/
|
|
80
|
+
export declare const update: (client_id: string, options: ({
|
|
81
|
+
query?: never;
|
|
82
|
+
payload: ClientUpdate;
|
|
83
|
+
} & {
|
|
84
|
+
query?: import("../../../../types.js").BaseServiceMethodOptions["query"];
|
|
85
|
+
headers?: import("../../../../types.js").BaseServiceMethodOptions["headers"];
|
|
86
|
+
}) | undefined, sdkOptions?: import("../../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedClient>>;
|
|
87
|
+
/**
|
|
88
|
+
* Delete a client by id.
|
|
89
|
+
* @see https://docs.globus.org/api/auth/reference/#delete_client
|
|
90
|
+
*/
|
|
91
|
+
export declare const remove: (client_id: string, options?: ({
|
|
92
|
+
query?: never;
|
|
93
|
+
payload?: never;
|
|
94
|
+
} & {
|
|
95
|
+
query?: import("../../../../types.js").BaseServiceMethodOptions["query"];
|
|
96
|
+
headers?: import("../../../../types.js").BaseServiceMethodOptions["headers"];
|
|
97
|
+
}) | undefined, sdkOptions?: import("../../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedClient>>;
|
|
98
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/services/auth/service/developers/clients/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,iBAAiB,EAGlB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,KAAK,eAAe,GAChB,oBAAoB,GACpB,oBAAoB,GACpB,eAAe,GACf,4CAA4C,CAAC;AAEjD,KAAK,UAAU,GACX,qBAAqB,GACrB,yBAAyB,GACzB,iBAAiB,GACjB,iBAAiB,GACjB,uBAAuB,GACvB,4CAA4C,GAC5C,sBAAsB,CAAC;AAE3B;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,eAAe,EAAE,CAAC;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GAGG;AACH,eAAO,MAAM,MAAM;YAYT,KAAK;aACJ,YAAY;iJAbgC,OAAO,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAc7F,CAAC;AAEH,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe;YAclB,KAAK;aACJ,eAAe;iJAZvB,OAAO,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAazC,CAAC;AAEH,KAAK,YAAY,GAAG,OAAO,CACzB,IAAI,CACF,YAAY,EACV,eAAe,GACf,SAAS,GACT,eAAe,GACf,aAAa,GACb,kCAAkC,GAClC,wBAAwB,CAC3B,CACF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,MAAM;YAkBP,KAAK;aACJ,YAAY;;;;uFAftB,OAAO,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAiB1C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,MAAM;YAkBP,KAAK;cACH,KAAK;;;;uFAfhB,OAAO,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAiB1C,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ID, SCOPES } from '../../../config.js';
|
|
2
|
+
import { HTTP_METHODS, serviceRequest } from '../../../../shared.js';
|
|
3
|
+
export * as credentials from './credentials.js';
|
|
4
|
+
export * as scopes from './scopes.js';
|
|
5
|
+
/**
|
|
6
|
+
* Return a specific client by id.
|
|
7
|
+
* @see https://docs.globus.org/api/auth/reference/#get_clients
|
|
8
|
+
*/
|
|
9
|
+
export const get = function (client_id, options = {}, sdkOptions) {
|
|
10
|
+
return serviceRequest({
|
|
11
|
+
service: ID,
|
|
12
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
13
|
+
path: `/v2/api/clients/${client_id}`,
|
|
14
|
+
method: HTTP_METHODS.GET,
|
|
15
|
+
}, options, sdkOptions);
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Return a list of clients the authenticated entity is an owner of, or the client
|
|
19
|
+
* associated with the specified fqdn.
|
|
20
|
+
* @see https://docs.globus.org/api/auth/reference/#get_clients
|
|
21
|
+
*/
|
|
22
|
+
export const getAll = function (options = {}, sdkOptions) {
|
|
23
|
+
return serviceRequest({
|
|
24
|
+
service: ID,
|
|
25
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
26
|
+
path: `/v2/api/clients`,
|
|
27
|
+
method: HTTP_METHODS.GET,
|
|
28
|
+
}, options, sdkOptions);
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Create a new client
|
|
32
|
+
* @see https://docs.globus.org/api/auth/reference/#create_client
|
|
33
|
+
*/
|
|
34
|
+
export const create = function (options, sdkOptions) {
|
|
35
|
+
return serviceRequest({
|
|
36
|
+
service: ID,
|
|
37
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
38
|
+
path: `/v2/api/clients`,
|
|
39
|
+
method: HTTP_METHODS.POST,
|
|
40
|
+
}, Object.assign(Object.assign({}, options), { payload: { client: options === null || options === void 0 ? void 0 : options.payload } }), sdkOptions);
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Create a new native app. This call is unauthenticated.
|
|
44
|
+
* @see https://docs.globus.org/api/auth/reference/#create_native_app_instance
|
|
45
|
+
*/
|
|
46
|
+
export const createNativeApp = function (options, sdkOptions) {
|
|
47
|
+
return serviceRequest({
|
|
48
|
+
service: ID,
|
|
49
|
+
path: `/v2/api/clients`,
|
|
50
|
+
method: HTTP_METHODS.POST,
|
|
51
|
+
}, Object.assign(Object.assign({}, options), { payload: { client: options === null || options === void 0 ? void 0 : options.payload } }), sdkOptions);
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Update a client by id. All fields are optional.
|
|
55
|
+
* @see https://docs.globus.org/api/auth/reference/#update_client
|
|
56
|
+
*/
|
|
57
|
+
export const update = function (client_id, options, sdkOptions) {
|
|
58
|
+
return serviceRequest({
|
|
59
|
+
service: ID,
|
|
60
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
61
|
+
path: `/v2/api/clients/${client_id}`,
|
|
62
|
+
method: HTTP_METHODS.PUT,
|
|
63
|
+
}, Object.assign(Object.assign({}, options), { payload: { client: options === null || options === void 0 ? void 0 : options.payload } }), sdkOptions);
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Delete a client by id.
|
|
67
|
+
* @see https://docs.globus.org/api/auth/reference/#delete_client
|
|
68
|
+
*/
|
|
69
|
+
export const remove = function (client_id, options, sdkOptions) {
|
|
70
|
+
return serviceRequest({
|
|
71
|
+
service: ID,
|
|
72
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
73
|
+
path: `/v2/api/clients/${client_id}`,
|
|
74
|
+
method: HTTP_METHODS.DELETE,
|
|
75
|
+
}, options, sdkOptions);
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/services/auth/service/developers/clients/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AASrE,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAyCtC;;;GAGG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,UACjB,SAAS,EACT,OAAO,GAAG,EAAE,EACZ,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,eAAe;QAC7B,IAAI,EAAE,mBAAmB,SAAS,EAAE;QACpC,MAAM,EAAE,YAAY,CAAC,GAAG;KACzB,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CA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zB,kCACI,OAAO,KAAE,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE,KACnD,UAAU,CACX,CAAC;AACJ,CAMC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UACpB,SAAS,EACT,OAAQ,EACR,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,eAAe;QAC7B,IAAI,EAAE,mBAAmB,SAAS,EAAE;QACpC,MAAM,EAAE,YAAY,CAAC,MAAM;KAC5B,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAMC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { JSONFetchResponse } from '../../../../types.js';
|
|
2
|
+
import type { ScopeCreate, WrappedScope } from '../scopes.js';
|
|
3
|
+
/**
|
|
4
|
+
* Return a single scope by id for the specified client.
|
|
5
|
+
* @see https://docs.globus.org/api/auth/reference/#get_scopes
|
|
6
|
+
*/
|
|
7
|
+
export declare const get: ({ client_id, scope_id }: {
|
|
8
|
+
client_id: string;
|
|
9
|
+
scope_id: string;
|
|
10
|
+
}, options?: {
|
|
11
|
+
query?: import("../../../../types.js").BaseServiceMethodOptions["query"];
|
|
12
|
+
headers?: import("../../../../types.js").BaseServiceMethodOptions["headers"];
|
|
13
|
+
} | undefined, sdkOptions?: import("../../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedScope>>;
|
|
14
|
+
/**
|
|
15
|
+
* Create a new scope for each registered FQDN and the id of the client.
|
|
16
|
+
* @see https://docs.globus.org/api/auth/reference/#create_scope
|
|
17
|
+
*/
|
|
18
|
+
export declare const create: (client_id: string, options: ({
|
|
19
|
+
query?: never;
|
|
20
|
+
payload: ScopeCreate;
|
|
21
|
+
} & {
|
|
22
|
+
query?: import("../../../../types.js").BaseServiceMethodOptions["query"];
|
|
23
|
+
headers?: import("../../../../types.js").BaseServiceMethodOptions["headers"];
|
|
24
|
+
}) | undefined, sdkOptions?: import("../../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedScope>>;
|
|
25
|
+
//# sourceMappingURL=scopes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../../../../../../../src/services/auth/service/developers/clients/scopes.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAgC,MAAM,sBAAsB,CAAC;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,GAAG;eAcsC,MAAM;cAAY,MAAM;;;;sFAV3E,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAU2C,CAAC;AAEtF;;;GAGG;AACH,eAAO,MAAM,MAAM;YAkBP,KAAK;aACJ,WAAW;;;;uFAfrB,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAiBzC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ID, SCOPES } from '../../../config.js';
|
|
2
|
+
import { HTTP_METHODS, serviceRequest } from '../../../../shared.js';
|
|
3
|
+
/**
|
|
4
|
+
* Return a single scope by id for the specified client.
|
|
5
|
+
* @see https://docs.globus.org/api/auth/reference/#get_scopes
|
|
6
|
+
*/
|
|
7
|
+
export const get = function ({ client_id, scope_id }, options = {}, sdkOptions) {
|
|
8
|
+
return serviceRequest({
|
|
9
|
+
service: ID,
|
|
10
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
11
|
+
path: `/v2/api/clients/${client_id}/scopes/${scope_id}`,
|
|
12
|
+
}, options, sdkOptions);
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Create a new scope for each registered FQDN and the id of the client.
|
|
16
|
+
* @see https://docs.globus.org/api/auth/reference/#create_scope
|
|
17
|
+
*/
|
|
18
|
+
export const create = function (client_id, options, sdkOptions) {
|
|
19
|
+
return serviceRequest({
|
|
20
|
+
service: ID,
|
|
21
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
22
|
+
path: `/v2/api/clients/${client_id}/scopes`,
|
|
23
|
+
method: HTTP_METHODS.POST,
|
|
24
|
+
}, Object.assign(Object.assign({}, options), { payload: { scope: options === null || options === void 0 ? void 0 : options.payload } }), sdkOptions);
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=scopes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scopes.js","sourceRoot":"","sources":["../../../../../../../src/services/auth/service/developers/clients/scopes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAKrE;;;GAGG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,UACjB,EAAE,SAAS,EAAE,QAAQ,EAAE,EACvB,OAAO,GAAG,EAAE,EACZ,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,eAAe;QAC7B,IAAI,EAAE,mBAAmB,SAAS,WAAW,QAAQ,EAAE;KACxD,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAAqF,CAAC;AAEtF;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UACpB,SAAS,EACT,OAAO,EACP,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,eAAe;QAC7B,IAAI,EAAE,mBAAmB,SAAS,SAAS;QAC3C,MAAM,EAAE,YAAY,CAAC,IAAI;KAC1B,kCACI,OAAO,KAAE,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE,KAClD,UAAU,CACX,CAAC;AACJ,CAMC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * as policies from './policies.js';
|
|
2
|
+
export * as projects from './projects.js';
|
|
3
|
+
export * as scopes from './scopes.js';
|
|
4
|
+
export * as clients from './clients/index.js';
|
|
5
|
+
export type ResourceEnvelope<K extends string, T> = {
|
|
6
|
+
[P in K]: T;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/services/auth/service/developers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAE9C,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,IAAI;KACjD,CAAC,IAAI,CAAC,GAAG,CAAC;CACZ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/services/auth/service/developers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { JSONFetchResponse } from '../../../types.js';
|
|
2
|
+
import { ResourceEnvelope } from './index.js';
|
|
3
|
+
/**
|
|
4
|
+
* @see https://docs.globus.org/api/auth/reference/#policy_resource
|
|
5
|
+
*/
|
|
6
|
+
export type Policy = {
|
|
7
|
+
id: string;
|
|
8
|
+
project_id: string;
|
|
9
|
+
high_assurance: boolean;
|
|
10
|
+
authentication_assurance_timeout: number | null;
|
|
11
|
+
display_name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
domain_constraints_include: string[] | null;
|
|
14
|
+
domain_constraints_exclude: string[] | null;
|
|
15
|
+
required_mfa: boolean;
|
|
16
|
+
};
|
|
17
|
+
type WrappedPolicy = ResourceEnvelope<'policy', Policy>;
|
|
18
|
+
type WrappedPolicies = ResourceEnvelope<'policies', Policy[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Returns a specific policy if the authenticated entity is an admin of the project owning the policy.
|
|
21
|
+
* @see https://docs.globus.org/api/auth/reference/#get_policies
|
|
22
|
+
*/
|
|
23
|
+
export declare const get: (policy_id: string, options?: {
|
|
24
|
+
query?: import("../../../types.js").BaseServiceMethodOptions["query"];
|
|
25
|
+
headers?: import("../../../types.js").BaseServiceMethodOptions["headers"];
|
|
26
|
+
} | undefined, sdkOptions?: import("../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedPolicy>>;
|
|
27
|
+
/**
|
|
28
|
+
* Returns a list of policies the authenticated entity is an admin of.
|
|
29
|
+
* @see https://docs.globus.org/api/auth/reference/#get_policies
|
|
30
|
+
*/
|
|
31
|
+
export declare const getAll: (options?: ({
|
|
32
|
+
payload?: never;
|
|
33
|
+
} & import("../../../types.js").BaseServiceMethodOptions) | undefined, sdkOptions?: import("../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedPolicies>>;
|
|
34
|
+
export type PolicyCreate = Pick<Policy, 'display_name' | 'description'> & Partial<Omit<Policy, 'id'>>;
|
|
35
|
+
/**
|
|
36
|
+
* Create a new policy
|
|
37
|
+
* @see https://docs.globus.org/api/auth/reference/#create_policy
|
|
38
|
+
*/
|
|
39
|
+
export declare const create: (options: ({
|
|
40
|
+
query?: never;
|
|
41
|
+
payload: PolicyCreate;
|
|
42
|
+
} & import("../../../types.js").BaseServiceMethodOptions) | undefined, sdkOptions?: import("../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedPolicy>>;
|
|
43
|
+
/**
|
|
44
|
+
* Update a policy by id. All fields are optional.
|
|
45
|
+
* @see https://docs.globus.org/api/auth/reference/#update_policy
|
|
46
|
+
*/
|
|
47
|
+
export declare const update: (policy_id: string, options: ({
|
|
48
|
+
query?: never;
|
|
49
|
+
payload: Partial<PolicyCreate>;
|
|
50
|
+
} & {
|
|
51
|
+
query?: import("../../../types.js").BaseServiceMethodOptions["query"];
|
|
52
|
+
headers?: import("../../../types.js").BaseServiceMethodOptions["headers"];
|
|
53
|
+
}) | undefined, sdkOptions?: import("../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedPolicy>>;
|
|
54
|
+
/**
|
|
55
|
+
* Delete a policy by id.
|
|
56
|
+
* @see https://docs.globus.org/api/auth/reference/#delete_policy
|
|
57
|
+
*/
|
|
58
|
+
export declare const remove: (policy_id: string, options?: ({
|
|
59
|
+
query?: never;
|
|
60
|
+
payload?: never;
|
|
61
|
+
} & {
|
|
62
|
+
query?: import("../../../types.js").BaseServiceMethodOptions["query"];
|
|
63
|
+
headers?: import("../../../types.js").BaseServiceMethodOptions["headers"];
|
|
64
|
+
}) | undefined, sdkOptions?: import("../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedPolicy>>;
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=policies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policies.d.ts","sourceRoot":"","sources":["../../../../../../src/services/auth/service/developers/policies.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,iBAAiB,EAGlB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,gCA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../../../shared.js';
|
|
3
|
+
/**
|
|
4
|
+
* Returns a specific policy if the authenticated entity is an admin of the project owning the policy.
|
|
5
|
+
* @see https://docs.globus.org/api/auth/reference/#get_policies
|
|
6
|
+
*/
|
|
7
|
+
export const get = function (policy_id, options = {}, sdkOptions) {
|
|
8
|
+
return serviceRequest({
|
|
9
|
+
service: ID,
|
|
10
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
11
|
+
path: `/v2/api/policies/${policy_id}`,
|
|
12
|
+
}, options, sdkOptions);
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Returns a list of policies the authenticated entity is an admin of.
|
|
16
|
+
* @see https://docs.globus.org/api/auth/reference/#get_policies
|
|
17
|
+
*/
|
|
18
|
+
export const getAll = function (options = {}, sdkOptions) {
|
|
19
|
+
return serviceRequest({
|
|
20
|
+
service: ID,
|
|
21
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
22
|
+
path: `/v2/api/policies`,
|
|
23
|
+
}, options, sdkOptions);
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Create a new policy
|
|
27
|
+
* @see https://docs.globus.org/api/auth/reference/#create_policy
|
|
28
|
+
*/
|
|
29
|
+
export const create = function (options, sdkOptions) {
|
|
30
|
+
return serviceRequest({
|
|
31
|
+
service: ID,
|
|
32
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
33
|
+
path: `/v2/api/policies`,
|
|
34
|
+
method: HTTP_METHODS.POST,
|
|
35
|
+
}, Object.assign(Object.assign({}, options), { payload: { policy: options === null || options === void 0 ? void 0 : options.payload } }), sdkOptions);
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Update a policy by id. All fields are optional.
|
|
39
|
+
* @see https://docs.globus.org/api/auth/reference/#update_policy
|
|
40
|
+
*/
|
|
41
|
+
export const update = function (policy_id, options, sdkOptions) {
|
|
42
|
+
return serviceRequest({
|
|
43
|
+
service: ID,
|
|
44
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
45
|
+
path: `/v2/api/policies/${policy_id}`,
|
|
46
|
+
method: HTTP_METHODS.PUT,
|
|
47
|
+
}, Object.assign(Object.assign({}, options), { payload: { policy: options === null || options === void 0 ? void 0 : options.payload } }), sdkOptions);
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Delete a policy by id.
|
|
51
|
+
* @see https://docs.globus.org/api/auth/reference/#delete_policy
|
|
52
|
+
*/
|
|
53
|
+
export const remove = function (policy_id, options, sdkOptions) {
|
|
54
|
+
return serviceRequest({
|
|
55
|
+
service: ID,
|
|
56
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
57
|
+
path: `/v2/api/policies/${policy_id}`,
|
|
58
|
+
method: HTTP_METHODS.DELETE,
|
|
59
|
+
}, options, sdkOptions);
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=policies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policies.js","sourceRoot":"","sources":["../../../../../../src/services/auth/service/developers/policies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AA0BlE;;;GAGG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,UACjB,SAAS,EACT,OAAO,GAAG,EAAE,EACZ,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,eAAe;QAC7B,IAAI,EAAE,oBAAoB,SAAS,EAAE;KACtC,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAAoD,CAAC;AAErD;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UACpB,OAAO,GAAG,EAAE,EACZ,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,eAAe;QAC7B,IAAI,EAAE,kBAAkB;KACzB,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAEE,CAAC;AAKH;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,OAAO,EAAE,UAAW;IAClD,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,eAAe;QAC7B,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,YAAY,CAAC,IAAI;KAC1B,kCACI,OAAO,KAAE,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE,KACnD,UAAU,CACX,CAAC;AACJ,CAGE,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UACpB,SAAS,EACT,OAAO,EACP,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,eAAe;QAC7B,IAAI,EAAE,oBAAoB,SAAS,EAAE;QACrC,MAAM,EAAE,YAAY,CAAC,GAAG;KACzB,kCACI,OAAO,KAAE,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE,KACnD,UAAU,CACX,CAAC;AACJ,CAMC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UACpB,SAAS,EACT,OAAQ,EACR,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,eAAe;QAC7B,IAAI,EAAE,oBAAoB,SAAS,EAAE;QACrC,MAAM,EAAE,YAAY,CAAC,MAAM;KAC5B,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAMC,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { JSONFetchResponse } from '../../../types.js';
|
|
2
|
+
import { Identity } from '../identities/index.js';
|
|
3
|
+
import { ResourceEnvelope } from './index.js';
|
|
4
|
+
type AdminIdentity = Identity & {
|
|
5
|
+
identity_provider: string;
|
|
6
|
+
identity_type: string;
|
|
7
|
+
};
|
|
8
|
+
type AdminGroup = {
|
|
9
|
+
id: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @see https://docs.globus.org/api/auth/reference/#projects_resource
|
|
13
|
+
*/
|
|
14
|
+
export type Project = {
|
|
15
|
+
id: string;
|
|
16
|
+
project_name: string;
|
|
17
|
+
display_name: string;
|
|
18
|
+
contact_email: string;
|
|
19
|
+
admins: {
|
|
20
|
+
identities: AdminIdentity[];
|
|
21
|
+
groups: AdminGroup[];
|
|
22
|
+
};
|
|
23
|
+
admin_ids: string[] | null;
|
|
24
|
+
admin_group_ids: string[] | null;
|
|
25
|
+
};
|
|
26
|
+
type WrappedProject = ResourceEnvelope<'project', Project>;
|
|
27
|
+
type WrappedProjects = ResourceEnvelope<'projects', Project[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Return a specific project by id if the authenticated entity is an admin of that project.
|
|
30
|
+
* @see https://docs.globus.org/api/auth/reference/#get_projects
|
|
31
|
+
*/
|
|
32
|
+
export declare const get: (project_id: string, options?: {
|
|
33
|
+
query?: import("../../../types.js").BaseServiceMethodOptions["query"];
|
|
34
|
+
headers?: import("../../../types.js").BaseServiceMethodOptions["headers"];
|
|
35
|
+
} | undefined, sdkOptions?: import("../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedProject>>;
|
|
36
|
+
/**
|
|
37
|
+
* Return a list of projects the authenticated entity is an admin of.
|
|
38
|
+
* @see https://docs.globus.org/api/auth/reference/#get_projects
|
|
39
|
+
*/
|
|
40
|
+
export declare const getAll: (options?: ({
|
|
41
|
+
payload?: never;
|
|
42
|
+
} & import("../../../types.js").BaseServiceMethodOptions) | undefined, sdkOptions?: import("../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedProjects>>;
|
|
43
|
+
/** Note that project_name is an alias for display_name and is not submitted on create or update */
|
|
44
|
+
type ProjectCreate = Pick<Project, 'display_name' | 'contact_email'> & ({
|
|
45
|
+
admin_ids: string[];
|
|
46
|
+
admin_group_ids?: string[];
|
|
47
|
+
} | {
|
|
48
|
+
admin_ids?: string[];
|
|
49
|
+
admin_group_ids: string[];
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* Create a new project with a set of admins
|
|
53
|
+
*
|
|
54
|
+
* @see https://docs.globus.org/api/auth/reference/#create_project
|
|
55
|
+
*/
|
|
56
|
+
export declare const create: (options: ({
|
|
57
|
+
query?: never;
|
|
58
|
+
payload: ProjectCreate;
|
|
59
|
+
} & import("../../../types.js").BaseServiceMethodOptions) | undefined, sdkOptions?: import("../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedProject>>;
|
|
60
|
+
/**
|
|
61
|
+
* Update a project by id. All fields are optional.
|
|
62
|
+
*
|
|
63
|
+
* @see https://docs.globus.org/api/auth/reference/#update_project
|
|
64
|
+
*/
|
|
65
|
+
export declare const update: (project_id: string, options: ({
|
|
66
|
+
query?: never;
|
|
67
|
+
payload: Partial<ProjectCreate>;
|
|
68
|
+
} & {
|
|
69
|
+
query?: import("../../../types.js").BaseServiceMethodOptions["query"];
|
|
70
|
+
headers?: import("../../../types.js").BaseServiceMethodOptions["headers"];
|
|
71
|
+
}) | undefined, sdkOptions?: import("../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedProject>>;
|
|
72
|
+
/**
|
|
73
|
+
* Delete a project by id.
|
|
74
|
+
*
|
|
75
|
+
* @see https://docs.globus.org/api/auth/reference/#delete_project
|
|
76
|
+
*/
|
|
77
|
+
export declare const remove: (project_id: string, options?: ({
|
|
78
|
+
query?: never;
|
|
79
|
+
payload?: never;
|
|
80
|
+
} & {
|
|
81
|
+
query?: import("../../../types.js").BaseServiceMethodOptions["query"];
|
|
82
|
+
headers?: import("../../../types.js").BaseServiceMethodOptions["headers"];
|
|
83
|
+
}) | undefined, sdkOptions?: import("../../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<WrappedProject>>;
|
|
84
|
+
export {};
|
|
85
|
+
//# sourceMappingURL=projects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../../../../../src/services/auth/service/developers/projects.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,iBAAiB,EAGlB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,KAAK,aAAa,GAAG,QAAQ,GAAG;IAAE,iBAAiB,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC;AACrF,KAAK,UAAU,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE;QACN,UAAU,EAAE,aAAa,EAAE,CAAC;QAC5B,MAAM,EAAE,UAAU,EAAE,CAAC;KACtB,CAAC;IACF,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC3B,eAAe,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAClC,CAAC;AACF,KAAK,cAAc,GAAG,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAC3D,KAAK,eAAe,GAAG,gBAAgB,CAAC,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,GAAG;;;mFAIb,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAWQ,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAM,MAAM;cAeP,KAAK;2IAZd,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAa3C,CAAC;AAEH,mGAAmG;AACnG,KAAK,aAAa,GAAG,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,eAAe,CAAC,GAClE,CACI;IACE,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B,GACD;IACE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,CACJ,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,MAAM;YAYT,KAAK;aACJ,aAAa;2IAb+B,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAc9F,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,MAAM;YAkBP,KAAK;aACJ,OAAO,CAAC,aAAa,CAAC;;;;oFAfhC,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAiB3C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,MAAM;YAkBP,KAAK;cACH,KAAK;;;;oFAfhB,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAiB3C,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ID, SCOPES } from '../../config.js';
|
|
2
|
+
import { HTTP_METHODS, serviceRequest } from '../../../shared.js';
|
|
3
|
+
/**
|
|
4
|
+
* Return a specific project by id if the authenticated entity is an admin of that project.
|
|
5
|
+
* @see https://docs.globus.org/api/auth/reference/#get_projects
|
|
6
|
+
*/
|
|
7
|
+
export const get = function (project_id, options = {}, sdkOptions) {
|
|
8
|
+
return serviceRequest({
|
|
9
|
+
service: ID,
|
|
10
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
11
|
+
path: `/v2/api/projects/${project_id}`,
|
|
12
|
+
method: HTTP_METHODS.GET,
|
|
13
|
+
}, options, sdkOptions);
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Return a list of projects the authenticated entity is an admin of.
|
|
17
|
+
* @see https://docs.globus.org/api/auth/reference/#get_projects
|
|
18
|
+
*/
|
|
19
|
+
export const getAll = function (options = {}, sdkOptions) {
|
|
20
|
+
return serviceRequest({
|
|
21
|
+
service: ID,
|
|
22
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
23
|
+
path: `/v2/api/projects`,
|
|
24
|
+
method: HTTP_METHODS.GET,
|
|
25
|
+
}, options, sdkOptions);
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Create a new project with a set of admins
|
|
29
|
+
*
|
|
30
|
+
* @see https://docs.globus.org/api/auth/reference/#create_project
|
|
31
|
+
*/
|
|
32
|
+
export const create = function (options, sdkOptions) {
|
|
33
|
+
return serviceRequest({
|
|
34
|
+
service: ID,
|
|
35
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
36
|
+
path: `/v2/api/projects`,
|
|
37
|
+
method: HTTP_METHODS.POST,
|
|
38
|
+
}, Object.assign(Object.assign({}, options), { payload: { project: options === null || options === void 0 ? void 0 : options.payload } }), sdkOptions);
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Update a project by id. All fields are optional.
|
|
42
|
+
*
|
|
43
|
+
* @see https://docs.globus.org/api/auth/reference/#update_project
|
|
44
|
+
*/
|
|
45
|
+
export const update = function (project_id, options, sdkOptions) {
|
|
46
|
+
return serviceRequest({
|
|
47
|
+
service: ID,
|
|
48
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
49
|
+
path: `/v2/api/projects/${project_id}`,
|
|
50
|
+
method: HTTP_METHODS.PUT,
|
|
51
|
+
}, Object.assign(Object.assign({}, options), { payload: { project: options === null || options === void 0 ? void 0 : options.payload } }), sdkOptions);
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Delete a project by id.
|
|
55
|
+
*
|
|
56
|
+
* @see https://docs.globus.org/api/auth/reference/#delete_project
|
|
57
|
+
*/
|
|
58
|
+
export const remove = function (project_id, options, sdkOptions) {
|
|
59
|
+
return serviceRequest({
|
|
60
|
+
service: ID,
|
|
61
|
+
scope: SCOPES.MANAGE_PROJECTS,
|
|
62
|
+
path: `/v2/api/projects/${project_id}`,
|
|
63
|
+
method: HTTP_METHODS.DELETE,
|
|
64
|
+
}, options, sdkOptions);
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=projects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../../../../../src/services/auth/service/developers/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AA+BlE;;;GAGG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,UACjB,UAAU,EACV,OAAO,GAAG,EAAE,EACZ,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,eAAe;QAC7B,IAAI,EAAE,oBAAoB,UAAU,EAAE;QACtC,MAAM,EAAE,YAAY,CAAC,GAAG;KACzB,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAAoD,CAAC;AAErD;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UACpB,OAAO,GAAG,EAAE,EACZ,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,eAAe;QAC7B,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,YAAY,CAAC,GAAG;KACzB,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAEE,CAAC;AAeH;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,OAAO,EAAE,UAAW;IAClD,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX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