derived-sdk 0.0.3 → 0.0.4
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/http.service.d.ts +13 -0
- package/dist/http.service.d.ts.map +1 -0
- package/dist/main.d.ts +11 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/types.d.ts +21 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TDerivedApiResponse } from "./types";
|
|
2
|
+
export declare class HttpService {
|
|
3
|
+
private baseUrl;
|
|
4
|
+
private defaultHeaders;
|
|
5
|
+
constructor(baseUrl: string, defaultHeaders?: Record<string, string>);
|
|
6
|
+
private buildUrl;
|
|
7
|
+
private request;
|
|
8
|
+
get<T>(path: string, headers?: Record<string, string>): Promise<TDerivedApiResponse<T>>;
|
|
9
|
+
post<T>(path: string, body?: any, headers?: Record<string, string>): Promise<TDerivedApiResponse<T>>;
|
|
10
|
+
put<T>(path: string, body?: any, headers?: Record<string, string>): Promise<TDerivedApiResponse<T>>;
|
|
11
|
+
delete<T>(path: string, headers?: Record<string, string>): Promise<TDerivedApiResponse<T>>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=http.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.service.d.ts","sourceRoot":"","sources":["../src/http.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,qBAAa,WAAW;IACtB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,cAAc,CAAyB;gBAEnC,OAAO,EAAE,MAAM,EAAE,cAAc,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;IAKxE,OAAO,CAAC,QAAQ;YAIF,OAAO;IAiCrB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIrD,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIlE,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIjE,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAGzD"}
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Block } from "./types";
|
|
2
|
+
declare class DerivedSDK {
|
|
3
|
+
constructor();
|
|
4
|
+
fetchBlock: (blockCode: string) => Promise<import("./types").TDerivedApiResponse<Block>>;
|
|
5
|
+
getBlockInputFromUserQuery: (blockInput: string, query: string) => Promise<import("./types").TDerivedApiResponse<{
|
|
6
|
+
schema: any;
|
|
7
|
+
}>>;
|
|
8
|
+
resolveMultipleTemplates: (blockCode: string, schema: any) => Promise<import("./types").TDerivedApiResponse<any>>;
|
|
9
|
+
}
|
|
10
|
+
export default DerivedSDK;
|
|
11
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAKhC,cAAM,UAAU;;IAGZ,UAAU,GAAU,WAAW,MAAM,2DAEpC;IAED,0BAA0B,GAAU,YAAY,MAAM,EAAE,OAAO,MAAM;gBACxC,GAAG;QAC/B;IAED,wBAAwB,GAAU,WAAW,MAAM,EAAE,QAAQ,GAAG,yDAE/D;CACJ;AAED,eAAe,UAAU,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface Block {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
projectID: number;
|
|
6
|
+
createdAt: string;
|
|
7
|
+
input: Record<string, any>;
|
|
8
|
+
visibility: string;
|
|
9
|
+
setupCommands: string;
|
|
10
|
+
createdBy: number;
|
|
11
|
+
username: string;
|
|
12
|
+
blockCategoryId: number;
|
|
13
|
+
thumbnailUrl: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface TDerivedApiResponse<T> {
|
|
16
|
+
msg: string;
|
|
17
|
+
result: T;
|
|
18
|
+
status: string;
|
|
19
|
+
statusCode: number;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,CAAC,CAAA;IACT,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;CACnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "derived-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "SDK for Derived",
|
|
5
5
|
"author": "Derived",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
10
|
"main": "./dist/bundle.js",
|
|
11
|
-
"types": "./dist/
|
|
11
|
+
"types": "./dist/main.d.ts",
|
|
12
12
|
"bin": "./dist/bundle.js",
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "node build.js",
|