@etsoo/smarterp-crm 1.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/.gitattributes +2 -0
- package/.github/workflows/main.yml +60 -0
- package/LICENSE +21 -0
- package/README.md +17 -0
- package/__tests__/PersonApi.ts +15 -0
- package/__tests__/app/TestApp.ts +139 -0
- package/__tests__/tsconfig.json +20 -0
- package/babel.config.json +11 -0
- package/lib/cjs/CrmApp.d.ts +186 -0
- package/lib/cjs/CrmApp.js +170 -0
- package/lib/cjs/PersonApi.d.ts +38 -0
- package/lib/cjs/PersonApi.js +45 -0
- package/lib/cjs/PersonProfileApi.d.ts +54 -0
- package/lib/cjs/PersonProfileApi.js +63 -0
- package/lib/cjs/components/index.d.ts +1 -0
- package/lib/cjs/components/index.js +18 -0
- package/lib/cjs/components/person/PersonTiplist.d.ts +28 -0
- package/lib/cjs/components/person/PersonTiplist.js +27 -0
- package/lib/cjs/dto/person/AddressItem.d.ts +36 -0
- package/lib/cjs/dto/person/AddressItem.js +12 -0
- package/lib/cjs/dto/person/CategoryItem.d.ts +16 -0
- package/lib/cjs/dto/person/CategoryItem.js +2 -0
- package/lib/cjs/dto/person/ContactItem.d.ts +30 -0
- package/lib/cjs/dto/person/ContactItem.js +2 -0
- package/lib/cjs/dto/person/MaritalStatus.d.ts +36 -0
- package/lib/cjs/dto/person/MaritalStatus.js +40 -0
- package/lib/cjs/dto/person/PersonDegree.d.ts +26 -0
- package/lib/cjs/dto/person/PersonDegree.js +30 -0
- package/lib/cjs/dto/person/PersonEducation.d.ts +111 -0
- package/lib/cjs/dto/person/PersonEducation.js +115 -0
- package/lib/cjs/dto/person/PersonListDto.d.ts +6 -0
- package/lib/cjs/dto/person/PersonListDto.js +2 -0
- package/lib/cjs/dto/person/PersonQueryData.d.ts +24 -0
- package/lib/cjs/dto/person/PersonQueryData.js +2 -0
- package/lib/cjs/dto/person/PersonReadDto.d.ts +206 -0
- package/lib/cjs/dto/person/PersonReadDto.js +2 -0
- package/lib/cjs/dto/person/PersonTitle.d.ts +36 -0
- package/lib/cjs/dto/person/PersonTitle.js +40 -0
- package/lib/cjs/dto/personProfile/PersonProfileKind.d.ts +26 -0
- package/lib/cjs/dto/personProfile/PersonProfileKind.js +30 -0
- package/lib/cjs/dto/personProfile/PersonProfileListData.d.ts +16 -0
- package/lib/cjs/dto/personProfile/PersonProfileListData.js +2 -0
- package/lib/cjs/dto/personProfile/PersonProfileQueryData.d.ts +43 -0
- package/lib/cjs/dto/personProfile/PersonProfileQueryData.js +2 -0
- package/lib/cjs/dto/personProfile/PersonProfileUpdateReadData.d.ts +73 -0
- package/lib/cjs/dto/personProfile/PersonProfileUpdateReadData.js +2 -0
- package/lib/cjs/dto/personProfile/PersonProfileViewData.d.ts +5 -0
- package/lib/cjs/dto/personProfile/PersonProfileViewData.js +2 -0
- package/lib/cjs/i18n/CrmCulture.d.ts +244 -0
- package/lib/cjs/i18n/CrmCulture.js +23 -0
- package/lib/cjs/i18n/en.json +74 -0
- package/lib/cjs/i18n/zh-Hans.json +74 -0
- package/lib/cjs/i18n/zh-Hant.json +74 -0
- package/lib/cjs/index.d.ts +20 -0
- package/lib/cjs/index.js +40 -0
- package/lib/cjs/rq/person/PersonListRQ.d.ts +6 -0
- package/lib/cjs/rq/person/PersonListRQ.js +2 -0
- package/lib/cjs/rq/person/PersonQueryRQ.d.ts +6 -0
- package/lib/cjs/rq/person/PersonQueryRQ.js +2 -0
- package/lib/cjs/rq/personProfile/PersonProfileCreateRQ.d.ts +73 -0
- package/lib/cjs/rq/personProfile/PersonProfileCreateRQ.js +2 -0
- package/lib/cjs/rq/personProfile/PersonProfileListRQ.d.ts +48 -0
- package/lib/cjs/rq/personProfile/PersonProfileListRQ.js +2 -0
- package/lib/cjs/rq/personProfile/PersonProfileQueryRQ.d.ts +12 -0
- package/lib/cjs/rq/personProfile/PersonProfileQueryRQ.js +2 -0
- package/lib/mjs/CrmApp.d.ts +186 -0
- package/lib/mjs/CrmApp.js +165 -0
- package/lib/mjs/PersonApi.d.ts +38 -0
- package/lib/mjs/PersonApi.js +41 -0
- package/lib/mjs/PersonProfileApi.d.ts +54 -0
- package/lib/mjs/PersonProfileApi.js +59 -0
- package/lib/mjs/components/index.d.ts +1 -0
- package/lib/mjs/components/index.js +2 -0
- package/lib/mjs/components/person/PersonTiplist.d.ts +28 -0
- package/lib/mjs/components/person/PersonTiplist.js +24 -0
- package/lib/mjs/dto/person/AddressItem.d.ts +36 -0
- package/lib/mjs/dto/person/AddressItem.js +11 -0
- package/lib/mjs/dto/person/CategoryItem.d.ts +16 -0
- package/lib/mjs/dto/person/CategoryItem.js +1 -0
- package/lib/mjs/dto/person/ContactItem.d.ts +30 -0
- package/lib/mjs/dto/person/ContactItem.js +1 -0
- package/lib/mjs/dto/person/MaritalStatus.d.ts +36 -0
- package/lib/mjs/dto/person/MaritalStatus.js +37 -0
- package/lib/mjs/dto/person/PersonDegree.d.ts +26 -0
- package/lib/mjs/dto/person/PersonDegree.js +27 -0
- package/lib/mjs/dto/person/PersonEducation.d.ts +111 -0
- package/lib/mjs/dto/person/PersonEducation.js +112 -0
- package/lib/mjs/dto/person/PersonListDto.d.ts +6 -0
- package/lib/mjs/dto/person/PersonListDto.js +1 -0
- package/lib/mjs/dto/person/PersonQueryData.d.ts +24 -0
- package/lib/mjs/dto/person/PersonQueryData.js +1 -0
- package/lib/mjs/dto/person/PersonReadDto.d.ts +206 -0
- package/lib/mjs/dto/person/PersonReadDto.js +1 -0
- package/lib/mjs/dto/person/PersonTitle.d.ts +36 -0
- package/lib/mjs/dto/person/PersonTitle.js +37 -0
- package/lib/mjs/dto/personProfile/PersonProfileKind.d.ts +26 -0
- package/lib/mjs/dto/personProfile/PersonProfileKind.js +27 -0
- package/lib/mjs/dto/personProfile/PersonProfileListData.d.ts +16 -0
- package/lib/mjs/dto/personProfile/PersonProfileListData.js +1 -0
- package/lib/mjs/dto/personProfile/PersonProfileQueryData.d.ts +43 -0
- package/lib/mjs/dto/personProfile/PersonProfileQueryData.js +1 -0
- package/lib/mjs/dto/personProfile/PersonProfileUpdateReadData.d.ts +73 -0
- package/lib/mjs/dto/personProfile/PersonProfileUpdateReadData.js +1 -0
- package/lib/mjs/dto/personProfile/PersonProfileViewData.d.ts +5 -0
- package/lib/mjs/dto/personProfile/PersonProfileViewData.js +1 -0
- package/lib/mjs/i18n/CrmCulture.d.ts +460 -0
- package/lib/mjs/i18n/CrmCulture.js +20 -0
- package/lib/mjs/i18n/en.json +74 -0
- package/lib/mjs/i18n/zh-Hans.json +74 -0
- package/lib/mjs/i18n/zh-Hant.json +74 -0
- package/lib/mjs/index.d.ts +20 -0
- package/lib/mjs/index.js +24 -0
- package/lib/mjs/rq/person/PersonListRQ.d.ts +6 -0
- package/lib/mjs/rq/person/PersonListRQ.js +1 -0
- package/lib/mjs/rq/person/PersonQueryRQ.d.ts +6 -0
- package/lib/mjs/rq/person/PersonQueryRQ.js +1 -0
- package/lib/mjs/rq/personProfile/PersonProfileCreateRQ.d.ts +73 -0
- package/lib/mjs/rq/personProfile/PersonProfileCreateRQ.js +1 -0
- package/lib/mjs/rq/personProfile/PersonProfileListRQ.d.ts +48 -0
- package/lib/mjs/rq/personProfile/PersonProfileListRQ.js +1 -0
- package/lib/mjs/rq/personProfile/PersonProfileQueryRQ.d.ts +12 -0
- package/lib/mjs/rq/personProfile/PersonProfileQueryRQ.js +1 -0
- package/package.json +64 -0
- package/src/CrmApp.ts +270 -0
- package/src/PersonApi.ts +50 -0
- package/src/PersonProfileApi.ts +81 -0
- package/src/components/index.ts +2 -0
- package/src/components/person/PersonTiplist.tsx +75 -0
- package/src/dto/person/AddressItem.ts +39 -0
- package/src/dto/person/CategoryItem.ts +17 -0
- package/src/dto/person/ContactItem.ts +38 -0
- package/src/dto/person/MaritalStatus.ts +41 -0
- package/src/dto/person/PersonDegree.ts +29 -0
- package/src/dto/person/PersonEducation.ts +131 -0
- package/src/dto/person/PersonListDto.ts +7 -0
- package/src/dto/person/PersonQueryData.ts +28 -0
- package/src/dto/person/PersonReadDto.ts +242 -0
- package/src/dto/person/PersonTitle.ts +41 -0
- package/src/dto/personProfile/PersonProfileKind.ts +29 -0
- package/src/dto/personProfile/PersonProfileListData.ts +17 -0
- package/src/dto/personProfile/PersonProfileQueryData.ts +50 -0
- package/src/dto/personProfile/PersonProfileUpdateReadData.ts +86 -0
- package/src/dto/personProfile/PersonProfileViewData.ts +5 -0
- package/src/i18n/CrmCulture.ts +21 -0
- package/src/i18n/en.json +74 -0
- package/src/i18n/zh-Hans.json +74 -0
- package/src/i18n/zh-Hant.json +74 -0
- package/src/index.ts +30 -0
- package/src/rq/person/PersonListRQ.ts +7 -0
- package/src/rq/person/PersonQueryRQ.ts +7 -0
- package/src/rq/personProfile/PersonProfileCreateRQ.ts +86 -0
- package/src/rq/personProfile/PersonProfileListRQ.ts +56 -0
- package/src/rq/personProfile/PersonProfileQueryRQ.ts +13 -0
- package/tsconfig.cjs.json +20 -0
- package/tsconfig.json +20 -0
- package/vite.config.mts +12 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PersonApi = void 0;
|
|
4
|
+
const appscript_1 = require("@etsoo/appscript");
|
|
5
|
+
/**
|
|
6
|
+
* Person API
|
|
7
|
+
*/
|
|
8
|
+
class PersonApi extends appscript_1.EntityApi {
|
|
9
|
+
/**
|
|
10
|
+
* Constructor
|
|
11
|
+
* @param app Application
|
|
12
|
+
* @param api API
|
|
13
|
+
*/
|
|
14
|
+
constructor(app, api = app.api) {
|
|
15
|
+
super("Person", app, api);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* List
|
|
19
|
+
* @param rq Request data
|
|
20
|
+
* @param payload Payload
|
|
21
|
+
* @returns Result
|
|
22
|
+
*/
|
|
23
|
+
list(rq, payload) {
|
|
24
|
+
return this.listBase(rq, payload);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Query
|
|
28
|
+
* @param rq Request data
|
|
29
|
+
* @param payload Payload
|
|
30
|
+
* @returns Result
|
|
31
|
+
*/
|
|
32
|
+
query(rq, payload) {
|
|
33
|
+
return this.queryBase(rq, payload);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Read
|
|
37
|
+
* @param id Id
|
|
38
|
+
* @param payload Payload
|
|
39
|
+
* @returns Result
|
|
40
|
+
*/
|
|
41
|
+
read(id, payload) {
|
|
42
|
+
return this.readBase(id, payload);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.PersonApi = PersonApi;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { EntityApi, IApi, IApiPayload, IApp, IdResultPayload } from "@etsoo/appscript";
|
|
2
|
+
import { PersonProfileListData } from "./dto/personProfile/PersonProfileListData";
|
|
3
|
+
import { PersonProfileListRQ } from "./rq/personProfile/PersonProfileListRQ";
|
|
4
|
+
import { PersonProfileQueryRQ } from "./rq/personProfile/PersonProfileQueryRQ";
|
|
5
|
+
import { PersonProfileUpdateReadData } from "./dto/personProfile/PersonProfileUpdateReadData";
|
|
6
|
+
import { PersonProfileQueryData } from "./dto/personProfile/PersonProfileQueryData";
|
|
7
|
+
import { PersonProfileViewData } from "./dto/personProfile/PersonProfileViewData";
|
|
8
|
+
import { PersonProfileCreateRQ } from "./rq/personProfile/PersonProfileCreateRQ";
|
|
9
|
+
/**
|
|
10
|
+
* Person profile API
|
|
11
|
+
*/
|
|
12
|
+
export declare class PersonProfileApi extends EntityApi {
|
|
13
|
+
/**
|
|
14
|
+
* Constructor
|
|
15
|
+
* @param app Application
|
|
16
|
+
* @param api API
|
|
17
|
+
*/
|
|
18
|
+
constructor(app: IApp, api?: IApi);
|
|
19
|
+
/**
|
|
20
|
+
* Create
|
|
21
|
+
* @param rq Request data
|
|
22
|
+
* @param payload Payload
|
|
23
|
+
* @returns Result
|
|
24
|
+
*/
|
|
25
|
+
create(rq: PersonProfileCreateRQ, payload?: IdResultPayload): Promise<import("@etsoo/shared").IdActionResult | undefined>;
|
|
26
|
+
/**
|
|
27
|
+
* List
|
|
28
|
+
* @param rq Request data
|
|
29
|
+
* @param payload Payload
|
|
30
|
+
* @returns Result
|
|
31
|
+
*/
|
|
32
|
+
list(rq: PersonProfileListRQ, payload: IApiPayload<PersonProfileListData[]>): Promise<PersonProfileListData[] | undefined>;
|
|
33
|
+
/**
|
|
34
|
+
* Query
|
|
35
|
+
* @param rq Request data
|
|
36
|
+
* @param payload Payload
|
|
37
|
+
* @returns Result
|
|
38
|
+
*/
|
|
39
|
+
query(rq: PersonProfileQueryRQ, payload?: IApiPayload<PersonProfileQueryData[]>): Promise<PersonProfileQueryData[] | undefined>;
|
|
40
|
+
/**
|
|
41
|
+
* Read
|
|
42
|
+
* @param id Id
|
|
43
|
+
* @param payload Payload
|
|
44
|
+
* @returns Result
|
|
45
|
+
*/
|
|
46
|
+
read(id: number, payload?: IApiPayload<PersonProfileViewData>): Promise<PersonProfileViewData | undefined>;
|
|
47
|
+
/**
|
|
48
|
+
* Update read
|
|
49
|
+
* @param id Id
|
|
50
|
+
* @param payload Payload
|
|
51
|
+
* @returns Result
|
|
52
|
+
*/
|
|
53
|
+
updateRead(id: number, payload?: IApiPayload<PersonProfileUpdateReadData>): Promise<PersonProfileUpdateReadData | undefined>;
|
|
54
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PersonProfileApi = void 0;
|
|
4
|
+
const appscript_1 = require("@etsoo/appscript");
|
|
5
|
+
/**
|
|
6
|
+
* Person profile API
|
|
7
|
+
*/
|
|
8
|
+
class PersonProfileApi extends appscript_1.EntityApi {
|
|
9
|
+
/**
|
|
10
|
+
* Constructor
|
|
11
|
+
* @param app Application
|
|
12
|
+
* @param api API
|
|
13
|
+
*/
|
|
14
|
+
constructor(app, api = app.api) {
|
|
15
|
+
super("PersonProfile", app, api);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Create
|
|
19
|
+
* @param rq Request data
|
|
20
|
+
* @param payload Payload
|
|
21
|
+
* @returns Result
|
|
22
|
+
*/
|
|
23
|
+
create(rq, payload) {
|
|
24
|
+
return this.createBase(rq, payload);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* List
|
|
28
|
+
* @param rq Request data
|
|
29
|
+
* @param payload Payload
|
|
30
|
+
* @returns Result
|
|
31
|
+
*/
|
|
32
|
+
list(rq, payload) {
|
|
33
|
+
return this.listBase(rq, payload);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Query
|
|
37
|
+
* @param rq Request data
|
|
38
|
+
* @param payload Payload
|
|
39
|
+
* @returns Result
|
|
40
|
+
*/
|
|
41
|
+
query(rq, payload) {
|
|
42
|
+
return this.queryBase(rq, payload);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Read
|
|
46
|
+
* @param id Id
|
|
47
|
+
* @param payload Payload
|
|
48
|
+
* @returns Result
|
|
49
|
+
*/
|
|
50
|
+
read(id, payload) {
|
|
51
|
+
return this.readBase(id, payload);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Update read
|
|
55
|
+
* @param id Id
|
|
56
|
+
* @param payload Payload
|
|
57
|
+
* @returns Result
|
|
58
|
+
*/
|
|
59
|
+
updateRead(id, payload) {
|
|
60
|
+
return this.updateReadBase(id, payload);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.PersonProfileApi = PersonProfileApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./person/PersonTiplist";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// person
|
|
18
|
+
__exportStar(require("./person/PersonTiplist"), exports);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TiplistProps } from "@etsoo/materialui";
|
|
2
|
+
import { PersonListDto } from "../../dto/person/PersonListDto";
|
|
3
|
+
import { PersonListRQ } from "../../rq/person/PersonListRQ";
|
|
4
|
+
/**
|
|
5
|
+
* Person tiplist properties
|
|
6
|
+
* 人员提示列表属性
|
|
7
|
+
*/
|
|
8
|
+
export type PersonTiplistProps = Omit<TiplistProps<PersonListDto, "id">, "loadData" | "label" | "name"> & {
|
|
9
|
+
/**
|
|
10
|
+
* Label
|
|
11
|
+
*/
|
|
12
|
+
label?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Name
|
|
15
|
+
*/
|
|
16
|
+
name?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Default request data
|
|
19
|
+
*/
|
|
20
|
+
rq?: Partial<PersonListRQ>;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Person tiplist
|
|
24
|
+
* 人员提示列表
|
|
25
|
+
* @param props Properties
|
|
26
|
+
* @returns Component
|
|
27
|
+
*/
|
|
28
|
+
export declare function PersonTiplist(props: PersonTiplistProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PersonTiplist = PersonTiplist;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const materialui_1 = require("@etsoo/materialui");
|
|
6
|
+
const CrmApp_1 = require("../../CrmApp");
|
|
7
|
+
/**
|
|
8
|
+
* Person tiplist
|
|
9
|
+
* 人员提示列表
|
|
10
|
+
* @param props Properties
|
|
11
|
+
* @returns Component
|
|
12
|
+
*/
|
|
13
|
+
function PersonTiplist(props) {
|
|
14
|
+
// CRM app
|
|
15
|
+
const crm = (0, CrmApp_1.useRequiredCrmContext)();
|
|
16
|
+
// Destruct
|
|
17
|
+
const { fullWidth = true, label = crm.app.get("user"), maxItems = 10, getOptionLabel = (data) => data.name, name = "personId", rq = { enabled: true }, ...rest } = props;
|
|
18
|
+
// Layout
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(materialui_1.Tiplist, { label: label, getOptionLabel: getOptionLabel, name: name, fullWidth: fullWidth, maxItems: maxItems, loadData: (keyword, id, maxItems) => crm.personApi.list({
|
|
20
|
+
...rq,
|
|
21
|
+
keyword,
|
|
22
|
+
id,
|
|
23
|
+
queryPaging: {
|
|
24
|
+
batchSize: maxItems
|
|
25
|
+
}
|
|
26
|
+
}, { showLoading: false, defaultValue: [] }), ...rest }));
|
|
27
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Address kind
|
|
3
|
+
* 地址类型
|
|
4
|
+
*/
|
|
5
|
+
declare enum AddressKind {
|
|
6
|
+
Office = 1,
|
|
7
|
+
Home = 2,
|
|
8
|
+
Other = 9
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Address item
|
|
12
|
+
* 地址项
|
|
13
|
+
*/
|
|
14
|
+
export type AddressItem = {
|
|
15
|
+
/**
|
|
16
|
+
* Id
|
|
17
|
+
* 编号
|
|
18
|
+
*/
|
|
19
|
+
id: number;
|
|
20
|
+
/**
|
|
21
|
+
* Kind
|
|
22
|
+
* 类型
|
|
23
|
+
*/
|
|
24
|
+
kind: AddressKind;
|
|
25
|
+
/**
|
|
26
|
+
* Name
|
|
27
|
+
* 名称
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* Formatted address
|
|
32
|
+
* 格式化地址
|
|
33
|
+
*/
|
|
34
|
+
formattedAddress: string;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Address kind
|
|
5
|
+
* 地址类型
|
|
6
|
+
*/
|
|
7
|
+
var AddressKind;
|
|
8
|
+
(function (AddressKind) {
|
|
9
|
+
AddressKind[AddressKind["Office"] = 1] = "Office";
|
|
10
|
+
AddressKind[AddressKind["Home"] = 2] = "Home";
|
|
11
|
+
AddressKind[AddressKind["Other"] = 9] = "Other";
|
|
12
|
+
})(AddressKind || (AddressKind = {}));
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IdentityTypeFlags } from "@etsoo/appscript";
|
|
2
|
+
/**
|
|
3
|
+
* Identity type data
|
|
4
|
+
* 身份类型数据
|
|
5
|
+
*/
|
|
6
|
+
export type IdentityTypeData = {
|
|
7
|
+
/**
|
|
8
|
+
* Identity type
|
|
9
|
+
*/
|
|
10
|
+
identityType: IdentityTypeFlags;
|
|
11
|
+
/**
|
|
12
|
+
* Is organization
|
|
13
|
+
*/
|
|
14
|
+
isOrg: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Contact item
|
|
18
|
+
* 联系人项
|
|
19
|
+
*/
|
|
20
|
+
export type ContactItem = IdentityTypeData & {
|
|
21
|
+
/**
|
|
22
|
+
* Id
|
|
23
|
+
*/
|
|
24
|
+
id: number;
|
|
25
|
+
/**
|
|
26
|
+
* Name
|
|
27
|
+
*/
|
|
28
|
+
name: string;
|
|
29
|
+
preferredName?: string;
|
|
30
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Person marital status
|
|
3
|
+
* 个人婚姻状况
|
|
4
|
+
*/
|
|
5
|
+
export declare enum MaritalStatus {
|
|
6
|
+
/**
|
|
7
|
+
* Single
|
|
8
|
+
* 未婚
|
|
9
|
+
*/
|
|
10
|
+
Single = 1,
|
|
11
|
+
/**
|
|
12
|
+
* Married
|
|
13
|
+
* 已婚
|
|
14
|
+
*/
|
|
15
|
+
Married = 2,
|
|
16
|
+
/**
|
|
17
|
+
* Partnership
|
|
18
|
+
* 同居伴侣
|
|
19
|
+
*/
|
|
20
|
+
Partnership = 3,
|
|
21
|
+
/**
|
|
22
|
+
* Separated
|
|
23
|
+
* 分居
|
|
24
|
+
*/
|
|
25
|
+
Separated = 4,
|
|
26
|
+
/**
|
|
27
|
+
* Divorced
|
|
28
|
+
* 离异
|
|
29
|
+
*/
|
|
30
|
+
Divorced = 5,
|
|
31
|
+
/**
|
|
32
|
+
* Widowed
|
|
33
|
+
* 丧偶
|
|
34
|
+
*/
|
|
35
|
+
Widowed = 6
|
|
36
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MaritalStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Person marital status
|
|
6
|
+
* 个人婚姻状况
|
|
7
|
+
*/
|
|
8
|
+
var MaritalStatus;
|
|
9
|
+
(function (MaritalStatus) {
|
|
10
|
+
/**
|
|
11
|
+
* Single
|
|
12
|
+
* 未婚
|
|
13
|
+
*/
|
|
14
|
+
MaritalStatus[MaritalStatus["Single"] = 1] = "Single";
|
|
15
|
+
/**
|
|
16
|
+
* Married
|
|
17
|
+
* 已婚
|
|
18
|
+
*/
|
|
19
|
+
MaritalStatus[MaritalStatus["Married"] = 2] = "Married";
|
|
20
|
+
/**
|
|
21
|
+
* Partnership
|
|
22
|
+
* 同居伴侣
|
|
23
|
+
*/
|
|
24
|
+
MaritalStatus[MaritalStatus["Partnership"] = 3] = "Partnership";
|
|
25
|
+
/**
|
|
26
|
+
* Separated
|
|
27
|
+
* 分居
|
|
28
|
+
*/
|
|
29
|
+
MaritalStatus[MaritalStatus["Separated"] = 4] = "Separated";
|
|
30
|
+
/**
|
|
31
|
+
* Divorced
|
|
32
|
+
* 离异
|
|
33
|
+
*/
|
|
34
|
+
MaritalStatus[MaritalStatus["Divorced"] = 5] = "Divorced";
|
|
35
|
+
/**
|
|
36
|
+
* Widowed
|
|
37
|
+
* 丧偶
|
|
38
|
+
*/
|
|
39
|
+
MaritalStatus[MaritalStatus["Widowed"] = 6] = "Widowed";
|
|
40
|
+
})(MaritalStatus || (exports.MaritalStatus = MaritalStatus = {}));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Person degree
|
|
3
|
+
* 个人学位
|
|
4
|
+
*/
|
|
5
|
+
export declare enum PersonDegree {
|
|
6
|
+
/**
|
|
7
|
+
* Pre-bachelor
|
|
8
|
+
* 副学士
|
|
9
|
+
*/
|
|
10
|
+
PreBachelor = 1,
|
|
11
|
+
/**
|
|
12
|
+
* Bachelor
|
|
13
|
+
* 学士
|
|
14
|
+
*/
|
|
15
|
+
Bachelor = 2,
|
|
16
|
+
/**
|
|
17
|
+
* Master
|
|
18
|
+
* 硕士
|
|
19
|
+
*/
|
|
20
|
+
Master = 3,
|
|
21
|
+
/**
|
|
22
|
+
* Doctor
|
|
23
|
+
* 博士
|
|
24
|
+
*/
|
|
25
|
+
Doctor = 4
|
|
26
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PersonDegree = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Person degree
|
|
6
|
+
* 个人学位
|
|
7
|
+
*/
|
|
8
|
+
var PersonDegree;
|
|
9
|
+
(function (PersonDegree) {
|
|
10
|
+
/**
|
|
11
|
+
* Pre-bachelor
|
|
12
|
+
* 副学士
|
|
13
|
+
*/
|
|
14
|
+
PersonDegree[PersonDegree["PreBachelor"] = 1] = "PreBachelor";
|
|
15
|
+
/**
|
|
16
|
+
* Bachelor
|
|
17
|
+
* 学士
|
|
18
|
+
*/
|
|
19
|
+
PersonDegree[PersonDegree["Bachelor"] = 2] = "Bachelor";
|
|
20
|
+
/**
|
|
21
|
+
* Master
|
|
22
|
+
* 硕士
|
|
23
|
+
*/
|
|
24
|
+
PersonDegree[PersonDegree["Master"] = 3] = "Master";
|
|
25
|
+
/**
|
|
26
|
+
* Doctor
|
|
27
|
+
* 博士
|
|
28
|
+
*/
|
|
29
|
+
PersonDegree[PersonDegree["Doctor"] = 4] = "Doctor";
|
|
30
|
+
})(PersonDegree || (exports.PersonDegree = PersonDegree = {}));
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Person education
|
|
3
|
+
* 个人学历
|
|
4
|
+
*/
|
|
5
|
+
export declare enum PersonEducation {
|
|
6
|
+
/**
|
|
7
|
+
* Primary school
|
|
8
|
+
* 小学
|
|
9
|
+
*/
|
|
10
|
+
PrimarySchool = 1,
|
|
11
|
+
/**
|
|
12
|
+
* Year 2
|
|
13
|
+
* 小学2年级
|
|
14
|
+
*/
|
|
15
|
+
PrimarySchool2 = 2,
|
|
16
|
+
/**
|
|
17
|
+
* Year 3
|
|
18
|
+
* 小学3年级
|
|
19
|
+
*/
|
|
20
|
+
PrimarySchool3 = 3,
|
|
21
|
+
/**
|
|
22
|
+
* Year 4
|
|
23
|
+
* 小学4年级
|
|
24
|
+
*/
|
|
25
|
+
PrimarySchool4 = 4,
|
|
26
|
+
/**
|
|
27
|
+
* Year 5
|
|
28
|
+
* 小学5年级
|
|
29
|
+
*/
|
|
30
|
+
PrimarySchool5 = 5,
|
|
31
|
+
/**
|
|
32
|
+
* Year 6
|
|
33
|
+
* 小学6年级
|
|
34
|
+
*/
|
|
35
|
+
PrimarySchool6 = 6,
|
|
36
|
+
/**
|
|
37
|
+
* Middle school
|
|
38
|
+
* 初中
|
|
39
|
+
*/
|
|
40
|
+
MiddleSchool = 20,
|
|
41
|
+
/**
|
|
42
|
+
* Year 7
|
|
43
|
+
* 初中1年级
|
|
44
|
+
*/
|
|
45
|
+
MiddleSchool1 = 27,
|
|
46
|
+
/**
|
|
47
|
+
* Year 8
|
|
48
|
+
* 初中2年级
|
|
49
|
+
*/
|
|
50
|
+
MiddleSchool2 = 28,
|
|
51
|
+
/**
|
|
52
|
+
* Year 9
|
|
53
|
+
* 初中3年级
|
|
54
|
+
*/
|
|
55
|
+
MiddleSchool3 = 29,
|
|
56
|
+
/**
|
|
57
|
+
* High school
|
|
58
|
+
* 高中
|
|
59
|
+
*/
|
|
60
|
+
HighSchool = 40,
|
|
61
|
+
/**
|
|
62
|
+
* Year 10
|
|
63
|
+
* 高中1年级
|
|
64
|
+
*/
|
|
65
|
+
HighSchool1 = 51,
|
|
66
|
+
/**
|
|
67
|
+
* Year 11
|
|
68
|
+
* 高中2年级
|
|
69
|
+
*/
|
|
70
|
+
HighSchool2 = 52,
|
|
71
|
+
/**
|
|
72
|
+
* Year 12
|
|
73
|
+
* 高中3年级
|
|
74
|
+
*/
|
|
75
|
+
HighSchool3 = 53,
|
|
76
|
+
/**
|
|
77
|
+
* Diploma Graduate
|
|
78
|
+
* 大专毕业
|
|
79
|
+
*/
|
|
80
|
+
University2 = 82,
|
|
81
|
+
/**
|
|
82
|
+
* Graduated from Five Types of Higher Education (Self-study Exam, Open University, Night University, Party School, Correspondence Course)
|
|
83
|
+
* 五大学历毕业(自考、电大、夜大、党校、函授)
|
|
84
|
+
*/
|
|
85
|
+
University4 = 84,
|
|
86
|
+
/**
|
|
87
|
+
* University Student
|
|
88
|
+
* 大学在读
|
|
89
|
+
*/
|
|
90
|
+
University6 = 86,
|
|
91
|
+
/**
|
|
92
|
+
* Bachelor's Graduate (No Degree)
|
|
93
|
+
* 大学本科毕业(无学士学位)
|
|
94
|
+
*/
|
|
95
|
+
University8 = 88,
|
|
96
|
+
/**
|
|
97
|
+
* Bachelor's Graduate (With Degree)
|
|
98
|
+
* 大学本科毕业且获得学士学位
|
|
99
|
+
*/
|
|
100
|
+
University10 = 90,
|
|
101
|
+
/**
|
|
102
|
+
* Postgraduate (No Degree)
|
|
103
|
+
* 研究生毕业(无学位证书)
|
|
104
|
+
*/
|
|
105
|
+
University12 = 92,
|
|
106
|
+
/**
|
|
107
|
+
* Master’s Graduate
|
|
108
|
+
* 硕士学位毕业
|
|
109
|
+
*/
|
|
110
|
+
University14 = 94
|
|
111
|
+
}
|