arky-sdk 0.3.68 → 0.3.69
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 +13 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -12
- package/dist/index.js.map +1 -1
- package/dist/types.d.cts +6 -3
- package/dist/types.d.ts +6 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -772,48 +772,49 @@ var createCmsApi = (apiConfig) => {
|
|
|
772
772
|
);
|
|
773
773
|
},
|
|
774
774
|
// ===== ENTRIES =====
|
|
775
|
-
// Note: Backend uses /entries NOT /collections/{id}/entries
|
|
776
775
|
async getCollectionEntries(params, options) {
|
|
776
|
+
const { collectionId, ...queryParams } = params;
|
|
777
777
|
return apiConfig.httpClient.get(
|
|
778
|
-
`/v1/businesses/${apiConfig.businessId}/entries`,
|
|
778
|
+
`/v1/businesses/${apiConfig.businessId}/collections/${collectionId}/entries`,
|
|
779
779
|
{
|
|
780
780
|
...options,
|
|
781
|
-
params
|
|
781
|
+
params: queryParams
|
|
782
782
|
}
|
|
783
783
|
);
|
|
784
784
|
},
|
|
785
785
|
async createCollectionEntry(params, options) {
|
|
786
|
+
const { collectionId, ...payload } = params;
|
|
786
787
|
return apiConfig.httpClient.post(
|
|
787
|
-
`/v1/businesses/${apiConfig.businessId}/entries`,
|
|
788
|
-
|
|
788
|
+
`/v1/businesses/${apiConfig.businessId}/collections/${collectionId}/entries`,
|
|
789
|
+
{ ...payload, collectionId },
|
|
789
790
|
options
|
|
790
791
|
);
|
|
791
792
|
},
|
|
792
793
|
async updateCollectionEntry(params, options) {
|
|
793
|
-
const { id, ...payload } = params;
|
|
794
|
+
const { collectionId, id, ...payload } = params;
|
|
794
795
|
return apiConfig.httpClient.put(
|
|
795
|
-
`/v1/businesses/${apiConfig.businessId}/entries/${id}`,
|
|
796
|
-
payload,
|
|
796
|
+
`/v1/businesses/${apiConfig.businessId}/collections/${collectionId}/entries/${id}`,
|
|
797
|
+
{ ...payload, collectionId },
|
|
797
798
|
options
|
|
798
799
|
);
|
|
799
800
|
},
|
|
800
801
|
async deleteCollectionEntry(params, options) {
|
|
801
802
|
return apiConfig.httpClient.delete(
|
|
802
|
-
`/v1/businesses/${apiConfig.businessId}/entries/${params.id}`,
|
|
803
|
+
`/v1/businesses/${apiConfig.businessId}/collections/${params.collectionId}/entries/${params.id}`,
|
|
803
804
|
options
|
|
804
805
|
);
|
|
805
806
|
},
|
|
806
807
|
async getCollectionEntry(params, options) {
|
|
807
808
|
const formattedId = formatIdOrSlug(params.id, apiConfig);
|
|
808
809
|
return apiConfig.httpClient.get(
|
|
809
|
-
`/v1/businesses/${apiConfig.businessId}/entries/${formattedId}`,
|
|
810
|
+
`/v1/businesses/${apiConfig.businessId}/collections/${params.collectionId}/entries/${formattedId}`,
|
|
810
811
|
options
|
|
811
812
|
);
|
|
812
813
|
},
|
|
813
814
|
async sendEntry(params, options) {
|
|
814
|
-
const { entryId, scheduledAt } = params;
|
|
815
|
+
const { collectionId, entryId, scheduledAt } = params;
|
|
815
816
|
return apiConfig.httpClient.post(
|
|
816
|
-
`/v1/businesses/${apiConfig.businessId}/entries/${entryId}/send`,
|
|
817
|
+
`/v1/businesses/${apiConfig.businessId}/collections/${collectionId}/entries/${entryId}/send`,
|
|
817
818
|
{
|
|
818
819
|
businessId: apiConfig.businessId,
|
|
819
820
|
entryId,
|