@reopt-ai/workspace-sdk 0.0.0-stage → 0.1.0-rc.1
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 +51 -0
- package/LICENSE +21 -0
- package/README.md +45 -2
- package/dist/client-Bm8YrIx2.js +835 -0
- package/dist/client-CwInApBf.d.ts +714 -0
- package/dist/client-DlgVNj3w.d.ts +72 -0
- package/dist/client-XAvKlbbn.js +191 -0
- package/dist/index.d.ts +400 -0
- package/dist/index.js +342 -0
- package/dist/installation/index.d.ts +464 -0
- package/dist/installation/index.js +900 -0
- package/dist/keys-6gwtNd0g.js +102 -0
- package/dist/keys-B2pA8EkU.d.ts +44 -0
- package/dist/machine/index.d.ts +3 -0
- package/dist/machine/index.js +4 -0
- package/dist/machine/keygen-cli.d.ts +7 -0
- package/dist/machine/keygen-cli.js +57 -0
- package/dist/resource/index.d.ts +176 -0
- package/dist/resource/index.js +345 -0
- package/dist/social/index.d.ts +284 -0
- package/dist/social/index.js +306 -0
- package/dist/urls.d.ts +26 -0
- package/dist/urls.js +50 -0
- package/docs/installation.md +139 -0
- package/docs/machine.md +109 -0
- package/docs/resource.md +75 -0
- package/docs/social.md +92 -0
- package/docs/workspace.md +229 -0
- package/package.json +103 -3
|
@@ -0,0 +1,714 @@
|
|
|
1
|
+
import { i as ClientPrivateJwk, r as ClientKeyRing } from "./keys-B2pA8EkU.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/workspace/schemas.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* 플랫폼 API(RFC-0029) 와이어 계약 — zod 한 벌.
|
|
6
|
+
*
|
|
7
|
+
* 서버(`apps/web/server/hono/routes/platform-schemas.ts`)와 같은 모양이다. 패키지 경계 때문에
|
|
8
|
+
* 파일은 둘이지만 서버 테스트(`platform-sdk-parity.test.ts`)가 이 스키마로 서버 응답을 파싱해
|
|
9
|
+
* 파리티를 고정한다. 소비자(reopt-data 등)는 tRPC 입력·웹훅 검증에 그대로 쓴다.
|
|
10
|
+
*
|
|
11
|
+
* 🔑 `.default()`를 쓰지 않는다 — 생략(`undefined`)이 "건드리지 않는다"를 뜻하는 필드가 있다.
|
|
12
|
+
* 🔑 타입은 손으로 적고 스키마에 `z.ZodType<T>`를 단다 — 이 패키지는 `isolatedDeclarations`라
|
|
13
|
+
* 추론된 export가 빌드를 깬다(TS9010).
|
|
14
|
+
*/
|
|
15
|
+
declare const PLATFORM_TASK_PRIORITIES: readonly ["low", "medium", "high", "urgent"];
|
|
16
|
+
declare const PLATFORM_TASK_OUTCOMES: readonly ["completed", "canceled"];
|
|
17
|
+
declare const PLATFORM_WEBHOOK_TRIGGERS: readonly ["workTaskStageChanged"];
|
|
18
|
+
type PlatformTaskPriority = (typeof PLATFORM_TASK_PRIORITIES)[number];
|
|
19
|
+
type PlatformTaskOutcome = (typeof PLATFORM_TASK_OUTCOMES)[number] | null;
|
|
20
|
+
type PlatformWebhookTrigger = (typeof PLATFORM_WEBHOOK_TRIGGERS)[number];
|
|
21
|
+
/** 단계 지정 — outcome(의미론) 또는 stageId(정확한 단계) 중 하나 */
|
|
22
|
+
type PlatformTaskStage = {
|
|
23
|
+
outcome?: PlatformTaskOutcome;
|
|
24
|
+
stageId?: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* RFC-0029 §13 — 외부 앱 고객을 워크스페이스 CRM에 미러링하는 입력.
|
|
28
|
+
*
|
|
29
|
+
* 🔴 `attributes`의 키는 **워크스페이스에 선언된 속성 이름**이다(UUID 아님). 선언에 없는 이름이나
|
|
30
|
+
* 타입이 어긋난 값은 400으로 거절되고 **아무것도 저장되지 않는다** — 조용히 통과시키면 값은
|
|
31
|
+
* 들어가고 세그먼트·고객 화면에서만 안 보이는 상태가 되기 때문이다.
|
|
32
|
+
*
|
|
33
|
+
* 🔑 숫자는 JSON number, 날짜는 ISO 8601 문자열이어야 한다. 세그먼트의 숫자·날짜 비교가
|
|
34
|
+
* `jsonb_typeof` 가드를 통과해야 돌아서, `"12"`처럼 문자열로 보내면 그 행이 모든 숫자 비교에서
|
|
35
|
+
* 빠진다(저장은 되고 필터만 안 되는 상태).
|
|
36
|
+
*/
|
|
37
|
+
type PlatformCustomerUpsertInput = {
|
|
38
|
+
/** 소스 쪽 단조 증가 version(ms epoch 권장). 저장값 이하면 서버가 no-op으로 답한다 */
|
|
39
|
+
version?: number;
|
|
40
|
+
/** CRM 목록에 보이는 이름. 가명만 있으면 그 표기를 보낸다(빈 문자열 불가) */
|
|
41
|
+
name: string;
|
|
42
|
+
/** null = 지움, 생략 = 건드리지 않음 */
|
|
43
|
+
email?: string | null;
|
|
44
|
+
/** 선언된 속성 **이름** → 값 */
|
|
45
|
+
attributes?: Record<string, unknown>;
|
|
46
|
+
};
|
|
47
|
+
type PlatformTaskUpsertInput = {
|
|
48
|
+
/** 소스 쪽 단조 증가 version(ms epoch 권장). 저장값 이하면 서버가 no-op으로 답한다 */
|
|
49
|
+
version: number;
|
|
50
|
+
title: string;
|
|
51
|
+
description?: string | null;
|
|
52
|
+
priority?: PlatformTaskPriority;
|
|
53
|
+
/** ISO 8601(offset 포함). null = 마감 없음, 생략 = 건드리지 않음 */
|
|
54
|
+
dueDate?: string | null;
|
|
55
|
+
/** studio Brand.id — 생략 시 클라이언트 브랜드 */
|
|
56
|
+
brandId?: string;
|
|
57
|
+
/** studio WorkPipeline.id — 생성 시에만 쓰이고 생략 시 기본 파이프라인 */
|
|
58
|
+
pipelineId?: string;
|
|
59
|
+
/** 소스 쪽 화면 딥링크 */
|
|
60
|
+
url?: string | null;
|
|
61
|
+
/** 소스 쪽 종류 라벨("ErrorIssue") */
|
|
62
|
+
label?: string | null;
|
|
63
|
+
stage?: PlatformTaskStage;
|
|
64
|
+
};
|
|
65
|
+
type PlatformTaskStageInput = {
|
|
66
|
+
version: number;
|
|
67
|
+
outcome?: PlatformTaskOutcome;
|
|
68
|
+
stageId?: string;
|
|
69
|
+
};
|
|
70
|
+
type PlatformWebhookUpsertInput = {
|
|
71
|
+
url: string;
|
|
72
|
+
triggers: PlatformWebhookTrigger[];
|
|
73
|
+
/** HMAC 서명 시크릿(≥16자). 생략하면 기존 값 유지 */
|
|
74
|
+
secret?: string;
|
|
75
|
+
/** RFC-0030 소유 표식. `"code"` = CLI가 관리(UI 편집 잠금) · null = 표식 해제 · 생략 = 유지 */
|
|
76
|
+
managedBy?: "code" | null;
|
|
77
|
+
};
|
|
78
|
+
/** 소스 쪽 식별자 — 경로 세그먼트라 슬래시·공백 금지, ≤255 */
|
|
79
|
+
declare const platformExternalIdSchema: z.ZodType<string>;
|
|
80
|
+
declare const platformTaskStageSchema: z.ZodType<PlatformTaskStage>;
|
|
81
|
+
declare const platformCustomerUpsertInputSchema: z.ZodType<PlatformCustomerUpsertInput>;
|
|
82
|
+
declare const platformTaskUpsertInputSchema: z.ZodType<PlatformTaskUpsertInput>;
|
|
83
|
+
declare const platformTaskStageInputSchema: z.ZodType<PlatformTaskStageInput>;
|
|
84
|
+
declare const platformWebhookUpsertInputSchema: z.ZodType<PlatformWebhookUpsertInput>;
|
|
85
|
+
type PlatformTask = {
|
|
86
|
+
id: string;
|
|
87
|
+
workspaceId: string;
|
|
88
|
+
brandId: string | null;
|
|
89
|
+
title: string;
|
|
90
|
+
description: string | null;
|
|
91
|
+
priority: PlatformTaskPriority;
|
|
92
|
+
dueDate: string | null;
|
|
93
|
+
pipeline: {
|
|
94
|
+
id: string;
|
|
95
|
+
name: string;
|
|
96
|
+
} | null;
|
|
97
|
+
stage: {
|
|
98
|
+
id: string;
|
|
99
|
+
key: string;
|
|
100
|
+
label: string;
|
|
101
|
+
outcome: PlatformTaskOutcome;
|
|
102
|
+
} | null;
|
|
103
|
+
externalRef: {
|
|
104
|
+
source: string;
|
|
105
|
+
externalId: string;
|
|
106
|
+
url: string | null;
|
|
107
|
+
label: string | null;
|
|
108
|
+
version: number;
|
|
109
|
+
};
|
|
110
|
+
/** 스튜디오 업무 딥링크(절대 URL) */
|
|
111
|
+
url: string;
|
|
112
|
+
createdAt: string;
|
|
113
|
+
updatedAt: string;
|
|
114
|
+
};
|
|
115
|
+
type PlatformWriteMeta = {
|
|
116
|
+
created: boolean;
|
|
117
|
+
applied: boolean;
|
|
118
|
+
};
|
|
119
|
+
type PlatformPipeline = {
|
|
120
|
+
id: string;
|
|
121
|
+
name: string;
|
|
122
|
+
isDefault: boolean;
|
|
123
|
+
stages: Array<{
|
|
124
|
+
id: string;
|
|
125
|
+
key: string;
|
|
126
|
+
label: string;
|
|
127
|
+
order: number;
|
|
128
|
+
isEntry: boolean;
|
|
129
|
+
outcome: PlatformTaskOutcome;
|
|
130
|
+
}>;
|
|
131
|
+
};
|
|
132
|
+
type PlatformMe = {
|
|
133
|
+
clientId: string;
|
|
134
|
+
clientName: string;
|
|
135
|
+
/** 외부 참조 `source` — 이 클라이언트의 Brandapp slug */
|
|
136
|
+
source: string;
|
|
137
|
+
workspaceId: string;
|
|
138
|
+
/** 브랜드앱 클라이언트면 그 브랜드앱. **워크스페이스 앱**(RFC-0043, 설치 `kind: "workspace"`)이면 `null` */
|
|
139
|
+
brandappId: string | null;
|
|
140
|
+
/** 브랜드앱의 브랜드. 워크스페이스 앱은 브랜드가 없어 `null` */
|
|
141
|
+
defaultBrandId: string | null;
|
|
142
|
+
scopes: string[];
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* RFC-0043 §3.6 — 게시된 글 목록의 한 줄(`GET /v1/posts`, scope `posts:read`). 초안·보관 글은 이 표면에 없다.
|
|
146
|
+
* `coverImage.url`은 공개 주소다(게시물 커버는 공개 blob).
|
|
147
|
+
*/
|
|
148
|
+
type PlatformPublishedPostSummary = {
|
|
149
|
+
id: string;
|
|
150
|
+
slug: string;
|
|
151
|
+
title: string;
|
|
152
|
+
/** 본문 평문 앞 200자 */
|
|
153
|
+
excerpt: string;
|
|
154
|
+
groupId: string;
|
|
155
|
+
publishedAt: string | null;
|
|
156
|
+
metaTitle: string | null;
|
|
157
|
+
metaDescription: string | null;
|
|
158
|
+
coverImage: {
|
|
159
|
+
id: string;
|
|
160
|
+
url: string;
|
|
161
|
+
} | null;
|
|
162
|
+
};
|
|
163
|
+
/** 게시된 글 한 편(`GET /v1/posts/:slug`) — 목록 줄 + 본문(`contentRich`, 에디터 스펙 JSON)·평문 */
|
|
164
|
+
type PlatformPublishedPost = PlatformPublishedPostSummary & {
|
|
165
|
+
content: string;
|
|
166
|
+
contentRich: unknown;
|
|
167
|
+
updatedAt: string;
|
|
168
|
+
};
|
|
169
|
+
type PlatformPublishedPostPage = {
|
|
170
|
+
posts: PlatformPublishedPostSummary[];
|
|
171
|
+
/** 다음 쪽 `offset`. 끝이면 `null` */
|
|
172
|
+
nextOffset: number | null;
|
|
173
|
+
};
|
|
174
|
+
type PlatformWebhook = {
|
|
175
|
+
id: string;
|
|
176
|
+
url: string;
|
|
177
|
+
triggers: string[];
|
|
178
|
+
hasSecret: boolean;
|
|
179
|
+
};
|
|
180
|
+
type PlatformErrorBody = {
|
|
181
|
+
error: {
|
|
182
|
+
code: string;
|
|
183
|
+
message: string;
|
|
184
|
+
retryable: boolean;
|
|
185
|
+
fields?: Array<{
|
|
186
|
+
field: string;
|
|
187
|
+
message: string;
|
|
188
|
+
}>;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
/** 웹훅 `workTaskStageChanged`의 `data` — 역방향 동기화 수신 측이 이 스키마로 검증한다 */
|
|
192
|
+
type PlatformWorkTaskStageChangedEvent = {
|
|
193
|
+
id: string;
|
|
194
|
+
title: string;
|
|
195
|
+
pipelineId: string | null;
|
|
196
|
+
fromStageLabel: string | null;
|
|
197
|
+
toStageId: string;
|
|
198
|
+
toStageLabel: string;
|
|
199
|
+
toStageOutcome: PlatformTaskOutcome;
|
|
200
|
+
/** "studio" 또는 플랫폼 API 클라이언트의 source slug — 자기 것이면 무시 */
|
|
201
|
+
origin: string;
|
|
202
|
+
/** outbox 행 생성 시각(ms epoch) — 단조 비교 */
|
|
203
|
+
version: number;
|
|
204
|
+
externalRefs: Array<{
|
|
205
|
+
source: string;
|
|
206
|
+
externalId: string;
|
|
207
|
+
label: string | null;
|
|
208
|
+
}>;
|
|
209
|
+
};
|
|
210
|
+
declare const platformTaskSchema: z.ZodType<PlatformTask>;
|
|
211
|
+
declare const platformWriteMetaSchema: z.ZodType<PlatformWriteMeta>;
|
|
212
|
+
declare const platformPipelineSchema: z.ZodType<PlatformPipeline>;
|
|
213
|
+
declare const platformMeSchema: z.ZodType<PlatformMe>;
|
|
214
|
+
declare const platformPublishedPostSummarySchema: z.ZodType<PlatformPublishedPostSummary>;
|
|
215
|
+
declare const platformPublishedPostSchema: z.ZodType<PlatformPublishedPost>;
|
|
216
|
+
declare const platformPublishedPostPageSchema: z.ZodType<PlatformPublishedPostPage>;
|
|
217
|
+
/** 목록 질의 — `groupId`로 게시물 그룹을 좁힌다. `limit` 1~100(기본 20) */
|
|
218
|
+
type PlatformPublishedPostListOptions = {
|
|
219
|
+
groupId?: string;
|
|
220
|
+
limit?: number;
|
|
221
|
+
offset?: number;
|
|
222
|
+
};
|
|
223
|
+
declare const platformPublishedPostListQuerySchema: z.ZodType<{
|
|
224
|
+
groupId?: string;
|
|
225
|
+
limit: number;
|
|
226
|
+
offset: number;
|
|
227
|
+
}, unknown>;
|
|
228
|
+
declare const platformWebhookSchema: z.ZodType<PlatformWebhook>;
|
|
229
|
+
declare const platformErrorSchema: z.ZodType<PlatformErrorBody>;
|
|
230
|
+
declare const platformWorkTaskStageChangedEventSchema: z.ZodType<PlatformWorkTaskStageChangedEvent>;
|
|
231
|
+
declare const PLATFORM_ADMIN_SCOPE: "workspace:admin";
|
|
232
|
+
declare const PLATFORM_MANAGED_BY_VALUES: readonly ["code"];
|
|
233
|
+
type PlatformManagedBy = (typeof PLATFORM_MANAGED_BY_VALUES)[number];
|
|
234
|
+
/** 단계 색 어휘 — `packages/studio-ui/composites/stage-colors.ts` STAGE_COLORS와 같은 집합(apps/web 파리티 테스트가 고정) */
|
|
235
|
+
declare const PLATFORM_STAGE_COLORS: readonly ["slate", "gray", "red", "rose", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "pink"];
|
|
236
|
+
type PlatformStageColor = (typeof PLATFORM_STAGE_COLORS)[number];
|
|
237
|
+
/** `/^[a-z0-9][a-z0-9-]{0,59}$/` — 선언 파일의 키이자 URL 경로 세그먼트 */
|
|
238
|
+
declare const platformResourceKeySchema: z.ZodType<string>;
|
|
239
|
+
type PlatformPipelineStageInput = {
|
|
240
|
+
key: string;
|
|
241
|
+
label: string;
|
|
242
|
+
/** 생략 = 서버 기본 `"slate"`(생성) / 유지(갱신) */
|
|
243
|
+
color?: PlatformStageColor;
|
|
244
|
+
/** 파이프라인당 정확히 하나 */
|
|
245
|
+
isEntry?: boolean;
|
|
246
|
+
/** null·생략 = 진행 단계 */
|
|
247
|
+
outcome?: PlatformTaskOutcome;
|
|
248
|
+
};
|
|
249
|
+
type PlatformPipelineUpsertInput = {
|
|
250
|
+
name: string;
|
|
251
|
+
description?: string | null;
|
|
252
|
+
/** true면 기존 기본 파이프라인의 기본을 내린다. false를 현재 기본에 주면 422 */
|
|
253
|
+
isDefault?: boolean;
|
|
254
|
+
/** 선언 순서가 곧 `order`. 빠진 기존 단계는 **삭제**된다(업무는 stageId null) */
|
|
255
|
+
stages: PlatformPipelineStageInput[];
|
|
256
|
+
/**
|
|
257
|
+
* 업무가 남아 있는 단계를 지우는 요청은 이 플래그 없이는 409 `DESTRUCTIVE_BLOCKED`.
|
|
258
|
+
* 서버도 fail-closed다 — CLI 게이트(`--allow-destructive`)가 뚫려도 서버가 한 번 더 막는다.
|
|
259
|
+
*/
|
|
260
|
+
allowDestructive?: boolean;
|
|
261
|
+
};
|
|
262
|
+
type PlatformPipelineResource = {
|
|
263
|
+
id: string;
|
|
264
|
+
/** 선언 키 — UI로 만든 파이프라인은 null(import로 결속) */
|
|
265
|
+
key: string | null;
|
|
266
|
+
name: string;
|
|
267
|
+
description: string | null;
|
|
268
|
+
isDefault: boolean;
|
|
269
|
+
isArchived: boolean;
|
|
270
|
+
order: number;
|
|
271
|
+
managedBy: PlatformManagedBy | null;
|
|
272
|
+
/** 이 파이프라인에 속한 업무 수(단계 미배정 포함) — 삭제 plan의 영향 수 */
|
|
273
|
+
taskCount: number;
|
|
274
|
+
stages: Array<{
|
|
275
|
+
id: string;
|
|
276
|
+
key: string;
|
|
277
|
+
label: string;
|
|
278
|
+
color: string;
|
|
279
|
+
order: number;
|
|
280
|
+
isEntry: boolean;
|
|
281
|
+
outcome: PlatformTaskOutcome;
|
|
282
|
+
/** 이 단계에 있는 업무 수 — 단계 삭제 plan의 영향 수 */
|
|
283
|
+
taskCount: number;
|
|
284
|
+
}>;
|
|
285
|
+
};
|
|
286
|
+
type PlatformWebhookResource = PlatformWebhook & {
|
|
287
|
+
managedBy: PlatformManagedBy | null;
|
|
288
|
+
};
|
|
289
|
+
/** `GET /v1/resources` — plan이 한 왕복으로 읽는 워크스페이스 자원 전부 */
|
|
290
|
+
type PlatformResources = {
|
|
291
|
+
workspaceId: string;
|
|
292
|
+
pipelines: PlatformPipelineResource[];
|
|
293
|
+
webhooks: PlatformWebhookResource[];
|
|
294
|
+
};
|
|
295
|
+
type PlatformPipelineImportInput = {
|
|
296
|
+
pipelineId: string;
|
|
297
|
+
};
|
|
298
|
+
type PlatformLockAcquired = {
|
|
299
|
+
acquired: true;
|
|
300
|
+
expiresAt: string;
|
|
301
|
+
};
|
|
302
|
+
type PlatformLockReleased = {
|
|
303
|
+
released: boolean;
|
|
304
|
+
};
|
|
305
|
+
declare const platformPipelineStageInputSchema: z.ZodType<PlatformPipelineStageInput>;
|
|
306
|
+
declare const platformPipelineUpsertInputSchema: z.ZodType<PlatformPipelineUpsertInput>;
|
|
307
|
+
declare const platformPipelineImportInputSchema: z.ZodType<PlatformPipelineImportInput>;
|
|
308
|
+
declare const platformPipelineResourceSchema: z.ZodType<PlatformPipelineResource>;
|
|
309
|
+
declare const platformWebhookResourceSchema: z.ZodType<PlatformWebhookResource>;
|
|
310
|
+
declare const platformResourcesSchema: z.ZodType<PlatformResources>;
|
|
311
|
+
declare const platformLockAcquiredSchema: z.ZodType<PlatformLockAcquired>;
|
|
312
|
+
declare const platformLockReleasedSchema: z.ZodType<PlatformLockReleased>;
|
|
313
|
+
declare const PLATFORM_DOMAIN_STATUSES: readonly ["active", "inactive", "pending", "suspended"];
|
|
314
|
+
type PlatformDomainStatus = (typeof PLATFORM_DOMAIN_STATUSES)[number];
|
|
315
|
+
type PlatformBrandResource = {
|
|
316
|
+
id: string;
|
|
317
|
+
/** 선언 키 — UI로 만든 브랜드는 null(import로 결속) */
|
|
318
|
+
key: string | null;
|
|
319
|
+
name: string;
|
|
320
|
+
logo: string | null;
|
|
321
|
+
description: string | null;
|
|
322
|
+
isSystemBrand: boolean;
|
|
323
|
+
managedBy: PlatformManagedBy | null;
|
|
324
|
+
/** 이 브랜드의 도메인들 — 선언의 `domain`은 isPrimary인 것 하나에 대응한다 */
|
|
325
|
+
domains: Array<{
|
|
326
|
+
id: string;
|
|
327
|
+
domain: string;
|
|
328
|
+
isPrimary: boolean;
|
|
329
|
+
status: PlatformDomainStatus;
|
|
330
|
+
}>;
|
|
331
|
+
/** 1:1 형제 브랜드앱의 slug(있으면) */
|
|
332
|
+
brandappSlug: string | null;
|
|
333
|
+
};
|
|
334
|
+
type PlatformBrandUpsertInput = {
|
|
335
|
+
name: string;
|
|
336
|
+
logo?: string | null;
|
|
337
|
+
description?: string | null;
|
|
338
|
+
/** 시스템 브랜드(리옵트 내부 서브 제품) 표식 — 생략 = 유지 */
|
|
339
|
+
isSystemBrand?: boolean;
|
|
340
|
+
/**
|
|
341
|
+
* 기본(primary) 도메인 호스트명. 생략 = 유지. 다른 값이면 새 Domain을 만들어 primary로 올리고 옛 것은
|
|
342
|
+
* primary만 내린다(지우지 않는다 — 브랜드프론트 페이지가 물려 있을 수 있다).
|
|
343
|
+
*/
|
|
344
|
+
domain?: string;
|
|
345
|
+
};
|
|
346
|
+
type PlatformBrandImportInput = {
|
|
347
|
+
brandId: string;
|
|
348
|
+
};
|
|
349
|
+
declare const PLATFORM_BRANDAPP_STATUSES: readonly ["draft", "active", "suspended", "archived"];
|
|
350
|
+
type PlatformBrandappResource = {
|
|
351
|
+
id: string;
|
|
352
|
+
/** 선언 키 = slug */
|
|
353
|
+
slug: string;
|
|
354
|
+
name: string;
|
|
355
|
+
description: string | null;
|
|
356
|
+
logo: string | null;
|
|
357
|
+
status: string;
|
|
358
|
+
aiEnabled: boolean;
|
|
359
|
+
isSystemBrandapp: boolean;
|
|
360
|
+
brandId: string;
|
|
361
|
+
/** 브랜드의 선언 키(있으면) */
|
|
362
|
+
brandKey: string | null;
|
|
363
|
+
domainId: string | null;
|
|
364
|
+
settings: Record<string, unknown> | null;
|
|
365
|
+
managedBy: PlatformManagedBy | null;
|
|
366
|
+
};
|
|
367
|
+
type PlatformBrandappUpsertInput = {
|
|
368
|
+
name: string;
|
|
369
|
+
/** 브랜드 선언 키 — 같은 워크스페이스의 `brand/<key>`. Brand:Brandapp은 1:1 */
|
|
370
|
+
brand: string;
|
|
371
|
+
description?: string | null;
|
|
372
|
+
logo?: string | null;
|
|
373
|
+
aiEnabled?: boolean;
|
|
374
|
+
isSystemBrandapp?: boolean;
|
|
375
|
+
/** 생략 = 유지. 주면 통째로 교체 */
|
|
376
|
+
settings?: Record<string, unknown>;
|
|
377
|
+
};
|
|
378
|
+
declare const PLATFORM_TOKEN_ENDPOINT_AUTH_METHODS: readonly ["client_secret_post", "client_secret_basic", "private_key_jwt", "none"];
|
|
379
|
+
/**
|
|
380
|
+
* RFC-0034 §2.2 — 클라이언트 용도. 한 브랜드앱에 용도당 하나.
|
|
381
|
+
* - `web`: 사람 로그인(authorization_code) · `connect`: 사용자 위임 연동(동의 화면)
|
|
382
|
+
* - `adapter`: 원격 auth 어댑터 · `machine`: 서버 간 기계 호출 — 둘 다 `private_key_jwt` + DPoP 기본
|
|
383
|
+
*/
|
|
384
|
+
declare const PLATFORM_OAUTH_CLIENT_PURPOSES: readonly ["web", "adapter", "machine", "connect"];
|
|
385
|
+
type PlatformOAuthClientPurpose = (typeof PLATFORM_OAUTH_CLIENT_PURPOSES)[number];
|
|
386
|
+
declare const PLATFORM_OAUTH_GRANT_TYPES: readonly ["authorization_code", "refresh_token", "client_credentials"];
|
|
387
|
+
declare const PLATFORM_OAUTH_APPLICATION_TYPES: readonly ["web", "native"];
|
|
388
|
+
type PlatformOAuthClientResource = {
|
|
389
|
+
id: string;
|
|
390
|
+
key: string | null;
|
|
391
|
+
clientId: string;
|
|
392
|
+
name: string | null;
|
|
393
|
+
/** 결속된 브랜드앱 slug(`brandappId` FK — RFC-0034 §6.4) — 없으면 플랫폼 API가 거절하는 클라이언트 */
|
|
394
|
+
brandappSlug: string | null;
|
|
395
|
+
/** RFC-0034 §2.2 — null은 용도 분리 전 행 */
|
|
396
|
+
purpose: PlatformOAuthClientPurpose | null;
|
|
397
|
+
/** RFC-0034 §3.3 — `private_key_jwt` 클라이언트의 공개키 주소 */
|
|
398
|
+
jwksUri: string | null;
|
|
399
|
+
/** RFC-0034 §3 — 발급 토큰에 DPoP 바인딩을 요구하는가 */
|
|
400
|
+
dpopBoundAccessTokens: boolean;
|
|
401
|
+
disabled: boolean;
|
|
402
|
+
scopes: string[];
|
|
403
|
+
clientCredentialsScopes: string[];
|
|
404
|
+
grantTypes: string[];
|
|
405
|
+
redirectUris: string[];
|
|
406
|
+
postLogoutRedirectUris: string[];
|
|
407
|
+
tokenEndpointAuthMethod: string | null;
|
|
408
|
+
requirePKCE: boolean;
|
|
409
|
+
skipConsent: boolean;
|
|
410
|
+
enableEndSession: boolean;
|
|
411
|
+
applicationType: string | null;
|
|
412
|
+
hasSecret: boolean;
|
|
413
|
+
managedBy: PlatformManagedBy | null;
|
|
414
|
+
/**
|
|
415
|
+
* 🔴 **생성·회전 응답에만** 실린다 — 서버는 해시만 저장하므로 다시 읽을 수 없다. CLI가 마스킹하거나
|
|
416
|
+
* `--secrets-out`(0600)으로 쓴다. `private_key_jwt` 클라이언트에는 없다.
|
|
417
|
+
*/
|
|
418
|
+
clientSecret?: string;
|
|
419
|
+
};
|
|
420
|
+
type PlatformOAuthClientUpsertInput = {
|
|
421
|
+
/** 브랜드앱 slug — 워크스페이스·source 도출 축(`brandappId` FK) */
|
|
422
|
+
brandapp: string;
|
|
423
|
+
/** 생략 = 그랜트에서 추정(client_credentials만 → machine, 그 밖엔 web) */
|
|
424
|
+
purpose?: PlatformOAuthClientPurpose;
|
|
425
|
+
name?: string;
|
|
426
|
+
scopes: string[];
|
|
427
|
+
grantTypes: string[];
|
|
428
|
+
redirectUris?: string[];
|
|
429
|
+
postLogoutRedirectUris?: string[];
|
|
430
|
+
/**
|
|
431
|
+
* 생략 = 로그인 용도는 client_secret_post, 기계·어댑터 용도는 private_key_jwt.
|
|
432
|
+
* `none`은 public client(시크릿 없음). `private_key_jwt`면 `jwksUri` 필수.
|
|
433
|
+
*/
|
|
434
|
+
tokenEndpointAuthMethod?: (typeof PLATFORM_TOKEN_ENDPOINT_AUTH_METHODS)[number];
|
|
435
|
+
/** `private_key_jwt`의 공개키 주소(HTTPS) — 서브 제품이 `/.well-known/reopt-client-jwks.json`에 게시 */
|
|
436
|
+
jwksUri?: string;
|
|
437
|
+
/** 기계 토큰 DPoP 바인딩 — 기계·어댑터 용도 기본 true */
|
|
438
|
+
dpopBoundAccessTokens?: boolean;
|
|
439
|
+
requirePKCE?: boolean;
|
|
440
|
+
skipConsent?: boolean;
|
|
441
|
+
enableEndSession?: boolean;
|
|
442
|
+
applicationType?: (typeof PLATFORM_OAUTH_APPLICATION_TYPES)[number];
|
|
443
|
+
disabled?: boolean;
|
|
444
|
+
};
|
|
445
|
+
type PlatformOAuthClientImportInput = {
|
|
446
|
+
clientId: string;
|
|
447
|
+
};
|
|
448
|
+
/** EAV 엔티티 자원 — SDK `EavEntity & { attributes }`와 같은 어휘(computeDiff 입력으로 그대로 쓴다) */
|
|
449
|
+
type PlatformEavEntityResource = {
|
|
450
|
+
id: string;
|
|
451
|
+
name: string;
|
|
452
|
+
description: string | null;
|
|
453
|
+
icon: string | null;
|
|
454
|
+
linkedTo: string;
|
|
455
|
+
attributes: Array<{
|
|
456
|
+
id: string;
|
|
457
|
+
name: string;
|
|
458
|
+
label: string;
|
|
459
|
+
dataType: string;
|
|
460
|
+
isRequired: boolean;
|
|
461
|
+
isUnique: boolean;
|
|
462
|
+
defaultValue: string | null;
|
|
463
|
+
validation: unknown;
|
|
464
|
+
options: unknown;
|
|
465
|
+
sortOrder: number;
|
|
466
|
+
}>;
|
|
467
|
+
/** 이 엔티티의 레코드 수 — 삭제 plan의 영향 수 */
|
|
468
|
+
recordCount: number;
|
|
469
|
+
};
|
|
470
|
+
type PlatformEavBrandappResources = {
|
|
471
|
+
brandappId: string;
|
|
472
|
+
brandappSlug: string;
|
|
473
|
+
entities: PlatformEavEntityResource[];
|
|
474
|
+
};
|
|
475
|
+
/**
|
|
476
|
+
* 선언형 EAV 적용 연산 — 마이그레이션 러너의 `MigrationOperation`에 update 둘을 더한 집합.
|
|
477
|
+
* 서버가 한 트랜잭션으로 실행한다. 레코드가 남은 엔티티·값이 남은 속성 제거는 `allowDestructive` 없이 409.
|
|
478
|
+
*/
|
|
479
|
+
type PlatformEavSchemaOperation = {
|
|
480
|
+
kind: "addEntity";
|
|
481
|
+
name: string;
|
|
482
|
+
def?: {
|
|
483
|
+
description?: string | null;
|
|
484
|
+
icon?: string | null;
|
|
485
|
+
linkedTo?: "brandapp" | "brandappAuthUser";
|
|
486
|
+
};
|
|
487
|
+
} | {
|
|
488
|
+
kind: "updateEntity";
|
|
489
|
+
name: string;
|
|
490
|
+
changes: {
|
|
491
|
+
description?: string | null;
|
|
492
|
+
icon?: string | null;
|
|
493
|
+
};
|
|
494
|
+
} | {
|
|
495
|
+
kind: "removeEntity";
|
|
496
|
+
name: string;
|
|
497
|
+
} | {
|
|
498
|
+
kind: "addAttribute";
|
|
499
|
+
entity: string;
|
|
500
|
+
name: string;
|
|
501
|
+
def: Record<string, unknown>;
|
|
502
|
+
} | {
|
|
503
|
+
kind: "updateAttribute";
|
|
504
|
+
entity: string;
|
|
505
|
+
name: string;
|
|
506
|
+
changes: Record<string, unknown>;
|
|
507
|
+
} | {
|
|
508
|
+
kind: "removeAttribute";
|
|
509
|
+
entity: string;
|
|
510
|
+
name: string;
|
|
511
|
+
} | {
|
|
512
|
+
kind: "renameAttribute";
|
|
513
|
+
entity: string;
|
|
514
|
+
oldName: string;
|
|
515
|
+
newName: string;
|
|
516
|
+
};
|
|
517
|
+
type PlatformEavSchemaApplyInput = {
|
|
518
|
+
/** 브랜드앱 slug — 생략 = 호출 클라이언트의 브랜드앱 */
|
|
519
|
+
brandapp?: string;
|
|
520
|
+
operations: PlatformEavSchemaOperation[];
|
|
521
|
+
allowDestructive?: boolean;
|
|
522
|
+
};
|
|
523
|
+
type PlatformEavSchemaApplyResult = {
|
|
524
|
+
applied: number;
|
|
525
|
+
entities: PlatformEavEntityResource[];
|
|
526
|
+
};
|
|
527
|
+
declare const platformBrandUpsertInputSchema: z.ZodType<PlatformBrandUpsertInput>;
|
|
528
|
+
declare const platformBrandImportInputSchema: z.ZodType<PlatformBrandImportInput>;
|
|
529
|
+
declare const platformBrandResourceSchema: z.ZodType<PlatformBrandResource>;
|
|
530
|
+
declare const platformBrandappUpsertInputSchema: z.ZodType<PlatformBrandappUpsertInput>;
|
|
531
|
+
declare const platformBrandappResourceSchema: z.ZodType<PlatformBrandappResource>;
|
|
532
|
+
declare const platformOAuthClientUpsertInputSchema: z.ZodType<PlatformOAuthClientUpsertInput>;
|
|
533
|
+
declare const platformOAuthClientImportInputSchema: z.ZodType<PlatformOAuthClientImportInput>;
|
|
534
|
+
declare const platformOAuthClientResourceSchema: z.ZodType<PlatformOAuthClientResource>;
|
|
535
|
+
declare const platformEavEntityResourceSchema: z.ZodType<PlatformEavEntityResource>;
|
|
536
|
+
declare const platformEavBrandappResourcesSchema: z.ZodType<PlatformEavBrandappResources>;
|
|
537
|
+
/**
|
|
538
|
+
* EAV 속성의 값 타입 — 리옵트 DB enum(`EavDataType`)과 같은 집합이다(`platform-sdk-parity.test.ts`가 대조).
|
|
539
|
+
* 서버도 같은 판정을 하지만 SDK가 먼저 막으면 호출이 나가지 않는다.
|
|
540
|
+
*/
|
|
541
|
+
declare const PLATFORM_EAV_DATA_TYPES: readonly ["string", "textarea", "number", "boolean", "date", "email", "url", "select", "multiselect", "file"];
|
|
542
|
+
type PlatformEavDataType = (typeof PLATFORM_EAV_DATA_TYPES)[number];
|
|
543
|
+
declare const platformEavSchemaOperationSchema: z.ZodType<PlatformEavSchemaOperation>;
|
|
544
|
+
declare const platformEavSchemaApplyInputSchema: z.ZodType<PlatformEavSchemaApplyInput>;
|
|
545
|
+
declare const platformEavSchemaApplyResultSchema: z.ZodType<PlatformEavSchemaApplyResult>;
|
|
546
|
+
/** `GET /v1/resources` 전체(1단계 pipelines·webhooks + 2·3단계). */
|
|
547
|
+
type PlatformResourcesV2 = PlatformResources & {
|
|
548
|
+
brands: PlatformBrandResource[];
|
|
549
|
+
brandapps: PlatformBrandappResource[];
|
|
550
|
+
oauthClients: PlatformOAuthClientResource[];
|
|
551
|
+
eav: PlatformEavBrandappResources[];
|
|
552
|
+
};
|
|
553
|
+
declare const platformResourcesV2Schema: z.ZodType<PlatformResourcesV2>;
|
|
554
|
+
//#endregion
|
|
555
|
+
//#region src/workspace/client.d.ts
|
|
556
|
+
/**
|
|
557
|
+
* 플랫폼 API(RFC-0029) 클라이언트 — **서버 전용**.
|
|
558
|
+
*
|
|
559
|
+
* `client_credentials`로 `platform.reopt.ai` audience 토큰을 받아(캐시·만료 60초 전 재발급·401 시 1회
|
|
560
|
+
* 재발급) `/v1/*`를 부른다. 브라우저에서 만들면 던진다 — clientSecret이 곧 워크스페이스 쓰기 권한이다.
|
|
561
|
+
*
|
|
562
|
+
* 기본 origin은 환경에서 파생하고(`isProduction` 또는 `REOPT_PLATFORM_URL`/`REOPT_ID_BASE_URL` env),
|
|
563
|
+
* 자체서명 dev 인증서는 `fetch` 주입(undici Agent 등)으로 요청 단위로 푼다 — 프로세스 전역
|
|
564
|
+
* `NODE_TLS_REJECT_UNAUTHORIZED`는 쓰지 않는다.
|
|
565
|
+
*/
|
|
566
|
+
declare const REOPT_PLATFORM_URLS: {
|
|
567
|
+
readonly production: "https://platform.reopt.ai";
|
|
568
|
+
readonly development: "https://platform.local.reopt.io";
|
|
569
|
+
};
|
|
570
|
+
declare const REOPT_PLATFORM_ID_URLS: {
|
|
571
|
+
readonly production: "https://id.reopt.ai";
|
|
572
|
+
readonly development: "https://id.local.reopt.io";
|
|
573
|
+
};
|
|
574
|
+
declare const DEFAULT_PLATFORM_SCOPES: readonly ["works:read", "works:write"];
|
|
575
|
+
type PlatformClientConfig = {
|
|
576
|
+
clientId: string;
|
|
577
|
+
/**
|
|
578
|
+
* 공유 시크릿(client_secret_post) — RFC-0034 뒤에는 **PaC 부트스트랩 자격만** 이 길을 쓴다. 기계 클라이언트는
|
|
579
|
+
* `privateKeyJwk`/`keyRing`(또는 env `REOPT_CLIENT_PRIVATE_KEY_JWK`)로 private_key_jwt + DPoP를 쓴다.
|
|
580
|
+
*/
|
|
581
|
+
clientSecret?: string;
|
|
582
|
+
/** RFC-0034 §3 — 비대칭 인증. 주면(또는 env에 있으면) clientSecret 없이 private_key_jwt + DPoP로 간다 */
|
|
583
|
+
privateKeyJwk?: ClientPrivateJwk;
|
|
584
|
+
keyRing?: ClientKeyRing;
|
|
585
|
+
/** 플랫폼 API origin. 생략 시 `REOPT_PLATFORM_URL` env → `isProduction` 기본값 */
|
|
586
|
+
platformUrl?: string;
|
|
587
|
+
/** 토큰 발급(id 서버) origin. 생략 시 `REOPT_ID_BASE_URL` env → `isProduction` 기본값 */
|
|
588
|
+
idBaseUrl?: string;
|
|
589
|
+
/** 기본 `["works:read", "works:write"]` — 클라이언트의 clientCredentialsScopes 안이어야 한다 */
|
|
590
|
+
scopes?: readonly string[];
|
|
591
|
+
/** true: production 호스트 / false: dev 호스트 / 생략: `NODE_ENV === "production"` */
|
|
592
|
+
isProduction?: boolean;
|
|
593
|
+
/** 요청 타임아웃(ms). 기본 10_000 */
|
|
594
|
+
timeoutMs?: number;
|
|
595
|
+
/** fetch 주입 — 테스트·자체서명 인증서(undici dispatcher) 용 */
|
|
596
|
+
fetch?: typeof fetch;
|
|
597
|
+
/** 서버 로그 상관관계용 — 요청마다 `X-Request-Id`로 실린다(생략 시 UUID) */
|
|
598
|
+
requestId?: () => string;
|
|
599
|
+
};
|
|
600
|
+
type PlatformWriteResult<T> = {
|
|
601
|
+
data: T;
|
|
602
|
+
meta: PlatformWriteMeta;
|
|
603
|
+
};
|
|
604
|
+
declare class PlatformApiError extends Error {
|
|
605
|
+
readonly status: number;
|
|
606
|
+
readonly code: string;
|
|
607
|
+
readonly retryable: boolean;
|
|
608
|
+
readonly fields?: Array<{
|
|
609
|
+
field: string;
|
|
610
|
+
message: string;
|
|
611
|
+
}>;
|
|
612
|
+
readonly requestId?: string;
|
|
613
|
+
constructor(input: {
|
|
614
|
+
status: number;
|
|
615
|
+
code: string;
|
|
616
|
+
message: string;
|
|
617
|
+
retryable: boolean;
|
|
618
|
+
fields?: Array<{
|
|
619
|
+
field: string;
|
|
620
|
+
message: string;
|
|
621
|
+
}>;
|
|
622
|
+
requestId?: string;
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
type PlatformUrls = {
|
|
626
|
+
platformUrl: string;
|
|
627
|
+
idBaseUrl: string;
|
|
628
|
+
};
|
|
629
|
+
declare function resolvePlatformUrls(config: Pick<PlatformClientConfig, "platformUrl" | "idBaseUrl" | "isProduction">): PlatformUrls;
|
|
630
|
+
type PlatformClient = {
|
|
631
|
+
/** 진단 — 이 자격이 어느 워크스페이스·source에 묶였는가 */
|
|
632
|
+
me: () => Promise<PlatformMe>;
|
|
633
|
+
works: {
|
|
634
|
+
listPipelines: () => Promise<PlatformPipeline[]>;
|
|
635
|
+
upsertTask: (externalId: string, input: PlatformTaskUpsertInput) => Promise<PlatformWriteResult<PlatformTask>>;
|
|
636
|
+
getTask: (externalId: string) => Promise<PlatformTask>;
|
|
637
|
+
setTaskStage: (externalId: string, input: PlatformTaskStageInput) => Promise<PlatformWriteResult<PlatformTask>>;
|
|
638
|
+
/** RFC-0030 — 선언 키 기준 파이프라인 upsert(단계는 key로 조정, 빠진 단계는 삭제). scope `workspace:admin` */
|
|
639
|
+
upsertPipeline: (key: string, input: PlatformPipelineUpsertInput) => Promise<PlatformWriteResult<PlatformPipelineResource>>;
|
|
640
|
+
/** RFC-0030 — 업무가 남아 있으면 `allowDestructive` 없이는 409 DESTRUCTIVE_BLOCKED. 기본 파이프라인은 422 */
|
|
641
|
+
deletePipeline: (key: string, options?: {
|
|
642
|
+
allowDestructive?: boolean;
|
|
643
|
+
}) => Promise<{
|
|
644
|
+
id: string;
|
|
645
|
+
deleted: boolean;
|
|
646
|
+
}>;
|
|
647
|
+
/** RFC-0030 — UI로 만든 기존 파이프라인에 선언 키·`managedBy: "code"`를 결속 */
|
|
648
|
+
importPipeline: (key: string, input: PlatformPipelineImportInput) => Promise<PlatformPipelineResource>;
|
|
649
|
+
};
|
|
650
|
+
/**
|
|
651
|
+
* RFC-0043 §3.6 — **게시된** 글만(scope `posts:read`). 워크스페이스 앱 공개 사이트의 소식 페이지가 쓴다.
|
|
652
|
+
* 없는 slug·초안은 `PlatformApiError` code `NOT_FOUND`(404).
|
|
653
|
+
*/
|
|
654
|
+
posts: {
|
|
655
|
+
list: (options?: PlatformPublishedPostListOptions) => Promise<PlatformPublishedPostPage>;
|
|
656
|
+
get: (slug: string) => Promise<PlatformPublishedPost>;
|
|
657
|
+
};
|
|
658
|
+
/** RFC-0030 — plan이 한 왕복으로 읽는 워크스페이스 자원 전부(파이프라인·웹훅·브랜드·브랜드앱·OAuth·EAV). scope `workspace:admin` */
|
|
659
|
+
resources: {
|
|
660
|
+
list: () => Promise<PlatformResourcesV2>;
|
|
661
|
+
};
|
|
662
|
+
/** RFC-0030 3단계 — 브랜드(+primary 도메인). 삭제 라우트는 없다(unsupported — superadmin에서 사람이). */
|
|
663
|
+
brands: {
|
|
664
|
+
upsert: (key: string, input: PlatformBrandUpsertInput) => Promise<PlatformWriteResult<PlatformBrandResource>>;
|
|
665
|
+
import: (key: string, input: PlatformBrandImportInput) => Promise<PlatformBrandResource>;
|
|
666
|
+
};
|
|
667
|
+
/** RFC-0030 3단계 — 브랜드앱(slug = 키). 삭제 라우트 없음. import는 slug가 정체성이라 본문이 없다. */
|
|
668
|
+
brandapps: {
|
|
669
|
+
upsert: (slug: string, input: PlatformBrandappUpsertInput) => Promise<PlatformWriteResult<PlatformBrandappResource>>;
|
|
670
|
+
import: (slug: string) => Promise<PlatformBrandappResource>;
|
|
671
|
+
};
|
|
672
|
+
/**
|
|
673
|
+
* RFC-0030 3단계 — OAuth 클라이언트. 🔴 생성·회전 응답의 `data.clientSecret`은 이때 한 번만 보인다.
|
|
674
|
+
* 삭제는 발급 토큰을 무효화한다(destructive — CLI가 `--allow-destructive`를 요구).
|
|
675
|
+
*/
|
|
676
|
+
oauthClients: {
|
|
677
|
+
upsert: (key: string, input: PlatformOAuthClientUpsertInput) => Promise<PlatformWriteResult<PlatformOAuthClientResource>>;
|
|
678
|
+
rotateSecret: (key: string) => Promise<PlatformOAuthClientResource>;
|
|
679
|
+
delete: (key: string, options?: {
|
|
680
|
+
allowDestructive?: boolean;
|
|
681
|
+
}) => Promise<{
|
|
682
|
+
id: string;
|
|
683
|
+
deleted: boolean;
|
|
684
|
+
}>;
|
|
685
|
+
import: (key: string, input: PlatformOAuthClientImportInput) => Promise<PlatformOAuthClientResource>;
|
|
686
|
+
};
|
|
687
|
+
/** RFC-0030 2단계 — EAV 스키마 연산을 한 트랜잭션으로. 레코드가 남은 삭제는 allowDestructive 없이 409. */
|
|
688
|
+
eav: {
|
|
689
|
+
applySchema: (input: PlatformEavSchemaApplyInput) => Promise<PlatformEavSchemaApplyResult>;
|
|
690
|
+
};
|
|
691
|
+
/**
|
|
692
|
+
* RFC-0030 — 워크스페이스 apply 락(Redis, TTL 30분, fail-closed). 잡혀 있으면 `PlatformApiError`
|
|
693
|
+
* code `LOCK_HELD`(409), Redis 불가면 `LOCK_UNAVAILABLE`(503). EAV 마이그레이션 러너와 같은 락이다.
|
|
694
|
+
*/
|
|
695
|
+
lock: {
|
|
696
|
+
acquire: (holderId: string) => Promise<PlatformLockAcquired>;
|
|
697
|
+
release: (holderId: string) => Promise<PlatformLockReleased>;
|
|
698
|
+
};
|
|
699
|
+
webhooks: {
|
|
700
|
+
list: () => Promise<PlatformWebhook[]>;
|
|
701
|
+
upsert: (input: PlatformWebhookUpsertInput) => Promise<PlatformWriteResult<PlatformWebhook>>;
|
|
702
|
+
delete: (id: string) => Promise<{
|
|
703
|
+
id: string;
|
|
704
|
+
deleted: boolean;
|
|
705
|
+
}>;
|
|
706
|
+
};
|
|
707
|
+
/** 테스트·진단용 — 캐시된 토큰을 버린다 */
|
|
708
|
+
invalidateToken: () => void;
|
|
709
|
+
urls: PlatformUrls;
|
|
710
|
+
};
|
|
711
|
+
declare function createPlatformClient(config: PlatformClientConfig): PlatformClient;
|
|
712
|
+
//#endregion
|
|
713
|
+
export { PlatformPublishedPostPage as $, platformWebhookUpsertInputSchema as $t, PlatformDomainStatus as A, platformLockReleasedSchema as At, PlatformManagedBy as B, platformPublishedPostListQuerySchema as Bt, PLATFORM_WEBHOOK_TRIGGERS as C, platformEavEntityResourceSchema as Ct, PlatformBrandappResource as D, platformErrorSchema as Dt, PlatformBrandUpsertInput as E, platformEavSchemaOperationSchema as Et, PlatformEavSchemaApplyResult as F, platformPipelineImportInputSchema as Ft, PlatformOAuthClientUpsertInput as G, platformResourcesSchema as Gt, PlatformOAuthClientImportInput as H, platformPublishedPostSchema as Ht, PlatformEavSchemaOperation as I, platformPipelineResourceSchema as It, PlatformPipelineResource as J, platformTaskStageInputSchema as Jt, PlatformPipeline as K, platformResourcesV2Schema as Kt, PlatformErrorBody as L, platformPipelineSchema as Lt, PlatformEavDataType as M, platformOAuthClientImportInputSchema as Mt, PlatformEavEntityResource as N, platformOAuthClientResourceSchema as Nt, PlatformBrandappUpsertInput as O, platformExternalIdSchema as Ot, PlatformEavSchemaApplyInput as P, platformOAuthClientUpsertInputSchema as Pt, PlatformPublishedPostListOptions as Q, platformWebhookSchema as Qt, PlatformLockAcquired as R, platformPipelineStageInputSchema as Rt, PLATFORM_TOKEN_ENDPOINT_AUTH_METHODS as S, platformEavBrandappResourcesSchema as St, PlatformBrandResource as T, platformEavSchemaApplyResultSchema as Tt, PlatformOAuthClientPurpose as U, platformPublishedPostSummarySchema as Ut, PlatformMe as V, platformPublishedPostPageSchema as Vt, PlatformOAuthClientResource as W, platformResourceKeySchema as Wt, PlatformPipelineUpsertInput as X, platformTaskUpsertInputSchema as Xt, PlatformPipelineStageInput as Y, platformTaskStageSchema as Yt, PlatformPublishedPost as Z, platformWebhookResourceSchema as Zt, PLATFORM_OAUTH_CLIENT_PURPOSES as _, platformBrandResourceSchema as _t, PlatformUrls as a, PlatformTaskOutcome as at, PLATFORM_TASK_OUTCOMES as b, platformBrandappUpsertInputSchema as bt, REOPT_PLATFORM_URLS as c, PlatformTaskStageInput as ct, PLATFORM_ADMIN_SCOPE as d, PlatformWebhookResource as dt, platformWorkTaskStageChangedEventSchema as en, PlatformPublishedPostSummary as et, PLATFORM_BRANDAPP_STATUSES as f, PlatformWebhookTrigger as ft, PLATFORM_OAUTH_APPLICATION_TYPES as g, platformBrandImportInputSchema as gt, PLATFORM_MANAGED_BY_VALUES as h, PlatformWriteMeta as ht, PlatformClientConfig as i, PlatformTask as it, PlatformEavBrandappResources as j, platformMeSchema as jt, PlatformCustomerUpsertInput as k, platformLockAcquiredSchema as kt, createPlatformClient as l, PlatformTaskUpsertInput as lt, PLATFORM_EAV_DATA_TYPES as m, PlatformWorkTaskStageChangedEvent as mt, PlatformApiError as n, PlatformResourcesV2 as nt, PlatformWriteResult as o, PlatformTaskPriority as ot, PLATFORM_DOMAIN_STATUSES as p, PlatformWebhookUpsertInput as pt, PlatformPipelineImportInput as q, platformTaskSchema as qt, PlatformClient as r, PlatformStageColor as rt, REOPT_PLATFORM_ID_URLS as s, PlatformTaskStage as st, DEFAULT_PLATFORM_SCOPES as t, platformWriteMetaSchema as tn, PlatformResources as tt, resolvePlatformUrls as u, PlatformWebhook as ut, PLATFORM_OAUTH_GRANT_TYPES as v, platformBrandUpsertInputSchema as vt, PlatformBrandImportInput as w, platformEavSchemaApplyInputSchema as wt, PLATFORM_TASK_PRIORITIES as x, platformCustomerUpsertInputSchema as xt, PLATFORM_STAGE_COLORS as y, platformBrandappResourceSchema as yt, PlatformLockReleased as z, platformPipelineUpsertInputSchema as zt };
|
|
714
|
+
//# sourceMappingURL=client-CwInApBf.d.ts.map
|