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