@riverscapes/common 1.3.1 → 2.0.3

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 (133) hide show
  1. package/codegen.yml +48 -0
  2. package/dist/classes/BusinessLogicXML.d.ts +20 -0
  3. package/dist/classes/BusinessLogicXML.js +122 -0
  4. package/dist/classes/BusinessLogicXML.js.map +1 -0
  5. package/dist/classes/ProjectXML.d.ts +21 -0
  6. package/dist/classes/ProjectXML.js +291 -0
  7. package/dist/classes/ProjectXML.js.map +1 -0
  8. package/dist/classes/api.d.ts +32 -0
  9. package/dist/classes/api.js +307 -0
  10. package/dist/classes/api.js.map +1 -0
  11. package/dist/classes/index.d.ts +2 -0
  12. package/dist/classes/index.js +19 -0
  13. package/dist/classes/index.js.map +1 -0
  14. package/dist/classes/mock/BusinessLogic1_parsed.d.ts +173 -0
  15. package/dist/classes/mock/BusinessLogic1_parsed.js +254 -0
  16. package/dist/classes/mock/BusinessLogic1_parsed.js.map +1 -0
  17. package/dist/constants.d.ts +48 -0
  18. package/dist/constants.js +74 -0
  19. package/dist/constants.js.map +1 -0
  20. package/dist/dates.d.ts +1 -0
  21. package/dist/dates.js +12 -0
  22. package/dist/dates.js.map +1 -0
  23. package/dist/gen/gqlSchema.d.ts +2 -0
  24. package/dist/gen/gqlSchema.js +13 -0
  25. package/dist/gen/gqlSchema.js.map +1 -0
  26. package/dist/gen/ops.d.ts +1828 -0
  27. package/dist/gen/ops.js +259 -0
  28. package/dist/gen/ops.js.map +1 -0
  29. package/dist/gen/schema.types.d.ts +2483 -0
  30. package/dist/gen/schema.types.js +265 -0
  31. package/dist/gen/schema.types.js.map +1 -0
  32. package/dist/gqlSchema.d.ts +2 -0
  33. package/dist/gqlSchema.js +13 -0
  34. package/dist/gqlSchema.js.map +1 -0
  35. package/dist/graphql/auth.graphql.d.ts +2 -0
  36. package/dist/graphql/auth.graphql.js +12 -0
  37. package/dist/graphql/auth.graphql.js.map +1 -0
  38. package/dist/graphql/index.d.ts +3 -0
  39. package/dist/graphql/index.js +20 -0
  40. package/dist/graphql/index.js.map +1 -0
  41. package/dist/graphql/mutations.graphql.js +57 -0
  42. package/dist/graphql/mutations.graphql.js.map +1 -0
  43. package/dist/graphql/project.graphql.d.ts +1 -0
  44. package/dist/graphql/project.graphql.js +11 -0
  45. package/dist/graphql/project.graphql.js.map +1 -0
  46. package/dist/graphql/projects.graphql.d.ts +1 -0
  47. package/dist/graphql/projects.graphql.js +11 -0
  48. package/dist/graphql/projects.graphql.js.map +1 -0
  49. package/dist/graphql/upload.graphql.d.ts +4 -0
  50. package/dist/graphql/upload.graphql.js +14 -0
  51. package/dist/graphql/upload.graphql.js.map +1 -0
  52. package/dist/index.d.ts +9 -7
  53. package/dist/index.js +28 -10
  54. package/dist/index.js.map +1 -1
  55. package/dist/lib/dates.d.ts +2 -0
  56. package/dist/lib/dates.js +36 -0
  57. package/dist/lib/dates.js.map +1 -0
  58. package/dist/lib/geojson/createProjectBounds.d.ts +10 -0
  59. package/dist/lib/geojson/createProjectBounds.js +34 -0
  60. package/dist/lib/geojson/createProjectBounds.js.map +1 -0
  61. package/dist/lib/geojson/equality.d.ts +2 -0
  62. package/dist/lib/geojson/equality.js +81 -0
  63. package/dist/lib/geojson/equality.js.map +1 -0
  64. package/dist/lib/geojson/index.d.ts +3 -0
  65. package/dist/lib/geojson/index.js +13 -0
  66. package/dist/lib/geojson/index.js.map +1 -0
  67. package/dist/lib/geojson/precision.d.ts +4 -0
  68. package/dist/lib/geojson/precision.js +79 -0
  69. package/dist/lib/geojson/precision.js.map +1 -0
  70. package/dist/lib/graphql/auth.graphql.d.ts +1 -0
  71. package/dist/lib/graphql/auth.graphql.js +11 -0
  72. package/dist/lib/graphql/auth.graphql.js.map +1 -0
  73. package/dist/lib/graphql/index.d.ts +1 -0
  74. package/dist/lib/graphql/index.js +18 -0
  75. package/dist/lib/graphql/index.js.map +1 -0
  76. package/dist/lib/rsPaths.d.ts +8 -0
  77. package/dist/lib/rsPaths.js +150 -0
  78. package/dist/lib/rsPaths.js.map +1 -0
  79. package/dist/lib/tiles.d.ts +4 -0
  80. package/dist/lib/tiles.js +40 -0
  81. package/dist/lib/tiles.js.map +1 -0
  82. package/dist/lib/util.d.ts +3 -0
  83. package/dist/lib/util.js +42 -0
  84. package/dist/lib/util.js.map +1 -0
  85. package/dist/lib/xml.d.ts +6 -0
  86. package/dist/lib/xml.js +70 -0
  87. package/dist/lib/xml.js.map +1 -0
  88. package/dist/schema.graphql +2322 -0
  89. package/dist/schema.types.d.ts +1815 -0
  90. package/dist/schema.types.js +259 -0
  91. package/dist/schema.types.js.map +1 -0
  92. package/dist/types.d.ts +63 -341
  93. package/dist/types.js +7 -82
  94. package/dist/types.js.map +1 -1
  95. package/jest.config.js +4 -0
  96. package/package.json +30 -23
  97. package/resources/success.html +23 -0
  98. package/dist/api.d.ts +0 -71
  99. package/dist/api.js +0 -365
  100. package/dist/api.js.map +0 -1
  101. package/dist/authSchema.js +0 -1
  102. package/dist/authSchema.js.map +0 -1
  103. package/dist/classes/BusinessLogic.d.ts +0 -11
  104. package/dist/classes/BusinessLogic.js +0 -90
  105. package/dist/classes/BusinessLogic.js.map +0 -1
  106. package/dist/classes/FeatureFlags.d.ts +0 -6
  107. package/dist/classes/FeatureFlags.js +0 -25
  108. package/dist/classes/FeatureFlags.js.map +0 -1
  109. package/dist/classes/Program.d.ts +0 -15
  110. package/dist/classes/Program.js +0 -30
  111. package/dist/classes/Program.js.map +0 -1
  112. package/dist/classes/Project.d.ts +0 -43
  113. package/dist/classes/Project.js +0 -182
  114. package/dist/classes/Project.js.map +0 -1
  115. package/dist/classes/TileIndexJSON.d.ts +0 -21
  116. package/dist/classes/TileIndexJSON.js +0 -10
  117. package/dist/classes/TileIndexJSON.js.map +0 -1
  118. package/dist/classes/TileServiceJSONClass.d.ts +0 -22
  119. package/dist/classes/TileServiceJSONClass.js +0 -11
  120. package/dist/classes/TileServiceJSONClass.js.map +0 -1
  121. package/dist/classes/errors.d.ts +0 -4
  122. package/dist/classes/errors.js +0 -31
  123. package/dist/classes/errors.js.map +0 -1
  124. package/dist/mockdata.d.ts +0 -6
  125. package/dist/mockdata.js +0 -65
  126. package/dist/mockdata.js.map +0 -1
  127. package/dist/schema.graphql.d.ts +0 -2
  128. package/dist/schema.graphql.js +0 -15
  129. package/dist/schema.graphql.js.map +0 -1
  130. package/dist/xml.d.ts +0 -11
  131. package/dist/xml.js +0 -254
  132. package/dist/xml.js.map +0 -1
  133. /package/dist/{authSchema.d.ts → graphql/mutations.graphql.d.ts} +0 -0
