@reopt-ai/brandapp-sdk 3.3.0 → 3.4.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/CHANGELOG.md +67 -0
- package/README.md +10 -1
- package/dist/abort--nOBFN4M.js +50 -0
- package/dist/ai/index.d.ts +2 -314
- package/dist/ai/index.js +3 -8
- package/dist/ai-provider/index.d.ts +79 -163
- package/dist/ai-provider/index.js +752 -685
- package/dist/auth/index.d.ts +27 -27
- package/dist/auth/index.js +41 -34
- package/dist/better-auth/client.d.ts +6 -5
- package/dist/better-auth/client.js +28 -5
- package/dist/better-auth/index.d.ts +19 -17
- package/dist/better-auth/index.js +180 -144
- package/dist/client-B1q5P8rv.js +83 -0
- package/dist/client-B9QHVhdM.js +77 -0
- package/dist/client-BGGd_cpV.d.ts +103 -0
- package/dist/client-BJcy1V1a.js +140 -0
- package/dist/client-Beivhucf.js +55 -0
- package/dist/client-BruP5_nU.d.ts +147 -0
- package/dist/client-D-yNxNfk.js +28 -0
- package/dist/client-D0eBxh8j.d.ts +284 -0
- package/dist/client-D3RHHUUW.d.ts +207 -0
- package/dist/client-D6gs61w8.d.ts +53 -0
- package/dist/client-DBnK7ooQ.js +86 -0
- package/dist/client-DDw5yz_h.d.ts +53 -0
- package/dist/client-DPmoKuR9.js +305 -0
- package/dist/client-DsdakibF.js +503 -0
- package/dist/client-Dxg8_DIH.d.ts +71 -0
- package/dist/client-EbhUIhHq.js +53 -0
- package/dist/client-lk6wBu_0.d.ts +48 -0
- package/dist/client-p49ol9pg.d.ts +124 -0
- package/dist/cms/index.d.ts +52 -108
- package/dist/cms/index.js +103 -86
- package/dist/config-CRytOPPl.d.ts +394 -0
- package/dist/config-Cw0a3-C8.js +487 -0
- package/dist/dev/index.d.ts +2 -528
- package/dist/dev/index.js +2731 -2967
- package/dist/eav/coerce.d.ts +3 -1
- package/dist/eav/coerce.js +72 -46
- package/dist/eav/index.d.ts +72 -100
- package/dist/eav/index.js +158 -126
- package/dist/eav/migrate.d.ts +112 -109
- package/dist/eav/migrate.js +230 -196
- package/dist/eav/schema.d.ts +111 -150
- package/dist/eav/schema.js +624 -603
- package/dist/encoding-Bwfm3iaE.js +21 -0
- package/dist/{errors-BjDFIyA6.d.ts → errors-CRCcErNC.d.ts} +55 -53
- package/dist/feedback/index.d.ts +2 -132
- package/dist/feedback/index.js +3 -6
- package/dist/files/index.d.ts +14 -14
- package/dist/files/index.js +41 -25
- package/dist/http-client-QKUvvirs.js +386 -0
- package/dist/index-DrVaKfhs.d.ts +456 -0
- package/dist/index-Z6OGcurJ.d.ts +169 -0
- package/dist/index.d.ts +6 -230
- package/dist/index.js +119 -71
- package/dist/logout/index.d.ts +56 -53
- package/dist/logout/index.js +232 -289
- package/dist/plans/index.d.ts +2 -236
- package/dist/plans/index.js +3 -6
- package/dist/push/index.d.ts +2 -79
- package/dist/push/index.js +3 -6
- package/dist/query-BvbCiGWb.js +35 -0
- package/dist/react/hooks.d.ts +97 -99
- package/dist/react/hooks.js +742 -404
- package/dist/sse-parser-FMjxM7sY.js +86 -0
- package/dist/terms/index.d.ts +3 -79
- package/dist/terms/index.js +3 -6
- package/dist/testing/index.d.ts +52 -104
- package/dist/testing/index.js +94 -72
- package/dist/types-B-SMkH6s.d.ts +26 -0
- package/dist/types-BXDcoJHG.d.ts +131 -0
- package/dist/types-BrghN2rJ.d.ts +105 -0
- package/dist/types-DjDRszNj.js +11 -0
- package/dist/webhooks/index.d.ts +77 -50
- package/dist/webhooks/index.js +150 -127
- package/docs/api-reference.md +87 -6
- package/package.json +6 -5
- package/dist/chunk-2LSCQHAU.js +0 -21
- package/dist/chunk-4U4ZPPL4.js +0 -599
- package/dist/chunk-55KHY5GH.js +0 -96
- package/dist/chunk-C5VTRZWX.js +0 -458
- package/dist/chunk-F7BXBTZI.js +0 -54
- package/dist/chunk-FJUCWXX3.js +0 -350
- package/dist/chunk-H33OTQEN.js +0 -112
- package/dist/chunk-L4DHB36G.js +0 -75
- package/dist/chunk-OG7R3UAR.js +0 -105
- package/dist/chunk-PF24XU54.js +0 -32
- package/dist/chunk-QN3QD67K.js +0 -49
- package/dist/chunk-REIKXSMY.js +0 -7
- package/dist/chunk-UGBBXCZE.js +0 -157
- package/dist/chunk-UVT2E6KD.js +0 -81
- package/dist/chunk-YPLT3RFL.js +0 -63
- package/dist/chunk-YTKSAWV2.js +0 -463
- package/dist/client-BkcO-0C2.d.ts +0 -216
- package/dist/client-CN5_tNOC.d.ts +0 -147
- package/dist/client-DttyeM_h.d.ts +0 -102
- package/dist/config-CtxyJsDR.d.ts +0 -397
- package/dist/typed-client-BxOVIiMU.d.ts +0 -40
- package/dist/types-6E3ZLL9X.d.ts +0 -24
- package/dist/types-DskYLVb8.d.ts +0 -104
- package/dist/types-ckmDDW3N.d.ts +0 -129
package/dist/react/hooks.d.ts
CHANGED
|
@@ -1,68 +1,61 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import '../terms/index.js';
|
|
10
|
-
import '../types-DskYLVb8.js';
|
|
11
|
-
import '../push/index.js';
|
|
12
|
-
import '../plans/index.js';
|
|
13
|
-
import '../feedback/index.js';
|
|
14
|
-
import '../client-DttyeM_h.js';
|
|
15
|
-
import '../typed-client-BxOVIiMU.js';
|
|
16
|
-
|
|
1
|
+
import { C as EavEntity, D as ListRecordsQuery, M as UpsertRecordInput, N as UpsertRecordResult, O as PaginatedResponse, b as EavAttribute, j as UpdateRecordInput, m as BulkUpdateItem, v as CreateRecordInput, w as EavRecord, y as DeleteWhereInput } from "../config-CRytOPPl.js";
|
|
2
|
+
import { a as CompletionOptions, f as ModelInfo, l as ImageGenerateOptions, o as CompletionResult, p as StreamDoneData, r as AgentInfo, s as CreditInfo, u as ImageGenerateResult } from "../client-D0eBxh8j.js";
|
|
3
|
+
import { _ as ReoptSDKError } from "../errors-CRCcErNC.js";
|
|
4
|
+
import { a as ListTagsQuery, c as PostGroup, d as Tag, i as ListPostsQuery, o as Post, r as ListPostGroupsQuery, s as PostDetail, t as CmsPaginatedResponse } from "../types-BXDcoJHG.js";
|
|
5
|
+
import { a as FileListResponse, i as FileListQuery, o as UploadOptions, r as FileInfo } from "../client-p49ol9pg.js";
|
|
6
|
+
import { t as ReoptSDK } from "../index-Z6OGcurJ.js";
|
|
7
|
+
import { UseInfiniteQueryOptions, UseInfiniteQueryResult, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
8
|
+
//#region src/react/use-ai-stream.d.ts
|
|
17
9
|
type UseAiStreamOptions = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
/** Called on each new chunk appended to text */
|
|
11
|
+
onChunk?: (chunk: string) => void;
|
|
12
|
+
/** Called when the stream completes successfully */
|
|
13
|
+
onFinish?: (text: string, metadata: StreamDoneData | null) => void;
|
|
14
|
+
/** Called when the stream errors */
|
|
15
|
+
onError?: (error: Error) => void;
|
|
24
16
|
};
|
|
25
17
|
type UseAiStreamReturn = {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
18
|
+
/** Accumulated text from the current/last generation */
|
|
19
|
+
text: string;
|
|
20
|
+
/** Whether a stream is currently in progress */
|
|
21
|
+
isStreaming: boolean;
|
|
22
|
+
/** Error from the most recent generation attempt, or null */
|
|
23
|
+
error: Error | null;
|
|
24
|
+
/** Metadata (usage, credits) from the last completed stream */
|
|
25
|
+
metadata: StreamDoneData | null;
|
|
26
|
+
/** Start a new generation. Aborts any in-progress stream first. */
|
|
27
|
+
generate: (options: Omit<CompletionOptions, "signal">) => void;
|
|
28
|
+
/** Abort the current stream */
|
|
29
|
+
stop: () => void;
|
|
30
|
+
/** Reset text, error, and metadata to initial state */
|
|
31
|
+
reset: () => void;
|
|
40
32
|
};
|
|
41
33
|
declare function useAiStream(sdk: ReoptSDK, options?: UseAiStreamOptions): UseAiStreamReturn;
|
|
42
|
-
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/react/hooks.d.ts
|
|
36
|
+
type ReoptQueryKey<T extends readonly unknown[]> = readonly ["reopt", ...T];
|
|
43
37
|
declare const keys: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
38
|
+
all: readonly ["reopt"];
|
|
39
|
+
entities: (brandappId?: string) => ReoptQueryKey<["entities", string | undefined]>;
|
|
40
|
+
entity: (entityId: string) => ReoptQueryKey<["entity", string]>;
|
|
41
|
+
records: (entityId: string, query?: ListRecordsQuery) => ReoptQueryKey<["records", string, ListRecordsQuery | undefined]>;
|
|
42
|
+
recordsInfinite: (entityId: string, query?: ListRecordsQuery) => ReoptQueryKey<["recordsInfinite", string, ListRecordsQuery | undefined]>;
|
|
43
|
+
record: (entityId: string, recordId: string) => ReoptQueryKey<["record", string, string]>;
|
|
44
|
+
recordCount: (entityId: string, query?: Pick<ListRecordsQuery, "filters" | "authUserId">) => ReoptQueryKey<["recordCount", string, Pick<ListRecordsQuery, "filters" | "authUserId"> | undefined]>;
|
|
45
|
+
recordsPrefix: (entityId: string) => ReoptQueryKey<["records", string]>;
|
|
46
|
+
recordsInfinitePrefix: (entityId: string) => ReoptQueryKey<["recordsInfinite", string]>;
|
|
47
|
+
recordCountPrefix: (entityId: string) => ReoptQueryKey<["recordCount", string]>;
|
|
48
|
+
aiCredits: (brandappId?: string) => ReoptQueryKey<["ai", "credits", string | undefined]>;
|
|
49
|
+
aiModels: (brandappId?: string) => ReoptQueryKey<["ai", "models", string | undefined]>;
|
|
50
|
+
aiAgents: (brandappId?: string) => ReoptQueryKey<["ai", "agents", string | undefined]>;
|
|
51
|
+
posts: (brandappId?: string, query?: ListPostsQuery) => ReoptQueryKey<["posts", string | undefined, ListPostsQuery | undefined]>;
|
|
52
|
+
post: (postId: string) => ReoptQueryKey<["post", string]>;
|
|
53
|
+
postGroups: (brandappId?: string, query?: ListPostGroupsQuery) => ReoptQueryKey<["postGroups", string | undefined, ListPostGroupsQuery | undefined]>;
|
|
54
|
+
postGroup: (groupId: string) => ReoptQueryKey<["postGroup", string]>;
|
|
55
|
+
tags: (brandappId?: string, query?: ListTagsQuery) => ReoptQueryKey<["tags", string | undefined, ListTagsQuery | undefined]>;
|
|
56
|
+
files: (brandappId?: string, query?: FileListQuery) => ReoptQueryKey<["files", string | undefined, FileListQuery | undefined]>;
|
|
57
|
+
file: (fileId: string) => ReoptQueryKey<["file", string]>;
|
|
64
58
|
};
|
|
65
|
-
|
|
66
59
|
/**
|
|
67
60
|
* List every EAV entity defined for the current brandapp, including their
|
|
68
61
|
* attribute metadata. Cached for 5 minutes since the schema rarely changes
|
|
@@ -82,8 +75,12 @@ declare const keys: {
|
|
|
82
75
|
* }
|
|
83
76
|
* ```
|
|
84
77
|
*/
|
|
85
|
-
declare function useEavEntities(sdk: ReoptSDK, options?: Omit<UseQueryOptions<EavEntity[]>, "queryKey" | "queryFn">):
|
|
86
|
-
declare function useEavEntity(sdk: ReoptSDK, entityId: string, options?: Omit<UseQueryOptions
|
|
78
|
+
declare function useEavEntities(sdk: ReoptSDK, options?: Omit<UseQueryOptions<EavEntity[]>, "queryKey" | "queryFn">): UseQueryResult<EavEntity[]>;
|
|
79
|
+
declare function useEavEntity(sdk: ReoptSDK, entityId: string, options?: Omit<UseQueryOptions<EavEntity & {
|
|
80
|
+
attributes: EavAttribute[];
|
|
81
|
+
}>, "queryKey" | "queryFn">): UseQueryResult<EavEntity & {
|
|
82
|
+
attributes: EavAttribute[];
|
|
83
|
+
}>;
|
|
87
84
|
/**
|
|
88
85
|
* List records for an entity with optional filters and pagination.
|
|
89
86
|
*
|
|
@@ -106,10 +103,10 @@ declare function useEavEntity(sdk: ReoptSDK, entityId: string, options?: Omit<Us
|
|
|
106
103
|
* }
|
|
107
104
|
* ```
|
|
108
105
|
*/
|
|
109
|
-
declare function useEavRecords(sdk: ReoptSDK, entityId: string, query?: ListRecordsQuery, options?: Omit<UseQueryOptions<PaginatedResponse<EavRecord>>, "queryKey" | "queryFn">):
|
|
110
|
-
declare function useEavRecordsInfinite(sdk: ReoptSDK, entityId: string, query?: Omit<ListRecordsQuery, "page">, options?: Omit<UseInfiniteQueryOptions<PaginatedResponse<EavRecord>>, "queryKey" | "queryFn" | "getNextPageParam" | "initialPageParam">):
|
|
111
|
-
declare function useEavRecord(sdk: ReoptSDK, entityId: string, recordId: string, options?: Omit<UseQueryOptions
|
|
112
|
-
declare function useEavRecordCount(sdk: ReoptSDK, entityId: string, query?: Pick<ListRecordsQuery, "filters" | "authUserId">, options?: Omit<UseQueryOptions<number>, "queryKey" | "queryFn">):
|
|
106
|
+
declare function useEavRecords(sdk: ReoptSDK, entityId: string, query?: ListRecordsQuery, options?: Omit<UseQueryOptions<PaginatedResponse<EavRecord>>, "queryKey" | "queryFn">): UseQueryResult<PaginatedResponse<EavRecord>>;
|
|
107
|
+
declare function useEavRecordsInfinite(sdk: ReoptSDK, entityId: string, query?: Omit<ListRecordsQuery, "page">, options?: Omit<UseInfiniteQueryOptions<PaginatedResponse<EavRecord>>, "queryKey" | "queryFn" | "getNextPageParam" | "initialPageParam">): UseInfiniteQueryResult<PaginatedResponse<EavRecord>>;
|
|
108
|
+
declare function useEavRecord(sdk: ReoptSDK, entityId: string, recordId: string, options?: Omit<UseQueryOptions<EavRecord>, "queryKey" | "queryFn">): UseQueryResult<EavRecord>;
|
|
109
|
+
declare function useEavRecordCount(sdk: ReoptSDK, entityId: string, query?: Pick<ListRecordsQuery, "filters" | "authUserId">, options?: Omit<UseQueryOptions<number>, "queryKey" | "queryFn">): UseQueryResult<number>;
|
|
113
110
|
/**
|
|
114
111
|
* Create a single record. Automatically invalidates the records list and
|
|
115
112
|
* count caches for this entity on success.
|
|
@@ -142,14 +139,14 @@ declare function useEavRecordCount(sdk: ReoptSDK, entityId: string, query?: Pick
|
|
|
142
139
|
* }
|
|
143
140
|
* ```
|
|
144
141
|
*/
|
|
145
|
-
declare function useCreateRecord(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<EavRecord, Error, CreateRecordInput>):
|
|
142
|
+
declare function useCreateRecord(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<EavRecord, Error, CreateRecordInput>): UseMutationResult<EavRecord, Error, CreateRecordInput>;
|
|
146
143
|
declare function useUpdateRecord(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<EavRecord, Error, {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}>):
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
144
|
+
recordId: string;
|
|
145
|
+
input: UpdateRecordInput;
|
|
146
|
+
}>): UseMutationResult<EavRecord, Error, {
|
|
147
|
+
recordId: string;
|
|
148
|
+
input: UpdateRecordInput;
|
|
149
|
+
}>;
|
|
153
150
|
/**
|
|
154
151
|
* Delete a record by id. Pass the recordId directly to `mutateAsync`.
|
|
155
152
|
*
|
|
@@ -159,7 +156,7 @@ declare function useUpdateRecord(sdk: ReoptSDK, entityId: string, options?: UseM
|
|
|
159
156
|
* <button onClick={() => remove.mutate(record.id)}>Delete</button>
|
|
160
157
|
* ```
|
|
161
158
|
*/
|
|
162
|
-
declare function useDeleteRecord(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<void, Error, string>):
|
|
159
|
+
declare function useDeleteRecord(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<void, Error, string>): UseMutationResult<void, Error, string>;
|
|
163
160
|
/**
|
|
164
161
|
* 레코드 upsert mutation. 필터에 매칭되는 레코드가 있으면 업데이트, 없으면 생성.
|
|
165
162
|
*
|
|
@@ -172,7 +169,7 @@ declare function useDeleteRecord(sdk: ReoptSDK, entityId: string, options?: UseM
|
|
|
172
169
|
* });
|
|
173
170
|
* ```
|
|
174
171
|
*/
|
|
175
|
-
declare function useUpsertRecord(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<UpsertRecordResult<EavRecord>, Error, UpsertRecordInput>):
|
|
172
|
+
declare function useUpsertRecord(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<UpsertRecordResult<EavRecord>, Error, UpsertRecordInput>): UseMutationResult<UpsertRecordResult<EavRecord>, Error, UpsertRecordInput>;
|
|
176
173
|
/**
|
|
177
174
|
* 최대 100개 레코드를 한 번에 생성하는 mutation.
|
|
178
175
|
*
|
|
@@ -185,19 +182,19 @@ declare function useUpsertRecord(sdk: ReoptSDK, entityId: string, options?: UseM
|
|
|
185
182
|
* ]);
|
|
186
183
|
* ```
|
|
187
184
|
*/
|
|
188
|
-
declare function useBulkCreateRecords(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<EavRecord[], Error, CreateRecordInput[]>):
|
|
185
|
+
declare function useBulkCreateRecords(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<EavRecord[], Error, CreateRecordInput[]>): UseMutationResult<EavRecord[], Error, CreateRecordInput[]>;
|
|
189
186
|
/**
|
|
190
187
|
* 최대 100개 레코드를 한 번에 업데이트하는 mutation.
|
|
191
188
|
*/
|
|
192
|
-
declare function useBulkUpdateRecords(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<EavRecord[], Error, BulkUpdateItem[]>):
|
|
189
|
+
declare function useBulkUpdateRecords(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<EavRecord[], Error, BulkUpdateItem[]>): UseMutationResult<EavRecord[], Error, BulkUpdateItem[]>;
|
|
193
190
|
/**
|
|
194
191
|
* 최대 100개 레코드를 한 번에 삭제하는 mutation. 삭제된 레코드 수를 반환.
|
|
195
192
|
*/
|
|
196
|
-
declare function useBulkDeleteRecords(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<number, Error, string[]>):
|
|
193
|
+
declare function useBulkDeleteRecords(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<number, Error, string[]>): UseMutationResult<number, Error, string[]>;
|
|
197
194
|
/**
|
|
198
195
|
* 필터에 매칭되는 모든 레코드를 삭제하는 mutation. 삭제된 수를 반환.
|
|
199
196
|
*/
|
|
200
|
-
declare function useDeleteRecordsWhere(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<number, Error, DeleteWhereInput>):
|
|
197
|
+
declare function useDeleteRecordsWhere(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<number, Error, DeleteWhereInput>): UseMutationResult<number, Error, DeleteWhereInput>;
|
|
201
198
|
/**
|
|
202
199
|
* BrandApp AI 크레딧 잔액 조회
|
|
203
200
|
*
|
|
@@ -207,7 +204,7 @@ declare function useDeleteRecordsWhere(sdk: ReoptSDK, entityId: string, options?
|
|
|
207
204
|
* // credits?.balance, credits?.limit, credits?.status
|
|
208
205
|
* ```
|
|
209
206
|
*/
|
|
210
|
-
declare function useAiCredits(sdk: ReoptSDK, options?: Omit<UseQueryOptions<CreditInfo>, "queryKey" | "queryFn">):
|
|
207
|
+
declare function useAiCredits(sdk: ReoptSDK, options?: Omit<UseQueryOptions<CreditInfo>, "queryKey" | "queryFn">): UseQueryResult<CreditInfo>;
|
|
211
208
|
/**
|
|
212
209
|
* BrandApp AI 사용 가능 모델 목록
|
|
213
210
|
*
|
|
@@ -217,7 +214,7 @@ declare function useAiCredits(sdk: ReoptSDK, options?: Omit<UseQueryOptions<Cred
|
|
|
217
214
|
* // models?.map(m => m.id)
|
|
218
215
|
* ```
|
|
219
216
|
*/
|
|
220
|
-
declare function useAiModels(sdk: ReoptSDK, options?: Omit<UseQueryOptions<ModelInfo[]>, "queryKey" | "queryFn">):
|
|
217
|
+
declare function useAiModels(sdk: ReoptSDK, options?: Omit<UseQueryOptions<ModelInfo[]>, "queryKey" | "queryFn">): UseQueryResult<ModelInfo[]>;
|
|
221
218
|
/**
|
|
222
219
|
* BrandApp에서 사용 가능한 커스텀 에이전트 목록
|
|
223
220
|
*
|
|
@@ -227,7 +224,7 @@ declare function useAiModels(sdk: ReoptSDK, options?: Omit<UseQueryOptions<Model
|
|
|
227
224
|
* // agents?.map(a => ({ id: a.id, name: a.name, defaultModel: a.defaultModel }))
|
|
228
225
|
* ```
|
|
229
226
|
*/
|
|
230
|
-
declare function useAiAgents(sdk: ReoptSDK, options?: Omit<UseQueryOptions<AgentInfo[]>, "queryKey" | "queryFn">):
|
|
227
|
+
declare function useAiAgents(sdk: ReoptSDK, options?: Omit<UseQueryOptions<AgentInfo[]>, "queryKey" | "queryFn">): UseQueryResult<AgentInfo[]>;
|
|
231
228
|
/**
|
|
232
229
|
* AI 텍스트 생성 (non-streaming) mutation
|
|
233
230
|
*
|
|
@@ -244,7 +241,7 @@ declare function useAiAgents(sdk: ReoptSDK, options?: Omit<UseQueryOptions<Agent
|
|
|
244
241
|
* // completion.data?.message.content
|
|
245
242
|
* ```
|
|
246
243
|
*/
|
|
247
|
-
declare function useAiCompletion(sdk: ReoptSDK, options?: UseMutationOptions<CompletionResult, ReoptSDKError, CompletionOptions>):
|
|
244
|
+
declare function useAiCompletion(sdk: ReoptSDK, options?: UseMutationOptions<CompletionResult, ReoptSDKError, CompletionOptions>): UseMutationResult<CompletionResult, ReoptSDKError, CompletionOptions>;
|
|
248
245
|
/**
|
|
249
246
|
* AI 이미지 생성 mutation
|
|
250
247
|
*
|
|
@@ -262,7 +259,7 @@ declare function useAiCompletion(sdk: ReoptSDK, options?: UseMutationOptions<Com
|
|
|
262
259
|
* // imageGen.data?.url
|
|
263
260
|
* ```
|
|
264
261
|
*/
|
|
265
|
-
declare function useAiImageGenerate(sdk: ReoptSDK, options?: UseMutationOptions<ImageGenerateResult, ReoptSDKError, ImageGenerateOptions>):
|
|
262
|
+
declare function useAiImageGenerate(sdk: ReoptSDK, options?: UseMutationOptions<ImageGenerateResult, ReoptSDKError, ImageGenerateOptions>): UseMutationResult<ImageGenerateResult, ReoptSDKError, ImageGenerateOptions>;
|
|
266
263
|
/**
|
|
267
264
|
* Post 목록 조회
|
|
268
265
|
*
|
|
@@ -272,7 +269,7 @@ declare function useAiImageGenerate(sdk: ReoptSDK, options?: UseMutationOptions<
|
|
|
272
269
|
* // data?.records (Post[]), data?.total
|
|
273
270
|
* ```
|
|
274
271
|
*/
|
|
275
|
-
declare function usePostList(sdk: ReoptSDK, query?: ListPostsQuery, options?: Omit<UseQueryOptions<CmsPaginatedResponse<Post>>, "queryKey" | "queryFn">):
|
|
272
|
+
declare function usePostList(sdk: ReoptSDK, query?: ListPostsQuery, options?: Omit<UseQueryOptions<CmsPaginatedResponse<Post>>, "queryKey" | "queryFn">): UseQueryResult<CmsPaginatedResponse<Post>>;
|
|
276
273
|
/**
|
|
277
274
|
* 단일 Post 조회 (with document content)
|
|
278
275
|
*
|
|
@@ -282,7 +279,7 @@ declare function usePostList(sdk: ReoptSDK, query?: ListPostsQuery, options?: Om
|
|
|
282
279
|
* // post?.title, post?.document.contentRich
|
|
283
280
|
* ```
|
|
284
281
|
*/
|
|
285
|
-
declare function usePost(sdk: ReoptSDK, postId: string, options?: Omit<UseQueryOptions<PostDetail>, "queryKey" | "queryFn">):
|
|
282
|
+
declare function usePost(sdk: ReoptSDK, postId: string, options?: Omit<UseQueryOptions<PostDetail>, "queryKey" | "queryFn">): UseQueryResult<PostDetail>;
|
|
286
283
|
/**
|
|
287
284
|
* PostGroup 목록 조회
|
|
288
285
|
*
|
|
@@ -292,7 +289,7 @@ declare function usePost(sdk: ReoptSDK, postId: string, options?: Omit<UseQueryO
|
|
|
292
289
|
* // data?.records (PostGroup[]), data?.total
|
|
293
290
|
* ```
|
|
294
291
|
*/
|
|
295
|
-
declare function usePostGroupList(sdk: ReoptSDK, query?: ListPostGroupsQuery, options?: Omit<UseQueryOptions<CmsPaginatedResponse<PostGroup>>, "queryKey" | "queryFn">):
|
|
292
|
+
declare function usePostGroupList(sdk: ReoptSDK, query?: ListPostGroupsQuery, options?: Omit<UseQueryOptions<CmsPaginatedResponse<PostGroup>>, "queryKey" | "queryFn">): UseQueryResult<CmsPaginatedResponse<PostGroup>>;
|
|
296
293
|
/**
|
|
297
294
|
* 단일 PostGroup 조회
|
|
298
295
|
*
|
|
@@ -302,7 +299,7 @@ declare function usePostGroupList(sdk: ReoptSDK, query?: ListPostGroupsQuery, op
|
|
|
302
299
|
* // group?.name, group?.postCount
|
|
303
300
|
* ```
|
|
304
301
|
*/
|
|
305
|
-
declare function usePostGroup(sdk: ReoptSDK, groupId: string, options?: Omit<UseQueryOptions<PostGroup>, "queryKey" | "queryFn">):
|
|
302
|
+
declare function usePostGroup(sdk: ReoptSDK, groupId: string, options?: Omit<UseQueryOptions<PostGroup>, "queryKey" | "queryFn">): UseQueryResult<PostGroup>;
|
|
306
303
|
/**
|
|
307
304
|
* Slug 기반 단일 Post 조회. 외부 사이트의 `/blog/[slug]` 같은 라우트에서
|
|
308
305
|
* id 매핑 없이 사용. (서버 컴포넌트에서는 `sdk.cms.posts.getBySlug`를
|
|
@@ -314,8 +311,8 @@ declare function usePostGroup(sdk: ReoptSDK, groupId: string, options?: Omit<Use
|
|
|
314
311
|
* ```
|
|
315
312
|
*/
|
|
316
313
|
declare function usePostBySlug(sdk: ReoptSDK, slug: string, opts?: {
|
|
317
|
-
|
|
318
|
-
}, options?: Omit<UseQueryOptions<PostDetail>, "queryKey" | "queryFn">):
|
|
314
|
+
groupId?: string;
|
|
315
|
+
}, options?: Omit<UseQueryOptions<PostDetail>, "queryKey" | "queryFn">): UseQueryResult<PostDetail>;
|
|
319
316
|
/**
|
|
320
317
|
* Brand 범위에서 사용된 포스트 태그 목록.
|
|
321
318
|
*
|
|
@@ -325,7 +322,7 @@ declare function usePostBySlug(sdk: ReoptSDK, slug: string, opts?: {
|
|
|
325
322
|
* // tags?.[0]: { id, text, postCount }
|
|
326
323
|
* ```
|
|
327
324
|
*/
|
|
328
|
-
declare function useCmsTags(sdk: ReoptSDK, query?: ListTagsQuery, options?: Omit<UseQueryOptions<Tag[]>, "queryKey" | "queryFn">):
|
|
325
|
+
declare function useCmsTags(sdk: ReoptSDK, query?: ListTagsQuery, options?: Omit<UseQueryOptions<Tag[]>, "queryKey" | "queryFn">): UseQueryResult<Tag[]>;
|
|
329
326
|
/**
|
|
330
327
|
* 파일 목록 조회
|
|
331
328
|
*
|
|
@@ -335,7 +332,7 @@ declare function useCmsTags(sdk: ReoptSDK, query?: ListTagsQuery, options?: Omit
|
|
|
335
332
|
* // data?.data (FileInfo[]), data?.meta
|
|
336
333
|
* ```
|
|
337
334
|
*/
|
|
338
|
-
declare function useFiles(sdk: ReoptSDK, query?: FileListQuery, options?: Omit<UseQueryOptions<FileListResponse>, "queryKey" | "queryFn">):
|
|
335
|
+
declare function useFiles(sdk: ReoptSDK, query?: FileListQuery, options?: Omit<UseQueryOptions<FileListResponse>, "queryKey" | "queryFn">): UseQueryResult<FileListResponse>;
|
|
339
336
|
/**
|
|
340
337
|
* 단일 파일 조회
|
|
341
338
|
*
|
|
@@ -345,7 +342,7 @@ declare function useFiles(sdk: ReoptSDK, query?: FileListQuery, options?: Omit<U
|
|
|
345
342
|
* // file?.name, file?.url
|
|
346
343
|
* ```
|
|
347
344
|
*/
|
|
348
|
-
declare function useFile(sdk: ReoptSDK, fileId: string, options?: Omit<UseQueryOptions<FileInfo>, "queryKey" | "queryFn">):
|
|
345
|
+
declare function useFile(sdk: ReoptSDK, fileId: string, options?: Omit<UseQueryOptions<FileInfo>, "queryKey" | "queryFn">): UseQueryResult<FileInfo>;
|
|
349
346
|
/**
|
|
350
347
|
* 파일 삭제 mutation
|
|
351
348
|
*
|
|
@@ -355,7 +352,7 @@ declare function useFile(sdk: ReoptSDK, fileId: string, options?: Omit<UseQueryO
|
|
|
355
352
|
* await deleteFile.mutateAsync("file-uuid");
|
|
356
353
|
* ```
|
|
357
354
|
*/
|
|
358
|
-
declare function useDeleteFile(sdk: ReoptSDK, options?: UseMutationOptions<void, Error, string>):
|
|
355
|
+
declare function useDeleteFile(sdk: ReoptSDK, options?: UseMutationOptions<void, Error, string>): UseMutationResult<void, Error, string>;
|
|
359
356
|
/**
|
|
360
357
|
* 파일 업로드 mutation
|
|
361
358
|
*
|
|
@@ -370,11 +367,12 @@ declare function useDeleteFile(sdk: ReoptSDK, options?: UseMutationOptions<void,
|
|
|
370
367
|
* ```
|
|
371
368
|
*/
|
|
372
369
|
declare function useUploadFile(sdk: ReoptSDK, options?: UseMutationOptions<FileInfo, Error, {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
}>):
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
}
|
|
379
|
-
|
|
370
|
+
file: Blob | Uint8Array | File;
|
|
371
|
+
options?: UploadOptions;
|
|
372
|
+
}>): UseMutationResult<FileInfo, Error, {
|
|
373
|
+
file: Blob | Uint8Array | File;
|
|
374
|
+
options?: UploadOptions;
|
|
375
|
+
}>;
|
|
376
|
+
//#endregion
|
|
380
377
|
export { type UseAiStreamOptions, type UseAiStreamReturn, keys as reoptQueryKeys, useAiAgents, useAiCompletion, useAiCredits, useAiImageGenerate, useAiModels, useAiStream, useBulkCreateRecords, useBulkDeleteRecords, useBulkUpdateRecords, useCmsTags, useCreateRecord, useDeleteFile, useDeleteRecord, useDeleteRecordsWhere, useEavEntities, useEavEntity, useEavRecord, useEavRecordCount, useEavRecords, useEavRecordsInfinite, useFile, useFiles, usePost, usePostBySlug, usePostGroup, usePostGroupList, usePostList, useUpdateRecord, useUploadFile, useUpsertRecord };
|
|
378
|
+
//# sourceMappingURL=hooks.d.ts.map
|