@datocms/cma-client 1.0.0 → 1.1.1

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 (49) hide show
  1. package/dist/cjs/generated/resources/Item.js +3 -1
  2. package/dist/cjs/generated/resources/Item.js.map +1 -1
  3. package/dist/cjs/generated/resources/ItemVersion.js +3 -1
  4. package/dist/cjs/generated/resources/ItemVersion.js.map +1 -1
  5. package/dist/cjs/generated/resources/SearchResult.js +118 -0
  6. package/dist/cjs/generated/resources/SearchResult.js.map +1 -1
  7. package/dist/cjs/generated/resources/Upload.js +3 -1
  8. package/dist/cjs/generated/resources/Upload.js.map +1 -1
  9. package/dist/cjs/generated/resources/UploadSmartTag.js +3 -1
  10. package/dist/cjs/generated/resources/UploadSmartTag.js.map +1 -1
  11. package/dist/cjs/generated/resources/UploadTag.js +3 -1
  12. package/dist/cjs/generated/resources/UploadTag.js.map +1 -1
  13. package/dist/cjs/generated/resources/WebhookCall.js +3 -1
  14. package/dist/cjs/generated/resources/WebhookCall.js.map +1 -1
  15. package/dist/esm/generated/SchemaTypes.d.ts +45 -64
  16. package/dist/esm/generated/SimpleSchemaTypes.d.ts +60 -82
  17. package/dist/esm/generated/resources/DailyUsage.d.ts +1 -1
  18. package/dist/esm/generated/resources/Item.d.ts +6 -6
  19. package/dist/esm/generated/resources/Item.js +3 -1
  20. package/dist/esm/generated/resources/Item.js.map +1 -1
  21. package/dist/esm/generated/resources/ItemVersion.js +3 -1
  22. package/dist/esm/generated/resources/ItemVersion.js.map +1 -1
  23. package/dist/esm/generated/resources/SearchResult.d.ts +15 -2
  24. package/dist/esm/generated/resources/SearchResult.js +118 -0
  25. package/dist/esm/generated/resources/SearchResult.js.map +1 -1
  26. package/dist/esm/generated/resources/Upload.js +3 -1
  27. package/dist/esm/generated/resources/Upload.js.map +1 -1
  28. package/dist/esm/generated/resources/UploadSmartTag.js +3 -1
  29. package/dist/esm/generated/resources/UploadSmartTag.js.map +1 -1
  30. package/dist/esm/generated/resources/UploadTag.js +3 -1
  31. package/dist/esm/generated/resources/UploadTag.js.map +1 -1
  32. package/dist/esm/generated/resources/WebhookCall.js +3 -1
  33. package/dist/esm/generated/resources/WebhookCall.js.map +1 -1
  34. package/dist/types/generated/SchemaTypes.d.ts +45 -64
  35. package/dist/types/generated/SimpleSchemaTypes.d.ts +60 -82
  36. package/dist/types/generated/resources/DailyUsage.d.ts +1 -1
  37. package/dist/types/generated/resources/Item.d.ts +6 -6
  38. package/dist/types/generated/resources/SearchResult.d.ts +15 -2
  39. package/package.json +4 -4
  40. package/resources.json +4 -0
  41. package/src/generated/SchemaTypes.ts +45 -75
  42. package/src/generated/SimpleSchemaTypes.ts +61 -82
  43. package/src/generated/resources/Item.ts +8 -7
  44. package/src/generated/resources/ItemVersion.ts +2 -1
  45. package/src/generated/resources/SearchResult.ts +43 -2
  46. package/src/generated/resources/Upload.ts +2 -1
  47. package/src/generated/resources/UploadSmartTag.ts +2 -1
  48. package/src/generated/resources/UploadTag.ts +2 -1
  49. package/src/generated/resources/WebhookCall.ts +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"UploadTag.js","sourceRoot":"","sources":["../../../../src/generated/resources/UploadTag.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAGpD,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAE9C;IAAuC,6BAAY;IAAnD;;IAwGA,CAAC;IArGC;;;;OAIG;IACH,wBAAI,GAAJ,UAAK,WAA4D;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,UAAC,IAAI;YACzC,OAAA,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL;QAFD,CAEC,CACF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,2BAAO,GAAP,UACE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G1B;YACE,YAAY,EAAE,EAAE;YAChB,QAAQ,EAAE,GAAG;SACd,EACD,UAAC,IAAsD;YACrD,OAAA,KAAI,CAAC,OAAO,uBAAM,WAAW,KAAE,IAAI,MAAA,IAAG;QAAtC,CAAsC,EACxC,eAAe,CAChB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,0BAAM,GAAN,UAAO,IAA6C;QAClD,OAAO,IAAI,CAAC,SAAS,CACnB,KAAK,CAAC,oBAAoB,CAAoC,IAAI,EAAE;YAClE,IAAI,EAAE,YAAY;YAClB,UAAU,EAAE,CAAC,MAAM,CAAC;YACpB,aAAa,EAAE,EAAE;SAClB,CAAC,CACH,CAAC,IAAI,CAAC,UAAC,IAAI;YACV,OAAA,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL;QAFD,CAEC,CACF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,6BAAS,GAAT,UACE,IAAuC;QAEvC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA0C;YAClE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,cAAc;YACnB,IAAI,MAAA;SACL,CAAC,CAAC;IACL,CAAC;IAvGe,cAAI,GAAiB,YAAY,CAAC;IAwGpD,gBAAC;CAAA,AAzGD,CAAuC,YAAY,GAyGlD;eAzGoB,SAAS"}
