poad 2.1.1 → 2.5.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/oa.js +52 -0
- package/package.json +11 -72
- package/LICENSE +0 -21
- package/README.md +0 -63
- package/dist/main/OmneediaClient.d.ts +0 -28
- package/dist/main/OmneediaClient.d.ts.map +0 -1
- package/dist/main/OmneediaClient.js +0 -58
- package/dist/main/OmneediaClient.js.map +0 -1
- package/dist/main/env/prefix-dev.d.ts +0 -7
- package/dist/main/env/prefix-dev.d.ts.map +0 -1
- package/dist/main/env/prefix-dev.js +0 -8
- package/dist/main/env/prefix-dev.js.map +0 -1
- package/dist/main/env/prefix-prod.d.ts +0 -7
- package/dist/main/env/prefix-prod.d.ts.map +0 -1
- package/dist/main/env/prefix-prod.js +0 -8
- package/dist/main/env/prefix-prod.js.map +0 -1
- package/dist/main/env/prefix.d.ts +0 -7
- package/dist/main/env/prefix.d.ts.map +0 -1
- package/dist/main/env/prefix.js +0 -8
- package/dist/main/env/prefix.js.map +0 -1
- package/dist/main/index.d.ts +0 -11
- package/dist/main/index.d.ts.map +0 -1
- package/dist/main/index.js +0 -19
- package/dist/main/index.js.map +0 -1
- package/dist/main/lib/auth.d.ts +0 -22
- package/dist/main/lib/auth.d.ts.map +0 -1
- package/dist/main/lib/auth.js +0 -352
- package/dist/main/lib/auth.js.map +0 -1
- package/dist/main/lib/constants.d.ts +0 -8
- package/dist/main/lib/constants.d.ts.map +0 -1
- package/dist/main/lib/constants.js +0 -11
- package/dist/main/lib/constants.js.map +0 -1
- package/dist/main/lib/db.d.ts +0 -45
- package/dist/main/lib/db.d.ts.map +0 -1
- package/dist/main/lib/db.js +0 -252
- package/dist/main/lib/db.js.map +0 -1
- package/dist/main/lib/error-codes.d.ts +0 -7
- package/dist/main/lib/error-codes.d.ts.map +0 -1
- package/dist/main/lib/error-codes.js +0 -3
- package/dist/main/lib/error-codes.js.map +0 -1
- package/dist/main/lib/errors.d.ts +0 -96
- package/dist/main/lib/errors.d.ts.map +0 -1
- package/dist/main/lib/errors.js +0 -127
- package/dist/main/lib/errors.js.map +0 -1
- package/dist/main/lib/realtime.d.ts +0 -9
- package/dist/main/lib/realtime.d.ts.map +0 -1
- package/dist/main/lib/realtime.js +0 -36
- package/dist/main/lib/realtime.js.map +0 -1
- package/dist/main/lib/request.d.ts +0 -40
- package/dist/main/lib/request.d.ts.map +0 -1
- package/dist/main/lib/request.js +0 -237
- package/dist/main/lib/request.js.map +0 -1
- package/dist/main/lib/types.d.ts +0 -408
- package/dist/main/lib/types.d.ts.map +0 -1
- package/dist/main/lib/types.js +0 -11
- package/dist/main/lib/types.js.map +0 -1
- package/dist/main/lib/util.d.ts +0 -7
- package/dist/main/lib/util.d.ts.map +0 -1
- package/dist/main/lib/util.js +0 -90
- package/dist/main/lib/util.js.map +0 -1
- package/dist/main/lib copy/auth.d.ts +0 -22
- package/dist/main/lib copy/auth.d.ts.map +0 -1
- package/dist/main/lib copy/auth.js +0 -283
- package/dist/main/lib copy/auth.js.map +0 -1
- package/dist/main/lib copy/auth_api.d.ts +0 -23
- package/dist/main/lib copy/auth_api.d.ts.map +0 -1
- package/dist/main/lib copy/auth_api.js +0 -90
- package/dist/main/lib copy/auth_api.js.map +0 -1
- package/dist/main/lib copy/constants.d.ts +0 -8
- package/dist/main/lib copy/constants.d.ts.map +0 -1
- package/dist/main/lib copy/constants.js +0 -11
- package/dist/main/lib copy/constants.js.map +0 -1
- package/dist/main/lib copy/cookies.d.ts +0 -20
- package/dist/main/lib copy/cookies.d.ts.map +0 -1
- package/dist/main/lib copy/cookies.js +0 -144
- package/dist/main/lib copy/cookies.js.map +0 -1
- package/dist/main/lib copy/db.d.ts +0 -45
- package/dist/main/lib copy/db.d.ts.map +0 -1
- package/dist/main/lib copy/db.js +0 -252
- package/dist/main/lib copy/db.js.map +0 -1
- package/dist/main/lib copy/realtime.d.ts +0 -9
- package/dist/main/lib copy/realtime.d.ts.map +0 -1
- package/dist/main/lib copy/realtime.js +0 -36
- package/dist/main/lib copy/realtime.js.map +0 -1
- package/dist/main/lib copy/request.d.ts +0 -40
- package/dist/main/lib copy/request.d.ts.map +0 -1
- package/dist/main/lib copy/request.js +0 -206
- package/dist/main/lib copy/request.js.map +0 -1
- package/dist/main/lib copy/types.d.ts +0 -124
- package/dist/main/lib copy/types.d.ts.map +0 -1
- package/dist/main/lib copy/types.js +0 -3
- package/dist/main/lib copy/types.js.map +0 -1
- package/dist/main/lib copy/util.d.ts +0 -7
- package/dist/main/lib copy/util.d.ts.map +0 -1
- package/dist/main/lib copy/util.js +0 -90
- package/dist/main/lib copy/util.js.map +0 -1
- package/dist/module/OmneediaClient.d.ts +0 -28
- package/dist/module/OmneediaClient.d.ts.map +0 -1
- package/dist/module/OmneediaClient.js +0 -52
- package/dist/module/OmneediaClient.js.map +0 -1
- package/dist/module/env/prefix-dev.d.ts +0 -7
- package/dist/module/env/prefix-dev.d.ts.map +0 -1
- package/dist/module/env/prefix-dev.js +0 -6
- package/dist/module/env/prefix-dev.js.map +0 -1
- package/dist/module/env/prefix-prod.d.ts +0 -7
- package/dist/module/env/prefix-prod.d.ts.map +0 -1
- package/dist/module/env/prefix-prod.js +0 -6
- package/dist/module/env/prefix-prod.js.map +0 -1
- package/dist/module/env/prefix.d.ts +0 -7
- package/dist/module/env/prefix.d.ts.map +0 -1
- package/dist/module/env/prefix.js +0 -6
- package/dist/module/env/prefix.js.map +0 -1
- package/dist/module/index.d.ts +0 -11
- package/dist/module/index.d.ts.map +0 -1
- package/dist/module/index.js +0 -12
- package/dist/module/index.js.map +0 -1
- package/dist/module/lib/auth.d.ts +0 -22
- package/dist/module/lib/auth.d.ts.map +0 -1
- package/dist/module/lib/auth.js +0 -349
- package/dist/module/lib/auth.js.map +0 -1
- package/dist/module/lib/constants.d.ts +0 -8
- package/dist/module/lib/constants.d.ts.map +0 -1
- package/dist/module/lib/constants.js +0 -8
- package/dist/module/lib/constants.js.map +0 -1
- package/dist/module/lib/db.d.ts +0 -45
- package/dist/module/lib/db.d.ts.map +0 -1
- package/dist/module/lib/db.js +0 -246
- package/dist/module/lib/db.js.map +0 -1
- package/dist/module/lib/error-codes.d.ts +0 -7
- package/dist/module/lib/error-codes.d.ts.map +0 -1
- package/dist/module/lib/error-codes.js +0 -2
- package/dist/module/lib/error-codes.js.map +0 -1
- package/dist/module/lib/errors.d.ts +0 -96
- package/dist/module/lib/errors.d.ts.map +0 -1
- package/dist/module/lib/errors.js +0 -108
- package/dist/module/lib/errors.js.map +0 -1
- package/dist/module/lib/realtime.d.ts +0 -9
- package/dist/module/lib/realtime.d.ts.map +0 -1
- package/dist/module/lib/realtime.js +0 -33
- package/dist/module/lib/realtime.js.map +0 -1
- package/dist/module/lib/request.d.ts +0 -40
- package/dist/module/lib/request.d.ts.map +0 -1
- package/dist/module/lib/request.js +0 -231
- package/dist/module/lib/request.js.map +0 -1
- package/dist/module/lib/types.d.ts +0 -408
- package/dist/module/lib/types.d.ts.map +0 -1
- package/dist/module/lib/types.js +0 -8
- package/dist/module/lib/types.js.map +0 -1
- package/dist/module/lib/util.d.ts +0 -7
- package/dist/module/lib/util.d.ts.map +0 -1
- package/dist/module/lib/util.js +0 -81
- package/dist/module/lib/util.js.map +0 -1
- package/dist/module/lib copy/auth.d.ts +0 -22
- package/dist/module/lib copy/auth.d.ts.map +0 -1
- package/dist/module/lib copy/auth.js +0 -277
- package/dist/module/lib copy/auth.js.map +0 -1
- package/dist/module/lib copy/auth_api.d.ts +0 -23
- package/dist/module/lib copy/auth_api.d.ts.map +0 -1
- package/dist/module/lib copy/auth_api.js +0 -87
- package/dist/module/lib copy/auth_api.js.map +0 -1
- package/dist/module/lib copy/constants.d.ts +0 -8
- package/dist/module/lib copy/constants.d.ts.map +0 -1
- package/dist/module/lib copy/constants.js +0 -8
- package/dist/module/lib copy/constants.js.map +0 -1
- package/dist/module/lib copy/cookies.d.ts +0 -20
- package/dist/module/lib copy/cookies.d.ts.map +0 -1
- package/dist/module/lib copy/cookies.js +0 -137
- package/dist/module/lib copy/cookies.js.map +0 -1
- package/dist/module/lib copy/db.d.ts +0 -45
- package/dist/module/lib copy/db.d.ts.map +0 -1
- package/dist/module/lib copy/db.js +0 -246
- package/dist/module/lib copy/db.js.map +0 -1
- package/dist/module/lib copy/realtime.d.ts +0 -9
- package/dist/module/lib copy/realtime.d.ts.map +0 -1
- package/dist/module/lib copy/realtime.js +0 -33
- package/dist/module/lib copy/realtime.js.map +0 -1
- package/dist/module/lib copy/request.d.ts +0 -40
- package/dist/module/lib copy/request.d.ts.map +0 -1
- package/dist/module/lib copy/request.js +0 -200
- package/dist/module/lib copy/request.js.map +0 -1
- package/dist/module/lib copy/types.d.ts +0 -124
- package/dist/module/lib copy/types.d.ts.map +0 -1
- package/dist/module/lib copy/types.js +0 -2
- package/dist/module/lib copy/types.js.map +0 -1
- package/dist/module/lib copy/util.d.ts +0 -7
- package/dist/module/lib copy/util.d.ts.map +0 -1
- package/dist/module/lib copy/util.js +0 -81
- package/dist/module/lib copy/util.js.map +0 -1
- package/dist/umd/941.omneedia.js +0 -1
- package/dist/umd/omneedia.js +0 -2
- package/dist/umd/omneedia.js.LICENSE.txt +0 -1
- package/src/OmneediaClient.ts +0 -65
- package/src/env/prefix-dev.ts +0 -5
- package/src/env/prefix-prod.ts +0 -5
- package/src/env/prefix.ts +0 -5
- package/src/index.ts +0 -26
- package/src/lib/auth.ts +0 -306
- package/src/lib/constants.ts +0 -7
- package/src/lib/db.ts +0 -216
- package/src/lib/error-codes.ts +0 -71
- package/src/lib/errors.ts +0 -153
- package/src/lib/realtime.ts +0 -21
- package/src/lib/request.ts +0 -198
- package/src/lib/types.ts +0 -512
- package/src/lib/util.ts +0 -83
package/dist/main/lib/db.js
DELETED
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const request_1 = __importDefault(require("./request"));
|
|
16
|
-
class OmneediaQueryDB {
|
|
17
|
-
constructor(table, ref) {
|
|
18
|
-
this.SELECT = [];
|
|
19
|
-
this.INSERT = {};
|
|
20
|
-
this.UPDATE = {};
|
|
21
|
-
this.DELETE = false;
|
|
22
|
-
this.WHERE = [];
|
|
23
|
-
this.ref = {};
|
|
24
|
-
this.FilterOperator = [
|
|
25
|
-
'eq',
|
|
26
|
-
'neq',
|
|
27
|
-
'gt',
|
|
28
|
-
'gte',
|
|
29
|
-
'lt',
|
|
30
|
-
'lte',
|
|
31
|
-
'like',
|
|
32
|
-
'ilike',
|
|
33
|
-
'is',
|
|
34
|
-
'in',
|
|
35
|
-
'cs',
|
|
36
|
-
'cd',
|
|
37
|
-
'sl',
|
|
38
|
-
'sr',
|
|
39
|
-
'nxl',
|
|
40
|
-
'nxr',
|
|
41
|
-
'adj',
|
|
42
|
-
'ov',
|
|
43
|
-
'fts',
|
|
44
|
-
'plfts',
|
|
45
|
-
'phfts',
|
|
46
|
-
'wfts',
|
|
47
|
-
];
|
|
48
|
-
this.TABLE = table;
|
|
49
|
-
this.ref = ref;
|
|
50
|
-
this.request = new request_1.default(this);
|
|
51
|
-
}
|
|
52
|
-
rangeLt(key, value) {
|
|
53
|
-
this.WHERE.push(`${key}=sl.${value}`);
|
|
54
|
-
return this;
|
|
55
|
-
}
|
|
56
|
-
rangeGt(key, value) {
|
|
57
|
-
this.WHERE.push(`${key}=sr.${value}`);
|
|
58
|
-
return this;
|
|
59
|
-
}
|
|
60
|
-
rangeLte(key, value) {
|
|
61
|
-
this.WHERE.push(`${key}=nxr.${value}`);
|
|
62
|
-
return this;
|
|
63
|
-
}
|
|
64
|
-
rangeGte(key, value) {
|
|
65
|
-
this.WHERE.push(`${key}=nxl.${value}`);
|
|
66
|
-
return this;
|
|
67
|
-
}
|
|
68
|
-
rangeAdjacent(key, value) {
|
|
69
|
-
this.WHERE.push(`${key}=adj.${value}`);
|
|
70
|
-
return this;
|
|
71
|
-
}
|
|
72
|
-
overlaps(key, value) {
|
|
73
|
-
if (!Array.isArray(value))
|
|
74
|
-
value = [value];
|
|
75
|
-
value = `[${value.join(',')}]`;
|
|
76
|
-
this.WHERE.push(`${key}=ov.${value}`);
|
|
77
|
-
return this;
|
|
78
|
-
}
|
|
79
|
-
not(key, value, o) {
|
|
80
|
-
if (this.FilterOperator.indexOf(value) == -1)
|
|
81
|
-
return this;
|
|
82
|
-
this.WHERE.push(`${key}=not.${value}.${o}`);
|
|
83
|
-
return this;
|
|
84
|
-
}
|
|
85
|
-
is(key, value) {
|
|
86
|
-
this.WHERE.push(`${key}=is.${value}`);
|
|
87
|
-
return this;
|
|
88
|
-
}
|
|
89
|
-
contains(key, value) {
|
|
90
|
-
if (!Array.isArray(value))
|
|
91
|
-
value = [value];
|
|
92
|
-
value = `{${value.join(',')}}`;
|
|
93
|
-
this.WHERE.push(`${key}=cs.${value}`);
|
|
94
|
-
return this;
|
|
95
|
-
}
|
|
96
|
-
containedBy(key, value) {
|
|
97
|
-
if (!Array.isArray(value))
|
|
98
|
-
value = [value];
|
|
99
|
-
value = `{${value.join(',')}}`;
|
|
100
|
-
this.WHERE.push(`${key}=cd.${value}`);
|
|
101
|
-
return this;
|
|
102
|
-
}
|
|
103
|
-
or(key) {
|
|
104
|
-
if (!Array.isArray(key))
|
|
105
|
-
key = [key];
|
|
106
|
-
if (key.length == 1)
|
|
107
|
-
key = key[0].split(',');
|
|
108
|
-
this.WHERE.push(`or=(${key.join(',')})`);
|
|
109
|
-
return this;
|
|
110
|
-
}
|
|
111
|
-
and(key) {
|
|
112
|
-
if (!Array.isArray(key))
|
|
113
|
-
key = [key];
|
|
114
|
-
if (key.length == 1)
|
|
115
|
-
key = key[0].split(',');
|
|
116
|
-
this.WHERE.push(`and=(${key.join(',')})`);
|
|
117
|
-
return this;
|
|
118
|
-
}
|
|
119
|
-
textSearch(key, value, o) {
|
|
120
|
-
let typePart = '';
|
|
121
|
-
if (o) {
|
|
122
|
-
if (o.type === 'plain') {
|
|
123
|
-
typePart = 'pl';
|
|
124
|
-
}
|
|
125
|
-
else if (o.type === 'phrase') {
|
|
126
|
-
typePart = 'ph';
|
|
127
|
-
}
|
|
128
|
-
else if (o.type === 'websearch') {
|
|
129
|
-
typePart = 'w';
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
let method = `${typePart}fts`;
|
|
133
|
-
this.WHERE.push(`${key}=${method}.${value}`);
|
|
134
|
-
return this;
|
|
135
|
-
}
|
|
136
|
-
in(key, value) {
|
|
137
|
-
if (!Array.isArray(value))
|
|
138
|
-
value = [value];
|
|
139
|
-
value = `(${value.join(',')})`;
|
|
140
|
-
this.WHERE.push(`${key}=in.${value}`);
|
|
141
|
-
return this;
|
|
142
|
-
}
|
|
143
|
-
nxr(key, value) {
|
|
144
|
-
if (!Array.isArray(value))
|
|
145
|
-
value = [value];
|
|
146
|
-
value = `(${value.join(',')})`;
|
|
147
|
-
this.WHERE.push(`${key}=nxr.${value}`);
|
|
148
|
-
return this;
|
|
149
|
-
}
|
|
150
|
-
sl(key, value) {
|
|
151
|
-
if (!Array.isArray(value))
|
|
152
|
-
value = [value];
|
|
153
|
-
value = `(${value.join(',')})`;
|
|
154
|
-
this.WHERE.push(`${key}=sl.${value}`);
|
|
155
|
-
return this;
|
|
156
|
-
}
|
|
157
|
-
adj(key, value) {
|
|
158
|
-
if (!Array.isArray(value))
|
|
159
|
-
value = [value];
|
|
160
|
-
value = `(${value.join(',')})`;
|
|
161
|
-
this.WHERE.push(`${key}=adj.${value}`);
|
|
162
|
-
return this;
|
|
163
|
-
}
|
|
164
|
-
imatch(key) {
|
|
165
|
-
for (var el in key) {
|
|
166
|
-
this.WHERE.push(`${el}=eq.${key[el]}`);
|
|
167
|
-
}
|
|
168
|
-
return this;
|
|
169
|
-
}
|
|
170
|
-
match(key) {
|
|
171
|
-
for (var el in key) {
|
|
172
|
-
this.WHERE.push(`${el}=eq.${key[el]}`);
|
|
173
|
-
}
|
|
174
|
-
return this;
|
|
175
|
-
}
|
|
176
|
-
gt(key, value) {
|
|
177
|
-
this.WHERE.push(`${key}=gt.${value}`);
|
|
178
|
-
return this;
|
|
179
|
-
}
|
|
180
|
-
gte(key, value) {
|
|
181
|
-
this.WHERE.push(`${key}=gte.${value}`);
|
|
182
|
-
return this;
|
|
183
|
-
}
|
|
184
|
-
lt(key, value) {
|
|
185
|
-
this.WHERE.push(`${key}=lt.${value}`);
|
|
186
|
-
return this;
|
|
187
|
-
}
|
|
188
|
-
lte(key, value) {
|
|
189
|
-
this.WHERE.push(`${key}=lte.${value}`);
|
|
190
|
-
return this;
|
|
191
|
-
}
|
|
192
|
-
neq(key, value) {
|
|
193
|
-
this.WHERE.push(`${key}=neq.${value}`);
|
|
194
|
-
return this;
|
|
195
|
-
}
|
|
196
|
-
like(key, value) {
|
|
197
|
-
this.WHERE.push(`${key}=like.${value}`);
|
|
198
|
-
return this;
|
|
199
|
-
}
|
|
200
|
-
ilike(key, value) {
|
|
201
|
-
this.WHERE.push(`${key}=ilike.${value}`);
|
|
202
|
-
return this;
|
|
203
|
-
}
|
|
204
|
-
eq(key, value) {
|
|
205
|
-
this.WHERE.push(`${key}=eq.${value}`);
|
|
206
|
-
return this;
|
|
207
|
-
}
|
|
208
|
-
select(...s) {
|
|
209
|
-
if (!s)
|
|
210
|
-
s = [''];
|
|
211
|
-
if (s.length == 1)
|
|
212
|
-
s = s[0].split(',');
|
|
213
|
-
this.SELECT = s;
|
|
214
|
-
return this;
|
|
215
|
-
}
|
|
216
|
-
insert(o) {
|
|
217
|
-
this.INSERT = o;
|
|
218
|
-
return this;
|
|
219
|
-
}
|
|
220
|
-
update(o) {
|
|
221
|
-
this.UPDATE = o;
|
|
222
|
-
return this;
|
|
223
|
-
}
|
|
224
|
-
delete() {
|
|
225
|
-
this.DELETE = true;
|
|
226
|
-
return this;
|
|
227
|
-
}
|
|
228
|
-
then(resolve, reject) {
|
|
229
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
230
|
-
var uri = `/${this.TABLE}?`;
|
|
231
|
-
if (Object.keys(this.INSERT).length > 0) {
|
|
232
|
-
var url = this.ref.PREFIX.REST + uri;
|
|
233
|
-
return resolve(this.request.post(url, this.INSERT));
|
|
234
|
-
}
|
|
235
|
-
if (this.SELECT.length > 0)
|
|
236
|
-
uri += `select=${this.SELECT.join(',')}&`;
|
|
237
|
-
if (this.WHERE.length > 0)
|
|
238
|
-
uri += this.WHERE.join('&');
|
|
239
|
-
var url = this.ref.PREFIX.REST + uri;
|
|
240
|
-
var method = 'get';
|
|
241
|
-
if (this.DELETE === true)
|
|
242
|
-
method = 'delete';
|
|
243
|
-
if (Object.keys(this.UPDATE).length > 0) {
|
|
244
|
-
resolve(this.request.patch(url, this.UPDATE));
|
|
245
|
-
}
|
|
246
|
-
else
|
|
247
|
-
resolve(this.request[method](url));
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
exports.default = OmneediaQueryDB;
|
|
252
|
-
//# sourceMappingURL=db.js.map
|
package/dist/main/lib/db.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db.js","sourceRoot":"","sources":["../../../src/lib/db.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,w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C,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;gBACvC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;aAC9C;;gBAAM,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;QAC3C,CAAC;KAAA;CACF;AArND,kCAqNC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Known error codes. Note that the server may also return other error codes
|
|
3
|
-
* not included in this list (if the client library is older than the version
|
|
4
|
-
* on the server).
|
|
5
|
-
*/
|
|
6
|
-
export type ErrorCode = 'unexpected_failure' | 'validation_failed' | 'bad_json' | 'email_exists' | 'phone_exists' | 'bad_jwt' | 'not_admin' | 'no_authorization' | 'user_not_found' | 'session_not_found' | 'flow_state_not_found' | 'flow_state_expired' | 'signup_disabled' | 'user_banned' | 'provider_email_needs_verification' | 'invite_not_found' | 'bad_oauth_state' | 'bad_oauth_callback' | 'oauth_provider_not_supported' | 'unexpected_audience' | 'single_identity_not_deletable' | 'email_conflict_identity_not_deletable' | 'identity_already_exists' | 'email_provider_disabled' | 'phone_provider_disabled' | 'too_many_enrolled_mfa_factors' | 'mfa_factor_name_conflict' | 'mfa_factor_not_found' | 'mfa_ip_address_mismatch' | 'mfa_challenge_expired' | 'mfa_verification_failed' | 'mfa_verification_rejected' | 'insufficient_aal' | 'captcha_failed' | 'saml_provider_disabled' | 'manual_linking_disabled' | 'sms_send_failed' | 'email_not_confirmed' | 'phone_not_confirmed' | 'reauth_nonce_missing' | 'saml_relay_state_not_found' | 'saml_relay_state_expired' | 'saml_idp_not_found' | 'saml_assertion_no_user_id' | 'saml_assertion_no_email' | 'user_already_exists' | 'sso_provider_not_found' | 'saml_metadata_fetch_failed' | 'saml_idp_already_exists' | 'sso_domain_already_exists' | 'saml_entity_id_mismatch' | 'conflict' | 'provider_disabled' | 'user_sso_managed' | 'reauthentication_needed' | 'same_password' | 'reauthentication_not_valid' | 'otp_expired' | 'otp_disabled' | 'identity_not_found' | 'weak_password' | 'over_request_rate_limit' | 'over_email_send_rate_limit' | 'over_sms_send_rate_limit' | 'bad_code_verifier';
|
|
7
|
-
//# sourceMappingURL=error-codes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../../src/lib/error-codes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,SAAS,GACjB,oBAAoB,GACpB,mBAAmB,GACnB,UAAU,GACV,cAAc,GACd,cAAc,GACd,SAAS,GACT,WAAW,GACX,kBAAkB,GAClB,gBAAgB,GAChB,mBAAmB,GACnB,sBAAsB,GACtB,oBAAoB,GACpB,iBAAiB,GACjB,aAAa,GACb,mCAAmC,GACnC,kBAAkB,GAClB,iBAAiB,GACjB,oBAAoB,GACpB,8BAA8B,GAC9B,qBAAqB,GACrB,+BAA+B,GAC/B,uCAAuC,GACvC,yBAAyB,GACzB,yBAAyB,GACzB,yBAAyB,GACzB,+BAA+B,GAC/B,0BAA0B,GAC1B,sBAAsB,GACtB,yBAAyB,GACzB,uBAAuB,GACvB,yBAAyB,GACzB,2BAA2B,GAC3B,kBAAkB,GAClB,gBAAgB,GAChB,wBAAwB,GACxB,yBAAyB,GACzB,iBAAiB,GACjB,qBAAqB,GACrB,qBAAqB,GACrB,sBAAsB,GACtB,4BAA4B,GAC5B,0BAA0B,GAC1B,oBAAoB,GACpB,2BAA2B,GAC3B,yBAAyB,GACzB,qBAAqB,GACrB,wBAAwB,GACxB,4BAA4B,GAC5B,yBAAyB,GACzB,2BAA2B,GAC3B,yBAAyB,GACzB,UAAU,GACV,mBAAmB,GACnB,kBAAkB,GAClB,yBAAyB,GACzB,eAAe,GACf,4BAA4B,GAC5B,aAAa,GACb,cAAc,GACd,oBAAoB,GACpB,eAAe,GACf,yBAAyB,GACzB,4BAA4B,GAC5B,0BAA0B,GAC1B,mBAAmB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-codes.js","sourceRoot":"","sources":["../../../src/lib/error-codes.ts"],"names":[],"mappings":""}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { WeakPasswordReasons } from './types';
|
|
2
|
-
import { ErrorCode } from './error-codes';
|
|
3
|
-
export declare class AuthError extends Error {
|
|
4
|
-
/**
|
|
5
|
-
* Error code associated with the error. Most errors coming from
|
|
6
|
-
* HTTP responses will have a code, though some errors that occur
|
|
7
|
-
* before a response is received will not have one present. In that
|
|
8
|
-
* case {@link #status} will also be undefined.
|
|
9
|
-
*/
|
|
10
|
-
code: ErrorCode | string | undefined;
|
|
11
|
-
/** HTTP status code that caused the error. */
|
|
12
|
-
status: number | undefined;
|
|
13
|
-
protected __isAuthError: boolean;
|
|
14
|
-
constructor(message: string, status?: number, code?: string);
|
|
15
|
-
}
|
|
16
|
-
export declare function isAuthError(error: unknown): error is AuthError;
|
|
17
|
-
export declare class AuthApiError extends AuthError {
|
|
18
|
-
status: number;
|
|
19
|
-
constructor(message: string, status: number, code: string | undefined);
|
|
20
|
-
}
|
|
21
|
-
export declare function isAuthApiError(error: unknown): error is AuthApiError;
|
|
22
|
-
export declare class AuthUnknownError extends AuthError {
|
|
23
|
-
originalError: unknown;
|
|
24
|
-
constructor(message: string, originalError: unknown);
|
|
25
|
-
}
|
|
26
|
-
export declare class CustomAuthError extends AuthError {
|
|
27
|
-
name: string;
|
|
28
|
-
status: number;
|
|
29
|
-
constructor(message: string, name: string, status: number, code: string | undefined);
|
|
30
|
-
}
|
|
31
|
-
export declare class AuthSessionMissingError extends CustomAuthError {
|
|
32
|
-
constructor();
|
|
33
|
-
}
|
|
34
|
-
export declare function isAuthSessionMissingError(error: any): error is AuthSessionMissingError;
|
|
35
|
-
export declare class AuthInvalidTokenResponseError extends CustomAuthError {
|
|
36
|
-
constructor();
|
|
37
|
-
}
|
|
38
|
-
export declare class AuthInvalidCredentialsError extends CustomAuthError {
|
|
39
|
-
constructor(message: string);
|
|
40
|
-
}
|
|
41
|
-
export declare class AuthImplicitGrantRedirectError extends CustomAuthError {
|
|
42
|
-
details: {
|
|
43
|
-
error: string;
|
|
44
|
-
code: string;
|
|
45
|
-
} | null;
|
|
46
|
-
constructor(message: string, details?: {
|
|
47
|
-
error: string;
|
|
48
|
-
code: string;
|
|
49
|
-
} | null);
|
|
50
|
-
toJSON(): {
|
|
51
|
-
name: string;
|
|
52
|
-
message: string;
|
|
53
|
-
status: number;
|
|
54
|
-
details: {
|
|
55
|
-
error: string;
|
|
56
|
-
code: string;
|
|
57
|
-
} | null;
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
export declare class AuthPKCEGrantCodeExchangeError extends CustomAuthError {
|
|
61
|
-
details: {
|
|
62
|
-
error: string;
|
|
63
|
-
code: string;
|
|
64
|
-
} | null;
|
|
65
|
-
constructor(message: string, details?: {
|
|
66
|
-
error: string;
|
|
67
|
-
code: string;
|
|
68
|
-
} | null);
|
|
69
|
-
toJSON(): {
|
|
70
|
-
name: string;
|
|
71
|
-
message: string;
|
|
72
|
-
status: number;
|
|
73
|
-
details: {
|
|
74
|
-
error: string;
|
|
75
|
-
code: string;
|
|
76
|
-
} | null;
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
export declare class AuthRetryableFetchError extends CustomAuthError {
|
|
80
|
-
constructor(message: string, status: number);
|
|
81
|
-
}
|
|
82
|
-
export declare function isAuthRetryableFetchError(error: unknown): error is AuthRetryableFetchError;
|
|
83
|
-
/**
|
|
84
|
-
* This error is thrown on certain methods when the password used is deemed
|
|
85
|
-
* weak. Inspect the reasons to identify what password strength rules are
|
|
86
|
-
* inadequate.
|
|
87
|
-
*/
|
|
88
|
-
export declare class AuthWeakPasswordError extends CustomAuthError {
|
|
89
|
-
/**
|
|
90
|
-
* Reasons why the password is deemed weak.
|
|
91
|
-
*/
|
|
92
|
-
reasons: WeakPasswordReasons[];
|
|
93
|
-
constructor(message: string, status: number, reasons: string[]);
|
|
94
|
-
}
|
|
95
|
-
export declare function isAuthWeakPasswordError(error: unknown): error is AuthWeakPasswordError;
|
|
96
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/lib/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzC,qBAAa,SAAU,SAAQ,KAAK;IAClC;;;;;OAKG;IACH,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAAA;IAEpC,8CAA8C;IAC9C,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAE1B,SAAS,CAAC,aAAa,UAAO;gBAElB,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;CAM5D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAE9D;AAED,qBAAa,YAAa,SAAQ,SAAS;IACzC,MAAM,EAAE,MAAM,CAAA;gBAEF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS;CAMtE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE;AAED,qBAAa,gBAAiB,SAAQ,SAAS;IAC7C,aAAa,EAAE,OAAO,CAAA;gBAEV,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO;CAKpD;AAED,qBAAa,eAAgB,SAAQ,SAAS;IAC5C,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;gBAEF,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAA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AED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,qBAAqB,CAEtF"}
|
package/dist/main/lib/errors.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isAuthWeakPasswordError = exports.AuthWeakPasswordError = exports.isAuthRetryableFetchError = exports.AuthRetryableFetchError = exports.AuthPKCEGrantCodeExchangeError = exports.AuthImplicitGrantRedirectError = exports.AuthInvalidCredentialsError = exports.AuthInvalidTokenResponseError = exports.isAuthSessionMissingError = exports.AuthSessionMissingError = exports.CustomAuthError = exports.AuthUnknownError = exports.isAuthApiError = exports.AuthApiError = exports.isAuthError = exports.AuthError = void 0;
|
|
4
|
-
class AuthError extends Error {
|
|
5
|
-
constructor(message, status, code) {
|
|
6
|
-
super(message);
|
|
7
|
-
this.__isAuthError = true;
|
|
8
|
-
this.name = 'AuthError';
|
|
9
|
-
this.status = status;
|
|
10
|
-
this.code = code;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.AuthError = AuthError;
|
|
14
|
-
function isAuthError(error) {
|
|
15
|
-
return typeof error === 'object' && error !== null && '__isAuthError' in error;
|
|
16
|
-
}
|
|
17
|
-
exports.isAuthError = isAuthError;
|
|
18
|
-
class AuthApiError extends AuthError {
|
|
19
|
-
constructor(message, status, code) {
|
|
20
|
-
super(message, status, code);
|
|
21
|
-
this.name = 'AuthApiError';
|
|
22
|
-
this.status = status;
|
|
23
|
-
this.code = code;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.AuthApiError = AuthApiError;
|
|
27
|
-
function isAuthApiError(error) {
|
|
28
|
-
return isAuthError(error) && error.name === 'AuthApiError';
|
|
29
|
-
}
|
|
30
|
-
exports.isAuthApiError = isAuthApiError;
|
|
31
|
-
class AuthUnknownError extends AuthError {
|
|
32
|
-
constructor(message, originalError) {
|
|
33
|
-
super(message);
|
|
34
|
-
this.name = 'AuthUnknownError';
|
|
35
|
-
this.originalError = originalError;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.AuthUnknownError = AuthUnknownError;
|
|
39
|
-
class CustomAuthError extends AuthError {
|
|
40
|
-
constructor(message, name, status, code) {
|
|
41
|
-
super(message, status, code);
|
|
42
|
-
this.name = name;
|
|
43
|
-
this.status = status;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.CustomAuthError = CustomAuthError;
|
|
47
|
-
class AuthSessionMissingError extends CustomAuthError {
|
|
48
|
-
constructor() {
|
|
49
|
-
super('Auth session missing!', 'AuthSessionMissingError', 400, undefined);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
exports.AuthSessionMissingError = AuthSessionMissingError;
|
|
53
|
-
function isAuthSessionMissingError(error) {
|
|
54
|
-
return isAuthError(error) && error.name === 'AuthSessionMissingError';
|
|
55
|
-
}
|
|
56
|
-
exports.isAuthSessionMissingError = isAuthSessionMissingError;
|
|
57
|
-
class AuthInvalidTokenResponseError extends CustomAuthError {
|
|
58
|
-
constructor() {
|
|
59
|
-
super('Auth session or user missing', 'AuthInvalidTokenResponseError', 500, undefined);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.AuthInvalidTokenResponseError = AuthInvalidTokenResponseError;
|
|
63
|
-
class AuthInvalidCredentialsError extends CustomAuthError {
|
|
64
|
-
constructor(message) {
|
|
65
|
-
super(message, 'AuthInvalidCredentialsError', 400, undefined);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
exports.AuthInvalidCredentialsError = AuthInvalidCredentialsError;
|
|
69
|
-
class AuthImplicitGrantRedirectError extends CustomAuthError {
|
|
70
|
-
constructor(message, details = null) {
|
|
71
|
-
super(message, 'AuthImplicitGrantRedirectError', 500, undefined);
|
|
72
|
-
this.details = null;
|
|
73
|
-
this.details = details;
|
|
74
|
-
}
|
|
75
|
-
toJSON() {
|
|
76
|
-
return {
|
|
77
|
-
name: this.name,
|
|
78
|
-
message: this.message,
|
|
79
|
-
status: this.status,
|
|
80
|
-
details: this.details,
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
exports.AuthImplicitGrantRedirectError = AuthImplicitGrantRedirectError;
|
|
85
|
-
class AuthPKCEGrantCodeExchangeError extends CustomAuthError {
|
|
86
|
-
constructor(message, details = null) {
|
|
87
|
-
super(message, 'AuthPKCEGrantCodeExchangeError', 500, undefined);
|
|
88
|
-
this.details = null;
|
|
89
|
-
this.details = details;
|
|
90
|
-
}
|
|
91
|
-
toJSON() {
|
|
92
|
-
return {
|
|
93
|
-
name: this.name,
|
|
94
|
-
message: this.message,
|
|
95
|
-
status: this.status,
|
|
96
|
-
details: this.details,
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
exports.AuthPKCEGrantCodeExchangeError = AuthPKCEGrantCodeExchangeError;
|
|
101
|
-
class AuthRetryableFetchError extends CustomAuthError {
|
|
102
|
-
constructor(message, status) {
|
|
103
|
-
super(message, 'AuthRetryableFetchError', status, undefined);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
exports.AuthRetryableFetchError = AuthRetryableFetchError;
|
|
107
|
-
function isAuthRetryableFetchError(error) {
|
|
108
|
-
return isAuthError(error) && error.name === 'AuthRetryableFetchError';
|
|
109
|
-
}
|
|
110
|
-
exports.isAuthRetryableFetchError = isAuthRetryableFetchError;
|
|
111
|
-
/**
|
|
112
|
-
* This error is thrown on certain methods when the password used is deemed
|
|
113
|
-
* weak. Inspect the reasons to identify what password strength rules are
|
|
114
|
-
* inadequate.
|
|
115
|
-
*/
|
|
116
|
-
class AuthWeakPasswordError extends CustomAuthError {
|
|
117
|
-
constructor(message, status, reasons) {
|
|
118
|
-
super(message, 'AuthWeakPasswordError', status, 'weak_password');
|
|
119
|
-
this.reasons = reasons;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
exports.AuthWeakPasswordError = AuthWeakPasswordError;
|
|
123
|
-
function isAuthWeakPasswordError(error) {
|
|
124
|
-
return isAuthError(error) && error.name === 'AuthWeakPasswordError';
|
|
125
|
-
}
|
|
126
|
-
exports.isAuthWeakPasswordError = isAuthWeakPasswordError;
|
|
127
|
-
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/lib/errors.ts"],"names":[],"mappings":";;;AAGA,MAAa,SAAU,SAAQ,KAAK;IAclC,YAAY,OAAe,EAAE,MAAe,EAAE,IAAa;QACzD,KAAK,CAAC,OAAO,CAAC,CAAA;QAHN,kBAAa,GAAG,IAAI,CAAA;QAI5B,IAAI,CAAC,IAAI,GAAG,WAAW,CAAA;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;CACF;AApBD,8BAoBC;AAED,SAAgB,WAAW,CAAC,KAAc;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,eAAe,IAAI,KAAK,CAAA;AAChF,CAAC;AAFD,kCAEC;AAED,MAAa,YAAa,SAAQ,SAAS;IAGzC,YAAY,OAAe,EAAE,MAAc,EAAE,IAAwB;QACnE,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;QAC5B,IAAI,CAAC,IAAI,GAAG,cAAc,CAAA;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;CACF;AATD,oCASC;AAED,SAAgB,cAAc,CAAC,KAAc;IAC3C,OAAO,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,CAAA;AAC5D,CAAC;AAFD,wCAEC;AAED,MAAa,gBAAiB,SAAQ,SAAS;IAG7C,YAAY,OAAe,EAAE,aAAs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IACpD,OAAO,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,uBAAuB,CAAA;AACrE,CAAC;AAFD,0DAEC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export default class OmneediaRealtime {
|
|
2
|
-
protected Channel: string;
|
|
3
|
-
protected ref: any;
|
|
4
|
-
constructor(channel: string, ref: any);
|
|
5
|
-
send(message: any): Promise<this>;
|
|
6
|
-
on(type: string, event: any, cb: Function): this;
|
|
7
|
-
subscribe(callback: Function): this;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=realtime.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"realtime.d.ts","sourceRoot":"","sources":["../../../src/lib/realtime.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACnC,SAAS,CAAC,OAAO,EAAE,MAAM,CAAK;IAC9B,SAAS,CAAC,GAAG,EAAE,GAAG,CAAO;gBACb,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG;IAIxB,IAAI,CAAC,OAAO,EAAE,GAAG;IAIvB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,QAAQ;IAIzC,SAAS,CAAC,QAAQ,EAAE,QAAQ;CAKpC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
class OmneediaRealtime {
|
|
13
|
-
constructor(channel, ref) {
|
|
14
|
-
this.Channel = '';
|
|
15
|
-
this.ref = null;
|
|
16
|
-
this.Channel = channel;
|
|
17
|
-
this.ref = ref;
|
|
18
|
-
}
|
|
19
|
-
send(message) {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
this.ref.socket.emit(this.Channel + '::' + message.type + '::' + message.event, message.payload);
|
|
22
|
-
return this;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
on(type, event, cb) {
|
|
26
|
-
this.ref.socket.on(`${this.Channel}::${type}::${event.event}`, cb);
|
|
27
|
-
return this;
|
|
28
|
-
}
|
|
29
|
-
subscribe(callback) {
|
|
30
|
-
this.ref.socket.on(`${this.Channel}:SUBSCRIBED`, callback);
|
|
31
|
-
this.ref.socket.emit('subscribe', this.Channel);
|
|
32
|
-
return this;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.default = OmneediaRealtime;
|
|
36
|
-
//# sourceMappingURL=realtime.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"realtime.js","sourceRoot":"","sources":["../../../src/lib/realtime.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,MAAqB,gBAAgB;IAGnC,YAAY,OAAe,EAAE,GAAQ;QAF3B,YAAO,GAAW,EAAE,CAAA;QACpB,QAAG,GAAQ,IAAI,CAAA;QAEvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;IAChB,CAAC;IACY,IAAI,CAAC,OAAY;;YAC5B,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;YAChG,OAAO,IAAI,CAAA;QACb,CAAC;KAAA;IACM,EAAE,CAAC,IAAY,EAAE,KAAU,EAAE,EAAY;QAC9C,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,KAAK,IAAI,KAAK,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,CAAC,CAAA;QAClE,OAAO,IAAI,CAAA;IACb,CAAC;IACM,SAAS,CAAC,QAAkB;QACjC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,aAAa,EAAE,QAAQ,CAAC,CAAA;QAC1D,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;QAC/C,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AApBD,mCAoBC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export interface TResponse {
|
|
2
|
-
data: undefined | {};
|
|
3
|
-
error: undefined | {};
|
|
4
|
-
statusText: string;
|
|
5
|
-
status: BigInteger;
|
|
6
|
-
}
|
|
7
|
-
export default class OmneediaRequest {
|
|
8
|
-
private url;
|
|
9
|
-
private options?;
|
|
10
|
-
private ref?;
|
|
11
|
-
private fetch;
|
|
12
|
-
constructor(ref: any);
|
|
13
|
-
get(uri: string, o: any): Promise<{
|
|
14
|
-
data: null;
|
|
15
|
-
error: null;
|
|
16
|
-
statusText: any;
|
|
17
|
-
status: any;
|
|
18
|
-
}>;
|
|
19
|
-
delete(uri: string, o: any): Promise<{
|
|
20
|
-
data: any;
|
|
21
|
-
statusText: any;
|
|
22
|
-
status: any;
|
|
23
|
-
}>;
|
|
24
|
-
patch(uri: string, o: any): Promise<{
|
|
25
|
-
data: any;
|
|
26
|
-
statusText: any;
|
|
27
|
-
status: any;
|
|
28
|
-
}>;
|
|
29
|
-
put(uri: string, o: any): Promise<{
|
|
30
|
-
data: any;
|
|
31
|
-
statusText: any;
|
|
32
|
-
status: any;
|
|
33
|
-
}>;
|
|
34
|
-
post(uri: string, o: any): Promise<{
|
|
35
|
-
data: any;
|
|
36
|
-
statusText: any;
|
|
37
|
-
status: any;
|
|
38
|
-
}>;
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=request.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/lib/request.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,SAAS,GAAG,EAAE,CAAA;IACpB,KAAK,EAAE,SAAS,GAAG,EAAE,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,UAAU,CAAA;CACnB;AAED,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC,OAAO,CAAC,GAAG,CAAa;IACxB,OAAO,CAAC,OAAO,CAAC,CAAK;IACrB,OAAO,CAAC,GAAG,CAAC,CAAK;IACjB,OAAO,CAAC,KAAK,CAAK;gBACN,GAAG,EAAE,GAAG;IAQd,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG;;;;;;IAiCvB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG;;;;;IAoC1B,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG;;;;;IAmCzB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG;;;;;IAmCvB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG;;;;;CAmC/B"}
|