entity-client 1.0.7 → 1.0.9
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 +362 -0
- package/dist/EntityAppServerApi.d.ts +1016 -0
- package/dist/EntityAppServerApi.js +2 -0
- package/dist/EntityAppServerApi.js.map +7 -0
- package/dist/{EntityServerClient.d.ts → EntityServerApi.d.ts} +160 -101
- package/dist/EntityServerApi.js +2 -0
- package/dist/EntityServerApi.js.map +7 -0
- package/dist/client/base.d.ts +29 -16
- package/dist/client/base.js +1 -1
- package/dist/client/base.js.map +3 -3
- package/dist/client/request.d.ts +2 -2
- package/dist/client/request.js +1 -1
- package/dist/client/request.js.map +3 -3
- package/dist/hooks/useEntityAppServer.d.ts +18 -0
- package/dist/hooks/useEntityAppServer.js +2 -0
- package/dist/hooks/useEntityAppServer.js.map +7 -0
- package/dist/hooks/useEntityClient.d.ts +74 -0
- package/dist/hooks/useEntityClient.js +2 -0
- package/dist/hooks/useEntityClient.js.map +7 -0
- package/dist/hooks/useEntityServer.d.ts +5 -88
- package/dist/hooks/useEntityServer.js +1 -1
- package/dist/hooks/useEntityServer.js.map +3 -3
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/mixins/app/index.d.ts +6 -6
- package/dist/mixins/app/index.js +1 -1
- package/dist/mixins/app/index.js.map +2 -2
- package/dist/mixins/app/plugins/alimtalk.d.ts +64 -0
- package/dist/mixins/app/plugins/alimtalk.js +2 -0
- package/dist/mixins/app/plugins/alimtalk.js.map +7 -0
- package/dist/mixins/app/plugins/friendtalk.d.ts +58 -0
- package/dist/mixins/app/plugins/friendtalk.js +2 -0
- package/dist/mixins/app/plugins/friendtalk.js.map +7 -0
- package/dist/mixins/app/plugins/holidays.d.ts +66 -0
- package/dist/mixins/app/plugins/holidays.js +2 -0
- package/dist/mixins/app/plugins/holidays.js.map +7 -0
- package/dist/mixins/app/plugins/identity.d.ts +64 -0
- package/dist/mixins/app/plugins/identity.js +2 -0
- package/dist/mixins/app/plugins/identity.js.map +7 -0
- package/dist/mixins/app/plugins/index.d.ts +10 -0
- package/dist/mixins/app/plugins/index.js +2 -0
- package/dist/mixins/app/plugins/index.js.map +7 -0
- package/dist/mixins/app/plugins/llm.d.ts +126 -0
- package/dist/mixins/app/plugins/llm.js +2 -0
- package/dist/mixins/app/plugins/llm.js.map +7 -0
- package/dist/mixins/app/plugins/ocr.d.ts +72 -0
- package/dist/mixins/app/plugins/ocr.js +2 -0
- package/dist/mixins/app/plugins/ocr.js.map +7 -0
- package/dist/mixins/app/plugins/pg.d.ts +70 -0
- package/dist/mixins/app/plugins/pg.js +2 -0
- package/dist/mixins/app/plugins/pg.js.map +7 -0
- package/dist/mixins/app/plugins/push.d.ts +66 -0
- package/dist/mixins/app/plugins/push.js +2 -0
- package/dist/mixins/app/plugins/push.js.map +7 -0
- package/dist/mixins/app/plugins/sms.d.ts +64 -0
- package/dist/mixins/app/plugins/sms.js +2 -0
- package/dist/mixins/app/plugins/sms.js.map +7 -0
- package/dist/mixins/app/plugins/taxinvoice.d.ts +68 -0
- package/dist/mixins/app/plugins/taxinvoice.js +2 -0
- package/dist/mixins/app/plugins/taxinvoice.js.map +7 -0
- package/dist/mixins/app/{account.d.ts → routes/account.d.ts} +17 -15
- package/dist/mixins/app/routes/account.js +2 -0
- package/dist/mixins/app/routes/account.js.map +7 -0
- package/dist/mixins/app/{board.d.ts → routes/board.d.ts} +17 -15
- package/dist/mixins/app/routes/board.js +2 -0
- package/dist/mixins/app/routes/board.js.map +7 -0
- package/dist/mixins/app/{email-verify.d.ts → routes/email-verify.d.ts} +17 -15
- package/dist/mixins/app/routes/email-verify.js +2 -0
- package/dist/mixins/app/routes/email-verify.js.map +7 -0
- package/dist/mixins/app/{oauth.d.ts → routes/oauth.d.ts} +17 -15
- package/dist/mixins/app/routes/oauth.js +2 -0
- package/dist/mixins/app/routes/oauth.js.map +7 -0
- package/dist/mixins/app/{password-reset.d.ts → routes/password-reset.d.ts} +17 -15
- package/dist/mixins/app/routes/password-reset.js +2 -0
- package/dist/mixins/app/routes/password-reset.js.map +7 -0
- package/dist/mixins/app/{two-factor.d.ts → routes/two-factor.d.ts} +17 -15
- package/dist/mixins/app/routes/two-factor.js +2 -0
- package/dist/mixins/app/routes/two-factor.js.map +7 -0
- package/dist/mixins/server/admin.d.ts +14 -12
- package/dist/mixins/server/admin.js +1 -1
- package/dist/mixins/server/admin.js.map +2 -2
- package/dist/mixins/{auth.d.ts → server/auth.d.ts} +18 -33
- package/dist/mixins/server/auth.js +2 -0
- package/dist/mixins/server/auth.js.map +7 -0
- package/dist/mixins/{entity.d.ts → server/entity.d.ts} +18 -16
- package/dist/mixins/server/entity.js +2 -0
- package/dist/mixins/server/entity.js.map +7 -0
- package/dist/mixins/{file.d.ts → server/file.d.ts} +18 -16
- package/dist/mixins/server/file.js.map +7 -0
- package/dist/mixins/server/index.d.ts +7 -6
- package/dist/mixins/server/index.js +1 -1
- package/dist/mixins/server/index.js.map +3 -3
- package/dist/mixins/{push.d.ts → server/push.d.ts} +18 -16
- package/dist/mixins/server/push.js.map +7 -0
- package/dist/mixins/{smtp.d.ts → server/smtp.d.ts} +20 -16
- package/dist/mixins/server/smtp.js +2 -0
- package/dist/mixins/server/smtp.js.map +7 -0
- package/dist/mixins/server/transaction.d.ts +62 -0
- package/dist/mixins/server/transaction.js +2 -0
- package/dist/mixins/server/transaction.js.map +7 -0
- package/dist/mixins/{utils.d.ts → server/utils.d.ts} +18 -16
- package/dist/mixins/server/utils.js +2 -0
- package/dist/mixins/server/utils.js.map +7 -0
- package/dist/react.d.ts +2 -0
- package/dist/react.js +1 -1
- package/dist/react.js.map +4 -4
- package/dist/types.d.ts +17 -10
- package/package.json +2 -2
- package/dist/EntityAppServerClient.d.ts +0 -383
- package/dist/EntityAppServerClient.js +0 -2
- package/dist/EntityAppServerClient.js.map +0 -7
- package/dist/EntityServerClient.js +0 -2
- package/dist/EntityServerClient.js.map +0 -7
- package/dist/mixins/app/account.js +0 -2
- package/dist/mixins/app/account.js.map +0 -7
- package/dist/mixins/app/board.js +0 -2
- package/dist/mixins/app/board.js.map +0 -7
- package/dist/mixins/app/email-verify.js +0 -2
- package/dist/mixins/app/email-verify.js.map +0 -7
- package/dist/mixins/app/oauth.js +0 -2
- package/dist/mixins/app/oauth.js.map +0 -7
- package/dist/mixins/app/password-reset.js +0 -2
- package/dist/mixins/app/password-reset.js.map +0 -7
- package/dist/mixins/app/two-factor.js +0 -2
- package/dist/mixins/app/two-factor.js.map +0 -7
- package/dist/mixins/auth.js +0 -2
- package/dist/mixins/auth.js.map +0 -7
- package/dist/mixins/entity.js +0 -2
- package/dist/mixins/entity.js.map +0 -7
- package/dist/mixins/file.js.map +0 -7
- package/dist/mixins/push.js.map +0 -7
- package/dist/mixins/smtp.js +0 -2
- package/dist/mixins/smtp.js.map +0 -7
- package/dist/mixins/utils.js +0 -2
- package/dist/mixins/utils.js.map +0 -7
- /package/dist/mixins/{file.js → server/file.js} +0 -0
- /package/dist/mixins/{push.js → server/push.js} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{EntityServerApi as i}from"./EntityServerApi.js";import{AccountAppMixin as n,BoardMixin as x,EmailVerifyMixin as r,OAuthMixin as t,PasswordResetMixin as M,TwoFactorMixin as o}from"./mixins/app/index.js";import{AlimtalkMixin as e,AppPushMixin as p,FriendtalkMixin as m,HolidaysMixin as a,IdentityMixin as s,LlmMixin as A,OcrMixin as l,PgMixin as c,SmsMixin as d,TaxinvoiceMixin as y}from"./mixins/app/plugins/index.js";class P extends e(m(d(p(c(y(l(A(s(a(t(o(M(r(x(n(i)))))))))))))))){}export{P as EntityAppServerApi};
|
|
2
|
+
//# sourceMappingURL=EntityAppServerApi.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/EntityAppServerApi.ts"],
|
|
4
|
+
"sourcesContent": ["import { EntityServerApi } from \"./EntityServerApi.js\";\nimport {\n AccountAppMixin,\n BoardMixin,\n EmailVerifyMixin,\n OAuthMixin,\n PasswordResetMixin,\n TwoFactorMixin,\n} from \"./mixins/app/index.js\";\nimport {\n AlimtalkMixin,\n AppPushMixin,\n FriendtalkMixin,\n HolidaysMixin,\n IdentityMixin,\n LlmMixin,\n OcrMixin,\n PgMixin,\n SmsMixin,\n TaxinvoiceMixin,\n} from \"./mixins/app/plugins/index.js\";\n\nexport class EntityAppServerApi extends AlimtalkMixin(\n FriendtalkMixin(\n SmsMixin(\n AppPushMixin(\n PgMixin(\n TaxinvoiceMixin(\n OcrMixin(\n LlmMixin(\n IdentityMixin(\n HolidaysMixin(\n OAuthMixin(\n TwoFactorMixin(\n PasswordResetMixin(\n EmailVerifyMixin(\n BoardMixin(\n AccountAppMixin(\n EntityServerApi,\n ),\n ),\n ),\n ),\n ),\n ),\n ),\n ),\n ),\n ),\n ),\n ),\n ),\n ),\n ),\n) {}\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,mBAAAA,MAAuB,uBAChC,OACI,mBAAAC,EACA,cAAAC,EACA,oBAAAC,EACA,cAAAC,EACA,sBAAAC,EACA,kBAAAC,MACG,wBACP,OACI,iBAAAC,EACA,gBAAAC,EACA,mBAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,YAAAC,EACA,YAAAC,EACA,WAAAC,EACA,YAAAC,EACA,mBAAAC,MACG,gCAEA,MAAMC,UAA2BV,EACpCE,EACIM,EACIP,EACIM,EACIE,EACIH,EACID,EACID,EACID,EACIN,EACIE,EACID,EACIF,EACID,EACID,EACID,CACJ,CACJ,CACJ,CACJ,CACJ,CACJ,CACJ,CACJ,CACJ,CACJ,CACJ,CACJ,CACJ,CACJ,CACJ,CACJ,CAAE,CAAC",
|
|
6
|
+
"names": ["EntityServerApi", "AccountAppMixin", "BoardMixin", "EmailVerifyMixin", "OAuthMixin", "PasswordResetMixin", "TwoFactorMixin", "AlimtalkMixin", "AppPushMixin", "FriendtalkMixin", "HolidaysMixin", "IdentityMixin", "LlmMixin", "OcrMixin", "PgMixin", "SmsMixin", "TaxinvoiceMixin", "EntityAppServerApi"]
|
|
7
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file
|
|
2
|
+
* @file EntityServerApi.ts
|
|
3
3
|
* entity-server core route용 Mixin 조합 클라이언트.
|
|
4
4
|
*
|
|
5
5
|
* 절(section)별 구현:
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* src/mixins/app/* — entity-app-server plugin mixin
|
|
9
9
|
*/
|
|
10
10
|
import { EntityServerClientBase } from "./client/base.js";
|
|
11
|
-
declare const
|
|
11
|
+
declare const EntityServerApi_base: {
|
|
12
12
|
new (...args: any[]): {
|
|
13
13
|
addressSido<T = unknown>(): Promise<T>;
|
|
14
14
|
addressSigungu<T = unknown>(query: {
|
|
@@ -43,10 +43,9 @@ declare const EntityServerClient_base: {
|
|
|
43
43
|
hmacSecret: string;
|
|
44
44
|
encryptRequests: boolean;
|
|
45
45
|
csrfEnabled: boolean;
|
|
46
|
-
csrfToken: string;
|
|
47
46
|
csrfHeaderName: string;
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
csrfCookieName: string;
|
|
48
|
+
_csrfRefresher: (() => Promise<void>) | null;
|
|
50
49
|
activeTxId: string | null;
|
|
51
50
|
keepSession: boolean;
|
|
52
51
|
refreshBuffer: number;
|
|
@@ -54,30 +53,90 @@ declare const EntityServerClient_base: {
|
|
|
54
53
|
onSessionExpired?: (error: Error) => void;
|
|
55
54
|
_sessionRefreshToken: string | null;
|
|
56
55
|
_refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
_healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
57
|
+
_healthTickPromise: Promise<unknown> | null;
|
|
59
58
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
60
59
|
setToken(token: string): void;
|
|
61
60
|
setAnonymousPacketToken(token: string): void;
|
|
62
61
|
setApiKey(apiKey: string): void;
|
|
63
62
|
setHmacSecret(secret: string): void;
|
|
64
63
|
setEncryptRequests(value: boolean): void;
|
|
65
|
-
setCsrfToken(token: string): void;
|
|
66
64
|
setCsrfEnabled(enabled: boolean): void;
|
|
65
|
+
startHealthTick(intervalMs?: number): void;
|
|
66
|
+
stopHealthTick(): void;
|
|
67
67
|
_scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
68
68
|
access_token: string;
|
|
69
69
|
expires_in: number;
|
|
70
70
|
}>): void;
|
|
71
71
|
_clearRefreshTimer(): void;
|
|
72
72
|
stopKeepSession(): void;
|
|
73
|
-
|
|
74
|
-
stopCsrfRefresh(): void;
|
|
75
|
-
_scheduleCsrfRefresh(expiresIn: number): void;
|
|
76
|
-
refreshCsrfToken(): Promise<string>;
|
|
77
|
-
_applyCsrfHealth(csrf?: import("./types.js").EntityServerClientHealthCsrf | null): void;
|
|
73
|
+
_applyCsrfHealth(): void;
|
|
78
74
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
79
75
|
get _reqOpts(): import("./client/request.js").RequestOptions;
|
|
80
|
-
|
|
76
|
+
get http(): {
|
|
77
|
+
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
78
|
+
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
79
|
+
put<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
80
|
+
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
81
|
+
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
82
|
+
};
|
|
83
|
+
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
84
|
+
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
85
|
+
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
86
|
+
_request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
87
|
+
_requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
88
|
+
_requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
89
|
+
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
90
|
+
};
|
|
91
|
+
} & {
|
|
92
|
+
new (...args: any[]): {
|
|
93
|
+
transactionStart<T = unknown>(body?: Record<string, unknown>): Promise<T>;
|
|
94
|
+
transactionCommit<T = unknown>(transactionId: string): Promise<T>;
|
|
95
|
+
transactionRollback<T = unknown>(transactionId: string): Promise<T>;
|
|
96
|
+
baseUrl: string;
|
|
97
|
+
token: string;
|
|
98
|
+
anonymousPacketToken: string;
|
|
99
|
+
apiKey: string;
|
|
100
|
+
hmacSecret: string;
|
|
101
|
+
encryptRequests: boolean;
|
|
102
|
+
csrfEnabled: boolean;
|
|
103
|
+
csrfHeaderName: string;
|
|
104
|
+
csrfCookieName: string;
|
|
105
|
+
_csrfRefresher: (() => Promise<void>) | null;
|
|
106
|
+
activeTxId: string | null;
|
|
107
|
+
keepSession: boolean;
|
|
108
|
+
refreshBuffer: number;
|
|
109
|
+
onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
|
|
110
|
+
onSessionExpired?: (error: Error) => void;
|
|
111
|
+
_sessionRefreshToken: string | null;
|
|
112
|
+
_refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
113
|
+
_healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
114
|
+
_healthTickPromise: Promise<unknown> | null;
|
|
115
|
+
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
116
|
+
setToken(token: string): void;
|
|
117
|
+
setAnonymousPacketToken(token: string): void;
|
|
118
|
+
setApiKey(apiKey: string): void;
|
|
119
|
+
setHmacSecret(secret: string): void;
|
|
120
|
+
setEncryptRequests(value: boolean): void;
|
|
121
|
+
setCsrfEnabled(enabled: boolean): void;
|
|
122
|
+
startHealthTick(intervalMs?: number): void;
|
|
123
|
+
stopHealthTick(): void;
|
|
124
|
+
_scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
125
|
+
access_token: string;
|
|
126
|
+
expires_in: number;
|
|
127
|
+
}>): void;
|
|
128
|
+
_clearRefreshTimer(): void;
|
|
129
|
+
stopKeepSession(): void;
|
|
130
|
+
_applyCsrfHealth(): void;
|
|
131
|
+
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
132
|
+
get _reqOpts(): import("./client/request.js").RequestOptions;
|
|
133
|
+
get http(): {
|
|
134
|
+
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
135
|
+
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
136
|
+
put<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
137
|
+
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
138
|
+
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
139
|
+
};
|
|
81
140
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
82
141
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
83
142
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
@@ -127,10 +186,9 @@ declare const EntityServerClient_base: {
|
|
|
127
186
|
hmacSecret: string;
|
|
128
187
|
encryptRequests: boolean;
|
|
129
188
|
csrfEnabled: boolean;
|
|
130
|
-
csrfToken: string;
|
|
131
189
|
csrfHeaderName: string;
|
|
132
|
-
|
|
133
|
-
|
|
190
|
+
csrfCookieName: string;
|
|
191
|
+
_csrfRefresher: (() => Promise<void>) | null;
|
|
134
192
|
activeTxId: string | null;
|
|
135
193
|
keepSession: boolean;
|
|
136
194
|
refreshBuffer: number;
|
|
@@ -138,30 +196,33 @@ declare const EntityServerClient_base: {
|
|
|
138
196
|
onSessionExpired?: (error: Error) => void;
|
|
139
197
|
_sessionRefreshToken: string | null;
|
|
140
198
|
_refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
141
|
-
|
|
142
|
-
|
|
199
|
+
_healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
200
|
+
_healthTickPromise: Promise<unknown> | null;
|
|
143
201
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
144
202
|
setToken(token: string): void;
|
|
145
203
|
setAnonymousPacketToken(token: string): void;
|
|
146
204
|
setApiKey(apiKey: string): void;
|
|
147
205
|
setHmacSecret(secret: string): void;
|
|
148
206
|
setEncryptRequests(value: boolean): void;
|
|
149
|
-
setCsrfToken(token: string): void;
|
|
150
207
|
setCsrfEnabled(enabled: boolean): void;
|
|
208
|
+
startHealthTick(intervalMs?: number): void;
|
|
209
|
+
stopHealthTick(): void;
|
|
151
210
|
_scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
152
211
|
access_token: string;
|
|
153
212
|
expires_in: number;
|
|
154
213
|
}>): void;
|
|
155
214
|
_clearRefreshTimer(): void;
|
|
156
215
|
stopKeepSession(): void;
|
|
157
|
-
|
|
158
|
-
stopCsrfRefresh(): void;
|
|
159
|
-
_scheduleCsrfRefresh(expiresIn: number): void;
|
|
160
|
-
refreshCsrfToken(): Promise<string>;
|
|
161
|
-
_applyCsrfHealth(csrf?: import("./types.js").EntityServerClientHealthCsrf | null): void;
|
|
216
|
+
_applyCsrfHealth(): void;
|
|
162
217
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
163
218
|
get _reqOpts(): import("./client/request.js").RequestOptions;
|
|
164
|
-
|
|
219
|
+
get http(): {
|
|
220
|
+
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
221
|
+
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
222
|
+
put<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
223
|
+
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
224
|
+
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
225
|
+
};
|
|
165
226
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
166
227
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
167
228
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
@@ -180,6 +241,7 @@ declare const EntityServerClient_base: {
|
|
|
180
241
|
ok: boolean;
|
|
181
242
|
status: string;
|
|
182
243
|
}>;
|
|
244
|
+
smtpTemplatePreview(templatePath: string): Promise<string>;
|
|
183
245
|
baseUrl: string;
|
|
184
246
|
token: string;
|
|
185
247
|
anonymousPacketToken: string;
|
|
@@ -187,10 +249,9 @@ declare const EntityServerClient_base: {
|
|
|
187
249
|
hmacSecret: string;
|
|
188
250
|
encryptRequests: boolean;
|
|
189
251
|
csrfEnabled: boolean;
|
|
190
|
-
csrfToken: string;
|
|
191
252
|
csrfHeaderName: string;
|
|
192
|
-
|
|
193
|
-
|
|
253
|
+
csrfCookieName: string;
|
|
254
|
+
_csrfRefresher: (() => Promise<void>) | null;
|
|
194
255
|
activeTxId: string | null;
|
|
195
256
|
keepSession: boolean;
|
|
196
257
|
refreshBuffer: number;
|
|
@@ -198,30 +259,33 @@ declare const EntityServerClient_base: {
|
|
|
198
259
|
onSessionExpired?: (error: Error) => void;
|
|
199
260
|
_sessionRefreshToken: string | null;
|
|
200
261
|
_refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
201
|
-
|
|
202
|
-
|
|
262
|
+
_healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
263
|
+
_healthTickPromise: Promise<unknown> | null;
|
|
203
264
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
204
265
|
setToken(token: string): void;
|
|
205
266
|
setAnonymousPacketToken(token: string): void;
|
|
206
267
|
setApiKey(apiKey: string): void;
|
|
207
268
|
setHmacSecret(secret: string): void;
|
|
208
269
|
setEncryptRequests(value: boolean): void;
|
|
209
|
-
setCsrfToken(token: string): void;
|
|
210
270
|
setCsrfEnabled(enabled: boolean): void;
|
|
271
|
+
startHealthTick(intervalMs?: number): void;
|
|
272
|
+
stopHealthTick(): void;
|
|
211
273
|
_scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
212
274
|
access_token: string;
|
|
213
275
|
expires_in: number;
|
|
214
276
|
}>): void;
|
|
215
277
|
_clearRefreshTimer(): void;
|
|
216
278
|
stopKeepSession(): void;
|
|
217
|
-
|
|
218
|
-
stopCsrfRefresh(): void;
|
|
219
|
-
_scheduleCsrfRefresh(expiresIn: number): void;
|
|
220
|
-
refreshCsrfToken(): Promise<string>;
|
|
221
|
-
_applyCsrfHealth(csrf?: import("./types.js").EntityServerClientHealthCsrf | null): void;
|
|
279
|
+
_applyCsrfHealth(): void;
|
|
222
280
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
223
281
|
get _reqOpts(): import("./client/request.js").RequestOptions;
|
|
224
|
-
|
|
282
|
+
get http(): {
|
|
283
|
+
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
284
|
+
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
285
|
+
put<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
286
|
+
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
287
|
+
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
288
|
+
};
|
|
225
289
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
226
290
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
227
291
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
@@ -266,10 +330,9 @@ declare const EntityServerClient_base: {
|
|
|
266
330
|
hmacSecret: string;
|
|
267
331
|
encryptRequests: boolean;
|
|
268
332
|
csrfEnabled: boolean;
|
|
269
|
-
csrfToken: string;
|
|
270
333
|
csrfHeaderName: string;
|
|
271
|
-
|
|
272
|
-
|
|
334
|
+
csrfCookieName: string;
|
|
335
|
+
_csrfRefresher: (() => Promise<void>) | null;
|
|
273
336
|
activeTxId: string | null;
|
|
274
337
|
keepSession: boolean;
|
|
275
338
|
refreshBuffer: number;
|
|
@@ -277,30 +340,33 @@ declare const EntityServerClient_base: {
|
|
|
277
340
|
onSessionExpired?: (error: Error) => void;
|
|
278
341
|
_sessionRefreshToken: string | null;
|
|
279
342
|
_refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
280
|
-
|
|
281
|
-
|
|
343
|
+
_healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
344
|
+
_healthTickPromise: Promise<unknown> | null;
|
|
282
345
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
283
346
|
setToken(token: string): void;
|
|
284
347
|
setAnonymousPacketToken(token: string): void;
|
|
285
348
|
setApiKey(apiKey: string): void;
|
|
286
349
|
setHmacSecret(secret: string): void;
|
|
287
350
|
setEncryptRequests(value: boolean): void;
|
|
288
|
-
setCsrfToken(token: string): void;
|
|
289
351
|
setCsrfEnabled(enabled: boolean): void;
|
|
352
|
+
startHealthTick(intervalMs?: number): void;
|
|
353
|
+
stopHealthTick(): void;
|
|
290
354
|
_scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
291
355
|
access_token: string;
|
|
292
356
|
expires_in: number;
|
|
293
357
|
}>): void;
|
|
294
358
|
_clearRefreshTimer(): void;
|
|
295
359
|
stopKeepSession(): void;
|
|
296
|
-
|
|
297
|
-
stopCsrfRefresh(): void;
|
|
298
|
-
_scheduleCsrfRefresh(expiresIn: number): void;
|
|
299
|
-
refreshCsrfToken(): Promise<string>;
|
|
300
|
-
_applyCsrfHealth(csrf?: import("./types.js").EntityServerClientHealthCsrf | null): void;
|
|
360
|
+
_applyCsrfHealth(): void;
|
|
301
361
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
302
362
|
get _reqOpts(): import("./client/request.js").RequestOptions;
|
|
303
|
-
|
|
363
|
+
get http(): {
|
|
364
|
+
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
365
|
+
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
366
|
+
put<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
367
|
+
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
368
|
+
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
369
|
+
};
|
|
304
370
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
305
371
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
306
372
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
@@ -380,10 +446,9 @@ declare const EntityServerClient_base: {
|
|
|
380
446
|
hmacSecret: string;
|
|
381
447
|
encryptRequests: boolean;
|
|
382
448
|
csrfEnabled: boolean;
|
|
383
|
-
csrfToken: string;
|
|
384
449
|
csrfHeaderName: string;
|
|
385
|
-
|
|
386
|
-
|
|
450
|
+
csrfCookieName: string;
|
|
451
|
+
_csrfRefresher: (() => Promise<void>) | null;
|
|
387
452
|
activeTxId: string | null;
|
|
388
453
|
keepSession: boolean;
|
|
389
454
|
refreshBuffer: number;
|
|
@@ -391,30 +456,33 @@ declare const EntityServerClient_base: {
|
|
|
391
456
|
onSessionExpired?: (error: Error) => void;
|
|
392
457
|
_sessionRefreshToken: string | null;
|
|
393
458
|
_refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
394
|
-
|
|
395
|
-
|
|
459
|
+
_healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
460
|
+
_healthTickPromise: Promise<unknown> | null;
|
|
396
461
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
397
462
|
setToken(token: string): void;
|
|
398
463
|
setAnonymousPacketToken(token: string): void;
|
|
399
464
|
setApiKey(apiKey: string): void;
|
|
400
465
|
setHmacSecret(secret: string): void;
|
|
401
466
|
setEncryptRequests(value: boolean): void;
|
|
402
|
-
setCsrfToken(token: string): void;
|
|
403
467
|
setCsrfEnabled(enabled: boolean): void;
|
|
468
|
+
startHealthTick(intervalMs?: number): void;
|
|
469
|
+
stopHealthTick(): void;
|
|
404
470
|
_scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
405
471
|
access_token: string;
|
|
406
472
|
expires_in: number;
|
|
407
473
|
}>): void;
|
|
408
474
|
_clearRefreshTimer(): void;
|
|
409
475
|
stopKeepSession(): void;
|
|
410
|
-
|
|
411
|
-
stopCsrfRefresh(): void;
|
|
412
|
-
_scheduleCsrfRefresh(expiresIn: number): void;
|
|
413
|
-
refreshCsrfToken(): Promise<string>;
|
|
414
|
-
_applyCsrfHealth(csrf?: import("./types.js").EntityServerClientHealthCsrf | null): void;
|
|
476
|
+
_applyCsrfHealth(): void;
|
|
415
477
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
416
478
|
get _reqOpts(): import("./client/request.js").RequestOptions;
|
|
417
|
-
|
|
479
|
+
get http(): {
|
|
480
|
+
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
481
|
+
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
482
|
+
put<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
483
|
+
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
484
|
+
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
485
|
+
};
|
|
418
486
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
419
487
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
420
488
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
@@ -498,10 +566,9 @@ declare const EntityServerClient_base: {
|
|
|
498
566
|
hmacSecret: string;
|
|
499
567
|
encryptRequests: boolean;
|
|
500
568
|
csrfEnabled: boolean;
|
|
501
|
-
csrfToken: string;
|
|
502
569
|
csrfHeaderName: string;
|
|
503
|
-
|
|
504
|
-
|
|
570
|
+
csrfCookieName: string;
|
|
571
|
+
_csrfRefresher: (() => Promise<void>) | null;
|
|
505
572
|
activeTxId: string | null;
|
|
506
573
|
keepSession: boolean;
|
|
507
574
|
refreshBuffer: number;
|
|
@@ -509,30 +576,33 @@ declare const EntityServerClient_base: {
|
|
|
509
576
|
onSessionExpired?: (error: Error) => void;
|
|
510
577
|
_sessionRefreshToken: string | null;
|
|
511
578
|
_refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
512
|
-
|
|
513
|
-
|
|
579
|
+
_healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
580
|
+
_healthTickPromise: Promise<unknown> | null;
|
|
514
581
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
515
582
|
setToken(token: string): void;
|
|
516
583
|
setAnonymousPacketToken(token: string): void;
|
|
517
584
|
setApiKey(apiKey: string): void;
|
|
518
585
|
setHmacSecret(secret: string): void;
|
|
519
586
|
setEncryptRequests(value: boolean): void;
|
|
520
|
-
setCsrfToken(token: string): void;
|
|
521
587
|
setCsrfEnabled(enabled: boolean): void;
|
|
588
|
+
startHealthTick(intervalMs?: number): void;
|
|
589
|
+
stopHealthTick(): void;
|
|
522
590
|
_scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
523
591
|
access_token: string;
|
|
524
592
|
expires_in: number;
|
|
525
593
|
}>): void;
|
|
526
594
|
_clearRefreshTimer(): void;
|
|
527
595
|
stopKeepSession(): void;
|
|
528
|
-
|
|
529
|
-
stopCsrfRefresh(): void;
|
|
530
|
-
_scheduleCsrfRefresh(expiresIn: number): void;
|
|
531
|
-
refreshCsrfToken(): Promise<string>;
|
|
532
|
-
_applyCsrfHealth(csrf?: import("./types.js").EntityServerClientHealthCsrf | null): void;
|
|
596
|
+
_applyCsrfHealth(): void;
|
|
533
597
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
534
598
|
get _reqOpts(): import("./client/request.js").RequestOptions;
|
|
535
|
-
|
|
599
|
+
get http(): {
|
|
600
|
+
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
601
|
+
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
602
|
+
put<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
603
|
+
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
604
|
+
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
605
|
+
};
|
|
536
606
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
537
607
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
538
608
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
@@ -543,12 +613,10 @@ declare const EntityServerClient_base: {
|
|
|
543
613
|
};
|
|
544
614
|
} & {
|
|
545
615
|
new (...args: any[]): {
|
|
616
|
+
_csrfRefresher: () => Promise<void>;
|
|
546
617
|
checkHealth(): Promise<{
|
|
547
|
-
|
|
548
|
-
packet_encryption?: boolean;
|
|
549
|
-
packet_mode?: string;
|
|
618
|
+
status: string;
|
|
550
619
|
packet_token?: string;
|
|
551
|
-
csrf?: import("./types.js").EntityServerClientHealthCsrf;
|
|
552
620
|
}>;
|
|
553
621
|
login(email: string, password: string): Promise<{
|
|
554
622
|
access_token: string;
|
|
@@ -572,16 +640,6 @@ declare const EntityServerClient_base: {
|
|
|
572
640
|
withdraw(passwd?: string): Promise<{
|
|
573
641
|
ok: boolean;
|
|
574
642
|
}>;
|
|
575
|
-
reactivate(params: {
|
|
576
|
-
email: string;
|
|
577
|
-
passwd?: string;
|
|
578
|
-
provider?: string;
|
|
579
|
-
code?: string;
|
|
580
|
-
}): Promise<{
|
|
581
|
-
access_token: string;
|
|
582
|
-
refresh_token: string;
|
|
583
|
-
expires_in: number;
|
|
584
|
-
}>;
|
|
585
643
|
baseUrl: string;
|
|
586
644
|
token: string;
|
|
587
645
|
anonymousPacketToken: string;
|
|
@@ -589,10 +647,8 @@ declare const EntityServerClient_base: {
|
|
|
589
647
|
hmacSecret: string;
|
|
590
648
|
encryptRequests: boolean;
|
|
591
649
|
csrfEnabled: boolean;
|
|
592
|
-
csrfToken: string;
|
|
593
650
|
csrfHeaderName: string;
|
|
594
|
-
|
|
595
|
-
csrfRefreshBuffer: number;
|
|
651
|
+
csrfCookieName: string;
|
|
596
652
|
activeTxId: string | null;
|
|
597
653
|
keepSession: boolean;
|
|
598
654
|
refreshBuffer: number;
|
|
@@ -600,30 +656,33 @@ declare const EntityServerClient_base: {
|
|
|
600
656
|
onSessionExpired?: (error: Error) => void;
|
|
601
657
|
_sessionRefreshToken: string | null;
|
|
602
658
|
_refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
603
|
-
|
|
604
|
-
|
|
659
|
+
_healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
660
|
+
_healthTickPromise: Promise<unknown> | null;
|
|
605
661
|
configure(options: Partial<import("./types.js").EntityServerClientOptions>): void;
|
|
606
662
|
setToken(token: string): void;
|
|
607
663
|
setAnonymousPacketToken(token: string): void;
|
|
608
664
|
setApiKey(apiKey: string): void;
|
|
609
665
|
setHmacSecret(secret: string): void;
|
|
610
666
|
setEncryptRequests(value: boolean): void;
|
|
611
|
-
setCsrfToken(token: string): void;
|
|
612
667
|
setCsrfEnabled(enabled: boolean): void;
|
|
668
|
+
startHealthTick(intervalMs?: number): void;
|
|
669
|
+
stopHealthTick(): void;
|
|
613
670
|
_scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
614
671
|
access_token: string;
|
|
615
672
|
expires_in: number;
|
|
616
673
|
}>): void;
|
|
617
674
|
_clearRefreshTimer(): void;
|
|
618
675
|
stopKeepSession(): void;
|
|
619
|
-
|
|
620
|
-
stopCsrfRefresh(): void;
|
|
621
|
-
_scheduleCsrfRefresh(expiresIn: number): void;
|
|
622
|
-
refreshCsrfToken(): Promise<string>;
|
|
623
|
-
_applyCsrfHealth(csrf?: import("./types.js").EntityServerClientHealthCsrf | null): void;
|
|
676
|
+
_applyCsrfHealth(): void;
|
|
624
677
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
625
678
|
get _reqOpts(): import("./client/request.js").RequestOptions;
|
|
626
|
-
|
|
679
|
+
get http(): {
|
|
680
|
+
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
681
|
+
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
682
|
+
put<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
683
|
+
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
684
|
+
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
685
|
+
};
|
|
627
686
|
requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
628
687
|
requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
|
|
629
688
|
requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
@@ -633,6 +692,6 @@ declare const EntityServerClient_base: {
|
|
|
633
692
|
_requestFormBinary(method: string, path: string, form: FormData, withAuth?: boolean): Promise<ArrayBuffer>;
|
|
634
693
|
};
|
|
635
694
|
} & typeof EntityServerClientBase;
|
|
636
|
-
export declare class
|
|
695
|
+
export declare class EntityServerApi extends EntityServerApi_base {
|
|
637
696
|
}
|
|
638
697
|
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{EntityServerClientBase as i}from"./client/base.js";import{AdminMixin as n,AuthMixin as t,EntityMixin as e,FileMixin as r,PushMixin as x,SmtpMixin as M,TransactionMixin as s,UtilsMixin as m}from"./mixins/server/index.js";class l extends m(s(r(M(x(n(e(t(i)))))))){}export{l as EntityServerApi};
|
|
2
|
+
//# sourceMappingURL=EntityServerApi.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/EntityServerApi.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @file EntityServerApi.ts\n * entity-server core route\uC6A9 Mixin \uC870\uD569 \uD074\uB77C\uC774\uC5B8\uD2B8.\n *\n * \uC808(section)\uBCC4 \uAD6C\uD604:\n * src/client/base.ts \u2014 \uC0C1\uD0DC\u00B7\uC0DD\uC131\uC790\u00B7\uACF5\uD1B5 \uD5EC\uD37C\n * src/mixins/server/* \u2014 entity-server core route mixin\n * src/mixins/app/* \u2014 entity-app-server plugin mixin\n */\nimport { EntityServerClientBase } from \"./client/base.js\";\nimport {\n AdminMixin,\n AuthMixin,\n EntityMixin,\n FileMixin,\n PushMixin,\n SmtpMixin,\n TransactionMixin,\n UtilsMixin,\n} from \"./mixins/server/index.js\";\n\n// \u2500\u2500\u2500 Composed class \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport class EntityServerApi extends UtilsMixin(\n TransactionMixin(\n FileMixin(\n SmtpMixin(\n PushMixin(\n AdminMixin(EntityMixin(AuthMixin(EntityServerClientBase))),\n ),\n ),\n ),\n ),\n) {}\n"],
|
|
5
|
+
"mappings": "AASA,OAAS,0BAAAA,MAA8B,mBACvC,OACI,cAAAC,EACA,aAAAC,EACA,eAAAC,EACA,aAAAC,EACA,aAAAC,EACA,aAAAC,EACA,oBAAAC,EACA,cAAAC,MACG,2BAIA,MAAMC,UAAwBD,EACjCD,EACIH,EACIE,EACID,EACIJ,EAAWE,EAAYD,EAAUF,CAAsB,CAAC,CAAC,CAC7D,CACJ,CACJ,CACJ,CACJ,CAAE,CAAC",
|
|
6
|
+
"names": ["EntityServerClientBase", "AdminMixin", "AuthMixin", "EntityMixin", "FileMixin", "PushMixin", "SmtpMixin", "TransactionMixin", "UtilsMixin", "EntityServerApi"]
|
|
7
|
+
}
|
package/dist/client/base.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EntityServerClientOptions } from "../types.js";
|
|
2
2
|
import { type RequestOptions } from "./request.js";
|
|
3
3
|
export type GConstructor<T = object> = new (...args: any[]) => T;
|
|
4
4
|
export declare class EntityServerClientBase {
|
|
@@ -9,10 +9,10 @@ export declare class EntityServerClientBase {
|
|
|
9
9
|
hmacSecret: string;
|
|
10
10
|
encryptRequests: boolean;
|
|
11
11
|
csrfEnabled: boolean;
|
|
12
|
-
csrfToken: string;
|
|
13
12
|
csrfHeaderName: string;
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
csrfCookieName: string;
|
|
14
|
+
/** @internal health 재호출로 CSRF 쿠키 갱신 (AuthMixin에서 설정) */
|
|
15
|
+
_csrfRefresher: (() => Promise<void>) | null;
|
|
16
16
|
activeTxId: string | null;
|
|
17
17
|
keepSession: boolean;
|
|
18
18
|
refreshBuffer: number;
|
|
@@ -20,8 +20,8 @@ export declare class EntityServerClientBase {
|
|
|
20
20
|
onSessionExpired?: (error: Error) => void;
|
|
21
21
|
_sessionRefreshToken: string | null;
|
|
22
22
|
_refreshTimer: ReturnType<typeof setTimeout> | null;
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
_healthTickTimer: ReturnType<typeof setInterval> | null;
|
|
24
|
+
_healthTickPromise: Promise<unknown> | null;
|
|
25
25
|
/**
|
|
26
26
|
* EntityServerClient 인스턴스를 생성합니다.
|
|
27
27
|
*
|
|
@@ -41,8 +41,16 @@ export declare class EntityServerClientBase {
|
|
|
41
41
|
setHmacSecret(secret: string): void;
|
|
42
42
|
/** 암호화 요청 활성화 여부를 설정합니다. */
|
|
43
43
|
setEncryptRequests(value: boolean): void;
|
|
44
|
-
setCsrfToken(token: string): void;
|
|
45
44
|
setCsrfEnabled(enabled: boolean): void;
|
|
45
|
+
/**
|
|
46
|
+
* 주기적으로 health 체크를 실행합니다.
|
|
47
|
+
* CSRF 쿠키 갱신과 서버 상태 확인을 자동화합니다.
|
|
48
|
+
*
|
|
49
|
+
* @param intervalMs 호출 주기(ms). 기본값: 5분
|
|
50
|
+
*/
|
|
51
|
+
startHealthTick(intervalMs?: number): void;
|
|
52
|
+
/** health tick 타이머를 중지합니다. */
|
|
53
|
+
stopHealthTick(): void;
|
|
46
54
|
/** @internal 자동 토큰 갱신 타이머를 시작합니다. */
|
|
47
55
|
_scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
|
|
48
56
|
access_token: string;
|
|
@@ -55,11 +63,7 @@ export declare class EntityServerClientBase {
|
|
|
55
63
|
* `logout()` 호출 시 자동으로 중지되며, 직접 호출이 필요한 경우는 드뭅니다.
|
|
56
64
|
*/
|
|
57
65
|
stopKeepSession(): void;
|
|
58
|
-
|
|
59
|
-
stopCsrfRefresh(): void;
|
|
60
|
-
_scheduleCsrfRefresh(expiresIn: number): void;
|
|
61
|
-
refreshCsrfToken(): Promise<string>;
|
|
62
|
-
_applyCsrfHealth(csrf?: EntityServerClientHealthCsrf | null): void;
|
|
66
|
+
_applyCsrfHealth(): void;
|
|
63
67
|
/**
|
|
64
68
|
* 요청 바디를 파싱합니다.
|
|
65
69
|
* `application/octet-stream`이면 XChaCha20-Poly1305 복호화, 그 외는 JSON 파싱합니다.
|
|
@@ -69,11 +73,20 @@ export declare class EntityServerClientBase {
|
|
|
69
73
|
readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
|
|
70
74
|
get _reqOpts(): RequestOptions;
|
|
71
75
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
76
|
+
* 커스텀 라우트 직접 호출용 HTTP 네임스페이스.
|
|
77
|
+
* 인증·암호화·HMAC 등 SDK 옵션이 그대로 적용됩니다.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* const res = await client.http.get<{ version: string }>("/api/v1/status", false);
|
|
81
|
+
* const res = await client.http.post<MyResponse>("/api/v1/custom", { key: "value" });
|
|
75
82
|
*/
|
|
76
|
-
|
|
83
|
+
get http(): {
|
|
84
|
+
get<T>(path: string, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
85
|
+
post<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
86
|
+
put<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
87
|
+
patch<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
88
|
+
delete<T>(path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
|
|
89
|
+
};
|
|
77
90
|
/**
|
|
78
91
|
* 임의 경로에 요청을 보내고 바이너리(ArrayBuffer)를 반환합니다.
|
|
79
92
|
* 이미지, PDF, 압축 파일 등 바이너리 응답이 오는 엔드포인트에 사용합니다.
|