@@ -156,7 +156,9 @@ var WebhookCall = /** @class */ (function (_super) {
156
156
  return Utils.rawPageIterator({
157
157
  defaultLimit: 30,
158
158
  maxLimit: 500,
159
- }, function (page) { return _this.rawList(__assign(__assign({}, queryParams), { page: page })); }, iteratorOptions);
159
+ }, function (page) {
160
+ return _this.rawList(__assign(__assign({}, queryParams), { page: page }));
161
+ }, iteratorOptions);
160
162
  };
161
163
  /**
162
164
  * Re-send the webhook call
@@ -1 +1 @@
1
- {"version":3,"file":"WebhookCall.js","sourceRoot":"","sources":["../../../../src/generated/resources/WebhookCall.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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O,WAAA,CAAA;qDAIhB,KAAK,CAAC,qBAAqB,CAE/B,OAAO,CAAC;4BAFV,gCAEU;;wBAFV,SAEU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;KAEd;IAED;;;;OAIG;IACH,0CAAoB,GAApB,UACE,WAAwD,EACxD,eAAuC;QAFzC,iBAeC;QAXC,OAAO,KAAK,CAAC,eAAe,CAG1B;YACE,YAAY,EAAE,EAAE;YAChB,QAAQ,EAAE,GAAG;SACd,EACD,UAAC,IAAwD;YACvD,OAAA,KAAI,CAAC,OAAO,uBAAM,WAAW,KAAE,IAAI,MAAA,IAAG;QAAtC,CAAsC,EACxC,eAAe,CAChB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,mCAAa,GAAb,UAAc,MAA2C;QACvD,OAAO,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACnD,CAAC;IAED;;;;OAIG;IACH,sCAAgB,GAAhB,UAAiB,MAAc;QAC7B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAO;YAC/B,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,yBAAkB,MAAM,oBAAiB;SAC/C,CAAC,CAAC;IACL,CAAC;IA1Fe,gBAAI,GAAmB,cAAc,CAAC;IA2FxD,kBAAC;CAAA,AA5FD,CAAyC,YAAY,GA4FpD;eA5FoB,WAAW"}
@@ -826,25 +826,37 @@ export declare type SearchResultIdentity = string;
826
826
  */
