@jd-data-limited/easy-fm 3.2.7 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -24
- package/package.json +15 -8
- package/src/FMError.d.ts +1 -1
- package/src/FMError.js +7 -2
- package/src/FMError.ts +3 -3
- package/src/connection/FMHost.d.ts +3 -2
- package/src/connection/FMHost.js +37 -47
- package/src/connection/FMHost.ts +6 -6
- package/src/connection/HostBase.d.ts +1 -1
- package/src/connection/HostBase.js +1 -1
- package/src/connection/HostBase.ts +2 -4
- package/src/connection/database.d.ts +12 -9
- package/src/connection/database.js +93 -116
- package/src/connection/database.ts +79 -90
- package/src/connection/databaseBase.d.ts +5 -2
- package/src/connection/databaseBase.js +1 -1
- package/src/connection/databaseBase.ts +5 -4
- package/src/databaseStructure.d.ts +6 -0
- package/src/databaseStructure.js +4 -0
- package/src/databaseStructure.ts +12 -0
- package/src/index.d.ts +3 -6
- package/src/index.js +3 -5
- package/src/index.ts +4 -9
- package/src/layouts/layout.d.ts +5 -19
- package/src/layouts/layout.js +27 -69
- package/src/layouts/layout.ts +26 -65
- package/src/layouts/layoutBase.d.ts +4 -4
- package/src/layouts/layoutBase.js +1 -1
- package/src/layouts/layoutBase.ts +5 -5
- package/src/layouts/layoutInterface.d.ts +1 -1
- package/src/layouts/layoutInterface.js +1 -1
- package/src/layouts/layoutInterface.ts +2 -2
- package/src/layouts/layoutRecordManager.d.ts +5 -6
- package/src/layouts/layoutRecordManager.js +20 -39
- package/src/layouts/layoutRecordManager.ts +20 -41
- package/src/layouts/recordFieldsMap.d.ts +2 -2
- package/src/layouts/recordFieldsMap.js +1 -1
- package/src/layouts/recordFieldsMap.ts +3 -3
- package/src/models/apiResults.d.ts +103 -0
- package/src/models/apiResults.js +28 -0
- package/src/models/apiResults.ts +112 -0
- package/src/records/field.d.ts +3 -22
- package/src/records/field.js +4 -177
- package/src/records/field.ts +4 -187
- package/src/records/fieldBase.d.ts +30 -0
- package/src/records/fieldBase.js +154 -0
- package/src/records/fieldBase.ts +174 -0
- package/src/records/getOperations/recordGetOperation.d.ts +47 -11
- package/src/records/getOperations/recordGetOperation.js +144 -30
- package/src/records/getOperations/recordGetOperation.ts +172 -30
- package/src/records/layoutRecord.d.ts +8 -7
- package/src/records/layoutRecord.js +107 -153
- package/src/records/layoutRecord.ts +117 -141
- package/src/records/portal.d.ts +6 -5
- package/src/records/portal.js +4 -1
- package/src/records/portal.ts +7 -7
- package/src/records/portalBase.d.ts +5 -4
- package/src/records/portalBase.js +1 -1
- package/src/records/portalBase.ts +6 -6
- package/src/records/portalRecord.d.ts +6 -6
- package/src/records/portalRecord.js +5 -3
- package/src/records/portalRecord.ts +5 -5
- package/src/records/recordBase.d.ts +7 -12
- package/src/records/recordBase.js +12 -11
- package/src/records/recordBase.ts +10 -15
- package/src/types.d.ts +18 -19
- package/src/types.js +7 -1
- package/src/types.ts +20 -21
- package/.expo/README.md +0 -15
- package/.expo/settings.json +0 -8
- package/.idea/compiler.xml +0 -7
- package/.idea/copyright/JD_Data.xml +0 -6
- package/.idea/copyright/profiles_settings.xml +0 -7
- package/.idea/discord.xml +0 -7
- package/.idea/easy-fm.iml +0 -8
- package/.idea/jsLibraryMappings.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/php.xml +0 -18
- package/.idea/vcs.xml +0 -6
- package/decs.d.ts +0 -7
- package/dist/index.min.js +0 -2
- package/dist/index.min.js.LICENSE.txt +0 -3
- package/docs/classes/FileMakerConnection.md +0 -86
- package/docs/classes/layout.md +0 -0
- package/examples/test.js +0 -7
- package/fmErrors.json +0 -1010
- package/img.png +0 -0
- package/src/records/getOperations/find.d.ts +0 -15
- package/src/records/getOperations/find.js +0 -90
- package/src/records/getOperations/find.ts +0 -88
- package/src/records/getOperations/recordGetRange.d.ts +0 -13
- package/src/records/getOperations/recordGetRange.js +0 -95
- package/src/records/getOperations/recordGetRange.ts +0 -84
- package/src/records/portalRecordBase.d.ts +0 -4
- package/src/records/portalRecordBase.js +0 -6
- package/test.d.ts +0 -2
- package/test.js +0 -30
- package/test.ts +0 -33
- package/test2.d.ts +0 -1
- package/test2.js +0 -15
- package/tsconfig.json +0 -16
- package/webpack.config.cjs +0 -20
package/src/types.d.ts
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
3
|
import * as http from "http";
|
|
4
4
|
import { FMError } from "./FMError.js";
|
|
5
|
-
import { LayoutInterface } from "./layouts/layoutInterface";
|
|
6
|
-
export interface DatabaseStructure {
|
|
7
|
-
layouts: {
|
|
8
|
-
[key: string]: LayoutInterface;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
5
|
export interface databaseOptionsBase {
|
|
12
6
|
database: string;
|
|
13
7
|
credentials: loginOptionsOAuth | loginOptionsFileMaker | loginOptionsClaris | loginOptionsToken;
|
|
@@ -39,17 +33,18 @@ export interface loginOptionsClaris {
|
|
|
39
33
|
fmid: string;
|
|
40
34
|
};
|
|
41
35
|
}
|
|
42
|
-
export interface
|
|
43
|
-
portalName:
|
|
36
|
+
export interface portalFetchData<T = string> {
|
|
37
|
+
portalName: T;
|
|
44
38
|
offset: number;
|
|
45
39
|
limit: number;
|
|
46
40
|
}
|
|
41
|
+
export type ScriptRequestData = {
|
|
42
|
+
prerequest?: Script;
|
|
43
|
+
presort?: Script;
|
|
44
|
+
after?: Script;
|
|
45
|
+
};
|
|
47
46
|
export interface extraBodyOptions {
|
|
48
|
-
scripts?:
|
|
49
|
-
prerequest?: Script;
|
|
50
|
-
presort?: Script;
|
|
51
|
-
after?: Script;
|
|
52
|
-
};
|
|
47
|
+
scripts?: ScriptRequestData;
|
|
53
48
|
}
|
|
54
49
|
export declare enum DOWNLOAD_MODES {
|
|
55
50
|
Stream = 0,
|
|
@@ -65,10 +60,6 @@ export interface recordObject {
|
|
|
65
60
|
fieldData: any;
|
|
66
61
|
portalData?: portalDataObject;
|
|
67
62
|
}
|
|
68
|
-
export interface fileMakerResponse {
|
|
69
|
-
response: any;
|
|
70
|
-
messages: any[];
|
|
71
|
-
}
|
|
72
63
|
export interface portalDataObject {
|
|
73
64
|
[key: string]: recordObject;
|
|
74
65
|
}
|
|
@@ -122,3 +113,11 @@ export interface AuthorizationHeadersOAuth {
|
|
|
122
113
|
"X-FM-Data-OAuth-RequestId": string;
|
|
123
114
|
"X-FM-Data-OAuth-Identifier": string;
|
|
124
115
|
}
|
|
116
|
+
export type RecordFetchOptions = {
|
|
117
|
+
readonly portals: readonly string[];
|
|
118
|
+
};
|
|
119
|
+
export declare enum RecordTypes {
|
|
120
|
+
UNKNOWN = 0,
|
|
121
|
+
LAYOUT = 1,
|
|
122
|
+
PORTAL = 2
|
|
123
|
+
}
|
package/src/types.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2024. See LICENSE file for more information
|
|
3
3
|
*/
|
|
4
4
|
export var DOWNLOAD_MODES;
|
|
5
5
|
(function (DOWNLOAD_MODES) {
|
|
6
6
|
DOWNLOAD_MODES[DOWNLOAD_MODES["Stream"] = 0] = "Stream";
|
|
7
7
|
DOWNLOAD_MODES[DOWNLOAD_MODES["Buffer"] = 1] = "Buffer";
|
|
8
8
|
})(DOWNLOAD_MODES || (DOWNLOAD_MODES = {}));
|
|
9
|
+
export var RecordTypes;
|
|
10
|
+
(function (RecordTypes) {
|
|
11
|
+
RecordTypes[RecordTypes["UNKNOWN"] = 0] = "UNKNOWN";
|
|
12
|
+
RecordTypes[RecordTypes["LAYOUT"] = 1] = "LAYOUT";
|
|
13
|
+
RecordTypes[RecordTypes["PORTAL"] = 2] = "PORTAL";
|
|
14
|
+
})(RecordTypes || (RecordTypes = {}));
|
package/src/types.ts
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2024. See LICENSE file for more information
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args));
|
|
6
6
|
// @ts-ignore
|
|
7
7
|
import * as http from "http";
|
|
8
8
|
import {FMError} from "./FMError.js";
|
|
9
|
-
import {LayoutInterface} from "./layouts/layoutInterface";
|
|
10
|
-
|
|
11
|
-
// import * as btoa from "btoa";
|
|
12
|
-
export interface DatabaseStructure {
|
|
13
|
-
layouts: {
|
|
14
|
-
[key: string]: LayoutInterface
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
9
|
|
|
18
10
|
export interface databaseOptionsBase {
|
|
19
11
|
database: string
|
|
@@ -52,18 +44,20 @@ export interface loginOptionsClaris {
|
|
|
52
44
|
}
|
|
53
45
|
}
|
|
54
46
|
|
|
55
|
-
export interface
|
|
56
|
-
portalName:
|
|
47
|
+
export interface portalFetchData<T = string> {
|
|
48
|
+
portalName: T,
|
|
57
49
|
offset: number,
|
|
58
50
|
limit: number
|
|
59
51
|
}
|
|
60
52
|
|
|
53
|
+
export type ScriptRequestData = {
|
|
54
|
+
prerequest?: Script,
|
|
55
|
+
presort?: Script,
|
|
56
|
+
after?: Script,
|
|
57
|
+
}
|
|
58
|
+
|
|
61
59
|
export interface extraBodyOptions {
|
|
62
|
-
scripts?:
|
|
63
|
-
prerequest?: Script,
|
|
64
|
-
presort?: Script,
|
|
65
|
-
after?: Script,
|
|
66
|
-
}
|
|
60
|
+
scripts?: ScriptRequestData
|
|
67
61
|
}
|
|
68
62
|
|
|
69
63
|
export enum DOWNLOAD_MODES {
|
|
@@ -83,11 +77,6 @@ export interface recordObject {
|
|
|
83
77
|
portalData?: portalDataObject
|
|
84
78
|
}
|
|
85
79
|
|
|
86
|
-
export interface fileMakerResponse {
|
|
87
|
-
response: any,
|
|
88
|
-
messages: any[]
|
|
89
|
-
}
|
|
90
|
-
|
|
91
80
|
export interface portalDataObject {
|
|
92
81
|
[key: string]: recordObject
|
|
93
82
|
}
|
|
@@ -152,4 +141,14 @@ export interface AuthorizationHeadersOAuth {
|
|
|
152
141
|
"Content-Type": "application/json"
|
|
153
142
|
"X-FM-Data-OAuth-RequestId": string,
|
|
154
143
|
"X-FM-Data-OAuth-Identifier": string
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export type RecordFetchOptions = {
|
|
147
|
+
readonly portals: readonly string[]
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export enum RecordTypes {
|
|
151
|
+
UNKNOWN,
|
|
152
|
+
LAYOUT,
|
|
153
|
+
PORTAL
|
|
155
154
|
}
|
package/.expo/README.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
> Why do I have a folder named ".expo" in my project?
|
|
2
|
-
|
|
3
|
-
The ".expo" folder is created when an Expo project is started using "expo start" command.
|
|
4
|
-
|
|
5
|
-
> What do the files contain?
|
|
6
|
-
|
|
7
|
-
- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
|
|
8
|
-
- "packager-info.json": contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator.
|
|
9
|
-
- "settings.json": contains the server configuration that is used to serve the application manifest.
|
|
10
|
-
|
|
11
|
-
> Should I commit the ".expo" folder?
|
|
12
|
-
|
|
13
|
-
No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.
|
|
14
|
-
|
|
15
|
-
Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
|
package/.expo/settings.json
DELETED
package/.idea/compiler.xml
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<component name="CopyrightManager">
|
|
2
|
-
<copyright>
|
|
3
|
-
<option name="notice" value="Copyright (c) &#36;originalComment.match("Copyright \(c\) (\d+)", 1, "-", "&#36;today.year")&#36;today.year. See LICENSE file for more information" />
|
|
4
|
-
<option name="myName" value="JD-Data" />
|
|
5
|
-
</copyright>
|
|
6
|
-
</component>
|
package/.idea/discord.xml
DELETED
package/.idea/easy-fm.iml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="WEB_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager">
|
|
4
|
-
<content url="file://$MODULE_DIR$" />
|
|
5
|
-
<orderEntry type="inheritedJdk" />
|
|
6
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
7
|
-
</component>
|
|
8
|
-
</module>
|
package/.idea/modules.xml
DELETED
package/.idea/php.xml
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="MessDetectorOptionsConfiguration">
|
|
4
|
-
<option name="transferred" value="true" />
|
|
5
|
-
</component>
|
|
6
|
-
<component name="PHPCSFixerOptionsConfiguration">
|
|
7
|
-
<option name="transferred" value="true" />
|
|
8
|
-
</component>
|
|
9
|
-
<component name="PHPCodeSnifferOptionsConfiguration">
|
|
10
|
-
<option name="transferred" value="true" />
|
|
11
|
-
</component>
|
|
12
|
-
<component name="PhpStanOptionsConfiguration">
|
|
13
|
-
<option name="transferred" value="true" />
|
|
14
|
-
</component>
|
|
15
|
-
<component name="PsalmOptionsConfiguration">
|
|
16
|
-
<option name="transferred" value="true" />
|
|
17
|
-
</component>
|
|
18
|
-
</project>
|
package/.idea/vcs.xml
DELETED