@inneropen/marvin-sdk 1.0.0 → 1.0.3
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 +10 -6
- package/dist/index.js +10 -6
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
|
@@ -242,11 +242,12 @@ var init_entries = __esm({
|
|
|
242
242
|
entry_type: options.entryType,
|
|
243
243
|
collection: options.collection,
|
|
244
244
|
limit: options.limit,
|
|
245
|
-
offset: options.offset
|
|
246
|
-
|
|
245
|
+
offset: options.offset
|
|
246
|
+
// Don't send status - backend always returns published
|
|
247
247
|
});
|
|
248
248
|
const endpoint = `/api/publish/${this.workspaceSlug}/entries${queryString}`;
|
|
249
|
-
|
|
249
|
+
const response = await this.http.fetch(endpoint);
|
|
250
|
+
return response.data || [];
|
|
250
251
|
}
|
|
251
252
|
/**
|
|
252
253
|
* Get a single entry by slug
|
|
@@ -373,7 +374,8 @@ var init_collections = __esm({
|
|
|
373
374
|
*/
|
|
374
375
|
async list() {
|
|
375
376
|
const endpoint = `/api/publish/${this.workspaceSlug}/collections`;
|
|
376
|
-
|
|
377
|
+
const response = await this.http.fetch(endpoint);
|
|
378
|
+
return response.data || [];
|
|
377
379
|
}
|
|
378
380
|
/**
|
|
379
381
|
* Get a single collection by slug
|
|
@@ -416,7 +418,8 @@ var init_assets = __esm({
|
|
|
416
418
|
offset: options.offset
|
|
417
419
|
});
|
|
418
420
|
const endpoint = `/api/publish/${this.workspaceSlug}/assets${queryString}`;
|
|
419
|
-
|
|
421
|
+
const response = await this.http.fetch(endpoint);
|
|
422
|
+
return response.data || [];
|
|
420
423
|
}
|
|
421
424
|
/**
|
|
422
425
|
* Convenience: Get all images
|
|
@@ -531,7 +534,8 @@ var init_resources = __esm({
|
|
|
531
534
|
offset: options.offset
|
|
532
535
|
});
|
|
533
536
|
const endpoint = `/api/publish/${this.workspaceSlug}/resources${queryString}`;
|
|
534
|
-
|
|
537
|
+
const response = await this.http.fetch(endpoint);
|
|
538
|
+
return response.data || [];
|
|
535
539
|
}
|
|
536
540
|
/**
|
|
537
541
|
* Get a single resource by slug
|
package/dist/index.js
CHANGED
|
@@ -241,11 +241,12 @@ var init_entries = __esm({
|
|
|
241
241
|
entry_type: options.entryType,
|
|
242
242
|
collection: options.collection,
|
|
243
243
|
limit: options.limit,
|
|
244
|
-
offset: options.offset
|
|
245
|
-
|
|
244
|
+
offset: options.offset
|
|
245
|
+
// Don't send status - backend always returns published
|
|
246
246
|
});
|
|
247
247
|
const endpoint = `/api/publish/${this.workspaceSlug}/entries${queryString}`;
|
|
248
|
-
|
|
248
|
+
const response = await this.http.fetch(endpoint);
|
|
249
|
+
return response.data || [];
|
|
249
250
|
}
|
|
250
251
|
/**
|
|
251
252
|
* Get a single entry by slug
|
|
@@ -372,7 +373,8 @@ var init_collections = __esm({
|
|
|
372
373
|
*/
|
|
373
374
|
async list() {
|
|
374
375
|
const endpoint = `/api/publish/${this.workspaceSlug}/collections`;
|
|
375
|
-
|
|
376
|
+
const response = await this.http.fetch(endpoint);
|
|
377
|
+
return response.data || [];
|
|
376
378
|
}
|
|
377
379
|
/**
|
|
378
380
|
* Get a single collection by slug
|
|
@@ -415,7 +417,8 @@ var init_assets = __esm({
|
|
|
415
417
|
offset: options.offset
|
|
416
418
|
});
|
|
417
419
|
const endpoint = `/api/publish/${this.workspaceSlug}/assets${queryString}`;
|
|
418
|
-
|
|
420
|
+
const response = await this.http.fetch(endpoint);
|
|
421
|
+
return response.data || [];
|
|
419
422
|
}
|
|
420
423
|
/**
|
|
421
424
|
* Convenience: Get all images
|
|
@@ -530,7 +533,8 @@ var init_resources = __esm({
|
|
|
530
533
|
offset: options.offset
|
|
531
534
|
});
|
|
532
535
|
const endpoint = `/api/publish/${this.workspaceSlug}/resources${queryString}`;
|
|
533
|
-
|
|
536
|
+
const response = await this.http.fetch(endpoint);
|
|
537
|
+
return response.data || [];
|
|
534
538
|
}
|
|
535
539
|
/**
|
|
536
540
|
* Get a single resource by slug
|
package/package.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inneropen/marvin-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Official TypeScript SDK for Marvin CMS",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./dist/index.
|
|
7
|
-
"module": "./dist/index.
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
|
-
"import": "./dist/index.
|
|
13
|
-
"require": "./dist/index.
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
14
|
},
|
|
15
15
|
"./publish": {
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
17
|
-
"import": "./dist/index.
|
|
18
|
-
"require": "./dist/index.
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"require": "./dist/index.cjs"
|
|
19
19
|
},
|
|
20
20
|
"./types": {
|
|
21
21
|
"types": "./dist/types/index.d.ts",
|
|
22
|
-
"import": "./dist/types/index.
|
|
23
|
-
"require": "./dist/types/index.
|
|
22
|
+
"import": "./dist/types/index.js",
|
|
23
|
+
"require": "./dist/types/index.cjs"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"files": [
|