827
827
  export declare type SearchResultInstancesHrefSchema = {
828
828
  /**
829
- * The query string to search
830
- */
831
- q: string;
832
- /**
833
- * The build trigger ID on which the search will be performed
834
- */
835
- build_trigger_id?: string;
836
- /**
837
- * Restrict the search on one locale
838
- */
839
- locale?: string;
840
- /**
841
- * Maximum number of results to return (defaults to 20, maximum is 100)
829
+ * Attributes to manage results pagination
842
830
  */
843
- limit?: number;
831
+ page?: {
832
+ /**
833
+ * Index of first element to fetch (defaults to 0)
834
+ */
835
+ offset?: number;
836
+ /**
837
+ * Number of elements to fetch (defaults to 20, maximum is 100)
838
+ */
839
+ limit?: number;
840
+ [k: string]: unknown;
841
+ };
844
842
  /**
845
- * Number of records to offset for the search
843
+ * Attributes to filter search results
846
844
  */
847
- offset?: string;
845
+ filter: {
846
+ /**
847
+ * Text to search
848
+ */
849
+ query: string;
850
+ /**
851
+ * The build trigger ID on which the search will be performed. Required if more than one build trigger is present in a project
852
+ */
853
+ build_trigger_id?: string;
854
+ /**
855
+ * Restrict the search on pages in a specific locale
856
+ */
857
+ locale?: string;
858
+ [k: string]: unknown;
859
+ };
848
860
  [k: string]: unknown;
849
861
  };
850
862
  /**
@@ -2959,6 +2971,14 @@ export declare type SitePlanAttributes = {
2959
2971
  * Whether translator roles are enabled or not
2960
2972
  */
2961
2973
  translator_roles: boolean;
2974
+ /**
2975
+ * Whether or not use a static IP when sending webhooks
2976
+ */
2977
+ static_webhooks_ip: boolean;
2978
+ /**
2979
+ * Maximum size in bytes for a single file upload
2980
+ */
2981
+ maximum_single_upload_bytes: number;
2962
2982
  /**
2963
2983
  * Available extra packets
2964
2984
  */
