@reopt-ai/brandapp-sdk 3.3.0 → 3.5.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 +115 -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-61ldOHMz.js +503 -0
- package/dist/client-7PCoxVhZ.js +28 -0
- package/dist/client-B7rZQ8Zi.d.ts +272 -0
- package/dist/client-BGGd_cpV.d.ts +103 -0
- package/dist/client-BoIuyx4S.js +273 -0
- package/dist/client-BruP5_nU.d.ts +147 -0
- package/dist/client-BxtZt405.js +305 -0
- package/dist/client-ByN3EQdk.js +83 -0
- package/dist/client-CAghoGD_.js +53 -0
- package/dist/client-C_pHsPlj.js +81 -0
- package/dist/client-D0eBxh8j.d.ts +284 -0
- package/dist/client-D6gs61w8.d.ts +53 -0
- package/dist/client-DDw5yz_h.d.ts +53 -0
- package/dist/client-Dxg8_DIH.d.ts +71 -0
- package/dist/client-aMR4CRB8.d.ts +211 -0
- package/dist/client-lk6wBu_0.d.ts +48 -0
- package/dist/client-wEVKLdly.js +55 -0
- package/dist/client-zF1RG2uA.js +86 -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-aml9oQpX.js +487 -0
- package/dist/dev/index.d.ts +2 -528
- package/dist/dev/index.js +3047 -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-BZc2mngq.js +386 -0
- package/dist/index-1j_738qk.d.ts +470 -0
- package/dist/index-CeOLGdyL.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-xWqtfkvR.js +35 -0
- package/dist/react/hooks.d.ts +157 -100
- package/dist/react/hooks.js +862 -406
- 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 +121 -8
- package/docs/errors.md +19 -0
- package/docs/files.md +165 -7
- package/package.json +7 -6
- 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,65 @@
|
|
|
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 FileListQuery, c as FolderInfo, d as UpdateFolderInput, f as UploadOptions, i as FileInfo, l as FolderListQuery, o as FileListResponse, r as CreateFolderInput, s as FileUsageInfo, u as UpdateFileInput } from "../client-B7rZQ8Zi.js";
|
|
6
|
+
import { t as ReoptSDK } from "../index-CeOLGdyL.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
|
+
filesPrefix: (brandappId?: string) => ReoptQueryKey<["files", string | undefined]>;
|
|
58
|
+
file: (fileId: string) => ReoptQueryKey<["file", string]>;
|
|
59
|
+
folders: (brandappId?: string, query?: FolderListQuery) => ReoptQueryKey<["folders", string | undefined, FolderListQuery | undefined]>;
|
|
60
|
+
foldersPrefix: (brandappId?: string) => ReoptQueryKey<["folders", string | undefined]>;
|
|
61
|
+
fileUsage: (brandappId?: string) => ReoptQueryKey<["fileUsage", string | undefined]>;
|
|
64
62
|
};
|
|
65
|
-
|
|
66
63
|
/**
|
|
67
64
|
* List every EAV entity defined for the current brandapp, including their
|
|
68
65
|
* attribute metadata. Cached for 5 minutes since the schema rarely changes
|
|
@@ -82,8 +79,12 @@ declare const keys: {
|
|
|
82
79
|
* }
|
|
83
80
|
* ```
|
|
84
81
|
*/
|
|
85
|
-
declare function useEavEntities(sdk: ReoptSDK, options?: Omit<UseQueryOptions<EavEntity[]>, "queryKey" | "queryFn">):
|
|
86
|
-
declare function useEavEntity(sdk: ReoptSDK, entityId: string, options?: Omit<UseQueryOptions
|
|
82
|
+
declare function useEavEntities(sdk: ReoptSDK, options?: Omit<UseQueryOptions<EavEntity[]>, "queryKey" | "queryFn">): UseQueryResult<EavEntity[]>;
|
|
83
|
+
declare function useEavEntity(sdk: ReoptSDK, entityId: string, options?: Omit<UseQueryOptions<EavEntity & {
|
|
84
|
+
attributes: EavAttribute[];
|
|
85
|
+
}>, "queryKey" | "queryFn">): UseQueryResult<EavEntity & {
|
|
86
|
+
attributes: EavAttribute[];
|
|
87
|
+
}>;
|
|
87
88
|
/**
|
|
88
89
|
* List records for an entity with optional filters and pagination.
|
|
89
90
|
*
|
|
@@ -106,10 +107,10 @@ declare function useEavEntity(sdk: ReoptSDK, entityId: string, options?: Omit<Us
|
|
|
106
107
|
* }
|
|
107
108
|
* ```
|
|
108
109
|
*/
|
|
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">):
|
|
110
|
+
declare function useEavRecords(sdk: ReoptSDK, entityId: string, query?: ListRecordsQuery, options?: Omit<UseQueryOptions<PaginatedResponse<EavRecord>>, "queryKey" | "queryFn">): UseQueryResult<PaginatedResponse<EavRecord>>;
|
|
111
|
+
declare function useEavRecordsInfinite(sdk: ReoptSDK, entityId: string, query?: Omit<ListRecordsQuery, "page">, options?: Omit<UseInfiniteQueryOptions<PaginatedResponse<EavRecord>>, "queryKey" | "queryFn" | "getNextPageParam" | "initialPageParam">): UseInfiniteQueryResult<PaginatedResponse<EavRecord>>;
|
|
112
|
+
declare function useEavRecord(sdk: ReoptSDK, entityId: string, recordId: string, options?: Omit<UseQueryOptions<EavRecord>, "queryKey" | "queryFn">): UseQueryResult<EavRecord>;
|
|
113
|
+
declare function useEavRecordCount(sdk: ReoptSDK, entityId: string, query?: Pick<ListRecordsQuery, "filters" | "authUserId">, options?: Omit<UseQueryOptions<number>, "queryKey" | "queryFn">): UseQueryResult<number>;
|
|
113
114
|
/**
|
|
114
115
|
* Create a single record. Automatically invalidates the records list and
|
|
115
116
|
* count caches for this entity on success.
|
|
@@ -142,14 +143,14 @@ declare function useEavRecordCount(sdk: ReoptSDK, entityId: string, query?: Pick
|
|
|
142
143
|
* }
|
|
143
144
|
* ```
|
|
144
145
|
*/
|
|
145
|
-
declare function useCreateRecord(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<EavRecord, Error, CreateRecordInput>):
|
|
146
|
+
declare function useCreateRecord(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<EavRecord, Error, CreateRecordInput>): UseMutationResult<EavRecord, Error, CreateRecordInput>;
|
|
146
147
|
declare function useUpdateRecord(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<EavRecord, Error, {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}>):
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
148
|
+
recordId: string;
|
|
149
|
+
input: UpdateRecordInput;
|
|
150
|
+
}>): UseMutationResult<EavRecord, Error, {
|
|
151
|
+
recordId: string;
|
|
152
|
+
input: UpdateRecordInput;
|
|
153
|
+
}>;
|
|
153
154
|
/**
|
|
154
155
|
* Delete a record by id. Pass the recordId directly to `mutateAsync`.
|
|
155
156
|
*
|
|
@@ -159,7 +160,7 @@ declare function useUpdateRecord(sdk: ReoptSDK, entityId: string, options?: UseM
|
|
|
159
160
|
* <button onClick={() => remove.mutate(record.id)}>Delete</button>
|
|
160
161
|
* ```
|
|
161
162
|
*/
|
|
162
|
-
declare function useDeleteRecord(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<void, Error, string>):
|
|
163
|
+
declare function useDeleteRecord(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<void, Error, string>): UseMutationResult<void, Error, string>;
|
|
163
164
|
/**
|
|
164
165
|
* 레코드 upsert mutation. 필터에 매칭되는 레코드가 있으면 업데이트, 없으면 생성.
|
|
165
166
|
*
|
|
@@ -172,7 +173,7 @@ declare function useDeleteRecord(sdk: ReoptSDK, entityId: string, options?: UseM
|
|
|
172
173
|
* });
|
|
173
174
|
* ```
|
|
174
175
|
*/
|
|
175
|
-
declare function useUpsertRecord(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<UpsertRecordResult<EavRecord>, Error, UpsertRecordInput>):
|
|
176
|
+
declare function useUpsertRecord(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<UpsertRecordResult<EavRecord>, Error, UpsertRecordInput>): UseMutationResult<UpsertRecordResult<EavRecord>, Error, UpsertRecordInput>;
|
|
176
177
|
/**
|
|
177
178
|
* 최대 100개 레코드를 한 번에 생성하는 mutation.
|
|
178
179
|
*
|
|
@@ -185,19 +186,19 @@ declare function useUpsertRecord(sdk: ReoptSDK, entityId: string, options?: UseM
|
|
|
185
186
|
* ]);
|
|
186
187
|
* ```
|
|
187
188
|
*/
|
|
188
|
-
declare function useBulkCreateRecords(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<EavRecord[], Error, CreateRecordInput[]>):
|
|
189
|
+
declare function useBulkCreateRecords(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<EavRecord[], Error, CreateRecordInput[]>): UseMutationResult<EavRecord[], Error, CreateRecordInput[]>;
|
|
189
190
|
/**
|
|
190
191
|
* 최대 100개 레코드를 한 번에 업데이트하는 mutation.
|
|
191
192
|
*/
|
|
192
|
-
declare function useBulkUpdateRecords(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<EavRecord[], Error, BulkUpdateItem[]>):
|
|
193
|
+
declare function useBulkUpdateRecords(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<EavRecord[], Error, BulkUpdateItem[]>): UseMutationResult<EavRecord[], Error, BulkUpdateItem[]>;
|
|
193
194
|
/**
|
|
194
195
|
* 최대 100개 레코드를 한 번에 삭제하는 mutation. 삭제된 레코드 수를 반환.
|
|
195
196
|
*/
|
|
196
|
-
declare function useBulkDeleteRecords(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<number, Error, string[]>):
|
|
197
|
+
declare function useBulkDeleteRecords(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<number, Error, string[]>): UseMutationResult<number, Error, string[]>;
|
|
197
198
|
/**
|
|
198
199
|
* 필터에 매칭되는 모든 레코드를 삭제하는 mutation. 삭제된 수를 반환.
|
|
199
200
|
*/
|
|
200
|
-
declare function useDeleteRecordsWhere(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<number, Error, DeleteWhereInput>):
|
|
201
|
+
declare function useDeleteRecordsWhere(sdk: ReoptSDK, entityId: string, options?: UseMutationOptions<number, Error, DeleteWhereInput>): UseMutationResult<number, Error, DeleteWhereInput>;
|
|
201
202
|
/**
|
|
202
203
|
* BrandApp AI 크레딧 잔액 조회
|
|
203
204
|
*
|
|
@@ -207,7 +208,7 @@ declare function useDeleteRecordsWhere(sdk: ReoptSDK, entityId: string, options?
|
|
|
207
208
|
* // credits?.balance, credits?.limit, credits?.status
|
|
208
209
|
* ```
|
|
209
210
|
*/
|
|
210
|
-
declare function useAiCredits(sdk: ReoptSDK, options?: Omit<UseQueryOptions<CreditInfo>, "queryKey" | "queryFn">):
|
|
211
|
+
declare function useAiCredits(sdk: ReoptSDK, options?: Omit<UseQueryOptions<CreditInfo>, "queryKey" | "queryFn">): UseQueryResult<CreditInfo>;
|
|
211
212
|
/**
|
|
212
213
|
* BrandApp AI 사용 가능 모델 목록
|
|
213
214
|
*
|
|
@@ -217,7 +218,7 @@ declare function useAiCredits(sdk: ReoptSDK, options?: Omit<UseQueryOptions<Cred
|
|
|
217
218
|
* // models?.map(m => m.id)
|
|
218
219
|
* ```
|
|
219
220
|
*/
|
|
220
|
-
declare function useAiModels(sdk: ReoptSDK, options?: Omit<UseQueryOptions<ModelInfo[]>, "queryKey" | "queryFn">):
|
|
221
|
+
declare function useAiModels(sdk: ReoptSDK, options?: Omit<UseQueryOptions<ModelInfo[]>, "queryKey" | "queryFn">): UseQueryResult<ModelInfo[]>;
|
|
221
222
|
/**
|
|
222
223
|
* BrandApp에서 사용 가능한 커스텀 에이전트 목록
|
|
223
224
|
*
|
|
@@ -227,7 +228,7 @@ declare function useAiModels(sdk: ReoptSDK, options?: Omit<UseQueryOptions<Model
|
|
|
227
228
|
* // agents?.map(a => ({ id: a.id, name: a.name, defaultModel: a.defaultModel }))
|
|
228
229
|
* ```
|
|
229
230
|
*/
|
|
230
|
-
declare function useAiAgents(sdk: ReoptSDK, options?: Omit<UseQueryOptions<AgentInfo[]>, "queryKey" | "queryFn">):
|
|
231
|
+
declare function useAiAgents(sdk: ReoptSDK, options?: Omit<UseQueryOptions<AgentInfo[]>, "queryKey" | "queryFn">): UseQueryResult<AgentInfo[]>;
|
|
231
232
|
/**
|
|
232
233
|
* AI 텍스트 생성 (non-streaming) mutation
|
|
233
234
|
*
|
|
@@ -244,7 +245,7 @@ declare function useAiAgents(sdk: ReoptSDK, options?: Omit<UseQueryOptions<Agent
|
|
|
244
245
|
* // completion.data?.message.content
|
|
245
246
|
* ```
|
|
246
247
|
*/
|
|
247
|
-
declare function useAiCompletion(sdk: ReoptSDK, options?: UseMutationOptions<CompletionResult, ReoptSDKError, CompletionOptions>):
|
|
248
|
+
declare function useAiCompletion(sdk: ReoptSDK, options?: UseMutationOptions<CompletionResult, ReoptSDKError, CompletionOptions>): UseMutationResult<CompletionResult, ReoptSDKError, CompletionOptions>;
|
|
248
249
|
/**
|
|
249
250
|
* AI 이미지 생성 mutation
|
|
250
251
|
*
|
|
@@ -262,7 +263,7 @@ declare function useAiCompletion(sdk: ReoptSDK, options?: UseMutationOptions<Com
|
|
|
262
263
|
* // imageGen.data?.url
|
|
263
264
|
* ```
|
|
264
265
|
*/
|
|
265
|
-
declare function useAiImageGenerate(sdk: ReoptSDK, options?: UseMutationOptions<ImageGenerateResult, ReoptSDKError, ImageGenerateOptions>):
|
|
266
|
+
declare function useAiImageGenerate(sdk: ReoptSDK, options?: UseMutationOptions<ImageGenerateResult, ReoptSDKError, ImageGenerateOptions>): UseMutationResult<ImageGenerateResult, ReoptSDKError, ImageGenerateOptions>;
|
|
266
267
|
/**
|
|
267
268
|
* Post 목록 조회
|
|
268
269
|
*
|
|
@@ -272,7 +273,7 @@ declare function useAiImageGenerate(sdk: ReoptSDK, options?: UseMutationOptions<
|
|
|
272
273
|
* // data?.records (Post[]), data?.total
|
|
273
274
|
* ```
|
|
274
275
|
*/
|
|
275
|
-
declare function usePostList(sdk: ReoptSDK, query?: ListPostsQuery, options?: Omit<UseQueryOptions<CmsPaginatedResponse<Post>>, "queryKey" | "queryFn">):
|
|
276
|
+
declare function usePostList(sdk: ReoptSDK, query?: ListPostsQuery, options?: Omit<UseQueryOptions<CmsPaginatedResponse<Post>>, "queryKey" | "queryFn">): UseQueryResult<CmsPaginatedResponse<Post>>;
|
|
276
277
|
/**
|
|
277
278
|
* 단일 Post 조회 (with document content)
|
|
278
279
|
*
|
|
@@ -282,7 +283,7 @@ declare function usePostList(sdk: ReoptSDK, query?: ListPostsQuery, options?: Om
|
|
|
282
283
|
* // post?.title, post?.document.contentRich
|
|
283
284
|
* ```
|
|
284
285
|
*/
|
|
285
|
-
declare function usePost(sdk: ReoptSDK, postId: string, options?: Omit<UseQueryOptions<PostDetail>, "queryKey" | "queryFn">):
|
|
286
|
+
declare function usePost(sdk: ReoptSDK, postId: string, options?: Omit<UseQueryOptions<PostDetail>, "queryKey" | "queryFn">): UseQueryResult<PostDetail>;
|
|
286
287
|
/**
|
|
287
288
|
* PostGroup 목록 조회
|
|
288
289
|
*
|
|
@@ -292,7 +293,7 @@ declare function usePost(sdk: ReoptSDK, postId: string, options?: Omit<UseQueryO
|
|
|
292
293
|
* // data?.records (PostGroup[]), data?.total
|
|
293
294
|
* ```
|
|
294
295
|
*/
|
|
295
|
-
declare function usePostGroupList(sdk: ReoptSDK, query?: ListPostGroupsQuery, options?: Omit<UseQueryOptions<CmsPaginatedResponse<PostGroup>>, "queryKey" | "queryFn">):
|
|
296
|
+
declare function usePostGroupList(sdk: ReoptSDK, query?: ListPostGroupsQuery, options?: Omit<UseQueryOptions<CmsPaginatedResponse<PostGroup>>, "queryKey" | "queryFn">): UseQueryResult<CmsPaginatedResponse<PostGroup>>;
|
|
296
297
|
/**
|
|
297
298
|
* 단일 PostGroup 조회
|
|
298
299
|
*
|
|
@@ -302,7 +303,7 @@ declare function usePostGroupList(sdk: ReoptSDK, query?: ListPostGroupsQuery, op
|
|
|
302
303
|
* // group?.name, group?.postCount
|
|
303
304
|
* ```
|
|
304
305
|
*/
|
|
305
|
-
declare function usePostGroup(sdk: ReoptSDK, groupId: string, options?: Omit<UseQueryOptions<PostGroup>, "queryKey" | "queryFn">):
|
|
306
|
+
declare function usePostGroup(sdk: ReoptSDK, groupId: string, options?: Omit<UseQueryOptions<PostGroup>, "queryKey" | "queryFn">): UseQueryResult<PostGroup>;
|
|
306
307
|
/**
|
|
307
308
|
* Slug 기반 단일 Post 조회. 외부 사이트의 `/blog/[slug]` 같은 라우트에서
|
|
308
309
|
* id 매핑 없이 사용. (서버 컴포넌트에서는 `sdk.cms.posts.getBySlug`를
|
|
@@ -314,8 +315,8 @@ declare function usePostGroup(sdk: ReoptSDK, groupId: string, options?: Omit<Use
|
|
|
314
315
|
* ```
|
|
315
316
|
*/
|
|
316
317
|
declare function usePostBySlug(sdk: ReoptSDK, slug: string, opts?: {
|
|
317
|
-
|
|
318
|
-
}, options?: Omit<UseQueryOptions<PostDetail>, "queryKey" | "queryFn">):
|
|
318
|
+
groupId?: string;
|
|
319
|
+
}, options?: Omit<UseQueryOptions<PostDetail>, "queryKey" | "queryFn">): UseQueryResult<PostDetail>;
|
|
319
320
|
/**
|
|
320
321
|
* Brand 범위에서 사용된 포스트 태그 목록.
|
|
321
322
|
*
|
|
@@ -325,7 +326,7 @@ declare function usePostBySlug(sdk: ReoptSDK, slug: string, opts?: {
|
|
|
325
326
|
* // tags?.[0]: { id, text, postCount }
|
|
326
327
|
* ```
|
|
327
328
|
*/
|
|
328
|
-
declare function useCmsTags(sdk: ReoptSDK, query?: ListTagsQuery, options?: Omit<UseQueryOptions<Tag[]>, "queryKey" | "queryFn">):
|
|
329
|
+
declare function useCmsTags(sdk: ReoptSDK, query?: ListTagsQuery, options?: Omit<UseQueryOptions<Tag[]>, "queryKey" | "queryFn">): UseQueryResult<Tag[]>;
|
|
329
330
|
/**
|
|
330
331
|
* 파일 목록 조회
|
|
331
332
|
*
|
|
@@ -335,7 +336,7 @@ declare function useCmsTags(sdk: ReoptSDK, query?: ListTagsQuery, options?: Omit
|
|
|
335
336
|
* // data?.data (FileInfo[]), data?.meta
|
|
336
337
|
* ```
|
|
337
338
|
*/
|
|
338
|
-
declare function useFiles(sdk: ReoptSDK, query?: FileListQuery, options?: Omit<UseQueryOptions<FileListResponse>, "queryKey" | "queryFn">):
|
|
339
|
+
declare function useFiles(sdk: ReoptSDK, query?: FileListQuery, options?: Omit<UseQueryOptions<FileListResponse>, "queryKey" | "queryFn">): UseQueryResult<FileListResponse>;
|
|
339
340
|
/**
|
|
340
341
|
* 단일 파일 조회
|
|
341
342
|
*
|
|
@@ -345,7 +346,7 @@ declare function useFiles(sdk: ReoptSDK, query?: FileListQuery, options?: Omit<U
|
|
|
345
346
|
* // file?.name, file?.url
|
|
346
347
|
* ```
|
|
347
348
|
*/
|
|
348
|
-
declare function useFile(sdk: ReoptSDK, fileId: string, options?: Omit<UseQueryOptions<FileInfo>, "queryKey" | "queryFn">):
|
|
349
|
+
declare function useFile(sdk: ReoptSDK, fileId: string, options?: Omit<UseQueryOptions<FileInfo>, "queryKey" | "queryFn">): UseQueryResult<FileInfo>;
|
|
349
350
|
/**
|
|
350
351
|
* 파일 삭제 mutation
|
|
351
352
|
*
|
|
@@ -355,7 +356,7 @@ declare function useFile(sdk: ReoptSDK, fileId: string, options?: Omit<UseQueryO
|
|
|
355
356
|
* await deleteFile.mutateAsync("file-uuid");
|
|
356
357
|
* ```
|
|
357
358
|
*/
|
|
358
|
-
declare function useDeleteFile(sdk: ReoptSDK, options?: UseMutationOptions<void, Error, string>):
|
|
359
|
+
declare function useDeleteFile(sdk: ReoptSDK, options?: UseMutationOptions<void, Error, string>): UseMutationResult<void, Error, string>;
|
|
359
360
|
/**
|
|
360
361
|
* 파일 업로드 mutation
|
|
361
362
|
*
|
|
@@ -370,11 +371,67 @@ declare function useDeleteFile(sdk: ReoptSDK, options?: UseMutationOptions<void,
|
|
|
370
371
|
* ```
|
|
371
372
|
*/
|
|
372
373
|
declare function useUploadFile(sdk: ReoptSDK, options?: UseMutationOptions<FileInfo, Error, {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
}>):
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
|
|
374
|
+
file: Blob | Uint8Array | File;
|
|
375
|
+
options?: UploadOptions;
|
|
376
|
+
}>): UseMutationResult<FileInfo, Error, {
|
|
377
|
+
file: Blob | Uint8Array | File;
|
|
378
|
+
options?: UploadOptions;
|
|
379
|
+
}>;
|
|
380
|
+
/**
|
|
381
|
+
* 파일 수정(rename/move) mutation
|
|
382
|
+
*
|
|
383
|
+
* @example
|
|
384
|
+
* ```tsx
|
|
385
|
+
* const update = useUpdateFile(sdk);
|
|
386
|
+
* await update.mutateAsync({ fileId, input: { name: "renamed.png" } });
|
|
387
|
+
* await update.mutateAsync({ fileId, input: { folderId } }); // 폴더 이동
|
|
388
|
+
* ```
|
|
389
|
+
*/
|
|
390
|
+
declare function useUpdateFile(sdk: ReoptSDK, options?: UseMutationOptions<FileInfo, Error, {
|
|
391
|
+
fileId: string;
|
|
392
|
+
input: UpdateFileInput;
|
|
393
|
+
}>): UseMutationResult<FileInfo, Error, {
|
|
394
|
+
fileId: string;
|
|
395
|
+
input: UpdateFileInput;
|
|
396
|
+
}>;
|
|
397
|
+
/**
|
|
398
|
+
* 직속 자식 폴더 목록 조회 (미지정 = 루트)
|
|
399
|
+
*
|
|
400
|
+
* @example
|
|
401
|
+
* ```tsx
|
|
402
|
+
* const { data: rootFolders } = useFolders(sdk);
|
|
403
|
+
* const { data: children } = useFolders(sdk, { parentId: folder.id });
|
|
404
|
+
* ```
|
|
405
|
+
*/
|
|
406
|
+
declare function useFolders(sdk: ReoptSDK, query?: FolderListQuery, options?: Omit<UseQueryOptions<FolderInfo[]>, "queryKey" | "queryFn">): UseQueryResult<FolderInfo[]>;
|
|
407
|
+
/**
|
|
408
|
+
* 폴더 생성 mutation
|
|
409
|
+
*/
|
|
410
|
+
declare function useCreateFolder(sdk: ReoptSDK, options?: UseMutationOptions<FolderInfo, Error, CreateFolderInput>): UseMutationResult<FolderInfo, Error, CreateFolderInput>;
|
|
411
|
+
/**
|
|
412
|
+
* 폴더 수정(rename/move) mutation
|
|
413
|
+
*/
|
|
414
|
+
declare function useUpdateFolder(sdk: ReoptSDK, options?: UseMutationOptions<FolderInfo, Error, {
|
|
415
|
+
folderId: string;
|
|
416
|
+
input: UpdateFolderInput;
|
|
417
|
+
}>): UseMutationResult<FolderInfo, Error, {
|
|
418
|
+
folderId: string;
|
|
419
|
+
input: UpdateFolderInput;
|
|
420
|
+
}>;
|
|
421
|
+
/**
|
|
422
|
+
* 폴더 삭제 mutation — 비어있어야 성공 (아니면 409 FOLDER_NOT_EMPTY)
|
|
423
|
+
*/
|
|
424
|
+
declare function useDeleteFolder(sdk: ReoptSDK, options?: UseMutationOptions<void, Error, string>): UseMutationResult<void, Error, string>;
|
|
425
|
+
/**
|
|
426
|
+
* 저장공간 사용량 조회 — 사용량 미터·임박 경고용
|
|
427
|
+
*
|
|
428
|
+
* @example
|
|
429
|
+
* ```tsx
|
|
430
|
+
* const { data: usage } = useFileUsage(sdk);
|
|
431
|
+
* // usage?.usedBytes / usage?.limitBytes (null = 무제한)
|
|
432
|
+
* ```
|
|
433
|
+
*/
|
|
434
|
+
declare function useFileUsage(sdk: ReoptSDK, options?: Omit<UseQueryOptions<FileUsageInfo>, "queryKey" | "queryFn">): UseQueryResult<FileUsageInfo>;
|
|
435
|
+
//#endregion
|
|
436
|
+
export { type UseAiStreamOptions, type UseAiStreamReturn, keys as reoptQueryKeys, useAiAgents, useAiCompletion, useAiCredits, useAiImageGenerate, useAiModels, useAiStream, useBulkCreateRecords, useBulkDeleteRecords, useBulkUpdateRecords, useCmsTags, useCreateFolder, useCreateRecord, useDeleteFile, useDeleteFolder, useDeleteRecord, useDeleteRecordsWhere, useEavEntities, useEavEntity, useEavRecord, useEavRecordCount, useEavRecords, useEavRecordsInfinite, useFile, useFileUsage, useFiles, useFolders, usePost, usePostBySlug, usePostGroup, usePostGroupList, usePostList, useUpdateFile, useUpdateFolder, useUpdateRecord, useUploadFile, useUpsertRecord };
|
|
437
|
+
//# sourceMappingURL=hooks.d.ts.map
|