@globus/sdk 3.0.0-alpha.9 → 3.1.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.
Files changed (204) hide show
  1. package/cjs/index.d.ts +11 -0
  2. package/cjs/index.d.ts.map +1 -1
  3. package/cjs/index.js +12 -1
  4. package/cjs/index.js.map +1 -1
  5. package/cjs/lib/apps/web.d.ts +29 -0
  6. package/cjs/lib/apps/web.d.ts.map +1 -0
  7. package/cjs/lib/apps/web.js +51 -0
  8. package/cjs/lib/apps/web.js.map +1 -0
  9. package/cjs/lib/core/authorization/AuthorizationManager.d.ts +41 -8
  10. package/cjs/lib/core/authorization/AuthorizationManager.d.ts.map +1 -1
  11. package/cjs/lib/core/authorization/AuthorizationManager.js +112 -24
  12. package/cjs/lib/core/authorization/AuthorizationManager.js.map +1 -1
  13. package/cjs/lib/core/authorization/Event.d.ts +5 -1
  14. package/cjs/lib/core/authorization/Event.d.ts.map +1 -1
  15. package/cjs/lib/core/authorization/Event.js.map +1 -1
  16. package/cjs/lib/core/authorization/RedirectTransport.d.ts +12 -1
  17. package/cjs/lib/core/authorization/RedirectTransport.d.ts.map +1 -1
  18. package/cjs/lib/core/authorization/RedirectTransport.js +23 -5
  19. package/cjs/lib/core/authorization/RedirectTransport.js.map +1 -1
  20. package/cjs/lib/core/authorization/TokenLookup.d.ts +6 -1
  21. package/cjs/lib/core/authorization/TokenLookup.d.ts.map +1 -1
  22. package/cjs/lib/core/authorization/TokenLookup.js +40 -5
  23. package/cjs/lib/core/authorization/TokenLookup.js.map +1 -1
  24. package/cjs/lib/core/authorization/tokens.d.ts +1 -0
  25. package/cjs/lib/core/authorization/tokens.d.ts.map +1 -1
  26. package/cjs/lib/core/authorization/tokens.js +1 -0
  27. package/cjs/lib/core/authorization/tokens.js.map +1 -1
  28. package/cjs/lib/core/global.d.ts +7 -6
  29. package/cjs/lib/core/global.d.ts.map +1 -1
  30. package/cjs/lib/core/global.js +3 -0
  31. package/cjs/lib/core/global.js.map +1 -1
  32. package/cjs/lib/core/logger.d.ts +2 -2
  33. package/cjs/lib/core/logger.d.ts.map +1 -1
  34. package/cjs/lib/core/logger.js +3 -3
  35. package/cjs/lib/core/logger.js.map +1 -1
  36. package/cjs/lib/services/auth/config.d.ts +5 -1
  37. package/cjs/lib/services/auth/config.d.ts.map +1 -1
  38. package/cjs/lib/services/auth/config.js +8 -0
  39. package/cjs/lib/services/auth/config.js.map +1 -1
  40. package/cjs/lib/services/auth/index.d.ts +3 -16
  41. package/cjs/lib/services/auth/index.d.ts.map +1 -1
  42. package/cjs/lib/services/auth/index.js +13 -5
  43. package/cjs/lib/services/auth/index.js.map +1 -1
  44. package/cjs/lib/services/auth/service/oauth2/index.d.ts +3 -0
  45. package/cjs/lib/services/auth/service/oauth2/index.d.ts.map +1 -1
  46. package/cjs/lib/services/auth/service/oauth2/index.js +11 -1
  47. package/cjs/lib/services/auth/service/oauth2/index.js.map +1 -1
  48. package/cjs/lib/services/auth/service/oauth2/token.d.ts +19 -1
  49. package/cjs/lib/services/auth/service/oauth2/token.d.ts.map +1 -1
  50. package/cjs/lib/services/auth/service/oauth2/token.js +16 -1
  51. package/cjs/lib/services/auth/service/oauth2/token.js.map +1 -1
  52. package/cjs/lib/services/auth/types.d.ts +40 -12
  53. package/cjs/lib/services/auth/types.d.ts.map +1 -1
  54. package/cjs/lib/services/compute/config.d.ts +7 -0
  55. package/cjs/lib/services/compute/config.d.ts.map +1 -0
  56. package/cjs/lib/services/compute/config.js +16 -0
  57. package/cjs/lib/services/compute/config.js.map +1 -0
  58. package/cjs/lib/services/compute/index.d.ts +14 -0
  59. package/cjs/lib/services/compute/index.d.ts.map +1 -0
  60. package/cjs/lib/services/compute/index.js +18 -0
  61. package/cjs/lib/services/compute/index.js.map +1 -0
  62. package/cjs/lib/services/compute/service/endpoints.d.ts +24 -0
  63. package/cjs/lib/services/compute/service/endpoints.d.ts.map +1 -0
  64. package/cjs/lib/services/compute/service/endpoints.js +29 -0
  65. package/cjs/lib/services/compute/service/endpoints.js.map +1 -0
  66. package/cjs/lib/services/flows/config.d.ts +1 -1
  67. package/cjs/lib/services/flows/config.d.ts.map +1 -1
  68. package/cjs/lib/services/flows/config.js.map +1 -1
  69. package/cjs/lib/services/globus-connect-server/client.d.ts +501 -146
  70. package/cjs/lib/services/globus-connect-server/client.d.ts.map +1 -1
  71. package/cjs/lib/services/globus-connect-server/constants.js +1 -1
  72. package/cjs/lib/services/globus-connect-server/constants.js.map +1 -1
  73. package/cjs/lib/services/groups/config.d.ts +1 -1
  74. package/cjs/lib/services/groups/config.d.ts.map +1 -1
  75. package/cjs/lib/services/groups/config.js.map +1 -1
  76. package/cjs/lib/services/search/config.d.ts +1 -1
  77. package/cjs/lib/services/search/config.d.ts.map +1 -1
  78. package/cjs/lib/services/search/config.js.map +1 -1
  79. package/cjs/lib/services/timer/config.d.ts +1 -1
  80. package/cjs/lib/services/timer/config.d.ts.map +1 -1
  81. package/cjs/lib/services/timer/config.js.map +1 -1
  82. package/cjs/lib/services/transfer/config.d.ts +1 -1
  83. package/cjs/lib/services/transfer/config.d.ts.map +1 -1
  84. package/cjs/lib/services/transfer/config.js.map +1 -1
  85. package/cjs/lib/services/transfer/index.d.ts +1 -0
  86. package/cjs/lib/services/transfer/index.d.ts.map +1 -1
  87. package/cjs/lib/services/transfer/index.js +2 -1
  88. package/cjs/lib/services/transfer/index.js.map +1 -1
  89. package/cjs/lib/services/transfer/service/collection-bookmarks.d.ts +64 -0
  90. package/cjs/lib/services/transfer/service/collection-bookmarks.d.ts.map +1 -0
  91. package/cjs/lib/services/transfer/service/collection-bookmarks.js +59 -0
  92. package/cjs/lib/services/transfer/service/collection-bookmarks.js.map +1 -0
  93. package/cjs/lib/services/transfer/service/endpoint.d.ts +127 -13
  94. package/cjs/lib/services/transfer/service/endpoint.d.ts.map +1 -1
  95. package/cjs/lib/services/transfer/service/endpoint.js +40 -1
  96. package/cjs/lib/services/transfer/service/endpoint.js.map +1 -1
  97. package/cjs/lib/services/transfer/service/task.d.ts +1 -1
  98. package/cjs/lib/services/transfer/types.d.ts +215 -0
  99. package/cjs/lib/services/transfer/types.d.ts.map +1 -1
  100. package/cjs/lib/services/types.d.ts +4 -0
  101. package/cjs/lib/services/types.d.ts.map +1 -1
  102. package/esm/index.d.ts +11 -0
  103. package/esm/index.d.ts.map +1 -1
  104. package/esm/index.js +11 -0
  105. package/esm/index.js.map +1 -1
  106. package/esm/lib/apps/web.d.ts +29 -0
  107. package/esm/lib/apps/web.d.ts.map +1 -0
  108. package/esm/lib/apps/web.js +45 -0
  109. package/esm/lib/apps/web.js.map +1 -0
  110. package/esm/lib/core/authorization/AuthorizationManager.d.ts +41 -8
  111. package/esm/lib/core/authorization/AuthorizationManager.d.ts.map +1 -1
  112. package/esm/lib/core/authorization/AuthorizationManager.js +113 -25
  113. package/esm/lib/core/authorization/AuthorizationManager.js.map +1 -1
  114. package/esm/lib/core/authorization/Event.d.ts +5 -1
  115. package/esm/lib/core/authorization/Event.d.ts.map +1 -1
  116. package/esm/lib/core/authorization/Event.js.map +1 -1
  117. package/esm/lib/core/authorization/RedirectTransport.d.ts +12 -1
  118. package/esm/lib/core/authorization/RedirectTransport.d.ts.map +1 -1
  119. package/esm/lib/core/authorization/RedirectTransport.js +23 -5
  120. package/esm/lib/core/authorization/RedirectTransport.js.map +1 -1
  121. package/esm/lib/core/authorization/TokenLookup.d.ts +6 -1
  122. package/esm/lib/core/authorization/TokenLookup.d.ts.map +1 -1
  123. package/esm/lib/core/authorization/TokenLookup.js +41 -6
  124. package/esm/lib/core/authorization/TokenLookup.js.map +1 -1
  125. package/esm/lib/core/authorization/tokens.d.ts +1 -0
  126. package/esm/lib/core/authorization/tokens.d.ts.map +1 -1
  127. package/esm/lib/core/authorization/tokens.js +1 -0
  128. package/esm/lib/core/authorization/tokens.js.map +1 -1
  129. package/esm/lib/core/global.d.ts +7 -6
  130. package/esm/lib/core/global.d.ts.map +1 -1
  131. package/esm/lib/core/global.js +3 -0
  132. package/esm/lib/core/global.js.map +1 -1
  133. package/esm/lib/core/logger.d.ts +2 -2
  134. package/esm/lib/core/logger.d.ts.map +1 -1
  135. package/esm/lib/core/logger.js +3 -3
  136. package/esm/lib/core/logger.js.map +1 -1
  137. package/esm/lib/services/auth/config.d.ts +5 -1
  138. package/esm/lib/services/auth/config.d.ts.map +1 -1
  139. package/esm/lib/services/auth/config.js +8 -0
  140. package/esm/lib/services/auth/config.js.map +1 -1
  141. package/esm/lib/services/auth/index.d.ts +3 -16
  142. package/esm/lib/services/auth/index.d.ts.map +1 -1
  143. package/esm/lib/services/auth/index.js +10 -4
  144. package/esm/lib/services/auth/index.js.map +1 -1
  145. package/esm/lib/services/auth/service/oauth2/index.d.ts +3 -0
  146. package/esm/lib/services/auth/service/oauth2/index.d.ts.map +1 -1
  147. package/esm/lib/services/auth/service/oauth2/index.js +10 -0
  148. package/esm/lib/services/auth/service/oauth2/index.js.map +1 -1
  149. package/esm/lib/services/auth/service/oauth2/token.d.ts +19 -1
  150. package/esm/lib/services/auth/service/oauth2/token.d.ts.map +1 -1
  151. package/esm/lib/services/auth/service/oauth2/token.js +15 -0
  152. package/esm/lib/services/auth/service/oauth2/token.js.map +1 -1
  153. package/esm/lib/services/auth/types.d.ts +40 -12
  154. package/esm/lib/services/auth/types.d.ts.map +1 -1
  155. package/esm/lib/services/compute/config.d.ts +7 -0
  156. package/esm/lib/services/compute/config.d.ts.map +1 -0
  157. package/esm/lib/services/compute/config.js +13 -0
  158. package/esm/lib/services/compute/config.js.map +1 -0
  159. package/esm/lib/services/compute/index.d.ts +14 -0
  160. package/esm/lib/services/compute/index.d.ts.map +1 -0
  161. package/esm/lib/services/compute/index.js +14 -0
  162. package/esm/lib/services/compute/index.js.map +1 -0
  163. package/esm/lib/services/compute/service/endpoints.d.ts +24 -0
  164. package/esm/lib/services/compute/service/endpoints.d.ts.map +1 -0
  165. package/esm/lib/services/compute/service/endpoints.js +26 -0
  166. package/esm/lib/services/compute/service/endpoints.js.map +1 -0
  167. package/esm/lib/services/flows/config.d.ts +1 -1
  168. package/esm/lib/services/flows/config.d.ts.map +1 -1
  169. package/esm/lib/services/flows/config.js.map +1 -1
  170. package/esm/lib/services/globus-connect-server/client.d.ts +501 -146
  171. package/esm/lib/services/globus-connect-server/client.d.ts.map +1 -1
  172. package/esm/lib/services/globus-connect-server/constants.js +1 -1
  173. package/esm/lib/services/globus-connect-server/constants.js.map +1 -1
  174. package/esm/lib/services/groups/config.d.ts +1 -1
  175. package/esm/lib/services/groups/config.d.ts.map +1 -1
  176. package/esm/lib/services/groups/config.js.map +1 -1
  177. package/esm/lib/services/search/config.d.ts +1 -1
  178. package/esm/lib/services/search/config.d.ts.map +1 -1
  179. package/esm/lib/services/search/config.js.map +1 -1
  180. package/esm/lib/services/timer/config.d.ts +1 -1
  181. package/esm/lib/services/timer/config.d.ts.map +1 -1
  182. package/esm/lib/services/timer/config.js.map +1 -1
  183. package/esm/lib/services/transfer/config.d.ts +1 -1
  184. package/esm/lib/services/transfer/config.d.ts.map +1 -1
  185. package/esm/lib/services/transfer/config.js.map +1 -1
  186. package/esm/lib/services/transfer/index.d.ts +1 -0
  187. package/esm/lib/services/transfer/index.d.ts.map +1 -1
  188. package/esm/lib/services/transfer/index.js +1 -0
  189. package/esm/lib/services/transfer/index.js.map +1 -1
  190. package/esm/lib/services/transfer/service/collection-bookmarks.d.ts +64 -0
  191. package/esm/lib/services/transfer/service/collection-bookmarks.d.ts.map +1 -0
  192. package/esm/lib/services/transfer/service/collection-bookmarks.js +56 -0
  193. package/esm/lib/services/transfer/service/collection-bookmarks.js.map +1 -0
  194. package/esm/lib/services/transfer/service/endpoint.d.ts +127 -13
  195. package/esm/lib/services/transfer/service/endpoint.d.ts.map +1 -1
  196. package/esm/lib/services/transfer/service/endpoint.js +39 -0
  197. package/esm/lib/services/transfer/service/endpoint.js.map +1 -1
  198. package/esm/lib/services/transfer/service/task.d.ts +1 -1
  199. package/esm/lib/services/transfer/types.d.ts +215 -0
  200. package/esm/lib/services/transfer/types.d.ts.map +1 -1
  201. package/esm/lib/services/types.d.ts +4 -0
  202. package/esm/lib/services/types.d.ts.map +1 -1
  203. package/package.json +4 -3
  204. package/umd/globus.production.js +1 -1
