@nhost/nhost-js 0.0.18 → 0.1.0
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/lib/cjs/clients/functions.d.ts +1 -1
- package/lib/cjs/clients/functions.js.map +1 -1
- package/lib/cjs/clients/graphql.d.ts +14 -0
- package/lib/cjs/clients/graphql.js +106 -0
- package/lib/cjs/clients/graphql.js.map +1 -0
- package/lib/cjs/core/nhost-client.d.ts +3 -7
- package/lib/cjs/core/nhost-client.js +13 -10
- package/lib/cjs/core/nhost-client.js.map +1 -1
- package/lib/esm/clients/functions.d.ts +1 -1
- package/lib/esm/clients/functions.js.map +1 -1
- package/lib/esm/clients/graphql.d.ts +14 -0
- package/lib/esm/clients/graphql.js +100 -0
- package/lib/esm/clients/graphql.js.map +1 -0
- package/lib/esm/core/nhost-client.d.ts +3 -7
- package/lib/esm/core/nhost-client.js +13 -10
- package/lib/esm/core/nhost-client.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ export declare class NhostFunctionsClient {
|
|
|
7
7
|
private accessToken;
|
|
8
8
|
constructor(params: NhostFunctionsConstructorParams);
|
|
9
9
|
private post;
|
|
10
|
-
call(url: string, data: any, config
|
|
10
|
+
call(url: string, data: any, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any>>;
|
|
11
11
|
setAccessToken(accessToken: string | undefined): void;
|
|
12
12
|
private generateAccessTokenHeaders;
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/clients/functions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,gDAAiE;AAMjE;IAIE,8BAAY,MAAuC;QACzC,IAAA,GAAG,GAAK,MAAM,IAAX,CAAY;QAEvB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,eAAK,CAAC,MAAM,CAAC;YAC3B,OAAO,EAAE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B;QACnD,IAAI,CAAC,WAAW,EAAE;YAChB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,OAAO;SACR;QAED,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAEO,yDAA0B,GAAlC;QACE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACrB,OAAO,EAAE,CAAC;SACX;QAED,OAAO;YACL,aAAa,EAAE,YAAU,IAAI,CAAC,WAAa;SAC5C,CAAC;IACJ,CAAC;IACH,2BAAC;AAAD,CAAC,AA7CD,IA6CC;AA7CY,oDAAoB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
export declare type NhostGraphqlConstructorParams = {
|
|
3
|
+
url: string;
|
|
4
|
+
};
|
|
5
|
+
export declare class NhostGraphqlClient {
|
|
6
|
+
private url;
|
|
7
|
+
private instance;
|
|
8
|
+
private accessToken;
|
|
9
|
+
constructor(params: NhostGraphqlConstructorParams);
|
|
10
|
+
request(document: string, variables?: any, config?: AxiosRequestConfig): Promise<any>;
|
|
11
|
+
getUrl(): string;
|
|
12
|
+
setAccessToken(accessToken: string | undefined): void;
|
|
13
|
+
private generateAccessTokenHeaders;
|
|
14
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (_) try {
|
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
|
+
};
|
|
52
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
+
exports.NhostGraphqlClient = void 0;
|
|
54
|
+
var axios_1 = __importDefault(require("axios"));
|
|
55
|
+
var NhostGraphqlClient = /** @class */ (function () {
|
|
56
|
+
function NhostGraphqlClient(params) {
|
|
57
|
+
var url = params.url;
|
|
58
|
+
this.url = url;
|
|
59
|
+
this.accessToken = null;
|
|
60
|
+
this.instance = axios_1.default.create({
|
|
61
|
+
baseURL: url,
|
|
62
|
+
timeout: 5000,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
NhostGraphqlClient.prototype.request = function (document, variables, config) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
+
var headers, operationName, data;
|
|
68
|
+
return __generator(this, function (_a) {
|
|
69
|
+
switch (_a.label) {
|
|
70
|
+
case 0:
|
|
71
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), this.generateAccessTokenHeaders());
|
|
72
|
+
operationName = '';
|
|
73
|
+
return [4 /*yield*/, this.instance.post('', {
|
|
74
|
+
operationName: operationName ? operationName : undefined,
|
|
75
|
+
query: document,
|
|
76
|
+
variables: variables,
|
|
77
|
+
}, __assign(__assign({}, config), { headers: headers }))];
|
|
78
|
+
case 1:
|
|
79
|
+
data = (_a.sent()).data;
|
|
80
|
+
return [2 /*return*/, data];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
NhostGraphqlClient.prototype.getUrl = function () {
|
|
86
|
+
return this.url + "/v1/graphql";
|
|
87
|
+
};
|
|
88
|
+
NhostGraphqlClient.prototype.setAccessToken = function (accessToken) {
|
|
89
|
+
if (!accessToken) {
|
|
90
|
+
this.accessToken = null;
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
this.accessToken = accessToken;
|
|
94
|
+
};
|
|
95
|
+
NhostGraphqlClient.prototype.generateAccessTokenHeaders = function () {
|
|
96
|
+
if (!this.accessToken) {
|
|
97
|
+
return {};
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
Authorization: "Bearer " + this.accessToken,
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
return NhostGraphqlClient;
|
|
104
|
+
}());
|
|
105
|
+
exports.NhostGraphqlClient = NhostGraphqlClient;
|
|
106
|
+
//# sourceMappingURL=graphql.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../../src/clients/graphql.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAiE;AAMjE;IAKE,4BAAY,MAAqC;QACvC,IAAA,GAAG,GAAK,MAAM,IAAX,CAAY;QAEvB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,eAAK,CAAC,MAAM,CAAC;YAC3B,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;IACL,CAAC;IAEY,oCAAO,GAApB,UACE,QAAgB,EAChB,SAAe,EACf,MAA2B;;;;;;wBAGrB,OAAO,yBACR,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,GACf,IAAI,CAAC,0BAA0B,EAAE,CACrC,CAAC;wBAEI,aAAa,GAAG,EAAE,CAAC;wBAER,qBAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CACvC,EAAE,EACF;gCACE,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS;gCACxD,KAAK,EAAE,QAAQ;gCACf,SAAS,WAAA;6BACV,wBACI,MAAM,KAAE,OAAO,SAAA,IACrB,EAAA;;wBARO,IAAI,GAAK,CAAA,SAQhB,CAAA,KARW;wBAUZ,sBAAO,IAAI,EAAC;;;;KACb;IAEM,mCAAM,GAAb;QACE,OAAU,IAAI,CAAC,GAAG,gBAAa,CAAC;IAClC,CAAC;IAEM,2CAAc,GAArB,UAAsB,WAA+B;QACnD,IAAI,CAAC,WAAW,EAAE;YAChB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,OAAO;SACR;QAED,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAEO,uDAA0B,GAAlC;QACE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACrB,OAAO,EAAE,CAAC;SACX;QAED,OAAO;YACL,aAAa,EAAE,YAAU,IAAI,CAAC,WAAa;SAC5C,CAAC;IACJ,CAAC;IACH,yBAAC;AAAD,CAAC,AAhED,IAgEC;AAhEY,gDAAkB"}
|
|
@@ -2,23 +2,20 @@ import { HasuraAuthClient } from '@nhost/hasura-auth-js';
|
|
|
2
2
|
import { HasuraStorageClient } from '@nhost/hasura-storage-js';
|
|
3
3
|
import { ClientStorage, ClientStorageType } from '@nhost/hasura-auth-js';
|
|
4
4
|
import { NhostFunctionsClient } from '../clients/functions';
|
|
5
|
+
import { NhostGraphqlClient } from '../clients/graphql';
|
|
5
6
|
export declare type NhostClientConstructorParams = {
|
|
6
|
-
|
|
7
|
+
backendUrl: string;
|
|
7
8
|
refreshIntervalTime?: number;
|
|
8
9
|
clientStorage?: ClientStorage;
|
|
9
10
|
clientStorageType?: ClientStorageType;
|
|
10
11
|
autoRefreshToken?: boolean;
|
|
11
12
|
autoLogin?: boolean;
|
|
12
|
-
authUrl?: string;
|
|
13
|
-
storageUrl?: string;
|
|
14
|
-
graphqlUrl?: string;
|
|
15
|
-
functionsUrl?: string;
|
|
16
13
|
};
|
|
17
14
|
export declare class NhostClient {
|
|
18
15
|
auth: HasuraAuthClient;
|
|
19
16
|
storage: HasuraStorageClient;
|
|
20
17
|
functions: NhostFunctionsClient;
|
|
21
|
-
|
|
18
|
+
graphql: NhostGraphqlClient;
|
|
22
19
|
/**
|
|
23
20
|
* Nhost Client
|
|
24
21
|
*
|
|
@@ -28,5 +25,4 @@ export declare class NhostClient {
|
|
|
28
25
|
* @docs https://docs.nhost.io/TODO
|
|
29
26
|
*/
|
|
30
27
|
constructor(params: NhostClientConstructorParams);
|
|
31
|
-
getGraphqlUrl(): string;
|
|
32
28
|
}
|
|
@@ -4,6 +4,7 @@ exports.NhostClient = void 0;
|
|
|
4
4
|
var hasura_auth_js_1 = require("@nhost/hasura-auth-js");
|
|
5
5
|
var hasura_storage_js_1 = require("@nhost/hasura-storage-js");
|
|
6
6
|
var functions_1 = require("../clients/functions");
|
|
7
|
+
var graphql_1 = require("../clients/graphql");
|
|
7
8
|
var NhostClient = /** @class */ (function () {
|
|
8
9
|
/**
|
|
9
10
|
* Nhost Client
|
|
@@ -15,11 +16,11 @@ var NhostClient = /** @class */ (function () {
|
|
|
15
16
|
*/
|
|
16
17
|
function NhostClient(params) {
|
|
17
18
|
var _this = this;
|
|
18
|
-
if (!params.
|
|
19
|
-
throw 'Please specify a `
|
|
20
|
-
var
|
|
19
|
+
if (!params.backendUrl)
|
|
20
|
+
throw 'Please specify a `backendUrl`. Docs: [todo]!';
|
|
21
|
+
var backendUrl = params.backendUrl, refreshIntervalTime = params.refreshIntervalTime, clientStorage = params.clientStorage, clientStorageType = params.clientStorageType, autoRefreshToken = params.autoRefreshToken, autoLogin = params.autoLogin;
|
|
21
22
|
this.auth = new hasura_auth_js_1.HasuraAuthClient({
|
|
22
|
-
url:
|
|
23
|
+
url: backendUrl + "/v1/auth",
|
|
23
24
|
refreshIntervalTime: refreshIntervalTime,
|
|
24
25
|
clientStorage: clientStorage,
|
|
25
26
|
clientStorageType: clientStorageType,
|
|
@@ -27,29 +28,31 @@ var NhostClient = /** @class */ (function () {
|
|
|
27
28
|
autoLogin: autoLogin,
|
|
28
29
|
});
|
|
29
30
|
this.storage = new hasura_storage_js_1.HasuraStorageClient({
|
|
30
|
-
url:
|
|
31
|
+
url: backendUrl + "/v1/storage",
|
|
31
32
|
});
|
|
32
33
|
this.functions = new functions_1.NhostFunctionsClient({
|
|
33
|
-
url:
|
|
34
|
+
url: backendUrl + "/v1/functions",
|
|
35
|
+
});
|
|
36
|
+
this.graphql = new graphql_1.NhostGraphqlClient({
|
|
37
|
+
url: backendUrl + "/v1/graphql",
|
|
34
38
|
});
|
|
35
39
|
// set current token if token is already accessable
|
|
36
40
|
this.storage.setAccessToken(this.auth.getAccessToken());
|
|
37
41
|
this.functions.setAccessToken(this.auth.getAccessToken());
|
|
42
|
+
this.graphql.setAccessToken(this.auth.getAccessToken());
|
|
38
43
|
// update access token for clients
|
|
39
44
|
this.auth.onAuthStateChanged(function (_event, session) {
|
|
40
45
|
_this.storage.setAccessToken(session === null || session === void 0 ? void 0 : session.accessToken);
|
|
41
46
|
_this.functions.setAccessToken(session === null || session === void 0 ? void 0 : session.accessToken);
|
|
47
|
+
_this.graphql.setAccessToken(session === null || session === void 0 ? void 0 : session.accessToken);
|
|
42
48
|
});
|
|
43
49
|
// update access token for clients
|
|
44
50
|
this.auth.onTokenChanged(function (session) {
|
|
45
51
|
_this.storage.setAccessToken(session === null || session === void 0 ? void 0 : session.accessToken);
|
|
46
52
|
_this.functions.setAccessToken(session === null || session === void 0 ? void 0 : session.accessToken);
|
|
53
|
+
_this.graphql.setAccessToken(session === null || session === void 0 ? void 0 : session.accessToken);
|
|
47
54
|
});
|
|
48
|
-
this.graphqlUrl = graphqlUrl ? graphqlUrl : url + "/graphql";
|
|
49
55
|
}
|
|
50
|
-
NhostClient.prototype.getGraphqlUrl = function () {
|
|
51
|
-
return this.graphqlUrl;
|
|
52
|
-
};
|
|
53
56
|
return NhostClient;
|
|
54
57
|
}());
|
|
55
58
|
exports.NhostClient = NhostClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nhost-client.js","sourceRoot":"","sources":["../../../src/core/nhost-client.ts"],"names":[],"mappings":";;;AAAA,wDAAyD;AACzD,8DAA+D;AAG/D,kDAA4D;
|
|
1
|
+
{"version":3,"file":"nhost-client.js","sourceRoot":"","sources":["../../../src/core/nhost-client.ts"],"names":[],"mappings":";;;AAAA,wDAAyD;AACzD,8DAA+D;AAG/D,kDAA4D;AAC5D,8CAAwD;AAWxD;IAME;;;;;;;OAOG;IACH,qBAAY,MAAoC;QAAhD,iBAoDC;QAnDC,IAAI,CAAC,MAAM,CAAC,UAAU;YACpB,MAAM,8CAA8C,CAAC;QAGrD,IAAA,UAAU,GAMR,MAAM,WANE,EACV,mBAAmB,GAKjB,MAAM,oBALW,EACnB,aAAa,GAIX,MAAM,cAJK,EACb,iBAAiB,GAGf,MAAM,kBAHS,EACjB,gBAAgB,GAEd,MAAM,iBAFQ,EAChB,SAAS,GACP,MAAM,UADC,CACA;QAEX,IAAI,CAAC,IAAI,GAAG,IAAI,iCAAgB,CAAC;YAC/B,GAAG,EAAK,UAAU,aAAU;YAC5B,mBAAmB,qBAAA;YACnB,aAAa,eAAA;YACb,iBAAiB,mBAAA;YACjB,gBAAgB,kBAAA;YAChB,SAAS,WAAA;SACV,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,GAAG,IAAI,uCAAmB,CAAC;YACrC,GAAG,EAAK,UAAU,gBAAa;SAChC,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,GAAG,IAAI,gCAAoB,CAAC;YACxC,GAAG,EAAK,UAAU,kBAAe;SAClC,CAAC,CAAC;QAEH,IAAI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@@ -7,7 +7,7 @@ export declare class NhostFunctionsClient {
|
|
|
7
7
|
private accessToken;
|
|
8
8
|
constructor(params: NhostFunctionsConstructorParams);
|
|
9
9
|
private post;
|
|
10
|
-
call(url: string, data: any, config
|
|
10
|
+
call(url: string, data: any, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any>>;
|
|
11
11
|
setAccessToken(accessToken: string | undefined): void;
|
|
12
12
|
private generateAccessTokenHeaders;
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/clients/functions.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAMjE;IAIE,8BAAY,MAAuC;QACzC,IAAA,GAAG,GAAK,MAAM,IAAX,CAAY;QAEvB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC;YAC3B,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;IACL,CAAC;IAEO,mCAAI,GAAZ,UAAa,GAAW,EAAE,IAAS,EAAE,MAA2B;QAC9D,IAAM,OAAO,yBACR,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,GACf,IAAI,CAAC,0BAA0B,EAAE,CACrC,CAAC;QAEF,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,wBAAO,MAAM,KAAE,OAAO,SAAA,IAAG,CAAC;IAC/D,CAAC;IAEM,mCAAI,GAAX,UAAY,GAAW,EAAE,IAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/clients/functions.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAMjE;IAIE,8BAAY,MAAuC;QACzC,IAAA,GAAG,GAAK,MAAM,IAAX,CAAY;QAEvB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC;YAC3B,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;IACL,CAAC;IAEO,mCAAI,GAAZ,UAAa,GAAW,EAAE,IAAS,EAAE,MAA2B;QAC9D,IAAM,OAAO,yBACR,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,GACf,IAAI,CAAC,0BAA0B,EAAE,CACrC,CAAC;QAEF,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,wBAAO,MAAM,KAAE,OAAO,SAAA,IAAG,CAAC;IAC/D,CAAC;IAEM,mCAAI,GAAX,UAAY,GAAW,EAAE,IAAS,EAAE,MAA2B;QAC7D,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACtC,CAAC;IAEM,6CAAc,GAArB,UAAsB,WAA+B;QACnD,IAAI,CAAC,WAAW,EAAE;YAChB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,OAAO;SACR;QAED,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAEO,yDAA0B,GAAlC;QACE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACrB,OAAO,EAAE,CAAC;SACX;QAED,OAAO;YACL,aAAa,EAAE,YAAU,IAAI,CAAC,WAAa;SAC5C,CAAC;IACJ,CAAC;IACH,2BAAC;AAAD,CAAC,AA7CD,IA6CC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
export declare type NhostGraphqlConstructorParams = {
|
|
3
|
+
url: string;
|
|
4
|
+
};
|
|
5
|
+
export declare class NhostGraphqlClient {
|
|
6
|
+
private url;
|
|
7
|
+
private instance;
|
|
8
|
+
private accessToken;
|
|
9
|
+
constructor(params: NhostGraphqlConstructorParams);
|
|
10
|
+
request(document: string, variables?: any, config?: AxiosRequestConfig): Promise<any>;
|
|
11
|
+
getUrl(): string;
|
|
12
|
+
setAccessToken(accessToken: string | undefined): void;
|
|
13
|
+
private generateAccessTokenHeaders;
|
|
14
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (_) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
import axios from 'axios';
|
|
49
|
+
var NhostGraphqlClient = /** @class */ (function () {
|
|
50
|
+
function NhostGraphqlClient(params) {
|
|
51
|
+
var url = params.url;
|
|
52
|
+
this.url = url;
|
|
53
|
+
this.accessToken = null;
|
|
54
|
+
this.instance = axios.create({
|
|
55
|
+
baseURL: url,
|
|
56
|
+
timeout: 5000,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
NhostGraphqlClient.prototype.request = function (document, variables, config) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
61
|
+
var headers, operationName, data;
|
|
62
|
+
return __generator(this, function (_a) {
|
|
63
|
+
switch (_a.label) {
|
|
64
|
+
case 0:
|
|
65
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), this.generateAccessTokenHeaders());
|
|
66
|
+
operationName = '';
|
|
67
|
+
return [4 /*yield*/, this.instance.post('', {
|
|
68
|
+
operationName: operationName ? operationName : undefined,
|
|
69
|
+
query: document,
|
|
70
|
+
variables: variables,
|
|
71
|
+
}, __assign(__assign({}, config), { headers: headers }))];
|
|
72
|
+
case 1:
|
|
73
|
+
data = (_a.sent()).data;
|
|
74
|
+
return [2 /*return*/, data];
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
NhostGraphqlClient.prototype.getUrl = function () {
|
|
80
|
+
return this.url + "/v1/graphql";
|
|
81
|
+
};
|
|
82
|
+
NhostGraphqlClient.prototype.setAccessToken = function (accessToken) {
|
|
83
|
+
if (!accessToken) {
|
|
84
|
+
this.accessToken = null;
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
this.accessToken = accessToken;
|
|
88
|
+
};
|
|
89
|
+
NhostGraphqlClient.prototype.generateAccessTokenHeaders = function () {
|
|
90
|
+
if (!this.accessToken) {
|
|
91
|
+
return {};
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
Authorization: "Bearer " + this.accessToken,
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
return NhostGraphqlClient;
|
|
98
|
+
}());
|
|
99
|
+
export { NhostGraphqlClient };
|
|
100
|
+
//# sourceMappingURL=graphql.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../../src/clients/graphql.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAMj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ED,IAgEC"}
|
|
@@ -2,23 +2,20 @@ import { HasuraAuthClient } from '@nhost/hasura-auth-js';
|
|
|
2
2
|
import { HasuraStorageClient } from '@nhost/hasura-storage-js';
|
|
3
3
|
import { ClientStorage, ClientStorageType } from '@nhost/hasura-auth-js';
|
|
4
4
|
import { NhostFunctionsClient } from '../clients/functions';
|
|
5
|
+
import { NhostGraphqlClient } from '../clients/graphql';
|
|
5
6
|
export declare type NhostClientConstructorParams = {
|
|
6
|
-
|
|
7
|
+
backendUrl: string;
|
|
7
8
|
refreshIntervalTime?: number;
|
|
8
9
|
clientStorage?: ClientStorage;
|
|
9
10
|
clientStorageType?: ClientStorageType;
|
|
10
11
|
autoRefreshToken?: boolean;
|
|
11
12
|
autoLogin?: boolean;
|
|
12
|
-
authUrl?: string;
|
|
13
|
-
storageUrl?: string;
|
|
14
|
-
graphqlUrl?: string;
|
|
15
|
-
functionsUrl?: string;
|
|
16
13
|
};
|
|
17
14
|
export declare class NhostClient {
|
|
18
15
|
auth: HasuraAuthClient;
|
|
19
16
|
storage: HasuraStorageClient;
|
|
20
17
|
functions: NhostFunctionsClient;
|
|
21
|
-
|
|
18
|
+
graphql: NhostGraphqlClient;
|
|
22
19
|
/**
|
|
23
20
|
* Nhost Client
|
|
24
21
|
*
|
|
@@ -28,5 +25,4 @@ export declare class NhostClient {
|
|
|
28
25
|
* @docs https://docs.nhost.io/TODO
|
|
29
26
|
*/
|
|
30
27
|
constructor(params: NhostClientConstructorParams);
|
|
31
|
-
getGraphqlUrl(): string;
|
|
32
28
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HasuraAuthClient } from '@nhost/hasura-auth-js';
|
|
2
2
|
import { HasuraStorageClient } from '@nhost/hasura-storage-js';
|
|
3
3
|
import { NhostFunctionsClient } from '../clients/functions';
|
|
4
|
+
import { NhostGraphqlClient } from '../clients/graphql';
|
|
4
5
|
var NhostClient = /** @class */ (function () {
|
|
5
6
|
/**
|
|
6
7
|
* Nhost Client
|
|
@@ -12,11 +13,11 @@ var NhostClient = /** @class */ (function () {
|
|
|
12
13
|
*/
|
|
13
14
|
function NhostClient(params) {
|
|
14
15
|
var _this = this;
|
|
15
|
-
if (!params.
|
|
16
|
-
throw 'Please specify a `
|
|
17
|
-
var
|
|
16
|
+
if (!params.backendUrl)
|
|
17
|
+
throw 'Please specify a `backendUrl`. Docs: [todo]!';
|
|
18
|
+
var backendUrl = params.backendUrl, refreshIntervalTime = params.refreshIntervalTime, clientStorage = params.clientStorage, clientStorageType = params.clientStorageType, autoRefreshToken = params.autoRefreshToken, autoLogin = params.autoLogin;
|
|
18
19
|
this.auth = new HasuraAuthClient({
|
|
19
|
-
url:
|
|
20
|
+
url: backendUrl + "/v1/auth",
|
|
20
21
|
refreshIntervalTime: refreshIntervalTime,
|
|
21
22
|
clientStorage: clientStorage,
|
|
22
23
|
clientStorageType: clientStorageType,
|
|
@@ -24,29 +25,31 @@ var NhostClient = /** @class */ (function () {
|
|
|
24
25
|
autoLogin: autoLogin,
|
|
25
26
|
});
|
|
26
27
|
this.storage = new HasuraStorageClient({
|
|
27
|
-
url:
|
|
28
|
+
url: backendUrl + "/v1/storage",
|
|
28
29
|
});
|
|
29
30
|
this.functions = new NhostFunctionsClient({
|
|
30
|
-
url:
|
|
31
|
+
url: backendUrl + "/v1/functions",
|
|
32
|
+
});
|
|
33
|
+
this.graphql = new NhostGraphqlClient({
|
|
34
|
+
url: backendUrl + "/v1/graphql",
|
|
31
35
|
});
|
|
32
36
|
// set current token if token is already accessable
|
|
33
37
|
this.storage.setAccessToken(this.auth.getAccessToken());
|
|
34
38
|
this.functions.setAccessToken(this.auth.getAccessToken());
|
|
39
|
+
this.graphql.setAccessToken(this.auth.getAccessToken());
|
|
35
40
|
// update access token for clients
|
|
36
41
|
this.auth.onAuthStateChanged(function (_event, session) {
|
|
37
42
|
_this.storage.setAccessToken(session === null || session === void 0 ? void 0 : session.accessToken);
|
|
38
43
|
_this.functions.setAccessToken(session === null || session === void 0 ? void 0 : session.accessToken);
|
|
44
|
+
_this.graphql.setAccessToken(session === null || session === void 0 ? void 0 : session.accessToken);
|
|
39
45
|
});
|
|
40
46
|
// update access token for clients
|
|
41
47
|
this.auth.onTokenChanged(function (session) {
|
|
42
48
|
_this.storage.setAccessToken(session === null || session === void 0 ? void 0 : session.accessToken);
|
|
43
49
|
_this.functions.setAccessToken(session === null || session === void 0 ? void 0 : session.accessToken);
|
|
50
|
+
_this.graphql.setAccessToken(session === null || session === void 0 ? void 0 : session.accessToken);
|
|
44
51
|
});
|
|
45
|
-
this.graphqlUrl = graphqlUrl ? graphqlUrl : url + "/graphql";
|
|
46
52
|
}
|
|
47
|
-
NhostClient.prototype.getGraphqlUrl = function () {
|
|
48
|
-
return this.graphqlUrl;
|
|
49
|
-
};
|
|
50
53
|
return NhostClient;
|
|
51
54
|
}());
|
|
52
55
|
export { NhostClient };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nhost-client.js","sourceRoot":"","sources":["../../../src/core/nhost-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAG/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"nhost-client.js","sourceRoot":"","sources":["../../../src/core/nhost-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAG/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAWxD;IAME;;;;;;;OAOG;IACH,qBAAY,MAAoC;QAAhD,iBAoDC;QAnDC,IAAI,CAAC,MAAM,CAAC,UAAU;YACpB,MAAM,8CAA8C,CAAC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