@mapcreator/api 2.8.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/dist/ImageHandler.d.ts +56 -0
  2. package/dist/Mapcreator.d.ts +338 -0
  3. package/dist/PaginatedResourceListing.d.ts +156 -0
  4. package/dist/RequestParameters.d.ts +241 -0
  5. package/dist/ResourceLister.d.ts +155 -0
  6. package/dist/bundle.browser.js +1264 -1253
  7. package/dist/bundle.browser.min.js +1 -1
  8. package/dist/bundle.browser.min.js.LICENSE.txt +2 -2
  9. package/dist/bundle.js +1263 -1252
  10. package/dist/bundle.min.js +1 -1
  11. package/dist/bundle.min.js.LICENSE.txt +1 -1
  12. package/dist/enums/DeletedState.d.ts +16 -0
  13. package/dist/enums/Enum.d.ts +40 -0
  14. package/dist/enums/JobShareVisibility.d.ts +15 -0
  15. package/dist/enums/ResultStatus.d.ts +17 -0
  16. package/dist/enums/index.d.ts +5 -0
  17. package/dist/errors/AbstractError.d.ts +26 -0
  18. package/dist/errors/ApiError.d.ts +65 -0
  19. package/dist/errors/GeoError.d.ts +6 -0
  20. package/dist/errors/NodeError.d.ts +6 -0
  21. package/dist/errors/OAuthError.d.ts +17 -0
  22. package/dist/errors/StaticClassError.d.ts +7 -0
  23. package/dist/errors/ValidationError.d.ts +125 -0
  24. package/dist/errors/index.d.ts +8 -0
  25. package/dist/index.d.ts +27 -0
  26. package/dist/oauth/DummyFlow.d.ts +19 -0
  27. package/dist/oauth/ImplicitFlow.d.ts +68 -0
  28. package/dist/oauth/ImplicitFlowPopup.d.ts +25 -0
  29. package/dist/oauth/OAuth.d.ts +50 -0
  30. package/dist/oauth/OAuthToken.d.ts +67 -0
  31. package/dist/oauth/PasswordFlow.d.ts +56 -0
  32. package/dist/oauth/StateContainer.d.ts +36 -0
  33. package/dist/proxy/GeoResourceProxy.d.ts +69 -0
  34. package/dist/proxy/OrganisationProxy.d.ts +62 -0
  35. package/dist/proxy/OwnedResourceProxy.d.ts +60 -0
  36. package/dist/proxy/ResourceProxy.d.ts +32 -0
  37. package/dist/proxy/SimpleResourceProxy.d.ts +76 -0
  38. package/dist/proxy/index.d.ts +6 -0
  39. package/dist/resources/Choropleth.d.ts +20 -0
  40. package/dist/resources/Color.d.ts +9 -0
  41. package/dist/resources/Contract.d.ts +7 -0
  42. package/dist/resources/Dimension.d.ts +7 -0
  43. package/dist/resources/DimensionSet.d.ts +11 -0
  44. package/dist/resources/Domain.d.ts +7 -0
  45. package/dist/resources/Faq.d.ts +7 -0
  46. package/dist/resources/Feature.d.ts +9 -0
  47. package/dist/resources/Font.d.ts +4 -0
  48. package/dist/resources/FontFamily.d.ts +11 -0
  49. package/dist/resources/Highlight.d.ts +4 -0
  50. package/dist/resources/InsetMap.d.ts +10 -0
  51. package/dist/resources/Job.d.ts +56 -0
  52. package/dist/resources/JobResult.d.ts +76 -0
  53. package/dist/resources/JobRevision.d.ts +64 -0
  54. package/dist/resources/JobShare.d.ts +15 -0
  55. package/dist/resources/JobType.d.ts +9 -0
  56. package/dist/resources/Language.d.ts +4 -0
  57. package/dist/resources/Layer.d.ts +10 -0
  58. package/dist/resources/LayerFaq.d.ts +8 -0
  59. package/dist/resources/LayerGroup.d.ts +14 -0
  60. package/dist/resources/Mapstyle.d.ts +8 -0
  61. package/dist/resources/MapstyleSet.d.ts +13 -0
  62. package/dist/resources/MapstyleSetColor.d.ts +8 -0
  63. package/dist/resources/Message.d.ts +7 -0
  64. package/dist/resources/MessageVariant.d.ts +4 -0
  65. package/dist/resources/Notification.d.ts +4 -0
  66. package/dist/resources/Organisation.d.ts +97 -0
  67. package/dist/resources/Permission.d.ts +4 -0
  68. package/dist/resources/ProductTour.d.ts +10 -0
  69. package/dist/resources/ProductTourStep.d.ts +7 -0
  70. package/dist/resources/Role.d.ts +14 -0
  71. package/dist/resources/Svg.d.ts +4 -0
  72. package/dist/resources/SvgSet.d.ts +11 -0
  73. package/dist/resources/Tag.d.ts +9 -0
  74. package/dist/resources/TagType.d.ts +13 -0
  75. package/dist/resources/User.d.ts +119 -0
  76. package/dist/resources/VectorChoropleth.d.ts +4 -0
  77. package/dist/resources/VectorHighlight.d.ts +4 -0
  78. package/dist/resources/base/CrudBase.d.ts +65 -0
  79. package/dist/resources/base/CrudBase.d.ts.map +1 -0
  80. package/dist/resources/base/CrudSetBase.d.ts +27 -0
  81. package/dist/resources/base/CrudSetBase.d.ts.map +1 -0
  82. package/dist/resources/base/CrudSetItemBase.d.ts +19 -0
  83. package/dist/resources/base/CrudSetItemBase.d.ts.map +1 -0
  84. package/dist/resources/base/DownloadedResource.d.ts +72 -0
  85. package/dist/resources/base/DownloadedResource.d.ts.map +1 -0
  86. package/dist/resources/base/ResourceBase.d.ts +162 -0
  87. package/dist/resources/base/ResourceBase.d.ts.map +1 -0
  88. package/dist/resources/index.d.ts +45 -0
  89. package/dist/storage/CookiesDriver.d.ts +37 -0
  90. package/dist/storage/DataStoreContract.d.ts +46 -0
  91. package/dist/storage/DummyDriver.d.ts +15 -0
  92. package/dist/storage/FileDriver.d.ts +54 -0
  93. package/dist/storage/LocalStorageDriver.d.ts +13 -0
  94. package/dist/storage/StorageManager.d.ts +46 -0
  95. package/dist/traits/HandlesImages.d.ts +15 -0
  96. package/dist/traits/Injectable.d.ts +60 -0
  97. package/dist/traits/OwnableResource.d.ts +18 -0
  98. package/dist/traits/Trait.d.ts +12 -0
  99. package/dist/utils/Logger.d.ts +55 -0
  100. package/dist/utils/Singleton.d.ts +9 -0
  101. package/dist/utils/StaticClass.d.ts +7 -0
  102. package/dist/utils/Unobservable.d.ts +13 -0
  103. package/dist/utils/base64.d.ts +12 -0
  104. package/dist/utils/geo.d.ts +74 -0
  105. package/dist/utils/hash.d.ts +15 -0
  106. package/dist/utils/helpers.d.ts +47 -0
  107. package/dist/utils/node.d.ts +15 -0
  108. package/dist/utils/reflection.d.ts +43 -0
  109. package/dist/utils/requests.d.ts +24 -0
  110. package/dist/utils/uuid.d.ts +19 -0
  111. package/package.json +4 -1
  112. package/src/Mapcreator.js +53 -33
  113. package/src/enums/index.js +1 -1
  114. package/src/errors/index.js +6 -6
  115. package/src/index.js +14 -14
  116. package/src/proxy/index.js +5 -5
  117. package/src/resources/LayerFaq.js +47 -0
  118. package/src/resources/LayerGroup.js +1 -1
  119. package/src/resources/index.js +36 -35
  120. package/dist/bundle.browser.js.map +0 -1
  121. package/dist/bundle.browser.min.js.map +0 -1
  122. package/dist/bundle.js.map +0 -1
  123. package/dist/bundle.min.js.map +0 -1
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Encodes an object to a http query string with support for recursion
3
+ * @param {object<string, *>} paramsObject - data to be encoded
4
+ * @returns {string} - encoded http query string
5
+ *
6
+ * @private
7
+ */
8
+ export function encodeQueryString(paramsObject: any): string;
9
+ /**
10
+ * Wraps around ky to ensure that the prefix is correctly set
11
+ * @param {function(*=, *=): Response} fn - ky instance
12
+ * @param {string} baseUrl - url to be prefixed
13
+ * @returns {function(*=, *=): Response}
14
+ * @private
15
+ */
16
+ export function wrapKyPrefixUrl(fn: () => Response, baseUrl: string): () => Response;
17
+ /**
18
+ * @private
19
+ */
20
+ export const FormData: {
21
+ new (form?: HTMLFormElement): FormData;
22
+ prototype: FormData;
23
+ } | typeof import("form-data");
24
+ //# sourceMappingURL=requests.d.ts.map
@@ -0,0 +1,19 @@
1
+ /**
2
+ * UUID util class
3
+ * @static
4
+ * @private
5
+ */
6
+ export default class Uuid extends StaticClass {
7
+ /**
8
+ * Generate a UUID4 string
9
+ * @returns {string} - Uuid
10
+ */
11
+ static uuid4(): string;
12
+ /**
13
+ * Empty uuid as per spec
14
+ * @returns {string} - Uuid
15
+ */
16
+ static nil(): string;
17
+ }
18
+ import StaticClass from "./StaticClass";
19
+ //# sourceMappingURL=uuid.d.ts.map
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@mapcreator/api",
3
- "version": "2.8.0",
3
+ "version": "3.0.0",
4
4
  "description": "Mapcreator JavaScript API",
