@foxnose/sdk 0.5.0 → 0.5.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.
- package/README.md +9 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,6 +52,15 @@ const client = new ManagementClient({
|
|
|
52
52
|
const collections = await client.listCollections();
|
|
53
53
|
console.log(collections.results);
|
|
54
54
|
|
|
55
|
+
// Create a public API
|
|
56
|
+
const api = await client.createApi({
|
|
57
|
+
name: 'Storefront',
|
|
58
|
+
prefix: 'shop',
|
|
59
|
+
is_auth_required: false,
|
|
60
|
+
cors_origins: ['*'], // browser CORS for public APIs (reads only)
|
|
61
|
+
});
|
|
62
|
+
console.log(api.key);
|
|
63
|
+
|
|
55
64
|
// Create a resource
|
|
56
65
|
const resource = await client.createResource('my-collection-key', {
|
|
57
66
|
data: { title: 'Hello World' },
|
package/dist/index.cjs
CHANGED
|
@@ -362,7 +362,7 @@ var DEFAULT_RETRY_CONFIG = {
|
|
|
362
362
|
statusCodes: [408, 425, 429, 500, 502, 503, 504],
|
|
363
363
|
methods: ["GET", "HEAD", "OPTIONS", "PUT", "DELETE"]
|
|
364
364
|
};
|
|
365
|
-
var SDK_VERSION = "0.5.
|
|
365
|
+
var SDK_VERSION = "0.5.1";
|
|
366
366
|
var DEFAULT_USER_AGENT = `foxnose-sdk-js/${SDK_VERSION}`;
|
|
367
367
|
function createConfig(options) {
|
|
368
368
|
if (!options.baseUrl) {
|