rtc4js 1.0.1 → 1.0.2

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.
Files changed (103) hide show
  1. package/dist/index.d.ts +27 -0
  2. package/dist/index.js +71 -0
  3. package/dist/index.js.map +1 -0
  4. package/dist/rapid-table-connector.d.ts +36 -0
  5. package/dist/rapid-table-connector.js +314 -0
  6. package/dist/rapid-table-connector.js.map +1 -0
  7. package/dist/resource/delete-request.interface.d.ts +6 -0
  8. package/dist/resource/delete-request.interface.js +15 -0
  9. package/dist/resource/delete-request.interface.js.map +1 -0
  10. package/dist/resource/drive/drive-component-type.d.ts +6 -0
  11. package/dist/resource/drive/drive-component-type.js +23 -0
  12. package/dist/resource/drive/drive-component-type.js.map +1 -0
  13. package/dist/resource/drive/drive-count-request.d.ts +30 -0
  14. package/dist/resource/drive/drive-count-request.js +75 -0
  15. package/dist/resource/drive/drive-count-request.js.map +1 -0
  16. package/dist/resource/drive/drive-get-metadata-request.d.ts +24 -0
  17. package/dist/resource/drive/drive-get-metadata-request.js +55 -0
  18. package/dist/resource/drive/drive-get-metadata-request.js.map +1 -0
  19. package/dist/resource/drive/drive-get-object-request.d.ts +17 -0
  20. package/dist/resource/drive/drive-get-object-request.js +68 -0
  21. package/dist/resource/drive/drive-get-object-request.js.map +1 -0
  22. package/dist/resource/drive/drive-response.d.ts +21 -0
  23. package/dist/resource/drive/drive-response.js +41 -0
  24. package/dist/resource/drive/drive-response.js.map +1 -0
  25. package/dist/resource/drive/drive-search-request.d.ts +32 -0
  26. package/dist/resource/drive/drive-search-request.js +91 -0
  27. package/dist/resource/drive/drive-search-request.js.map +1 -0
  28. package/dist/resource/generate-id-request.interface.d.ts +3 -0
  29. package/dist/resource/generate-id-request.interface.js +15 -0
  30. package/dist/resource/generate-id-request.interface.js.map +1 -0
  31. package/dist/resource/get-object-response.d.ts +8 -0
  32. package/dist/resource/get-object-response.js +25 -0
  33. package/dist/resource/get-object-response.js.map +1 -0
  34. package/dist/resource/path-config.d.ts +16 -0
  35. package/dist/resource/path-config.js +33 -0
  36. package/dist/resource/path-config.js.map +1 -0
  37. package/dist/resource/project/schema-field-type.d.ts +78 -0
  38. package/dist/resource/project/schema-field-type.js +95 -0
  39. package/dist/resource/project/schema-field-type.js.map +1 -0
  40. package/dist/resource/project/schema-field.d.ts +14 -0
  41. package/dist/resource/project/schema-field.js +27 -0
  42. package/dist/resource/project/schema-field.js.map +1 -0
  43. package/dist/resource/project/schema-get-request.d.ts +24 -0
  44. package/dist/resource/project/schema-get-request.js +55 -0
  45. package/dist/resource/project/schema-get-request.js.map +1 -0
  46. package/dist/resource/put-object-request.interface.d.ts +5 -0
  47. package/dist/resource/put-object-request.interface.js +3 -0
  48. package/dist/resource/put-object-request.interface.js.map +1 -0
  49. package/dist/resource/report/aggregate-value-response.d.ts +9 -0
  50. package/dist/resource/report/aggregate-value-response.js +29 -0
  51. package/dist/resource/report/aggregate-value-response.js.map +1 -0
  52. package/dist/resource/report/report-aggregate-value-request.d.ts +32 -0
  53. package/dist/resource/report/report-aggregate-value-request.js +80 -0
  54. package/dist/resource/report/report-aggregate-value-request.js.map +1 -0
  55. package/dist/resource/report/report-bulk-count-request.d.ts +104 -0
  56. package/dist/resource/report/report-bulk-count-request.js +217 -0
  57. package/dist/resource/report/report-bulk-count-request.js.map +1 -0
  58. package/dist/resource/report/report-bulk-get-request.d.ts +26 -0
  59. package/dist/resource/report/report-bulk-get-request.js +67 -0
  60. package/dist/resource/report/report-bulk-get-request.js.map +1 -0
  61. package/dist/resource/report/report-bulk-search-request.d.ts +132 -0
  62. package/dist/resource/report/report-bulk-search-request.js +269 -0
  63. package/dist/resource/report/report-bulk-search-request.js.map +1 -0
  64. package/dist/resource/report/report-count-request.d.ts +100 -0
  65. package/dist/resource/report/report-count-request.js +207 -0
  66. package/dist/resource/report/report-count-request.js.map +1 -0
  67. package/dist/resource/report/report-create-request.d.ts +24 -0
  68. package/dist/resource/report/report-create-request.js +67 -0
  69. package/dist/resource/report/report-create-request.js.map +1 -0
  70. package/dist/resource/report/report-delete-object-request.d.ts +24 -0
  71. package/dist/resource/report/report-delete-object-request.js +86 -0
  72. package/dist/resource/report/report-delete-object-request.js.map +1 -0
  73. package/dist/resource/report/report-delete-request.d.ts +23 -0
  74. package/dist/resource/report/report-delete-request.js +64 -0
  75. package/dist/resource/report/report-delete-request.js.map +1 -0
  76. package/dist/resource/report/report-generate-id-request.d.ts +17 -0
  77. package/dist/resource/report/report-generate-id-request.js +56 -0
  78. package/dist/resource/report/report-generate-id-request.js.map +1 -0
  79. package/dist/resource/report/report-get-object-request.d.ts +22 -0
  80. package/dist/resource/report/report-get-object-request.js +63 -0
  81. package/dist/resource/report/report-get-object-request.js.map +1 -0
  82. package/dist/resource/report/report-get-request.d.ts +26 -0
  83. package/dist/resource/report/report-get-request.js +61 -0
  84. package/dist/resource/report/report-get-request.js.map +1 -0
  85. package/dist/resource/report/report-put-object-request.d.ts +22 -0
  86. package/dist/resource/report/report-put-object-request.js +74 -0
  87. package/dist/resource/report/report-put-object-request.js.map +1 -0
  88. package/dist/resource/report/report-request-model.d.ts +13 -0
  89. package/dist/resource/report/report-request-model.js +27 -0
  90. package/dist/resource/report/report-request-model.js.map +1 -0
  91. package/dist/resource/report/report-response.d.ts +20 -0
  92. package/dist/resource/report/report-response.js +66 -0
  93. package/dist/resource/report/report-response.js.map +1 -0
  94. package/dist/resource/report/report-search-request.d.ts +128 -0
  95. package/dist/resource/report/report-search-request.js +260 -0
  96. package/dist/resource/report/report-search-request.js.map +1 -0
  97. package/dist/resource/report/report-update-request.d.ts +24 -0
  98. package/dist/resource/report/report-update-request.js +67 -0
  99. package/dist/resource/report/report-update-request.js.map +1 -0
  100. package/dist/resource/request.interface.d.ts +7 -0
  101. package/dist/resource/request.interface.js +15 -0
  102. package/dist/resource/request.interface.js.map +1 -0
  103. package/package.json +1 -1
