@reopt-ai/brandapp-sdk 3.1.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 +147 -0
- package/README.md +39 -14
- package/dist/abort--nOBFN4M.js +50 -0
- package/dist/ai/index.d.ts +2 -314
- package/dist/ai/index.js +3 -7
- package/dist/ai-provider/index.d.ts +79 -163
- package/dist/ai-provider/index.js +752 -671
- package/dist/auth/index.d.ts +27 -27
- package/dist/auth/index.js +41 -33
- 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 -133
- 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 +105 -84
- package/dist/config-CRytOPPl.d.ts +394 -0
- package/dist/config-Cw0a3-C8.js +487 -0
- package/dist/dev/index.d.ts +2 -509
- package/dist/dev/index.js +2740 -2873
- 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 -125
- 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-DIAS8Rsl.d.ts → errors-CRCcErNC.d.ts} +55 -53
- package/dist/feedback/index.d.ts +2 -132
- package/dist/feedback/index.js +3 -5
- package/dist/files/index.d.ts +14 -14
- package/dist/files/index.js +41 -24
- 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 -221
- package/dist/index.js +119 -70
- package/dist/logout/index.d.ts +109 -0
- package/dist/logout/index.js +264 -0
- package/dist/plans/index.d.ts +2 -236
- package/dist/plans/index.js +3 -5
- package/dist/push/index.d.ts +2 -79
- package/dist/push/index.js +3 -5
- package/dist/query-BvbCiGWb.js +35 -0
- package/dist/react/hooks.d.ts +97 -95
- package/dist/react/hooks.js +742 -356
- package/dist/sse-parser-FMjxM7sY.js +86 -0
- package/dist/terms/index.d.ts +3 -79
- package/dist/terms/index.js +3 -5
- 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 -47
- package/dist/webhooks/index.js +150 -127
- package/docs/api-reference.md +179 -2
- package/docs/dev-server.md +19 -18
- package/docs/errors.md +72 -15
- package/docs/logout.md +166 -0
- package/package.json +10 -5
- package/dist/chunk-2Q654O63.js +0 -350
- package/dist/chunk-F7BXBTZI.js +0 -54
- package/dist/chunk-IJOXTBIE.js +0 -599
- package/dist/chunk-JWXUVQRC.js +0 -157
- package/dist/chunk-L4DHB36G.js +0 -75
- package/dist/chunk-MRQY45U5.js +0 -465
- package/dist/chunk-N5JVE4WX.js +0 -449
- package/dist/chunk-O3PUWIDJ.js +0 -105
- package/dist/chunk-POLKEOYH.js +0 -63
- package/dist/chunk-R5CCGDUH.js +0 -49
- package/dist/chunk-RBHP7IZF.js +0 -96
- package/dist/chunk-REIKXSMY.js +0 -7
- package/dist/chunk-T7YTITRJ.js +0 -112
- package/dist/chunk-V73GORO3.js +0 -81
- package/dist/chunk-VRNBYSWU.js +0 -32
- 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,64 +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
|
-
|
|
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]>;
|
|
60
58
|
};
|
|
61
|
-
|
|
62
59
|
/**
|
|
63
60
|
* List every EAV entity defined for the current brandapp, including their
|
|
64
61
|
* attribute metadata. Cached for 5 minutes since the schema rarely changes
|
|
@@ -78,8 +75,12 @@ declare const keys: {
|
|
|
78
75
|
* }
|
|
79
76
|
* ```
|
|
80
77
|
*/
|
|
81
|
-
declare function useEavEntities(sdk: ReoptSDK, options?: Omit<UseQueryOptions<EavEntity[]>, "queryKey" | "queryFn">):
|
|
82
|
-
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
|
+
}>;
|
|
83
84
|
/**
|
|
84
85
|
* List records for an entity with optional filters and pagination.
|
|
85
86
|
*
|
|
@@ -102,10 +103,10 @@ declare function useEavEntity(sdk: ReoptSDK, entityId: string, options?: Omit<Us
|
|
|
102
103
|
* }
|
|
103
104
|
* ```
|
|
104
105
|
*/
|
|
105
|
-
declare function useEavRecords(sdk: ReoptSDK, entityId: string, query?: ListRecordsQuery, options?: Omit<UseQueryOptions<PaginatedResponse<EavRecord>>, "queryKey" | "queryFn">):
|
|
106
|
-
declare function useEavRecordsInfinite(sdk: ReoptSDK, entityId: string, query?: Omit<ListRecordsQuery, "page">, options?: Omit<UseInfiniteQueryOptions<PaginatedResponse<EavRecord>>, "queryKey" | "queryFn" | "getNextPageParam" | "initialPageParam">):
|
|
107
|
-
declare function useEavRecord(sdk: ReoptSDK, entityId: string, recordId: string, options?: Omit<UseQueryOptions
|
|
108
|
-
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>;
|
|
109
110
|
/**
|
|
110
111
|
* Create a single record. Automatically invalidates the records list and
|
|
111
112
|
* count caches for this entity on success.
|
|
@@ -138,14 +139,14 @@ declare function useEavRecordCount(sdk: ReoptSDK, entityId: string, query?: Pick
|
|
|
138
139
|
* }
|
|
139
140
|
* ```
|
|
140
141
|
*/
|
|
141
|
-
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>;
|
|
142
143
|
declare function useUpdateRecord(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<EavRecord, Error, {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}>):
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
144
|
+
recordId: string;
|
|
145
|
+
input: UpdateRecordInput;
|
|
146
|
+
}>): UseMutationResult<EavRecord, Error, {
|
|
147
|
+
recordId: string;
|
|
148
|
+
input: UpdateRecordInput;
|
|
149
|
+
}>;
|
|
149
150
|
/**
|
|
150
151
|
* Delete a record by id. Pass the recordId directly to `mutateAsync`.
|
|
151
152
|
*
|
|
@@ -155,7 +156,7 @@ declare function useUpdateRecord(sdk: ReoptSDK, entityId: string, options?: UseM
|
|
|
155
156
|
* <button onClick={() => remove.mutate(record.id)}>Delete</button>
|
|
156
157
|
* ```
|
|
157
158
|
*/
|
|
158
|
-
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>;
|
|
159
160
|
/**
|
|
160
161
|
* 레코드 upsert mutation. 필터에 매칭되는 레코드가 있으면 업데이트, 없으면 생성.
|
|
161
162
|
*
|
|
@@ -168,7 +169,7 @@ declare function useDeleteRecord(sdk: ReoptSDK, entityId: string, options?: UseM
|
|
|
168
169
|
* });
|
|
169
170
|
* ```
|
|
170
171
|
*/
|
|
171
|
-
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>;
|
|
172
173
|
/**
|
|
173
174
|
* 최대 100개 레코드를 한 번에 생성하는 mutation.
|
|
174
175
|
*
|
|
@@ -181,19 +182,19 @@ declare function useUpsertRecord(sdk: ReoptSDK, entityId: string, options?: UseM
|
|
|
181
182
|
* ]);
|
|
182
183
|
* ```
|
|
183
184
|
*/
|
|
184
|
-
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[]>;
|
|
185
186
|
/**
|
|
186
187
|
* 최대 100개 레코드를 한 번에 업데이트하는 mutation.
|
|
187
188
|
*/
|
|
188
|
-
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[]>;
|
|
189
190
|
/**
|
|
190
191
|
* 최대 100개 레코드를 한 번에 삭제하는 mutation. 삭제된 레코드 수를 반환.
|
|
191
192
|
*/
|
|
192
|
-
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[]>;
|
|
193
194
|
/**
|
|
194
195
|
* 필터에 매칭되는 모든 레코드를 삭제하는 mutation. 삭제된 수를 반환.
|
|
195
196
|
*/
|
|
196
|
-
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>;
|
|
197
198
|
/**
|
|
198
199
|
* BrandApp AI 크레딧 잔액 조회
|
|
199
200
|
*
|
|
@@ -203,7 +204,7 @@ declare function useDeleteRecordsWhere(sdk: ReoptSDK, entityId: string, options?
|
|
|
203
204
|
* // credits?.balance, credits?.limit, credits?.status
|
|
204
205
|
* ```
|
|
205
206
|
*/
|
|
206
|
-
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>;
|
|
207
208
|
/**
|
|
208
209
|
* BrandApp AI 사용 가능 모델 목록
|
|
209
210
|
*
|
|
@@ -213,7 +214,7 @@ declare function useAiCredits(sdk: ReoptSDK, options?: Omit<UseQueryOptions<Cred
|
|
|
213
214
|
* // models?.map(m => m.id)
|
|
214
215
|
* ```
|
|
215
216
|
*/
|
|
216
|
-
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[]>;
|
|
217
218
|
/**
|
|
218
219
|
* BrandApp에서 사용 가능한 커스텀 에이전트 목록
|
|
219
220
|
*
|
|
@@ -223,7 +224,7 @@ declare function useAiModels(sdk: ReoptSDK, options?: Omit<UseQueryOptions<Model
|
|
|
223
224
|
* // agents?.map(a => ({ id: a.id, name: a.name, defaultModel: a.defaultModel }))
|
|
224
225
|
* ```
|
|
225
226
|
*/
|
|
226
|
-
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[]>;
|
|
227
228
|
/**
|
|
228
229
|
* AI 텍스트 생성 (non-streaming) mutation
|
|
229
230
|
*
|
|
@@ -240,7 +241,7 @@ declare function useAiAgents(sdk: ReoptSDK, options?: Omit<UseQueryOptions<Agent
|
|
|
240
241
|
* // completion.data?.message.content
|
|
241
242
|
* ```
|
|
242
243
|
*/
|
|
243
|
-
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>;
|
|
244
245
|
/**
|
|
245
246
|
* AI 이미지 생성 mutation
|
|
246
247
|
*
|
|
@@ -258,7 +259,7 @@ declare function useAiCompletion(sdk: ReoptSDK, options?: UseMutationOptions<Com
|
|
|
258
259
|
* // imageGen.data?.url
|
|
259
260
|
* ```
|
|
260
261
|
*/
|
|
261
|
-
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>;
|
|
262
263
|
/**
|
|
263
264
|
* Post 목록 조회
|
|
264
265
|
*
|
|
@@ -268,7 +269,7 @@ declare function useAiImageGenerate(sdk: ReoptSDK, options?: UseMutationOptions<
|
|
|
268
269
|
* // data?.records (Post[]), data?.total
|
|
269
270
|
* ```
|
|
270
271
|
*/
|
|
271
|
-
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>>;
|
|
272
273
|
/**
|
|
273
274
|
* 단일 Post 조회 (with document content)
|
|
274
275
|
*
|
|
@@ -278,7 +279,7 @@ declare function usePostList(sdk: ReoptSDK, query?: ListPostsQuery, options?: Om
|
|
|
278
279
|
* // post?.title, post?.document.contentRich
|
|
279
280
|
* ```
|
|
280
281
|
*/
|
|
281
|
-
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>;
|
|
282
283
|
/**
|
|
283
284
|
* PostGroup 목록 조회
|
|
284
285
|
*
|
|
@@ -288,7 +289,7 @@ declare function usePost(sdk: ReoptSDK, postId: string, options?: Omit<UseQueryO
|
|
|
288
289
|
* // data?.records (PostGroup[]), data?.total
|
|
289
290
|
* ```
|
|
290
291
|
*/
|
|
291
|
-
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>>;
|
|
292
293
|
/**
|
|
293
294
|
* 단일 PostGroup 조회
|
|
294
295
|
*
|
|
@@ -298,7 +299,7 @@ declare function usePostGroupList(sdk: ReoptSDK, query?: ListPostGroupsQuery, op
|
|
|
298
299
|
* // group?.name, group?.postCount
|
|
299
300
|
* ```
|
|
300
301
|
*/
|
|
301
|
-
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>;
|
|
302
303
|
/**
|
|
303
304
|
* Slug 기반 단일 Post 조회. 외부 사이트의 `/blog/[slug]` 같은 라우트에서
|
|
304
305
|
* id 매핑 없이 사용. (서버 컴포넌트에서는 `sdk.cms.posts.getBySlug`를
|
|
@@ -310,8 +311,8 @@ declare function usePostGroup(sdk: ReoptSDK, groupId: string, options?: Omit<Use
|
|
|
310
311
|
* ```
|
|
311
312
|
*/
|
|
312
313
|
declare function usePostBySlug(sdk: ReoptSDK, slug: string, opts?: {
|
|
313
|
-
|
|
314
|
-
}, options?: Omit<UseQueryOptions<PostDetail>, "queryKey" | "queryFn">):
|
|
314
|
+
groupId?: string;
|
|
315
|
+
}, options?: Omit<UseQueryOptions<PostDetail>, "queryKey" | "queryFn">): UseQueryResult<PostDetail>;
|
|
315
316
|
/**
|
|
316
317
|
* Brand 범위에서 사용된 포스트 태그 목록.
|
|
317
318
|
*
|
|
@@ -321,7 +322,7 @@ declare function usePostBySlug(sdk: ReoptSDK, slug: string, opts?: {
|
|
|
321
322
|
* // tags?.[0]: { id, text, postCount }
|
|
322
323
|
* ```
|
|
323
324
|
*/
|
|
324
|
-
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[]>;
|
|
325
326
|
/**
|
|
326
327
|
* 파일 목록 조회
|
|
327
328
|
*
|
|
@@ -331,7 +332,7 @@ declare function useCmsTags(sdk: ReoptSDK, query?: ListTagsQuery, options?: Omit
|
|
|
331
332
|
* // data?.data (FileInfo[]), data?.meta
|
|
332
333
|
* ```
|
|
333
334
|
*/
|
|
334
|
-
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>;
|
|
335
336
|
/**
|
|
336
337
|
* 단일 파일 조회
|
|
337
338
|
*
|
|
@@ -341,7 +342,7 @@ declare function useFiles(sdk: ReoptSDK, query?: FileListQuery, options?: Omit<U
|
|
|
341
342
|
* // file?.name, file?.url
|
|
342
343
|
* ```
|
|
343
344
|
*/
|
|
344
|
-
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>;
|
|
345
346
|
/**
|
|
346
347
|
* 파일 삭제 mutation
|
|
347
348
|
*
|
|
@@ -351,7 +352,7 @@ declare function useFile(sdk: ReoptSDK, fileId: string, options?: Omit<UseQueryO
|
|
|
351
352
|
* await deleteFile.mutateAsync("file-uuid");
|
|
352
353
|
* ```
|
|
353
354
|
*/
|
|
354
|
-
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>;
|
|
355
356
|
/**
|
|
356
357
|
* 파일 업로드 mutation
|
|
357
358
|
*
|
|
@@ -366,11 +367,12 @@ declare function useDeleteFile(sdk: ReoptSDK, options?: UseMutationOptions<void,
|
|
|
366
367
|
* ```
|
|
367
368
|
*/
|
|
368
369
|
declare function useUploadFile(sdk: ReoptSDK, options?: UseMutationOptions<FileInfo, Error, {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
}>):
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
}
|
|
375
|
-
|
|
370
|
+
file: Blob | Uint8Array | File;
|
|
371
|
+
options?: UploadOptions;
|
|
372
|
+
}>): UseMutationResult<FileInfo, Error, {
|
|
373
|
+
file: Blob | Uint8Array | File;
|
|
374
|
+
options?: UploadOptions;
|
|
375
|
+
}>;
|
|
376
|
+
//#endregion
|
|
376
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
|