@@ -0,0 +1,2322 @@
1
+ type Collection implements DBObj & HasOwner & HasStar & HasTags {
2
+ """Citation string"""
3
+ citation: String
4
+
5
+ """(Optional) Who to contact (might be different from owner)"""
6
+ contact: User
7
+ createdBy: User!
8
+ createdOn: DateTime!
9
+ description: String!
10
+
11
+ """Banner image (optional)"""
12
+ heroImage: HeroImage
13
+ id: ID!
14
+ meta: [MetaData!]!
15
+ name: String!
16
+ ownedBy: Owner!
17
+ permissions: ObjectPermissions!
18
+
19
+ """Paginated, ordered list of projects this collection contains"""
20
+ projects(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedProjects!
21
+ starred: Boolean!
22
+ starredCount: Int!
23
+ summary: String!
24
+ tags: [String!]!
25
+ updatedBy: User!
26
+ updatedOn: DateTime!
27
+ visibility: ProjectGroupVisibilityEnum!
28
+ }
29
+
30
+ input CollectionInput {
31
+ """Citation string"""
32
+ citation: String
33
+
34
+ """Remove the contact for this collection"""
35
+ clearContact: Boolean
36
+
37
+ """Resets/deletes the user's avatar back to the default"""
38
+ clearHeroImage: Boolean
39
+
40
+ """User ID of the contact for this collection (Optional)"""
41
+ contact: OwnerInput
42
+
43
+ """Verbose description of the object (< SOME_LIMIT kb of text)"""
44
+ description: String
45
+
46
+ """The Code you were given from the checkUploadImage endpoint"""
47
+ heroImageToken: String
48
+
49
+ """Metadata for this object"""
50
+ meta: [MetaDataInput!]
51
+
52
+ """Name of the object"""
53
+ name: String
54
+
55
+ """Brief tagline or intro sentence for the item (<500 characters)"""
56
+ summary: String
57
+
58
+ """Tags for this collection"""
59
+ tags: [String!]
60
+
61
+ """Collection visibility settings: Either PUBLIC or SECRET"""
62
+ visibility: ProjectGroupVisibilityEnum
63
+ }
64
+
65
+ interface DBObj {
66
+ """User who created object"""
67
+ createdBy: User!
68
+
69
+ """Identifies the date and time when the object was created."""
70
+ createdOn: DateTime!
71
+
72
+ """Verbose description of the object (< SOME_LIMIT kb of text)"""
73
+ description: String!
74
+
75
+ """Db GUID"""
76
+ id: ID!
77
+
78
+ """Key-value pairs for attaching metadata to objects"""
79
+ meta: [MetaData!]!
80
+
81
+ """Name of the object"""
82
+ name: String!
83
+
84
+ """Brief tagline or intro sentence for the item (<500 characters)"""
85
+ summary: String!
86
+
87
+ """User who last updated object"""
88
+ updatedBy: User!
89
+
90
+ """Identifies the date and time when the object was updated."""
91
+ updatedOn: DateTime!
92
+ }
93
+
94
+ """Notifications get a stripped-down version of the DBObj"""
95
+ interface DBObjNotifications {
96
+ createdBy: User!
97
+
98
+ """
99
+ User who created object
100
+ NOTE: We need to account for users that are no longer there,
101
+ That's why we have the duplicated fields
102
+ """
103
+ createdById: ID!
104
+ createdByName: String!
105
+
106
+ """Identifies the date and time when the object was created."""
107
+ createdOn: DateTime!
108
+
109
+ """Db GUID"""
110
+ id: ID!
111
+
112
+ """Name of the object"""
113
+ name: String!
114
+
115
+ """Brief tagline or intro sentence for the item (<500 characters)"""
116
+ summary: String!
117
+ updatedBy: User!
118
+
119
+ """
120
+ User who last updated object
121
+ NOTE: We need to account for users that are no longer there,
122
+ That's why we have the duplicated fields
123
+ """
124
+ updatedById: ID!
125
+ updatedByName: String!
126
+
127
+ """Identifies the date and time when the object was updated."""
128
+ updatedOn: DateTime!
129
+ }
130
+
131
+ input DBObjNotificationsInput {
132
+ """User who created object"""
133
+ createdById: ID!
134
+ createdByName: String!
135
+
136
+ """Identifies the date and time when the object was created."""
137
+ createdOn: DateTime!
138
+
139
+ """Db GUID"""
140
+ id: ID!
141
+
142
+ """Name of the object"""
143
+ name: String!
144
+
145
+ """Brief tagline or intro sentence for the item (<500 characters)"""
146
+ summary: String!
147
+
148
+ """User who last updated object"""
149
+ updatedById: ID!
150
+ updatedByName: String!
151
+
152
+ """Identifies the date and time when the object was updated."""
153
+ updatedOn: DateTime!
154
+ }
155
+
156
+ interface DBSimpleObj {
157
+ """User who created object"""
158
+ createdBy: User!
159
+
160
+ """Identifies the date and time when the object was created."""
161
+ createdOn: DateTime!
162
+
163
+ """Db GUID"""
164
+ id: ID!
165
+
166
+ """User who last updated object"""
167
+ updatedBy: User!
168
+
169
+ """Identifies the date and time when the object was updated."""
170
+ updatedOn: DateTime!
171
+ }
172
+
173
+ type Dataset implements DBObj {
174
+ analysisId: String
175
+
176
+ """These are the projects that use this layer"""
177
+ attachedDatasets(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedDatasets!
178
+ citation: String
179
+ createdBy: User!
180
+ createdOn: DateTime!
181
+ datasetContainer: DatasetContainerTypesEnum!
182
+
183
+ """
184
+ All of these fields are actually derivatives of the rsXPath
185
+
186
+ The type of dataset helps us understand how to work with it
187
+ These types are derived directly from the XML enumeration
188
+ """
189
+ datasetType: DatasetTypeEnum!
190
+ datasetXMLId: String!
191
+ description: String!
192
+
193
+ """
194
+ For Direct S3 File listings. This is a query that depends on the type
195
+ of dataset. Sometimes we also need sidecars to come back
196
+ """
197
+ files: [FileDownloadMeta!]!
198
+
199
+ """
200
+ The ID for datasets takes the form 'PROJ_ORIGIN_GUID/REALIZATION_ID/DATASET_ID'
201
+ and corresponds to the S3 path we store things
202
+
203
+ NOTE: ID is different from the dsId (which is the id attribute on the XML node)
204
+ """
205
+ id: ID!
206
+
207
+ """Some datasets can have sublayers (mainly just Geopackages)"""
208
+ layers: [DatasetLayer]
209
+ localPath: String!
210
+ meta: [MetaData!]!
211
+ name: String!
212
+
213
+ """
214
+ The original dataset (if there is one). THis is null if this is the origin
215
+ """
216
+ origin: Dataset
217
+
218
+ """Backwards lookup of the project this dataset belongs to"""
219
+ project: Project!
220
+ realizationXMLId: String
221
+
222
+ """Backwards lookup to the project referenced b"""
223
+ refProject: Project
224
+ rsXPath: String!
225
+ summary: String!
226
+ updatedBy: User!
227
+ updatedOn: DateTime!
228
+ }
229
+
230
+ """These are the XML tag containers where you can find datasets"""
231
+ enum DatasetContainerTypesEnum {
232
+ CommonDatasets
233
+ Configuration
234
+ Datasets
235
+ Inputs
236
+ Intermediates
237
+ Logs
238
+ Outputs
239
+ Products
240
+ }
241
+
242
+ input DatasetInput {
243
+ citation: String
244
+ description: String
245
+
246
+ """
247
+ Optional. If this is a linked dataset then its extRef should be present. this is an attribute on the dataset node in the XML
248
+ and it takes the form:
249
+ badfe8c1-0342-4876-8fac-b2eb5493a90f:Project/REALIZATION/SLOPE
250
+ PROJECT_UUID:rsXPath
251
+ """
252
+ extRef: ID
253
+
254
+ """Geopackages can have sublayers"""
255
+ layers: [DatasetLayerInput!]
256
+
257
+ """
258
+ local path on the user's system. This comes directly from the <Path> node in the project xml
259
+ """
260
+ localPath: String!
261
+ meta: [MetaDataInput!]
262
+ name: String!
263
+
264
+ """
265
+ This is the rsXPath to the node in the project (not the origin project)
266
+ It is a proprietary path system to uniquely identify datasets in our XML files
267
+ This rsXPath takes the form: 'Project/Realizations/Realization#REAL1/Intermediates/Geopackage#GEO1'
268
+ where the hashes are shorthand for IDS
269
+ """
270
+ rsXPath: String!
271
+ summary: String
272
+ }
273
+
274
+ """Geopackages can have sublayers"""
275
+ type DatasetLayer {
276
+ citation: String
277
+ description: String
278
+ lyrName: String!
279
+ meta: [MetaData!]
280
+ name: String!
281
+ summary: String
282
+ }
283
+
284
+ """Geopackages can have sublayers"""
285
+ input DatasetLayerInput {
286
+ citation: String
287
+ description: String
288
+ lyrName: String!
289
+ meta: [MetaDataInput!]
290
+ name: String
291
+ summary: String
292
+ }
293
+
294
+ input DatasetLayerUpdate {
295
+ citation: String
296
+ description: String
297
+ meta: [MetaDataInput!]
298
+ name: String
299
+ summary: String
300
+ }
301
+
302
+ """
303
+ This mirrors the RiverscapesXML XSD Schema
304
+ Unfortunately we need to keep them in sync
305
+ """
306
+ enum DatasetTypeEnum {
307
+ AuxInstrumentFile
308
+ CSV
309
+ ConfigFile
310
+ DEM
311
+ DataTable
312
+ Database
313
+ File
314
+ Geopackage
315
+ HTMLFile
316
+ HillShade
317
+ Image
318
+ InstrumentFile
319
+ LogFile
320
+ MSAccessDB
321
+ PDF
322
+ Raster
323
+ SQLiteDB
324
+ SurveyQualityDB
325
+ TIN
326
+ Vector
327
+ Video
328
+ ZipFile
329
+ }
330
+
331
+ input DatasetUpdate {
332
+ citation: String
333
+ description: String
334
+ dsId: String
335
+ meta: [MetaDataInput!]
336
+ name: String
337
+ summary: String
338
+ }
339
+
340
+ scalar DateTime
341
+
342
+ scalar EmailAddress
343
+
344
+ enum EntitiesWithImagesEnum {
345
+ COLLECTION
346
+ ORGANIZATION
347
+ PROJECT
348
+ PROJECT_TYPE
349
+ USER
350
+ }
351
+
352
+ enum EntityDeleteActionsEnum {
353
+ DELETE
354
+ DELETE_COMPLETE
355
+ MAKE_PUBLIC
356
+ REQUEST_TRANSFER
357
+ }
358
+
359
+ input EntityDeletionOptions {
360
+ """
361
+ TotalDelete means This item has been cleaned up completely including
362
+ shared dataset: this will break links for shared projects so it should
363
+ be the exception and not the rule.
364
+ """
365
+ totalDelete: Boolean
366
+
367
+ """
368
+ Optional: request transfer of all projects and collections to another Owner in the system
369
+ """
370
+ transfer: TransferEntityItemsInput
371
+ }
372
+
373
+ type FileDownloadMeta implements FileDownloadMetaInterface {
374
+ contentType: String
375
+ downloadUrl: String
376
+ etag: String
377
+ localPath: String
378
+ size: Int
379
+ }
380
+
381
+ input FileDownloadMetaInput {
382
+ contentType: String
383
+ localPath: String!
384
+ md5: String!
385
+ size: Int
386
+ }
387
+
388
+ interface FileDownloadMetaInterface {
389
+ contentType: String
390
+ etag: String
391
+ localPath: String
392
+ size: Int
393
+ }
394
+
395
+ type FileUploadMeta {
396
+ downloadUrl: String!
397
+ key: String!
398
+ }
399
+
400
+ interface HasOwner {
401
+ ownedBy: Owner!
402
+ }
403
+
404
+ interface HasStar {
405
+ starred: Boolean!
406
+ starredCount: Int!
407
+ }
408
+
409
+ interface HasTags {
410
+ tags: [String!]!
411
+ }
412
+
413
+ """Small medium and large image sizes"""
414
+ type HeroImage {
415
+ lg: URL
416
+ md: URL
417
+ sm: URL
418
+ }
419
+
420
+ enum ImageTypeEnum {
421
+ AVATAR
422
+ HERO
423
+ LOGO
424
+ }
425
+
426
+ scalar JSONObject
427
+
428
+ enum JobStatusEnum {
429
+ FAILED
430
+ PROCESSING
431
+ SUCCESS
432
+ UNKNOWN
433
+ }
434
+
435
+ """
436
+ JobStatusObj: The shape of the JSON file that stores the state of the uploaded item.
437
+ """
438
+ type JobStatusObj {
439
+ """
440
+ Jobs may store different settings. leave a data param as JSONObject so we can extend it
441
+ without needing to modify the schema
442
+ """
443
+ data: JSONObject
444
+ errors: [String!]
445
+ metaData: JSONObject
446
+ percentComplete: Int
447
+ projectId: String
448
+ status: JobStatusEnum!
449
+ }
450
+
451
+ type Link {
452
+ """alt text"""
453
+ alt: String
454
+
455
+ """Link to the object"""
456
+ href: URL!
457
+
458
+ """Link text"""
459
+ text: String
460
+ }
461
+
462
+ input LinkInput {
463
+ """alt text"""
464
+ alt: String
465
+
466
+ """Link to the object"""
467
+ href: URL!
468
+
469
+ """Link text"""
470
+ text: String
471
+ }
472
+
473
+ type MapCluster {
474
+ """[longitude, latitude]"""
475
+ coords: [Float!]!
476
+ count: Int!
477
+
478
+ """check out npm's 'ngeogrid' for how to turn this back into coordinates """
479
+ hash: String!
480
+ }
481
+
482
+ type MetaData {
483
+ key: String!
484
+ type: MetaDataTypeEnum
485
+ value: String!
486
+ }
487
+
488
+ """When submitting metadata use this object"""
489
+ input MetaDataInput {
490
+ """Metadata key string"""
491
+ key: String!
492
+
493
+ """Optional meta type value. Defaults to String"""
494
+ type: MetaDataTypeEnum
495
+
496
+ """Strignified metadata value"""
497
+ value: String!
498
+ }
499
+
500
+ """
501
+ This mirrors the RiverscapesXML XSD Schema
502
+ Unfortunately we need to keep them in sync
503
+ """
504
+ enum MetaDataTypeEnum {
505
+ BOOLEAN
506
+ FILEPATH
507
+ FLOAT
508
+ GUID
509
+ IMAGE
510
+ INT
511
+ ISODATE
512
+ JSON
513
+ MARKDOWN
514
+ RICHTEXT
515
+ STRING
516
+ TIMESTAMP
517
+ URL
518
+ VIDEO
519
+ }
520
+
521
+ type Mutation {
522
+ """
523
+ Accept or reject an org invite. State afterward will be ACCEPTED or REJECTED
524
+ """
525
+ actionOrganizationInvite(accept: Boolean, id: ID!): OrganizationInvite
526
+ addCollectionProjects(collectionId: ID!, projectIds: [ID!]!): Collection
527
+
528
+ """
529
+ ADMIN: Scan over the dynamoDB and create appropriate OpenSearch entries
530
+ """
531
+ adminReIndexOpenSearch(paginationToken: String): String
532
+
533
+ """
534
+ ADMIN: Recreate/empty opensearch indeces (you will need to run adminRebuildOpenSearch after this)
535
+ """
536
+ adminRecreateOpenSearch: Boolean
537
+
538
+ """ADMIN: Wipe DynamoDB except for users"""
539
+ adminWipeDynamo: Int
540
+
541
+ """Create a collection of projects"""
542
+ createCollection(collection: CollectionInput!, orgId: ID): Collection
543
+ createNotification(notification: NotificationInput): Notification
544
+ createOrganization(organization: OrganizationInput!): Organization
545
+
546
+ """
547
+ Organization admins/owners can invite others. the invite will have the state: INVITED
548
+ One of userId or email must be provided.
549
+ """
550
+ createOrganizationInvite(email: String, organizationId: ID!, role: OrganizationInviteRoleEnum, userId: ID): OrganizationInvite
551
+
552
+ """For user when logging in for the first time"""
553
+ createProfile(id: ID, profile: ProfileInput!): Profile
554
+
555
+ """
556
+ Create a new project. This is the main mutation for creating a new project
557
+ @param projectId: (optional) The ID of the project. If not given then a new one is generated. If it exists in the system then an error is thrown.
558
+ @param project: The project object
559
+ @param projectTypeId: The ID of the project type
560
+ @param orgId: The ID of the organization
561
+ @param userId: The ID of the user
562
+ """
563
+ createProject(orgId: ID, project: ProjectInput!, projectId: ID, projectTypeId: String, userId: ID): Project
564
+
565
+ """
566
+ For most users "createProject" is actually "sugest a project type" and will be created
567
+ with state "SUGGESTED". Only admins can create a ProjectType that starts with state "ACTIVE"
568
+ """
569
+ createProjectType(id: String!, projectType: ProjectTypeInput!, state: ProjectTypeStateEnum): ProjectType
570
+ createSavedSearch(orgId: ID, savedSearch: SavedSearchInput!): SavedSearch
571
+ createTransfer(transfer: TransferInput!): Transfer
572
+ deleteCollection(id: ID!): MutationResult
573
+
574
+ """
575
+ This is the equivalent of dismissing notifications. It is permanent
576
+ - if ids is specified then specific notifications will be deleted
577
+ - if all: True then all notifications for this user will be deleted
578
+ """
579
+ deleteNotifications(all: Boolean, ids: [ID!]): MutationResult
580
+ deleteOrganization(id: ID!, options: EntityDeletionOptions): MutationResult
581
+
582
+ """Organization admins/owners can dis-invite others."""
583
+ deleteOrganizationInvite(id: ID!): MutationResult
584
+
585
+ """Delete your user profile from the system"""
586
+ deleteProfile(options: EntityDeletionOptions): MutationResult
587
+
588
+ """
589
+ Delete a project. This will mark a project for deletion so it stops showing in search results. The actual deletion
590
+ will happen in the background and only complete once the purgeProject() call has been fired.
591
+ """
592
+ deleteProject(options: EntityDeletionOptions, projectId: ID!): MutationResult
593
+
594
+ """
595
+ Delete is a super-rare, super high-privilege command that will only work for admins
596
+ because it means deleting a project type and all projects with that type
597
+ """
598
+ deleteProjectType(id: String!): MutationResult
599
+ deleteSavedSearch(id: ID!): MutationResult
600
+ deleteTransfer(transferId: ID!): MutationResult
601
+
602
+ """
603
+ When all files have been uploaded you can call this to start processing the project
604
+ """
605
+ finalizeProjectUpload(token: String!): JobStatusObj
606
+
607
+ """
608
+ Purge a project. This will delete a project from the system. This is a machine-only call used by the janitor
609
+ """
610
+ purgeProject(projectId: ID!): MutationResult
611
+ queueTileRebuild(projectId: ID!, rsXPath: String): Dataset
612
+ reIndexProjectXML(projectId: ID!): WatcherOutput
613
+ removeCollectionProjects(collectionId: ID!, projectIds: [ID!]!): Collection
614
+
615
+ """
616
+ Kick a user (or yourself) from the org (Owners cannot be removed until they are downgraded)
617
+ """
618
+ removeOrganizationMember(organizationId: ID!, userId: ID!): MutationResult
619
+
620
+ """
621
+ Users can request access to an organization with initial role of VIEWER. the invite will have the state: REQUESTED
622
+ """
623
+ requestOrganizationInvite(organizationId: ID!): OrganizationInvite
624
+
625
+ """Organization admins/owners can resend expired invitiations."""
626
+ resendOrganizationInvite(id: ID!): OrganizationInvite
627
+
628
+ """updateCollection: Note that with projectIds, order matters"""
629
+ updateCollection(collection: CollectionInput, id: ID!): Collection
630
+
631
+ """ids: Notification ids (large interger timestamp)"""
632
+ updateNotifications(ids: [ID!]!, markAs: NotificationOperationEnum!): MutationResult
633
+ updateOrganization(id: ID!, organization: OrganizationInput!): Organization
634
+ updateOrganizationMember(organizationId: ID!, role: OrganizationRoleEnum, userId: ID!): OrganizationUser
635
+
636
+ """Updating your user proile"""
637
+ updateProfile(profile: ProfileInput!): Profile
638
+ updateProject(project: ProjectInput!, projectId: ID!): Project
639
+ updateProjectDataset(dataset: DatasetUpdate!, projectId: ID!, rsXPath: String!): Dataset
640
+ updateProjectDatasetLayer(datasetLayer: DatasetLayerUpdate!, lyrName: String!, projectId: ID!, rsXPath: String!): DatasetLayer
641
+ updateProjectQAQC(projectId: ID!, qaqc: QAQCEventInput!, qaqcId: ID!): QAQCEvent
642
+
643
+ """
644
+ This call allows you to alter the project type object (including the ID)
645
+ If the ID is changed then we'll need to go through all projects of that type
646
+ and rename them. This should be a super rare operation but it's here for completeness
647
+ """
648
+ updateProjectType(id: String!, projectType: ProjectTypeInput!, state: ProjectTypeStateEnum): ProjectType
649
+ updateSavedSearch(id: ID!, savedSearch: SavedSearchInput!): SavedSearch
650
+ updateStar(id: ID!, starred: Boolean!, type: StarrableTypesEnum!): MutationResult
651
+
652
+ """
653
+ Transfers are fairly immutable. You can only change the note and the state
654
+ """
655
+ updateTransfer(note: String, state: TransferStateEnum, transferId: ID!): Transfer
656
+ zipRebuild(projectId: ID!): Project
657
+ }
658
+
659
+ """Generic Mutation results"""
660
+ type MutationResult {
661
+ """The error (if there is one)"""
662
+ error: String
663
+
664
+ """the ID of the object being mutated"""
665
+ ids: [ID!]
666
+
667
+ """Any non-error message returned by the mutation for use in the UI"""
668
+ message: String
669
+
670
+ """did this mutation succeed?"""
671
+ success: Boolean!
672
+ }
673
+
674
+ type MyStars {
675
+ collections(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedCollections!
676
+ organizations(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedOrganizations!
677
+ projects(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedProjects!
678
+ savedSearches(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedSavedSearches!
679
+ users(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedUsers!
680
+ }
681
+
682
+ type Notification {
683
+ id: ID!
684
+ object: DBObjNotifications!
685
+ seen: Boolean!
686
+
687
+ """Same as Obj. this is a stripped-down user object"""
688
+ subject: DBObjNotifications!
689
+ time: DateTime!
690
+ type: NotificationTypesEnum!
691
+ verb: NotificationActionsEnum!
692
+ }
693
+
694
+ enum NotificationActionsEnum {
695
+ CREATED
696
+ DELETED
697
+ RENAMED
698
+ TRANSFERRED
699
+ UPDATED
700
+ }
701
+
702
+ input NotificationInput {
703
+ object: DBObjNotificationsInput!
704
+ subject: DBObjNotificationsInput!
705
+ type: NotificationTypesEnum!
706
+ verb: NotificationActionsEnum!
707
+ }
708
+
709
+ enum NotificationOperationEnum {
710
+ DELETE
711
+ MARK_READ
712
+ MARK_UNREAD
713
+ }
714
+
715
+ enum NotificationTypesEnum {
716
+ COLLECTION
717
+ ORGANIZATION
718
+ PROJECT
719
+ SAVED_SEARCH
720
+ USER
721
+ }
722
+
723
+ """On a per-object basis, tell me what I can and can't do"""
724
+ type ObjectPermissions {
725
+ delete: Boolean
726
+ update: Boolean
727
+ view: Boolean
728
+ }
729
+
730
+ type Organization implements DBObj & HasStar {
731
+ collections(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedCollections!
732
+ createdBy: User!
733
+ createdOn: DateTime!
734
+ description: String!
735
+ id: ID!
736
+ logo: URL
737
+ meta: [MetaData!]!
738
+
739
+ """
740
+ This is the role of the user making the query (or the role of the requested user)
741
+ """
742
+ myRole: OrganizationRoleEnum!
743
+ name: String!
744
+
745
+ """List of invites to manage"""
746
+ organizationInvites(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedOrganizationInvites!
747
+
748
+ """
749
+ List of this organization's approved user (Does not include pending invites)
750
+ """
751
+ organizationUsers(limit: Int!, offset: Int!, role: OrganizationRoleEnum, sort: [SearchSortEnum!]): PaginatedOrganizationUsers!
752
+
753
+ """
754
+ This is my relation to this project. This is relatively easy to calculate if I own this object.
755
+ """
756
+ permissions: ObjectPermissions!
757
+ preferences: JSONObject
758
+ projects(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedProjects!
759
+ savedSearches(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedSavedSearches!
760
+ social: SocialLinks
761
+ starred: Boolean!
762
+ starredCount: Int!
763
+ summary: String!
764
+ updatedBy: User!
765
+ updatedOn: DateTime!
766
+ }
767
+
768
+ input OrganizationInput {
769
+ """Resets/deletes the organization logo back to the default"""
770
+ clearLogo: Boolean
771
+
772
+ """Long text (may include markdown)"""
773
+ description: String
774
+
775
+ """The Code you were given from the checkUploadImage endpoint"""
776
+ logoToken: String
777
+
778
+ """Organization Metadata"""
779
+ meta: [MetaDataInput!]
780
+
781
+ """Name of the organization"""
782
+ name: String
783
+
784
+ """Organization Preferences Object"""
785
+ preferences: JSONObject
786
+
787
+ """Social Links"""
788
+ social: SocialLinksInput
789
+
790
+ """Summary or tagline"""
791
+ summary: String
792
+ }
793
+
794
+ type OrganizationInvite implements DBSimpleObj {
795
+ createdBy: User!
796
+ createdOn: DateTime!
797
+ email: String
798
+ id: ID!
799
+
800
+ """
801
+ The user being invited. Null if they don't have an account in the system yet
802
+ """
803
+ invitee: User
804
+ inviter: User!
805
+ organization: Organization!
806
+ retries: Int!
807
+ role: OrganizationInviteRoleEnum!
808
+ state: OrganizationInviteStateEnum!
809
+ updatedBy: User!
810
+ updatedOn: DateTime!
811
+ }
812
+
813
+ enum OrganizationInviteRoleEnum {
814
+ ADMIN
815
+ CONTRIBUTOR
816
+ VIEWER
817
+ }
818
+
819
+ enum OrganizationInviteStateEnum {
820
+ ACCEPTED
821
+ EXPIRED
822
+ INVITED
823
+ REJECTED
824
+ REQUESTED
825
+ }
826
+
827
+ enum OrganizationRoleEnum {
828
+ ADMIN
829
+ CONTRIBUTOR
830
+ NONE
831
+ OWNER
832
+ VIEWER
833
+ }
834
+
835
+ type OrganizationUser {
836
+ organization: Organization!
837
+ role: OrganizationRoleEnum!
838
+ user: User!
839
+ }
840
+
841
+ union Owner = Organization | User
842
+
843
+ input OwnerInput {
844
+ id: String!
845
+ type: OwnerInputTypesEnum!
846
+ }
847
+
848
+ enum OwnerInputTypesEnum {
849
+ ORGANIZATION
850
+ USER
851
+ }
852
+
853
+ union Owners = PaginatedUsers
854
+
855
+ type PaginatedCollections implements Pagination {
856
+ items: [Collection!]!
857
+ limit: Int!
858
+ offset: Int!
859
+ total: Int!
860
+ }
861
+
862
+ type PaginatedDatasets implements Pagination {
863
+ items: [Dataset!]!
864
+ limit: Int!
865
+ offset: Int!
866
+ total: Int!
867
+ }
868
+
869
+ type PaginatedFileDownloadMeta implements Pagination {
870
+ items: [FileDownloadMeta!]!
871
+ limit: Int!
872
+ offset: Int!
873
+ total: Int!
874
+ }
875
+
876
+ type PaginatedNotifications implements Pagination {
877
+ items: [Notification!]!
878
+ limit: Int!
879
+ offset: Int!
880
+ total: Int!
881
+ }
882
+
883
+ type PaginatedOrganizationInvites implements Pagination {
884
+ items: [OrganizationInvite!]!
885
+ limit: Int!
886
+ offset: Int!
887
+ total: Int!
888
+ }
889
+
890
+ type PaginatedOrganizationUsers implements Pagination {
891
+ items: [OrganizationUser!]!
892
+ limit: Int!
893
+ offset: Int!
894
+ total: Int!
895
+ }
896
+
897
+ type PaginatedOrganizations implements Pagination {
898
+ items: [Organization!]!
899
+ limit: Int!
900
+ offset: Int!
901
+ total: Int!
902
+ }
903
+
904
+ type PaginatedProjectTypes implements Pagination {
905
+ items: [ProjectType!]!
906
+ limit: Int!
907
+ offset: Int!
908
+ total: Int!
909
+ }
910
+
911
+ type PaginatedProjects implements Pagination {
912
+ items: [Project!]!
913
+ limit: Int!
914
+ offset: Int!
915
+ total: Int!
916
+ }
917
+
918
+ type PaginatedQAQCEvents implements Pagination {
919
+ items: [QAQCEvent!]!
920
+ limit: Int!
921
+ offset: Int!
922
+ total: Int!
923
+ }
924
+
925
+ type PaginatedSavedSearches implements Pagination {
926
+ items: [SavedSearch!]!
927
+ limit: Int!
928
+ offset: Int!
929
+ total: Int!
930
+ }
931
+
932
+ type PaginatedUsers implements Pagination {
933
+ items: [User!]!
934
+ limit: Int!
935
+ offset: Int!
936
+ total: Int!
937
+ }
938
+
939
+ """Generic Pagination Interface"""
940
+ interface Pagination {
941
+ limit: Int!
942
+ offset: Int!
943
+ total: Int!
944
+ }
945
+
946
+ """A Profile is MY User object and there are extra fields I can look at"""
947
+ type Profile implements DBObj & UserInterface {
948
+ affiliations: [UserAffiliation]!
949
+ avatar: URL
950
+
951
+ """
952
+ Collections this user owns. Filtered if the querying user is someone else
953
+ """
954
+ collections(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedCollections!
955
+ createdBy: User!
956
+ createdOn: DateTime!
957
+ description: String!
958
+ id: ID!
959
+
960
+ """If the user has never logged in here this is uninitialized"""
961
+ initialized: Boolean
962
+ isAdmin: Boolean!
963
+ jobTitle: String!
964
+ lastLogin: DateTime!
965
+ location: String!
966
+ meta: [MetaData!]!
967
+ name: String!
968
+ notifications(limit: Int!, offset: Int!, op: NotificationOperationEnum): PaginatedNotifications!
969
+ organizationInvites(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedOrganizationInvites!
970
+
971
+ """Organizations this user is a member of."""
972
+ organizations(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedOrganizations!
973
+ preferences: JSONObject!
974
+
975
+ """Projects this user owns. Filtered if the querying user is someone else"""
976
+ projects(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedProjects!
977
+
978
+ """
979
+ Saved Searches this user owns. Filtered if the querying user is someone else
980
+ """
981
+ savedSearches(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedSavedSearches!
982
+ social: SocialLinks!
983
+ starred: Boolean!
984
+ starredCount: Int!
985
+ stars: MyStars!
986
+ summary: String!
987
+ updatedBy: User!
988
+ updatedOn: DateTime!
989
+ }
990
+
991
+ input ProfileInput {
992
+ """Any organizational affiliation(s) the user specifies"""
993
+ affiliations: [UserAffiliationInput!]
994
+
995
+ """The Code you were given from the checkUploadImage endpoint"""
996
+ avatarToken: String
997
+
998
+ """Resets/deletes the user's avatar back to the default"""
999
+ clearAvatar: Boolean
1000
+
1001
+ """Long text (may include markdown)"""
1002
+ description: String
1003
+
1004
+ """Simple job title string field"""
1005
+ jobTitle: String
1006
+
1007
+ """
1008
+ Simple location string (Optional) eg: "Vancouver, Canada"
1009
+ """
1010
+ location: String
1011
+
1012
+ """Organization Metadata"""
1013
+ meta: [MetaDataInput!]
1014
+
1015
+ """Name of the organization"""
1016
+ name: String
1017
+
1018
+ """Organization Preferences Object"""
1019
+ preferences: JSONObject
1020
+
1021
+ """Specify a set of connection strings for Social media"""
1022
+ socialLinks: SocialLinksInput
1023
+
1024
+ """Summary or tagline"""
1025
+ summary: String
1026
+ }
1027
+
1028
+ type Project implements DBObj & HasOwner & HasStar {
1029
+ """Banner image (optional)"""
1030
+ bounds: ProjectBounds
1031
+ citation: String
1032
+ collections(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedCollections!
1033
+ createdBy: User!
1034
+ createdOn: DateTime!
1035
+ datasets(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedDatasets!
1036
+ description: String!
1037
+ files: [FileDownloadMeta!]!
1038
+
1039
+ """Banner image (optional)"""
1040
+ heroImage: HeroImage
1041
+ id: ID!
1042
+
1043
+ """
1044
+ This meta derives from the XML. When we change it we need to write back tot he XML
1045
+ The user should be warned that if the XML changes it will overwrite these values
1046
+ """
1047
+ meta: [MetaData!]!
1048
+ name: String!
1049
+ ownedBy: Owner!
1050
+
1051
+ """
1052
+ This is my relation to this project. This is relatively easy to calculate if I own this object.
1053
+ """
1054
+ permissions: ObjectPermissions!
1055
+ projectType: ProjectType!
1056
+ qaqc(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedQAQCEvents!
1057
+ ref: String!
1058
+ sponsor: Owner
1059
+ starred: Boolean!
1060
+ starredCount: Int!
1061
+ summary: String!
1062
+ tags: [String!]!
1063
+
1064
+ """Bytesize of the unzipped project"""
1065
+ totalSize: Int
1066
+ tree: ProjectTree!
1067
+ updatedBy: User!
1068
+ updatedOn: DateTime!
1069
+ visibility: ProjectVisibilityEnum!
1070
+ }
1071
+
1072
+ type ProjectBounds implements DBSimpleObj {
1073
+ """Calculated area of """
1074
+ area: Float
1075
+
1076
+ """bbox: [minLng, minLat, maxLng, maxLat]"""
1077
+ bbox: [Float!]!
1078
+
1079
+ """centroid: [longitude, latitude]"""
1080
+ centroid: [Float!]!
1081
+ createdBy: User!
1082
+ createdOn: DateTime!
1083
+
1084
+ """
1085
+ Geohash is how we do clustering in ElasticSearch
1086
+ https://github.com/sunng87/node-geohash
1087
+ https://www.npmjs.com/package/ngeohash
1088
+ https://www.npmjs.com/package/@mapbox/geojson-area
1089
+ https://www.npmjs.com/package/@mapbox/geojson-extent
1090
+ https://www.npmjs.com/package/@mapbox/geojson-normalize
1091
+ https://github.com/hackergrrl/geojson-polygons-equal/blob/master/index.js
1092
+ https://github.com/jczaplew/geojson-precision/blob/master/index.js
1093
+ https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geohashgrid-aggregation.html
1094
+ """
1095
+ geoHash: String
1096
+
1097
+ """
1098
+ This id is unique to specific shapes in the DB
1099
+ Useful for grouping multiple projects with the same bounding polygon
1100
+ It is a GUID
1101
+ """
1102
+ id: ID!
1103
+
1104
+ """polygon: Simplified GeoJSON of project outputs."""
1105
+ polygonUrl: URL!
1106
+ updatedBy: User!
1107
+ updatedOn: DateTime!
1108
+ }
1109
+
1110
+ enum ProjectDeleteChoicesEnum {
1111
+ DELETE
1112
+ DELETE_COMPLETE
1113
+ }
1114
+
1115
+ enum ProjectGroupVisibilityEnum {
1116
+ PUBLIC
1117
+ SECRET
1118
+ }
1119
+
1120
+ input ProjectInput {
1121
+ """
1122
+ Project bounds object code you were given from the checkUploadBounds endpoint
1123
+ """
1124
+ boundsToken: String
1125
+
1126
+ """Scientitfic or accademic citation (string)"""
1127
+ citation: String
1128
+
1129
+ """Resets/deletes the project's bounds"""
1130
+ clearBounds: Boolean
1131
+
1132
+ """Resets/deletes the user's avatar back to the default"""
1133
+ clearHeroImage: Boolean
1134
+
1135
+ """remove the sponsor for the proejct"""
1136
+ clearSponsor: Boolean
1137
+
1138
+ """Attach new datasets or add/remove linked datasets"""
1139
+ datasets: [DatasetInput!]
1140
+
1141
+ """
1142
+ ONLY FOR UPDATING: Specify dataset ids (and by that I mean rsXPaths) to be deleted
1143
+ """
1144
+ deleteDatasets: [ID!]
1145
+
1146
+ """Long text (may include markdown)"""
1147
+ description: String
1148
+
1149
+ """The Code you were given from the checkUploadImage endpoint"""
1150
+ heroImageToken: String
1151
+
1152
+ """Organization Metadata"""
1153
+ meta: [MetaDataInput!]
1154
+
1155
+ """Name of the project."""
1156
+ name: String
1157
+
1158
+ """Attache any QAQC tasks in order"""
1159
+ qaqc: [QAQCEventInput!]
1160
+
1161
+ """Optional: Sponsor ID"""
1162
+ sponsor: OwnerInput
1163
+
1164
+ """Summary or tagline"""
1165
+ summary: String
1166
+
1167
+ """Tags for this collection"""
1168
+ tags: [String!]
1169
+
1170
+ """Byte size of entire project uncompressed"""
1171
+ totalSize: Int
1172
+
1173
+ """Project visibility settings: Either PUBLIC, PRIVATE or SECRET"""
1174
+ visibility: ProjectVisibilityEnum
1175
+ }
1176
+
1177
+ type ProjectSearchMeta {
1178
+ """
1179
+ The area covered by all projects returned
1180
+ (all overlaps are included)
1181
+ """
1182
+ area: Float
1183
+
1184
+ """
1185
+ bbox: [minLng, minLat, maxLng, maxLat]
1186
+ The geo bounds of all possible results
1187
+ (Applies to projects only)
1188
+ """
1189
+ bbox: [Float!]
1190
+
1191
+ """
1192
+ Histogram of distances
1193
+ (Applies to projects only)
1194
+ """
1195
+ geoBuckets: JSONObject
1196
+ maxScore: Float
1197
+ metaDataBuckets: JSONObject!
1198
+
1199
+ """
1200
+ ProjectTypes: Key-balue pairs of project types and counts
1201
+ (Applies to projects only)
1202
+ """
1203
+ projectTypes: JSONObject
1204
+
1205
+ """OpenSearch time to retrieve results (ms)"""
1206
+ searchTime: Float
1207
+ }
1208
+
1209
+ """
1210
+ For searching projects we use this for both the searchProjects query AND
1211
+ the SavedSearchInput type
1212
+ """
1213
+ type ProjectSearchParams {
1214
+ """bbox: [minLng, minLat, maxLng, maxLat]"""
1215
+ bbox: [Float!]
1216
+
1217
+ """Filter to projects inside a collection"""
1218
+ collection: ID
1219
+
1220
+ """
1221
+ Filter to projects between two dates {from, to}
1222
+ You can specify one of 'from' OR 'to' to find projects before 'to' date or after 'from' date
1223
+ or you can specify both 'from' AND 'to' to specify projects BETWEEN two dates
1224
+ """
1225
+ createdOn: SearchDate
1226
+
1227
+ """Only projects that I can edit as a user """
1228
+ editableOnly: Boolean
1229
+ keywords: String
1230
+ meta: [MetaData!]
1231
+ name: String
1232
+ ownedBy: SearchOwner
1233
+
1234
+ """The id (machineName) of the project type. Case insensitive."""
1235
+ projectTypeId: String
1236
+ tags: [String!]
1237
+
1238
+ """
1239
+ Filter to projects between two dates {from, to}
1240
+ You can specify one of 'from' OR 'to' to find projects before 'to' date or after 'from' date
1241
+ or you can specify both 'from' AND 'to' to specify projects BETWEEN two dates
1242
+ """
1243
+ updatedOn: SearchDate
1244
+ }
1245
+
1246
+ """
1247
+ For searching projects we use this for both the searchProjects query AND
1248
+ the SavedSearchInput type
1249
+ """
1250
+ input ProjectSearchParamsInput {
1251
+ """bbox: [minLng, minLat, maxLng, maxLat]"""
1252
+ bbox: [Float!]
1253
+
1254
+ """
1255
+ Filter to projects that have this particular Bound polygon assoicated with them by id
1256
+ """
1257
+ boundsId: ID
1258
+
1259
+ """Filter to projects inside a collection"""
1260
+ collection: ID
1261
+
1262
+ """
1263
+ Filter to projects between two dates {from, to}
1264
+ You can specify one of 'from' OR 'to' to find projects before 'to' date or after 'from' date
1265
+ or you can specify both 'from' AND 'to' to specify projects BETWEEN two dates
1266
+ """
1267
+ createdOn: SearchDateInput
1268
+
1269
+ """Only projects that I can edit as a user """
1270
+ editableOnly: Boolean
1271
+ keywords: String
1272
+ meta: [MetaDataInput!]
1273
+ name: String
1274
+
1275
+ """Filter to projects owned by a user or organization"""
1276
+ ownedBy: OwnerInput
1277
+
1278
+ """The id (machineName) of the project type. Case insensitive."""
1279
+ projectTypeId: String
1280
+ tags: [String!]
1281
+
1282
+ """
1283
+ Filter to projects between two dates {from, to}
1284
+ You can specify one of 'from' OR 'to' to find projects before 'to' date or after 'from' date
1285
+ or you can specify both 'from' AND 'to' to specify projects BETWEEN two dates
1286
+ """
1287
+ updatedOn: SearchDateInput
1288
+ }
1289
+
1290
+ type ProjectTree {
1291
+ branches: [ProjectTreeBranch!]!
1292
+ defaultView: ID
1293
+ description: String
1294
+ leaves: [ProjectTreeLeaf!]!
1295
+ name: String
1296
+ views: [ProjectTreeView!]!
1297
+ }
1298
+
1299
+ type ProjectTreeBranch {
1300
+ """Branch ID (generated at parse time)"""
1301
+ bid: Int!
1302
+ collapsed: Boolean
1303
+ label: String!
1304
+
1305
+ """Parent ID (generated at parse time)"""
1306
+ pid: Int!
1307
+ }
1308
+
1309
+ """
1310
+ ProjectTreeLayerTypes is an enumeration to help us display layers with the
1311
+ correct icon and assign them to the right slot
1312
+ """
1313
+ enum ProjectTreeLayerTypeEnum {
1314
+ FILE
1315
+ LINE
1316
+ POINT
1317
+ POLYGON
1318
+ RASTER
1319
+ REPORT
1320
+ TIN
1321
+ }
1322
+
1323
+ type ProjectTreeLeaf {
1324
+ """
1325
+ blLayerId: The id on the Node element from the business logic that we use in Views to
1326
+ reference leaves in the tree
1327
+ """
1328
+ blLayerId: String
1329
+
1330
+ """
1331
+ This is going to let us find the actual file we need to download (if applicable)
1332
+ """
1333
+ filePath: String
1334
+
1335
+ """Tree id of this leaf. This is generated at parse-time"""
1336
+ id: Int!
1337
+ label: String!
1338
+
1339
+ """from the BL (Optional)"""
1340
+ labelxpath: String
1341
+
1342
+ """from BL. Renderable WebRave Types (Not DS Types)"""
1343
+ layerType: ProjectTreeLayerTypeEnum!
1344
+
1345
+ """This is going to let us find the DasetLayer (if applicaple)"""
1346
+ lyrName: String
1347
+
1348
+ """Business Logic id="" attribute"""
1349
+ nodeId: ID
1350
+
1351
+ """
1352
+ parent ID (relates to bid from ProjectTreeBranch)
1353
+ generated at parse-time
1354
+ """
1355
+ pid: Int!
1356
+
1357
+ """
1358
+ This is going to let us find the Dataset
1359
+ corresponding to the leaf we're trying to render
1360
+ """
1361
+ rsXPath: String!
1362
+ symbology: String
1363
+ transparency: Int
1364
+ }
1365
+
1366
+ type ProjectTreeView {
1367
+ description: String
1368
+ id: ID!
1369
+ layers: [ProjectTreeViewLayer!]!
1370
+ name: String!
1371
+ }
1372
+
1373
+ type ProjectTreeViewLayer {
1374
+ id: ID!
1375
+ visible: Boolean
1376
+ }
1377
+
1378
+ type ProjectType implements DBObj {
1379
+ createdBy: User!
1380
+ createdOn: DateTime!
1381
+ description: String!
1382
+ id: ID!
1383
+ logo: URL
1384
+ machineName: String!
1385
+
1386
+ """
1387
+ This meta derives from the XML. When we change it we need to write back tot he XML
1388
+ The user should be warned that if the XML changes it will overwrite these values
1389
+ """
1390
+ meta: [MetaData!]!
1391
+ name: String!
1392
+ state: ProjectTypeStateEnum!
1393
+ summary: String!
1394
+ updatedBy: User!
1395
+ updatedOn: DateTime!
1396
+ url: URL
1397
+ }
1398
+
1399
+ input ProjectTypeInput {
1400
+ """Resets/deletes the organization logo back to the default"""
1401
+ clearLogo: Boolean
1402
+ description: String
1403
+
1404
+ """The Code you were given from the checkUploadImage endpoint"""
1405
+ logoToken: String
1406
+
1407
+ """
1408
+ This meta derives from the XML. When we change it we need to write back tot he XML
1409
+ The user should be warned that if the XML changes it will overwrite these values
1410
+ """
1411
+ meta: [MetaDataInput!]
1412
+ name: String
1413
+ summary: String
1414
+ url: URL
1415
+ }
1416
+
1417
+ enum ProjectTypeStateEnum {
1418
+ ACTIVE
1419
+ DELETED
1420
+ SUGGESTED
1421
+ }
1422
+
1423
+ type ProjectUploadUrl {
1424
+ fields: JSONObject
1425
+ origPath: String
1426
+ url: String!
1427
+ }
1428
+
1429
+ type ProjectValidation {
1430
+ errors: [ProjectValidationError]
1431
+ valid: Boolean
1432
+ }
1433
+
1434
+ type ProjectValidationError {
1435
+ code: String
1436
+ message: String!
1437
+ severity: SeverityEnum
1438
+ }
1439
+
1440
+ enum ProjectVisibilityEnum {
1441
+ PRIVATE
1442
+ PUBLIC
1443
+ SECRET
1444
+ }
1445
+
1446
+ type QAQCEvent implements DBObj {
1447
+ createdBy: User!
1448
+ createdOn: DateTime!
1449
+
1450
+ """
1451
+ The date this task was performed. This will help us sort out a timeline
1452
+ for the QA/QC workflow
1453
+ """
1454
+ datePerformed: DateTime!
1455
+ description: String!
1456
+ id: ID!
1457
+
1458
+ """QA/QC Nodes may have extra metadata but it is not mandatory"""
1459
+ meta: [MetaData!]!
1460
+
1461
+ """The QAQC Task Name"""
1462
+ name: String!
1463
+
1464
+ """
1465
+ performed by: Some string indicating who is responsible for this task
1466
+ does NOT link to Riverscapes User accounts
1467
+ """
1468
+ performedBy: String!
1469
+
1470
+ """The state of this QAQC Task """
1471
+ state: QAQCStateEnum!
1472
+ summary: String!
1473
+
1474
+ """Any supporting links to Github issues or anything else"""
1475
+ supportingLinks: [Link!]
1476
+ updatedBy: User!
1477
+ updatedOn: DateTime!
1478
+ }
1479
+
1480
+ input QAQCEventInput {
1481
+ datePerformed: DateTime!
1482
+
1483
+ """Long text (may include markdown)"""
1484
+ description: String
1485
+
1486
+ """Organization Metadata"""
1487
+ meta: [MetaDataInput!]
1488
+ name: String
1489
+
1490
+ """
1491
+ performed by: Some string indicating who is responsible for this task
1492
+ does NOT link to Riverscapes User accounts
1493
+ """
1494
+ performedBy: String!
1495
+
1496
+ """The state of this QA/QC Task"""
1497
+ state: QAQCStateEnum!
1498
+
1499
+ """Summary or tagline"""
1500
+ summary: String
1501
+
1502
+ """Any supporting links to Github issues or anything else"""
1503
+ supportingLinks: [LinkInput!]
1504
+ }
1505
+
1506
+ enum QAQCStateEnum {
1507
+ FAILED
1508
+ PASSED
1509
+ PROVISIONAL
1510
+ }
1511
+
1512
+ type Query {
1513
+ """
1514
+ Works for images, bounds and projects. Checks if they have been processed and are ready for use
1515
+ """
1516
+ checkUpload(token: String!): JobStatusObj
1517
+ collection(id: ID!): Collection
1518
+ downloadFile(filePath: String!, projectId: ID!): FileDownloadMeta
1519
+ downloadZip(projectId: ID!): ZipFileDownloadMeta
1520
+ getLayerTiles(projectId: ID!, projectTypeId: String, rsXPath: String!): TileService
1521
+
1522
+ """
1523
+ getWebSymbology for a given project type. These types will be retrived from the curated WebRave Symbology repo
1524
+ """
1525
+ getWebSymbology(isRaster: Boolean, name: String!, projectTypeId: String): Symbology
1526
+
1527
+ """
1528
+ There are some useful properties that are useful for the CLI and other apps
1529
+ """
1530
+ info: WarehouseInfo
1531
+ organization(id: ID!): Organization
1532
+
1533
+ """
1534
+ Profile includes the User object but also specific fields to the person logged in
1535
+ """
1536
+ profile: Profile
1537
+ project(id: ID!): Project
1538
+ projectType(id: String!): ProjectType
1539
+
1540
+ """projectTypes list. Default state is ACTIVE"""
1541
+ projectTypes(limit: Int!, offset: Int!, state: ProjectTypeStateEnum): PaginatedProjectTypes
1542
+ requestUploadBounds: UploadUrl
1543
+ requestUploadImage(entityId: ID!, entityType: EntitiesWithImagesEnum!): UploadUrl
1544
+
1545
+ """
1546
+ Request an upload start. Writes a manifest file on the upload bucket
1547
+ and creates upload urls for all the files we want to add.
1548
+ This is also wher ethe referenved/unreferenced sorting happens
1549
+
1550
+ Notes:
1551
+
1552
+ - If projectId is given then this projet is uploaded as an UPDATE operation
1553
+ - If token is given then we just return a previously calculated download object
1554
+ - If neither token nor projectId is given then this is processed as a new project
1555
+
1556
+ Arguments:
1557
+
1558
+ - owner: (optional) The intended owner of the new project. If left blank then UPDATE is assumed and the original owner is used.
1559
+ - files: a string list of filepaths to local files
1560
+ - etags: a string list of etags (S3 analog to MD5) for each file. List size must match "files: [String!]!"
1561
+ - sizes: a string list of file sizes (S3 analog to MD5) for each file. List size must match "files: [String!]!"
1562
+ - noDelete: indicates that we do NOT want to touch remote files that are not also present on the local server
1563
+ - tags: a list of tags to add to the project (these are the warehouse tags)
1564
+ - visibility: the visibility of the project. Defaults to PUBLIC
1565
+ """
1566
+ requestUploadProject(etags: [String!]!, files: [String!]!, noDelete: Boolean, owner: OwnerInput, projectId: String, sizes: [Int!]!, tags: [String!], token: String, visibility: ProjectVisibilityEnum): UploadProjectRequest
1567
+
1568
+ """
1569
+ Using requestUploadProject() you can get a valid upload token. From there you can ask for presigned urls for any file you
1570
+ have specified above
1571
+ """
1572
+ requestUploadProjectFilesUrl(files: [String!]!, token: String!): [UploadProjectFileUrls]
1573
+ savedSearch(id: ID!): SavedSearch
1574
+ searchCollections(limit: Int!, offset: Int!, params: SearchParamsInput!, sort: [SearchSortEnum!]): SearchCollectionPagination!
1575
+
1576
+ """
1577
+ This is a complementary search to "searchProjects". It can be run with essentially the same
1578
+ parameters
1579
+
1580
+ Note: params.bbox MUST be included for the searchProjectsMap
1581
+ clusters: the number of clusters we should aim for
1582
+ """
1583
+ searchMapBounds(limit: Int!, params: ProjectSearchParamsInput!): SearchMapBoundsResult!
1584
+
1585
+ """
1586
+ Discussion here https://github.com/Riverscapes/rs-web-monorepo/discussions/251
1587
+ limit: the maximum number of clusters to get back. After this number the list is truncated and any remaining projects are simply represented by the "remaining" property
1588
+ precision: The size of the grid to place the clusters on. We use npm's ngeohash for gridding
1589
+ """
1590
+ searchMapClusters(limit: Int!, params: ProjectSearchParamsInput!, precision: Int!): SearchMapClusterResult!
1591
+ searchOrganizations(limit: Int!, offset: Int!, params: SearchParamsInput!, sort: [SearchSortEnum!]): SearchOrganizationPagination!
1592
+ searchProjects(limit: Int!, offset: Int!, params: ProjectSearchParamsInput!, sort: [SearchSortEnum!]): SearchProjectPagination!
1593
+ searchSavedSearches(limit: Int!, offset: Int!, params: SearchParamsInput!, sort: [SearchSortEnum!]): SearchSavedSearchPagination!
1594
+
1595
+ """
1596
+ As-you-type suggestions:
1597
+ TODO: this needs to be typed but for now it's just pure JSON
1598
+ """
1599
+ searchSuggest(text: String!, type: StarrableTypesEnum): SearchSuggestionResults
1600
+ searchUsers(limit: Int!, offset: Int!, params: SearchParamsInput!, sort: [SearchSortEnum!]): SearchUserPagination!
1601
+
1602
+ """A User is any user in the system"""
1603
+ user(id: ID!): User
1604
+
1605
+ """
1606
+ Validate a raw project.rs.xml file to check if it is a valida candidate for uploading
1607
+ It is highly recommended that you call this before requestUploadProjectFileUrls or uploading
1608
+ files to prevent a lengthy process with a preventable error at the end
1609
+
1610
+ - xml: String contents of the project.rs.xml file
1611
+ - owner: (optional) The intended owner of the new project. If left blank then UPDATE is assumed and the original owner is used.
1612
+ - files: a string list of filepaths to local files
1613
+ """
1614
+ validateProject(files: [String!]!, owner: OwnerInput, xml: String!): ProjectValidation
1615
+ }
1616
+
1617
+ enum RampTypeEnum {
1618
+ DISCRETE
1619
+ EXACT
1620
+ INTERPOLATED
1621
+ }
1622
+
1623
+ type SavedSearch implements DBObj & HasOwner & HasStar & HasTags {
1624
+ createdBy: User!
1625
+ createdOn: DateTime!
1626
+
1627
+ """
1628
+ The default sort to use. The UI may offer a way to change this on the fly
1629
+ """
1630
+ defaultSort: [SearchSortEnum!]
1631
+ description: String!
1632
+ id: ID!
1633
+ meta: [MetaData!]!
1634
+ name: String!
1635
+ ownedBy: Owner!
1636
+ permissions: ObjectPermissions!
1637
+ projects(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): SearchProjectPagination!
1638
+
1639
+ """The project search fields this saved search uses """
1640
+ searchParams: ProjectSearchParams!
1641
+ starred: Boolean!
1642
+ starredCount: Int!
1643
+ summary: String!
1644
+ tags: [String!]!
1645
+ updatedBy: User!
1646
+ updatedOn: DateTime!
1647
+ visibility: ProjectGroupVisibilityEnum!
1648
+ }
1649
+
1650
+ input SavedSearchInput {
1651
+ """
1652
+ The default sort to use. The UI may offer a way to change this on the fly
1653
+ """
1654
+ defaultSort: [SearchSortEnum!]
1655
+
1656
+ """Verbose description of the object (< SOME_LIMIT kb of text)"""
1657
+ description: String
1658
+
1659
+ """Metadata for this object"""
1660
+ meta: [MetaDataInput!]
1661
+
1662
+ """Name of the object"""
1663
+ name: String
1664
+
1665
+ """The project search fields this saved search uses """
1666
+ searchParams: ProjectSearchParamsInput
1667
+
1668
+ """Brief tagline or intro sentence for the item (<500 characters)"""
1669
+ summary: String
1670
+
1671
+ """Tags for this object"""
1672
+ tags: [String!]
1673
+
1674
+ """Saved Search visibility settings: Either PUBLIC or SECRET"""
1675
+ visibility: ProjectGroupVisibilityEnum
1676
+ }
1677
+
1678
+ type SearchCollection implements SearchResult {
1679
+ highlights: JSONObject
1680
+ item: Collection!
1681
+ score: Float
1682
+ }
1683
+
1684
+ type SearchCollectionPagination implements Pagination & SearchPagination {
1685
+ limit: Int!
1686
+ offset: Int!
1687
+ results: [SearchCollection!]!
1688
+ stats: SearchStats
1689
+ total: Int!
1690
+ }
1691
+
1692
+ type SearchDataset implements SearchResult {
1693
+ highlights: JSONObject
1694
+ item: Dataset!
1695
+ score: Float
1696
+ }
1697
+
1698
+ type SearchDatasetPagination implements Pagination & SearchPagination {
1699
+ limit: Int!
1700
+ offset: Int!
1701
+ results: [SearchDataset!]!
1702
+ stats: SearchStats
1703
+ total: Int!
1704
+ }
1705
+
1706
+ type SearchDate {
1707
+ """(Optional) , only use for BETWEEN operator"""
1708
+ from: DateTime
1709
+
1710
+ """(Optional), only use for BETWEEN operator"""
1711
+ to: DateTime
1712
+ }
1713
+
1714
+ input SearchDateInput {
1715
+ """(Optional) , only use for BETWEEN operator"""
1716
+ from: DateTime
1717
+
1718
+ """(Optional), only use for BETWEEN operator"""
1719
+ to: DateTime
1720
+ }
1721
+
1722
+ type SearchMapBoundsItem {
1723
+ bounds: ProjectBounds!
1724
+ clusters: [MapCluster!]!
1725
+ projectCount: Int!
1726
+ }
1727
+
1728
+ type SearchMapBoundsResult {
1729
+ bounds: [SearchMapBoundsItem!]!
1730
+
1731
+ """The number of valid search results outstanding"""
1732
+ remaining: Int!
1733
+ }
1734
+
1735
+ type SearchMapClusterResult {
1736
+ clusters: [MapCluster!]!
1737
+
1738
+ """The number of valid search results outstanding"""
1739
+ remaining: Int!
1740
+ }
1741
+
1742
+ type SearchMeta {
1743
+ maxScore: Float
1744
+ metaDataBuckets: JSONObject!
1745
+
1746
+ """OpenSearch time to retrieve results (ms)"""
1747
+ searchTime: Float
1748
+ }
1749
+
1750
+ """Search Meta that are common to all types"""
1751
+ interface SearchMetaInterface {
1752
+ """The maximum relevance score"""
1753
+ maxScore: Float
1754
+
1755
+ """Collection of stats about the Metadata key value pairs for this object"""
1756
+ metaDataBuckets: JSONObject!
1757
+
1758
+ """OpenSearch time to retrieve results (ms)"""
1759
+ searchTime: Float
1760
+ }
1761
+
1762
+ type SearchNotification implements SearchResult {
1763
+ highlights: JSONObject
1764
+ item: Notification!
1765
+ score: Float
1766
+ }
1767
+
1768
+ type SearchNotificationPagination implements Pagination & SearchPagination {
1769
+ limit: Int!
1770
+ offset: Int!
1771
+ results: [SearchNotification!]!
1772
+ stats: SearchStats
1773
+ total: Int!
1774
+ }
1775
+
1776
+ type SearchOrganization implements SearchResult {
1777
+ highlights: JSONObject
1778
+ item: Organization!
1779
+ score: Float
1780
+ }
1781
+
1782
+ type SearchOrganizationInvite implements SearchResult {
1783
+ highlights: JSONObject
1784
+ item: OrganizationInvite!
1785
+ score: Float
1786
+ }
1787
+
1788
+ type SearchOrganizationInvitePagination implements Pagination & SearchPagination {
1789
+ limit: Int!
1790
+ offset: Int!
1791
+ results: [SearchOrganizationInvite!]!
1792
+ stats: SearchStats
1793
+ total: Int!
1794
+ }
1795
+
1796
+ type SearchOrganizationPagination implements Pagination & SearchPagination {
1797
+ limit: Int!
1798
+ offset: Int!
1799
+ results: [SearchOrganization!]!
1800
+ stats: SearchStats
1801
+ total: Int!
1802
+ }
1803
+
1804
+ type SearchOwner {
1805
+ id: String!
1806
+ type: OwnerInputTypesEnum!
1807
+ }
1808
+
1809
+ interface SearchPagination implements Pagination {
1810
+ """The limit used for this query."""
1811
+ limit: Int!
1812
+
1813
+ """The record offset for this query."""
1814
+ offset: Int!
1815
+
1816
+ """The maximum score if this is a search result. Null otherwise"""
1817
+ stats: SearchStats
1818
+
1819
+ """
1820
+ The total objects in the system. OpenSearch can return this easily so it's useful for building pagination UI.
1821
+ """
1822
+ total: Int!
1823
+ }
1824
+
1825
+ """SearchParams is used for search queries for everything except projects"""
1826
+ input SearchParamsInput {
1827
+ """
1828
+ Filter to items between two dates {from, to}
1829
+ You can specify one of 'from' OR 'to' to find items before 'to' date or after 'from' date
1830
+ or you can specify both 'from' AND 'to' to specify items BETWEEN two dates
1831
+ """
1832
+ createdOn: SearchDateInput
1833
+
1834
+ """Only items that I can edit as a user """
1835
+ editableOnly: Boolean
1836
+ keywords: String
1837
+ meta: [MetaDataInput!]
1838
+ name: String
1839
+
1840
+ """Filter to items owned by a user or organization"""
1841
+ ownedBy: OwnerInput
1842
+ tags: [String!]
1843
+
1844
+ """
1845
+ Filter to items between two dates {from, to}
1846
+ You can specify one of 'from' OR 'to' to find items before 'to' date or after 'from' date
1847
+ or you can specify both 'from' AND 'to' to specify items BETWEEN two dates
1848
+ """
1849
+ updatedOn: SearchDateInput
1850
+ }
1851
+
1852
+ type SearchProject implements SearchResult {
1853
+ highlights: JSONObject
1854
+ item: Project!
1855
+ score: Float
1856
+ }
1857
+
1858
+ type SearchProjectPagination implements Pagination & SearchPagination {
1859
+ limit: Int!
1860
+ offset: Int!
1861
+ results: [SearchProject!]!
1862
+ stats: SearchStats
1863
+ total: Int!
1864
+ }
1865
+
1866
+ type SearchProjectType implements SearchResult {
1867
+ highlights: JSONObject
1868
+ item: ProjectType!
1869
+ score: Float
1870
+ }
1871
+
1872
+ type SearchProjectTypePagination implements Pagination & SearchPagination {
1873
+ limit: Int!
1874
+ offset: Int!
1875
+ results: [SearchProjectType!]!
1876
+ stats: SearchStats
1877
+ total: Int!
1878
+ }
1879
+
1880
+ type SearchQAQCEvent implements SearchResult {
1881
+ highlights: JSONObject
1882
+ item: QAQCEvent!
1883
+ score: Float
1884
+ }
1885
+
1886
+ type SearchQAQCEventPagination implements Pagination & SearchPagination {
1887
+ limit: Int!
1888
+ offset: Int!
1889
+ results: [SearchQAQCEvent!]!
1890
+ stats: SearchStats
1891
+ total: Int!
1892
+ }
1893
+
1894
+ interface SearchResult {
1895
+ """
1896
+ Takes the form:
1897
+ "highlights" : {
1898
+ "name" : [
1899
+ "Riverscapes <span>Context</span> for HUC 16040102"
1900
+ ],
1901
+ "fieldName" : [
1902
+ "match1 <span>with</span> highlight",
1903
+ "match2 <span>with</span> highlight"
1904
+ ]
1905
+ }
1906
+ """
1907
+ highlights: JSONObject
1908
+ score: Float
1909
+ }
1910
+
1911
+ """Search Meta that appears on individual items"""
1912
+ interface SearchResultMeta {
1913
+ highlights: JSONObject
1914
+ score: Float!
1915
+ }
1916
+
1917
+ type SearchSavedSearch implements SearchResult {
1918
+ highlights: JSONObject
1919
+ item: SavedSearch!
1920
+ score: Float
1921
+ }
1922
+
1923
+ type SearchSavedSearchPagination implements Pagination & SearchPagination {
1924
+ limit: Int!
1925
+ offset: Int!
1926
+ results: [SearchSavedSearch!]!
1927
+ stats: SearchStats
1928
+ total: Int!
1929
+ }
1930
+
1931
+ """
1932
+ These are the ways you can sort search results
1933
+
1934
+ Ranked sorting of return results. If NULL then the score will be the only factor
1935
+ If specified then score is implicitly the last sort criteria
1936
+ """
1937
+ enum SearchSortEnum {
1938
+ AREA_DESC
1939
+ DATE_CREATED_ASC
1940
+ DATE_CREATED_DESC
1941
+ DATE_UPDATED_ASC
1942
+ DATE_UPDATED_DESC
1943
+ MINE
1944
+ NAME_ASC
1945
+ NAME_DESC
1946
+ }
1947
+
1948
+ union SearchStats = ProjectSearchMeta | SearchMeta
1949
+
1950
+ type SearchSuggestionResult implements SearchResult {
1951
+ highlights: JSONObject
1952
+ item: DBObj
1953
+ score: Float
1954
+ }
1955
+
1956
+ type SearchSuggestionResults {
1957
+ metaKey: [SearchSuggestions!]!
1958
+ metaValues: [SearchSuggestions!]!
1959
+ results: [SearchSuggestionResult!]!
1960
+ tags: [SearchSuggestions!]!
1961
+ }
1962
+
1963
+ type SearchSuggestions {
1964
+ freq: Int
1965
+ score: Float!
1966
+ text: String!
1967
+ }
1968
+
1969
+ type SearchUser implements SearchResult {
1970
+ highlights: JSONObject
1971
+ item: User!
1972
+ score: Float
1973
+ }
1974
+
1975
+ type SearchUserPagination implements Pagination & SearchPagination {
1976
+ limit: Int!
1977
+ offset: Int!
1978
+ results: [SearchUser!]!
1979
+ stats: SearchStats
1980
+ total: Int!
1981
+ }
1982
+
1983
+ enum SearchableTypesEnum {
1984
+ COLLECTION
1985
+ ORGANIZATION
1986
+ PROJECT
1987
+ SAVED_SEARCH
1988
+ USER
1989
+ }
1990
+
1991
+ enum SeverityEnum {
1992
+ CRITICAL
1993
+ DEBUG
1994
+ ERROR
1995
+ INFO
1996
+ WARNING
1997
+ }
1998
+
1999
+ """Links to various social networks"""
2000
+ type SocialLinks {
2001
+ facebook: URL
2002
+ instagram: URL
2003
+ linkedIn: URL
2004
+ tiktok: URL
2005
+ twitter: URL
2006
+ website: URL
2007
+ }
2008
+
2009
+ input SocialLinksInput {
2010
+ facebook: String
2011
+ instagram: String
2012
+ linkedIn: String
2013
+ tiktok: String
2014
+ twitter: String
2015
+ website: URL
2016
+ }
2017
+
2018
+ enum StarrableTypesEnum {
2019
+ COLLECTION
2020
+ ORGANIZATION
2021
+ PROJECT
2022
+ SAVED_SEARCH
2023
+ USER
2024
+ }
2025
+
2026
+ type Symbology {
2027
+ error: String
2028
+ legend: [[String!]!]
2029
+ mapboxJson: JSONObject
2030
+ name: String!
2031
+ rampType: RampTypeEnum
2032
+ state: SymbologyStateEnum!
2033
+ url: String
2034
+ }
2035
+
2036
+ """SymbologyStateEnum"""
2037
+ enum SymbologyStateEnum {
2038
+ ERROR
2039
+ FETCHING
2040
+ FOUND
2041
+ MISSING
2042
+ NOT_APPLICABLE
2043
+ UNKNOWN
2044
+ }
2045
+
2046
+ type TileIndexOriginFile implements FileDownloadMetaInterface {
2047
+ contentType: String
2048
+ etag: String
2049
+ localPath: String
2050
+ size: Int
2051
+ }
2052
+
2053
+ type TileService {
2054
+ bounds: [Float]
2055
+ duration: Float
2056
+ errorMsg: String
2057
+ format: String
2058
+ indexUrl: String
2059
+ lastState: DateTime
2060
+ maxZoom: Int
2061
+ minZoom: Int
2062
+ numFiles: Int
2063
+ originFile: TileIndexOriginFile
2064
+ rasterStats: JSONObject
2065
+ rsXPath: String!
2066
+ started: DateTime
2067
+ state: TilingStateEnum!
2068
+ symbologies: [String!]
2069
+ tileType: TileTypesEnum
2070
+ url: String
2071
+ }
2072
+
2073
+ enum TileTypesEnum {
2074
+ HTML
2075
+ RASTER
2076
+ VECTOR_GPKG
2077
+ VECTOR_SHP
2078
+ }
2079
+
2080
+ enum TilingStateEnum {
2081
+ CREATING
2082
+ FETCHING
2083
+ FETCH_ERROR
2084
+ INDEX_NOT_FOUND
2085
+ LAYER_NOT_FOUND
2086
+ NOT_APPLICABLE
2087
+ NO_GEOMETRIES
2088
+ QUEUED
2089
+ SUCCESS
2090
+ TILING_ERROR
2091
+ TIMEOUT
2092
+ UNKNOWN
2093
+ }
2094
+
2095
+ type Transfer implements DBSimpleObj {
2096
+ createdBy: User!
2097
+ createdOn: DateTime!
2098
+ id: ID!
2099
+ includeProjects: Boolean
2100
+
2101
+ """Allows the request to have an attached note"""
2102
+ note: String!
2103
+ state: TransferStateEnum!
2104
+
2105
+ """Sorting and pagination are not available for these items"""
2106
+ transferObjects: [TransferObject!]!
2107
+ transferTo: Owner!
2108
+ transferType: TransferrableTypesEnum!
2109
+ updatedBy: User!
2110
+ updatedOn: DateTime!
2111
+ }
2112
+
2113
+ input TransferEntityItemsInput {
2114
+ """Attach a note to the transfer"""
2115
+ note: String!
2116
+
2117
+ """Organization or user to transfer this to"""
2118
+ transferTo: OwnerInput!
2119
+ }
2120
+
2121
+ input TransferInput {
2122
+ """
2123
+ (Optional) When transferring a collection you can choose to transfer any projects in that collection (that you own) as well
2124
+ """
2125
+ includeProjects: Boolean
2126
+
2127
+ """Attach a note to the transfer"""
2128
+ note: String!
2129
+
2130
+ """DBIds of the items to transfer"""
2131
+ objectIds: [ID!]!
2132
+
2133
+ """Organization or user to transfer this to"""
2134
+ transferTo: OwnerInput!
2135
+
2136
+ """
2137
+ What type of transfer is this:
2138
+ - project(s): one or more projects
2139
+ - collection: Transfer the colletion with an option for any owned projects
2140
+ - organization: this is different from simply making someone else the owner
2141
+ this means move all projects / collections to another user or org.
2142
+ - user: Transfer all my projects/collections to another org/user
2143
+ """
2144
+ transferType: TransferrableTypesEnum!
2145
+ }
2146
+
2147
+ union TransferObject = Collection | Organization | Project | User
2148
+
2149
+ enum TransferStateEnum {
2150
+ ACCEPTED
2151
+ EXPIRED
2152
+ IN_PROGRESS
2153
+ PROPOSED
2154
+ REJECTED
2155
+ }
2156
+
2157
+ enum TransferrableTypesEnum {
2158
+ COLLECTION
2159
+ ORGANIZATION
2160
+ PROJECT
2161
+ USER
2162
+ }
2163
+
2164
+ scalar URL
2165
+
2166
+ type UploadProjectFileUrls {
2167
+ relPath: String!
2168
+ urls: [String]
2169
+ }
2170
+
2171
+ type UploadProjectRequest {
2172
+ create: [String!]!
2173
+ delete: [String!]!
2174
+ newId: String
2175
+ token: String!
2176
+ update: [String!]!
2177
+ }
2178
+
2179
+ type UploadUrl {
2180
+ fields: JSONObject!
2181
+ token: String!
2182
+ url: String!
2183
+ }
2184
+
2185
+ """A User object is any user in the system"""
2186
+ type User implements DBObj & UserInterface {
2187
+ """User affiliations (usually external to the warehouse)"""
2188
+ affiliations: [UserAffiliation]!
2189
+ avatar: URL
2190
+
2191
+ """
2192
+ Collections this user owns. Filtered if the querying user is someone else
2193
+ """
2194
+ collections(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedCollections!
2195
+ createdBy: User!
2196
+ createdOn: DateTime!
2197
+ description: String!
2198
+ id: ID!
2199
+ jobTitle: String!
2200
+ lastLogin: DateTime!
2201
+ location: String!
2202
+ meta: [MetaData!]!
2203
+ name: String!
2204
+
2205
+ """Organizations this user is a member of."""
2206
+ organizations(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedOrganizations!
2207
+
2208
+ """Projects this user owns. Filtered if the querying user is someone else"""
2209
+ projects(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedProjects!
2210
+
2211
+ """
2212
+ Saved Searches this user owns. Filtered if the querying user is someone else
2213
+ """
2214
+ savedSearches(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedSavedSearches!
2215
+ social: SocialLinks!
2216
+ starred: Boolean!
2217
+ starredCount: Int!
2218
+ summary: String!
2219
+ updatedBy: User!
2220
+ updatedOn: DateTime!
2221
+ }
2222
+
2223
+ """
2224
+ Affiliation can be anything as long as it fits as a list of
2225
+ strings with URLs
2226
+ """
2227
+ type UserAffiliation {
2228
+ """Who am I to this affiliation (Optional)"""
2229
+ affiliationRole: String
2230
+
2231
+ """
2232
+ Name of the affiliated entity or organization. Can be external to the warehouse
2233
+ """
2234
+ name: String!
2235
+
2236
+ """(Optional) this affiliation may have a link"""
2237
+ url: URL
2238
+ }
2239
+
2240
+ input UserAffiliationInput {
2241
+ """Who am I to this affiliation (Optional)"""
2242
+ affiliationRole: String
2243
+
2244
+ """
2245
+ Name of the affiliated entity or organization. Can be external to the warehouse
2246
+ """
2247
+ name: String!
2248
+
2249
+ """(Optional) this affiliation may have a link"""
2250
+ url: URL
2251
+ }
2252
+
2253
+ interface UserInterface {
2254
+ """Any organizational affiliation(s) the user specifies"""
2255
+ affiliations: [UserAffiliation]!
2256
+
2257
+ """URL To Avatar image"""
2258
+ avatar: URL
2259
+
2260
+ """
2261
+ Collections this user owns. Filtered if the querying user is someone else
2262
+ """
2263
+ collections(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedCollections!
2264
+ createdBy: User!
2265
+ createdOn: DateTime!
2266
+ description: String!
2267
+ id: ID!
2268
+
2269
+ """Simple job title string field"""
2270
+ jobTitle: String!
2271
+
2272
+ """When did we last see the user?"""
2273
+ lastLogin: DateTime!
2274
+
2275
+ """
2276
+ Simple location string (Optional) eg: "Vancouver, Canada"
2277
+ """
2278
+ location: String!
2279
+ meta: [MetaData!]!
2280
+ name: String!
2281
+
2282
+ """Projects this user owns. Filtered if the querying user is someone else"""
2283
+ projects(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedProjects!
2284
+
2285
+ """
2286
+ Saved Searches this user owns. Filtered if the querying user is someone else
2287
+ """
2288
+ savedSearches(limit: Int!, offset: Int!, sort: [SearchSortEnum!]): PaginatedSavedSearches!
2289
+
2290
+ """Object containing URLS to social media sites"""
2291
+ social: SocialLinks!
2292
+ starred: Boolean!
2293
+ starredCount: Int!
2294
+ summary: String!
2295
+ updatedBy: User!
2296
+ updatedOn: DateTime!
2297
+ }
2298
+
2299
+ type WarehouseInfo {
2300
+ api: String
2301
+ businessLogic: String
2302
+ projectFile: String
2303
+ warehouse: String
2304
+ xml: String
2305
+ xsd: String
2306
+ }
2307
+
2308
+ type WatcherOutput {
2309
+ errors: [String]
2310
+ message: String
2311
+ results: [String]
2312
+ }
2313
+
2314
+ type ZipFileDownloadMeta implements FileDownloadMetaInterface {
2315
+ contentType: String
2316
+ downloadUrl: String
2317
+ etag: String
2318
+ localPath: String
2319
+ pendingSince: DateTime
2320
+ progress: Int
2321
+ size: Int
2322
+ }