entity-server-client 1.0.0 → 1.0.2

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.
@@ -1,51 +0,0 @@
1
- import type { GConstructor, EntityServerClientBase } from "../client/base";
2
- export declare function EmailMixin<TBase extends GConstructor<EntityServerClientBase>>(Base: TBase): {
3
- new (...args: any[]): {
4
- /** 이메일 인증 코드 또는 링크를 발송합니다. */
5
- emailVerificationSend(email: string): Promise<{
6
- ok: boolean;
7
- }>;
8
- /** 이메일 인증 코드를 확인합니다. */
9
- emailVerificationConfirm(token: string): Promise<{
10
- ok: boolean;
11
- }>;
12
- /** 현재 계정의 이메일 인증 상태를 조회합니다. (JWT 필요) */
13
- emailVerificationStatus(): Promise<{
14
- ok: boolean;
15
- verified: boolean;
16
- email?: string;
17
- }>;
18
- /** 이메일 주소를 변경합니다. (JWT + 인증 코드 필요) */
19
- emailChange(newEmail: string, code?: string): Promise<{
20
- ok: boolean;
21
- }>;
22
- baseUrl: string;
23
- token: string;
24
- apiKey: string;
25
- hmacSecret: string;
26
- encryptRequests: boolean;
27
- activeTxId: string | null;
28
- keepSession: boolean;
29
- refreshBuffer: number;
30
- onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
31
- onSessionExpired?: (error: Error) => void;
32
- _sessionRefreshToken: string | null;
33
- _refreshTimer: ReturnType<typeof setTimeout> | null;
34
- configure(options: Partial<import("..").EntityServerClientOptions>): void;
35
- setToken(token: string): void;
36
- setApiKey(apiKey: string): void;
37
- setHmacSecret(secret: string): void;
38
- setEncryptRequests(value: boolean): void;
39
- _scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
40
- access_token: string;
41
- expires_in: number;
42
- }>): void;
43
- _clearRefreshTimer(): void;
44
- stopKeepSession(): void;
45
- readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
46
- get _reqOpts(): import("../client/request").RequestOptions;
47
- _request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
48
- _requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
49
- _requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
50
- };
51
- } & TBase;
@@ -1,52 +0,0 @@
1
- import type { IdentityRequestOptions } from "../types";
2
- import type { GConstructor, EntityServerClientBase } from "../client/base";
3
- export declare function IdentityMixin<TBase extends GConstructor<EntityServerClientBase>>(Base: TBase): {
4
- new (...args: any[]): {
5
- /** 본인인증 요청을 생성합니다. */
6
- identityRequest(opts: IdentityRequestOptions): Promise<{
7
- ok: boolean;
8
- data: Record<string, unknown>;
9
- }>;
10
- /** 본인인증 결과를 조회합니다. */
11
- identityResult(requestId: string): Promise<{
12
- ok: boolean;
13
- data: Record<string, unknown>;
14
- }>;
15
- /** CI 해시 중복 여부를 확인합니다. */
16
- identityVerifyCI(ciHash: string): Promise<{
17
- ok: boolean;
18
- data: {
19
- exists: boolean;
20
- account_seq?: number;
21
- };
22
- }>;
23
- baseUrl: string;
24
- token: string;
25
- apiKey: string;
26
- hmacSecret: string;
27
- encryptRequests: boolean;
28
- activeTxId: string | null;
29
- keepSession: boolean;
30
- refreshBuffer: number;
31
- onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
32
- onSessionExpired?: (error: Error) => void;
33
- _sessionRefreshToken: string | null;
34
- _refreshTimer: ReturnType<typeof setTimeout> | null;
35
- configure(options: Partial<import("..").EntityServerClientOptions>): void;
36
- setToken(token: string): void;
37
- setApiKey(apiKey: string): void;
38
- setHmacSecret(secret: string): void;
39
- setEncryptRequests(value: boolean): void;
40
- _scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
41
- access_token: string;
42
- expires_in: number;
43
- }>): void;
44
- _clearRefreshTimer(): void;
45
- stopKeepSession(): void;
46
- readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
47
- get _reqOpts(): import("../client/request").RequestOptions;
48
- _request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
49
- _requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
50
- _requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
51
- };
52
- } & TBase;
@@ -1,94 +0,0 @@
1
- /**
2
- * LlmMixin — LLM API 클라이언트 Mixin
3
- *
4
- * 설계문서 Section 14 기준 구현.
5
- */
6
- import type { LlmChatRequest, LlmChatResponse, LlmConversationCreateRequest, LlmConversationDetail, LlmConversationListResponse, LlmConversationUpdateRequest, LlmDocumentIngestRequest, LlmDocumentIngestResponse, LlmDocumentListResponse, LlmProvidersResponse, LlmRAGChatRequest, LlmRAGSearchRequest, LlmRAGSearchResponse, LlmUsageResponse, LlmUsageSummaryResponse, LlmCacheStats } from "../types";
7
- import type { GConstructor, EntityServerClientBase } from "../client/base";
8
- export declare function LlmMixin<TBase extends GConstructor<EntityServerClientBase>>(Base: TBase): {
9
- new (...args: any[]): {
10
- /** SSE/스트리밍 응답을 위한 raw fetch — Response 객체 반환 */
11
- _llmStream(path: string, body: unknown): Promise<Response>;
12
- llmChat(req: LlmChatRequest): Promise<LlmChatResponse>;
13
- llmChatStream(req: LlmChatRequest): Promise<Response>;
14
- llmCreateConversation(req: LlmConversationCreateRequest): Promise<{
15
- ok: boolean;
16
- data: {
17
- seq: number;
18
- };
19
- }>;
20
- llmSendMessage(seq: number, req: LlmChatRequest): Promise<LlmChatResponse>;
21
- llmListConversations(params?: {
22
- page?: number;
23
- limit?: number;
24
- user_seq?: number;
25
- }): Promise<LlmConversationListResponse>;
26
- llmGetConversation(seq: number): Promise<LlmConversationDetail>;
27
- llmUpdateConversation(seq: number, req: LlmConversationUpdateRequest): Promise<{
28
- ok: boolean;
29
- }>;
30
- llmDeleteConversation(seq: number): Promise<{
31
- ok: boolean;
32
- }>;
33
- llmGetProviders(): Promise<LlmProvidersResponse>;
34
- llmGetUsage(params?: {
35
- provider?: string;
36
- start_date?: string;
37
- end_date?: string;
38
- }): Promise<LlmUsageResponse>;
39
- llmGetUsageSummary(params?: {
40
- provider?: string;
41
- start_date?: string;
42
- end_date?: string;
43
- }): Promise<LlmUsageSummaryResponse>;
44
- llmIngestDocument(req: LlmDocumentIngestRequest): Promise<LlmDocumentIngestResponse>;
45
- llmListDocuments(params?: {
46
- page?: number;
47
- limit?: number;
48
- }): Promise<LlmDocumentListResponse>;
49
- llmDeleteDocument(id: string): Promise<{
50
- ok: boolean;
51
- }>;
52
- llmSearchDocuments(req: LlmRAGSearchRequest): Promise<LlmRAGSearchResponse>;
53
- llmChatWithRAG(req: LlmRAGChatRequest): Promise<LlmChatResponse>;
54
- llmChatWithRAGStream(req: LlmRAGChatRequest): Promise<Response>;
55
- llmRebuildRAGIndex(): Promise<{
56
- ok: boolean;
57
- }>;
58
- llmGetCacheStats(): Promise<{
59
- ok: boolean;
60
- data: LlmCacheStats;
61
- }>;
62
- llmClearCache(): Promise<{
63
- ok: boolean;
64
- }>;
65
- baseUrl: string;
66
- token: string;
67
- apiKey: string;
68
- hmacSecret: string;
69
- encryptRequests: boolean;
70
- activeTxId: string | null;
71
- keepSession: boolean;
72
- refreshBuffer: number;
73
- onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
74
- onSessionExpired?: (error: Error) => void;
75
- _sessionRefreshToken: string | null;
76
- _refreshTimer: ReturnType<typeof setTimeout> | null;
77
- configure(options: Partial<import("..").EntityServerClientOptions>): void;
78
- setToken(token: string): void;
79
- setApiKey(apiKey: string): void;
80
- setHmacSecret(secret: string): void;
81
- setEncryptRequests(value: boolean): void;
82
- _scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
83
- access_token: string;
84
- expires_in: number;
85
- }>): void;
86
- _clearRefreshTimer(): void;
87
- stopKeepSession(): void;
88
- readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
89
- get _reqOpts(): import("../client/request").RequestOptions;
90
- _request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
91
- _requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
92
- _requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
93
- };
94
- } & TBase;
@@ -1,63 +0,0 @@
1
- import type { PgCreateOrderRequest, PgConfirmPaymentRequest, PgCancelPaymentRequest } from "../types";
2
- import type { GConstructor, EntityServerClientBase } from "../client/base";
3
- export declare function PgMixin<TBase extends GConstructor<EntityServerClientBase>>(Base: TBase): {
4
- new (...args: any[]): {
5
- /** 결제 주문을 생성합니다. */
6
- pgCreateOrder(req: PgCreateOrderRequest): Promise<{
7
- ok: boolean;
8
- data: Record<string, unknown>;
9
- }>;
10
- /** 주문 정보를 조회합니다. */
11
- pgGetOrder(orderId: string): Promise<{
12
- ok: boolean;
13
- data: Record<string, unknown>;
14
- }>;
15
- /** 결제를 승인합니다. */
16
- pgConfirmPayment(req: PgConfirmPaymentRequest): Promise<{
17
- ok: boolean;
18
- data: Record<string, unknown>;
19
- }>;
20
- /** 결제를 취소합니다. */
21
- pgCancelPayment(orderId: string, req: PgCancelPaymentRequest): Promise<{
22
- ok: boolean;
23
- data: Record<string, unknown>;
24
- }>;
25
- /** 결제 상태를 외부 PG와 동기화합니다. */
26
- pgSyncPayment(orderId: string): Promise<{
27
- ok: boolean;
28
- }>;
29
- /** 클라이언트 SDK 설정을 반환합니다 (공개 API, 인증 불필요). */
30
- pgConfig(): Promise<{
31
- ok: boolean;
32
- data: Record<string, unknown>;
33
- }>;
34
- baseUrl: string;
35
- token: string;
36
- apiKey: string;
37
- hmacSecret: string;
38
- encryptRequests: boolean;
39
- activeTxId: string | null;
40
- keepSession: boolean;
41
- refreshBuffer: number;
42
- onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
43
- onSessionExpired?: (error: Error) => void;
44
- _sessionRefreshToken: string | null;
45
- _refreshTimer: ReturnType<typeof setTimeout> | null;
46
- configure(options: Partial<import("..").EntityServerClientOptions>): void;
47
- setToken(token: string): void;
48
- setApiKey(apiKey: string): void;
49
- setHmacSecret(secret: string): void;
50
- setEncryptRequests(value: boolean): void;
51
- _scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
52
- access_token: string;
53
- expires_in: number;
54
- }>): void;
55
- _clearRefreshTimer(): void;
56
- stopKeepSession(): void;
57
- readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
58
- get _reqOpts(): import("../client/request").RequestOptions;
59
- _request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
60
- _requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
61
- _requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
62
- };
63
- } & TBase;
@@ -1,55 +0,0 @@
1
- import type { SmsSendRequest } from "../types";
2
- import type { GConstructor, EntityServerClientBase } from "../client/base";
3
- export declare function SmsMixin<TBase extends GConstructor<EntityServerClientBase>>(Base: TBase): {
4
- new (...args: any[]): {
5
- /** SMS를 발송합니다. */
6
- smsSend(req: SmsSendRequest): Promise<{
7
- ok: boolean;
8
- seq: number;
9
- }>;
10
- /** SMS 발송 상태를 조회합니다. */
11
- smsStatus(seq: number): Promise<{
12
- ok: boolean;
13
- status: string;
14
- }>;
15
- /** SMS 인증 코드를 발송합니다. */
16
- smsVerificationSend(phone: string, opts?: {
17
- purpose?: string;
18
- }): Promise<{
19
- ok: boolean;
20
- }>;
21
- /** SMS 인증 코드를 검증합니다. */
22
- smsVerificationVerify(phone: string, code: string): Promise<{
23
- ok: boolean;
24
- verified: boolean;
25
- }>;
26
- baseUrl: string;
27
- token: string;
28
- apiKey: string;
29
- hmacSecret: string;
30
- encryptRequests: boolean;
31
- activeTxId: string | null;
32
- keepSession: boolean;
33
- refreshBuffer: number;
34
- onTokenRefreshed?: (accessToken: string, expiresIn: number) => void;
35
- onSessionExpired?: (error: Error) => void;
36
- _sessionRefreshToken: string | null;
37
- _refreshTimer: ReturnType<typeof setTimeout> | null;
38
- configure(options: Partial<import("..").EntityServerClientOptions>): void;
39
- setToken(token: string): void;
40
- setApiKey(apiKey: string): void;
41
- setHmacSecret(secret: string): void;
42
- setEncryptRequests(value: boolean): void;
43
- _scheduleKeepSession(refreshToken: string, expiresIn: number, refreshFn: (rt: string) => Promise<{
44
- access_token: string;
45
- expires_in: number;
46
- }>): void;
47
- _clearRefreshTimer(): void;
48
- stopKeepSession(): void;
49
- readRequestBody<T = Record<string, unknown>>(body: ArrayBuffer | Uint8Array | string | T | null | undefined, contentType?: string, requireEncrypted?: boolean): T;
50
- get _reqOpts(): import("../client/request").RequestOptions;
51
- _request<T>(method: string, path: string, body?: unknown, withAuth?: boolean, extraHeaders?: Record<string, string>): Promise<T>;
52
- _requestBinary(method: string, path: string, body?: unknown, withAuth?: boolean): Promise<ArrayBuffer>;
53
- _requestForm<T>(method: string, path: string, form: FormData, withAuth?: boolean): Promise<T>;
54
- };
55
- } & TBase;