@mintlify/http-client 0.0.23 → 0.0.25
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/client/baseClient.d.ts +2 -2
- package/dist/client/baseClient.d.ts.map +1 -1
- package/dist/client/baseClient.js +36 -29
- package/dist/client/baseClient.js.map +1 -1
- package/dist/client/clientError.d.ts +2 -2
- package/dist/client/clientError.d.ts.map +1 -1
- package/dist/client/clientError.js +32 -26
- package/dist/client/clientError.js.map +1 -1
- package/dist/client/index.d.ts +4 -4
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +3 -7
- package/dist/client/index.js.map +1 -1
- package/dist/client/interfaces.d.ts +1 -1
- package/dist/client/interfaces.d.ts.map +1 -1
- package/dist/client/interfaces.js +1 -2
- package/dist/client/types.js +1 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -18
- package/dist/index.js.map +1 -1
- package/dist/leaves-client/constants.d.ts +1 -1
- package/dist/leaves-client/constants.d.ts.map +1 -1
- package/dist/leaves-client/constants.js +16 -19
- package/dist/leaves-client/constants.js.map +1 -1
- package/dist/leaves-client/index.d.ts +3 -3
- package/dist/leaves-client/index.d.ts.map +1 -1
- package/dist/leaves-client/index.js +3 -23
- package/dist/leaves-client/index.js.map +1 -1
- package/dist/leaves-client/interfaces.d.ts +1 -1
- package/dist/leaves-client/interfaces.d.ts.map +1 -1
- package/dist/leaves-client/interfaces.js +1 -2
- package/dist/leaves-client/leavesClient.d.ts +1 -1
- package/dist/leaves-client/leavesClient.d.ts.map +1 -1
- package/dist/leaves-client/leavesClient.js +20 -30
- package/dist/leaves-client/leavesClient.js.map +1 -1
- package/dist/leaves-client/types.js +1 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +9 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IBaseClient } from './interfaces';
|
|
2
|
-
import { HttpMethods, QueryType, RequestInitType } from './types';
|
|
1
|
+
import { IBaseClient } from './interfaces.js';
|
|
2
|
+
import { HttpMethods, QueryType, RequestInitType } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* BaseClient serves as the base class for API clients.
|
|
5
5
|
* Provides basic functionalities for making HTTP requests to a server.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseClient.d.ts","sourceRoot":"","sources":["../../src/client/baseClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"baseClient.d.ts","sourceRoot":"","sources":["../../src/client/baseClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAErE;;;GAGG;AACH,8BAAsB,UAAW,YAAW,WAAW;IAMnD,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS;IANrD;;;OAGG;IACH,SAAS,aACE,IAAI,EAAE,MAAM,EACF,OAAO,GAAE,WAAW,GAAG,SAAqB;IAG3D,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,WAAW;;;;;IAgB/D,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;IAI/E,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;IAI/E,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIlF,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;IAI1E,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,WAAW;IAKxD,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC;IAKvF,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,eAAe;IAKzF;;;;OAIG;IACH,OAAO,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE;IAI1B;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM;IAInB;;;;;;OAMG;IACH,SAAS,CAAC,UAAU,CAAC,EACnB,GAAG,EACH,GAAG,EACH,GAAG,GACJ,EAAE;QACD,GAAG,EAAE,WAAW,CAAC;QACjB,GAAG,EAAE,QAAQ,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;KACb,GAAG,OAAO,CAAC,MAAM,CAAC;IAInB;;;;;;OAMG;IACH,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,EACtB,GAAG,EACH,GAAG,EACH,GAAG,GACJ,EAAE;QACD,GAAG,EAAE,WAAW,CAAC;QACjB,GAAG,EAAE,QAAQ,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;KACb,GAAG,OAAO,CAAC,CAAC,CAAC;CAIf"}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { handleJson, handleText } from './clientError.js';
|
|
5
11
|
/**
|
|
6
12
|
* BaseClient serves as the base class for API clients.
|
|
7
13
|
* Provides basic functionalities for making HTTP requests to a server.
|
|
8
14
|
*/
|
|
9
|
-
class BaseClient {
|
|
15
|
+
export class BaseClient {
|
|
10
16
|
/**
|
|
11
17
|
* @param host - The server's address.
|
|
12
18
|
* @param reqInit - Optional default request initializer.
|
|
@@ -15,18 +21,14 @@ class BaseClient {
|
|
|
15
21
|
this.host = host;
|
|
16
22
|
this.reqInit = reqInit;
|
|
17
23
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
let uri = this.getUri(path);
|
|
28
|
-
uri = query ? `${uri}?${new URLSearchParams(query)}` : uri;
|
|
29
|
-
return { uri, res: await fetch(uri, req), req };
|
|
24
|
+
fetch(path, query, init) {
|
|
25
|
+
var _a;
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
const req = Object.assign(Object.assign(Object.assign({}, this.reqInit), init), { headers: Object.assign(Object.assign({}, (_a = this.reqInit) === null || _a === void 0 ? void 0 : _a.headers), init === null || init === void 0 ? void 0 : init.headers) });
|
|
28
|
+
let uri = this.getUri(path);
|
|
29
|
+
uri = query ? `${uri}?${new URLSearchParams(query)}` : uri;
|
|
30
|
+
return { uri, res: yield fetch(uri, req), req };
|
|
31
|
+
});
|
|
30
32
|
}
|
|
31
33
|
get(path, query, init) {
|
|
32
34
|
return this.method('get', path, query, init);
|
|
@@ -40,17 +42,23 @@ class BaseClient {
|
|
|
40
42
|
post(path, query, init) {
|
|
41
43
|
return this.method('post', path, query, init);
|
|
42
44
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
text(path, query, init) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
const result = yield this.fetch(path, query, init);
|
|
48
|
+
return this.handleText(result);
|
|
49
|
+
});
|
|
46
50
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
json(path, query, init) {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const result = yield this.fetch(path, query, init);
|
|
54
|
+
return this.handleJson(result);
|
|
55
|
+
});
|
|
50
56
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
method(method, path, query, init) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const result = yield this.fetch(path, query, Object.assign(Object.assign({}, init), { method }));
|
|
60
|
+
return result.res;
|
|
61
|
+
});
|
|
54
62
|
}
|
|
55
63
|
/**
|
|
56
64
|
* Constructs a URI path by joining URI components.
|
|
@@ -76,7 +84,7 @@ class BaseClient {
|
|
|
76
84
|
* @returns Promise that resolves with the text data.
|
|
77
85
|
*/
|
|
78
86
|
handleText({ req, res, uri, }) {
|
|
79
|
-
return
|
|
87
|
+
return handleText.bind(this)(req, res, uri);
|
|
80
88
|
}
|
|
81
89
|
/**
|
|
82
90
|
* Handles JSON responses from the server.
|
|
@@ -86,9 +94,8 @@ class BaseClient {
|
|
|
86
94
|
* @returns Promise that resolves with the JSON data.
|
|
87
95
|
*/
|
|
88
96
|
handleJson({ req, res, uri, }) {
|
|
89
|
-
const handle = (
|
|
97
|
+
const handle = (handleJson);
|
|
90
98
|
return handle.bind(this)(req, res, uri);
|
|
91
99
|
}
|
|
92
100
|
}
|
|
93
|
-
exports.BaseClient = BaseClient;
|
|
94
101
|
//# sourceMappingURL=baseClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseClient.js","sourceRoot":"","sources":["../../src/client/baseClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"baseClient.js","sourceRoot":"","sources":["../../src/client/baseClient.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientError.d.ts","sourceRoot":"","sources":["../../src/client/clientError.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"clientError.d.ts","sourceRoot":"","sources":["../../src/client/clientError.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA0B/C;;;;GAIG;AAEH,wBAAgB,aAAa,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,YAAY,CAYjE;AAED;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,QAAQ,EACb,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC,CAOjB;AAED;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAAC,CAAC,EAChC,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,QAAQ,EACb,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,CAAC,CAAC,CAMZ;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,SAAS,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,QAI/F"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { ACCESS_DENIED, UNAUTHORIZED } from '../leaves-client/index.js';
|
|
5
11
|
/**
|
|
6
12
|
* Represents a client-side error.
|
|
7
13
|
*/
|
|
@@ -28,7 +34,7 @@ class ClientError extends Error {
|
|
|
28
34
|
* @returns True if the object is a ClientError; otherwise, false.
|
|
29
35
|
*/
|
|
30
36
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
-
function isClientError(object) {
|
|
37
|
+
export function isClientError(object) {
|
|
32
38
|
return (object instanceof ClientError ||
|
|
33
39
|
('client' in object &&
|
|
34
40
|
'message' in object &&
|
|
@@ -39,7 +45,6 @@ function isClientError(object) {
|
|
|
39
45
|
'status' in object.response &&
|
|
40
46
|
!isNaN(object.response.status)));
|
|
41
47
|
}
|
|
42
|
-
exports.isClientError = isClientError;
|
|
43
48
|
/**
|
|
44
49
|
* Fetches a resource as text.
|
|
45
50
|
* @param req - The request object.
|
|
@@ -48,16 +53,17 @@ exports.isClientError = isClientError;
|
|
|
48
53
|
* @throws ClientError - If the response is not ok.
|
|
49
54
|
* @returns The fetched text.
|
|
50
55
|
*/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
export function handleText(req, res, uri) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const text = yield res.text();
|
|
59
|
+
if (res.ok) {
|
|
60
|
+
return text;
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
throw new ClientError(text, this, res, req, uri);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
59
66
|
}
|
|
60
|
-
exports.handleText = handleText;
|
|
61
67
|
/**
|
|
62
68
|
* Fetches a resource as JSON.
|
|
63
69
|
* @param req - The request object.
|
|
@@ -66,24 +72,24 @@ exports.handleText = handleText;
|
|
|
66
72
|
* @throws ClientError - If the response is not ok.
|
|
67
73
|
* @returns The fetched JSON data.
|
|
68
74
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
export function handleJson(req, res, uri) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
if (res.ok) {
|
|
78
|
+
return res.json();
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
throw new ClientError(yield res.text(), this, res, req, uri);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
76
84
|
}
|
|
77
|
-
exports.handleJson = handleJson;
|
|
78
85
|
/**
|
|
79
86
|
* Checks if a client has access to a resource.
|
|
80
87
|
* @param accessCondition - The condition to check to get access.
|
|
81
88
|
* @throws ClientError - If the condition is true.
|
|
82
89
|
*/
|
|
83
|
-
function handleAccess(accessCondition) {
|
|
90
|
+
export function handleAccess(accessCondition) {
|
|
84
91
|
if (!accessCondition) {
|
|
85
|
-
throw new ClientError(
|
|
92
|
+
throw new ClientError(ACCESS_DENIED, this, UNAUTHORIZED);
|
|
86
93
|
}
|
|
87
94
|
}
|
|
88
|
-
exports.handleAccess = handleAccess;
|
|
89
95
|
//# sourceMappingURL=clientError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientError.js","sourceRoot":"","sources":["../../src/client/clientError.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clientError.js","sourceRoot":"","sources":["../../src/client/clientError.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAKxE;;GAEG;AACH,MAAM,WAAY,SAAQ,KAAK;IAC7B;;;;;;;OAOG;IACH,YACE,OAAe,EACN,MAAkB,EAClB,QAA2B,EAC3B,OAAqB,EACrB,GAAY;QAErB,KAAK,CAAC,OAAO,CAAC,CAAC;QALN,WAAM,GAAN,MAAM,CAAY;QAClB,aAAQ,GAAR,QAAQ,CAAmB;QAC3B,YAAO,GAAP,OAAO,CAAc;QACrB,QAAG,GAAH,GAAG,CAAS;IAGvB,CAAC;CACF;AAED;;;;GAIG;AACH,8DAA8D;AAC9D,MAAM,UAAU,aAAa,CAAC,MAAW;IACvC,OAAO,CACL,MAAM,YAAY,WAAW;QAC7B,CAAC,QAAQ,IAAI,MAAM;YACjB,SAAS,IAAI,MAAM;YACnB,MAAM,IAAI,MAAM,CAAC,MAAM;YACvB,qBAAqB,IAAI,MAAM,CAAC,MAAM;YACtC,WAAW,IAAI,MAAM,CAAC,MAAM;YAC5B,UAAU,IAAI,MAAM;YACpB,QAAQ,IAAI,MAAM,CAAC,QAAQ;YAC3B,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAClC,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAgB,UAAU,CAE9B,GAAgB,EAChB,GAAa,EACb,GAAW;;QAEX,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QAC9B,IAAI,GAAG,CAAC,EAAE,EAAE;YACV,OAAO,IAAI,CAAC;SACb;aAAM;YACL,MAAM,IAAI,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;SAClD;IACH,CAAC;CAAA;AAED;;;;;;;GAOG;AACH,MAAM,UAAgB,UAAU,CAE9B,GAAgB,EAChB,GAAa,EACb,GAAW;;QAEX,IAAI,GAAG,CAAC,EAAE,EAAE;YACV,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;SACnB;aAAM;YACL,MAAM,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;SAC9D;IACH,CAAC;CAAA;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAA4C,eAAwB;IAC9F,IAAI,CAAC,eAAe,EAAE;QACpB,MAAM,IAAI,WAAW,CAAC,aAAa,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;KAC1D;AACH,CAAC"}
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseClient } from './baseClient';
|
|
2
|
-
import { isClientError } from './clientError';
|
|
3
|
-
import { IBaseClient, IClientError } from './interfaces';
|
|
4
|
-
import { HttpMethods, QueryType } from './types';
|
|
1
|
+
import { BaseClient } from './baseClient.js';
|
|
2
|
+
import { isClientError } from './clientError.js';
|
|
3
|
+
import { IBaseClient, IClientError } from './interfaces.js';
|
|
4
|
+
import { HttpMethods, QueryType } from './types.js';
|
|
5
5
|
export { BaseClient, isClientError };
|
|
6
6
|
export type { IBaseClient, IClientError, HttpMethods, QueryType };
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC;AAErC,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC"}
|
package/dist/client/index.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const baseClient_1 = require("./baseClient");
|
|
5
|
-
Object.defineProperty(exports, "BaseClient", { enumerable: true, get: function () { return baseClient_1.BaseClient; } });
|
|
6
|
-
const clientError_1 = require("./clientError");
|
|
7
|
-
Object.defineProperty(exports, "isClientError", { enumerable: true, get: function () { return clientError_1.isClientError; } });
|
|
1
|
+
import { BaseClient } from './baseClient.js';
|
|
2
|
+
import { isClientError } from './clientError.js';
|
|
3
|
+
export { BaseClient, isClientError };
|
|
8
4
|
//# sourceMappingURL=index.js.map
|
package/dist/client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ErrorResponseType, HttpMethods, QueryType, RequestInitType } from './types';
|
|
1
|
+
import { ErrorResponseType, HttpMethods, QueryType, RequestInitType } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* The `IBaseClient` interface outlines the structure for a base client with basic configurations for making HTTP requests.
|
|
4
4
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/client/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/client/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAExF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;;;;OAKG;IACH,KAAK,CACH,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,SAAS,EACjB,IAAI,CAAC,EAAE,WAAW,GACjB,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAC;IAE3C;;;;;OAKG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE5E;;;;;;OAMG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEjF;;;;;;OAMG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE3E;;;;;;OAMG;IACH,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAExF;;;;;;OAMG;IAEH,MAAM,CACJ,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,SAAS,EACjB,IAAI,CAAC,EAAE,eAAe,GACrB,OAAO,CAAC,QAAQ,CAAC,CAAC;IAErB;;;;OAIG;IACH,OAAO,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAEpC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,YAAa,SAAQ,KAAK;IACzC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
package/dist/client/types.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { HttpMethods, IBaseClient, IClientError, QueryType } from './client';
|
|
2
|
-
import { ILeavesClient } from './leaves-client';
|
|
3
|
-
import { PagePropsResponseType } from './leaves-client/types';
|
|
4
|
-
export * from './leaves-client';
|
|
5
|
-
export * from './client';
|
|
1
|
+
import { HttpMethods, IBaseClient, IClientError, QueryType } from './client/index.js';
|
|
2
|
+
import { ILeavesClient } from './leaves-client/index.js';
|
|
3
|
+
import { PagePropsResponseType } from './leaves-client/types.js';
|
|
4
|
+
export * from './leaves-client/index.js';
|
|
5
|
+
export * from './client/index.js';
|
|
6
6
|
export type { ILeavesClient, PagePropsResponseType };
|
|
7
7
|
export type { IBaseClient, IClientError, HttpMethods, QueryType };
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAElC,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./leaves-client"), exports);
|
|
18
|
-
__exportStar(require("./client"), exports);
|
|
1
|
+
export * from './leaves-client/index.js';
|
|
2
|
+
export * from './client/index.js';
|
|
19
3
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/leaves-client/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/leaves-client/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,eAAO,MAAM,WAAW,oBAA0B,CAAC;AACnD,eAAO,MAAM,SAAS,oBAAwB,CAAC;AAC/C,eAAO,MAAM,WAAW;;aAAuE,CAAC;AAChG,eAAO,MAAM,YAAY,QAAsD,CAAC;AAChF,eAAO,MAAM,QAAQ,QAAwB,CAAC;AAC9C,eAAO,MAAM,OAAO;;aAAc,CAAC;AACnC,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AACjD,eAAO,MAAM,UAAU,SAAS,CAAC;AACjC,eAAO,MAAM,gBAAgB,aAAa,CAAC;AAC3C,eAAO,MAAM,eAAe,SAAS,CAAC;AAEtC,eAAO,MAAM,YAAY,EAAE,iBAAmC,CAAC;AAC/D,eAAO,MAAM,aAAa,+DAA+D,CAAC;AAC1F,eAAO,MAAM,qBAAqB,SAA+C,CAAC"}
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
exports.UNAUTHORIZED = { status: 401 };
|
|
18
|
-
exports.ACCESS_DENIED = 'Access denied. Not authorized to access protected content.';
|
|
19
|
-
exports.IS_PASSWORD_PROTECTED = process.env.IS_PASSWORD_PROTECTED === 'true';
|
|
1
|
+
export const ADMIN_TOKEN = process.env.ADMIN_TOKEN;
|
|
2
|
+
export const SUBDOMAIN = process.env.SUBDOMAIN;
|
|
3
|
+
export const AUTH_HEADER = ADMIN_TOKEN ? { Authorization: `Bearer ${ADMIN_TOKEN}` } : undefined;
|
|
4
|
+
export const API_ENDPOINT = process.env.API_ENDPOINT || 'http://localhost:5000';
|
|
5
|
+
export const ENDPOINT = `${API_ENDPOINT}/api`;
|
|
6
|
+
export const HEADERS = AUTH_HEADER;
|
|
7
|
+
export const NAVIGATION_ROUTE = 'navigation';
|
|
8
|
+
export const PATHS_ROUTE = 'paths';
|
|
9
|
+
export const HOSTING_LOCATION_ROUTE = 'hosting-location';
|
|
10
|
+
export const HIDDEN_PAGES_ROUTE = 'hidden-pages';
|
|
11
|
+
export const PLAN_ROUTE = 'plan';
|
|
12
|
+
export const PLAN_BY_ID_ROUTE = 'planById';
|
|
13
|
+
export const ORG_BY_ID_ROUTE = 'byId';
|
|
14
|
+
export const UNAUTHORIZED = { status: 401 };
|
|
15
|
+
export const ACCESS_DENIED = 'Access denied. Not authorized to access protected content.';
|
|
16
|
+
export const IS_PASSWORD_PROTECTED = process.env.IS_PASSWORD_PROTECTED === 'true';
|
|
20
17
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/leaves-client/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/leaves-client/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;AACnD,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;AAC/C,MAAM,CAAC,MAAM,WAAW,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAChG,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,uBAAuB,CAAC;AAChF,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,YAAY,MAAM,CAAC;AAC9C,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC;AACnC,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAC7C,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AACnC,MAAM,CAAC,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AACzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAC;AACjD,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC;AACjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAC3C,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;AAEtC,MAAM,CAAC,MAAM,YAAY,GAAsB,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAC/D,MAAM,CAAC,MAAM,aAAa,GAAG,4DAA4D,CAAC;AAC1F,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,KAAK,MAAM,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ILeavesClient } from './interfaces';
|
|
2
|
-
import getLeavesClient from './leavesClient';
|
|
1
|
+
import { ILeavesClient } from './interfaces.js';
|
|
2
|
+
import getLeavesClient from './leavesClient.js';
|
|
3
3
|
export { getLeavesClient };
|
|
4
|
-
export * from './constants';
|
|
4
|
+
export * from './constants.js';
|
|
5
5
|
export type { ILeavesClient };
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/leaves-client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/leaves-client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAE/B,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
-
};
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.getLeavesClient = void 0;
|
|
21
|
-
const leavesClient_1 = __importDefault(require("./leavesClient"));
|
|
22
|
-
exports.getLeavesClient = leavesClient_1.default;
|
|
23
|
-
__exportStar(require("./constants"), exports);
|
|
1
|
+
import getLeavesClient from './leavesClient.js';
|
|
2
|
+
export { getLeavesClient };
|
|
3
|
+
export * from './constants.js';
|
|
24
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/leaves-client/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/leaves-client/index.ts"],"names":[],"mappings":"AACA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeploymentType, SnippetType, CustomerPageType, DecoratedNavigation, OrgType } from '@mintlify/models';
|
|
2
|
-
import { IBaseClient } from '../client';
|
|
2
|
+
import { IBaseClient } from '../client/index.js';
|
|
3
3
|
export interface ILeavesClient extends IBaseClient {
|
|
4
4
|
readonly subdomain: string;
|
|
5
5
|
readonly isPasswordProtected: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/leaves-client/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,OAAO,EACR,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/leaves-client/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,OAAO,EACR,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,WAAW,aAAc,SAAQ,WAAW;IAChD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;IAEtC,aAAa,IAAI,OAAO,CAAC,cAAc,CAAC,CAAC;IAEzC,aAAa,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAE9C,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3B,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAE3B,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEzC,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEzC,WAAW,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEtC,OAAO,CACL,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,EACjB,GAAG,MAAM,EAAE,CAAC,MAAM,gBAAgB,CAAC,EAAE,GACpC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,MAAM,gBAAgB,CAAC,EAAE,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAEhG,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAEtC,cAAc,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEpC,QAAQ,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CAC/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leavesClient.d.ts","sourceRoot":"","sources":["../../src/leaves-client/leavesClient.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"leavesClient.d.ts","sourceRoot":"","sources":["../../src/leaves-client/leavesClient.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAuHhD,eAAO,MAAM,eAAe,cACf,MAAM;;;;MAIhB,aAAgF,CAAC;AAEpF,eAAe,eAAe,CAAC"}
|