@dimo-network/data-sdk 1.2.2 → 1.2.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/.github/workflows/npm-publish.yml +12 -4
- package/README.md +7 -0
- package/dist/api/Method.d.ts +1 -1
- package/dist/graphql/Query.d.ts +1 -1
- package/dist/index.cjs +143085 -0
- package/package.json +16 -3
- package/rollup.config.js +28 -0
|
@@ -15,8 +15,12 @@ jobs:
|
|
|
15
15
|
- uses: actions/setup-node@v3
|
|
16
16
|
with:
|
|
17
17
|
node-version: 20
|
|
18
|
-
-
|
|
19
|
-
|
|
18
|
+
- name: Clear npm cache
|
|
19
|
+
run: npm cache clean --force
|
|
20
|
+
- name: Install dependencies
|
|
21
|
+
run: npm ci
|
|
22
|
+
- name: Run tests
|
|
23
|
+
run: npm test
|
|
20
24
|
- name: Run build
|
|
21
25
|
run: npm run build
|
|
22
26
|
- name: Check dist directory
|
|
@@ -31,8 +35,12 @@ jobs:
|
|
|
31
35
|
with:
|
|
32
36
|
node-version: 20
|
|
33
37
|
registry-url: https://registry.npmjs.org/
|
|
34
|
-
-
|
|
35
|
-
|
|
38
|
+
- name: Clear npm cache
|
|
39
|
+
run: npm cache clean --force
|
|
40
|
+
- name: Install dependencies
|
|
41
|
+
run: npm ci
|
|
42
|
+
- name: Run tests
|
|
43
|
+
run: npm test
|
|
36
44
|
- name: Run build
|
|
37
45
|
run: npm run build
|
|
38
46
|
- name: Check dist directory
|
package/README.md
CHANGED
|
@@ -29,10 +29,17 @@ Please visit the DIMO [Developer Documentation](https://docs.dimo.org/developer-
|
|
|
29
29
|
## How to Use the SDK
|
|
30
30
|
|
|
31
31
|
Import the SDK library:
|
|
32
|
+
|
|
33
|
+
(TypeScript / ES Modules)
|
|
32
34
|
```ts
|
|
33
35
|
import { DIMO } from '@dimo-network/data-sdk';
|
|
34
36
|
```
|
|
35
37
|
|
|
38
|
+
(CommonJS)
|
|
39
|
+
```js
|
|
40
|
+
const { DIMO } = require('@dimo-network/data-sdk/dist/index.cjs')
|
|
41
|
+
```
|
|
42
|
+
|
|
36
43
|
Initiate the SDK:
|
|
37
44
|
|
|
38
45
|
```ts
|
package/dist/api/Method.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DimoEnvironment } from '../environments';
|
|
2
|
-
export declare const Method: (resource: any, baseUrl: any, params: any, env: keyof typeof DimoEnvironment) => Promise<any>;
|
|
2
|
+
export declare const Method: (resource: any, baseUrl: any, params: any | undefined, env: keyof typeof DimoEnvironment) => Promise<any>;
|
package/dist/graphql/Query.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DimoEnvironment } from '../environments';
|
|
2
|
-
export declare const Query: (resource: any, baseUrl: any, params: any, env: keyof typeof DimoEnvironment) => Promise<any>;
|
|
2
|
+
export declare const Query: (resource: any, baseUrl: any, params: any | undefined, env: keyof typeof DimoEnvironment) => Promise<any>;
|
|
3
3
|
export declare const CustomQuery: (resource: any, baseUrl: string, params?: any) => Promise<any>;
|