@kintone/rest-api-client 3.3.3 → 3.3.5
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/esm/KintoneFields/exportTypes/__checks__/usecases/field.js +1 -1
- package/esm/KintoneFields/exportTypes/__checks__/usecases/layout.js +1 -1
- package/esm/KintoneFields/exportTypes/__checks__/usecases/property.js +1 -1
- package/esm/KintoneFields/types/field.d.ts +34 -34
- package/esm/KintoneFields/types/fieldLayout.d.ts +29 -29
- package/esm/KintoneFields/types/layout.d.ts +4 -4
- package/esm/KintoneFields/types/property.d.ts +32 -32
- package/esm/KintoneRequestConfigBuilder.d.ts +1 -1
- package/esm/KintoneRequestConfigBuilder.js +1 -1
- package/esm/KintoneRestAPIClient.d.ts +3 -3
- package/esm/__tests__/KintoneRequestConfigBuilder.test.js +1 -1
- package/esm/__tests__/KintoneResponseHandler.test.js +1 -1
- package/esm/client/AppClient.d.ts +6 -6
- package/esm/client/AppClient.js +1 -1
- package/esm/client/AppClient.js.map +1 -1
- package/esm/client/BulkRequestClient.d.ts +1 -1
- package/esm/client/FileClient.js +1 -1
- package/esm/client/RecordClient.d.ts +1 -1
- package/esm/client/RecordClient.js +1 -1
- package/esm/client/__tests__/AppClient.test.js +1 -1
- package/esm/client/__tests__/BulkRequestClient.test.js +1 -1
- package/esm/client/__tests__/File.test.js +1 -1
- package/esm/client/__tests__/RecordClient.test.js +1 -1
- package/esm/client/types/app/action.d.ts +7 -7
- package/esm/client/types/app/customize.d.ts +5 -5
- package/esm/client/types/app/form.d.ts +2 -2
- package/esm/client/types/app/index.d.ts +3 -3
- package/esm/client/types/app/notification.d.ts +6 -6
- package/esm/client/types/app/processManagement.d.ts +7 -7
- package/esm/client/types/app/report.d.ts +38 -38
- package/esm/client/types/app/right.d.ts +12 -12
- package/esm/client/types/app/view.d.ts +7 -7
- package/esm/client/types/entity.d.ts +2 -2
- package/esm/client/types/index.d.ts +3 -3
- package/esm/client/types/record/index.d.ts +5 -5
- package/esm/error/KintoneRestAPIError.d.ts +4 -4
- package/esm/http/AxiosClient.js +1 -1
- package/esm/http/HttpClientInterface.d.ts +6 -6
- package/esm/http/MockClient.d.ts +1 -1
- package/esm/http/MockClient.js +1 -1
- package/esm/platform/UnsupportedPlatformError.d.ts +1 -1
- package/esm/platform/__tests__/browser.test.d.ts +3 -0
- package/esm/platform/__tests__/browser.test.js +11 -2
- package/esm/platform/__tests__/browser.test.js.map +1 -1
- package/esm/platform/browser.js +1 -1
- package/esm/platform/index.d.ts +1 -1
- package/esm/platform/node.js +1 -1
- package/esm/types/auth.d.ts +6 -6
- package/lib/KintoneFields/exportTypes/__checks__/usecases/field.js +1 -1
- package/lib/KintoneFields/exportTypes/__checks__/usecases/layout.js +1 -1
- package/lib/KintoneFields/exportTypes/__checks__/usecases/property.js +1 -1
- package/lib/KintoneFields/types/field.d.ts +34 -34
- package/lib/KintoneFields/types/fieldLayout.d.ts +29 -29
- package/lib/KintoneFields/types/layout.d.ts +4 -4
- package/lib/KintoneFields/types/property.d.ts +32 -32
- package/lib/KintoneRequestConfigBuilder.d.ts +1 -1
- package/lib/KintoneRequestConfigBuilder.js +1 -1
- package/lib/KintoneRestAPIClient.d.ts +3 -3
- package/lib/__tests__/KintoneRequestConfigBuilder.test.js +1 -1
- package/lib/__tests__/KintoneResponseHandler.test.js +1 -1
- package/lib/client/AppClient.d.ts +6 -6
- package/lib/client/AppClient.js +1 -1
- package/lib/client/AppClient.js.map +1 -1
- package/lib/client/BulkRequestClient.d.ts +1 -1
- package/lib/client/FileClient.js +1 -1
- package/lib/client/RecordClient.d.ts +1 -1
- package/lib/client/RecordClient.js +1 -1
- package/lib/client/__tests__/AppClient.test.js +1 -1
- package/lib/client/__tests__/BulkRequestClient.test.js +1 -1
- package/lib/client/__tests__/File.test.js +1 -1
- package/lib/client/__tests__/RecordClient.test.js +1 -1
- package/lib/client/types/app/action.d.ts +7 -7
- package/lib/client/types/app/customize.d.ts +5 -5
- package/lib/client/types/app/form.d.ts +2 -2
- package/lib/client/types/app/index.d.ts +3 -3
- package/lib/client/types/app/notification.d.ts +6 -6
- package/lib/client/types/app/processManagement.d.ts +7 -7
- package/lib/client/types/app/report.d.ts +38 -38
- package/lib/client/types/app/right.d.ts +12 -12
- package/lib/client/types/app/view.d.ts +7 -7
- package/lib/client/types/entity.d.ts +2 -2
- package/lib/client/types/index.d.ts +3 -3
- package/lib/client/types/record/index.d.ts +5 -5
- package/lib/error/KintoneRestAPIError.d.ts +4 -4
- package/lib/http/AxiosClient.js +1 -1
- package/lib/http/HttpClientInterface.d.ts +6 -6
- package/lib/http/MockClient.d.ts +1 -1
- package/lib/http/MockClient.js +1 -1
- package/lib/platform/UnsupportedPlatformError.d.ts +1 -1
- package/lib/platform/__tests__/browser.test.d.ts +3 -0
- package/lib/platform/__tests__/browser.test.js +10 -1
- package/lib/platform/__tests__/browser.test.js.map +1 -1
- package/lib/platform/browser.js +1 -1
- package/lib/platform/index.d.ts +1 -1
- package/lib/platform/node.js +1 -1
- package/lib/types/auth.d.ts +6 -6
- package/package.json +2 -2
- package/umd/KintoneRestAPIClient.js +2 -2
- package/umd/KintoneRestAPIClient.min.js +1 -1
|
@@ -7,21 +7,21 @@ export interface HttpClient {
|
|
|
7
7
|
put: <T extends object>(path: string, params: object) => Promise<T>;
|
|
8
8
|
delete: <T extends object>(path: string, params: object) => Promise<T>;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type ErrorResponse<T = any> = {
|
|
11
11
|
data: T;
|
|
12
12
|
status: number;
|
|
13
13
|
statusText: string;
|
|
14
14
|
headers: any;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type Response<T = any> = {
|
|
17
17
|
data: T;
|
|
18
18
|
headers: any;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
21
|
-
export
|
|
20
|
+
export type HttpMethod = "get" | "post" | "put" | "delete";
|
|
21
|
+
export type Params = {
|
|
22
22
|
[key: string]: unknown;
|
|
23
23
|
};
|
|
24
|
-
export
|
|
24
|
+
export type ProxyConfig = {
|
|
25
25
|
host: string;
|
|
26
26
|
port: number;
|
|
27
27
|
auth?: {
|
|
@@ -35,7 +35,7 @@ export interface HttpClientError<T = ErrorResponse> extends Error {
|
|
|
35
35
|
export interface ResponseHandler {
|
|
36
36
|
handle: <T = any>(response: Promise<Response<T>>) => Promise<T>;
|
|
37
37
|
}
|
|
38
|
-
export
|
|
38
|
+
export type RequestConfig = {
|
|
39
39
|
method: HttpMethod;
|
|
40
40
|
url: string;
|
|
41
41
|
headers: any;
|
package/esm/http/MockClient.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HttpClient, RequestConfigBuilder, ResponseHandler } from "./HttpClientInterface";
|
|
2
2
|
import type FormData from "form-data";
|
|
3
3
|
import { KintoneResponseHandler } from "../KintoneResponseHandler";
|
|
4
|
-
|
|
4
|
+
type Log = {
|
|
5
5
|
method: "get" | "post" | "put" | "delete";
|
|
6
6
|
path: string;
|
|
7
7
|
params: {
|
package/esm/http/MockClient.js
CHANGED
|
@@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
13
13
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
14
|
function step(op) {
|
|
15
15
|
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
17
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
18
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
19
|
switch (op[0]) {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
5
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
6
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -13,7 +16,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
13
16
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
17
|
function step(op) {
|
|
15
18
|
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
19
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
20
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
21
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
22
|
switch (op[0]) {
|
|
@@ -34,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
34
37
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
38
|
}
|
|
36
39
|
};
|
|
37
|
-
import { getRequestToken } from "../browser";
|
|
40
|
+
import { buildFormDataValue, getRequestToken } from "../browser";
|
|
38
41
|
describe("getRequestToken()", function () {
|
|
39
42
|
var originalKintone;
|
|
40
43
|
var originalGaroon;
|
|
@@ -97,4 +100,10 @@ describe("getRequestToken()", function () {
|
|
|
97
100
|
});
|
|
98
101
|
}); });
|
|
99
102
|
});
|
|
103
|
+
describe("buildFormDataValue", function () {
|
|
104
|
+
it("should detect MIME type correctly (PDF)", function () {
|
|
105
|
+
var blob = buildFormDataValue("dummy data", "attachment/input.pdf");
|
|
106
|
+
expect(blob.type).toBe("application/pdf");
|
|
107
|
+
});
|
|
108
|
+
});
|
|
100
109
|
//# sourceMappingURL=browser.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.test.js","sourceRoot":"","sources":["../../../src/platform/__tests__/browser.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"browser.test.js","sourceRoot":"","sources":["../../../src/platform/__tests__/browser.test.ts"],"names":[],"mappings":"AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEjE,QAAQ,CAAC,mBAAmB,EAAE;IAC5B,IAAI,eAAoB,CAAC;IACzB,IAAI,cAAmB,CAAC;IACxB,UAAU,CAAC;QACT,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;QAC/B,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,SAAS,CAAC;QACR,MAAM,CAAC,MAAM,GAAG,cAAc,CAAC;QAC/B,MAAM,CAAC,OAAO,GAAG,eAAe,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,uCAAuC,EAAE;;;;;oBACpC,KAAK,GAAG,kCAAkC,CAAC;oBACjD,MAAM,CAAC,OAAO,GAAG;wBACf,eAAe,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK;qBAC7B,CAAC;oBACmB,qBAAM,eAAe,EAAE,EAAA;;oBAAtC,YAAY,GAAG,SAAuB;oBAC5C,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;;;SAClC,CAAC,CAAC;IACH,EAAE,CAAC,sCAAsC,EAAE;;;;;oBACnC,KAAK,GAAG,iCAAiC,CAAC;oBAChD,MAAM,CAAC,MAAM,GAAG;wBACd,OAAO,EAAE;4BACP,OAAO,EAAE;gCACP,eAAe,EAAE;oCAAY,sBAAA,KAAK,EAAA;yCAAA;6BACnC;yBACF;qBACF,CAAC;oBACmB,qBAAM,eAAe,EAAE,EAAA;;oBAAtC,YAAY,GAAG,SAAuB;oBAC5C,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;;;SAClC,CAAC,CAAC;IACH,EAAE,CAAC,wCAAwC,EAAE;;;wBAC3C,qBAAM,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAC7C,qDAAqD,CACtD,EAAA;;oBAFD,SAEC,CAAC;;;;SACH,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,oBAAoB,EAAE;IAC7B,EAAE,CAAC,yCAAyC,EAAE;QAC5C,IAAM,IAAI,GAAG,kBAAkB,CAAC,YAAY,EAAE,sBAAsB,CAAC,CAAC;QACtE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/esm/platform/browser.js
CHANGED
|
@@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
13
13
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
14
|
function step(op) {
|
|
15
15
|
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
17
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
18
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
19
|
switch (op[0]) {
|
package/esm/platform/index.d.ts
CHANGED
package/esm/platform/node.js
CHANGED
|
@@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
13
13
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
14
|
function step(op) {
|
|
15
15
|
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
17
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
18
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
19
|
switch (op[0]) {
|
package/esm/types/auth.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
type ApiTokenAuth = {
|
|
2
2
|
type: "apiToken";
|
|
3
3
|
apiToken: string | string[];
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
type PasswordAuth = {
|
|
6
6
|
type: "password";
|
|
7
7
|
username: string;
|
|
8
8
|
password: string;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
type SessionAuth = {
|
|
11
11
|
type: "session";
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
type OAuthTokenAuth = {
|
|
14
14
|
type: "oAuthToken";
|
|
15
15
|
oAuthToken: string;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
18
|
-
export
|
|
17
|
+
export type DiscriminatedAuth = ApiTokenAuth | PasswordAuth | SessionAuth | OAuthTokenAuth;
|
|
18
|
+
export type BasicAuth = {
|
|
19
19
|
username: string;
|
|
20
20
|
password: string;
|
|
21
21
|
};
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
|
|
1
|
+
type FieldWith<T extends string, V> = {
|
|
2
2
|
type: T;
|
|
3
3
|
value: V;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
type Entity = {
|
|
6
6
|
code: string;
|
|
7
7
|
name: string;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type FileInformation = {
|
|
10
10
|
contentType: string;
|
|
11
11
|
fileKey: string;
|
|
12
12
|
name: string;
|
|
13
13
|
size: string;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
33
|
-
export
|
|
34
|
-
export
|
|
35
|
-
export
|
|
36
|
-
export
|
|
37
|
-
export
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
export
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
|
|
15
|
+
export type ID = FieldWith<"__ID__", string>;
|
|
16
|
+
export type Revision = FieldWith<"__REVISION__", string>;
|
|
17
|
+
export type RecordNumber = FieldWith<"RECORD_NUMBER", string>;
|
|
18
|
+
export type Creator = FieldWith<"CREATOR", Entity>;
|
|
19
|
+
export type CreatedTime = FieldWith<"CREATED_TIME", string>;
|
|
20
|
+
export type Modifier = FieldWith<"MODIFIER", Entity>;
|
|
21
|
+
export type UpdatedTime = FieldWith<"UPDATED_TIME", string>;
|
|
22
|
+
export type SingleLineText = FieldWith<"SINGLE_LINE_TEXT", string>;
|
|
23
|
+
export type Number = FieldWith<"NUMBER", string>;
|
|
24
|
+
export type Calc = FieldWith<"CALC", string>;
|
|
25
|
+
export type MultiLineText = FieldWith<"MULTI_LINE_TEXT", string>;
|
|
26
|
+
export type RichText = FieldWith<"RICH_TEXT", string>;
|
|
27
|
+
export type Link = FieldWith<"LINK", string>;
|
|
28
|
+
export type CheckBox = FieldWith<"CHECK_BOX", string[]>;
|
|
29
|
+
export type RadioButton = FieldWith<"RADIO_BUTTON", string>;
|
|
30
|
+
export type Dropdown = FieldWith<"DROP_DOWN", string | null>;
|
|
31
|
+
export type MultiSelect = FieldWith<"MULTI_SELECT", string[]>;
|
|
32
|
+
export type File = FieldWith<"FILE", FileInformation[]>;
|
|
33
|
+
export type Date = FieldWith<"DATE", string | null>;
|
|
34
|
+
export type Time = FieldWith<"TIME", string | null>;
|
|
35
|
+
export type DateTime = FieldWith<"DATETIME", string>;
|
|
36
|
+
export type UserSelect = FieldWith<"USER_SELECT", Entity[]>;
|
|
37
|
+
export type OrganizationSelect = FieldWith<"ORGANIZATION_SELECT", Entity[]>;
|
|
38
|
+
export type GroupSelect = FieldWith<"GROUP_SELECT", Entity[]>;
|
|
39
|
+
export type Category = FieldWith<"CATEGORY", string[]>;
|
|
40
|
+
export type Status = FieldWith<"STATUS", string>;
|
|
41
|
+
export type StatusAssignee = FieldWith<"STATUS_ASSIGNEE", Entity[]>;
|
|
42
|
+
export type InSubtable = SingleLineText | Number | Calc | MultiLineText | RichText | Link | CheckBox | RadioButton | Dropdown | MultiSelect | File | Date | Time | DateTime | UserSelect | OrganizationSelect | GroupSelect;
|
|
43
|
+
type SubtableRow<T extends {
|
|
44
44
|
[fieldCode: string]: InSubtable;
|
|
45
45
|
}> = {
|
|
46
46
|
id: string;
|
|
47
47
|
value: T;
|
|
48
48
|
};
|
|
49
|
-
export
|
|
49
|
+
export type Subtable<T extends {
|
|
50
50
|
[fieldCode: string]: InSubtable;
|
|
51
51
|
}> = FieldWith<"SUBTABLE", Array<SubtableRow<T>>>;
|
|
52
|
-
export
|
|
52
|
+
export type OneOf = ID | Revision | RecordNumber | Creator | CreatedTime | Modifier | UpdatedTime | SingleLineText | Number | Calc | MultiLineText | RichText | Link | CheckBox | RadioButton | Dropdown | MultiSelect | File | Date | Time | DateTime | UserSelect | OrganizationSelect | GroupSelect | Category | Status | StatusAssignee | Subtable<{
|
|
53
53
|
[fieldCode: string]: InSubtable;
|
|
54
54
|
}>;
|
|
55
55
|
export {};
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
|
|
1
|
+
type FieldLayoutWith<T extends string, S = {
|
|
2
2
|
width: string;
|
|
3
3
|
}> = {
|
|
4
4
|
type: T;
|
|
5
5
|
code: string;
|
|
6
6
|
size: S;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
8
|
+
export type RecordNumber = FieldLayoutWith<"RECORD_NUMBER">;
|
|
9
|
+
export type Creator = FieldLayoutWith<"CREATOR">;
|
|
10
|
+
export type CreatedTime = FieldLayoutWith<"CREATED_TIME">;
|
|
11
|
+
export type Modifier = FieldLayoutWith<"MODIFIER">;
|
|
12
|
+
export type UpdatedTime = FieldLayoutWith<"UPDATED_TIME">;
|
|
13
|
+
export type SingleLineText = FieldLayoutWith<"SINGLE_LINE_TEXT">;
|
|
14
|
+
export type Number = FieldLayoutWith<"NUMBER">;
|
|
15
|
+
export type Calc = FieldLayoutWith<"CALC">;
|
|
16
|
+
export type MultiLineText = FieldLayoutWith<"MULTI_LINE_TEXT", {
|
|
17
17
|
width: string;
|
|
18
18
|
innerHeight: string;
|
|
19
19
|
}>;
|
|
20
|
-
export
|
|
20
|
+
export type RichText = FieldLayoutWith<"RICH_TEXT", {
|
|
21
21
|
width: string;
|
|
22
22
|
innerHeight: string;
|
|
23
23
|
}>;
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
33
|
-
export
|
|
34
|
-
export
|
|
35
|
-
export
|
|
36
|
-
export
|
|
24
|
+
export type Link = FieldLayoutWith<"LINK">;
|
|
25
|
+
export type CheckBox = FieldLayoutWith<"CHECK_BOX">;
|
|
26
|
+
export type RadioButton = FieldLayoutWith<"RADIO_BUTTON">;
|
|
27
|
+
export type Dropdown = FieldLayoutWith<"DROP_DOWN">;
|
|
28
|
+
export type MultiSelect = FieldLayoutWith<"MULTI_SELECT">;
|
|
29
|
+
export type File = FieldLayoutWith<"FILE">;
|
|
30
|
+
export type Date = FieldLayoutWith<"DATE">;
|
|
31
|
+
export type Time = FieldLayoutWith<"TIME">;
|
|
32
|
+
export type DateTime = FieldLayoutWith<"DATETIME">;
|
|
33
|
+
export type UserSelect = FieldLayoutWith<"USER_SELECT">;
|
|
34
|
+
export type OrganizationSelect = FieldLayoutWith<"ORGANIZATION_SELECT">;
|
|
35
|
+
export type GroupSelect = FieldLayoutWith<"GROUP_SELECT">;
|
|
36
|
+
export type ReferenceTable = {
|
|
37
37
|
type: "REFERENCE_TABLE";
|
|
38
38
|
code: string;
|
|
39
39
|
};
|
|
40
|
-
export
|
|
40
|
+
export type Label = {
|
|
41
41
|
type: "LABEL";
|
|
42
42
|
label: string;
|
|
43
43
|
size: {
|
|
44
44
|
width: string;
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
|
-
export
|
|
47
|
+
export type HR = {
|
|
48
48
|
type: "HR";
|
|
49
49
|
size: {
|
|
50
50
|
width: string;
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
-
export
|
|
53
|
+
export type Spacer = {
|
|
54
54
|
type: "SPACER";
|
|
55
55
|
elementId: string;
|
|
56
56
|
size: {
|
|
@@ -58,6 +58,6 @@ export declare type Spacer = {
|
|
|
58
58
|
height: string;
|
|
59
59
|
};
|
|
60
60
|
};
|
|
61
|
-
export
|
|
62
|
-
export
|
|
61
|
+
export type OneOf = RecordNumber | Creator | CreatedTime | Modifier | UpdatedTime | SingleLineText | Number | Calc | MultiLineText | RichText | Link | CheckBox | RadioButton | Dropdown | MultiSelect | File | Date | Time | DateTime | UserSelect | OrganizationSelect | GroupSelect | ReferenceTable | Label | HR | Spacer;
|
|
62
|
+
export type InSubtable = Exclude<OneOf, RecordNumber | Creator | CreatedTime | Modifier | UpdatedTime | ReferenceTable | Label | HR | Spacer>;
|
|
63
63
|
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as Field from "./fieldLayout";
|
|
2
2
|
export { Field };
|
|
3
|
-
export
|
|
3
|
+
export type Row<T extends Field.OneOf[]> = {
|
|
4
4
|
type: "ROW";
|
|
5
5
|
fields: T;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type Subtable<T extends Field.InSubtable[]> = {
|
|
8
8
|
type: "SUBTABLE";
|
|
9
9
|
code: string;
|
|
10
10
|
fields: T;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type Group<T extends Array<Row<Field.OneOf[]>>> = {
|
|
13
13
|
type: "GROUP";
|
|
14
14
|
code: string;
|
|
15
15
|
layout: T;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type OneOf = Row<Field.OneOf[]> | Subtable<Field.InSubtable[]> | Group<Array<Row<Field.OneOf[]>>>;
|