rtc4js 1.0.1 → 1.1.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.
Files changed (104) hide show
  1. package/.env +6 -0
  2. package/dist/index.d.ts +27 -0
  3. package/dist/index.js +71 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/rapid-table-connector.d.ts +36 -0
  6. package/dist/rapid-table-connector.js +314 -0
  7. package/dist/rapid-table-connector.js.map +1 -0
  8. package/dist/resource/delete-request.interface.d.ts +6 -0
  9. package/dist/resource/delete-request.interface.js +15 -0
  10. package/dist/resource/delete-request.interface.js.map +1 -0
  11. package/dist/resource/drive/drive-component-type.d.ts +6 -0
  12. package/dist/resource/drive/drive-component-type.js +23 -0
  13. package/dist/resource/drive/drive-component-type.js.map +1 -0
  14. package/dist/resource/drive/drive-count-request.d.ts +30 -0
  15. package/dist/resource/drive/drive-count-request.js +75 -0
  16. package/dist/resource/drive/drive-count-request.js.map +1 -0
  17. package/dist/resource/drive/drive-get-metadata-request.d.ts +24 -0
  18. package/dist/resource/drive/drive-get-metadata-request.js +55 -0
  19. package/dist/resource/drive/drive-get-metadata-request.js.map +1 -0
  20. package/dist/resource/drive/drive-get-object-request.d.ts +17 -0
  21. package/dist/resource/drive/drive-get-object-request.js +68 -0
  22. package/dist/resource/drive/drive-get-object-request.js.map +1 -0
  23. package/dist/resource/drive/drive-response.d.ts +21 -0
  24. package/dist/resource/drive/drive-response.js +41 -0
  25. package/dist/resource/drive/drive-response.js.map +1 -0
  26. package/dist/resource/drive/drive-search-request.d.ts +32 -0
  27. package/dist/resource/drive/drive-search-request.js +91 -0
  28. package/dist/resource/drive/drive-search-request.js.map +1 -0
  29. package/dist/resource/generate-id-request.interface.d.ts +3 -0
  30. package/dist/resource/generate-id-request.interface.js +15 -0
  31. package/dist/resource/generate-id-request.interface.js.map +1 -0
  32. package/dist/resource/get-object-response.d.ts +8 -0
  33. package/dist/resource/get-object-response.js +25 -0
  34. package/dist/resource/get-object-response.js.map +1 -0
  35. package/dist/resource/path-config.d.ts +16 -0
  36. package/dist/resource/path-config.js +33 -0
  37. package/dist/resource/path-config.js.map +1 -0
  38. package/dist/resource/project/schema-field-type.d.ts +78 -0
  39. package/dist/resource/project/schema-field-type.js +95 -0
  40. package/dist/resource/project/schema-field-type.js.map +1 -0
  41. package/dist/resource/project/schema-field.d.ts +14 -0
  42. package/dist/resource/project/schema-field.js +27 -0
  43. package/dist/resource/project/schema-field.js.map +1 -0
  44. package/dist/resource/project/schema-get-request.d.ts +24 -0
  45. package/dist/resource/project/schema-get-request.js +55 -0
  46. package/dist/resource/project/schema-get-request.js.map +1 -0
  47. package/dist/resource/put-object-request.interface.d.ts +5 -0
  48. package/dist/resource/put-object-request.interface.js +3 -0
  49. package/dist/resource/put-object-request.interface.js.map +1 -0
  50. package/dist/resource/report/aggregate-value-response.d.ts +9 -0
  51. package/dist/resource/report/aggregate-value-response.js +29 -0
  52. package/dist/resource/report/aggregate-value-response.js.map +1 -0
  53. package/dist/resource/report/report-aggregate-value-request.d.ts +32 -0
  54. package/dist/resource/report/report-aggregate-value-request.js +80 -0
  55. package/dist/resource/report/report-aggregate-value-request.js.map +1 -0
  56. package/dist/resource/report/report-bulk-count-request.d.ts +104 -0
  57. package/dist/resource/report/report-bulk-count-request.js +217 -0
  58. package/dist/resource/report/report-bulk-count-request.js.map +1 -0
  59. package/dist/resource/report/report-bulk-get-request.d.ts +26 -0
  60. package/dist/resource/report/report-bulk-get-request.js +67 -0
  61. package/dist/resource/report/report-bulk-get-request.js.map +1 -0
  62. package/dist/resource/report/report-bulk-search-request.d.ts +132 -0
  63. package/dist/resource/report/report-bulk-search-request.js +269 -0
  64. package/dist/resource/report/report-bulk-search-request.js.map +1 -0
  65. package/dist/resource/report/report-count-request.d.ts +100 -0
  66. package/dist/resource/report/report-count-request.js +207 -0
  67. package/dist/resource/report/report-count-request.js.map +1 -0
  68. package/dist/resource/report/report-create-request.d.ts +24 -0
  69. package/dist/resource/report/report-create-request.js +67 -0
  70. package/dist/resource/report/report-create-request.js.map +1 -0
  71. package/dist/resource/report/report-delete-object-request.d.ts +24 -0
  72. package/dist/resource/report/report-delete-object-request.js +86 -0
  73. package/dist/resource/report/report-delete-object-request.js.map +1 -0
  74. package/dist/resource/report/report-delete-request.d.ts +23 -0
  75. package/dist/resource/report/report-delete-request.js +64 -0
  76. package/dist/resource/report/report-delete-request.js.map +1 -0
  77. package/dist/resource/report/report-generate-id-request.d.ts +17 -0
  78. package/dist/resource/report/report-generate-id-request.js +56 -0
  79. package/dist/resource/report/report-generate-id-request.js.map +1 -0
  80. package/dist/resource/report/report-get-object-request.d.ts +22 -0
  81. package/dist/resource/report/report-get-object-request.js +63 -0
  82. package/dist/resource/report/report-get-object-request.js.map +1 -0
  83. package/dist/resource/report/report-get-request.d.ts +26 -0
  84. package/dist/resource/report/report-get-request.js +61 -0
  85. package/dist/resource/report/report-get-request.js.map +1 -0
  86. package/dist/resource/report/report-put-object-request.d.ts +22 -0
  87. package/dist/resource/report/report-put-object-request.js +74 -0
  88. package/dist/resource/report/report-put-object-request.js.map +1 -0
  89. package/dist/resource/report/report-request-model.d.ts +13 -0
  90. package/dist/resource/report/report-request-model.js +27 -0
  91. package/dist/resource/report/report-request-model.js.map +1 -0
  92. package/dist/resource/report/report-response.d.ts +20 -0
  93. package/dist/resource/report/report-response.js +66 -0
  94. package/dist/resource/report/report-response.js.map +1 -0
  95. package/dist/resource/report/report-search-request.d.ts +128 -0
  96. package/dist/resource/report/report-search-request.js +260 -0
  97. package/dist/resource/report/report-search-request.js.map +1 -0
  98. package/dist/resource/report/report-update-request.d.ts +24 -0
  99. package/dist/resource/report/report-update-request.js +67 -0
  100. package/dist/resource/report/report-update-request.js.map +1 -0
  101. package/dist/resource/request.interface.d.ts +7 -0
  102. package/dist/resource/request.interface.js +15 -0
  103. package/dist/resource/request.interface.js.map +1 -0
  104. package/package.json +3 -3
