@lemoncloud/clipbiz-backend-api 0.25.1019

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.
@@ -0,0 +1,49 @@
1
+ /**
2
+ * `views.ts`
3
+ * - type of views used in `backend-proxy`
4
+ *
5
+ * @author Steve <steve@lemoncloud.io>
6
+ * @date 2022-08-29 initial version.
7
+ *
8
+ * Copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
9
+ */
10
+ import { View, Body } from 'lemon-model';
11
+ import { MockModel, TestModel } from './model';
12
+ import $LUT from './types';
13
+ export * from './types';
14
+ export default $LUT;
15
+ /**!SECTION */
16
+ /**
17
+ * type: `MockView`
18
+ * - usually same as post's body.
19
+ */
20
+ export interface MockView extends View, Omit<Partial<MockModel>, 'required'> {
21
+ /**
22
+ * (optional) flag required.
23
+ */
24
+ required?: boolean;
25
+ }
26
+ /**
27
+ * Type `MockBody`
28
+ */
29
+ export interface MockBody extends Body, Partial<MockView> {
30
+ }
31
+ /**
32
+ * Type `TestBody`
33
+ */
34
+ export interface TestBody extends Body, Partial<TestView> {
35
+ }
36
+ /**
37
+ * type: `TestView`
38
+ * - usually same as post's body.
39
+ */
40
+ export interface TestView extends View, Omit<Partial<TestModel>, 'id' | 'required'> {
41
+ /**
42
+ * unique id of this type
43
+ */
44
+ id: string;
45
+ /**
46
+ * (optional) flag required.
47
+ */
48
+ required?: boolean;
49
+ }
@@ -0,0 +1,88 @@
1
+ /**
2
+ * `model.ts`
3
+ * - model definitions per account data
4
+ *
5
+ * @author Steve <steve@lemoncloud.io>
6
+ * @date 2022-08-29 initial version.
7
+ * @author Aiden <aiden@lemoncloud.io>
8
+ * @date 2025-02-10 implement a request service.
9
+ *
10
+ * Copyright (C) 2020 LemonCloud Co Ltd. - All Rights Reserved.
11
+ */
12
+ import { CoreModel } from 'lemon-model';
13
+ import $LUT, { RequestStatus, RequestStatusSet$ } from './types';
14
+ import { UserHead } from '../auth/model';
15
+ import { ExpertType } from '../request/types';
16
+ /**
17
+ * type: `ModelType`
18
+ */
19
+ export declare type ModelType = keyof typeof $LUT.ModelType;
20
+ /**
21
+ * type: `Model`: common model
22
+ */
23
+ export declare type Model = CoreModel<ModelType>;
24
+ /**
25
+ * type: boolean style number.
26
+ */
27
+ export declare type BoolFlag = 0 | 1;
28
+ /**
29
+ * head of `request-model`
30
+ */
31
+ export interface RequestHead {
32
+ /** id of register */
33
+ id?: string;
34
+ /** name of model */
35
+ name?: string;
36
+ /** type of expert */
37
+ expert?: ExpertType;
38
+ /** status of request */
39
+ status?: RequestStatus;
40
+ }
41
+ /**
42
+ * type: `RequestModel`
43
+ * - request model for user
44
+ */
45
+ export interface RequestModel extends RequestHead, Model {
46
+ /** type of expert */
47
+ expert?: ExpertType;
48
+ /** status of request */
49
+ status?: RequestStatus;
50
+ /** complex set of status */
51
+ status$?: RequestStatusSet$;
52
+ /** attached files */
53
+ files?: string[];
54
+ /** image of profile */
55
+ image?: string;
56
+ /** name of profile */
57
+ name?: string;
58
+ /** (optional) text of introduction */
59
+ memo?: string;
60
+ /** (optional) flag of notify */
61
+ useNotify?: BoolFlag;
62
+ /** (linked) id of target(user) */
63
+ userId?: string;
64
+ /** (linked) partial of target */
65
+ user$?: UserHead;
66
+ }
67
+ /**
68
+ * extract field names from models
69
+ * - only fields start with lowercase, or all upper.
70
+ */
71
+ export declare const filterFields: (fields: string[], base?: string[]) => string[];
72
+ /** field names from head */
73
+ export declare const $HEAD: {
74
+ request: string[];
75
+ };
76
+ export declare const $FIELD: {
77
+ reqeust: string[];
78
+ };
79
+ /** must export default as below */
80
+ declare const _default: {
81
+ $HEAD: {
82
+ request: string[];
83
+ };
84
+ $FIELD: {
85
+ reqeust: string[];
86
+ };
87
+ };
88
+ export default _default;
@@ -0,0 +1,96 @@
1
+ /**
2
+ * `types.ts`
3
+ * - 기본 types used in `backend-proxy`
4
+ *
5
+ * **[중요! exports 순서]**
6
+ * 1. define data type in `types.ts` w/ internal types.
7
+ * 2. define Model in `model.ts`
8
+ * 3. define View/Body in `view.ts`, and external types.
9
+ *
10
+ * @author Steve <steve@lemoncloud.io>
11
+ * @date 2022-08-29 initial version.
12
+ * @author Aiden <aiden@lemoncloud.io>
13
+ * @date 2025-02-10 implement a request service.
14
+ *
15
+ * Copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
16
+ */
17
+ /**
18
+ * Lookup Table
19
+ *
20
+ * WARN! DO NOT EXPORT AS `$LUT`. use default export instead.
21
+ */
22
+ declare const $LUT: {
23
+ /**
24
+ * Possible type of model.
25
+ */
26
+ ModelType: {
27
+ /** 전문가신청 */
28
+ request: string;
29
+ };
30
+ /** type: ExpertType */
31
+ ExpertType: {
32
+ '': string;
33
+ /** 원장 */
34
+ director: string;
35
+ /** 디자이너 */
36
+ designer: string;
37
+ /** 헤어원장 */
38
+ hairDirector: string;
39
+ /** 헤어디자이너 */
40
+ hairDesigner: string;
41
+ /** 메이크업원장 */
42
+ makeupDirector: string;
43
+ /** 메이크업디자이너 */
44
+ makeupDesigner: string;
45
+ /** 네일원장 */
46
+ nailDirector: string;
47
+ /** 네일디자이너 */
48
+ nailDesigner: string;
49
+ /** 성형외과 */
50
+ surgery: string;
51
+ /** 법률 */
52
+ law: string;
53
+ /** 세무 */
54
+ tax: string;
55
+ /** 고용 */
56
+ employment: string;
57
+ };
58
+ /** type */
59
+ RequestStatus: {
60
+ '': string;
61
+ /** 대기 */
62
+ pending: string;
63
+ /** 승인 */
64
+ accepted: string;
65
+ /** 반려 */
66
+ rejected: string;
67
+ /** 정지 */
68
+ banned: string;
69
+ };
70
+ };
71
+ /**
72
+ * type: `ExpertType`
73
+ */
74
+ export declare type ExpertType = keyof typeof $LUT.ExpertType;
75
+ /**
76
+ * type: `RequestStatus`
77
+ */
78
+ export declare type RequestStatus = keyof typeof $LUT.RequestStatus;
79
+ /**
80
+ * type: `RequestStatusSet$`
81
+ * - 전문가 가입 요청 정보를 담음
82
+ */
83
+ export interface RequestStatusSet$ {
84
+ /** 승인 요청 시각 */
85
+ requestedAt?: number;
86
+ /** 가입 승인 시각 */
87
+ acceptedAt?: number;
88
+ /** 가입 거절 시각 */
89
+ rejectedAt?: number;
90
+ /** 정지 시각 */
91
+ bannedAt?: number;
92
+ /** 탈퇴 시각 */
93
+ leavedAt?: number;
94
+ }
95
+ /** must export $LUT as default */
96
+ export default $LUT;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * `views.ts`
3
+ * - type of views used in `backend-proxy`
4
+ *
5
+ * @author Steve <steve@lemoncloud.io>
6
+ * @date 2022-08-29 initial version.
7
+ * @author Aiden <aiden@lemoncloud.io>
8
+ * @date 2025-02-10 implement a request service.
9
+ *
10
+ * Copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
11
+ */
12
+ import { View, Body } from 'lemon-model';
13
+ import { RequestModel } from './model';
14
+ import { UserView } from '../auth/views';
15
+ import $LUT from './types';
16
+ export * from './types';
17
+ export default $LUT;
18
+ /**
19
+ * type: `RequestView`
20
+ * - usually same as post's body.
21
+ */
22
+ export interface RequestView extends View, Omit<Partial<RequestModel>, 'useNotify' | 'user$'> {
23
+ /**
24
+ * (optional) flag use Nofity.
25
+ */
26
+ useNotify?: boolean;
27
+ /** (internal) user view */
28
+ readonly user$?: UserView;
29
+ }
30
+ /**
31
+ * Type `RequestBody`
32
+ */
33
+ export interface RequestBody extends Body, Partial<RequestView> {
34
+ }
@@ -0,0 +1,81 @@
1
+ /**
2
+ * `model.ts`
3
+ * - model definitions per account data
4
+ *
5
+ * @author Steve <steve@lemoncloud.io>
6
+ * @date 2022-08-29 initial version.
7
+ * @author Aiden <aiden@lemoncloud.io>
8
+ * @date 2025-10-20 refactoring for terms service.
9
+ *
10
+ * Copyright (C) 2020 LemonCloud Co Ltd. - All Rights Reserved.
11
+ */
12
+ import { CoreModel } from 'lemon-model';
13
+ import $LUT, { TermsDisplayLocationType } from './types';
14
+ /**
15
+ * type: `ModelType`
16
+ */
17
+ export declare type ModelType = keyof typeof $LUT.ModelType;
18
+ /**
19
+ * type: `Model`: common model
20
+ */
21
+ export declare type Model = CoreModel<ModelType>;
22
+ /**
23
+ * type: `TermsHead`
24
+ * - common head of `TermsModel`
25
+ */
26
+ export interface TermsHead {
27
+ /** id of model */
28
+ id?: string;
29
+ /** name of model */
30
+ name?: string;
31
+ }
32
+ /**
33
+ * type: boolean style number.
34
+ */
35
+ export declare type BoolFlag = 0 | 1;
36
+ /**
37
+ * type: `TermsModel`
38
+ * - 약관 정보 관리 지원
39
+ */
40
+ export interface TermsModel extends TermsHead, Model {
41
+ /** 약관명 */
42
+ name?: string;
43
+ /** 약관유형(필수여부) */
44
+ required?: BoolFlag;
45
+ /** 게시위치 */
46
+ displayLoc?: TermsDisplayLocationType;
47
+ /** 실행일 */
48
+ startedAt?: number;
49
+ /** (optional) 만료일 */
50
+ expiredAt?: number;
51
+ /** 본문내용 */
52
+ text?: string;
53
+ /**
54
+ * (optional) number of revisions
55
+ * - [parent] no-of-revision
56
+ * - [child] no-in-revision
57
+ */
58
+ revisionNo?: number;
59
+ }
60
+ /**
61
+ * extract field names from models
62
+ * - only fields start with lowercase, or all upper.
63
+ */
64
+ export declare const filterFields: (fields: string[], base?: string[]) => string[];
65
+ /** field names from head */
66
+ export declare const $HEAD: {
67
+ terms: string[];
68
+ };
69
+ export declare const $FIELD: {
70
+ terms: string[];
71
+ };
72
+ /** must export default as below */
73
+ declare const _default: {
74
+ $HEAD: {
75
+ terms: string[];
76
+ };
77
+ $FIELD: {
78
+ terms: string[];
79
+ };
80
+ };
81
+ export default _default;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * `types.ts`
3
+ * - 기본 types used in `backend-proxy`
4
+ *
5
+ * **[중요! exports 순서]**
6
+ * 1. define data type in `types.ts` w/ internal types.
7
+ * 2. define Model in `model.ts`
8
+ * 3. define View/Body in `view.ts`, and external types.
9
+ *
10
+ * @author Steve <steve@lemoncloud.io>
11
+ * @date 2022-10-20 initial version.
12
+ * @author Aiden <aiden@lemoncloud.io>
13
+ * @date 2025-10-20 refactoring for terms service.
14
+ *
15
+ * Copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
16
+ */
17
+ /**
18
+ * Lookup Table
19
+ *
20
+ * WARN! DO NOT EXPORT AS `$LUT`. use default export instead.
21
+ */
22
+ declare const $LUT: {
23
+ /**
24
+ * Possible type of model.
25
+ */
26
+ ModelType: {
27
+ /** terms */
28
+ terms: string;
29
+ };
30
+ /**
31
+ * TermsDisplayLocation
32
+ */
33
+ TermsDisplayLocation: {
34
+ '': string;
35
+ /** 회원가입 */
36
+ singup: string;
37
+ };
38
+ };
39
+ /**
40
+ * type: `TermsDisplayLocation`
41
+ */
42
+ export declare type TermsDisplayLocationType = keyof typeof $LUT.TermsDisplayLocation;
43
+ /** must export $LUT as default */
44
+ export default $LUT;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * `views.ts`
3
+ * - type of views used in `backend-proxy`
4
+ *
5
+ * @author Steve <steve@lemoncloud.io>
6
+ * @date 2022-08-29 initial version.
7
+ * @date 2024-12-24 optimized as modules.
8
+ * @author Aiden <aiden@lemoncloud.io>
9
+ * @date 2025-10-20 refactoring for terms service.
10
+ *
11
+ * Copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
12
+ */
13
+ import { View, Body } from 'lemon-model';
14
+ import { TermsModel } from './model';
15
+ import $LUT from './types';
16
+ export * from './types';
17
+ export default $LUT;
18
+ /**
19
+ * Type: `TermsView`
20
+ * - usually same as post's body.
21
+ */
22
+ export interface TermsView extends View, Omit<Partial<TermsModel>, 'required'> {
23
+ /** 필수약관여부 */
24
+ required?: boolean;
25
+ }
26
+ /**
27
+ * Type `TermsBody`
28
+ */
29
+ export interface TermsBody extends Body, Partial<TermsView> {
30
+ }
@@ -0,0 +1,189 @@
1
+ /**
2
+ * `backend-types.ts`
3
+ * - types used in `backend-proxy`
4
+ *
5
+ * @author Steve <steve@lemoncloud.io>
6
+ * @date 2022-08-29 initial version.
7
+ *
8
+ * Copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
9
+ */
10
+ import { SimpleSet } from 'lemon-model';
11
+ export { SimpleSet };
12
+ /**
13
+ * Lookup Table
14
+ *
15
+ * WARN! DO NOT EXPORT AS `$LUT`. use default export instead.
16
+ */
17
+ declare const $LUT: {
18
+ /**
19
+ * Possible type of model.
20
+ */
21
+ ModelType: {
22
+ terms: string;
23
+ request: string;
24
+ host: string;
25
+ site: string;
26
+ account: string; /** Korean */
27
+ user: string; /** English */
28
+ group: string; /** Chinese */
29
+ role: string; /**
30
+ * MyUserStereo.
31
+ */
32
+ auth: string;
33
+ invite: string; /**
34
+ * MyRoleStereo.
35
+ */
36
+ mock: string;
37
+ test: string;
38
+ };
39
+ /**
40
+ * Possible type of language.
41
+ */
42
+ Languages: {
43
+ /** no selection */
44
+ '': string;
45
+ /** Korean */
46
+ ko: string;
47
+ /** English */
48
+ en: string;
49
+ /** Chinese */
50
+ cn: string;
51
+ };
52
+ /**
53
+ * MyUserStereo.
54
+ */
55
+ MyUserStereo: {
56
+ '': string;
57
+ '#code': string;
58
+ admin: string;
59
+ user: string;
60
+ dummy: string;
61
+ '#alias': string;
62
+ session: string;
63
+ };
64
+ /**
65
+ * MyRoleStereo.
66
+ */
67
+ MyRoleStereo: {
68
+ owner: string; /**
69
+ * type: `MyRoleStereo`
70
+ */
71
+ member: string;
72
+ '': string;
73
+ '#alias': string;
74
+ };
75
+ /**
76
+ * MyUserRole.
77
+ */
78
+ MyUserRole: {
79
+ /** Guest(게스트) user */
80
+ guest: string;
81
+ /** Expert(전문가) */
82
+ expert: string;
83
+ '': string;
84
+ self: string;
85
+ user: string;
86
+ owner: string;
87
+ member: string;
88
+ session: string;
89
+ admin: string;
90
+ };
91
+ /**
92
+ * MyUserStatus.
93
+ */
94
+ MyUserStatus: {
95
+ /** no selection */
96
+ '': string;
97
+ /** 정상 */
98
+ active: string;
99
+ /** 정지; */
100
+ banned: string;
101
+ /** 탈퇴 */
102
+ leaved: string;
103
+ };
104
+ /**
105
+ * step of `/verify-phone`
106
+ */
107
+ VerifyPhoneStep: {
108
+ /** 인증코드 전송 */
109
+ send: string;
110
+ /** 인증코드 재전송 (동일코드 재전송) */
111
+ resend: string;
112
+ /** 코드 검증하기 */
113
+ check: string;
114
+ /** 비번 변경하기 */
115
+ change: string;
116
+ /** 가입 확정하기 (소셜) */
117
+ confirm: string;
118
+ };
119
+ /**
120
+ * mode of `/verify-phone`
121
+ */
122
+ VerifyPhoneMode: {
123
+ /** 회원가입 */
124
+ join: string;
125
+ /** 비번변경 */
126
+ password: string;
127
+ /** 회원가입(소셜) */
128
+ social: string;
129
+ };
130
+ RequestStatus: {
131
+ '': string;
132
+ pending: string;
133
+ accepted: string; /** no selection */
134
+ rejected: string; /** 정상 */
135
+ banned: string; /** 정지; */
136
+ };
137
+ MyUserAliasType: {
138
+ business: string;
139
+ code: string; /** 탈퇴 */
140
+ '': string;
141
+ '#alias': string;
142
+ iid: string;
143
+ login: string;
144
+ phone: string;
145
+ email: string;
146
+ social: string;
147
+ session: string; /**
148
+ * MyUserStatus.
149
+ */
150
+ };
151
+ };
152
+ /**
153
+ * type: `ModelType`
154
+ */
155
+ export declare type ModelType = keyof typeof $LUT.ModelType;
156
+ /**
157
+ * type: `LanguageType`
158
+ */
159
+ export declare type LanguageType = keyof typeof $LUT.Languages;
160
+ /**
161
+ * type: `MyUserStereo`
162
+ */
163
+ export declare type MyUserStereo = keyof typeof $LUT.MyUserStereo;
164
+ /**
165
+ * type: `MyRoleStereo`
166
+ */
167
+ export declare type MyRoleStereo = keyof typeof $LUT.MyRoleStereo;
168
+ /**
169
+ * type: `MyUserRole`
170
+ */
171
+ export declare type MyUserRole = keyof typeof $LUT.MyUserRole;
172
+ /**
173
+ * type: `MyUserStatus`
174
+ */
175
+ export declare type MyUserStatus = keyof typeof $LUT.MyUserStatus;
176
+ /**
177
+ * types of `VerifyPhoneStep`
178
+ */
179
+ export declare type VerifyPhoneStep = keyof typeof $LUT.VerifyPhoneStep;
180
+ /**
181
+ * types of `VerifyPhoneMode`
182
+ */
183
+ export declare type VerifyPhoneMode = keyof typeof $LUT.VerifyPhoneMode;
184
+ /**
185
+ * type: `MyUserAliasType`
186
+ */
187
+ export declare type MyUserAliasType = keyof typeof $LUT.MyUserAliasType;
188
+ /** must export $LUT as default */
189
+ export default $LUT;