rtc4js 0.0.1
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/.editorconfig +16 -0
- package/.env +7 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -0
- package/dist/rapid-table-connector.d.ts +35 -0
- package/dist/rapid-table-connector.js +295 -0
- package/dist/rapid-table-connector.js.map +1 -0
- package/dist/resource/delete-request.interface.d.ts +6 -0
- package/dist/resource/delete-request.interface.js +15 -0
- package/dist/resource/delete-request.interface.js.map +1 -0
- package/dist/resource/drive/drive-component-type.d.ts +6 -0
- package/dist/resource/drive/drive-component-type.js +23 -0
- package/dist/resource/drive/drive-component-type.js.map +1 -0
- package/dist/resource/drive/drive-count-request.d.ts +30 -0
- package/dist/resource/drive/drive-count-request.js +75 -0
- package/dist/resource/drive/drive-count-request.js.map +1 -0
- package/dist/resource/drive/drive-get-metadata-request.d.ts +24 -0
- package/dist/resource/drive/drive-get-metadata-request.js +55 -0
- package/dist/resource/drive/drive-get-metadata-request.js.map +1 -0
- package/dist/resource/drive/drive-get-object-request.d.ts +17 -0
- package/dist/resource/drive/drive-get-object-request.js +68 -0
- package/dist/resource/drive/drive-get-object-request.js.map +1 -0
- package/dist/resource/drive/drive-response.d.ts +21 -0
- package/dist/resource/drive/drive-response.js +41 -0
- package/dist/resource/drive/drive-response.js.map +1 -0
- package/dist/resource/drive/drive-search-request.d.ts +32 -0
- package/dist/resource/drive/drive-search-request.js +91 -0
- package/dist/resource/drive/drive-search-request.js.map +1 -0
- package/dist/resource/generate-id-request.interface.d.ts +3 -0
- package/dist/resource/generate-id-request.interface.js +15 -0
- package/dist/resource/generate-id-request.interface.js.map +1 -0
- package/dist/resource/get-object-response.d.ts +8 -0
- package/dist/resource/get-object-response.js +25 -0
- package/dist/resource/get-object-response.js.map +1 -0
- package/dist/resource/path-config.d.ts +14 -0
- package/dist/resource/path-config.js +31 -0
- package/dist/resource/path-config.js.map +1 -0
- package/dist/resource/put-object-request.interface.d.ts +5 -0
- package/dist/resource/put-object-request.interface.js +3 -0
- package/dist/resource/put-object-request.interface.js.map +1 -0
- package/dist/resource/report/report-count-request.d.ts +100 -0
- package/dist/resource/report/report-count-request.js +207 -0
- package/dist/resource/report/report-count-request.js.map +1 -0
- package/dist/resource/report/report-create-request.d.ts +24 -0
- package/dist/resource/report/report-create-request.js +67 -0
- package/dist/resource/report/report-create-request.js.map +1 -0
- package/dist/resource/report/report-delete-object-request.d.ts +24 -0
- package/dist/resource/report/report-delete-object-request.js +86 -0
- package/dist/resource/report/report-delete-object-request.js.map +1 -0
- package/dist/resource/report/report-delete-request.d.ts +23 -0
- package/dist/resource/report/report-delete-request.js +64 -0
- package/dist/resource/report/report-delete-request.js.map +1 -0
- package/dist/resource/report/report-generate-id-request.d.ts +17 -0
- package/dist/resource/report/report-generate-id-request.js +56 -0
- package/dist/resource/report/report-generate-id-request.js.map +1 -0
- package/dist/resource/report/report-get-object-request.d.ts +22 -0
- package/dist/resource/report/report-get-object-request.js +63 -0
- package/dist/resource/report/report-get-object-request.js.map +1 -0
- package/dist/resource/report/report-get-request.d.ts +26 -0
- package/dist/resource/report/report-get-request.js +61 -0
- package/dist/resource/report/report-get-request.js.map +1 -0
- package/dist/resource/report/report-put-object-request.d.ts +22 -0
- package/dist/resource/report/report-put-object-request.js +74 -0
- package/dist/resource/report/report-put-object-request.js.map +1 -0
- package/dist/resource/report/report-request-model.d.ts +13 -0
- package/dist/resource/report/report-request-model.js +27 -0
- package/dist/resource/report/report-request-model.js.map +1 -0
- package/dist/resource/report/report-response.d.ts +19 -0
- package/dist/resource/report/report-response.js +65 -0
- package/dist/resource/report/report-response.js.map +1 -0
- package/dist/resource/report/report-search-request.d.ts +128 -0
- package/dist/resource/report/report-search-request.js +260 -0
- package/dist/resource/report/report-search-request.js.map +1 -0
- package/dist/resource/report/report-update-request.d.ts +24 -0
- package/dist/resource/report/report-update-request.js +67 -0
- package/dist/resource/report/report-update-request.js.map +1 -0
- package/dist/resource/request.interface.d.ts +7 -0
- package/dist/resource/request.interface.js +15 -0
- package/dist/resource/request.interface.js.map +1 -0
- package/jest.config.ts +11 -0
- package/package.json +30 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Rapid Table, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the 'License').
|
|
6
|
+
* You may not use this file except in compliance with the License. A copy of the License is located at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR
|
|
11
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
12
|
+
* and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ReportSearchRequest = void 0;
|
|
16
|
+
const path_config_1 = require("../path-config");
|
|
17
|
+
class ReportSearchRequest {
|
|
18
|
+
constructor(path, query) {
|
|
19
|
+
this.path = path;
|
|
20
|
+
this.query = query;
|
|
21
|
+
this.path = path;
|
|
22
|
+
this.query = query;
|
|
23
|
+
}
|
|
24
|
+
getPath() {
|
|
25
|
+
return this.path;
|
|
26
|
+
}
|
|
27
|
+
getQuery() {
|
|
28
|
+
return this.query;
|
|
29
|
+
}
|
|
30
|
+
getBody() {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
static builder() {
|
|
34
|
+
return new Builder();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.ReportSearchRequest = ReportSearchRequest;
|
|
38
|
+
class Builder {
|
|
39
|
+
constructor() {
|
|
40
|
+
this._workspaceId = null;
|
|
41
|
+
this._projectId = null;
|
|
42
|
+
this._page = null;
|
|
43
|
+
this._size = null;
|
|
44
|
+
this._asc = null;
|
|
45
|
+
this._desc = null;
|
|
46
|
+
this._query = null;
|
|
47
|
+
this._emp = null;
|
|
48
|
+
this._noemp = null;
|
|
49
|
+
this._includes = [];
|
|
50
|
+
this._eq = null;
|
|
51
|
+
this._neq = null;
|
|
52
|
+
this._lt = null;
|
|
53
|
+
this._lte = null;
|
|
54
|
+
this._gt = null;
|
|
55
|
+
this._gte = null;
|
|
56
|
+
this._term = null;
|
|
57
|
+
}
|
|
58
|
+
build() {
|
|
59
|
+
const path = path_config_1.PathConfig.ROOT + path_config_1.PathConfig.WORKSPACE + `/${this._workspaceId}` +
|
|
60
|
+
path_config_1.PathConfig.PROJECTS + `/${this._projectId}` +
|
|
61
|
+
path_config_1.PathConfig.REPORTS +
|
|
62
|
+
path_config_1.PathConfig.SEARCH;
|
|
63
|
+
const params = {};
|
|
64
|
+
if (this._page) {
|
|
65
|
+
params['page'] = this._page;
|
|
66
|
+
}
|
|
67
|
+
if (this._size) {
|
|
68
|
+
params['size'] = this._size;
|
|
69
|
+
}
|
|
70
|
+
if (this._asc) {
|
|
71
|
+
params['asc'] = this._asc;
|
|
72
|
+
}
|
|
73
|
+
if (this._desc) {
|
|
74
|
+
params['desc'] = this._desc;
|
|
75
|
+
}
|
|
76
|
+
if (this._query) {
|
|
77
|
+
params['query'] = this._query;
|
|
78
|
+
}
|
|
79
|
+
if (this._emp) {
|
|
80
|
+
params['emp'] = this._emp;
|
|
81
|
+
}
|
|
82
|
+
if (this._noemp) {
|
|
83
|
+
params['noemp'] = this._noemp;
|
|
84
|
+
}
|
|
85
|
+
if (Array.isArray(this._includes) && this._includes.length > 0) {
|
|
86
|
+
params['includes'] = this._includes.join(';');
|
|
87
|
+
}
|
|
88
|
+
if (this._eq) {
|
|
89
|
+
params['eq'] = this._eq;
|
|
90
|
+
}
|
|
91
|
+
if (this._neq) {
|
|
92
|
+
params['neq'] = this._neq;
|
|
93
|
+
}
|
|
94
|
+
if (this._lt) {
|
|
95
|
+
params['lt'] = this._lt;
|
|
96
|
+
}
|
|
97
|
+
if (this._lte) {
|
|
98
|
+
params['lte'] = this._lte;
|
|
99
|
+
}
|
|
100
|
+
if (this._gt) {
|
|
101
|
+
params['gt'] = this._gt;
|
|
102
|
+
}
|
|
103
|
+
if (this._gte) {
|
|
104
|
+
params['gte'] = this._gte;
|
|
105
|
+
}
|
|
106
|
+
if (this._term) {
|
|
107
|
+
params['term'] = this._term;
|
|
108
|
+
}
|
|
109
|
+
return new ReportSearchRequest(path, params);
|
|
110
|
+
}
|
|
111
|
+
workspaceId(workspaceId) {
|
|
112
|
+
this._workspaceId = workspaceId;
|
|
113
|
+
return this;
|
|
114
|
+
}
|
|
115
|
+
projectId(projectId) {
|
|
116
|
+
this._projectId = projectId;
|
|
117
|
+
return this;
|
|
118
|
+
}
|
|
119
|
+
page(page) {
|
|
120
|
+
this._page = page;
|
|
121
|
+
return this;
|
|
122
|
+
}
|
|
123
|
+
size(size) {
|
|
124
|
+
this._size = size;
|
|
125
|
+
return this;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Ascending sort field.
|
|
129
|
+
* - Any
|
|
130
|
+
* asc=fieldId
|
|
131
|
+
* - Creation date
|
|
132
|
+
* asc=cdt
|
|
133
|
+
* - Update Date
|
|
134
|
+
* asc=udt
|
|
135
|
+
*/
|
|
136
|
+
asc(fieldId) {
|
|
137
|
+
this._asc = fieldId;
|
|
138
|
+
return this;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Descending sort field.
|
|
142
|
+
* - Any
|
|
143
|
+
* desc=fieldId
|
|
144
|
+
* - Creation date
|
|
145
|
+
* desc=cdt
|
|
146
|
+
* - Update Date
|
|
147
|
+
* desc=udt
|
|
148
|
+
*/
|
|
149
|
+
desc(fieldId) {
|
|
150
|
+
this._desc = fieldId;
|
|
151
|
+
return this;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Search string.
|
|
155
|
+
* query=searchText
|
|
156
|
+
*/
|
|
157
|
+
query(query) {
|
|
158
|
+
this._query = query;
|
|
159
|
+
return this;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Word search (blank fields only).
|
|
163
|
+
* emp=fieldId
|
|
164
|
+
*/
|
|
165
|
+
emp(fieldId) {
|
|
166
|
+
this._emp = fieldId;
|
|
167
|
+
return this;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Word search (non-blank fields only).
|
|
171
|
+
* noemp=fieldId
|
|
172
|
+
*/
|
|
173
|
+
noemp(fieldId) {
|
|
174
|
+
this._noemp = fieldId;
|
|
175
|
+
return this;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Word search (specific keyword).
|
|
179
|
+
* includes=fieldId1:searchText1;fieldId2:searchText2
|
|
180
|
+
* - For example, the arguments are as follows
|
|
181
|
+
* 'fieldId1:searchText1', 'fieldId2:searchText2',...
|
|
182
|
+
*/
|
|
183
|
+
includes(...includes) {
|
|
184
|
+
this._includes.push(...includes);
|
|
185
|
+
return this;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Numeric value (equals).
|
|
189
|
+
* eq=fieldId:123
|
|
190
|
+
*/
|
|
191
|
+
eq(fieldId, value) {
|
|
192
|
+
this._eq = `${fieldId}:${value}`;
|
|
193
|
+
return this;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Numeric value (not equal).
|
|
197
|
+
* eq=fieldId:123
|
|
198
|
+
*/
|
|
199
|
+
neq(fieldId, value) {
|
|
200
|
+
this._neq = `${fieldId}:${value}`;
|
|
201
|
+
return this;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Numeric value (less than).
|
|
205
|
+
* eq=fieldId:123
|
|
206
|
+
*/
|
|
207
|
+
lt(fieldId, value) {
|
|
208
|
+
this._lt = `${fieldId}:${value}`;
|
|
209
|
+
return this;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Numeric value (less than or equal to).
|
|
213
|
+
* eq=fieldId:123
|
|
214
|
+
*/
|
|
215
|
+
lte(fieldId, value) {
|
|
216
|
+
this._lte = `${fieldId}:${value}`;
|
|
217
|
+
return this;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Numeric value (greater than).
|
|
221
|
+
* eq=fieldId:123
|
|
222
|
+
*/
|
|
223
|
+
gt(fieldId, value) {
|
|
224
|
+
this._gt = `${fieldId}:${value}`;
|
|
225
|
+
return this;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Numeric value (grater than or equal to).
|
|
229
|
+
* eq=fieldId:123
|
|
230
|
+
*/
|
|
231
|
+
gte(fieldId, value) {
|
|
232
|
+
this._gte = `${fieldId}:${value}`;
|
|
233
|
+
return this;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Date type period search (range).
|
|
237
|
+
* yyyy-MM-dd
|
|
238
|
+
*/
|
|
239
|
+
term(fieldId, from, to) {
|
|
240
|
+
this._term = `${fieldId}:${from},${to}`;
|
|
241
|
+
return this;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Date type period search (from).
|
|
245
|
+
* yyyy-MM-dd
|
|
246
|
+
*/
|
|
247
|
+
termFrom(fieldId, from) {
|
|
248
|
+
this._term = `${fieldId}:${from},`;
|
|
249
|
+
return this;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Date type period search (to).
|
|
253
|
+
* yyyy-MM-dd
|
|
254
|
+
*/
|
|
255
|
+
termTo(fieldId, to) {
|
|
256
|
+
this._term = `${fieldId}:,${to}`;
|
|
257
|
+
return this;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
//# sourceMappingURL=report-search-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report-search-request.js","sourceRoot":"","sources":["../../../src/resource/report/report-search-request.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH,gDAA4C;AAG5C,M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C;IAED;;;OAGG;IACI,GAAG,CAAC,OAAe,EAAE,KAAa;QACrC,IAAI,CAAC,IAAI,GAAG,GAAG,OAAO,IAAI,KAAK,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;OAGG;IACI,IAAI,CAAC,OAAe,EAAE,IAAY,EAAE,EAAU;QACjD,IAAI,CAAC,KAAK,GAAG,GAAG,OAAO,IAAI,IAAI,IAAI,EAAE,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;OAGG;IACI,QAAQ,CAAC,OAAe,EAAE,IAAY;QACzC,IAAI,CAAC,KAAK,GAAG,GAAG,OAAO,IAAI,IAAI,GAAG,CAAC;QACnC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,OAAe,EAAE,EAAU;QACrC,IAAI,CAAC,KAAK,GAAG,GAAG,OAAO,KAAK,EAAE,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IRequest } from '../request.interface';
|
|
2
|
+
export declare class ReportUpdateRequest implements IRequest {
|
|
3
|
+
private path;
|
|
4
|
+
private body;
|
|
5
|
+
constructor(path: string, body: string);
|
|
6
|
+
getPath(): string;
|
|
7
|
+
getQuery(): {
|
|
8
|
+
[key: string]: string | number;
|
|
9
|
+
};
|
|
10
|
+
getBody(): string;
|
|
11
|
+
static builder(): Builder;
|
|
12
|
+
}
|
|
13
|
+
declare class Builder {
|
|
14
|
+
private _workspaceId;
|
|
15
|
+
private _projectId;
|
|
16
|
+
private _reports;
|
|
17
|
+
build(): ReportUpdateRequest;
|
|
18
|
+
workspaceId(workspaceId: string): Builder;
|
|
19
|
+
projectId(projectId: string): Builder;
|
|
20
|
+
append(reportId: string, fields: {
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
}): Builder;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Rapid Table, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the 'License').
|
|
6
|
+
* You may not use this file except in compliance with the License. A copy of the License is located at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR
|
|
11
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
12
|
+
* and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ReportUpdateRequest = void 0;
|
|
16
|
+
const path_config_1 = require("../path-config");
|
|
17
|
+
const report_request_model_1 = require("./report-request-model");
|
|
18
|
+
class ReportUpdateRequest {
|
|
19
|
+
constructor(path, body) {
|
|
20
|
+
this.path = path;
|
|
21
|
+
this.body = body;
|
|
22
|
+
}
|
|
23
|
+
getPath() {
|
|
24
|
+
return this.path;
|
|
25
|
+
}
|
|
26
|
+
getQuery() {
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
getBody() {
|
|
30
|
+
return this.body;
|
|
31
|
+
}
|
|
32
|
+
static builder() {
|
|
33
|
+
return new Builder();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.ReportUpdateRequest = ReportUpdateRequest;
|
|
37
|
+
class Builder {
|
|
38
|
+
constructor() {
|
|
39
|
+
this._workspaceId = null;
|
|
40
|
+
this._projectId = null;
|
|
41
|
+
this._reports = [];
|
|
42
|
+
}
|
|
43
|
+
build() {
|
|
44
|
+
const path = path_config_1.PathConfig.ROOT + path_config_1.PathConfig.WORKSPACE + `/${this._workspaceId}` +
|
|
45
|
+
path_config_1.PathConfig.PROJECTS + `/${this._projectId}` + path_config_1.PathConfig.REPORTS;
|
|
46
|
+
if (!Array.isArray(this._reports) || !this._reports.length) {
|
|
47
|
+
throw new Error('IllegalArgumentException');
|
|
48
|
+
}
|
|
49
|
+
if (this._reports.length > 100) {
|
|
50
|
+
throw new Error('IllegalArgumentException');
|
|
51
|
+
}
|
|
52
|
+
return new ReportUpdateRequest(path, JSON.stringify(this._reports));
|
|
53
|
+
}
|
|
54
|
+
workspaceId(workspaceId) {
|
|
55
|
+
this._workspaceId = workspaceId;
|
|
56
|
+
return this;
|
|
57
|
+
}
|
|
58
|
+
projectId(projectId) {
|
|
59
|
+
this._projectId = projectId;
|
|
60
|
+
return this;
|
|
61
|
+
}
|
|
62
|
+
append(reportId, fields) {
|
|
63
|
+
this._reports.push(new report_request_model_1.ReportRequestModel(reportId, null, fields));
|
|
64
|
+
return this;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=report-update-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report-update-request.js","sourceRoot":"","sources":["../../../src/resource/report/report-update-request.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH,gDAA4C;AAE5C,iEAA4D;AAE5D,MAAa,mBAAmB;IAE5B,YAAoB,IAAY,EAAU,IAAY;QAAlC,SAAI,GAAJ,IAAI,CAAQ;QAAU,SAAI,GAAJ,IAAI,CAAQ;IACtD,CAAC;IAEM,OAAO;QACV,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAEM,QAAQ;QACX,OAAO,EAAE,CAAC;IACd,CAAC;IAEM,OAAO;QACV,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,OAAO;QACjB,OAAO,IAAI,OAAO,EAAE,CAAC;IACzB,CAAC;CAEJ;AArBD,kDAqBC;AAED,MAAM,OAAO;IAAb;QACY,iBAAY,GAAkB,IAAI,CAAC;QACnC,eAAU,GAAkB,IAAI,CAAC;QACjC,a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the 'License').
|
|
6
|
+
* You may not use this file except in compliance with the License. A copy of the License is located at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR
|
|
11
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
12
|
+
* and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
//# sourceMappingURL=request.interface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.interface.js","sourceRoot":"","sources":["../../src/resource/request.interface.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG"}
|
package/jest.config.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rtc4js",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "RapidTableConnector provides an SDK that allows easy CRUD operations using the Rest API provided by RapidTable.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"publish": "npm run build && npm publish",
|
|
10
|
+
"test": "jest --silent=false --verbose=false"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"RapidTable",
|
|
14
|
+
"RapidTableConnector"
|
|
15
|
+
],
|
|
16
|
+
"author": "RapidTable <eiji.hirakawa@rapid-table.com> (https://rapid-table.com)",
|
|
17
|
+
"license": "The Apache License, Version 2.0",
|
|
18
|
+
"homepage": "https://rapid-table.com",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"axios": "^1.3.4"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/jest": "^29.4.0",
|
|
24
|
+
"dotenv": "^16.0.3",
|
|
25
|
+
"jest": "^29.5.0",
|
|
26
|
+
"ts-jest": "^29.0.5",
|
|
27
|
+
"ts-node": "^10.9.1",
|
|
28
|
+
"typescript": "^4.9.5"
|
|
29
|
+
}
|
|
30
|
+
}
|