@walde.ai/walde-sdk 0.1.0 → 0.1.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 CHANGED
@@ -5,7 +5,7 @@ performant online content.
5
5
 
6
6
  ## Installation
7
7
  ```bash
8
- npm install @walde.ai/walde-sdk
8
+ npm i @walde.ai/walde-sdk
9
9
  ```
10
10
 
11
11
  ## Quick Start
@@ -28,19 +28,41 @@ const walde = MakeWalde({
28
28
  Once you have your instance defined, you can chain methods to fetch the content you want.
29
29
  ```ts
30
30
  // Get one content
31
- const byKey = await walde.contents().key('my/content/key').locale('en-us').resolve();
32
- const byId = await walde.contents().id('my-content-id').locale('en-us').resolve();
33
- const byName = await walde.contents().name('My Content Name').locale('en-us').resolve();
31
+ const byKey = await walde
32
+ .contents()
33
+ .key('my/content/key')
34
+ .locale('en-us')
35
+ .resolve();
36
+ ```
37
+ Other ways to get content.
38
+ ```ts
39
+ const byId = await walde
40
+ .contents()
41
+ .id('my-content-id')
42
+ .locale('en-us')
43
+ .resolve();
44
+
45
+ const byName = await walde
46
+ .contents()
47
+ .name('My Content Name')
48
+ .locale('en-us')
49
+ .resolve();
34
50
 
35
51
  // List all content in the site
36
- const all = await walde.contents().list().resolve();
52
+ const all = await walde
53
+ .contents()
54
+ .list()
55
+ .resolve();
37
56
  ```
38
57
 
39
58
  Note that you can chain all the methods you want inexpensively. The asynchronous backend calls
40
59
  happens only when you run the `resolve()` method.
41
60
  ```ts
42
61
  // This is not loading anything yet
43
- const query = walde.contents().key('my/content/key').locale('en-us');
62
+ const query = walde
63
+ .contents()
64
+ .key('my/content/key')
65
+ .locale('en-us');
44
66
 
45
67
  // This actually performs the backend call
46
68
  const result = await query.resolve();
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './sdk';
2
- export * from './std';
1
+ export * from './sdk/index.js';
2
+ export * from './std/index.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,OAAO,CAAC;AAGtB,cAAc,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAG/B,cAAc,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // Re-export everything from SDK
2
- export * from './sdk';
2
+ export * from './sdk/index.js';
3
3
  // Re-export STD utilities
4
- export * from './std';
4
+ export * from './std/index.js';
5
5
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,cAAc,OAAO,CAAC;AAEtB,0BAA0B;AAC1B,cAAc,OAAO,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,cAAc,gBAAgB,CAAC;AAE/B,0BAA0B;AAC1B,cAAc,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@walde.ai/walde-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "TypeScript SDK for Walde platform",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,7 +25,6 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "amazon-cognito-identity-js": "^6.3.12",
28
- "aws-sdk": "^2.1691.0",
29
28
  "@aws-sdk/client-s3": "^3.0.0",
30
29
  "@aws-sdk/client-cognito-identity-provider": "^3.0.0",
31
30
  "gray-matter": "^4.0.3"