@hexagramio/saga-ts 0.9.293-1 → 0.9.293-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/dist/index.d.ts CHANGED
@@ -1,116 +1,8 @@
1
- /**
2
- * Central Module that contains the methods to issue
3
- * HTTPCommands and SocketCommands to a SAGA host
4
- * @packageDocumentation
5
- */
6
- /// <reference types="node" />
7
- import { URLSearchParams } from "url";
8
- import { ReadMessage, ReadProperty } from "./lib/shared_types";
9
- /**
10
- * The APIError is thrown when a HTTPCommand or SocketCommands fails to execute
11
- */
12
- export declare class APIError extends Error {
13
- /**
14
- * a saga status code as explained in the actual saga documentation,
15
- * very much aligned to HTTP Status codes
16
- */
17
- statusCode: number;
18
- /**
19
- * The path of the HTTPCommand or SocketCommand that caused the error
20
- */
21
- path?: string;
22
- /**
23
- * Details on what field were not permitted
24
- */
25
- errors?: Record<string, string>;
26
- /**
27
- * Create a
28
- * @param message the error message
29
- * @param statusCode a saga status code as explained in the actual saga documentation, very much aligned to HTTP Status codes
30
- * @param errors list of field names and the reason why the field wasn't permitted
31
- * @param path The path of the HTTPCommand or SocketCommand that caused the error
32
- */
33
- constructor(message: string, statusCode: number, errors?: Record<string, string>, path?: string);
34
- }
35
- /**
36
- * Encapsulates authentication tokens. An authentication object is returned i.e. from {@link LoginUserCommand} It's required for most HTTP Commands.
37
- */
38
- export interface Authentication {
39
- /**
40
- * Required access token
41
- */
42
- accessToken: string;
43
- /**
44
- * Used to retrieve a new access token using {@link RefreshTokenCommand}
45
- */
46
- refreshToken: string;
47
- }
48
- /**
49
- * Interface to represent the various mutations of a HTTP Command profile.
50
- */
51
- export interface HTTPCommand<T> {
52
- method: "GET" | "PUT" | "POST" | "DELETE";
53
- path: string;
54
- params?: URLSearchParams;
55
- data?: any;
56
- accessToken?: string;
57
- }
58
- /**
59
- * Send the HTTP Command to the host with the given baseURL
60
- * @param baseURL the baseURL of the HTTP Api, i.e 'https://example.api.hexagram.io'
61
- * @param command the actual command to send
62
- * @return a promise containing the response from the command
63
- * @throws an APIError if the operations fails
64
- */
65
- export declare const sendHTTPCommand: <T>(baseURL: URL, command: HTTPCommand<T>) => Promise<T>;
66
- /**
67
- * The events a socket session can receive.
68
- */
69
- export interface EventMap {
70
- "/properties": ReadProperty;
71
- "/messages": ReadMessage;
72
- "authenticated": any;
73
- }
74
- /**
75
- * A socket join command
76
- */
77
- export interface SocketJoinCommand {
78
- method: "/users" | "/bots" | "/globals" | "/jobs/runnable_calls" | "/jobs/versions" | "/scripts/runnable_calls" | "/scripts/versions" | "/system" | "/npm_packages";
79
- id: string;
80
- join: boolean;
81
- }
82
- /**
83
- * The discriminating union type of socket commands,
84
- * for it just contains the join commands, but the
85
- * intent is to hold other socket commands as well
86
- */
87
- export type SocketCommand = SocketJoinCommand;
88
- /**
89
- * Class that wraps saga socket connection logic and manages realtime saga socket events. The
90
- */
91
- export declare class SocketSession {
92
- private socket;
93
- private readonly maxRetries;
94
- private commandStack;
95
- private ready;
96
- /**
97
- * Set connection parameters.
98
- * @param host the host to connect to
99
- * @param accessToken the access token to authenticate
100
- * @param errorNotify callback function that will be called when errors occur
101
- */
102
- constructor(host: URL, accessToken: string, errorNotify: (error: APIError) => any, options?: {
103
- delayAuthentication?: number;
104
- triggerDisconnectAndConnect?: number;
105
- });
106
- private emitStackedCommands;
107
- on<E extends keyof EventMap>(type: E, listener: (ev: EventMap[E]) => undefined): void;
108
- off<E extends keyof EventMap>(type: E, listener?: (ev: EventMap[E]) => undefined): void;
109
- /**
110
- * Send commands to the server
111
- * @param command
112
- * @throws APIError if error ack is send back from server
113
- */
114
- emitCommand(command: SocketCommand): Promise<unknown>;
115
- }
1
+ export * from './senders/http';
2
+ export * from './senders/socket';
3
+ export * from './commands/bots';
4
+ export * from './commands/users';
5
+ export * from './commands/system';
6
+ export * from './commands/test_data';
7
+ export * from './shared/types';
116
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"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BAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA"}
package/dist/index.js CHANGED
@@ -1,196 +1,8 @@
1
- /**
2
- * Central Module that contains the methods to issue
3
- * HTTPCommands and SocketCommands to a SAGA host
4
- * @packageDocumentation
5
- */
6
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
7
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8
- return new (P || (P = Promise))(function (resolve, reject) {
9
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
10
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
11
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
12
- step((generator = generator.apply(thisArg, _arguments || [])).next());
13
- });
14
- };
15
- import axios from 'axios';
16
- import socketio from 'socket.io-client';
17
- import parseLinkHeader from "parse-link-header";
18
- import Debug from "debug";
19
- const debug = Debug("saga-ts");
20
- /**
21
- * The APIError is thrown when a HTTPCommand or SocketCommands fails to execute
22
- */
23
- export class APIError extends Error {
24
- /**
25
- * Create a
26
- * @param message the error message
27
- * @param statusCode a saga status code as explained in the actual saga documentation, very much aligned to HTTP Status codes
28
- * @param errors list of field names and the reason why the field wasn't permitted
29
- * @param path The path of the HTTPCommand or SocketCommand that caused the error
30
- */
31
- constructor(message, statusCode, errors, path) {
32
- super(message);
33
- this.statusCode = statusCode;
34
- this.errors = errors;
35
- this.path = path;
36
- }
37
- }
38
- /**
39
- * Send the HTTP Command to the host with the given baseURL
40
- * @param baseURL the baseURL of the HTTP Api, i.e 'https://example.api.hexagram.io'
41
- * @param command the actual command to send
42
- * @return a promise containing the response from the command
43
- * @throws an APIError if the operations fails
44
- */
45
- export const sendHTTPCommand = (baseURL, command) => __awaiter(void 0, void 0, void 0, function* () {
46
- var _a, _b, _c, _d, _e;
47
- const headers = { 'Content-Type': 'application/json' };
48
- if (command.accessToken) {
49
- headers.Authorization = `Bearer ${command.accessToken}`;
50
- }
51
- const response = yield axios({
52
- headers,
53
- baseURL: baseURL.toString(),
54
- validateStatus: () => true,
55
- method: command.method,
56
- url: command.path,
57
- params: command.params,
58
- data: command.data
59
- });
60
- if (response.status !== 200) {
61
- throw new APIError(response.data.toString(), response.status, (_a = response.data) === null || _a === void 0 ? void 0 : _a.errors, command.path);
62
- }
63
- else if (response.headers['link'] || response.headers['link'] === '') {
64
- const parsed = parseLinkHeader(response.headers['link']);
65
- const list = (url) => {
66
- return {
67
- method: "GET",
68
- path: url.pathname,
69
- params: url.searchParams,
70
- accessToken: command.accessToken
71
- };
72
- };
73
- return {
74
- result: response.data,
75
- prevCommand: ((_b = parsed === null || parsed === void 0 ? void 0 : parsed.prev) === null || _b === void 0 ? void 0 : _b.url) ? list(new URL((_c = parsed === null || parsed === void 0 ? void 0 : parsed.prev) === null || _c === void 0 ? void 0 : _c.url)) : undefined,
76
- nextCommand: ((_d = parsed === null || parsed === void 0 ? void 0 : parsed.next) === null || _d === void 0 ? void 0 : _d.url) ? list(new URL((_e = parsed === null || parsed === void 0 ? void 0 : parsed.next) === null || _e === void 0 ? void 0 : _e.url)) : undefined
77
- };
78
- }
79
- else {
80
- return response.data;
81
- }
82
- });
83
- /**
84
- * Class that wraps saga socket connection logic and manages realtime saga socket events. The
85
- */
86
- export class SocketSession {
87
- /**
88
- * Set connection parameters.
89
- * @param host the host to connect to
90
- * @param accessToken the access token to authenticate
91
- * @param errorNotify callback function that will be called when errors occur
92
- */
93
- constructor(host, accessToken, errorNotify, options) {
94
- this.maxRetries = 100;
95
- this.commandStack = [];
96
- this.ready = false;
97
- this.socket = socketio(host.toString(), {
98
- transports: ['websocket', 'polling'],
99
- reconnection: true,
100
- reconnectionDelay: 1000,
101
- reconnectionDelayMax: 5000,
102
- reconnectionAttempts: this.maxRetries,
103
- })
104
- .on('connect', () => {
105
- debug('connect');
106
- if ((options === null || options === void 0 ? void 0 : options.delayAuthentication) && (options === null || options === void 0 ? void 0 : options.delayAuthentication) > 0) {
107
- setTimeout(() => this.socket.emit('authentication', { accessToken }), options.delayAuthentication);
108
- }
109
- else {
110
- this.socket.emit('authentication', { accessToken });
111
- }
112
- if ((options === null || options === void 0 ? void 0 : options.triggerDisconnectAndConnect) && options.triggerDisconnectAndConnect > 0) {
113
- setTimeout(() => {
114
- options.triggerDisconnectAndConnect = 0;
115
- this.socket.disconnect();
116
- this.socket.connect();
117
- this.emitStackedCommands();
118
- }, options.triggerDisconnectAndConnect);
119
- }
120
- //this.socket.emit('authentication', {accessToken});
121
- })
122
- .on('disconnect', err => {
123
- this.ready = false;
124
- debug(`disconnect ${err}`);
125
- })
126
- .on('error', err => {
127
- debug(`error ${err}`);
128
- errorNotify(new APIError(err.message, 500));
129
- })
130
- .on('unauthorized', (err) => {
131
- debug('unauthorized');
132
- errorNotify(new APIError(err.message, 401));
133
- })
134
- .on('authenticated', () => {
135
- debug('authenticated');
136
- this.ready = true;
137
- this.emitStackedCommands();
138
- });
139
- this.socket.io.on('reconnect', () => {
140
- debug('reconnect');
141
- this.emitStackedCommands();
142
- });
143
- }
144
- emitStackedCommands() {
145
- debug(`emitStackedCommands ${this.commandStack.length}`);
146
- for (const command of this.commandStack) {
147
- debug(`send queued ${command.method} ${command.join} ${command.id}`);
148
- this.socket.emit(`${command.method}/${command.join ? "join" : "leave"}`, command.id, (response) => {
149
- debug(`queued command response ${response.status_code}`);
150
- });
151
- }
152
- this.commandStack = this.commandStack.filter(command => command.join !== undefined);
153
- }
154
- on(type, listener) {
155
- //@ts-ignore
156
- this.socket.on(type, listener);
157
- }
158
- off(type, listener) {
159
- //@ts-ignore
160
- this.socket.off(type, listener);
161
- }
162
- /**
163
- * Send commands to the server
164
- * @param command
165
- * @throws APIError if error ack is send back from server
166
- */
167
- emitCommand(command) {
168
- return __awaiter(this, void 0, void 0, function* () {
169
- return new Promise((resolve, reject) => {
170
- if (!this.ready) {
171
- debug(`command queued ${command.method} ${command.join} ${command.id}`);
172
- this.commandStack.push(command);
173
- }
174
- else {
175
- debug(`sending ${command.method}`);
176
- const path = `${command.method}/${command.join ? "join" : "leave"}`;
177
- this.socket.emit(path, command.id, (response) => {
178
- debug(`received ack ${response.status_code} for ${command.method} `);
179
- if (response.status_code !== 200) {
180
- reject(new APIError(response.body.name.toString(), response.status_code, response.body.errors, path));
181
- }
182
- else {
183
- //we only need to queue messages that join/leave
184
- //for replay when the socket reconnects
185
- if (command.join !== undefined) {
186
- this.commandStack.push(command);
187
- }
188
- resolve(response);
189
- }
190
- });
191
- }
192
- });
193
- });
194
- }
195
- }
1
+ export * from './senders/http';
2
+ export * from './senders/socket';
3
+ export * from './commands/bots';
4
+ export * from './commands/users';
5
+ export * from './commands/system';
6
+ export * from './commands/test_data';
7
+ export * from './shared/types';
196
8
  //# 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":"AAAA;;;;GAIG;;;;;;;;;;AAEH,OAAO,KAAuB,MAAM,OAAO,CAAC;AAC5C,OAAO,QAAkB,MAAM,kBAAkB,CAAC;AAGlD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AAG/B;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,KAAK;IAiBjC;;;;;;OAMG;IACH,YAAY,OAAe,EAAE,UAAkB,EAAE,MAA8B,EAAE,IAAa;QAC5F,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AA4BD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAU,OAAY,EAAE,OAAuB,EAAc,EAAE;;IAE5F,MAAM,OAAO,GAA2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A;QACJ,CAAC;KAAA;CACF"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA"}
package/package.json CHANGED
@@ -1,13 +1,11 @@
1
1
  {
2
2
  "name": "@hexagramio/saga-ts",
3
- "version": "0.9.293-1",
3
+ "version": "0.9.293-3",
4
4
  "description": "Saga SDK",
5
- "main": "./dist/index.js",
6
5
  "types": "./dist/index.d.ts",
7
-
8
6
  "exports": {
9
7
  ".": "./dist/index.js",
10
- "./*": "./dist/*.js"
8
+ "./": "./dist/"
11
9
  },
12
10
  "scripts": {
13
11
  "test": "jest --forceExit",
@@ -47,4 +45,4 @@
47
45
  "license": "MIT",
48
46
  "homepage": "https://hexagram.io",
49
47
  "author": "Hexagram <admin@hexagram.io> (https:/hexagram.io/)"
50
- }
48
+ }