graphlit-client 1.0.20240418002 → 1.0.20240418003

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.d.ts CHANGED
@@ -10,8 +10,8 @@ declare class Graphlit {
10
10
  private correlationId;
11
11
  private token;
12
12
  constructor(organizationId?: string, environmentId?: string, jwtSecret?: string, ownerId?: string, apiUri?: string, correlationId?: string);
13
+ createAlert(alert: Types.AlertInput): Promise<any>;
13
14
  alert(): {
14
- create: (alert: Types.AlertInput) => Promise<any>;
15
15
  update: (alert: Types.AlertUpdateInput) => Promise<any>;
16
16
  delete: (id: string) => Promise<any>;
17
17
  deleteAll: (mutation?: any) => Promise<any>;
@@ -85,4 +85,4 @@ declare class Graphlit {
85
85
  private mutateAndCheckError;
86
86
  private queryAndCheckError;
87
87
  }
88
- export { Graphlit };
88
+ export { Graphlit, Types };
package/dist/client.js CHANGED
@@ -32,8 +32,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
32
  });
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.Graphlit = void 0;
35
+ exports.Types = exports.Graphlit = void 0;
36
36
  const client_1 = require("@apollo/client");
37
+ const Types = __importStar(require("./generated/graphql-types"));
38
+ exports.Types = Types;
37
39
  const Documents = __importStar(require("./generated/graphql-documents"));
38
40
  const jwt = __importStar(require("jsonwebtoken"));
39
41
  const dotenv = __importStar(require("dotenv"));
@@ -78,11 +80,13 @@ class Graphlit {
78
80
  cache: new client_1.InMemoryCache(),
79
81
  });
80
82
  }
83
+ createAlert(alert) {
84
+ return __awaiter(this, void 0, void 0, function* () {
85
+ return this.mutateAndCheckError(Documents.CreateAlert, { alert: alert, correlationId: this.correlationId });
86
+ });
87
+ }
81
88
  alert() {
82
89
  return {
83
- create: (alert) => __awaiter(this, void 0, void 0, function* () {
84
- return this.mutateAndCheckError(Documents.CreateAlert, { alert: alert, correlationId: this.correlationId });
85
- }),
86
90
  update: (alert) => __awaiter(this, void 0, void 0, function* () {
87
91
  return this.mutateAndCheckError(Documents.UpdateAlert, { alert: alert });
88
92
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphlit-client",
3
- "version": "1.0.20240418002",
3
+ "version": "1.0.20240418003",
4
4
  "description": "Graphlit API TypeScript Client",
5
5
  "main": "dist/client.js",
6
6
  "types": "dist/client.d.ts",