@@ -4046,7 +4066,7 @@ export declare type ItemTypeDestroyJobSchema = {
4046
4066
  * | Parameter | Type | Required | Description |
4047
4067
  * | ----------------- | ----------------------------------------- | -------- | ------------------------------ |
4048
4068
  * | `extensions` | `Array<String>` | | Set of allowed file extensions |
4049
- * | `predefined_list` | one of `"image"`, `"video"`, `"document"` | | Allowed file type |
4069
+ * | `predefined_list` | one of `"image"`, `"transformable_image"`, `"video"`, `"document"` | | Allowed file type |
4050
4070
  *
4051
4071
  * Only one of the parameters must be specified.
4052
4072
  *
@@ -7065,11 +7085,11 @@ export declare type SearchResult = {
7065
7085
  */
7066
7086
  export declare type SearchResultAttributes = {
7067
7087
  /**
7068
- * Page title
7088
+ * Title of the page
7069
7089
  */
7070
7090
  title: string;
7071
7091
  /**
7072
- * First lines of body
7092
+ * First 200 characters of page body, unformatted
7073
7093
  */
7074
7094
  body_excerpt: string;
7075
7095
  /**
@@ -7077,7 +7097,7 @@ export declare type SearchResultAttributes = {
7077
7097
  */
7078
7098
  url: string;
7079
7099
  /**
7080
- * Score
7100
+ * Search score
7081
7101
  */
7082
7102
  score: number;
7083
7103
  highlight: {
@@ -7101,7 +7121,7 @@ export declare type SearchResultData = {
7101
7121
  */
7102
7122
  export declare type SearchResultInstancesTargetSchema = {
7103
7123
  data: SearchResult[];
7104
- meta?: {
7124
+ meta: {
7105
7125
  total_count: number;
7106
7126
  };
7107
7127
  };
@@ -8701,6 +8721,7 @@ export declare type PublicInfoAttributes = {
8701
8721
  extras: null | {
8702
8722
  blocks_depth: number;
8703
8723
  blocks_per_item: number;
8724
+ maximum_single_upload_bytes: number;
8704
8725
  [k: string]: unknown;
8705
8726
  };
8706
8727
  };
@@ -8779,7 +8800,7 @@ export declare type DailyUsageData = {
8779
8800
  * via the `instances.targetSchema` link.
8780
8801
  */
8781
8802
  export declare type DailyUsageInstancesTargetSchema = {
8782
- data: DailyUsage;
8803
+ data: DailyUsage[];
8783
8804
  };
8784
8805
  /**
8785
8806
  * You can use counters to analyze your project's data consumption over a period of time. Counters are especially useful if your project is exceeding its API calls/traffic quota limits, to better understand where and how requests are originating. Counters are updated every minute, so you can debug in real-time the results of your changes.
@@ -8995,10 +9016,6 @@ export declare type SiteAttributes = {
8995
9016
  * Specifies the last time when a change of data occurred
8996
9017
  */
8997
9018
  last_data_change_at: null | string;
8998
- /**
8999
- * Frontend website url
9000
- */
9001
- frontend_url: string | null;
9002
9019
  /**
9003
9020
  * Specifies whether all users of this site need to authenticate using two-factor authentication
9004
9021
  */
@@ -9091,48 +9108,12 @@ export declare type SiteRelationships = {
9091
9108
  account: {
9092
9109
  data: AccountData;
9093
9110
  };
9094
- build_triggers?: {
9095
- /**
9096
- * The list of build trigger
9097
- */
9098
- data: BuildTriggerData[];
9099
- };
9100
- menu_items: {
9101
- /**
9102
- * The list of site menu items
9103
- */
9104
- data: MenuItemData[];
9105
- };
9106
- sso_users: {
9107
- /**
9108
- * The list of site SSO users
9109
- */
9110
- data: SsoUserData[];
9111
- };
9112
- users: {
9113
- /**
9114
- * The list of site users
9115
- */
9116
- data: UserData[];
9117
- };
9118
9111
  item_types: {
9119
9112
  /**
9120
- * The list of site item types
9113
+ * The list item types for the site
9121
9114
  */
9122
9115
  data: ItemTypeData[];
9123
9116
  };
9124
- sso_default_role?: {
9125
- /**
9126
- * Specifies the default role for newly created identity providers users
9127
- */
9128
- data: RoleData[];
9129
- };
9130
- roles: {
9131
- /**
9132
- * The list of site roles
9133
- */
9134
- data: RoleData[];
9135
- };
9136
9117
  };
9137
9118
  /**
9138
9119
  * Meta attributes
@@ -9162,7 +9143,7 @@ export declare type SiteData = {
9162
9143
  */
9163
9144
  export declare type SiteSelfTargetSchema = {
9164
9145
  data: Site;
9165
- included?: (MenuItem | User | ItemType | Role | Field | Upload | SsoUser | Fieldset | Item | Account)[];
9146
+ included?: (ItemType | Field | Upload | Fieldset | Item | Account)[];
9166
9147
  };
9167
9148
  /**
9168
9149
  * This interface was referenced by `Site`'s JSON-Schema
@@ -1006,25 +1006,37 @@ export declare type SearchResultInstancesTargetSchema = SearchResult[];
1006
1006
  */
1007
1007
  export declare type SearchResultInstancesHrefSchema = {
1008
1008
  /**
1009
- * The query string to search
1010
- */
1011
- q: string;
1012
- /**
1013
- * The build trigger ID on which the search will be performed
1014
- */
1015
- build_trigger_id?: string;
1016
- /**
1017
- * Restrict the search on one locale
1018
- */
1019
- locale?: string;
1020
- /**
1021
- * Maximum number of results to return (defaults to 20, maximum is 100)
1009
+ * Attributes to manage results pagination
1022
1010
  */
1023
- limit?: number;
1011
+ page?: {
1012
+ /**
1013
+ * Index of first element to fetch (defaults to 0)
1014
+ */
1015
+ offset?: number;
1016
+ /**
1017
+ * Number of elements to fetch (defaults to 20, maximum is 100)
1018
+ */
1019
+ limit?: number;
1020
+ [k: string]: unknown;
1021
+ };
1024
1022
  /**
1025
- * Number of records to offset for the search
1023
+ * Attributes to filter search results
1026
1024
  */
1027
- offset?: string;
1025
+ filter: {
1026
+ /**
1027
+ * Text to search
1028
+ */
1029
+ query: string;
1030
+ /**
1031
+ * The build trigger ID on which the search will be performed. Required if more than one build trigger is present in a project
1032
+ */
1033
+ build_trigger_id?: string;
1034
+ /**
1035
+ * Restrict the search on pages in a specific locale
1036
+ */
1037
+ locale?: string;
1038
+ [k: string]: unknown;
1039
+ };
1028
1040
  [k: string]: unknown;
1029
1041
  };
1030
1042
  /**
@@ -1340,6 +1352,11 @@ export declare type DailyUsageIdentity = string;
1340
1352
  * via the `definition` "type".
1341
1353
  */
1342
1354
  export declare type DailyUsageType = 'daily_usage';
1355
+ /**
1356
+ * This interface was referenced by `DailyUsage`'s JSON-Schema
1357
+ * via the `instances.targetSchema` link.
1358
+ */
1359
+ export declare type DailyUsageInstancesTargetSchema = DailyUsage[];
1343
1360
  /**
1344
1361
  * Name of the counter
1345
1362
  *
@@ -3336,6 +3353,14 @@ export declare type SitePlan = {
3336
3353
  * Whether translator roles are enabled or not
3337
3354
  */
3338
3355
  translator_roles: boolean;
3356
+ /**
3357
+ * Whether or not use a static IP when sending webhooks
3358
+ */
3359
+ static_webhooks_ip: boolean;
3360
+ /**
3361
+ * Maximum size in bytes for a single file upload
3362
+ */
3363
+ maximum_single_upload_bytes: number;
3339
3364
  /**
3340
3365
  * Available extra packets
3341
3366
  */
@@ -3552,6 +3577,14 @@ export declare type SitePlanAttributes = {
3552
3577
  * Whether translator roles are enabled or not
3553
3578
  */
3554
3579
  translator_roles: boolean;
3580
+ /**
3581
+ * Whether or not use a static IP when sending webhooks
3582
+ */
3583
+ static_webhooks_ip: boolean;
3584
+ /**
3585
+ * Maximum size in bytes for a single file upload
3586
+ */
3587
+ maximum_single_upload_bytes: number;
3555
3588
  /**
3556
3589
  * Available extra packets
3557
3590
  */
@@ -4560,7 +4593,7 @@ export declare type JobData = {
4560
4593
  * | Parameter | Type | Required | Description |
4561
4594
  * | ----------------- | ----------------------------------------- | -------- | ------------------------------ |
4562
4595
  * | `extensions` | `Array<String>` | | Set of allowed file extensions |
4563
- * | `predefined_list` | one of `"image"`, `"video"`, `"document"` | | Allowed file type |
4596
+ * | `predefined_list` | one of `"image"`, `"transformable_image"`, `"video"`, `"document"` | | Allowed file type |
4564
4597
  *
4565
4598
  * Only one of the parameters must be specified.
4566
4599
  *
@@ -7065,11 +7098,11 @@ export declare type SearchResult = {
7065
7098
  id: SearchResultIdentity;
7066
7099
  type: SearchResultType;
7067
7100
  /**
7068
- * Page title
7101
+ * Title of the page
7069
7102
  */
7070
7103
  title: string;
7071
7104
  /**
7072
- * First lines of body
7105
+ * First 200 characters of page body, unformatted
7073
7106
  */
7074
7107
  body_excerpt: string;
7075
7108
  /**
@@ -7077,7 +7110,7 @@ export declare type SearchResult = {
7077
7110
  */
7078
7111
  url: string;
7079
7112
  /**
7080
- * Score
7113
+ * Search score
7081
7114
  */
7082
7115
  score: number;
7083
7116
  highlight: {
@@ -7103,11 +7136,11 @@ export declare type SearchResultData = {
7103
7136
  */
7104
7137
  export declare type SearchResultAttributes = {
7105
7138
  /**
7106
- * Page title
7139
+ * Title of the page
7107
7140
  */
7108
7141
  title: string;
7109
7142
  /**
7110
- * First lines of body
7143
+ * First 200 characters of page body, unformatted
7111
7144
  */
7112
7145
  body_excerpt: string;
7113
7146
  /**
@@ -7115,7 +7148,7 @@ export declare type SearchResultAttributes = {
7115
7148
  */
7116
7149
  url: string;
7117
7150
  /**
7118
- * Score
7151
+ * Search score
7119
7152
  */
7120
7153
  score: number;
7121
7154
  highlight: {
@@ -8417,6 +8450,7 @@ export declare type PublicInfo = {
8417
8450
  extras: null | {
8418
8451
  blocks_depth: number;
8419
8452
  blocks_per_item: number;
8453
+ maximum_single_upload_bytes: number;
8420
8454
  [k: string]: unknown;
8421
8455
  };
8422
8456
  };
@@ -8498,6 +8532,7 @@ export declare type PublicInfoAttributes = {
8498
8532
  extras: null | {
8499
8533
  blocks_depth: number;
8500
8534
  blocks_per_item: number;
8535
+ maximum_single_upload_bytes: number;
8501
8536
  [k: string]: unknown;
8502
8537
  };
8503
8538
  };
@@ -8535,7 +8570,6 @@ export declare type DailyUsage = {
8535
8570
  */
8536
8571
  mux_delivered_seconds: number;
8537
8572
  };
8538
- export declare type DailyUsageInstancesTargetSchema = DailyUsage;
8539
8573
  /**
8540
8574
  * JSON API data
8541
8575
  *
@@ -8760,10 +8794,6 @@ export declare type Site = {
8760
8794
  * Specifies the last time when a change of data occurred
8761
8795
  */
8762
8796
  last_data_change_at: null | string;
8763
- /**
8764
- * Frontend website url
8765
- */
8766
- frontend_url: string | null;
8767
8797
  /**
8768
8798
  * Specifies whether all users of this site need to authenticate using two-factor authentication
8769
8799
  */
@@ -8847,33 +8877,9 @@ export declare type Site = {
8847
8877
  } | null;
8848
8878
  account: AccountData;
8849
8879
  /**
8850
- * The list of build trigger
8851
- */
8852
- build_triggers?: BuildTriggerData[];
8853
- /**
8854
- * The list of site menu items
8855
- */
8856
- menu_items: MenuItemData[];
8857
- /**
8858
- * The list of site SSO users
8859
- */
8860
- sso_users: SsoUserData[];
8861
- /**
8862
- * The list of site users
8863
- */
8864
- users: UserData[];
8865
- /**
8866
- * The list of site item types
8880
+ * The list item types for the site
8867
8881
  */
8868
8882
  item_types: ItemTypeData[];
8869
- /**
8870
- * Specifies the default role for newly created identity providers users
8871
- */
8872
- sso_default_role?: RoleData[];
8873
- /**
8874
- * The list of site roles
8875
- */
8876
- roles: RoleData[];
8877
8883
  meta: SiteMeta;
8878
8884
  };
8879
8885
  export declare type SiteSelfTargetSchema = Site;
@@ -8948,10 +8954,6 @@ export declare type SiteAttributes = {
8948
8954
  * Specifies the last time when a change of data occurred
8949
8955
  */
8950
8956
  last_data_change_at: null | string;
8951
- /**
8952
- * Frontend website url
8953
- */
8954
- frontend_url: string | null;
8955
8957
  /**
8956
8958
  * Specifies whether all users of this site need to authenticate using two-factor authentication
8957
8959
  */
@@ -9043,33 +9045,9 @@ export declare type SiteAttributes = {
9043
9045
  export declare type SiteRelationships = {
9044
9046
  account: AccountData;
9045
9047
  /**
9046
- * The list of build trigger
9047
- */
9048
- build_triggers?: BuildTriggerData[];
9049
- /**
9050
- * The list of site menu items
9051
- */
9052
- menu_items: MenuItemData[];
9053
- /**
9054
- * The list of site SSO users
9055
- */
9056
- sso_users: SsoUserData[];
9057
- /**
9058
- * The list of site users
9059
- */
9060
- users: UserData[];
9061
- /**
9062
- * The list of site item types
9048
+ * The list item types for the site
9063
9049
  */
9064
9050
  item_types: ItemTypeData[];
9065
- /**
9066
- * Specifies the default role for newly created identity providers users
9067
- */
9068
- sso_default_role?: RoleData[];
9069
- /**
9070
- * The list of site roles
9071
- */
9072
- roles: RoleData[];
9073
9051
  };
9074
9052
  /**
9075
9053
  * This interface was referenced by `Site`'s JSON-Schema
@@ -8,7 +8,7 @@ export default class DailyUsage extends BaseResource {
8
8
  *
9
9
  * Read more: https://www.datocms.com/docs/content-management-api/resources/daily-usage/instances
10
10
  */
11
- list(): Promise<SimpleSchemaTypes.DailyUsage>;
11
+ list(): Promise<SimpleSchemaTypes.DailyUsageInstancesTargetSchema>;
12
12
  /**
13
13
  * Retrieve project's daily usage info
14
14
  *
@@ -139,7 +139,7 @@ export default class Item extends BaseResource {
139
139
  *
140
140
  * @deprecated This API call is to be considered private and might change without notice
141
141
  */
142
- batchDestroy(queryParams?: SimpleSchemaTypes.ItemBatchDestroyHrefSchema): Promise<SimpleSchemaTypes.ItemBatchDestroyJobSchema>;
142
+ batchDestroy(queryParams: SimpleSchemaTypes.ItemBatchDestroyHrefSchema): Promise<SimpleSchemaTypes.ItemBatchDestroyJobSchema>;
143
143
  /**
144
144
  * Delete multiple records
145
145
  *
@@ -147,7 +147,7 @@ export default class Item extends BaseResource {
147
147
  *
148
148
  * @deprecated This API call is to be considered private and might change without notice
149
149
  */
150
- rawBatchDestroy(queryParams?: SchemaTypes.ItemBatchDestroyHrefSchema): Promise<SchemaTypes.ItemBatchDestroyJobSchema>;
150
+ rawBatchDestroy(queryParams: SchemaTypes.ItemBatchDestroyHrefSchema): Promise<SchemaTypes.ItemBatchDestroyJobSchema>;
151
151
  /**
152
152
  * Publish multiple records
153
153
  *
@@ -155,7 +155,7 @@ export default class Item extends BaseResource {
155
155
  *
156
156
  * @deprecated This API call is to be considered private and might change without notice
157
157
  */
158
- batchPublish(queryParams?: SimpleSchemaTypes.ItemBatchPublishHrefSchema): Promise<SimpleSchemaTypes.ItemBatchPublishJobSchema>;
158
+ batchPublish(queryParams: SimpleSchemaTypes.ItemBatchPublishHrefSchema): Promise<SimpleSchemaTypes.ItemBatchPublishJobSchema>;
159
159
  /**
160
160
  * Publish multiple records
161
161
  *
@@ -163,7 +163,7 @@ export default class Item extends BaseResource {
163
163
  *
164
164
  * @deprecated This API call is to be considered private and might change without notice
165
165
  */
166
- rawBatchPublish(queryParams?: SchemaTypes.ItemBatchPublishHrefSchema): Promise<SchemaTypes.ItemBatchPublishJobSchema>;
166
+ rawBatchPublish(queryParams: SchemaTypes.ItemBatchPublishHrefSchema): Promise<SchemaTypes.ItemBatchPublishJobSchema>;
167
167
  /**
168
168
  * Unpublish multiple records
169
169
  *
@@ -171,7 +171,7 @@ export default class Item extends BaseResource {
171
171
  *
172
172
  * @deprecated This API call is to be considered private and might change without notice
173
173
  */
174
- batchUnpublish(queryParams?: SimpleSchemaTypes.ItemBatchUnpublishHrefSchema): Promise<SimpleSchemaTypes.ItemBatchUnpublishJobSchema>;
174
+ batchUnpublish(queryParams: SimpleSchemaTypes.ItemBatchUnpublishHrefSchema): Promise<SimpleSchemaTypes.ItemBatchUnpublishJobSchema>;
175
175
  /**
176
176
  * Unpublish multiple records
177
177
  *
@@ -179,7 +179,7 @@ export default class Item extends BaseResource {
179
179
  *
180
180
  * @deprecated This API call is to be considered private and might change without notice
181
181
  */
182
- rawBatchUnpublish(queryParams?: SchemaTypes.ItemBatchUnpublishHrefSchema): Promise<SchemaTypes.ItemBatchUnpublishJobSchema>;
182
+ rawBatchUnpublish(queryParams: SchemaTypes.ItemBatchUnpublishHrefSchema): Promise<SchemaTypes.ItemBatchUnpublishJobSchema>;
183
183
  /**
184
184
  * Publish a record
185
185
  *
@@ -1,3 +1,4 @@
1
+ import * as Utils from '@datocms/rest-client-utils';
1
2
  import * as SchemaTypes from '../SchemaTypes';
2
3
  import * as SimpleSchemaTypes from '../SimpleSchemaTypes';
3
4
  import BaseResource from '../../BaseResource';
@@ -8,11 +9,23 @@ export default class SearchResult extends BaseResource {
8
9
  *
9
10
  * Read more: https://www.datocms.com/docs/content-management-api/resources/search-result/instances
10
11
  */
11
- list(queryParams?: SimpleSchemaTypes.SearchResultInstancesHrefSchema): Promise<SimpleSchemaTypes.SearchResultInstancesTargetSchema>;
12
+ list(queryParams: SimpleSchemaTypes.SearchResultInstancesHrefSchema): Promise<SimpleSchemaTypes.SearchResultInstancesTargetSchema>;
12
13
  /**
13
14
  * Search for results
14
15
  *
15
16
  * Read more: https://www.datocms.com/docs/content-management-api/resources/search-result/instances
16
17
  */
17
- rawList(queryParams?: SchemaTypes.SearchResultInstancesHrefSchema): Promise<SchemaTypes.SearchResultInstancesTargetSchema>;
18
+ rawList(queryParams: SchemaTypes.SearchResultInstancesHrefSchema): Promise<SchemaTypes.SearchResultInstancesTargetSchema>;
19
+ /**
20
+ * Async iterator to auto-paginate over elements returned by list()
21
+ *
22
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/search-result/instances
23
+ */
24
+ listPagedIterator(queryParams: SimpleSchemaTypes.SearchResultInstancesHrefSchema, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<SimpleSchemaTypes.SearchResult, void, unknown>;
25
+ /**
26
+ * Async iterator to auto-paginate over elements returned by rawList()
27
+ *
28
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/search-result/instances
29
+ */
30
+ rawListPagedIterator(queryParams: SchemaTypes.SearchResultInstancesHrefSchema, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<SchemaTypes.SearchResult, void, unknown>;
18
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datocms/cma-client",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "JS client for DatoCMS REST Content Management API",
5
5
  "keywords": [
6
6
  "datocms",
@@ -37,10 +37,10 @@
37
37
  "url": "https://github.com/datocms/js-rest-api-clients/issues"
38
38
  },
39
39
  "dependencies": {
40
- "@datocms/rest-client-utils": "^1.0.0"
40
+ "@datocms/rest-client-utils": "^1.1.1"
41
41
  },
42
42
  "devDependencies": {
43
- "@datocms/dashboard-client": "^1.0.0"
43
+ "@datocms/dashboard-client": "^1.1.1"
44
44
  },
45
- "gitHead": "7972ee65694bd9e6eb5579fa6c32aa630092ce7c"
45
+ "gitHead": "d3b88053a1500682a3d679622975b3da7fe6aff5"
46
46
  }
package/resources.json CHANGED
@@ -728,6 +728,10 @@
728
728
  {
729
729
  "rel": "instances",
730
730
  "returnsCollection": true,
731
+ "paginatedResponse": {
732
+ "defaultLimit": 20,
733
+ "maxLimit": 100
734
+ },
731
735
  "name": "list",
732
736
  "rawName": "rawList"
733
737
  }