@datocms/cma-client 5.2.0-alpha.3 → 5.2.0-alpha.5

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 (63) hide show
  1. package/README.md +4 -0
  2. package/dist/cjs/generated/Client.js +3 -3
  3. package/dist/cjs/generated/Client.js.map +1 -1
  4. package/dist/cjs/generated/resources/ItemType.js +12 -12
  5. package/dist/cjs/generated/resources/Role.js +8 -8
  6. package/dist/cjs/generated/resources/Role.js.map +1 -1
  7. package/dist/cjs/generated/resources/{SiteSearchSource.js → SearchIndex.js} +59 -71
  8. package/dist/cjs/generated/resources/SearchIndex.js.map +1 -0
  9. package/dist/cjs/generated/resources/{SiteSearchSourceEvent.js → SearchIndexEvent.js} +19 -19
  10. package/dist/cjs/generated/resources/SearchIndexEvent.js.map +1 -0
  11. package/dist/cjs/generated/resources/index.js +5 -5
  12. package/dist/cjs/generated/resources/index.js.map +1 -1
  13. package/dist/cjs/utilities/schemaRepository.js +131 -0
  14. package/dist/cjs/utilities/schemaRepository.js.map +1 -1
  15. package/dist/esm/generated/ApiTypes.d.ts +273 -270
  16. package/dist/esm/generated/Client.d.ts +2 -2
  17. package/dist/esm/generated/Client.js +3 -3
  18. package/dist/esm/generated/Client.js.map +1 -1
  19. package/dist/esm/generated/RawApiTypes.d.ts +265 -258
  20. package/dist/esm/generated/resources/ItemType.d.ts +12 -12
  21. package/dist/esm/generated/resources/ItemType.js +12 -12
  22. package/dist/esm/generated/resources/Role.js +8 -8
  23. package/dist/esm/generated/resources/Role.js.map +1 -1
  24. package/dist/esm/generated/resources/SearchIndex.d.ts +132 -0
  25. package/dist/esm/generated/resources/{SiteSearchSource.js → SearchIndex.js} +58 -70
  26. package/dist/esm/generated/resources/SearchIndex.js.map +1 -0
  27. package/dist/esm/generated/resources/SearchIndexEvent.d.ts +61 -0
  28. package/dist/esm/generated/resources/{SiteSearchSourceEvent.js → SearchIndexEvent.js} +18 -18
  29. package/dist/esm/generated/resources/SearchIndexEvent.js.map +1 -0
  30. package/dist/esm/generated/resources/index.d.ts +2 -2
  31. package/dist/esm/generated/resources/index.js +2 -2
  32. package/dist/esm/generated/resources/index.js.map +1 -1
  33. package/dist/esm/utilities/schemaRepository.d.ts +42 -2
  34. package/dist/esm/utilities/schemaRepository.js +132 -1
  35. package/dist/esm/utilities/schemaRepository.js.map +1 -1
  36. package/dist/types/generated/ApiTypes.d.ts +273 -270
  37. package/dist/types/generated/Client.d.ts +2 -2
  38. package/dist/types/generated/RawApiTypes.d.ts +265 -258
  39. package/dist/types/generated/resources/ItemType.d.ts +12 -12
  40. package/dist/types/generated/resources/SearchIndex.d.ts +132 -0
  41. package/dist/types/generated/resources/SearchIndexEvent.d.ts +61 -0
  42. package/dist/types/generated/resources/index.d.ts +2 -2
  43. package/dist/types/utilities/schemaRepository.d.ts +42 -2
  44. package/package.json +3 -3
  45. package/resources.json +83 -85
  46. package/src/generated/ApiTypes.ts +274 -272
  47. package/src/generated/Client.ts +5 -5
  48. package/src/generated/RawApiTypes.ts +266 -259
  49. package/src/generated/resources/ItemType.ts +12 -12
  50. package/src/generated/resources/Role.ts +8 -8
  51. package/src/generated/resources/SearchIndex.ts +243 -0
  52. package/src/generated/resources/{SiteSearchSourceEvent.ts → SearchIndexEvent.ts} +32 -34
  53. package/src/generated/resources/index.ts +2 -2
  54. package/src/utilities/schemaRepository.ts +167 -9
  55. package/dist/cjs/generated/resources/SiteSearchSource.js.map +0 -1
  56. package/dist/cjs/generated/resources/SiteSearchSourceEvent.js.map +0 -1
  57. package/dist/esm/generated/resources/SiteSearchSource.d.ts +0 -132
  58. package/dist/esm/generated/resources/SiteSearchSource.js.map +0 -1
  59. package/dist/esm/generated/resources/SiteSearchSourceEvent.d.ts +0 -61
  60. package/dist/esm/generated/resources/SiteSearchSourceEvent.js.map +0 -1
  61. package/dist/types/generated/resources/SiteSearchSource.d.ts +0 -132
  62. package/dist/types/generated/resources/SiteSearchSourceEvent.d.ts +0 -61
  63. package/src/generated/resources/SiteSearchSource.ts +0 -267