@@ -0,0 +1,63 @@
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.ReportGetObjectRequest = void 0;
16
+ const path_config_1 = require("../path-config");
17
+ class ReportGetObjectRequest {
18
+ constructor(path, query) {
19
+ this.path = path;
20
+ this.query = query;
21
+ }
22
+ getPath() {
23
+ return this.path;
24
+ }
25
+ getQuery() {
26
+ return this.query;
27
+ }
28
+ getBody() {
29
+ return null;
30
+ }
31
+ static builder() {
32
+ return new Builder();
33
+ }
34
+ }
35
+ exports.ReportGetObjectRequest = ReportGetObjectRequest;
36
+ class Builder {
37
+ constructor() {
38
+ this._path = null;
39
+ }
40
+ build() {
41
+ if (!this._path) {
42
+ throw new Error('IllegalArgumentException');
43
+ }
44
+ return new ReportGetObjectRequest(this._path, {});
45
+ }
46
+ target(value) {
47
+ if (value !== null && typeof value === 'string') {
48
+ const matcher = path_config_1.PathConfig.REPORT_OBJECT_PATH_PATTERN.exec(value);
49
+ if (matcher && matcher.groups) {
50
+ const workspaceId = matcher.groups.wid;
51
+ const projectId = matcher.groups.pid;
52
+ const reportId = matcher.groups.rid;
53
+ const objectId = matcher.groups.oid;
54
+ this._path = path_config_1.PathConfig.ROOT + path_config_1.PathConfig.WORKSPACE + `/${workspaceId}` +
55
+ path_config_1.PathConfig.PROJECTS + `/${projectId}` +
56
+ path_config_1.PathConfig.REPORTS + `/${reportId}` +
57
+ path_config_1.PathConfig.OBJECTS + `/${objectId}`;
58
+ }
59
+ }
60
+ return this;
61
+ }
62
+ }
63
+ //# sourceMappingURL=report-get-object-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-get-object-request.js","sourceRoot":"","sources":["../../../src/resource/report/report-get-object-request.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH,gDAA4C;AAG5C,MAAa,sBAAsB;IAE/B,YAAmB,IAAY,EAAS,KAAyC;QAA9D,SAAI,GAAJ,IAAI,CAAQ;QAAS,UAAK,GAAL,KAAK,CAAoC;IACjF,CAAC;IAEM,OAAO;QACV,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAEM,QAAQ;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAEM,OAAO;QACV,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,MAAM,CAAC,OAAO;QACjB,OAAO,IAAI,OAAO,EAAE,CAAC;IACzB,CAAC;CACJ;AApBD,wDAoBC;AAED,MAAM,OAAO;IAAb;QACY,UAAK,GAAkB,IAAI,CAAC;IAyBxC,CAAC;IAvBU,KAAK;QACR,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACb,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;SAC/C;QACD,OAAO,IAAI,sBAAsB,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC;IAEM,MAAM,CAAC,KAAc;QACxB,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7C,MAAM,OAAO,GAAG,wBAAU,CAAC,0BAA0B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAClE,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE;gBAC3B,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC;gBACvC,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC;gBACrC,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC;gBACpC,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC;gBACpC,IAAI,CAAC,KAAK,GAAG,wBAAU,CAAC,IAAI,GAAG,wBAAU,CAAC,SAAS,GAAG,IAAI,WAAW,EAAE;oBACnE,wBAAU,CAAC,QAAQ,GAAG,IAAI,SAAS,EAAE;oBACrC,wBAAU,CAAC,OAAO,GAAG,IAAI,QAAQ,EAAE;oBACnC,wBAAU,CAAC,OAAO,GAAG,IAAI,QAAQ,EAAE,CAAC;aAC3C;SACJ;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
@@ -0,0 +1,26 @@
1
+ import { IRequest } from '../request.interface';
2
+ export declare class ReportGetRequest implements IRequest {
3
+ path: string;
4
+ query: {
5
+ [key: string]: string | number;
6
+ };
7
+ constructor(path: string, query: {
8
+ [key: string]: string | number;
9
+ });
10
+ getPath(): string;
11
+ getQuery(): {
12
+ [key: string]: string | number;
13
+ };
14
+ getBody(): string | null;
15
+ static builder(): Builder;
16
+ }
17
+ declare class Builder {
18
+ private _workspaceId;
19
+ private _projectId;
20
+ private _reportId;
21
+ build(): ReportGetRequest;
22
+ workspaceId(workspaceId: string): Builder;
23
+ projectId(projectId: string): Builder;
24
+ reportId(reportId: string): Builder;
25
+ }
26
+ export {};
@@ -0,0 +1,61 @@
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.ReportGetRequest = void 0;
16
+ const path_config_1 = require("../path-config");
17
+ class ReportGetRequest {
18
+ constructor(path, query) {
19
+ this.path = path;
20
+ this.query = query;
21
+ }
22
+ getPath() {
23
+ return this.path;
24
+ }
25
+ getQuery() {
26
+ return this.query;
27
+ }
28
+ getBody() {
29
+ return null;
30
+ }
31
+ static builder() {
32
+ return new Builder();
33
+ }
34
+ }
35
+ exports.ReportGetRequest = ReportGetRequest;
36
+ class Builder {
37
+ constructor() {
38
+ this._workspaceId = null;
39
+ this._projectId = null;
40
+ this._reportId = null;
41
+ }
42
+ build() {
43
+ const path = path_config_1.PathConfig.ROOT + path_config_1.PathConfig.WORKSPACE + `/${this._workspaceId}` +
44
+ path_config_1.PathConfig.PROJECTS + `/${this._projectId}` +
45
+ path_config_1.PathConfig.REPORTS + `/${this._reportId}`;
46
+ return new ReportGetRequest(path, {});
47
+ }
48
+ workspaceId(workspaceId) {
49
+ this._workspaceId = workspaceId;
50
+ return this;
51
+ }
52
+ projectId(projectId) {
53
+ this._projectId = projectId;
54
+ return this;
55
+ }
56
+ reportId(reportId) {
57
+ this._reportId = reportId;
58
+ return this;
59
+ }
60
+ }
61
+ //# sourceMappingURL=report-get-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-get-request.js","sourceRoot":"","sources":["../../../src/resource/report/report-get-request.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH,gDAA4C;AAG5C,MAAa,gBAAgB;IAEzB,YAAmB,IAAY,EAAS,KAAyC;QAA9D,SAAI,GAAJ,IAAI,CAAQ;QAAS,UAAK,GAAL,KAAK,CAAoC;IAAI,CAAC;IAE/E,OAAO;QACV,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAEM,QAAQ;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAEM,OAAO;QACV,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,MAAM,CAAC,OAAO;QACjB,OAAO,IAAI,OAAO,EAAE,CAAC;IACzB,CAAC;CACJ;AAnBD,4CAmBC;AAED,MAAM,OAAO;IAAb;QACY,iBAAY,GAAkB,IAAI,CAAC;QACnC,eAAU,GAAkB,IAAI,CAAC;QACjC,cAAS,GAAkB,IAAI,CAAC;IAwB5C,CAAC;IAtBU,KAAK;QACR,MAAM,IAAI,GAAG,wBAAU,CAAC,IAAI,GAAG,wBAAU,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,YAAY,EAAE;YACzE,wBAAU,CAAC,QAAQ,GAAG,IAAI,IAAI,CAAC,UAAU,EAAE;YAC3C,wBAAU,CAAC,OAAO,GAAG,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;QAE9C,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC1C,CAAC;IAEM,WAAW,CAAC,WAAmB;QAClC,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,SAAS,CAAC,SAAiB;QAC9B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,QAAQ,CAAC,QAAgB;QAC5B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
@@ -0,0 +1,22 @@
1
+ import { IPutObjectRequest } from '../put-object-request.interface';
2
+ import FormData from 'form-data';
3
+ export declare class ReportPutObjectRequest implements IPutObjectRequest {
4
+ path: string;
5
+ formData: FormData;
6
+ constructor(path: string, formData: FormData);
7
+ getPath(): string;
8
+ getFormData(): any;
9
+ static builder(): Builder;
10
+ }
11
+ declare class Builder {
12
+ private _workspaceId;
13
+ private _projectId;
14
+ private _reportId;
15
+ private _formData;
16
+ build(): ReportPutObjectRequest;
17
+ workspaceId(workspaceId: string): Builder;
18
+ projectId(projectId: string): Builder;
19
+ reportId(reportId: string): Builder;
20
+ append(buffer: any, fileName: string): Builder;
21
+ }
22
+ export {};
@@ -0,0 +1,74 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
15
+ return (mod && mod.__esModule) ? mod : { "default": mod };
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ReportPutObjectRequest = void 0;
19
+ const path_config_1 = require("../path-config");
20
+ const form_data_1 = __importDefault(require("form-data"));
21
+ class ReportPutObjectRequest {
22
+ constructor(path, formData) {
23
+ this.path = path;
24
+ this.formData = formData;
25
+ }
26
+ getPath() {
27
+ return this.path;
28
+ }
29
+ getFormData() {
30
+ return this.formData;
31
+ }
32
+ static builder() {
33
+ return new Builder();
34
+ }
35
+ }
36
+ exports.ReportPutObjectRequest = ReportPutObjectRequest;
37
+ class Builder {
38
+ constructor() {
39
+ this._workspaceId = null;
40
+ this._projectId = null;
41
+ this._reportId = null;
42
+ this._formData = null;
43
+ }
44
+ build() {
45
+ const path = path_config_1.PathConfig.ROOT + path_config_1.PathConfig.WORKSPACE + `/${this._workspaceId}` +
46
+ path_config_1.PathConfig.PROJECTS + `/${this._projectId}` +
47
+ path_config_1.PathConfig.REPORTS + `/${this._reportId}` +
48
+ path_config_1.PathConfig.OBJECTS;
49
+ if (!this._formData) {
50
+ throw new Error('IllegalArgumentException');
51
+ }
52
+ return new ReportPutObjectRequest(path, this._formData);
53
+ }
54
+ workspaceId(workspaceId) {
55
+ this._workspaceId = workspaceId;
56
+ return this;
57
+ }
58
+ projectId(projectId) {
59
+ this._projectId = projectId;
60
+ return this;
61
+ }
62
+ reportId(reportId) {
63
+ this._reportId = reportId;
64
+ return this;
65
+ }
66
+ append(buffer, fileName) {
67
+ if (!this._formData) {
68
+ this._formData = new form_data_1.default();
69
+ }
70
+ this._formData.append('file', buffer, fileName);
71
+ return this;
72
+ }
73
+ }
74
+ //# sourceMappingURL=report-put-object-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-put-object-request.js","sourceRoot":"","sources":["../../../src/resource/report/report-put-object-request.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;AAEH,gDAA4C;AAE5C,0DAAiC;AAEjC,MAAa,sBAAsB;IAE/B,YAAmB,IAAY,EAAS,QAAkB;QAAvC,SAAI,GAAJ,IAAI,CAAQ;QAAS,aAAQ,GAAR,QAAQ,CAAU;IAAI,CAAC;IAExD,OAAO;QACV,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAEM,WAAW;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAEM,MAAM,CAAC,OAAO;QACjB,OAAO,IAAI,OAAO,EAAE,CAAC;IACzB,CAAC;CACJ;AAfD,wDAeC;AAED,MAAM,OAAO;IAAb;QACY,iBAAY,GAAkB,IAAI,CAAC;QACnC,eAAU,GAAkB,IAAI,CAAC;QACjC,cAAS,GAAkB,IAAI,CAAC;QAChC,cAAS,GAAoB,IAAI,CAAC;IAqC9C,CAAC;IAnCU,KAAK;QACR,MAAM,IAAI,GAAG,wBAAU,CAAC,IAAI,GAAG,wBAAU,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,YAAY,EAAE;YACzE,wBAAU,CAAC,QAAQ,GAAG,IAAI,IAAI,CAAC,UAAU,EAAE;YAC3C,wBAAU,CAAC,OAAO,GAAG,IAAI,IAAI,CAAC,SAAS,EAAE;YACzC,wBAAU,CAAC,OAAO,CAAC;QAEvB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACjB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;SAC/C;QAED,OAAO,IAAI,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IAC5D,CAAC;IAEM,WAAW,CAAC,WAAmB;QAClC,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,SAAS,CAAC,SAAiB;QAC9B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,QAAQ,CAAC,QAAgB;QAC5B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,MAAM,CAAC,MAAW,EAAE,QAAgB;QACvC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACjB,IAAI,CAAC,SAAS,GAAG,IAAI,mBAAQ,EAAE,CAAC;SACnC;QACD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QAChD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Report Resource Request model
3
+ */
4
+ export declare class ReportRequestModel {
5
+ id: string | null;
6
+ formId: string | null;
7
+ fields: {
8
+ [key: string]: unknown;
9
+ };
10
+ constructor(id: string | null, formId: string | null, fields: {
11
+ [key: string]: unknown;
12
+ });
13
+ }
@@ -0,0 +1,27 @@
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.ReportRequestModel = void 0;
16
+ /**
17
+ * Report Resource Request model
18
+ */
19
+ class ReportRequestModel {
20
+ constructor(id, formId, fields) {
21
+ this.id = id;
22
+ this.formId = formId;
23
+ this.fields = fields;
24
+ }
25
+ }
26
+ exports.ReportRequestModel = ReportRequestModel;
27
+ //# sourceMappingURL=report-request-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-request-model.js","sourceRoot":"","sources":["../../../src/resource/report/report-request-model.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH;;GAEG;AACH,MAAa,kBAAkB;IAC3B,YACW,EAAiB,EACjB,MAAqB,EACrB,MAAkC;QAFlC,OAAE,GAAF,EAAE,CAAe;QACjB,WAAM,GAAN,MAAM,CAAe;QACrB,WAAM,GAAN,MAAM,CAA4B;IACzC,CAAC;CACR;AAND,gDAMC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Report Resource Response model
3
+ */
4
+ export declare class ReportResponse {
5
+ id: string;
6
+ formId: string;
7
+ projectId: string;
8
+ fields: {
9
+ [key: string]: unknown;
10
+ };
11
+ constructor(id?: string, formId?: string, projectId?: string, fields?: {
12
+ [key: string]: unknown;
13
+ });
14
+ static of({ id, formId, projectId, fields }: ReportResponse): ReportResponse;
15
+ getFieldAs<T>(fieldId: string): T | null;
16
+ getFieldAsList(fieldId: string): string[];
17
+ getFieldAsString(fieldId: string): string;
18
+ getFieldAsDate(fieldId: string): Date | null;
19
+ setField(fieldId: string, value: unknown): void;
20
+ }
@@ -0,0 +1,66 @@
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.ReportResponse = void 0;
16
+ /**
17
+ * Report Resource Response model
18
+ */
19
+ class ReportResponse {
20
+ constructor(id = '', formId = '', projectId = '', fields = {}) {
21
+ this.id = id;
22
+ this.formId = formId;
23
+ this.projectId = projectId;
24
+ this.fields = fields;
25
+ }
26
+ static of({ id, formId, projectId, fields }) {
27
+ return new ReportResponse(id, formId, projectId, fields);
28
+ }
29
+ getFieldAs(fieldId) {
30
+ if (this.fields === null || typeof this.fields !== 'object') {
31
+ return null;
32
+ }
33
+ const value = fieldId in this.fields ? this.fields[fieldId] : null;
34
+ if (value === null) {
35
+ return null;
36
+ }
37
+ return value;
38
+ }
39
+ getFieldAsList(fieldId) {
40
+ const data = this.getFieldAs(fieldId) || [];
41
+ return Array.isArray(data) ? data : [];
42
+ }
43
+ getFieldAsString(fieldId) {
44
+ return this.getFieldAs(fieldId) || '';
45
+ }
46
+ getFieldAsDate(fieldId) {
47
+ const value = this.getFieldAs(fieldId);
48
+ if (typeof value === 'string') {
49
+ try {
50
+ return new Date(value);
51
+ }
52
+ catch {
53
+ return null;
54
+ }
55
+ }
56
+ else if (value instanceof Date) {
57
+ return value;
58
+ }
59
+ return null;
60
+ }
61
+ setField(fieldId, value) {
62
+ this.fields[fieldId] = value;
63
+ }
64
+ }
65
+ exports.ReportResponse = ReportResponse;
66
+ //# sourceMappingURL=report-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-response.js","sourceRoot":"","sources":["../../../src/resource/report/report-response.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH;;GAEG;AACH,MAAa,cAAc;IAEvB,YACW,KAAa,EAAE,EACf,SAAiB,EAAE,EACnB,YAAoB,EAAE,EACtB,SAAqC,EAAE;QAHvC,OAAE,GAAF,EAAE,CAAa;QACf,WAAM,GAAN,MAAM,CAAa;QACnB,cAAS,GAAT,SAAS,CAAa;QACtB,WAAM,GAAN,MAAM,CAAiC;IAElD,CAAC;IAEM,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAkB;QAC9D,OAAO,IAAI,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC;IAEM,UAAU,CAAI,OAAe;QAChC,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE;YACzD,OAAO,IAAI,CAAC;SACf;QACD,MAAM,KAAK,GAAG,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACnE,IAAI,KAAK,KAAK,IAAI,EAAE;YAChB,OAAO,IAAI,CAAC;SACf;QACD,OAAO,KAAU,CAAC;IACtB,CAAC;IAEM,cAAc,CAAC,OAAe;QACjC,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAW,OAAO,CAAC,IAAI,EAAE,CAAC;QACtD,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3C,CAAC;IAEM,gBAAgB,CAAC,OAAe;QACnC,OAAO,IAAI,CAAC,UAAU,CAAS,OAAO,CAAC,IAAI,EAAE,CAAC;IAClD,CAAC;IAEM,cAAc,CAAC,OAAe;QACjC,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAO,OAAO,CAAC,CAAC;QAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC3B,IAAI;gBACA,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;aAC1B;YAAC,MAAM;gBACJ,OAAO,IAAI,CAAC;aACf;SACJ;aAAM,IAAI,KAAK,YAAY,IAAI,EAAE;YAC9B,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,QAAQ,CAAC,OAAe,EAAE,KAAc;QAC3C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;IACjC,CAAC;CACJ;AAnDD,wCAmDC"}
@@ -0,0 +1,128 @@
1
+ import { IRequest } from '../request.interface';
2
+ export declare class ReportSearchRequest implements IRequest {
3
+ path: string;
4
+ query: {
5
+ [key: string]: string | number;
6
+ };
7
+ constructor(path: string, query: {
8
+ [key: string]: string | number;
9
+ });
10
+ getPath(): string;
11
+ getQuery(): {
12
+ [key: string]: string | number;
13
+ };
14
+ getBody(): string | null;
15
+ static builder(): Builder;
16
+ }
17
+ declare class Builder {
18
+ private _workspaceId;
19
+ private _projectId;
20
+ private _page;
21
+ private _size;
22
+ private _asc;
23
+ private _desc;
24
+ private _query;
25
+ private _emp;
26
+ private _noemp;
27
+ private _includes;
28
+ private _eq;
29
+ private _neq;
30
+ private _lt;
31
+ private _lte;
32
+ private _gt;
33
+ private _gte;
34
+ private _term;
35
+ build(): ReportSearchRequest;
36
+ workspaceId(workspaceId: string): Builder;
37
+ projectId(projectId: string): Builder;
38
+ page(page: number): Builder;
39
+ size(size: number): Builder;
40
+ /**
41
+ * Ascending sort field.
42
+ * - Any
43
+ * asc=fieldId
44
+ * - Creation date
45
+ * asc=cdt
46
+ * - Update Date
47
+ * asc=udt
48
+ */
49
+ asc(fieldId: string): Builder;
50
+ /**
51
+ * Descending sort field.
52
+ * - Any
53
+ * desc=fieldId
54
+ * - Creation date
55
+ * desc=cdt
56
+ * - Update Date
57
+ * desc=udt
58
+ */
59
+ desc(fieldId: string): Builder;
60
+ /**
61
+ * Search string.
62
+ * query=searchText
63
+ */
64
+ query(query: string): Builder;
65
+ /**
66
+ * Word search (blank fields only).
67
+ * emp=fieldId
68
+ */
69
+ emp(fieldId: string): Builder;
70
+ /**
71
+ * Word search (non-blank fields only).
72
+ * noemp=fieldId
73
+ */
74
+ noemp(fieldId: string): Builder;
75
+ /**
76
+ * Word search (specific keyword).
77
+ * includes=fieldId1:searchText1;fieldId2:searchText2
78
+ * - For example, the arguments are as follows
79
+ * 'fieldId1:searchText1', 'fieldId2:searchText2',...
80
+ */
81
+ includes(...includes: string[]): Builder;
82
+ /**
83
+ * Numeric value (equals).
84
+ * eq=fieldId:123
85
+ */
86
+ eq(fieldId: string, value: string): Builder;
87
+ /**
88
+ * Numeric value (not equal).
89
+ * eq=fieldId:123
90
+ */
91
+ neq(fieldId: string, value: string): Builder;
92
+ /**
93
+ * Numeric value (less than).
94
+ * eq=fieldId:123
95
+ */
96
+ lt(fieldId: string, value: string): Builder;
97
+ /**
98
+ * Numeric value (less than or equal to).
99
+ * eq=fieldId:123
100
+ */
101
+ lte(fieldId: string, value: string): Builder;
102
+ /**
103
+ * Numeric value (greater than).
104
+ * eq=fieldId:123
105
+ */
106
+ gt(fieldId: string, value: string): Builder;
107
+ /**
108
+ * Numeric value (grater than or equal to).
109
+ * eq=fieldId:123
110
+ */
111
+ gte(fieldId: string, value: string): Builder;
112
+ /**
113
+ * Date type period search (range).
114
+ * yyyy-MM-dd
115
+ */
116
+ term(fieldId: string, from: string, to: string): Builder;
117
+ /**
118
+ * Date type period search (from).
119
+ * yyyy-MM-dd
120
+ */
121
+ termFrom(fieldId: string, from: string): Builder;
122
+ /**
123
+ * Date type period search (to).
124
+ * yyyy-MM-dd
125
+ */
126
+ termTo(fieldId: string, to: string): Builder;
127
+ }
128
+ export {};