arky-sdk 0.3.67 → 0.3.68
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.
- package/dist/index.cjs +3 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -14
- package/dist/index.js.map +1 -1
- package/dist/types.d.cts +0 -3
- package/dist/types.d.ts +0 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -776,34 +776,23 @@ var createCmsApi = (apiConfig) => {
|
|
|
776
776
|
// ===== ENTRIES =====
|
|
777
777
|
// Note: Backend uses /entries NOT /collections/{id}/entries
|
|
778
778
|
async getCollectionEntries(params, options) {
|
|
779
|
-
const { collectionId, ...queryParams } = params;
|
|
780
|
-
const finalParams = collectionId ? { ...queryParams, owner: `collection:${collectionId}` } : queryParams;
|
|
781
779
|
return apiConfig.httpClient.get(
|
|
782
780
|
`/v1/businesses/${apiConfig.businessId}/entries`,
|
|
783
781
|
{
|
|
784
782
|
...options,
|
|
785
|
-
params
|
|
783
|
+
params
|
|
786
784
|
}
|
|
787
785
|
);
|
|
788
786
|
},
|
|
789
787
|
async createCollectionEntry(params, options) {
|
|
790
|
-
const { collectionId, owner, ...rest } = params;
|
|
791
|
-
const payload = {
|
|
792
|
-
...rest,
|
|
793
|
-
owner: owner || (collectionId ? `collection:${collectionId}` : void 0)
|
|
794
|
-
};
|
|
795
788
|
return apiConfig.httpClient.post(
|
|
796
789
|
`/v1/businesses/${apiConfig.businessId}/entries`,
|
|
797
|
-
|
|
790
|
+
params,
|
|
798
791
|
options
|
|
799
792
|
);
|
|
800
793
|
},
|
|
801
794
|
async updateCollectionEntry(params, options) {
|
|
802
|
-
const { id,
|
|
803
|
-
const payload = {
|
|
804
|
-
...rest,
|
|
805
|
-
owner: owner || (collectionId ? `collection:${collectionId}` : void 0)
|
|
806
|
-
};
|
|
795
|
+
const { id, ...payload } = params;
|
|
807
796
|
return apiConfig.httpClient.put(
|
|
808
797
|
`/v1/businesses/${apiConfig.businessId}/entries/${id}`,
|
|
809
798
|
payload,
|