@@ -1,7 +1,10 @@
1
1
  import { deserializeResponseBody } from '@datocms/rest-client-utils';
2
2
  import type * as ApiTypes from '../generated/ApiTypes';
3
3
  import type * as RawApiTypes from '../generated/RawApiTypes';
4
- import { blockModelIdsReferencedInField } from './fieldsContainingReferences';
4
+ import {
5
+ blockModelIdsReferencedInField,
6
+ modelIdsReferencedInField,
7
+ } from './fieldsContainingReferences';
5
8
 
6
9
  interface GenericClient {
7
10
  itemTypes: {
@@ -265,9 +268,7 @@ export class SchemaRepository {
265
268
  async getItemTypeFields(
266
269
  itemType: ApiTypes.ItemType | RawApiTypes.ItemType,
267
270
  ): Promise<ApiTypes.Field[]> {
268
- const rawResult = await this.getRawItemTypeFields(
269
- itemType as RawApiTypes.ItemType,
270
- );
271
+ const rawResult = await this.getRawItemTypeFields(itemType);
271
272
  return deserializeResponseBody<ApiTypes.Field[]>({
272
273
  data: rawResult,
273
274
  });
@@ -280,7 +281,7 @@ export class SchemaRepository {
280
281
  * @returns Promise that resolves to an array of fields
281
282
  */
282
283
  async getRawItemTypeFields(
283
- itemType: RawApiTypes.ItemType,
284
+ itemType: ApiTypes.ItemType | RawApiTypes.ItemType,
284
285
  ): Promise<RawApiTypes.Field[]> {
285
286
  // Check if we already have the fields cached
286
287
  const cachedFields = this.fieldsByItemType.get(itemType.id);
@@ -304,9 +305,7 @@ export class SchemaRepository {
304
305
  async getItemTypeFieldsets(
305
306
  itemType: ApiTypes.ItemType | RawApiTypes.ItemType,
306
307
  ): Promise<ApiTypes.Fieldset[]> {
307
- const rawResult = await this.getRawItemTypeFieldsets(
308
- itemType as RawApiTypes.ItemType,
309
- );
308
+ const rawResult = await this.getRawItemTypeFieldsets(itemType);
310
309
  return deserializeResponseBody<ApiTypes.Fieldset[]>({
311
310
  data: rawResult,
312
311
  });
@@ -319,7 +318,7 @@ export class SchemaRepository {
319
318
  * @returns Promise that resolves to an array of fieldsets
320
319
  */
321
320
  async getRawItemTypeFieldsets(
322
- itemType: RawApiTypes.ItemType,
321
+ itemType: ApiTypes.ItemType | RawApiTypes.ItemType,
323
322
  ): Promise<RawApiTypes.Fieldset[]> {
324
323
  // Check if we already have the fieldsets cached
325
324
  const cachedFieldsets = this.fieldsetsByItemType.get(itemType.id);
@@ -589,4 +588,163 @@ export class SchemaRepository {
589
588
  data: rawResult,
590
589
  });
591
590
  }
591
+
592
+ /**
593
+ * Gets all block models that are directly or indirectly nested within the given item types.
594
+ * This method recursively traverses the schema to find all blocks that are nested
595
+ * within the provided item types, either directly through block fields or indirectly through
596
+ * other nested block models.
597
+ *
598
+ * @param itemTypes - Array of item types to find nested blocks for
599
+ * @returns Promise that resolves to array of all block models nested in these item types
600
+ */
601
+ async getRawNestedBlocks(
602
+ itemTypes: Array<ApiTypes.ItemType | RawApiTypes.ItemType>,
603
+ ): Promise<Array<RawApiTypes.ItemType>> {
604
+ await this.prefetchAllModelsAndFields();
605
+
606
+ const allItemTypes = await this.getAllRawItemTypes();
607
+ const visited = new Set<string>();
608
+ const nestedBlocks: Array<RawApiTypes.ItemType> = [];
609
+
610
+ // Helper function to recursively find nested blocks
611
+ const findNestedBlocks = async (
612
+ itemType: ApiTypes.ItemType | RawApiTypes.ItemType,
613
+ alreadyExplored: Set<string> = new Set(),
614
+ ): Promise<void> => {
615
+ if (alreadyExplored.has(itemType.id)) {
616
+ return;
617
+ }
618
+
619
+ alreadyExplored.add(itemType.id);
620
+
621
+ const fields = await this.getRawItemTypeFields(itemType);
622
+
623
+ for (const field of fields) {
624
+ const referencedBlockIds = blockModelIdsReferencedInField(field);
625
+
626
+ for (const blockId of referencedBlockIds) {
627
+ if (!visited.has(blockId)) {
628
+ visited.add(blockId);
629
+ const nestedBlock = allItemTypes.find((it) => it.id === blockId);
630
+ if (nestedBlock) {
631
+ nestedBlocks.push(nestedBlock);
632
+ // Recursively find blocks nested in this block
633
+ await findNestedBlocks(nestedBlock, new Set(alreadyExplored));
634
+ }
635
+ }
636
+ }
637
+ }
638
+ };
639
+
640
+ // Find nested blocks for each provided item type
641
+ for (const itemType of itemTypes) {
642
+ await findNestedBlocks(itemType);
643
+ }
644
+
645
+ return nestedBlocks;
646
+ }
647
+
648
+ /**
649
+ * Gets all block models that are directly or indirectly nested within the given item types.
650
+ * This method recursively traverses the schema to find all blocks that are nested
651
+ * within the provided item types, either directly through block fields or indirectly through
652
+ * other nested block models.
653
+ *
654
+ * @param itemTypes - Array of item types to find nested blocks for
655
+ * @returns Promise that resolves to array of all block models nested in these item types
656
+ */
657
+ async getNestedBlocks(
658
+ itemTypes: Array<ApiTypes.ItemType | RawApiTypes.ItemType>,
659
+ ): Promise<Array<ApiTypes.ItemType>> {
660
+ const rawResult = await this.getRawNestedBlocks(itemTypes);
661
+ return deserializeResponseBody<ApiTypes.ItemType[]>({
662
+ data: rawResult,
663
+ });
664
+ }
665
+
666
+ /**
667
+ * Gets all models that are directly or indirectly nested/referenced within the given item types.
668
+ * This method recursively traverses the schema to find all models that are referenced
669
+ * by the provided item types through link fields, either directly or indirectly through
670
+ * other referenced blocks.
671
+ *
672
+ * @param itemTypes - Array of item types to find nested models for
673
+ * @returns Promise that resolves to array of all models nested in these item types
674
+ */
675
+ async getRawNestedModels(
676
+ itemTypes: Array<ApiTypes.ItemType | RawApiTypes.ItemType>,
677
+ ): Promise<Array<RawApiTypes.ItemType>> {
678
+ await this.prefetchAllModelsAndFields();
679
+
680
+ const allItemTypes = await this.getAllRawItemTypes();
681
+ const visited = new Set<string>();
682
+ const nestedModels: Array<RawApiTypes.ItemType> = [];
683
+
684
+ // Helper function to recursively find nested models
685
+ const findNestedModels = async (
686
+ itemType: ApiTypes.ItemType | RawApiTypes.ItemType,
687
+ alreadyExplored: Set<string> = new Set(),
688
+ ): Promise<void> => {
689
+ if (alreadyExplored.has(itemType.id)) {
690
+ return;
691
+ }
692
+
693
+ alreadyExplored.add(itemType.id);
694
+
695
+ const fields = await this.getRawItemTypeFields(itemType);
696
+
697
+ for (const field of fields) {
698
+ // Find models directly referenced via link fields
699
+ const referencedModelIds = modelIdsReferencedInField(field);
700
+
701
+ for (const modelId of referencedModelIds) {
702
+ if (!visited.has(modelId)) {
703
+ visited.add(modelId);
704
+ const nestedModel = allItemTypes.find((it) => it.id === modelId);
705
+ if (nestedModel) {
706
+ nestedModels.push(nestedModel);
707
+ // Do NOT recurse into models, only into blocks
708
+ }
709
+ }
710
+ }
711
+
712
+ // Find blocks referenced via block fields, then recursively find models in those blocks
713
+ const referencedBlockIds = blockModelIdsReferencedInField(field);
714
+
715
+ for (const blockId of referencedBlockIds) {
716
+ const nestedBlock = allItemTypes.find((it) => it.id === blockId);
717
+ if (nestedBlock) {
718
+ // Recursively find models nested in this block
719
+ await findNestedModels(nestedBlock, new Set(alreadyExplored));
720
+ }
721
+ }
722
+ }
723
+ };
724
+
725
+ // Find nested models for each provided item type
726
+ for (const itemType of itemTypes) {
727
+ await findNestedModels(itemType);
728
+ }
729
+
730
+ return nestedModels;
731
+ }
732
+
733
+ /**
734
+ * Gets all models that are directly or indirectly nested/referenced within the given item types.
735
+ * This method recursively traverses the schema to find all models that are referenced
736
+ * by the provided item types through link fields, either directly or indirectly through
737
+ * other referenced blocks.
738
+ *
739
+ * @param itemTypes - Array of item types to find nested models for
740
+ * @returns Promise that resolves to array of all models nested in these item types
741
+ */
742
+ async getNestedModels(
743
+ itemTypes: Array<ApiTypes.ItemType | RawApiTypes.ItemType>,
744
+ ): Promise<Array<ApiTypes.ItemType>> {
745
+ const rawResult = await this.getRawNestedModels(itemTypes);
746
+ return deserializeResponseBody<ApiTypes.ItemType[]>({
747
+ data: rawResult,
748
+ });
749
+ }
592
750
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"SiteSearchSource.js","sourceRoot":"","sources":["../../../../src/generated/resources/SiteSearchSource.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;AACpD,sEAA8C;AAI9C,MAAqB,gBAAiB,SAAQ,sBAAY;IAGxD;;;;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AI,CAAC,kBAAkB,CAAC,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,kBAA0B;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAO;YAC/B,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,wBAAwB,kBAAkB,QAAQ;SACxD,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,kBAA0D;QAChE,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACnE,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,UAAU,CACR,kBAA0B;QAE1B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB;YACE,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,wBAAwB,kBAAkB,EAAE;SAClD,CACF,CAAC;IACJ,CAAC;;AApQH,mCAqQC;AApQiB,qBAAI,GAAG,oBAA6B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SiteSearchSourceEvent.js","sourceRoot":"","sources":["../../../../src/generated/resources/SiteSearchSourceEvent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;AACpD,sEAA8C;AAI9C,MAAqB,qBAAsB,SAAQ,sBAAY;IAG7D;;;;;;;OAOG;IACH,IAAI,CAAC,WAA+D;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAC7C,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CACL,WAAkE;QAElE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,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import BaseResource from '../../BaseResource';
2
- import type * as ApiTypes from '../ApiTypes';
3
- import type * as RawApiTypes from '../RawApiTypes';
4
- export default class SiteSearchSource extends BaseResource {
5
- static readonly TYPE: "site_search_source";
6
- /**
7
- * List all site search sources for a site
8
- *
9
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/instances
10
- *
11
- * @throws {ApiError}
12
- * @throws {TimeoutError}
13
- */
14
- list(): Promise<ApiTypes.SiteSearchSourceInstancesTargetSchema>;
15
- /**
16
- * List all site search sources for a site
17
- *
18
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/instances
19
- *
20
- * @throws {ApiError}
21
- * @throws {TimeoutError}
22
- */
23
- rawList(): Promise<RawApiTypes.SiteSearchSourceInstancesTargetSchema>;
24
- /**
25
- * Retrieve a site search source
26
- *
27
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/self
28
- *
29
- * @throws {ApiError}
30
- * @throws {TimeoutError}
31
- */
32
- find(siteSearchSourceId: string | ApiTypes.SiteSearchSourceData): Promise<ApiTypes.SiteSearchSource>;
33
- /**
34
- * Retrieve a site search source
35
- *
36
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/self
37
- *
38
- * @throws {ApiError}
39
- * @throws {TimeoutError}
40
- */
41
- rawFind(siteSearchSourceId: string): Promise<RawApiTypes.SiteSearchSourceSelfTargetSchema>;
42
- /**
43
- * Create site search source
44
- *
45
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/create
46
- *
47
- * @throws {ApiError}
48
- * @throws {TimeoutError}
49
- */
50
- create(body: ApiTypes.SiteSearchSourceCreateSchema): Promise<ApiTypes.SiteSearchSource>;
51
- /**
52
- * Create site search source
53
- *
54
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/create
55
- *
56
- * @throws {ApiError}
57
- * @throws {TimeoutError}
58
- */
59
- rawCreate(body: RawApiTypes.SiteSearchSourceCreateSchema): Promise<RawApiTypes.SiteSearchSourceCreateTargetSchema>;
60
- /**
61
- * Update site search source
62
- *
63
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/update
64
- *
65
- * @throws {ApiError}
66
- * @throws {TimeoutError}
67
- */
68
- update(siteSearchSourceId: string | ApiTypes.SiteSearchSourceData, body: ApiTypes.SiteSearchSourceUpdateSchema): Promise<ApiTypes.SiteSearchSource>;
69
- /**
70
- * Update site search source
71
- *
72
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/update
73
- *
74
- * @throws {ApiError}
75
- * @throws {TimeoutError}
76
- */
77
- rawUpdate(siteSearchSourceId: string, body: RawApiTypes.SiteSearchSourceUpdateSchema): Promise<RawApiTypes.SiteSearchSourceUpdateTargetSchema>;
78
- /**
79
- * Trigger a site search indexing
80
- *
81
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/trigger
82
- *
83
- * @throws {ApiError}
84
- * @throws {TimeoutError}
85
- */
86
- trigger(siteSearchSourceId: string | ApiTypes.SiteSearchSourceData): Promise<void>;
87
- /**
88
- * Trigger a site search indexing
89
- *
90
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/trigger
91
- *
92
- * @throws {ApiError}
93
- * @throws {TimeoutError}
94
- */
95
- rawTrigger(siteSearchSourceId: string): Promise<void>;
96
- /**
97
- * Abort a site search spidering and mark it as failed
98
- *
99
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/abort
100
- *
101
- * @throws {ApiError}
102
- * @throws {TimeoutError}
103
- */
104
- abort(siteSearchSourceId: string | ApiTypes.SiteSearchSourceData): Promise<void>;
105
- /**
106
- * Abort a site search spidering and mark it as failed
107
- *
108
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/abort
109
- *
110
- * @throws {ApiError}
111
- * @throws {TimeoutError}
112
- */
113
- rawAbort(siteSearchSourceId: string): Promise<void>;
114
- /**
115
- * Delete a site search source
116
- *
117
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/destroy
118
- *
119
- * @throws {ApiError}
120
- * @throws {TimeoutError}
121
- */
122
- destroy(siteSearchSourceId: string | ApiTypes.SiteSearchSourceData): Promise<ApiTypes.SiteSearchSource>;
123
- /**
124
- * Delete a site search source
125
- *
126
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/destroy
127
- *
128
- * @throws {ApiError}
129
- * @throws {TimeoutError}
130
- */
131
- rawDestroy(siteSearchSourceId: string): Promise<RawApiTypes.SiteSearchSourceDestroyTargetSchema>;
132
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"SiteSearchSource.js","sourceRoot":"","sources":["../../../../src/generated/resources/SiteSearchSource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AACpD,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAI9C,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,YAAY;IAGxD;;;;;;;OAOG;IACH,IAAI;QACF,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAClC,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,sBAAsB;SAC5B,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,kBAA0D;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAChE,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CACL,kBAA0B;QAE1B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA+C;YACvE,MAAM,EAAE,KAAK;Y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,GAAG,oBAA6B,CAAC"}
@@ -1,61 +0,0 @@
1
- import * as Utils from '@datocms/rest-client-utils';
2
- import BaseResource from '../../BaseResource';
3
- import type * as ApiTypes from '../ApiTypes';
4
- import type * as RawApiTypes from '../RawApiTypes';
5
- export default class SiteSearchSourceEvent extends BaseResource {
6
- static readonly TYPE: "site_search_source_event";
7
- /**
8
- * List all site search indexing events
9
- *
10
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source_event/instances
11
- *
12
- * @throws {ApiError}
13
- * @throws {TimeoutError}
14
- */
15
- list(queryParams?: ApiTypes.SiteSearchSourceEventInstancesHrefSchema): Promise<ApiTypes.SiteSearchSourceEventInstancesTargetSchema>;
16
- /**
17
- * List all site search indexing events
18
- *
19
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source_event/instances
20
- *
21
- * @throws {ApiError}
22
- * @throws {TimeoutError}
23
- */
24
- rawList(queryParams?: RawApiTypes.SiteSearchSourceEventInstancesHrefSchema): Promise<RawApiTypes.SiteSearchSourceEventInstancesTargetSchema>;
25
- /**
26
- * Async iterator to auto-paginate over elements returned by list()
27
- *
28
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source_event/instances
29
- *
30
- * @throws {ApiError}
31
- * @throws {TimeoutError}
32
- */
33
- listPagedIterator(queryParams?: Utils.OmitFromKnownKeys<ApiTypes.SiteSearchSourceEventInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<ApiTypes.SiteSearchSourceEvent, void, unknown>;
34
- /**
35
- * Async iterator to auto-paginate over elements returned by rawList()
36
- *
37
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source_event/instances
38
- *
39
- * @throws {ApiError}
40
- * @throws {TimeoutError}
41
- */
42
- rawListPagedIterator(queryParams?: Utils.OmitFromKnownKeys<RawApiTypes.SiteSearchSourceEventInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<RawApiTypes.SiteSearchSourceEvent, void, unknown>;
43
- /**
44
- * Retrieve a site search indexing event
45
- *
46
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source_event/self
47
- *
48
- * @throws {ApiError}
49
- * @throws {TimeoutError}
50
- */
51
- find(siteSearchSourceEventId: string | ApiTypes.SiteSearchSourceEventData): Promise<ApiTypes.SiteSearchSourceEvent>;
52
- /**
53
- * Retrieve a site search indexing event
54
- *
55
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source_event/self
56
- *
57
- * @throws {ApiError}
58
- * @throws {TimeoutError}
59
- */
60
- rawFind(siteSearchSourceEventId: string): Promise<RawApiTypes.SiteSearchSourceEventSelfTargetSchema>;
61
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"SiteSearchSourceEvent.js","sourceRoot":"","sources":["../../../../src/generated/resources/SiteSearchSourceEvent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AACpD,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAI9C,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,YAAY;IAG7D;;;;;;;OAOG;IACH,IAAI,CAAC,WAA+D;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAC7C,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CACL,WAAkE;QAElE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,4BAA4B;YACjC,WAAW;SACZ,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACI,iBAAiB,CACtB,WAGC,EACD,eAAuC;;;;gBAEvC,KAA4B,eAAA,KAAA,cAAA,IAAI,CAAC,oBAAoB,CACnD,WAAW,EACX,eAAe,CAChB,CAAA,IAAA;oBAH2B,cAG3B;oBAH2B,WAG3B;;wBAHU,MAAM,OAAO,KAAA,CAAA;wBAItB,oBAAM,KAAK,CAAC,qBAAqB,CAE/B,OAAO,CAAC,CAAA,CAAC;;;;;iBACZ;;;;;;;;;QACH,CAAC;KAAA;IAED;;;;;;;OAOG;IACH,oBAAoB,CAClB,WAGC,EACD,eAAuC;QAEvC,KAAK,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC;QAExC,OAAO,KAAK,CAAC,eAAe,CAG1B;YACE,YAAY,EAAE,EAAE;YAChB,QAAQ,EAAE,GAAG;SACd,EACD,CAAC,IAAkE,EAAE,EAAE,CACrE,IAAI,CAAC,OAAO,iCAAM,WAAW,KAAE,IAAI,IAAG,EACxC,eAAe,CAChB,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,uBAAoE;QACvE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACrE,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CACL,uBAA+B;QAE/B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,8BAA8B,uBAAuB,EAAE;SAC7D,CACF,CAAC;IACJ,CAAC;;AA9He,0BAAI,GAAG,0BAAmC,CAAC"}
@@ -1,132 +0,0 @@
1
- import BaseResource from '../../BaseResource';
2
- import type * as ApiTypes from '../ApiTypes';
3
- import type * as RawApiTypes from '../RawApiTypes';
4
- export default class SiteSearchSource extends BaseResource {
5
- static readonly TYPE: "site_search_source";
6
- /**
7
- * List all site search sources for a site
8
- *
9
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/instances
10
- *
11
- * @throws {ApiError}
12
- * @throws {TimeoutError}
13
- */
14
- list(): Promise<ApiTypes.SiteSearchSourceInstancesTargetSchema>;
15
- /**
16
- * List all site search sources for a site
17
- *
18
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/instances
19
- *
20
- * @throws {ApiError}
21
- * @throws {TimeoutError}
22
- */
23
- rawList(): Promise<RawApiTypes.SiteSearchSourceInstancesTargetSchema>;
24
- /**
25
- * Retrieve a site search source
26
- *
27
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/self
28
- *
29
- * @throws {ApiError}
30
- * @throws {TimeoutError}
31
- */
32
- find(siteSearchSourceId: string | ApiTypes.SiteSearchSourceData): Promise<ApiTypes.SiteSearchSource>;
33
- /**
34
- * Retrieve a site search source
35
- *
36
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/self
37
- *
38
- * @throws {ApiError}
39
- * @throws {TimeoutError}
40
- */
41
- rawFind(siteSearchSourceId: string): Promise<RawApiTypes.SiteSearchSourceSelfTargetSchema>;
42
- /**
43
- * Create site search source
44
- *
45
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/create
46
- *
47
- * @throws {ApiError}
48
- * @throws {TimeoutError}
49
- */
50
- create(body: ApiTypes.SiteSearchSourceCreateSchema): Promise<ApiTypes.SiteSearchSource>;
51
- /**
52
- * Create site search source
53
- *
54
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/create
55
- *
56
- * @throws {ApiError}
57
- * @throws {TimeoutError}
58
- */
59
- rawCreate(body: RawApiTypes.SiteSearchSourceCreateSchema): Promise<RawApiTypes.SiteSearchSourceCreateTargetSchema>;
60
- /**
61
- * Update site search source
62
- *
63
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/update
64
- *
65
- * @throws {ApiError}
66
- * @throws {TimeoutError}
67
- */
68
- update(siteSearchSourceId: string | ApiTypes.SiteSearchSourceData, body: ApiTypes.SiteSearchSourceUpdateSchema): Promise<ApiTypes.SiteSearchSource>;
69
- /**
70
- * Update site search source
71
- *
72
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/update
73
- *
74
- * @throws {ApiError}
75
- * @throws {TimeoutError}
76
- */
77
- rawUpdate(siteSearchSourceId: string, body: RawApiTypes.SiteSearchSourceUpdateSchema): Promise<RawApiTypes.SiteSearchSourceUpdateTargetSchema>;
78
- /**
79
- * Trigger a site search indexing
80
- *
81
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/trigger
82
- *
83
- * @throws {ApiError}
84
- * @throws {TimeoutError}
85
- */
86
- trigger(siteSearchSourceId: string | ApiTypes.SiteSearchSourceData): Promise<void>;
87
- /**
88
- * Trigger a site search indexing
89
- *
90
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/trigger
91
- *
92
- * @throws {ApiError}
93
- * @throws {TimeoutError}
94
- */
95
- rawTrigger(siteSearchSourceId: string): Promise<void>;
96
- /**
97
- * Abort a site search spidering and mark it as failed
98
- *
99
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/abort
100
- *
101
- * @throws {ApiError}
102
- * @throws {TimeoutError}
103
- */
104
- abort(siteSearchSourceId: string | ApiTypes.SiteSearchSourceData): Promise<void>;
105
- /**
106
- * Abort a site search spidering and mark it as failed
107
- *
108
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/abort
109
- *
110
- * @throws {ApiError}
111
- * @throws {TimeoutError}
112
- */
113
- rawAbort(siteSearchSourceId: string): Promise<void>;
114
- /**
115
- * Delete a site search source
116
- *
117
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/destroy
118
- *
119
- * @throws {ApiError}
120
- * @throws {TimeoutError}
121
- */
122
- destroy(siteSearchSourceId: string | ApiTypes.SiteSearchSourceData): Promise<ApiTypes.SiteSearchSource>;
123
- /**
124
- * Delete a site search source
125
- *
126
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source/destroy
127
- *
128
- * @throws {ApiError}
129
- * @throws {TimeoutError}
130
- */
131
- rawDestroy(siteSearchSourceId: string): Promise<RawApiTypes.SiteSearchSourceDestroyTargetSchema>;
132
- }
@@ -1,61 +0,0 @@
1
- import * as Utils from '@datocms/rest-client-utils';
2
- import BaseResource from '../../BaseResource';
3
- import type * as ApiTypes from '../ApiTypes';
4
- import type * as RawApiTypes from '../RawApiTypes';
5
- export default class SiteSearchSourceEvent extends BaseResource {
6
- static readonly TYPE: "site_search_source_event";
7
- /**
8
- * List all site search indexing events
9
- *
10
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source_event/instances
11
- *
12
- * @throws {ApiError}
13
- * @throws {TimeoutError}
14
- */
15
- list(queryParams?: ApiTypes.SiteSearchSourceEventInstancesHrefSchema): Promise<ApiTypes.SiteSearchSourceEventInstancesTargetSchema>;
16
- /**
17
- * List all site search indexing events
18
- *
19
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source_event/instances
20
- *
21
- * @throws {ApiError}
22
- * @throws {TimeoutError}
23
- */
24
- rawList(queryParams?: RawApiTypes.SiteSearchSourceEventInstancesHrefSchema): Promise<RawApiTypes.SiteSearchSourceEventInstancesTargetSchema>;
25
- /**
26
- * Async iterator to auto-paginate over elements returned by list()
27
- *
28
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source_event/instances
29
- *
30
- * @throws {ApiError}
31
- * @throws {TimeoutError}
32
- */
33
- listPagedIterator(queryParams?: Utils.OmitFromKnownKeys<ApiTypes.SiteSearchSourceEventInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<ApiTypes.SiteSearchSourceEvent, void, unknown>;
34
- /**
35
- * Async iterator to auto-paginate over elements returned by rawList()
36
- *
37
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source_event/instances
38
- *
39
- * @throws {ApiError}
40
- * @throws {TimeoutError}
41
- */
42
- rawListPagedIterator(queryParams?: Utils.OmitFromKnownKeys<RawApiTypes.SiteSearchSourceEventInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<RawApiTypes.SiteSearchSourceEvent, void, unknown>;
43
- /**
44
- * Retrieve a site search indexing event
45
- *
46
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source_event/self
47
- *
48
- * @throws {ApiError}
49
- * @throws {TimeoutError}
50
- */
51
- find(siteSearchSourceEventId: string | ApiTypes.SiteSearchSourceEventData): Promise<ApiTypes.SiteSearchSourceEvent>;
52
- /**
53
- * Retrieve a site search indexing event
54
- *
55
- * Read more: https://www.datocms.com/docs/content-management-api/resources/site-search_source_event/self
56
- *
57
- * @throws {ApiError}
58
- * @throws {TimeoutError}
59
- */
60
- rawFind(siteSearchSourceEventId: string): Promise<RawApiTypes.SiteSearchSourceEventSelfTargetSchema>;
61
- }