@@ -9,11 +9,11 @@ let logger;
9
9
  let level = LOG_LEVELS.indexOf('error');
10
10
  /**
11
11
  * Set the global logger for the SDK.
12
- * @param logMechnism The logger to use.
12
+ * @param logMechanism The logger to use.
13
13
  * @example `log.setLogger(console)`
14
14
  */
15
- export function setLogger(logMechnism) {
16
- logger = logMechnism;
15
+ export function setLogger(logMechanism) {
16
+ logger = logMechanism;
17
17
  }
18
18
  /**
19
19
  * Set the global log level for the logger.
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../src/lib/core/logger.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAU,CAAC;AAa/D;;GAEG;AACH,IAAI,MAA0B,CAAC;AAC/B;;GAEG;AACH,IAAI,KAAK,GAAW,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAChD;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,WAAmB;IAC3C,MAAM,GAAG,WAAW,CAAC;AACvB,CAAC;AACD;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,QAAkB;IAC5C,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACvC,CAAC;AACD;;;;;GAKG;AACH,MAAM,UAAU,GAAG,CAAC,QAAkB,EAAE,GAAG,IAAe;;IACxD,IAAI,CAAC,MAAM;QAAE,OAAO;IACpB;;OAEG;IACH,IAAI,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,KAAK,EAAE,CAAC;QACzC,OAAO;IACT,CAAC;IACD;;OAEG;IACH,MAAM,OAAO,GAAG,MAAA,MAAM,CAAC,QAAQ,CAAC,mCAAI,MAAM,CAAC,GAAG,CAAC;IAC/C,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;AACnB,CAAC"}
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../src/lib/core/logger.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAU,CAAC;AAa/D;;GAEG;AACH,IAAI,MAA0B,CAAC;AAC/B;;GAEG;AACH,IAAI,KAAK,GAAW,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAChD;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,YAAoB;IAC5C,MAAM,GAAG,YAAY,CAAC;AACxB,CAAC;AACD;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,QAAkB;IAC5C,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACvC,CAAC;AACD;;;;;GAKG;AACH,MAAM,UAAU,GAAG,CAAC,QAAkB,EAAE,GAAG,IAAe;;IACxD,IAAI,CAAC,MAAM;QAAE,OAAO;IACpB;;OAEG;IACH,IAAI,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,KAAK,EAAE,CAAC;QACzC,OAAO;IACT,CAAC;IACD;;OAEG;IACH,MAAM,OAAO,GAAG,MAAA,MAAM,CAAC,QAAQ,CAAC,mCAAI,MAAM,CAAC,GAAG,CAAC;IAC/C,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;AACnB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Environment } from '../../core/global.js';
2
- export declare const ID = "AUTH";
2
+ export declare const ID: "AUTH";
3
3
  export declare const HOSTS: Partial<Record<Environment, string>>;
4
4
  export declare const SCOPES: {
5
5
  VIEW_IDENTITIES: string;
@@ -8,5 +8,9 @@ export declare const RESOURCE_SERVERS: {
8
8
  AUTH: string;
9
9
  TRANSFER: string;
10
10
  FLOWS: string;
11
+ GROUPS: string;
12
+ SEARCH: string;
13
+ TIMER: string;
14
+ COMPUTE: string;
11
15
  };
12
16
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/auth/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,eAAO,MAAM,EAAE,SAAS,CAAC;AACzB,eAAO,MAAM,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAOtD,CAAC;AAEF,eAAO,MAAM,MAAM;;CAElB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/auth/config.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,eAAO,MAAM,EAAE,QAAkB,CAAC;AAClC,eAAO,MAAM,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAOtD,CAAC;AAEF,eAAO,MAAM,MAAM;;CAElB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;CAQ5B,CAAC"}
@@ -1,5 +1,9 @@
1
1
  import { ID as TRANSFER } from '../transfer/config.js';
2
2
  import { ID as FLOWS } from '../flows/config.js';
3
+ import { ID as TIMER } from '../timer/config.js';
4
+ import { ID as GROUPS } from '../groups/config.js';
5
+ import { ID as SEARCH } from '../search/config.js';
6
+ import { ID as COMPUTE } from '../compute/config.js';
3
7
  export const ID = 'AUTH';
4
8
  export const HOSTS = {
5
9
  integration: 'auth.integration.globuscs.info',
@@ -16,5 +20,9 @@ export const RESOURCE_SERVERS = {
16
20
  [ID]: 'auth.globus.org',
17
21
  [TRANSFER]: 'transfer.api.globus.org',
18
22
  [FLOWS]: 'flows.api.globus.org',
23
+ [GROUPS]: 'groups.api.globus.org',
24
+ [SEARCH]: 'search.api.globus.org',
25
+ [TIMER]: '524230d7-ea86-4a52-8312-86065a9e0417',
26
+ [COMPUTE]: 'funcx_service',
19
27
  };
20
28
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../src/lib/services/auth/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,EAAE,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAIjD,MAAM,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC;AACzB,MAAM,CAAC,MAAM,KAAK,GAAyC;IACzD,WAAW,EAAE,gCAAgC;IAC7C,OAAO,EAAE,4BAA4B;IACrC,UAAU,EAAE,iBAAiB;IAC7B,IAAI,EAAE,yBAAyB;IAC/B,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,yBAAyB;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,eAAe,EAAE,uDAAuD;CACzE,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,CAAC,EAAE,CAAC,EAAE,iBAAiB;IACvB,CAAC,QAAQ,CAAC,EAAE,yBAAyB;IACrC,CAAC,KAAK,CAAC,EAAE,sBAAsB;CAChC,CAAC"}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../src/lib/services/auth/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,EAAE,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,EAAE,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAIrD,MAAM,CAAC,MAAM,EAAE,GAAG,MAAe,CAAC;AAClC,MAAM,CAAC,MAAM,KAAK,GAAyC;IACzD,WAAW,EAAE,gCAAgC;IAC7C,OAAO,EAAE,4BAA4B;IACrC,UAAU,EAAE,iBAAiB;IAC7B,IAAI,EAAE,yBAAyB;IAC/B,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,yBAAyB;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,eAAe,EAAE,uDAAuD;CACzE,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,CAAC,EAAE,CAAC,EAAE,iBAAiB;IACvB,CAAC,QAAQ,CAAC,EAAE,yBAAyB;IACrC,CAAC,KAAK,CAAC,EAAE,sBAAsB;IAC/B,CAAC,MAAM,CAAC,EAAE,uBAAuB;IACjC,CAAC,MAAM,CAAC,EAAE,uBAAuB;IACjC,CAAC,KAAK,CAAC,EAAE,sCAAsC;IAC/C,CAAC,OAAO,CAAC,EAAE,eAAe;CAC3B,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import * as AUTH from './config.js';
2
+ import type { Token, TokenWithRefresh, TokenResponse } from './types.js';
2
3
  /**
3
4
  * @private
4
5
  * @internal
@@ -8,21 +9,7 @@ export declare function getAuthorizationEndpoint(): string;
8
9
  export declare function getTokenEndpoint(): string;
9
10
  export * as identities from './service/identities.js';
10
11
  export * as oauth2 from './service/oauth2/index.js';
11
- export type Token = {
12
- access_token: string;
13
- scope: string;
14
- expires_in: number;
15
- token_type: string;
16
- resource_server: string;
17
- refresh_token?: string;
18
- };
19
- /**
20
- * @see https://docs.globus.org/api/auth/reference/#authorization_code_grant_preferred
21
- */
22
- export type TokenResponse = Token & {
23
- state: string;
24
- id_token?: string;
25
- other_tokens: Token[];
26
- };
12
+ export declare function isToken(check: unknown): check is Token;
13
+ export declare function isRefreshToken(check: unknown): check is TokenWithRefresh;
27
14
  export declare function isGlobusAuthTokenResponse(check: unknown): check is TokenResponse;
28
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/auth/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC;;;GAGG;AACH,eAAO,MAAM,MAAM,aAAO,CAAC;AAE3B,wBAAgB,wBAAwB,WAEvC;AAED,wBAAgB,gBAAgB,WAE/B;AAED,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAEpD,MAAM,MAAM,KAAK,GAAG;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AACF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,KAAK,EAAE,CAAC;CACvB,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAOhF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/auth/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,OAAO,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,MAAM,aAAO,CAAC;AAE3B,wBAAgB,wBAAwB,WAEvC;AAED,wBAAgB,gBAAgB,WAE/B;AAED,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAEpD,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,KAAK,CAEtD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAExE;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAKhF"}
@@ -19,10 +19,16 @@ export function getTokenEndpoint() {
19
19
  }
20
20
  export * as identities from './service/identities.js';
21
21
  export * as oauth2 from './service/oauth2/index.js';
22
+ export function isToken(check) {
23
+ return typeof check === 'object' && check !== null && 'access_token' in check;
24
+ }
25
+ export function isRefreshToken(check) {
26
+ return isToken(check) && check !== null && 'refresh_token' in check;
27
+ }
22
28
  export function isGlobusAuthTokenResponse(check) {
23
- return (typeof check === 'object' &&
24
- check !== null &&
25
- 'resource_server' in check &&
26
- check.resource_server === AUTH.RESOURCE_SERVERS.AUTH);
29
+ /**
30
+ * @todo This could be made more robust by checking whether the `resource_server` is a well-known value.
31
+ */
32
+ return isToken(check) && check !== null && 'resource_server' in check;
27
33
  }
28
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/services/auth/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC;AAE3B,MAAM,UAAU,wBAAwB;IACtC,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,sBAAsB,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,OAAO,KAAK,CAAC,IAAI,CAAC,EA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EG;IACH,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,iBAAiB,IAAI,KAAK,CAAC;AACxE,CAAC"}
@@ -1,2 +1,5 @@
1
+ export declare const userinfo: (options?: ({
2
+ payload: never;
3
+ } & import("../../../types.js").BaseServiceMethodOptions) | undefined, sdkOptions?: import("../../../types.js").SDKOptions | undefined) => Promise<Response>;
1
4
  export * as token from './token.js';
2
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/services/auth/service/oauth2/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/services/auth/service/oauth2/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ;aAYV,KAAK;4JACd,CAAC;AAEH,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC"}
@@ -1,2 +1,12 @@
1
+ import { ID } from '../../config.js';
2
+ import { HTTP_METHODS, serviceRequest } from '../../../../services/shared.js';
3
+ export const userinfo = function (options, sdkOptions) {
4
+ return serviceRequest({
5
+ service: ID,
6
+ scope: undefined,
7
+ path: `/v2/oauth2/userinfo`,
8
+ method: HTTP_METHODS.GET,
9
+ }, options, sdkOptions);
10
+ };
1
11
  export * as token from './token.js';
2
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/lib/services/auth/service/oauth2/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/lib/services/auth/service/oauth2/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAI9E,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,OAAQ,EAAE,UAAW;IACrD,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,qBAAqB;QAC3B,MAAM,EAAE,YAAY,CAAC,GAAG;KACzB,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAEE,CAAC;AAEH,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC"}
@@ -4,12 +4,23 @@ type IntrospectPayload = {
4
4
  };
5
5
  type RevokePayload = {
6
6
  token: string;
7
- token_type_hint?: 'access_token';
7
+ /**
8
+ * This is an undocumented property that is required for the request to be successful.
9
+ */
10
+ client_id: string;
8
11
  };
9
12
  type ValidatePayload = {
10
13
  token: string;
11
14
  client_id: string;
12
15
  };
16
+ type RefreshPayload = {
17
+ refresh_token: string;
18
+ grant_type: 'refresh_token';
19
+ /**
20
+ * This is an undocumented property that is required for the request to be successful.
21
+ */
22
+ client_id: string;
23
+ };
13
24
  /**
14
25
  * Token Introspection
15
26
  * @see https://docs.globus.org/api/auth/reference/#token-introspect
@@ -24,6 +35,13 @@ export declare const introspect: (options: ({
24
35
  export declare const revoke: (options: ({
25
36
  payload: RevokePayload;
26
37
  } & import("../../../types.js").BaseServiceMethodOptions) | undefined, sdkOptions?: import("../../../types.js").SDKOptions | undefined) => Promise<Response>;
38
+ /**
39
+ * Token Refresh
40
+ * @see https://docs.globus.org/api/auth/reference/#refresh_token_grant
41
+ */
42
+ export declare const refresh: (options: ({
43
+ payload: RefreshPayload;
44
+ } & import("../../../types.js").BaseServiceMethodOptions) | undefined, sdkOptions?: import("../../../types.js").SDKOptions | undefined) => Promise<Response>;
27
45
  /**
28
46
  * @private
29
47
  * @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.
@@ -1 +1 @@
1
- {"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/services/auth/service/oauth2/token.ts"],"names":[],"mappings":"AAKA,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,cAAc,CAAC;CAClC,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAiCF;;;GAGG;AACH,eAAO,MAAM,UAAU;aAeZ,iBAAiB;4JAC1B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,MAAM;aAeR,aAAa;4JACtB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,QAAQ;aAeV,eAAe;4JACxB,CAAC"}
1
+ {"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/services/auth/service/oauth2/token.ts"],"names":[],"mappings":"AAKA,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,eAAe,CAAC;IAC5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAiCF;;;GAGG;AACH,eAAO,MAAM,UAAU;aAeZ,iBAAiB;4JAC1B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,MAAM;aAeR,aAAa;4JACtB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,OAAO;aAeT,cAAc;4JACvB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,QAAQ;aAeV,eAAe;4JACxB,CAAC"}
@@ -48,6 +48,21 @@ export const revoke = function (options, sdkOptions) {
48
48
  method: HTTP_METHODS.POST,
49
49
  }, injectServiceOptions(options), sdkOptions);
50
50
  };
51
+ /**
52
+ * Token Refresh
53
+ * @see https://docs.globus.org/api/auth/reference/#refresh_token_grant
54
+ */
55
+ export const refresh = function (options, sdkOptions) {
56
+ if (!(options === null || options === void 0 ? void 0 : options.payload)) {
57
+ throw new Error(`'payload' is required for revoke`);
58
+ }
59
+ return serviceRequest({
60
+ service: ID,
61
+ scope: undefined,
62
+ path: `/v2/oauth2/token`,
63
+ method: HTTP_METHODS.POST,
64
+ }, injectServiceOptions(options), sdkOptions);
65
+ };
51
66
  /**
52
67
  * @private
53
68
  * @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.
@@ -1 +1 @@
1
- {"version":3,"file":"token.js","sourceRoot":"","sources":["../../../../../../../src/lib/services/auth/service/oauth2/token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAqB9E,SAAS,SAAS,CAAC,OAA2B;IAC5C,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,SAAS,oBAAoB,CAC3B,OAEC;IAED,uCACK,OAAO;QACV;;;WAGG;QACH,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,EAChC,OAAO,kCACF,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,KAAI,EAAE,CAAC;YAC3B;;eAEG;YACH,cAAc,EAAE,kDAAkD,OAEpE;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAA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CAAC;AACJ,CAEE,CAAC"}
1
+ {"version":3,"file":"token.js","sourceRoot":"","sources":["../../../../../../../src/lib/services/auth/service/oauth2/token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAiC9E,SAAS,SAAS,CAAC,OAA2B;IAC5C,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,SAAS,oBAAoB,CAC3B,OAEC;IAED,uCACK,OAAO;QACV;;;WAGG;QACH,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,EAChC,OAAO,kCACF,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,KAAI,EAAE,CAAC;YAC3B;;eAEG;YACH,cAAc,EAAE,kDAAkD,OAEpE;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,OAAO,EAAE,UAAW;IACtD,IAAI,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAA,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,6BAA6B;QACnC,MAAM,EAAE,YAAY,CAAC,IAAI;KAC1B,EACD,oBAAoB,CAAC,OAAO,CAAC,EAC7B,UAAU,CACX,CAAC;AACJ,CAEE,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,OAAO,EAAE,UAAW;IAClD,IAAI,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAA,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,yBAAyB;QAC/B,MAAM,EAAE,YAAY,CAAC,IAAI;KAC1B,EACD,oBAAoB,CAAC,OAAO,CAAC,EAC7B,UAAU,CACX,CAAC;AACJ,CAEE,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,OAAO,EAAE,UAAW;IACnD,IAAI,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAA,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,YAAY,CAAC,IAAI;KAC1B,EACD,oBAAoB,CAAC,OAAO,CAAC,EAC7B,UAAU,CACX,CAAC;AACJ,CAEE,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,OAAO,EAAE,UAAW;IACpD,IAAI,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAA,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,2BAA2B;QACjC,MAAM,EAAE,YAAY,CAAC,IAAI;KAC1B,EACD,oBAAoB,CAAC,OAAO,CAAC,EAC7B,UAAU,CACX,CAAC;AACJ,CAEE,CAAC"}
@@ -1,15 +1,43 @@
1
- import ITokenResponse from 'js-pkce/dist/ITokenResponse';
2
- export declare namespace Globus.Auth {
3
- type Token = ITokenResponse & {
4
- resource_server: string;
5
- id_token?: string;
6
- };
1
+ import type { JwtPayload } from 'jwt-decode';
2
+ export type Token = {
3
+ access_token: string;
4
+ scope: string;
5
+ expires_in: number;
6
+ token_type: string;
7
+ resource_server: string;
8
+ refresh_token?: string;
9
+ };
10
+ export type TokenWithRefresh = Token & {
11
+ refresh_token: string;
12
+ };
13
+ /**
14
+ * @see https://docs.globus.org/api/auth/reference/#authorization_code_grant_preferred
15
+ */
16
+ export type TokenResponse = Token & {
17
+ state: string;
7
18
  /**
8
- * @see https://docs.globus.org/api/auth/reference/#authorization_code_grant_preferred
19
+ * Only included if your client requests the openid scope during the authorization request.
9
20
  */
10
- type TokenResponse = Token & {
11
- state: string;
12
- other_tokens: Token[];
13
- };
14
- }
21
+ id_token?: string;
22
+ other_tokens?: Token[];
23
+ };
24
+ type JwtUserIdentity = {
25
+ sub: JwtPayload['sub'];
26
+ organization?: string;
27
+ name?: string;
28
+ identity_provider?: string;
29
+ identity_provider_display_name?: string;
30
+ email?: string;
31
+ last_authentication?: number;
32
+ };
33
+ /**
34
+ * The properties of the decoded `id_token` are dictated by the scopes requested
35
+ * during the authorization request; `openid profile email` will return a fully
36
+ * populated object, while `openid` will return a minimal object.
37
+ */
38
+ export type JwtUserInfo = Pick<JwtPayload, 'iss' | 'aud' | 'exp' | 'iat' | 'sub'> & JwtUserIdentity & {
39
+ preferred_username?: string;
40
+ identity_set?: JwtUserIdentity[];
41
+ };
42
+ export {};
15
43
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/auth/types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,6BAA6B,CAAC;AAEzD,yBAAiB,MAAM,CAAC,IAAI,CAAC;IAC3B,KAAY,KAAK,GAAG,cAAc,GAAG;QACnC,eAAe,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF;;OAEG;IACH,KAAY,aAAa,GAAG,KAAK,G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CAAC,EAAE,eAAe,EAAE,CAAC;CAClC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { Environment } from '../../core/global.js';
2
+ export declare const ID: "COMPUTE";
3
+ export declare const HOSTS: Partial<Record<Environment, string>>;
4
+ export declare const SCOPES: {
5
+ ALL: string;
6
+ };
7
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/compute/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,eAAO,MAAM,EAAE,WAAqB,CAAC;AACrC,eAAO,MAAM,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAOtD,CAAC;AAEF,eAAO,MAAM,MAAM;;CAElB,CAAC"}
@@ -0,0 +1,13 @@
1
+ export const ID = 'COMPUTE';
2
+ export const HOSTS = {
3
+ sandbox: 'compute.api.sandbox.globuscs.info',
4
+ production: 'compute.api.globus.org',
5
+ staging: 'compute.api.staging.globuscs.info',
6
+ integration: 'compute.api.integration.globuscs.info',
7
+ test: 'compute.api.test.globuscs.info',
8
+ preview: 'compute.api.preview.globus.org',
9
+ };
10
+ export const SCOPES = {
11
+ ALL: 'https://auth.globus.org/scopes/facd7ccc-c5f4-42aa-916b-a0e270e2c2a9/all',
12
+ };
13
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../src/lib/services/compute/config.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,EAAE,GAAG,SAAkB,CAAC;AACrC,MAAM,CAAC,MAAM,KAAK,GAAyC;IACzD,OAAO,EAAE,mCAAmC;IAC5C,UAAU,EAAE,wBAAwB;IACpC,OAAO,EAAE,mCAAmC;IAC5C,WAAW,EAAE,uCAAuC;IACpD,IAAI,EAAE,gCAAgC;IACtC,OAAO,EAAE,gCAAgC;CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,GAAG,EAAE,yEAAyE;CAC/E,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @description A wrapper around the Globus Compute service.
3
+ * @group Service
4
+ * @see [Globus Compute API Documentation](https://api2.funcx.org/redoc)
5
+ * @module
6
+ */
7
+ import * as COMPUTE from './config.js';
8
+ /**
9
+ * @private
10
+ * @internal
11
+ */
12
+ export declare const CONFIG: typeof COMPUTE;
13
+ export * as endpoints from './service/endpoints.js';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/compute/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,OAAO,MAAM,aAAa,CAAC;AAEvC;;;GAGG;AACH,eAAO,MAAM,MAAM,gBAAU,CAAC;AAE9B,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @description A wrapper around the Globus Compute service.
3
+ * @group Service
4
+ * @see [Globus Compute API Documentation](https://api2.funcx.org/redoc)
5
+ * @module
6
+ */
7
+ import * as COMPUTE from './config.js';
8
+ /**
9
+ * @private
10
+ * @internal
11
+ */
12
+ export const CONFIG = COMPUTE;
13
+ export * as endpoints from './service/endpoints.js';
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/services/compute/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,OAAO,MAAM,aAAa,CAAC;AAEvC;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC;AAE9B,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { operations } from '@globus/types/compute';
2
+ import type { JSONFetchResponse } from '../../types.js';
3
+ export declare const getAll: (options?: ({
4
+ query: operations['get_endpoints_v2_endpoints_get']['parameters']['query'];
5
+ } & import("../../types.js").BaseServiceMethodOptions) | undefined, sdkOptions?: import("../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<operations['get_endpoints_v2_endpoints_get']['responses']['200']['content']['application/json']>>;
6
+ export declare const get: (endpoint_uuid: string, options?: ({
7
+ query?: undefined;
8
+ payload?: undefined;
9
+ } & {
10
+ query?: {
11
+ [key: string]: string | number | boolean | (string | number | null | undefined)[] | null | undefined;
12
+ } | undefined;
13
+ headers?: import("../../types.js").Headers | undefined;
14
+ }) | undefined, sdkOptions?: import("../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<operations['get_endpoint_v2_endpoints__endpoint_uuid__get']['responses']['200']['content']['application/json']>>;
15
+ export declare const getStatus: (endpoint_uuid: string, options?: ({
16
+ query?: undefined;
17
+ payload?: undefined;
18
+ } & {
19
+ query?: {
20
+ [key: string]: string | number | boolean | (string | number | null | undefined)[] | null | undefined;
21
+ } | undefined;
22
+ headers?: import("../../types.js").Headers | undefined;
23
+ }) | undefined, sdkOptions?: import("../../types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<operations['get_endpoint_status_v2_endpoints__endpoint_uuid__status_get']['responses']['200']['content']['application/json']>>;
24
+ //# sourceMappingURL=endpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/services/compute/service/endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIxD,OAAO,KAAK,EAGV,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAExB,eAAO,MAAM,MAAM;WAmBV,UAAU,CAAC,gCAAgC,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;qIAhBzE,QACD,kBACE,UAAU,CAAC,gCAAgC,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAChG,CAcD,CAAC;AAEH,eAAO,MAAM,GAAG;;;;;;;;iFAIb,QACD,kBACE,UAAU,CAAC,+CAA+C,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAC/G,CAkBF,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;iFAInB,QACD,kBACE,UAAU,CAAC,6DAA6D,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAC7H,CAiBF,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { HTTP_METHODS, serviceRequest } from '../../shared.js';
2
+ import { ID, SCOPES } from '../config.js';
3
+ export const getAll = function (options, sdkOptions) {
4
+ return serviceRequest({
5
+ service: ID,
6
+ scope: SCOPES.ALL,
7
+ path: '/v2/endpoints',
8
+ method: HTTP_METHODS.GET,
9
+ }, options, sdkOptions);
10
+ };
11
+ export const get = function (endpoint_uuid, options, sdkOptions) {
12
+ return serviceRequest({
13
+ service: ID,
14
+ scope: SCOPES.ALL,
15
+ path: `/v2/endpoints/${endpoint_uuid}`,
16
+ method: HTTP_METHODS.GET,
17
+ }, options, sdkOptions);
18
+ };
19
+ export const getStatus = function (endpoint_uuid, options, sdkOptions) {
20
+ return serviceRequest({
21
+ service: ID,
22
+ scope: SCOPES.ALL,
23
+ path: `/v2/endpoints/${endpoint_uuid}/status`,
24
+ }, options, sdkOptions);
25
+ };
26
+ //# sourceMappingURL=endpoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../../../../../src/lib/services/compute/service/endpoints.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAQ1C,MAAM,CAAC,MAAM,MAAM,GAAG,UACpB,OAAQ,EACR,UAAW;IAMX,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,GAAG;QACjB,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,YAAY,CAAC,GAAG;KACzB,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAEE,CAAC;AAEH,MAAM,CAAC,MAAM,GAAG,GAAG,UACjB,aAAa,EACb,OAAQ,EACR,UAAW;IAMX,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,GAAG;QACjB,IAAI,EAAE,iBAAiB,aAAa,EAAE;QACtC,MAAM,EAAE,YAAY,CAAC,GAAG;KACzB,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAMC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,UACvB,aAAa,EACb,OAAQ,EACR,UAAW;IAMX,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,GAAG;QACjB,IAAI,EAAE,iBAAiB,aAAa,SAAS;KAC9C,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAMC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Environment } from '../../core/global.js';
2
- export declare const ID = "FLOWS";
2
+ export declare const ID: "FLOWS";
3
3
  export declare const HOSTS: Partial<Record<Environment, string>>;
4
4
  /**
5
5
  * @see https://docs.globus.org/api/flows/overview/#scopes
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/flows/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,eAAO,MAAM,EAAE,UAAU,CAAC;AAC1B,eAAO,MAAM,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAOtD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/flows/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,eAAO,MAAM,EAAE,SAAmB,CAAC;AACnC,eAAO,MAAM,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAOtD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../src/lib/services/flows/config.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,EAAE,GAAG,OAAO,CAAC;AAC1B,MAAM,CAAC,MAAM,KAAK,GAAyC;IACzD,OAAO,EAAE,mCAAmC;IAC5C,UAAU,EAAE,kBAAkB;IAC9B,OAAO,EAAE,mCAAmC;IAC5C,WAAW,EAAE,uCAAuC;IACpD,IAAI,EAAE,gCAAgC;IACtC,OAAO,EAAE,mCAAmC;CAC7C,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,YAAY,EAAE,kFAAkF;IAChG,UAAU,EAAE,gFAAgF;IAC5F,GAAG,EAAE,yEAAyE;IAC9E,UAAU,EAAE,gFAAgF;IAC5F,UAAU,EAAE,gFAAgF;CAC7F,CAAC"}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../src/lib/services/flows/config.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,EAAE,GAAG,OAAgB,CAAC;AACnC,MAAM,CAAC,MAAM,KAAK,GAAyC;IACzD,OAAO,EAAE,mCAAmC;IAC5C,UAAU,EAAE,kBAAkB;IAC9B,OAAO,EAAE,mCAAmC;IAC5C,WAAW,EAAE,uCAAuC;IACpD,IAAI,EAAE,gCAAgC;IACtC,OAAO,EAAE,mCAAmC;CAC7C,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,YAAY,EAAE,kFAAkF;IAChG,UAAU,EAAE,gFAAgF;IAC5F,GAAG,EAAE,yEAAyE;IAC9E,UAAU,EAAE,gFAAgF;IAC5F,UAAU,EAAE,gFAAgF;CAC7F,CAAC"}