5
5
  "main": "dist/bundle.js",
6
6
  "repository": "https://gitlab.com/mapcreator/api-wrapper.git",
7
7
  "author": "Bas Bieling <b.bieling@mapcreator.eu>",
8
8
  "license": "BSD-3-Clause",
9
+ "types": "dist/index.d.ts",
9
10
  "files": [
10
11
  "dist",
11
12
  "src",
@@ -48,6 +49,7 @@
48
49
  "nyc": "^15.1.0",
49
50
  "tap-nyc": "^1.0.3",
50
51
  "terser-webpack-plugin": "^3.0.8",
52
+ "typescript": "^4.9.4",
51
53
  "webpack": "^4.43.0",
52
54
  "webpack-cli": "^3.3.11",
53
55
  "webpack-merge": "^4.2.2",
@@ -55,6 +57,7 @@
55
57
  },
56
58
  "scripts": {
57
59
  "build": "APP_ENV=production npx webpack",
60
+ "postbuild": "APP_ENV=production npx tsc || true && rm -v dist/*.map dist/**/*.map",
58
61
  "watch": "npx webpack --progress --watch",
59
62
  "docs": "npx esdoc && ./scripts/inject_docs_viewport.sh",
60
63
  "lint": "npx eslint --no-color --format checkstyle --output-file build/checkstyle.xml src",
package/src/Mapcreator.js CHANGED
@@ -72,6 +72,7 @@ import {
72
72
  VectorChoropleth,
73
73
  ProductTour,
74
74
  ProductTourStep,
75
+ LayerFaq,
75
76
  } from './resources';
76
77
  import ResourceBase from './resources/base/ResourceBase';
77
78
  import Injectable from './traits/Injectable';
@@ -350,7 +351,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
350
351
  /**
351
352
  * Choropleth accessor
352
353
  * @see {@link Choropleth}
353
- * @returns {GeoResourceProxy} - A proxy for accessing the resource
354
+ * @returns {GeoResourceProxy<Choropleth>} - A proxy for accessing the resource
354
355
  */
355
356
  get choropleths () {
356
357
  return new GeoResourceProxy(this, Choropleth);
@@ -359,7 +360,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
359
360
  /**
360
361
  * VectorChoropleth accessor
361
362
  * @see {@link VectorChoropleth}
362
- * @returns {GeoResourceProxy} - A proxy for accessing the resource
363
+ * @returns {GeoResourceProxy<VectorChoropleth>} - A proxy for accessing the resource
363
364
  */
364
365
  get vectorChoropleths () {
365
366
  return new GeoResourceProxy(this, VectorChoropleth);
@@ -368,7 +369,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
368
369
  /**
369
370
  * Color accessor
370
371
  * @see {@link Color}
371
- * @returns {ResourceProxy} - A proxy for accessing the resource
372
+ * @returns {ResourceProxy<Color>} - A proxy for accessing the resource
372
373
  */
373
374
  get colors () {
374
375
  return this.static(Color);
@@ -377,7 +378,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
377
378
  /**
378
379
  * Tag accessor
379
380
  * @see {@link Tag}
380
- * @returns {ResourceProxy} - A proxy for accessing the resource
381
+ * @returns {ResourceProxy<Tag>} - A proxy for accessing the resource
381
382
  */
382
383
  get tags () {
383
384
  return this.static(Tag);
@@ -385,8 +386,8 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
385
386
 
386
387
  /**
387
388
  * Tag accessor
388
- * @see {@link Tag}
389
- * @returns {ResourceProxy} - A proxy for accessing the resource
389
+ * @see {@link TagType}
390
+ * @returns {ResourceProxy<TagType>} - A proxy for accessing the resource
390
391
  */
391
392
  get tagTypes () {
392
393
  return this.static(TagType);
@@ -395,7 +396,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
395
396
  /**
396
397
  * Contract accessor
397
398
  * @see {@link Contract}
398
- * @returns {ResourceProxy} - A proxy for accessing the resource
399
+ * @returns {ResourceProxy<Contract>} - A proxy for accessing the resource
399
400
  */
400
401
  get contracts () {
401
402
  return this.static(Contract);
@@ -404,7 +405,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
404
405
  /**
405
406
  * Dimension accessor
406
407
  * @see {@link Dimension}
407
- * @returns {ResourceProxy} - A proxy for accessing the resource
408
+ * @returns {ResourceProxy<Dimension>} - A proxy for accessing the resource
408
409
  */
409
410
  get dimensions () {
410
411
  return this.static(Dimension);
@@ -413,7 +414,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
413
414
  /**
414
415
  * Dimension set accessor
415
416
  * @see {@link DimensionSet}
416
- * @returns {ResourceProxy} - A proxy for accessing the resource
417
+ * @returns {ResourceProxy<DimensionSet>} - A proxy for accessing the resource
417
418
  */
418
419
  get dimensionSets () {
419
420
  return this.static(DimensionSet);
@@ -422,7 +423,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
422
423
  /**
423
424
  * Faq accessor
424
425
  * @see {@link Faq}
425
- * @returns {ResourceProxy} - A proxy for accessing the resource
426
+ * @returns {ResourceProxy<Faq>} - A proxy for accessing the resource
426
427
  */
427
428
  get faqs () {
428
429
  return this.static(Faq);
@@ -431,7 +432,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
431
432
  /**
432
433
  * Feature accessor
433
434
  * @see {@link Feature}
434
- * @returns {ResourceProxy} - A proxy for accessing the resource
435
+ * @returns {ResourceProxy<Feature>} - A proxy for accessing the resource
435
436
  */
436
437
  get features () {
437
438
  return this.static(Feature);
@@ -440,7 +441,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
440
441
  /**
441
442
  * Featured jobs accessor
442
443
  * @see {@link Job}
443
- * @returns {SimpleResourceProxy} - A proxy for accessing the resource
444
+ * @returns {SimpleResourceProxy<Job>} - A proxy for accessing the resource
444
445
  */
445
446
  get featuredMaps () {
446
447
  return new SimpleResourceProxy(this, Job, '/jobs/featured');
@@ -449,7 +450,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
449
450
  /**
450
451
  * Font accessor
451
452
  * @see {@link Font}
452
- * @returns {ResourceProxy} - A proxy for accessing the resource
453
+ * @returns {ResourceProxy<Font>} - A proxy for accessing the resource
453
454
  */
454
455
  get fonts () {
455
456
  return this.static(Font);
@@ -458,7 +459,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
458
459
  /**
459
460
  * FontFamily accessor
460
461
  * @see {@link FontFamily}
461
- * @returns {ResourceProxy} - A proxy for accessing the resource
462
+ * @returns {ResourceProxy<FontFamily>} - A proxy for accessing the resource
462
463
  */
463
464
  get fontFamilies () {
464
465
  return this.static(FontFamily);
@@ -467,7 +468,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
467
468
  /**
468
469
  * Highlight accessor
469
470
  * @see {@link Highlight}
470
- * @returns {GeoResourceProxy} - A proxy for accessing the resource
471
+ * @returns {GeoResourceProxy<Highlight>} - A proxy for accessing the resource
471
472
  */
472
473
  get highlights () {
473
474
  return new GeoResourceProxy(this, Highlight);
@@ -476,7 +477,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
476
477
  /**
477
478
  * VectorHighlight accessor
478
479
  * @see {@link VectorHighlight}
479
- * @returns {GeoResourceProxy} - A proxy for accessing the resource
480
+ * @returns {GeoResourceProxy<VectorHighlight>} - A proxy for accessing the resource
480
481
  */
481
482
  get vectorHighlights () {
482
483
  return new GeoResourceProxy(this, VectorHighlight);
@@ -485,7 +486,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
485
486
  /**
486
487
  * InsetMap accessor
487
488
  * @see {@link InsetMap}
488
- * @returns {GeoResourceProxy} - A proxy for accessing the resource
489
+ * @returns {GeoResourceProxy<InsetMap>} - A proxy for accessing the resource
489
490
  */
490
491
  get insetMaps () {
491
492
  return new GeoResourceProxy(this, InsetMap);
@@ -494,7 +495,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
494
495
  /**
495
496
  * Job accessor
496
497
  * @see {@link Job}
497
- * @returns {ResourceProxy} - A proxy for accessing the resource
498
+ * @returns {ResourceProxy<Job>} - A proxy for accessing the resource
498
499
  */
499
500
  get jobs () {
500
501
  return this.static(Job);
@@ -503,7 +504,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
503
504
  /**
504
505
  * JobShare accessor
505
506
  * @see {@link JobShare}
506
- * @returns {ResourceProxy} - A proxy for accessing the resource
507
+ * @returns {ResourceProxy<JobShare>} - A proxy for accessing the resource
507
508
  */
508
509
  get jobShares () {
509
510
  return this.static(JobShare);
@@ -512,7 +513,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
512
513
  /**
513
514
  * JobType accessor
514
515
  * @see {@link JobType}
515
- * @returns {ResourceProxy} - A proxy for accessing the resource
516
+ * @returns {ResourceProxy<JobType>} - A proxy for accessing the resource
516
517
  */
517
518
  get jobTypes () {
518
519
  return this.static(JobType);
@@ -521,7 +522,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
521
522
  /**
522
523
  * Language accessor
523
524
  * @see {@link Language}
524
- * @returns {ResourceProxy} - A proxy for accessing the resource
525
+ * @returns {ResourceProxy<Language>} - A proxy for accessing the resource
525
526
  */
526
527
  get languages () {
527
528
  return this.static(Language);
@@ -530,16 +531,25 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
530
531
  /**
531
532
  * Layer accessor
532
533
  * @see {@link Layer}
533
- * @returns {ResourceProxy} - A proxy for accessing the resource
534
+ * @returns {ResourceProxy<Layer>} - A proxy for accessing the resource
534
535
  */
535
536
  get layers () {
536
537
  return this.static(Layer);
537
538
  }
538
539
 
540
+ /**
541
+ * LayerFaq accessor
542
+ * @see {@link LayerFaq}
543
+ * @returns {ResourceProxy<LayerFaq>} - A proxy for accessing the resource
544
+ */
545
+ get layerFaqs () {
546
+ return this.static(LayerFaq);
547
+ }
548
+
539
549
  /**
540
550
  * Layer group accessor
541
551
  * @see {@link LayerGroup}
542
- * @returns {ResourceProxy} - A proxy for accessing the resource
552
+ * @returns {ResourceProxy<LayerGroup>} - A proxy for accessing the resource
543
553
  */
544
554
  get layerGroups () {
545
555
  return this.static(LayerGroup);
@@ -548,7 +558,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
548
558
  /**
549
559
  * Mapstyle accessor
550
560
  * @see {@link Mapstyle}
551
- * @returns {ResourceProxy} - A proxy for accessing the resource
561
+ * @returns {ResourceProxy<Mapstyle>} - A proxy for accessing the resource
552
562
  */
553
563
  get mapstyles () {
554
564
  return this.static(Mapstyle);
@@ -557,7 +567,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
557
567
  /**
558
568
  * MapstyleSet accessor
559
569
  * @see {@link MapstyleSet}
560
- * @returns {ResourceProxy} - A proxy for accessing the resource
570
+ * @returns {ResourceProxy<MapstyleSet>} - A proxy for accessing the resource
561
571
  */
562
572
  get mapstyleSets () {
563
573
  return this.static(MapstyleSet);
@@ -566,7 +576,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
566
576
  /**
567
577
  * Notification accessor
568
578
  * @see {@link Notification}
569
- * @returns {ResourceProxy} - A proxy for accessing the resource
579
+ * @returns {ResourceProxy<Notification>} - A proxy for accessing the resource
570
580
  */
571
581
  get notifications () {
572
582
  return this.static(Notification);
@@ -575,7 +585,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
575
585
  /**
576
586
  * Message accessor
577
587
  * @see {@link Message}
578
- * @returns {ResourceProxy} - A proxy for accessing the resource
588
+ * @returns {ResourceProxy<Message>} - A proxy for accessing the resource
579
589
  */
580
590
  get messages () {
581
591
  return this.static(Message);
@@ -584,7 +594,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
584
594
  /**
585
595
  * Organisation accessor
586
596
  * @see {@link Organisation}
587
- * @returns {ResourceProxy} - A proxy for accessing the resource
597
+ * @returns {ResourceProxy<Organisation>} - A proxy for accessing the resource
588
598
  */
589
599
  get organisations () {
590
600
  return this.static(Organisation);
@@ -593,16 +603,26 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
593
603
  /**
594
604
  * Permission accessor
595
605
  * @see {@link Permission}
596
- * @returns {ResourceProxy} - A proxy for accessing the resource
606
+ * @returns {ResourceProxy<Permission>} - A proxy for accessing the resource
597
607
  */
598
608
  get permissions () {
599
609
  return this.static(Permission);
600
610
  }
601
611
 
612
+ /**
613
+ * Product tour accessor
614
+ * @see {@link ProductTour}
615
+ * @returns {ResourceProxy<ProductTour>} - A proxy for accessing the resource
616
+ */
602
617
  get productTours () {
603
618
  return this.static(ProductTour);
604
619
  }
605
620
 
621
+ /**
622
+ * Product tour step accessor
623
+ * @see {@link ProductTourStep}
624
+ * @returns {ResourceProxy<ProductTourStep>} - A proxy for accessing the resource
625
+ */
606
626
  get productTourSteps () {
607
627
  return this.static(ProductTourStep);
608
628
  }
@@ -610,7 +630,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
610
630
  /**
611
631
  * Role accessor
612
632
  * @see {@link Role}
613
- * @returns {ResourceProxy} - A proxy for accessing the resource
633
+ * @returns {ResourceProxy<Role>} - A proxy for accessing the resource
614
634
  */
615
635
  get roles () {
616
636
  return this.static(Role);
@@ -619,7 +639,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
619
639
  /**
620
640
  * Svg accessor
621
641
  * @see {@link Svg}
622
- * @returns {ResourceProxy} - A proxy for accessing the resource
642
+ * @returns {ResourceProxy<Svg>} - A proxy for accessing the resource
623
643
  */
624
644
  get svgs () {
625
645
  return this.static(Svg);
@@ -628,7 +648,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
628
648
  /**
629
649
  * SvgSet accessor
630
650
  * @see {@link SvgSet}
631
- * @returns {ResourceProxy} - A proxy for accessing the resource
651
+ * @returns {ResourceProxy<SvgSet>} - A proxy for accessing the resource
632
652
  */
633
653
  get svgSets () {
634
654
  return this.static(SvgSet);
@@ -637,7 +657,7 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
637
657
  /**
638
658
  * User accessor
639
659
  * @see {@link User}
640
- * @returns {ResourceProxy} - A proxy for accessing the resource
660
+ * @returns {ResourceProxy<User>} - A proxy for accessing the resource
641
661
  */
642
662
  get users () {
643
663
  return this.static(User);
@@ -30,7 +30,7 @@
30
30
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
31
  */
32
32
 
33
- export Enum from './Enum';
33
+ export { default as Enum } from './Enum';
34
34
  export { DeletedState } from './DeletedState';
35
35
  export { ResultStatus } from './ResultStatus';
36
36
  export { JobShareVisibility } from './JobShareVisibility';
@@ -31,9 +31,9 @@
31
31
  */
32
32
 
33
33
  export * from './AbstractError';
34
- export ApiError from './ApiError';
35
- export ValidationError from './ValidationError';
36
- export NodeError from './NodeError';
37
- export OAuthError from './OAuthError';
38
- export StaticClassError from './StaticClassError';
39
- export GeoError from './GeoError';
34
+ export { default as ApiError } from './ApiError';
35
+ export { default as ValidationError } from './ValidationError';
36
+ export { default as NodeError } from './NodeError';
37
+ export { default as OAuthError } from './OAuthError';
38
+ export { default as StaticClassError } from './StaticClassError';
39
+ export { default as GeoError } from './GeoError';
package/src/index.js CHANGED
@@ -31,34 +31,34 @@
31
31
  */
32
32
 
33
33
  // Core
34
- export Mapcreator from './Mapcreator';
35
- export RequestParameters from './RequestParameters';
36
- export StorageManager from './storage/StorageManager';
34
+ export { default as Mapcreator } from './Mapcreator';
35
+ export { default as RequestParameters } from './RequestParameters';
36
+ export { default as StorageManager } from './storage/StorageManager';
37
37
 
38
38
  // Enums
39
- export Enum from './enums/Enum';
39
+ export { default as Enum } from './enums/Enum';
40
40
  export { DeletedState, ResultStatus } from './enums';
41
41
 
42
42
  // Flows
43
- export OAuth from './oauth/OAuth';
44
- export OAuthToken from './oauth/OAuthToken';
45
- export ImplicitFlow from './oauth/ImplicitFlow';
46
- export ImplicitFlowPopup from './oauth/ImplicitFlowPopup';
47
- export PasswordFlow from './oauth/PasswordFlow';
48
- export DummyFlow from './oauth/DummyFlow';
43
+ export { default as OAuth } from './oauth/OAuth';
44
+ export { default as OAuthToken } from './oauth/OAuthToken';
45
+ export { default as ImplicitFlow } from './oauth/ImplicitFlow';
46
+ export { default as ImplicitFlowPopup } from './oauth/ImplicitFlowPopup';
47
+ export { default as PasswordFlow } from './oauth/PasswordFlow';
48
+ export { default as DummyFlow } from './oauth/DummyFlow';
49
49
 
50
50
  // Exceptions
51
- export ApiError from './errors/ApiError';
51
+ export { default as ApiError } from './errors/ApiError';
52
52
  export * from './errors/AbstractError';
53
- export ValidationError from './errors/ValidationError';
54
- export StaticClassError from './errors/StaticClassError';
53
+ export { default as ValidationError } from './errors/ValidationError';
54
+ export { default as StaticClassError } from './errors/StaticClassError';
55
55
 
56
56
  // Resources
57
57
  export * as resources from './resources';
58
58
 
59
59
  // Helpers
60
60
  export * as helpers from './utils/helpers';
61
- export ResourceLister from './ResourceLister';
61
+ export { default as ResourceLister } from './ResourceLister';
62
62
  export * as geo from './utils/geo';
63
63
 
64
64
  // Errors
@@ -30,8 +30,8 @@
30
30
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
31
  */
32
32
 
33
- export GeoResourceProxy from './GeoResourceProxy';
34
- export OrganisationProxy from './OrganisationProxy';
35
- export OwnedResourceProxy from './OwnedResourceProxy';
36
- export ResourceProxy from './ResourceProxy';
37
- export SimpleResourceProxy from './SimpleResourceProxy';
33
+ export { default as GeoResourceProxy } from './GeoResourceProxy';
34
+ export { default as OrganisationProxy } from './OrganisationProxy';
35
+ export { default as OwnedResourceProxy } from './OwnedResourceProxy';
36
+ export { default as ResourceProxy } from './ResourceProxy';
37
+ export { default as SimpleResourceProxy } from './SimpleResourceProxy';
@@ -0,0 +1,47 @@
1
+ /*
2
+ * BSD 3-Clause License
3
+ *
4
+ * Copyright (c) 2022, Mapcreator
5
+ * All rights reserved.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following conditions are met:
9
+ *
10
+ * Redistributions of source code must retain the above copyright notice, this
11
+ * list of conditions and the following disclaimer.
12
+ *
13
+ * Redistributions in binary form must reproduce the above copyright notice,
14
+ * this list of conditions and the following disclaimer in the documentation
15
+ * and/or other materials provided with the distribution.
16
+ *
17
+ * Neither the name of the copyright holder nor the names of its
18
+ * contributors may be used to endorse or promote products derived from
19
+ * this software without specific prior written permission.
20
+ *
21
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ */
32
+
33
+ import CrudSetItemBase from './base/CrudSetItemBase';
34
+
35
+ /**
36
+ * LayerFaq
37
+ * @extends CrudSetItemBase
38
+ */
39
+ export default class LayerFaq extends CrudSetItemBase {
40
+ static get resourceName () {
41
+ return 'layer-faqs';
42
+ }
43
+
44
+ static get parentKey () {
45
+ return 'layer_group_id';
46
+ }
47
+ }
@@ -37,7 +37,7 @@ import CrudSetBase from './base/CrudSetBase';
37
37
  import { OwnedResourceProxy } from '../proxy';
38
38
 
39
39
  /**
40
- * Layer
40
+ * LayerGroup
41
41
  * @extends CrudBase
42
42
  * @mixes OwnableResource
43
43
  * @mixes HandlesImages
@@ -30,41 +30,42 @@
30
30
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
31
  */
32
32
 
33
- export Choropleth from './Choropleth';
34
- export Color from './Color';
35
- export Contract from './Contract';
36
- export Dimension from './Dimension';
37
- export DimensionSet from './DimensionSet';
38
- export Domain from './Domain';
39
- export Faq from './Faq';
40
- export Feature from './Feature';
41
- export Font from './Font';
42
- export FontFamily from './FontFamily';
43
- export Highlight from './Highlight';
44
- export InsetMap from './InsetMap';
45
- export Job from './Job';
46
- export JobResult from './JobResult';
47
- export JobRevision from './JobRevision';
48
- export JobShare from './JobShare';
49
- export JobType from './JobType';
50
- export Language from './Language';
51
- export Layer from './Layer';
52
- export Mapstyle from './Mapstyle';
53
- export MapstyleSet from './MapstyleSet';
54
- export Message from './Message';
55
- export Notification from './Notification';
56
- export Organisation from './Organisation';
57
- export Permission from './Permission';
58
- export ProductTour from './ProductTour';
59
- export ProductTourStep from './ProductTourStep';
60
- export Role from './Role';
61
- export Svg from './Svg';
62
- export SvgSet from './SvgSet';
63
- export Tag from './Tag';
64
- export TagType from './TagType';
65
- export User from './User';
66
- export VectorHighlight from './VectorHighlight';
67
- export VectorChoropleth from './VectorChoropleth';
33
+ export { default as Choropleth } from './Choropleth';
34
+ export { default as Color } from './Color';
35
+ export { default as Contract } from './Contract';
36
+ export { default as Dimension } from './Dimension';
37
+ export { default as DimensionSet } from './DimensionSet';
38
+ export { default as Domain } from './Domain';
39
+ export { default as Faq } from './Faq';
40
+ export { default as Feature } from './Feature';
41
+ export { default as Font } from './Font';
42
+ export { default as FontFamily } from './FontFamily';
43
+ export { default as Highlight } from './Highlight';
44
+ export { default as InsetMap } from './InsetMap';
45
+ export { default as Job } from './Job';
46
+ export { default as JobResult } from './JobResult';
47
+ export { default as JobRevision } from './JobRevision';
48
+ export { default as JobShare } from './JobShare';
49
+ export { default as JobType } from './JobType';
50
+ export { default as Language } from './Language';
51
+ export { default as Layer } from './Layer';
52
+ export { default as LayerFaq } from './LayerFaq';
53
+ export { default as Mapstyle } from './Mapstyle';
54
+ export { default as MapstyleSet } from './MapstyleSet';
55
+ export { default as Message } from './Message';
56
+ export { default as Notification } from './Notification';
57
+ export { default as Organisation } from './Organisation';
58
+ export { default as Permission } from './Permission';
59
+ export { default as ProductTour } from './ProductTour';
60
+ export { default as ProductTourStep } from './ProductTourStep';
61
+ export { default as Role } from './Role';
62
+ export { default as Svg } from './Svg';
63
+ export { default as SvgSet } from './SvgSet';
64
+ export { default as Tag } from './Tag';
65
+ export { default as TagType } from './TagType';
66
+ export { default as User } from './User';
67
+ export { default as VectorHighlight } from './VectorHighlight';
68
+ export { default as VectorChoropleth } from './VectorChoropleth';
68
69
 
69
70
  import CrudBase from './base/CrudBase';
70
71
  import CrudSetBase from './base/CrudSetBase';