@globus/sdk 0.1.6-alpha.0 → 0.1.8-alpha.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.
@@ -1,729 +0,0 @@
1
- namespace Globus.Transfer {
2
- /**
3
- * @see https://docs.globus.org/api/transfer/file_operations/#list_directory_contents
4
- */
5
- export type DirectoryListingQuery = {
6
- path?: string;
7
- show_hidden?: "true" | "false";
8
- limit?: `${number}`;
9
- offset?: `${number}`;
10
- orderby?: string;
11
- filter?: string;
12
- };
13
- }
14
-
15
- declare namespace Globus.Transfer.Request {
16
- export interface Mkdir {
17
- path: string;
18
- }
19
- export interface Rename {
20
- DATA_TYPE: "mkdir";
21
- old_path: string;
22
- new_path: string;
23
- }
24
- export interface Symlink {
25
- DATA_TYPE: "symlink";
26
- path: string;
27
- symlink_target: string;
28
- }
29
-
30
- export interface Delete {
31
- DATA_TYPE: "delete";
32
- endpoint: string;
33
- submission_id: string;
34
- DATA: { DATA_TYPE: string; path: string }[];
35
- ignore_missing?: boolean;
36
- recursive?: boolean;
37
- }
38
-
39
- export interface Transfer {
40
- DATA_TYPE: "transfer";
41
- }
42
- }
43
-
44
- // Type definitions for Globus Transfer
45
- declare namespace Globus.Transfer {
46
- export enum DATA_TYPE {
47
- access = "access",
48
- bookmark = "bookmark",
49
- endpoint = "endpoint",
50
- event = "event",
51
- file = "file",
52
- filter_rule = "filter_rule",
53
- pause_rule_limited = "pause_rule_limited",
54
- pause_info_limited = "pause_info_limited",
55
- server = "server",
56
- skipped_error = "skipped_error",
57
- successful_transfer = "successful_transfer",
58
- skipped_errors = "skipped_errors",
59
- successful_transfers = "successful_transfers",
60
- role = "role",
61
- task = "task",
62
- access_list = "access_list",
63
- bookmark_list = "bookmark_list",
64
- endpoint_list = "endpoint_list",
65
- event_list = "event_list",
66
- file_list = "file_list",
67
- role_list = "role_list",
68
- server_list = "server_list",
69
- task_list = "task_list",
70
- transfer_item = "transfer_item",
71
- transfer_request = "transfer_request",
72
- }
73
-
74
- /**
75
- * @see https://docs.globus.org/api/transfer/overview/#errors
76
- */
77
- export interface APIErrorResponse {
78
- code: string;
79
- message: string;
80
- request_id: string;
81
- resource: string;
82
- }
83
-
84
- export interface AuthorizationParametersError extends APIErrorResponse {
85
- /**
86
- * A Transfer response that includes `authorization_parameters`
87
- * will have slightly different value formats than the Globus Auth response.
88
- */
89
- authorization_parameters: Omit<
90
- Globus.Auth.AuthorizationParameters,
91
- "session_required_single_domain" | "session_required_policies"
92
- > & {
93
- session_required_single_domain?: string[];
94
- /**
95
- * Transfer returns this value as a comma-separated string.
96
- */
97
- session_required_policies?: string;
98
- };
99
- }
100
-
101
- /**
102
- * @see https://docs.globus.org/api/transfer/overview/#document_formats
103
- */
104
- export interface TransferEntity {
105
- DATA_TYPE: keyof typeof DATA_TYPE;
106
- DATA?: TransferEntity[];
107
- }
108
-
109
- /**
110
- * @see https://docs.globus.org/api/transfer/endpoint_roles/
111
- */
112
- export enum EndpointRole {
113
- administrator = "administrator",
114
- access_manager = "access_manager",
115
- activity_manager = "activity_manager",
116
- activity_monitor = "activity_monitor",
117
- }
118
-
119
- export enum EntityType {
120
- GCSv4_host = "GCSv4_host",
121
- GCSv4_share = "GCSv4_share",
122
- GCSv5_endpoint = "GCSv5_endpoint",
123
- GCSv5_mapped_collection = "GCSv5_mapped_collection",
124
- GCSv5_guest_collection = "GCSv5_guest_collection",
125
- GCP_mapped_collection = "GCP_mapped_collection",
126
- GCP_guest_collection = "GCP_guest_collection",
127
- }
128
-
129
- /**
130
- * @see https://docs.globus.org/api/transfer/acl/#access_document
131
- */
132
- interface AccessDocument extends TransferEntity {
133
- DATA_TYPE: `${DATA_TYPE.access}`;
134
- id: null | Globus.UUID;
135
- role_id: null | Globus.UUID;
136
- role_type:
137
- | null
138
- | `${EndpointRole.administrator}`
139
- | `${EndpointRole.access_manager}`;
140
- principal_type:
141
- | "identity"
142
- | "group"
143
- | "all_authenticated_users"
144
- | "anonymous";
145
- principal: "" | Globus.UUID;
146
- path: string;
147
- permissions: "r" | "rw";
148
- create_time: null | string;
149
- notify_email?: null | string;
150
- notify_message?: null | string;
151
- }
152
-
153
- interface AccessListDocument extends TransferEntity {
154
- DATA_TYPE: `${DATA_TYPE.access_list}`;
155
- DATA: AccessDocument[];
156
- length: number;
157
- endpoint: string;
158
- }
159
-
160
- type BookmarkDocument = {
161
- DATA_TYPE: `${DATA_TYPE.bookmark}`;
162
- id: string;
163
- name: string;
164
- endpoint_id: string;
165
- path: string;
166
- };
167
-
168
- type BookmarkListDocument = {
169
- DATA_TYPE: `${DATA_TYPE.bookmark_list}`;
170
- DATA: Array<BookmarkDocument>;
171
- };
172
-
173
- /**
174
- * @see https://docs.globus.org/api/transfer/endpoint_roles/#role_document_fields
175
- */
176
- export interface RoleDocument extends TransferEntity {
177
- DATA_TYPE: `${DATA_TYPE.role}`;
178
- id: Globus.UUID;
179
- principal_type: "identity" | "group";
180
- principal: string;
181
- role: `${EndpointRole}`;
182
- }
183
-
184
- /**
185
- * @see https://docs.globus.org/api/transfer/endpoint_roles/#role_list
186
- */
187
- export interface RoleListDocument extends TransferEntity {
188
- DATA_TYPE: `${DATA_TYPE.role_list}`;
189
- DATA: RoleDocument[];
190
- }
191
-
192
- /**
193
- * @see https://docs.globus.org/api/transfer/endpoint/#server_fields
194
- */
195
- export interface ServerDocument extends TransferEntity {
196
- DATA_TYPE: `${DATA_TYPE.server}`;
197
- id: number;
198
- hostname: string;
199
- port: number;
200
- scheme: string;
201
- subject: string;
202
- incoming_data_port_start: number;
203
- incoming_data_port_end: number;
204
- outgoing_data_port_start: number;
205
- outgoing_data_port_end: number;
206
- /**
207
- * @deprecated
208
- */
209
- uri: string;
210
- /**
211
- * @deprecated
212
- */
213
- is_connected: boolean;
214
- /**
215
- * @deprecated
216
- */
217
- is_paused: boolean;
218
- }
219
-
220
- export enum TaskType {
221
- TRANSFER = "TRANSFER",
222
- DELETE = "DELETE",
223
- }
224
-
225
- export enum TaskStatus {
226
- /**
227
- * The task is in progress.
228
- */
229
- ACTIVE = "ACTIVE",
230
- /**
231
- * The task has been suspended and will not continue without intervention.
232
- * Currently, only credential expiration will cause this state.
233
- */
234
- INACTIVE = "INACTIVE",
235
- /**
236
- * The task completed successfully.
237
- */
238
- SUCCEEDED = "SUCCEEDED",
239
- /**
240
- * The task or one of its subtasks failed, expired, or was canceled.
241
- */
242
- FAILED = "FAILED",
243
- }
244
-
245
- export const enum CanceledByAdmin {
246
- SOURCE = "SOURCE",
247
- DESTINATION = "DESTINATION",
248
- BOTH = "BOTH",
249
- }
250
-
251
- export const enum LocalUserStatus {
252
- OK = "OK",
253
- NO_PERMISSION = "NO_PERMISSION",
254
- NOT_SCANNED = "NOT_SCANNED",
255
- ENDPOINT_ERROR = "ENDPOINT_ERROR",
256
- }
257
-
258
- /**
259
- * The "task" document type represents a single transfer or delete submission.
260
- *
261
- * @see https://docs.globus.org/api/transfer/task/#task_document
262
- */
263
- export interface TaskDocument extends TransferEntity {
264
- DATA_TYPE: `${DATA_TYPE.task}`;
265
- task_id: string;
266
- type: TaskType;
267
- status: TaskStatus;
268
- fatal_error: object | null;
269
- label: string | null;
270
- /**
271
- * @deprecated use `owner_id` instead.
272
- */
273
- username: string;
274
- owner_id: string;
275
- request_time: string;
276
- completion_time: string | null;
277
- deadline: string | null;
278
- /**
279
- * @deprecated use `source_endpoint_id`
280
- */
281
- source_endpoint: string;
282
- source_endpoint_id: string;
283
- source_endpoint_display_name: string;
284
- /**
285
- * @deprecated use `destination_endpoint_id`
286
- */
287
- destination_endpoint: string;
288
- destination_endpoint_id: string | null;
289
- destination_endpoint_display_name: string;
290
- sync_level: number | null;
291
- encrypt_data: boolean;
292
- verify_checksum: boolean;
293
- delete_destination_extra: boolean;
294
- recursive_symlinks: string | null;
295
- preserve_timestamp: boolean;
296
- skip_source_errors: boolean;
297
- fail_on_quota_errors: boolean;
298
- command: string;
299
- history_deleted: boolean;
300
- faults: number;
301
- files: number;
302
- directories: number;
303
- symlinks: number;
304
- files_skipped: number;
305
- files_transferred: number;
306
- subtasks_total: number;
307
- subtasks_pending: number;
308
- subtasks_retrying: number;
309
- subtasks_succeeded: number;
310
- subtasks_expired: number;
311
- subtasks_canceled: number;
312
- subtasks_failed: number;
313
- subtasks_skipped_errors: number;
314
- bytes_transferred: number;
315
- bytes_checksummed: number;
316
- effective_bytes_per_second: number;
317
- nice_status: string | null;
318
- /**
319
- * @deprecated use `event_list`
320
- */
321
- nice_status_details: null;
322
- nice_status_short_description: string | null;
323
- nice_status_expires_in: -1 | 0 | string | null;
324
- canceled_by_admin: CanceledByAdmin | null;
325
- canceled_by_admin_message: string | null;
326
- is_paused: boolean;
327
- }
328
-
329
- /**
330
- * @see https://docs.globus.org/api/transfer/task/#filter_and_order_by_options
331
- */
332
- export interface TaskQuery extends BaseTransferQuery {
333
- task_id?: string;
334
- type?: string;
335
- status?: string;
336
- label?: string;
337
- request_time?: string;
338
- completion_time?: string;
339
- }
340
-
341
- /**
342
- * @see https://docs.globus.org/api/transfer/task_submit/#filter_rules
343
- */
344
- export interface FilterRuleDocument extends TransferEntity {
345
- DATA_TYPE: `${DATA_TYPE.filter_rule}`;
346
- method: "exclude";
347
- type?: "file" | "dir" | null | undefined;
348
- name: string;
349
- }
350
-
351
- /**
352
- * @see https://docs.globus.org/api/transfer/task/#event_fields
353
- */
354
- export interface TaskEventDocument extends TransferEntity {
355
- DATA_TYPE: `${DATA_TYPE.event}`;
356
- code: string;
357
- is_error: boolean;
358
- description: string;
359
- details: string;
360
- time: string;
361
- }
362
-
363
- /**
364
- * @see https://docs.globus.org/api/transfer/task/#get_event_list
365
- */
366
- export interface TaskEventListDocument extends TransferEntity {
367
- DATA_TYPE: `${DATA_TYPE.event_list}`;
368
- DATA: Array<TaskEventDocument>;
369
- length: number;
370
- limit: number;
371
- offset: number;
372
- total: number;
373
- }
374
-
375
- /**
376
- * Note that source_path or destination_path here will be null when the user does not have
377
- * role permissions for one side of the transfer
378
- *
379
- * @see https://docs.globus.org/api/transfer/task/#skipped_error_fields
380
- */
381
- export interface SkippedErrorsDocument extends TransferEntity {
382
- DATA_TYPE: `${DATA_TYPE.skipped_error}`;
383
- error_code: "PERMISSION_DENIED" | "FILE_NOT_FOUND";
384
- error_details: string;
385
- source_path: string | null;
386
- destination_path: string | null;
387
- is_directory: boolean;
388
- is_symlink: boolean;
389
- is_delete_destination_extra: boolean;
390
- external_checksum: string;
391
- checksum_algorithm: string;
392
- }
393
-
394
- /**
395
- * Note that source_path or destination_path here will be null when the user does not have
396
- * role permissions for one side of the transfer
397
- *
398
- * @see https://docs.globus.org/api/transfer/task/#get_task_successful_transfers
399
- */
400
- export interface SuccessfulTransfersDocument extends TransferEntity {
401
- DATA_TYPE: `${DATA_TYPE.successful_transfer}`;
402
- source_path: string | null;
403
- destination_path: string | null;
404
- }
405
-
406
- /**
407
- * @see https://docs.globus.org/api/transfer/task/#get_task_skipped_errors
408
- */
409
- export interface SkippedErrorsListDocument extends TransferEntity {
410
- DATA_TYPE: `${DATA_TYPE.skipped_errors}`;
411
- marker: number;
412
- next_marker: null | number;
413
- DATA: Array<SkippedErrorsDocument>;
414
- }
415
-
416
- export interface SuccessfulTransfersListDocument extends TransferEntity {
417
- DATA_TYPE: `${DATA_TYPE.successful_transfers}`;
418
- marker: number;
419
- next_marker: null | number;
420
- DATA: Array<SuccessfulTransfersDocument>;
421
- }
422
-
423
- /**
424
- * @see https://docs.globus.org/api/transfer/task/#limited_pause_rule_document
425
- */
426
- export type PauseRuleLimitedDocument = Omit<
427
- Globus.Transfer.PauseRuleDocument,
428
- | "modified_by"
429
- | "modified_by_id"
430
- | "created_by_host_manager"
431
- | "editable"
432
- | "DATA_TYPE"
433
- > & {
434
- DATA_TYPE: `${DATA_TYPE.pause_rule_limited}`;
435
- };
436
-
437
- /**
438
- * @see https://docs.globus.org/api/transfer/task/#get_task_pause_info
439
- */
440
- export interface PauseInfoLimitedDocument extends TransferEntity {
441
- DATA_TYPE: `${DATA_TYPE.pause_info_limited}`;
442
- pause_rules: Array<PauseRuleLimitedDocument>;
443
- source_pause_message: string | null;
444
- destination_pause_message: string | null;
445
- source_pause_message_share: string | null;
446
- destination_pause_message_share: string | null;
447
- }
448
-
449
- // enum EndpointExpiresIn {
450
- // NEVER = -1,
451
- // EXPIRED = 0,
452
- // NOT_ACTIVATED = 0,
453
- // SECONDS = number
454
- // }
455
- type EndpointExpiresIn = -1 | 0 | number;
456
-
457
- // enum EndpointExpiresTime {
458
- // NOT_ACTIVATED = null,
459
- // TIME = string
460
- // }
461
- type EndpointExpiresTime = null | string;
462
-
463
- /**
464
- * @see https://docs.globus.org/api/transfer/endpoint/#endpoint_document
465
- */
466
- export interface EndpointDocument extends TransferEntity {
467
- DATA_TYPE: `${DATA_TYPE.endpoint}`;
468
- DATA?: ServerDocument[];
469
- id: string;
470
- display_name: string;
471
- organization: string;
472
- department: string;
473
- keywords: string;
474
- /**
475
- * @deprecated
476
- */
477
- name: string;
478
- /**
479
- * @deprecated use `id` instead in API requests, and use `display_name`
480
- * to display to users.
481
- */
482
- canonical_name: string;
483
- /**
484
- * @deprecated use `owner_id` or `owner_string` instead.
485
- */
486
- username: string;
487
- owner_id: string;
488
- owner_string: string;
489
- description: string;
490
- contact_email?: string;
491
- contact_info?: string;
492
- info_link: string;
493
- user_message: string;
494
- user_message_link: string;
495
- public: boolean;
496
- subscription_id: string;
497
- french_english_bilingual: boolean;
498
- default_directory: string;
499
- force_encryption: boolean;
500
- disable_verify: boolean;
501
- disable_anonymous_writes: boolean;
502
- entity_type: `${EntityType}`;
503
- force_verify: boolean;
504
- mfa_required: boolean;
505
- expire_time: EndpointExpiresTime;
506
- expires_in: EndpointExpiresIn;
507
- activated: boolean;
508
- myproxy_server: string | null;
509
- myproxy_dn: string | null;
510
- oauth_server: string;
511
- requester_pays: boolean;
512
- /**
513
- * `true` if the endpoint was created for Globus Connect Personal, `false` otherwise.
514
- */
515
- is_globus_connect: boolean;
516
- gcs_version: string;
517
- globus_connect_setup_key: string | null;
518
- /**
519
- * @deprecated use `host_endpoint_id` and `host_endpoint_display_name`
520
- */
521
- host_endpoint: string | null;
522
- /**
523
- * UUID of standard endpoint hosting the shared endpoint; `null` for non-shared endpoints.
524
- */
525
- host_endpoint_id: string | null;
526
- host_endpoint_display_name: string | null;
527
- /**
528
- * @deprecated
529
- */
530
- host_path: string | null;
531
- /**
532
- * @deprecated
533
- */
534
- s3_url: null;
535
- /**
536
- * @deprecated
537
- */
538
- s3_owner_activated: false;
539
- acl_available: boolean;
540
- /**
541
- * @deprecated use `my_effective_roles` instead.
542
- */
543
- acl_editable: boolean;
544
- in_use: boolean;
545
- my_effective_roles: Array<`${EndpointRole}` | "restricted_administrator">;
546
- gcp_connected: boolean | null;
547
- gcp_paused: boolean | null;
548
- network_use: null | "normal" | "minimal" | "aggressive" | "custom";
549
- location: string | null;
550
- max_concurrency: null | number;
551
- preferred_concurrency: null | number;
552
- max_parallelism: null | number;
553
- preferred_parallelism: null | number;
554
- local_user_info_available: null | boolean;
555
- https_server: null | string;
556
- gcs_manager_url: null | `${string}://${string}`;
557
- high_assurance: boolean;
558
- authentication_timeout_mins: number;
559
- /**
560
- * @deprecated use `high_assurance` and `authentication_timeout_mins` instead.
561
- */
562
- authentication_assurance_timeout: number;
563
- non_functional: boolean;
564
- non_functional_endpoint_id: string | null;
565
- non_functional_endpoint_display_name: string | null;
566
- mapped_collection_id: string | null;
567
- mapped_collection_display_name: string | null;
568
- }
569
-
570
- /**
571
- * @see https://docs.globus.org/api/transfer/overview/#common_query_parameters
572
- */
573
- interface BaseTransferQuery {
574
- limit?: number;
575
- offset?: number;
576
- orderby?: string;
577
- fields?: string;
578
- /** @deprecated */
579
- filter?: string;
580
- }
581
- /**
582
- * @see https://docs.globus.org/api/transfer/endpoint_search/#search_scope
583
- */
584
- export type EndpointSearchScope =
585
- | "all"
586
- | "my-endpoints"
587
- | "my-gcp-endpoints"
588
- | "recently-used"
589
- | "in-use"
590
- | "shared-by-me"
591
- | "shared-with-me"
592
- | "administered-by-me";
593
-
594
- /**
595
- * @see https://docs.globus.org/api/transfer/endpoint_search/#endpoint_search
596
- */
597
- export interface EndpointSearchQuery extends BaseTransferQuery {
598
- limit: number;
599
- filter_scope?: EndpointSearchScope;
600
- filter_fulltext?: string;
601
- filter_owner_id?: string;
602
- filter_host_endpoint?: string;
603
- filter_non_functional?: 0 | 1 | null;
604
- offset?: number;
605
- }
606
-
607
- /**
608
- * @see https://docs.globus.org/api/transfer/endpoint_search/
609
- */
610
- export interface EndpointSearchResults extends TransferEntity {
611
- DATA_TYPE: `${DATA_TYPE.endpoint_list}`;
612
- offset: number;
613
- limit: number;
614
- has_next_page: boolean;
615
- }
616
-
617
- /**
618
- * @see https://docs.globus.org/api/transfer/task_submit/#result_codes
619
- */
620
- type TransferResultResponse = Readonly<{
621
- DATA_TYPE: "transfer_response" | "delete_response";
622
- task_id: Globus.UUID;
623
- submission_id: Globus.UUID;
624
- code: "Accepted" | "Duplicate";
625
- message: string;
626
- resource: "/transfer" | "/delete";
627
- request_id: string;
628
- }>;
629
-
630
- /**
631
- * @see https://docs.globus.org/api/transfer/task_submit/#transfer_item_fields
632
- */
633
- type TransferRequestItem = {
634
- DATA_TYPE: "transfer_item";
635
- source_path: string;
636
- destination_path: string;
637
- recursive?: boolean;
638
- external_checksum?: string;
639
- checksum_algorithm?: string;
640
- };
641
-
642
- /**
643
- * @see https://docs.globus.org/api/transfer/task_submit/#delete_item_fields
644
- */
645
- type DeleteRequestItem = {
646
- DATA_TYPE: "delete_item";
647
- path: string;
648
- };
649
-
650
- /**
651
- * @see https://docs.globus.org/api/transfer/file_operations/#rename_request_fields
652
- */
653
- type RenameRequest = {
654
- DATA_TYPE: "rename";
655
- old_path: string;
656
- new_path: string;
657
- };
658
-
659
- /**
660
- * @see https://docs.globus.org/api/transfer/file_operations/#file_document
661
- */
662
- export interface FileDocument {
663
- readonly DATA_TYPE: `${DATA_TYPE.file}`;
664
- readonly name: string;
665
- readonly type:
666
- | "dir"
667
- | "file"
668
- | "invalid_symlink"
669
- | "chr"
670
- | "blk"
671
- | "pipe"
672
- | "other";
673
- readonly link_target?: string | null;
674
- readonly size?: number;
675
- readonly last_modified?: string;
676
- readonly permissions?: string;
677
- readonly user?: string | null;
678
- readonly group?: string | null;
679
- readonly link_size?: number | null;
680
- readonly link_user?: string | null;
681
- readonly link_group?: string | null;
682
- readonly link_last_modified?: string | null;
683
- }
684
-
685
- /**
686
- * @see https://docs.globus.org/api/transfer/file_operations/#file_list_document
687
- */
688
- export interface FileListDocument extends TransferEntity {
689
- readonly DATA_TYPE: `${DATA_TYPE.file_list}`;
690
- readonly endpoint: Globus.UUID;
691
- readonly path: string;
692
- readonly absolute_path: string | null;
693
- readonly rename_supported: boolean;
694
- readonly symlink_supported: boolean;
695
- readonly DATA: FileDocument[];
696
- // n.b. This is currently included in responses, but undocumented; use with care.
697
- readonly length: number;
698
- // n.b. This is currently included in responses, but undocumented; use with care.
699
- readonly total: number;
700
- }
701
-
702
- type TransferItem = {
703
- DATA_TYPE: `${DATA_TYPE.transfer_item}`;
704
- source_path: string;
705
- destination_path: string;
706
- recursive: boolean;
707
- };
708
-
709
- type TransferRequest = {
710
- DATA_TYPE: `${DATA_TYPE.transfer_request}`;
711
- DATA: Array<TransferItem>;
712
- deadline: null | string;
713
- delete_destination_extra: boolean;
714
- destination_endpoint: string;
715
- encrypt_data: boolean;
716
- fail_on_quota_errors: boolean;
717
- filter_rules: null | Array<object>;
718
- label: null | string;
719
- preserve_timestamp: boolean;
720
- skip_source_errors: boolean;
721
- source_endpoint: string;
722
- submission_id: string;
723
- sync_level: null | number;
724
- verify_checksum: boolean;
725
- notify_on_succeeded: boolean;
726
- notify_on_failed: boolean;
727
- notify_on_inactive: boolean;
728
- };
729
- }