@@ -0,0 +1,95 @@
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.SchemaFieldType = void 0;
16
+ var SchemaFieldType;
17
+ (function (SchemaFieldType) {
18
+ /**
19
+ * テキスト
20
+ */
21
+ SchemaFieldType[SchemaFieldType["Text"] = 0] = "Text";
22
+ /**
23
+ * 数値
24
+ */
25
+ SchemaFieldType[SchemaFieldType["Number"] = 1] = "Number";
26
+ /**
27
+ * 日時
28
+ */
29
+ SchemaFieldType[SchemaFieldType["DateTime"] = 2] = "DateTime";
30
+ /**
31
+ * チェックボックス
32
+ */
33
+ SchemaFieldType[SchemaFieldType["Check"] = 3] = "Check";
34
+ /**
35
+ * プルダウンボックス
36
+ */
37
+ SchemaFieldType[SchemaFieldType["Select"] = 4] = "Select";
38
+ /**
39
+ * ラジオボックス
40
+ */
41
+ SchemaFieldType[SchemaFieldType["Radio"] = 5] = "Radio";
42
+ /**
43
+ * ラグラベル
44
+ */
45
+ SchemaFieldType[SchemaFieldType["Tag"] = 6] = "Tag";
46
+ /**
47
+ * 電話/FAX
48
+ */
49
+ SchemaFieldType[SchemaFieldType["Phone"] = 7] = "Phone";
50
+ /**
51
+ * E-Mail
52
+ */
53
+ SchemaFieldType[SchemaFieldType["EMail"] = 8] = "EMail";
54
+ /**
55
+ * 郵便番号
56
+ */
57
+ SchemaFieldType[SchemaFieldType["ZipCode"] = 9] = "ZipCode";
58
+ /**
59
+ * 添付ファイル(パス)
60
+ */
61
+ SchemaFieldType[SchemaFieldType["File"] = 10] = "File";
62
+ /**
63
+ * 画像ファイル(パス)
64
+ */
65
+ SchemaFieldType[SchemaFieldType["Image"] = 11] = "Image";
66
+ /**
67
+ * 音声ファイル(パス)
68
+ */
69
+ SchemaFieldType[SchemaFieldType["Audio"] = 12] = "Audio";
70
+ /**
71
+ * 動画ファイル(パス)
72
+ */
73
+ SchemaFieldType[SchemaFieldType["Video"] = 13] = "Video";
74
+ /**
75
+ * 評価
76
+ */
77
+ SchemaFieldType[SchemaFieldType["Rate"] = 14] = "Rate";
78
+ /**
79
+ * URL
80
+ */
81
+ SchemaFieldType[SchemaFieldType["Url"] = 15] = "Url";
82
+ /**
83
+ * ユーザー参照
84
+ */
85
+ SchemaFieldType[SchemaFieldType["Users"] = 16] = "Users";
86
+ /**
87
+ * プロジェクト参照
88
+ */
89
+ SchemaFieldType[SchemaFieldType["Project"] = 17] = "Project";
90
+ /**
91
+ * 計算フィールド
92
+ */
93
+ SchemaFieldType[SchemaFieldType["Calculate"] = 18] = "Calculate";
94
+ })(SchemaFieldType = exports.SchemaFieldType || (exports.SchemaFieldType = {}));
95
+ //# sourceMappingURL=schema-field-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-field-type.js","sourceRoot":"","sources":["../../../src/resource/project/schema-field-type.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH,IAAY,eAgGX;AAhGD,WAAY,eAAe;IACvB;;OAEG;IACH,qDAAI,CAAA;IAEJ;;OAEG;IACH,yDAAM,CAAA;IAEN;;OAEG;IACH,6DAAQ,CAAA;IAER;;OAEG;IACH,uDAAK,CAAA;IAEL;;OAEG;IACH,yDAAM,CAAA;IAEN;;OAEG;IACH,uDAAK,CAAA;IAEL;;OAEG;IACH,mDAAG,CAAA;IAEH;;OAEG;IACH,uDAAK,CAAA;IAEL;;OAEG;IAEH,uDAAK,CAAA;IAEL;;OAEG;IACH,2DAAO,CAAA;IAEP;;OAEG;IACH,sDAAI,CAAA;IAEJ;;OAEG;IACH,wDAAK,CAAA;IAEL;;OAEG;IACH,wDAAK,CAAA;IAEL;;OAEG;IACH,wDAAK,CAAA;IAEL;;OAEG;IACH,sDAAI,CAAA;IAEJ;;OAEG;IACH,oDAAG,CAAA;IAEH;;OAEG;IACH,wDAAK,CAAA;IAEL;;OAEG;IACH,4DAAO,CAAA;IAEP;;OAEG;IACH,gEAAS,CAAA;AACb,CAAC,EAhGW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAgG1B"}
@@ -0,0 +1,14 @@
1
+ import { SchemaFieldType } from "./schema-field-type";
2
+ export declare class SchemaField {
3
+ id: string;
4
+ name: string;
5
+ remarks: string;
6
+ type: SchemaFieldType;
7
+ required: boolean;
8
+ settings: {
9
+ [key: string]: unknown;
10
+ };
11
+ constructor(id: string, name: string, remarks: string, type: SchemaFieldType, required: boolean, settings?: {
12
+ [key: string]: unknown;
13
+ });
14
+ }
@@ -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.SchemaField = void 0;
16
+ class SchemaField {
17
+ constructor(id, name, remarks, type, required, settings = {}) {
18
+ this.id = id;
19
+ this.name = name;
20
+ this.remarks = remarks;
21
+ this.type = type;
22
+ this.required = required;
23
+ this.settings = settings;
24
+ }
25
+ }
26
+ exports.SchemaField = SchemaField;
27
+ //# sourceMappingURL=schema-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-field.js","sourceRoot":"","sources":["../../../src/resource/project/schema-field.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAIH,MAAa,WAAW;IACpB,YACW,EAAU,EACV,IAAY,EACZ,OAAe,EACf,IAAqB,EACrB,QAAiB,EACjB,WAAqC,EAAE;QALvC,OAAE,GAAF,EAAE,CAAQ;QACV,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAQ;QACf,SAAI,GAAJ,IAAI,CAAiB;QACrB,aAAQ,GAAR,QAAQ,CAAS;QACjB,aAAQ,GAAR,QAAQ,CAA+B;IAC9C,CAAC;CACR;AATD,kCASC"}
@@ -0,0 +1,24 @@
1
+ import { IRequest } from '../request.interface';
2
+ export declare class SchemaGetRequest 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
+ build(): SchemaGetRequest;
21
+ workspaceId(workspaceId: string): Builder;
22
+ projectId(projectId: string): Builder;
23
+ }
24
+ export {};
@@ -0,0 +1,55 @@
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.SchemaGetRequest = void 0;
16
+ const path_config_1 = require("../path-config");
17
+ class SchemaGetRequest {
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.SchemaGetRequest = SchemaGetRequest;
36
+ class Builder {
37
+ constructor() {
38
+ this._workspaceId = null;
39
+ this._projectId = null;
40
+ }
41
+ build() {
42
+ const path = path_config_1.PathConfig.ROOT + path_config_1.PathConfig.WORKSPACE + `/${this._workspaceId}` +
43
+ path_config_1.PathConfig.PROJECTS + `/${this._projectId}` + path_config_1.PathConfig.SCHEMA;
44
+ return new SchemaGetRequest(path, {});
45
+ }
46
+ workspaceId(workspaceId) {
47
+ this._workspaceId = workspaceId;
48
+ return this;
49
+ }
50
+ projectId(projectId) {
51
+ this._projectId = projectId;
52
+ return this;
53
+ }
54
+ }
55
+ //# sourceMappingURL=schema-get-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-get-request.js","sourceRoot":"","sources":["../../../src/resource/project/schema-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;IAkB7C,CAAC;IAhBU,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,GAAG,wBAAU,CAAC,MAAM,CAAC;QAEpE,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;CACJ"}
@@ -0,0 +1,5 @@
1
+ import FormData from 'form-data';
2
+ export interface IPutObjectRequest {
3
+ getPath(): string;
4
+ getFormData(): FormData;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=put-object-request.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"put-object-request.interface.js","sourceRoot":"","sources":["../../src/resource/put-object-request.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Report Resource Response model
3
+ */
4
+ export declare class AggregateValueResponse {
5
+ value: string;
6
+ count: number;
7
+ constructor(value: string, count: number);
8
+ static of({ value, count }: AggregateValueResponse): AggregateValueResponse;
9
+ }
@@ -0,0 +1,29 @@
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.AggregateValueResponse = void 0;
16
+ /**
17
+ * Report Resource Response model
18
+ */
19
+ class AggregateValueResponse {
20
+ constructor(value, count) {
21
+ this.value = value;
22
+ this.count = count;
23
+ }
24
+ static of({ value, count }) {
25
+ return new AggregateValueResponse(value, count);
26
+ }
27
+ }
28
+ exports.AggregateValueResponse = AggregateValueResponse;
29
+ //# sourceMappingURL=aggregate-value-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregate-value-response.js","sourceRoot":"","sources":["../../../src/resource/report/aggregate-value-response.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH;;GAEG;AACH,MAAa,sBAAsB;IAE/B,YAAmB,KAAa,EAAS,KAAa;QAAnC,UAAK,GAAL,KAAK,CAAQ;QAAS,UAAK,GAAL,KAAK,CAAQ;IAAI,CAAC;IAEpD,MAAM,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAA0B;QACrD,OAAO,IAAI,sBAAsB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACpD,CAAC;CACJ;AAPD,wDAOC"}
@@ -0,0 +1,32 @@
1
+ import { IRequest } from '../request.interface';
2
+ export declare class ReportAggregateValueRequest implements IRequest {
3
+ private path;
4
+ private query;
5
+ constructor(path: string, query: {
6
+ [key: string]: string | number;
7
+ });
8
+ getPath(): string;
9
+ getQuery(): {
10
+ [key: string]: string | number;
11
+ };
12
+ getBody(): string | null;
13
+ static builder(): Builder;
14
+ }
15
+ declare class Builder {
16
+ private _workspaceId;
17
+ private _projectIds;
18
+ private _fieldId;
19
+ build(): ReportAggregateValueRequest;
20
+ workspaceId(workspaceId: string): Builder;
21
+ /**
22
+ * Write the project IDs separated by commas.
23
+ * ids=project-id1,project-id2,project-id3
24
+ */
25
+ projectIds(...ids: string[]): Builder;
26
+ /**
27
+ * Field ID to be aggregated.
28
+ * fieldId=fieldId
29
+ */
30
+ fieldId(fieldId: string | null): Builder;
31
+ }
32
+ export {};
@@ -0,0 +1,80 @@
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.ReportAggregateValueRequest = void 0;
16
+ const path_config_1 = require("../path-config");
17
+ class ReportAggregateValueRequest {
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.ReportAggregateValueRequest = ReportAggregateValueRequest;
36
+ class Builder {
37
+ constructor() {
38
+ this._workspaceId = null;
39
+ this._projectIds = [];
40
+ this._fieldId = 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 + path_config_1.PathConfig.REPORTS + path_config_1.PathConfig.AGGREGATE;
45
+ const params = {};
46
+ if (!Array.isArray(this._projectIds) || this._projectIds.length === 0) {
47
+ throw new Error('IllegalArgumentException');
48
+ }
49
+ if (this._projectIds.length > 300) {
50
+ throw new Error('IllegalArgumentException');
51
+ }
52
+ if (!this._fieldId) {
53
+ throw new Error('IllegalArgumentException');
54
+ }
55
+ params['projectIds'] = this._projectIds.join(',');
56
+ params['fieldId'] = this._fieldId;
57
+ return new ReportAggregateValueRequest(path, params);
58
+ }
59
+ workspaceId(workspaceId) {
60
+ this._workspaceId = workspaceId;
61
+ return this;
62
+ }
63
+ /**
64
+ * Write the project IDs separated by commas.
65
+ * ids=project-id1,project-id2,project-id3
66
+ */
67
+ projectIds(...ids) {
68
+ this._projectIds = ids;
69
+ return this;
70
+ }
71
+ /**
72
+ * Field ID to be aggregated.
73
+ * fieldId=fieldId
74
+ */
75
+ fieldId(fieldId) {
76
+ this._fieldId = fieldId;
77
+ return this;
78
+ }
79
+ }
80
+ //# sourceMappingURL=report-aggregate-value-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-aggregate-value-request.js","sourceRoot":"","sources":["../../../src/resource/report/report-aggregate-value-request.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH,gDAA4C;AAG5C,MAAa,2BAA2B;IAEpC,YAAoB,IAAY,EAAU,KAAyC;QAA/D,SAAI,GAAJ,IAAI,CAAQ;QAAU,UAAK,GAAL,KAAK,CAAoC;IACnF,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;CAEJ;AArBD,kEAqBC;AAED,MAAM,OAAO;IAAb;QACY,iBAAY,GAAkB,IAAI,CAAC;QACnC,gBAAW,GAAa,EAAE,CAAC;QAC3B,aAAQ,GAAkB,IAAI,CAAC;IA+C3C,CAAC;IA7CU,KAAK;QACR,MAAM,IAAI,GAAG,wBAAU,CAAC,IAAI,GAAG,wBAAU,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,YAAY,EAAE;YACzE,wBAAU,CAAC,QAAQ,GAAG,wBAAU,CAAC,OAAO,GAAG,wBAAU,CAAC,SAAS,CAAC;QAEpE,MAAM,MAAM,GAAuC,EAAE,CAAC;QAEtD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YACnE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;SAC/C;QACD,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,GAAG,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;SAC/C;QAED,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;SAC/C;QAED,MAAM,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAClD,MAAM,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;QAElC,OAAO,IAAI,2BAA2B,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;IAEM,WAAW,CAAC,WAAmB;QAClC,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;OAGG;IACI,UAAU,CAAC,GAAG,GAAa;QAC9B,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;OAGG;IACI,OAAO,CAAC,OAAsB;QACjC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
@@ -0,0 +1,104 @@
1
+ import { IRequest } from '../request.interface';
2
+ export declare class ReportBulkCountRequest implements IRequest {
3
+ private path;
4
+ private query;
5
+ constructor(path: string, query: {
6
+ [key: string]: string | number;
7
+ });
8
+ getPath(): string;
9
+ getQuery(): {
10
+ [key: string]: string | number;
11
+ };
12
+ getBody(): string | null;
13
+ static builder(): Builder;
14
+ }
15
+ declare class Builder {
16
+ private _workspaceId;
17
+ private _projectIds;
18
+ private _query;
19
+ private _emp;
20
+ private _noemp;
21
+ private _includes;
22
+ private _eq;
23
+ private _neq;
24
+ private _lt;
25
+ private _lte;
26
+ private _gt;
27
+ private _gte;
28
+ private _term;
29
+ build(): ReportBulkCountRequest;
30
+ workspaceId(workspaceId: string): Builder;
31
+ /**
32
+ * Write the project IDs separated by commas.
33
+ * projectIds=project-id1,project-id2,project-id3
34
+ */
35
+ projectIds(...ids: string[]): Builder;
36
+ /**
37
+ * Search string.
38
+ * query=searchText
39
+ */
40
+ query(query: string | null): Builder;
41
+ /**
42
+ * Word search (blank fields only).
43
+ * emp=fieldId
44
+ */
45
+ emp(fieldId: string): Builder;
46
+ /**
47
+ * Word search (non-blank fields only).
48
+ * noemp=fieldId
49
+ */
50
+ noemp(fieldId: string): Builder;
51
+ /**
52
+ * Word search (specific keyword).
53
+ * includes=fieldId1:searchText1;fieldId2:searchText2
54
+ * - For example, the arguments are as follows
55
+ * 'fieldId1:searchText1', 'fieldId2:searchText2',...
56
+ */
57
+ includes(...includes: string[]): Builder;
58
+ /**
59
+ * Numeric value (equals).
60
+ * eq=fieldId:123
61
+ */
62
+ eq(fieldId: string, value: string): Builder;
63
+ /**
64
+ * Numeric value (not equal).
65
+ * eq=fieldId:123
66
+ */
67
+ neq(fieldId: string, value: string): Builder;
68
+ /**
69
+ * Numeric value (less than).
70
+ * eq=fieldId:123
71
+ */
72
+ lt(fieldId: string, value: string): Builder;
73
+ /**
74
+ * Numeric value (less than or equal to).
75
+ * eq=fieldId:123
76
+ */
77
+ lte(fieldId: string, value: string): Builder;
78
+ /**
79
+ * Numeric value (greater than).
80
+ * eq=fieldId:123
81
+ */
82
+ gt(fieldId: string, value: string): Builder;
83
+ /**
84
+ * Numeric value (grater than or equal to).
85
+ * eq=fieldId:123
86
+ */
87
+ gte(fieldId: string, value: string): Builder;
88
+ /**
89
+ * Date type period search (range).
90
+ * yyyy-MM-dd
91
+ */
92
+ term(fieldId: string, from: string, to: string): Builder;
93
+ /**
94
+ * Date type period search (from).
95
+ * yyyy-MM-dd
96
+ */
97
+ termFrom(fieldId: string, from: string): Builder;
98
+ /**
99
+ * Date type period search (to).
100
+ * yyyy-MM-dd
101
+ */
102
+ termTo(fieldId: string, to: string): Builder;
103
+ }
104
+ export {};