-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.ts
8897 lines (7849 loc) · 353 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import { DocumentNode } from 'graphql';
import gql from 'graphql-tag';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
/**
* Angle unit
* @typedef {("Degrees"|"Radians")} AngleUnit
*/
/**
* Result of approving a follow request
* @typedef {Object} ApproveProfileFollowPayload
* @property {Profile} fromProfile - The follower profile
* @property {ProfileFollowStatus} [status] - The status of the follow request
* @property {Profile} toProfile - The profile being followed
*/
/**
* Additional data defined on a resource
* @typedef {Object} Attribute
* @property {string} id -
* The attribute identifier
*
* Has the form "{{resource_type}}/{{attribute_name}}"
* eg: The "title" attribute on an item will have the id: "item/title"
*
* Custom attributes have the form "custom/{{attribute_name}}"
*
* @property {string} [locale] - Optional string representing the locale of the attribute value
* @property {JSON} [meta] - Optional attribute metadata, can be any JSON-serialisable type
* @property {JSON} [value] - The attribute value, can be any JSON-serialisable type
*/
/**
* Connection of Attributes
* @typedef {Object} AttributeConnection
* @property {Array<AttributeEdge>} edges - All the edges in this page of the connection
* @property {Array<Attribute>} nodes - Shortcut for edges[].node
* @property {PageInfo} pageInfo - Details regarding the current page of the connnection
* @property {number} totalCount - The total number of items in the connection (in all pages)
*/
/**
* Edge containing a Attribute
* @typedef {Object} AttributeEdge
* @property {string} cursor - The cursor string pointing to this item
* @property {Attribute} node - The item
*/
/**
* A selector for an attribute
* @typedef {Object} AttributeIdentifierInput
* @property {string} id - The attribute identifier
* @property {string} [locale] - The locale of the attribute
*/
/**
* Defines an attribute
* @typedef {Object} AttributeInput
* @property {string} id - The attribute identifier
* @property {string} [locale] - Optional string representing the locale of the attribute value
* @property {JSON} [meta] - Optional attribute metadata, can be any JSON-serialisable type
* @property {JSON} value - The attribute value, can be any JSON-serialisable type
*/
/**
* The address field of a BillingDetails object
* @typedef {Object} BillingAddress
* @property {string} addressLineOne
* @property {string} [addressLineTwo]
* @property {string} countryCode
* @property {string} locality
* @property {string} [postalCode]
* @property {string} region
*/
/**
* Fields for update billing address field
* @typedef {Object} BillingAddressInput
* @property {string} addressLineOne
* @property {string} [addressLineTwo]
* @property {string} countryCode
* @property {string} locality
* @property {string} [postalCode]
* @property {string} region
*/
/**
* Billing details associated with a profile
* @typedef {Object} BillingDetails
* @property {BillingAddress} address - The billing address
* @property {string} emailAddress - The email address
* @property {string} familyName - The family name
* @property {string} givenName - The given name
* @property {string} [organization] - The optional organization name
* @property {Profile} profile - Profile that these billing details apply to
*/
/**
* A billing plan
* @typedef {Object} BillingPlan
* @property {string} id - The identifier for this plan
* @property {BillingPrice} [price] - The price of this plan
* @property {number} quantity - The quantity
*/
/**
* A price available for a billing plan
* @typedef {Object} BillingPrice
* @property {number} amount - The amount of this price
* @property {string} currency - The currency used for this price
* @property {string} id - The unique id for this price
* @property {BillingProduct} product - The product corres
* @property {BillingPriceRecurring} recurring - Recurrence details of the price
*/
/**
* Connection of BillingPrices
* @typedef {Object} BillingPriceConnection
* @property {Array<BillingPriceEdge>} edges - All the edges in this page of the connection
* @property {Array<BillingPrice>} nodes - Shortcut for edges[].node
* @property {PageInfo} pageInfo - Details regarding the current page of the connnection
* @property {number} totalCount - The total number of items in the connection (in all pages)
*/
/**
* Edge containing a BillingPrice
* @typedef {Object} BillingPriceEdge
* @property {string} cursor - The cursor string pointing to this item
* @property {BillingPrice} node - The item
*/
/**
* The billing price to use
* @typedef {Object} BillingPriceInput
* @property {string} priceId - The ID of a BillingPrice
* @property {number} [quantity] - The quantity, defaults to 1
*/
/**
* The recurrence details for a BillingPrice
* @typedef {Object} BillingPriceRecurring
* @property {number} count - The number of interval per recurrence
* @property {BillingPriceRecurringInterval} interval - The interval type
*/
/**
* The interval type
* @typedef {("Day"|"Month"|"Week"|"Year")} BillingPriceRecurringInterval
*/
/**
* A product corresponding to a price
* @typedef {Object} BillingProduct
* @property {string} [description] - The description for this product
* @property {string} id - The unique id for this product
* @property {string} name - The name of this product
*/
/**
* A billing subscription
* @typedef {Object} BillingSubscription
* @property {string} created - The date when the subscription was created
* @property {string} id - The unique id for this subscription
* @property {string} modified - The date when the subscription was last modified
* @property {Array<BillingPlan>} plans - The plans attached to this subscription
* @property {Profile} profile - Profile that this billing subscription belongs to
* @property {BillingSubscriptionStatus} status - The current status of this subscription
*/
/**
* Connection of BillingSubscriptions
* @typedef {Object} BillingSubscriptionConnection
* @property {Array<BillingSubscriptionEdge>} edges - All the edges in this page of the connection
* @property {Array<BillingSubscription>} nodes - Shortcut for edges[].node
* @property {PageInfo} pageInfo - Details regarding the current page of the connnection
* @property {number} totalCount - The total number of items in the connection (in all pages)
*/
/**
* Edge containing a BillingSubscription
* @typedef {Object} BillingSubscriptionEdge
* @property {string} cursor - The cursor string pointing to this item
* @property {BillingSubscription} node - The item
*/
/**
* The status of a BillingSubscription
* @typedef {("Active"|"Cancelled"|"Expired"|"Inactive")} BillingSubscriptionStatus
*/
/**
* A bounding box on a map defined by two positions (opposite corners of the box)
* @typedef {Object} Bounds
* @property {number} e - The east-most longitude of the bounding box
* @property {Array<number>} en - The north-east point of the bounding box in the form: [east, north]
* @property {Array<Array<number>>} minMax - The minimum and maximum points of the bounding box in the form: [minimum, maximum]
* @property {number} n - The north-most latitude of the bounding box
* @property {number} s - The south-most latitude of the bounding box
* @property {number} w - The west-most longitude of the bounding box
* @property {Array<number>} ws - The south-west point of the bounding box in the form: [west, south]
* @property {Array<number>} wsen - The south-west and north-east points of the bounding box in the form: [west, south, east, north]
*/
/**
* A bounding circle on a map defined by a center positions and a radius
* @typedef {Object} BoundsCircleInput
* @property {PositionInput} position - The center position of the circle
* @property {number} radius - The radius of the bounding circle
*/
/**
* A bounding box on a map defined by two positions (opposite corners of the box)
* @typedef {Object} BoundsInput
* @property {number} e - The east-most longitude of the bounding box
* @property {number} n - The north-most latitude of the bounding box
* @property {number} s - The south-most latitude of the bounding box
* @property {number} w - The west-most longitude of the bounding box
*/
/**
* The result of Mutation.captureMarketingInformation
* @typedef {Object} CaptureMarketingInformationPayload
* @property {string} [profileId] - The ID of the profile that the information is associated against
*/
/**
* Response to Mutation.changeItineraryDefaultLocale
* @typedef {Object} ChangeItineraryDefaultLocalePayload
* @property {Itinerary} [itinerary] - The changed itinerary
*/
/**
* Response of claiming a handle
* @typedef {Object} ClaimProfileHandlePayload
* @property {Profile} [profile] - The profile that will claim the handle
*/
/**
* A collection type is used to group together a unordered set of items
* @typedef {Object} Collection
* @property {Attribute} [attr] - Arbitrary JSON value stored on this resource, keyed by an id
* @property {JSON} [attrValue] - Shortcut for the attr.value, returns null if the attribute doesn't exist
* @property {AttributeConnection} attrs - Query multiple attributes optionally filtering by id and/or locale
* @property {string} [created] - The date when the collection was created
* @property {string} [description] - A longer text description
* @property {string} discriminator - A label used to differentiate types of collections
* @property {string} id - The Globally Unique ID of the object.
* @property {CollectionItemEmbedded} [item] - Returns an item belonging to this collection by id
* @property {CollectionItemConnection} items - Retrieve multiple collection-items belonging to this collection
* @property {Array<MediaContainer>} media - List of MediaContainers containing images or other media - DEPRECATED: use mediaContainers instead
* @property {MediaContainerConnection} mediaContainers - List of MediaContainers containing images or other media
* @property {string} [modified] - The date when the collection was last modified
* @property {MediaContainer} [preferredMedia] - A single MediaContainer representing the preferred media to use
* @property {Profile} profile - Profile that owns this collection
* @property {string} [readMoreUrl] - Alias for the read-more attribute
* @property {string} [synopsis] - A short text summary
* @property {Array<string>} tags - A series of strings applied to label this item
* @property {string} [title] - A supplied title for this collection
* @property {string} [websiteUrl] - Alias for the website-url attribute
*/
/**
* Connection of Collections
* @typedef {Object} CollectionConnection
* @property {Array<CollectionEdge>} edges - All the edges in this page of the connection
* @property {Array<Collection>} nodes - Shortcut for edges[].node
* @property {PageInfo} pageInfo - Details regarding the current page of the connnection
* @property {number} totalCount - The total number of items in the connection (in all pages)
*/
/**
* All possible collection discriminators
* @typedef {("Collection"|"Locale")} CollectionDiscriminator
*/
/**
* Edge containing a Collection
* @typedef {Object} CollectionEdge
* @property {string} cursor - The cursor string pointing to this item
* @property {Collection} node - The item
*/
/**
* A collection item contains data about a single entity and is assigned within a collection
* @typedef {Object} CollectionItem
* @property {Attribute} [attr] - Arbitrary JSON value stored on this resource, keyed by an id
* @property {JSON} [attrValue] - Shortcut for the attr.value, returns null if the attribute doesn't exist
* @property {AttributeConnection} attrs - Query multiple attributes optionally filtering by id and/or locale
* @property {string} [created] - The date when the collection-item was created
* @property {string} [description] - A longer text description
* @property {string} [externalId] - Identifier from an external source this item is associated with
* @property {string} [externalSource] - The source of the item's externalId
* @property {string} id - The unique identifier, taking the shape of item/XYZ
* @property {Array<MediaContainer>} media - List of MediaContainers containing images or other media - DEPRECATED: use mediaContainers instead
* @property {MediaContainerConnection} mediaContainers - List of MediaContainers containing images or other media
* @property {string} [modified] - The date when the collection-item was last modified
* @property {MediaContainer} [preferredMedia] - The preferred MediaContainer to use
* @property {Profile} profile - The associated profile owner
* @property {string} [readMoreUrl] - Alias for the read-more attribute
* @property {Array<string>} sectionIds - One or more sections this item belongs to
* @property {string} [synopsis] - A short text summary
* @property {Array<string>} tags - A series of strings applied to label this item
* @property {string} [title] - The supplied title
* @property {string} [websiteUrl] - Alias for the website-url attribute
*/
/**
* Connection of CollectionItems
* @typedef {Object} CollectionItemConnection
* @property {Array<CollectionItemEdge>} edges - All the edges in this page of the connection
* @property {Array<CollectionItem>} nodes - Shortcut for edges[].node
* @property {PageInfo} pageInfo - Details regarding the current page of the connnection
* @property {number} totalCount - The total number of items in the connection (in all pages)
*/
/**
* Edge containing a CollectionItem
* @typedef {Object} CollectionItemEdge
* @property {string} cursor - The cursor string pointing to this item
* @property {CollectionItem} node - The item
*/
/**
* A CollectionItem that's embedded in another resource
* @typedef {(CollectionItemFailedToLoad|CollectionLocation)} CollectionItemEmbedded
*/
/**
* Represents an embedded CollectionItem that failed to load
* @typedef {Object} CollectionItemFailedToLoad
* @property {string} id - The Globally Unique ID of the object.
*/
/**
* Determine how to sort CollectionItems when listing
* @typedef {Object} CollectionItemsSort
* @property {SortDirection} [created] - Sort by the created date
* @property {SortDirection} [modified] - Sort by the modified date
* @property {SortDirection} [title] - Sort by the collection-item title
*/
/**
* A CollectionItem used to represents a single location association to a place.
* @typedef {Object} CollectionLocation
* @property {PlaceAddress} address - Address information for the collection location
* @property {Attribute} [attr] - Arbitrary JSON value stored on this resource, keyed by an id
* @property {JSON} [attrValue] - Shortcut for the attr.value, returns null if the attribute doesn't exist
* @property {AttributeConnection} attrs - Query multiple attributes optionally filtering by id and/or locale
* @property {Bounds} [bounds] - The bounding box around the collection-location (derived from place if not overridden)
* @property {PlaceContact} contact - Contact information for the collection location
* @property {string} [created] - The date when the collection-item was created
* @property {string} [description] - A longer text description
* @property {string} [externalId] - Identifier from an external source this item is associated with
* @property {string} [externalSource] - The source of the item's externalId
* @property {string} id - The unique identifier, taking the shape of item/XYZ
* @property {Array<MediaContainer>} media - List of MediaContainers containing images or other media - DEPRECATED: use mediaContainers instead
* @property {MediaContainerConnection} mediaContainers - List of MediaContainers containing images or other media
* @property {string} [modified] - The date when the collection-item was last modified
* @property {Place} place - The associated place information for this location
* @property {Position} position - The position of the collection-location (derived from place if not overridden)
* @property {MediaContainer} [preferredMedia] - The preferred MediaContainer to use
* @property {Profile} profile - The associated profile owner
* @property {string} [readMoreUrl] - Alias for the read-more attribute
* @property {Array<string>} sectionIds - One or more sections this item belongs to
* @property {string} [synopsis] - A short text summary
* @property {Array<string>} tags - A series of strings applied to label this item
* @property {string} [title] - The supplied title
* @property {string} [websiteUrl] - Alias for the website-url attribute
*/
/**
* Determine how to sort Collections when listing
* @typedef {Object} CollectionsSort
* @property {SortDirection} [created] - Sort by the created date
* @property {SortDirection} [modified] - Sort by the modified date
* @property {SortDirection} [title] - Sort by the collection title
*/
/**
* Points on the compass rose
* @typedef {("E"|"N"|"NE"|"NW"|"S"|"SE"|"SW"|"W")} CompassPoint
*/
/**
* Connected apps stored in the profile
* @typedef {Object} ConnectedApp
* @property {ConnectedAppAuthType} [authType] - Depending on the authentication method, this can highlight the authenticated application method (e.g. OAuth)
* @property {string} id - The Globally Unique ID of the object.
* @property {JSON} [privateConfiguration] - Private configuration information as encrypted JSON
* @property {Profile} [profile] - The profile associated with this connected app
* @property {string} [publicId] - A 3rd party ID or Account ID, this does not affect any of the Alpaca ID naming - for instance, if we are connecting to an Identity in OAUTH, this is the OAUTH Identity ID - This is just a place to store data
* @property {string} [scope] - Any specific scope that has been granted to the 3rd party application
* @property {ConnectedAppServiceKey} serviceKey - This is the key relating to the service - it identifies the "App" we are connecting to
* @property {ConnectedAppType} [type] - A key to describe the type of connection to the application
*/
/**
* Possible auth types for a ConnectedApp
* @typedef {("Credentials"|"Oauth"|"Tokens")} ConnectedAppAuthType
*/
/**
* Connection of ConnectedApps
* @typedef {Object} ConnectedAppConnection
* @property {Array<ConnectedAppEdge>} edges - All the edges in this page of the connection
* @property {Array<ConnectedApp>} nodes - Shortcut for edges[].node
* @property {PageInfo} pageInfo - Details regarding the current page of the connnection
* @property {number} totalCount - The total number of items in the connection (in all pages)
*/
/**
* Edge containing a ConnectedApp
* @typedef {Object} ConnectedAppEdge
* @property {string} cursor - The cursor string pointing to this item
* @property {ConnectedApp} node - The item
*/
/**
* The key of the service for a ConnectedApp
* @typedef {("AlpacaLegacy"|"AustralianTourismDataWarehouse"|"CrowdriffApi"|"GoogleAnalytics4"|"ShopifyApi")} ConnectedAppServiceKey
*/
/**
* Possible types of ConnectedApp
* @typedef {("Api"|"Configuration"|"Credentials")} ConnectedAppType
*/
/**
* The output after creating a billing checkout session
* @typedef {Object} CreateBillingCheckoutSessionOutput
* @property {string} url - The url for the checkout session
*/
/**
* The output after creating a billing portal session
* @typedef {Object} CreateBillingPortalSessionOutput
* @property {string} url - The url for the portal session
*/
/**
* Creates a collection
* @typedef {Object} CreateCollectionInput
* @property {Array<AttributeInput>} [attrs] - Additional data defined on the collection
* @property {string} [description] - A longer text description
* @property {CollectionDiscriminator} discriminator - A label used to differentiate types of collections
* @property {Array<CreateMediaContainerInput>} [media] - The list of MediaContainers to add to the new Collection
* @property {string} [readMoreUrl] - Alias for the read-more attribute
* @property {string} [synopsis] - A short text summary
* @property {Array<string>} [tags] - A series of strings applied to label the collection
* @property {string} [title] - Title of the collection
* @property {string} [websiteUrl] - Alias for the website-url attribute
*/
/**
* The input to create a collection location
* @typedef {Object} CreateCollectionLocationInput
* @property {Array<AttributeInput>} [attrs] - Additional data defined on this CollectionLocation
* @property {string} [description] - A longer description content for the new item
* @property {string} [externalId] - Identifier from an external source this new item is associated with
* @property {string} [externalSource] - The source of this item's externalId
* @property {Array<CreateMediaContainerInput>} [media] - The list of MediaContainers to add to the new CollectionLocation
* @property {PlaceInput} place - The associated place record for this location
* @property {PositionInput} [position] - Override for the place's position
* @property {string} [readMoreUrl] - Alias for the read-more attribute
* @property {Array<string>} [sectionIds] - One or more sections for this new item
* @property {string} [synopsis] - A short summary text content for the new item
* @property {Array<string>} [tags] - A collection of strings used to label the new item
* @property {string} [title] - Title for the new item
* @property {string} [websiteUrl] - Alias for the website-url attribute
*/
/**
* The fields available to return after creating a new collection location
* @typedef {Object} CreateCollectionLocationPayload
* @property {CollectionLocation} [location] - The created collection location
*/
/**
* The return fields avaialble after creating a collection
* @typedef {Object} CreateCollectionPayload
* @property {Collection} [collection] - The newly created collection
*/
/**
* Create a new ConnectedApp
* @typedef {Object} CreateConnectedAppInput
* @property {ConnectedAppAuthType} [authType] - The authenticated application method
* @property {JSON} [privateConfiguration] - Encrypted JSON
* @property {string} [publicId] - 3rd party ID or account ID
* @property {string} [scope] - Any specific scope that has been granted to the 3rd party application
* @property {ConnectedAppServiceKey} serviceKey - Identifies the service being connected to
* @property {ConnectedAppType} [type] - The type of the connected-app
*/
/**
* The return fields available after creating a connected app
* @typedef {Object} CreateConnectedAppPayload
* @property {ConnectedApp} [connectedApp] - The newly created connected-app
*/
/**
* Create an IconComposition
* @typedef {Object} CreateIconCompositionInput
* @property {string} [iconFill] - Optional fill color for the icon
* @property {string} name - A name for this IconComposition, should be unique across the itinerary
* @property {string} resourceId - ID to the Icon used by this IconComposition
* @property {string} [shieldFill] - Optional fill color for the shield
* @property {string} [shieldKey] - Indicates which shield to use
* @property {string} [shieldStroke] - Optional stroke color for the shield
*/
/**
* Fields for a new IconSilhouette
* @typedef {Object} CreateIconSilhouetteInput
* @property {Array<AttributeInput>} [attrs] - Additional data defined on the icon
* @property {string} name - The name of the icon, key will be generated from this value and so should be unique across the profile
* @property {Array<string>} paths - SVG path data for this icon, eg: "M 100 .."
* @property {string} [viewBox] - Optional SVG viewBox for this icon
*/
/**
* The response after creating an IconSilhouette
* @typedef {Object} CreateIconSilhouettePayload
* @property {IconSilhouette} [icon] - The newly created IconSilhouette
*/
/**
* Creates an itinerary item collection type
* @typedef {Object} CreateItineraryCollectionInput
* @property {Array<AttributeInput>} [attrs] - Additional data defined on the collection
* @property {string} [description] - The description for the new itinerary-collection
* @property {Array<CreateMediaContainerInput>} [media] - The list of MediaContainers to add to the new ItineraryCollection
* @property {ItineraryItemPositionAfterSibling} [positionAfterSibling] - Create the item positioned after the given sibling
* @property {ItineraryItemPositionAtEnd} [positionAtEnd] - Creates the item positioned after all its siblings
* @property {ItineraryItemPositionAtStart} [positionAtStart] - Creates the item positioned before all its siblings
* @property {ItineraryItemPositionBeforeSibling} [positionBeforeSibling] - Create the item positioned before the given sibling
* @property {ItineraryItemPositionOnLastCollection} [positionOnLastCollection] - Create the item at last position of the last itinerary-collection item
* @property {string} [readMoreUrl] - Alias for the read-more attribute
* @property {string} [synopsis] - The synopsis for the new itinerary-collection
* @property {Array<string>} [tags] - The tags for the new itinerary-collection
* @property {string} [title] - The title for the new itinerary-collection
* @property {string} [websiteUrl] - Alias for the website-url attribute
*/
/**
* The fields available after creating an itinerary collection
* @typedef {Object} CreateItineraryCollectionPayload
* @property {ItineraryItemCascadedChanges} cascaded - Other changes to the itinerary caused by the creation of the itinerary-collection
* @property {ItineraryCollection} [collection] - The created itinerary collection
* @property {Itinerary} itinerary - The modified itinerary
*/
/**
* The input fields to creating new itinerary directions items
* @typedef {Object} CreateItineraryDirectionsInput
* @property {Array<AttributeInput>} [attrs] - Additional data on the new itinerary
* @property {string} [description] - The description for the new itinerary-directions
* @property {number} [distance] - The distance of the new itinerary-directions
* @property {Array<ItineraryDirectionsDurationsInput>} [durations] - The duration details of the new itinerary-directions
* @property {ElevationInput} [elevation] - The elevation details of the new itinerary-directions
* @property {Array<CreateMediaContainerInput>} [media] - The list of MediaContainers to add to the new ItineraryDirections
* @property {string} [originId] - The origin itinerary location item, in the form of item/XYZ
* @property {ItineraryItemPositionAfterSibling} [positionAfterSibling] - Creates the itinerary-directions after the given sibling
* @property {ItineraryItemPositionAtEnd} [positionAtEnd] - Creates the itinerary-directions to be after all its siblings
* @property {ItineraryItemPositionAtStart} [positionAtStart] - Creates the itinerary-directions to be before all its siblings
* @property {ItineraryItemPositionBeforeSibling} [positionBeforeSibling] - Creates the itinerary-directions before the given sibling
* @property {ItineraryItemPositionOnLastCollection} [positionOnLastCollection] - Creates the itinerary-directions at the last position of the last itinerary-collection item
* @property {string} [readMoreUrl] - Alias for the read-more attribute
* @property {RouteInput} route - The route of this item, must include at least one route segment
* @property {string} [synopsis] - The synopsis for the new itinerary-directions
* @property {Array<string>} [tags] - The tags for the new itinerary-directions
* @property {string} [title] - The title for the new itinerary-directions
* @property {string} [websiteUrl] - Alias for the website-url attribute
*/
/**
* The itinerary directions return fields available after creating the itinerary directions
* @typedef {Object} CreateItineraryDirectionsPayload
* @property {ItineraryItemCascadedChanges} cascaded - Other changes to the itinerary caused by the creation of the itinerary-directions
* @property {ItineraryDirections} [directions] - The created itinerary directions item
* @property {Itinerary} itinerary - The modified itinerary
*/
/**
* Creates a itinerary
* @typedef {Object} CreateItineraryInput
* @property {Array<AttributeInput>} [attrs] - Additional data on the new itinerary
* @property {ItineraryAutoRouteInput} [autoRoute] - Enable auto routing, or set to null to disable
* @property {string} [defaultLocale] - The default locale of this itinerary's content
* @property {string} [description] - The description for the new itinerary
* @property {ElevationInput} [elevation] - Elevation data of the new itinerary
* @property {Array<CreateIconCompositionInput>} [icons] - The list of IconCompositions to add to the new Itinerary
* @property {Array<CreateMediaContainerInput>} [media] - The list of MediaContainers to add to the new Itinerary
* @property {string} [readMoreUrl] - Alias for the read-more attribute
* @property {string} [synopsis] - The synopsis for the new itinerary
* @property {Array<string>} [tags] - The tags for the new itinerary
* @property {string} [title] - The title for the new itinerary
* @property {string} [websiteUrl] - Alias for the website-url attribute
*/
/**
* The fields to create an itinerary location
* @typedef {Object} CreateItineraryLocationInput
* @property {Array<AttributeInput>} [attrs] - Additional data defined on the collection
* @property {BoundsInput} [bounds] - The bounds of the itinerary-location
* @property {string} [description] - The description for the new itinerary-location
* @property {string} [icon] - Set the optional icon, passed ID must exist in the Itinerary.icons
* @property {Array<CreateMediaContainerInput>} [media] - The list of MediaContainers to add to the new ItineraryLocation
* @property {boolean} [optional] - Whether this is an optional location on the itinerary
* @property {PlaceInput} place - The place for this new itinerary-location
* @property {PositionInput} [position] - The position of the itinerary-location
* @property {ItineraryItemPositionAfterSibling} [positionAfterSibling] - Create the item positioned after the given sibling
* @property {ItineraryItemPositionAtEnd} [positionAtEnd] - Creates the item positioned after all its siblings
* @property {ItineraryItemPositionAtStart} [positionAtStart] - Creates the item positioned before all its siblings
* @property {ItineraryItemPositionBeforeSibling} [positionBeforeSibling] - Create the item positioned before the given sibling
* @property {ItineraryItemPositionOnLastCollection} [positionOnLastCollection] - Create the item at last position of the last itinerary-collection item
* @property {string} [readMoreUrl] - Alias for the read-more attribute
* @property {string} [synopsis] - The synopsis for the new itinerary-location
* @property {Array<string>} [tags] - The tags for the new itinerary-location
* @property {string} [title] - The title for the new itinerary-location
* @property {string} [websiteUrl] - Alias for the website-url attribute
*/
/**
* The fields available after creating an itinerary location
* @typedef {Object} CreateItineraryLocationPayload
* @property {ItineraryItemCascadedChanges} cascaded - Other changes to the itinerary caused by the creation of the itinerary-location
* @property {Itinerary} itinerary - The modified itinerary
* @property {ItineraryLocation} [location] - The itinerary location that was created
*/
/**
* The fields available after creating an itinerary
* @typedef {Object} CreateItineraryPayload
* @property {Itinerary} [itinerary] - The newly created itinerary
*/
/**
* Create a MediaContainer in a MediaContainer list
* @typedef {Object} CreateMediaContainerInput
* @property {MediaContainerPositionAfter} [positionAfter] - Add the MediaContainer after another container in the list
* @property {MediaContainerPositionAtEnd} [positionAtEnd] - Add the MediaContainer at the end of the list
* @property {MediaContainerPositionAtStart} [positionAtStart] - Add the MediaContainer at the start of the list
* @property {MediaContainerPositionBefore} [positionBefore] - Add the MediaContainer before another container in the list
* @property {string} resourceId - ID to a MediaResource to contain
*/
/**
* Input object to Mutation.createProfile
* @typedef {Object} CreateProfileInput
* @property {Array<AttributeInput>} [attrs] - Additional data defined on the profile
* @property {boolean} [autoApproveFollows] - If follow requests should be automatically approved for this profile
* @property {MediaContainerInput} [avatar] - The avatar image
* @property {string} [bio] - A short biography
* @property {string} name - The name of the profile
* @property {ProfileType} type - The type of profile
* @property {string} [websiteUrl] - The website url
*/
/**
* Response payload to Mutation.createProfile
* @typedef {Object} CreateProfilePayload
* @property {Profile} [profile] - The newly created profile
*/
/**
* Input object to Mutation.createUserAgreement
* @typedef {Object} CreateUserAgreementInput
* @property {string} type - The type of agreement
*/
/**
* The return fields available after creating a user agreement
* @typedef {Object} CreateUserAgreementPayload
* @property {UserAgreement} [userAgreement] - The newly created user agreement
*/
/**
* An offset in date and/or time represented as integer differences for each datetime field
* @typedef {Object} DatetimeOffset
* @property {number} [days] - Positive or negative difference for days
* @property {number} [hours] - Positive or negative difference for hours
* @property {number} [minutes] - Positive or negative difference for minutes
* @property {number} [months] - Positive or negative difference for months
* @property {number} [seconds] - Positive or negative difference for seconds
* @property {number} [weeks] - Positive or negative difference for weeks
* @property {number} [years] - Positive or negative difference for years
*/
/**
* The fields available after deleting a collection
* @typedef {Object} DeleteCollectionItemPayload
* @property {string} [id] - The ID of the collection, in the form of collection/XYZ
*/
/**
* The available payload after performing a delete collection
* @typedef {Object} DeleteCollectionPayload
* @property {string} [id] - The ID of the deleted collection
*/
/**
* The available payload after performing a delete connected app
* @typedef {Object} DeleteConnectedAppPayload
* @property {string} [id] - The ID of the deleted connected app
*/
/**
* The response after deleting an icon
* @typedef {Object} DeleteIconResourcePayload
* @property {string} [id] - The ID of the deleted icon
*/
/**
* Deletes a itinerary item
* @typedef {Object} DeleteItineraryItemPayload
* @property {ItineraryItemCascadedChanges} cascaded - Other changes to the itinerary that caused by deleting the itinerary-item
* @property {string} [id] - The itinerary item identifier, in the form of item/XYZ
* @property {Itinerary} itinerary - The modified itinerary
*/
/**
* The result of deleting an itinerary
* @typedef {Object} DeleteItineraryPayload
* @property {string} [id] - The ID of the deleted itinerary
*/
/**
* The result of deleting a profile
* @typedef {Object} DeleteProfilePayload
* @property {string} [id] - The ID of the profile itinerary
*/
/**
* Result of denying a follow request
* @typedef {Object} DenyProfileFollowPayload
* @property {Profile} fromProfile - The follower profile
* @property {ProfileFollowStatus} [status] - The status of the follow request
* @property {Profile} toProfile - The profile being followed
*/
/**
* Distance unit
* @typedef {("Feet"|"Kilometers"|"Meters"|"Miles")} DistanceUnit
*/
/**
* Response to Mutation.duplicateItinerary
* @typedef {Object} DuplicateItineraryPayload
* @property {Itinerary} [itinerary] - The newly duplicated itinerary
*/
/**
* Duration unit
* @typedef {("Hours"|"Minutes"|"Seconds")} DurationUnit
*/
/**
* Elevation data
* @typedef {Object} Elevation
* @property {number} [gain] - The cumulative elevation gain
* @property {number} [loss] - The cumulative elevation loss
* @property {number} [max] - The maximum elevation
* @property {number} [min] - The minimum elevation
*/
/**
* Input elevation data
* @typedef {Object} ElevationInput
* @property {number} [gain] - The cumulative elevation gain
* @property {number} [loss] - The cumulative elevation loss
* @property {number} [max] - The maximum elevation
* @property {number} [min] - The minimum elevation
*/
/**
* Uploads a media resource
* @typedef {Object} FinalizeMediaUploadInput
* @property {string} [attribution] - Text attribution for the source of the new media-resource
* @property {Array<AttributeInput>} [attrs] - Additional data to define on the new media-resource
* @property {string} [caption] - Text caption for the new media-resource
* @property {string} [copyright] - Copyright details of the new media-resource
* @property {Array<string>} [tags] - List of labels to apply to the new media-resource
*/
/**
* Result of finalizing a media upload
* @typedef {Object} FinalizeMediaUploadPayload
* @property {MediaResource} [resource] - The newly created media-resource
* @property {MediaUploadStatus} status - The status of this media upload
*/
/**
* Result of creating a follow request
* @typedef {Object} FollowProfilePayload
* @property {Profile} fromProfile - The follower profile
* @property {ProfileFollowStatus} [status] - The status of the follow request
* @property {Profile} toProfile - The profile being followed
*/
/**
* Different GeoJSON simplification algorithms
* @typedef {Object} GeoJsonSimplification
* @property {GeoJsonSimplificationRamerDouglasPeucker} ramerDouglasPeucker - The Ramer-Douglas-Peucker algorithm
*/
/**
* The Ramer-Douglas-Peucker algorithm
* @typedef {Object} GeoJsonSimplificationRamerDouglasPeucker
* @property {boolean} [highQuality] - Modify the algorithm to be slower by produce higher quality results
* @property {number} [tolerance] - The amount of application applied, higher values result in more simplification
*/
/**
* An icon with styles for use in an Itinerary
* @typedef {Object} IconComposition
* @property {string} created - The date when the IconComposition was created
* @property {string} [iconFill] - Optional fill color for the icon
* @property {string} id - The Globally Unique ID of the object.
* @property {string} key - A key for this IconComposition. Derived from the name
* @property {string} modified - The date when the IconComposition was last modified
* @property {string} name - A name for this IconComposition, should be unique across the itinerary
* @property {IconResourceEmbedded} resource - The Icon used by this IconComposition
* @property {string} [shieldFill] - Optional fill color for the shield
* @property {string} [shieldKey] - Indicates which shield to use
* @property {string} [shieldStroke] - Optional stroke color for the shield
*/
/**
* Connection of IconCompositions
* @typedef {Object} IconCompositionConnection
* @property {Array<IconCompositionEdge>} edges - All the edges in this page of the connection
* @property {Array<IconComposition>} nodes - Shortcut for edges[].node
* @property {PageInfo} pageInfo - Details regarding the current page of the connnection
* @property {number} totalCount - The total number of items in the connection (in all pages)
*/
/**
* Edge containing a IconComposition
* @typedef {Object} IconCompositionEdge
* @property {string} cursor - The cursor string pointing to this item
* @property {IconComposition} node - The item
*/
/**
* An icon for use in the UI or Map
* @typedef {Object} IconResource
* @property {Attribute} [attr] - Arbitrary JSON value stored on this resource, keyed by an id
* @property {JSON} [attrValue] - Shortcut for the attr.value, returns null if the attribute doesn't exist
* @property {AttributeConnection} attrs - Query multiple attributes optionally filtering by id and/or locale
* @property {string} [created] - The date when the icon was created
* @property {string} id - The Globally Unique ID of the object.
* @property {string} key - The key of the icon, unique across the profile
* @property {string} [modified] - The date when the icon was last modified
* @property {string} name - The supplied name for this icon
* @property {Profile} profile - The profile associated with this icon
*/
/**
* Connection of IconResources
* @typedef {Object} IconResourceConnection
* @property {Array<IconResourceEdge>} edges - All the edges in this page of the connection
* @property {Array<IconResource>} nodes - Shortcut for edges[].node
* @property {PageInfo} pageInfo - Details regarding the current page of the connnection
* @property {number} totalCount - The total number of items in the connection (in all pages)
*/
/**
* Edge containing a IconResource
* @typedef {Object} IconResourceEdge
* @property {string} cursor - The cursor string pointing to this item
* @property {IconResource} node - The item
*/
/**
* A IconResource embedded in another resource
* @typedef {(IconResourceFailedToLoad|IconSilhouette)} IconResourceEmbedded
*/
/**
* Represents an embedded IconResource that failed to load
* @typedef {Object} IconResourceFailedToLoad
* @property {string} id - The Globally Unique ID of the object.
*/
/**
* SVG path based IconResource
* @typedef {Object} IconSilhouette
* @property {Attribute} [attr] - Arbitrary JSON value stored on this resource, keyed by an id
* @property {JSON} [attrValue] - Shortcut for the attr.value, returns null if the attribute doesn't exist
* @property {AttributeConnection} attrs - Query multiple attributes optionally filtering by id and/or locale
* @property {string} [created] - The date when the icon was created
* @property {string} id - The Globally Unique ID of the object.
* @property {string} key - The key of the icon, unique across the profile
* @property {string} [modified] - The date when the icon was last modified
* @property {string} name - The supplied name for this icon
* @property {Array<string>} paths - SVG path data for this icon, eg: "M 100 .."
* @property {Profile} profile - The profile associated with this icon
* @property {string} [viewBox] - Optional SVG viewBox for this icon
*/
/**
* Isochrone for the given position with duration and vehicle
* @typedef {Object} Isochrone
* @property {Bounds} bounds - A bounding box around the isochrone
* @property {Array<string>} copyrights - Copyright details of the isochrone
* @property {number} [duration] - The duration of the isochrone
* @property {IsochroneMode} mode - The mode of transport of the isochrone
* @property {JSON} polygon - The isochrone as a geojson polygon
*/
/**
* Mode of transport for an isochrone
* @typedef {("Bike"|"Car"|"Foot")} IsochroneMode
*/
/**
* Determine how to sort Itineraries when listing
* @typedef {Object} ItinerariesSort
* @property {SortDirection} [created] - Sort by the created date
* @property {SortDirection} [modified] - Sort by the modified date
* @property {SortDirection} [title] - Sort by the itinerary title
*/
/**
* An itinerary type is used to structure a series of items representing a travel itinerary
* @typedef {Object} Itinerary
* @property {Attribute} [attr] - Arbitrary JSON value stored on this resource, keyed by an id
* @property {JSON} [attrValue] - Shortcut for the attr.value, returns null if the attribute doesn't exist
* @property {AttributeConnection} attrs - Query multiple attributes optionally filtering by id and/or locale
* @property {ItineraryAutoRoute} [autoRoute] - If true, itinerary-directions will be created to automatically route between itinerary-locations
* @property {Bounds} [bounds] - Bounds for the itinerary item
* @property {ItineraryItemConnection} children - The immediate associated children itinerary items
* @property {string} [created] - The date when the itinerary was created
* @property {string} [defaultLocale] - The default locale of this itinerary's content
* @property {ItineraryItemConnection} descendants - The descending items within this itinerary item
* @property {string} [description] - A longer text description
* @property {Elevation} elevation - Elevation data of the itinerary
* @property {IconCompositionConnection} icons - Icons that are used in this itinerary
* @property {string} id - The Globally Unique ID of the object.
* @property {ItineraryItem} [item] - Returns a single item from this itinerary by id
* @property {string} [lastDraft] - The date when the draft version was last modified
* @property {string} [lastPublished] - The date when the itinerary was last published
* @property {Array<MediaContainer>} media - List of MediaContainers containing images or other media - DEPRECATED: use mediaContainers instead
* @property {MediaContainerConnection} mediaContainers - List of MediaContainers containing images or other media
* @property {string} [modified] - The date when the itinerary was last modified
* @property {MediaContainer} [preferredMedia] - The preferred MediaContainer to use
* @property {Profile} [profile] - Profile that owns this itinerary
* @property {string} [published] - The date when this itinerary was last published. Will be null on draft versions
* @property {string} [readMoreUrl] - Alias for the read-more attribute
* @property {string} [synopsis] - A short text summary
* @property {Array<string>} tags - A series of strings applied to label this item
* @property {string} [title] - The supplied title
* @property {string} [websiteUrl] - Alias for the website-url attribute
*/
/**
* Automatically generate ItineraryDirections that connect sibling ItineraryLocations
* @typedef {Object} ItineraryAutoRoute
* @property {RouteMode} defaultMode - The default mode of transport to use for the generated ItineraryDirections
*/
/**
* Automatically generate ItineraryDirections that connect sibling ItineraryLocations
* @typedef {Object} ItineraryAutoRouteInput
* @property {RouteMode} [defaultMode] - The default mode of transport to use for the generated ItineraryDirections, if excluded defaults to Car
*/
/**
* An itinerary item representing a collection of other itinerary items
* @typedef {Object} ItineraryCollection
* @property {ItineraryItem} [after] - The sibling item that comes after this item
* @property {ItineraryItemConnection} ancestors - All ancestors of the itinerary-item
* @property {Attribute} [attr] - Arbitrary JSON value stored on this resource, keyed by an id
* @property {JSON} [attrValue] - Shortcut for the attr.value, returns null if the attribute doesn't exist
* @property {AttributeConnection} attrs - Query multiple attributes optionally filtering by id and/or locale
* @property {ItineraryItem} [before] - The sibling item that comes before this item
* @property {Bounds} [bounds] - Bounds for the itinerary item
* @property {ItineraryItemConnection} children - All the direct children of the itinerary-item
* @property {ItineraryItemConnection} descendants - All the descendants of the itinerary-item in depth-first-search order
* @property {string} [description] - A longer text description
* @property {string} id - Unique identifier for the itinerary-item
* @property {Itinerary} itinerary - The itinerary this item belongs to
* @property {Array<MediaContainer>} media - List of MediaContainers containing images or other media - DEPRECATED: use mediaContainers instead
* @property {MediaContainerConnection} mediaContainers - List of MediaContainers containing images or other media
* @property {ItineraryItem} [parent] - The parent item of this item
* @property {MediaContainer} [preferredMedia] - The preferred MediaContainer to use
* @property {string} [readMoreUrl] - Alias for the read-more attribute
* @property {number} [siblingPositionNumber] - A number corresponding to the item's position compared to it's siblings.
* @property {string} [synopsis] - A short text summary
* @property {Array<string>} tags - A series of strings applied to label this item
* @property {string} [title] - The supplied title
* @property {string} [websiteUrl] - Alias for the website-url attribute
*/
/**