@reopt-ai/brandapp-sdk 4.5.0-platform.0 → 4.6.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 +41 -0
- package/README.md +1 -0
- package/dist/ai/index.js +1 -1
- package/dist/ai-provider/index.js +1 -1
- package/dist/analytics/index.js +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/better-auth/index.d.ts +2 -7
- package/dist/better-auth/index.js +2 -3
- package/dist/{client-BwgCbfXv.js → client-BzAgabAs.js} +2 -2
- package/dist/{client-B0XUjOuP.js → client-C2xE9HGZ.js} +4 -4
- package/dist/{client-Cv1bdMBf.js → client-CI2Y00Qx.js} +2 -2
- package/dist/{client-BNht520A.js → client-Ce0gs5Ma.js} +2 -2
- package/dist/{client-CKi1NpMR.js → client-DCqp0Bis.js} +2 -2
- package/dist/{client-B270eCrs.js → client-DeC127BD.js} +2 -2
- package/dist/{client-C2ALt685.js → client-DjLhTNsZ.js} +3 -3
- package/dist/{client-BIMl52kc.js → client-FM6_YJbr.js} +3 -3
- package/dist/{client-WxPjMNy_.js → client-eDd4aWDs.js} +2 -2
- package/dist/{client-DNzgX_md.js → client-tJq0U_jn.js} +4 -4
- package/dist/cms/index.js +1 -1
- package/dist/{config-DkT0F-GG.js → config-BeOelISH.js} +2 -2
- package/dist/eav/index.js +2 -2
- package/dist/feedback/index.js +1 -1
- package/dist/files/index.js +1 -1
- package/dist/{http-client-BO5A5n4I.js → http-client-Bl8u1vHN.js} +2 -2
- package/dist/index.js +12 -12
- package/dist/logout/index.js +1 -1
- package/dist/plans/index.js +1 -1
- package/dist/push/index.js +1 -1
- package/dist/{query-D08B_HFt.js → query-JPVK_8N5.js} +2 -2
- package/dist/terms/index.js +1 -1
- package/dist/workspace/index.d.ts +372 -1
- package/dist/workspace/index.js +362 -3
- package/docs/api-reference.md +4 -0
- package/docs/workspace.md +141 -0
- package/package.json +4 -4
|
@@ -22,6 +22,27 @@ type PlatformTaskStage = {
|
|
|
22
22
|
outcome?: PlatformTaskOutcome;
|
|
23
23
|
stageId?: string;
|
|
24
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* RFC-0029 §13 — 외부 앱 고객을 워크스페이스 CRM에 미러링하는 입력.
|
|
27
|
+
*
|
|
28
|
+
* 🔴 `attributes`의 키는 **워크스페이스에 선언된 속성 이름**이다(UUID 아님). 선언에 없는 이름이나
|
|
29
|
+
* 타입이 어긋난 값은 400으로 거절되고 **아무것도 저장되지 않는다** — 조용히 통과시키면 값은
|
|
30
|
+
* 들어가고 세그먼트·고객 화면에서만 안 보이는 상태가 되기 때문이다.
|
|
31
|
+
*
|
|
32
|
+
* 🔑 숫자는 JSON number, 날짜는 ISO 8601 문자열이어야 한다. 세그먼트의 숫자·날짜 비교가
|
|
33
|
+
* `jsonb_typeof` 가드를 통과해야 돌아서, `"12"`처럼 문자열로 보내면 그 행이 모든 숫자 비교에서
|
|
34
|
+
* 빠진다(저장은 되고 필터만 안 되는 상태).
|
|
35
|
+
*/
|
|
36
|
+
type PlatformCustomerUpsertInput = {
|
|
37
|
+
/** 소스 쪽 단조 증가 version(ms epoch 권장). 저장값 이하면 서버가 no-op으로 답한다 */
|
|
38
|
+
version?: number;
|
|
39
|
+
/** CRM 목록에 보이는 이름. 가명만 있으면 그 표기를 보낸다(빈 문자열 불가) */
|
|
40
|
+
name: string;
|
|
41
|
+
/** null = 지움, 생략 = 건드리지 않음 */
|
|
42
|
+
email?: string | null;
|
|
43
|
+
/** 선언된 속성 **이름** → 값 */
|
|
44
|
+
attributes?: Record<string, unknown>;
|
|
45
|
+
};
|
|
25
46
|
type PlatformTaskUpsertInput = {
|
|
26
47
|
/** 소스 쪽 단조 증가 version(ms epoch 권장). 저장값 이하면 서버가 no-op으로 답한다 */
|
|
27
48
|
version: number;
|
|
@@ -50,10 +71,13 @@ type PlatformWebhookUpsertInput = {
|
|
|
50
71
|
triggers: PlatformWebhookTrigger[];
|
|
51
72
|
/** HMAC 서명 시크릿(≥16자). 생략하면 기존 값 유지 */
|
|
52
73
|
secret?: string;
|
|
74
|
+
/** RFC-0030 소유 표식. `"code"` = CLI가 관리(UI 편집 잠금) · null = 표식 해제 · 생략 = 유지 */
|
|
75
|
+
managedBy?: "code" | null;
|
|
53
76
|
};
|
|
54
77
|
/** 소스 쪽 식별자 — 경로 세그먼트라 슬래시·공백 금지, ≤255 */
|
|
55
78
|
declare const platformExternalIdSchema: z.ZodType<string>;
|
|
56
79
|
declare const platformTaskStageSchema: z.ZodType<PlatformTaskStage>;
|
|
80
|
+
declare const platformCustomerUpsertInputSchema: z.ZodType<PlatformCustomerUpsertInput>;
|
|
57
81
|
declare const platformTaskUpsertInputSchema: z.ZodType<PlatformTaskUpsertInput>;
|
|
58
82
|
declare const platformTaskStageInputSchema: z.ZodType<PlatformTaskStageInput>;
|
|
59
83
|
declare const platformWebhookUpsertInputSchema: z.ZodType<PlatformWebhookUpsertInput>;
|
|
@@ -157,6 +181,301 @@ declare const platformMeSchema: z.ZodType<PlatformMe>;
|
|
|
157
181
|
declare const platformWebhookSchema: z.ZodType<PlatformWebhook>;
|
|
158
182
|
declare const platformErrorSchema: z.ZodType<PlatformErrorBody>;
|
|
159
183
|
declare const platformWorkTaskStageChangedEventSchema: z.ZodType<PlatformWorkTaskStageChangedEvent>;
|
|
184
|
+
declare const PLATFORM_ADMIN_SCOPE: "workspace:admin";
|
|
185
|
+
declare const PLATFORM_MANAGED_BY_VALUES: readonly ["code"];
|
|
186
|
+
type PlatformManagedBy = (typeof PLATFORM_MANAGED_BY_VALUES)[number];
|
|
187
|
+
/** 단계 색 어휘 — `packages/studio-ui/composites/stage-colors.ts` STAGE_COLORS와 같은 집합(apps/web 파리티 테스트가 고정) */
|
|
188
|
+
declare const PLATFORM_STAGE_COLORS: readonly ["slate", "gray", "red", "rose", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "pink"];
|
|
189
|
+
type PlatformStageColor = (typeof PLATFORM_STAGE_COLORS)[number];
|
|
190
|
+
/** `/^[a-z0-9][a-z0-9-]{0,59}$/` — 선언 파일의 키이자 URL 경로 세그먼트 */
|
|
191
|
+
declare const platformResourceKeySchema: z.ZodType<string>;
|
|
192
|
+
type PlatformPipelineStageInput = {
|
|
193
|
+
key: string;
|
|
194
|
+
label: string;
|
|
195
|
+
/** 생략 = 서버 기본 `"slate"`(생성) / 유지(갱신) */
|
|
196
|
+
color?: PlatformStageColor;
|
|
197
|
+
/** 파이프라인당 정확히 하나 */
|
|
198
|
+
isEntry?: boolean;
|
|
199
|
+
/** null·생략 = 진행 단계 */
|
|
200
|
+
outcome?: PlatformTaskOutcome;
|
|
201
|
+
};
|
|
202
|
+
type PlatformPipelineUpsertInput = {
|
|
203
|
+
name: string;
|
|
204
|
+
description?: string | null;
|
|
205
|
+
/** true면 기존 기본 파이프라인의 기본을 내린다. false를 현재 기본에 주면 422 */
|
|
206
|
+
isDefault?: boolean;
|
|
207
|
+
/** 선언 순서가 곧 `order`. 빠진 기존 단계는 **삭제**된다(업무는 stageId null) */
|
|
208
|
+
stages: PlatformPipelineStageInput[];
|
|
209
|
+
/**
|
|
210
|
+
* 업무가 남아 있는 단계를 지우는 요청은 이 플래그 없이는 409 `DESTRUCTIVE_BLOCKED`.
|
|
211
|
+
* 서버도 fail-closed다 — CLI 게이트(`--allow-destructive`)가 뚫려도 서버가 한 번 더 막는다.
|
|
212
|
+
*/
|
|
213
|
+
allowDestructive?: boolean;
|
|
214
|
+
};
|
|
215
|
+
type PlatformPipelineResource = {
|
|
216
|
+
id: string;
|
|
217
|
+
/** 선언 키 — UI로 만든 파이프라인은 null(import로 결속) */
|
|
218
|
+
key: string | null;
|
|
219
|
+
name: string;
|
|
220
|
+
description: string | null;
|
|
221
|
+
isDefault: boolean;
|
|
222
|
+
isArchived: boolean;
|
|
223
|
+
order: number;
|
|
224
|
+
managedBy: PlatformManagedBy | null;
|
|
225
|
+
/** 이 파이프라인에 속한 업무 수(단계 미배정 포함) — 삭제 plan의 영향 수 */
|
|
226
|
+
taskCount: number;
|
|
227
|
+
stages: Array<{
|
|
228
|
+
id: string;
|
|
229
|
+
key: string;
|
|
230
|
+
label: string;
|
|
231
|
+
color: string;
|
|
232
|
+
order: number;
|
|
233
|
+
isEntry: boolean;
|
|
234
|
+
outcome: PlatformTaskOutcome;
|
|
235
|
+
/** 이 단계에 있는 업무 수 — 단계 삭제 plan의 영향 수 */
|
|
236
|
+
taskCount: number;
|
|
237
|
+
}>;
|
|
238
|
+
};
|
|
239
|
+
type PlatformWebhookResource = PlatformWebhook & {
|
|
240
|
+
managedBy: PlatformManagedBy | null;
|
|
241
|
+
};
|
|
242
|
+
/** `GET /v1/resources` — plan이 한 왕복으로 읽는 워크스페이스 자원 전부 */
|
|
243
|
+
type PlatformResources = {
|
|
244
|
+
workspaceId: string;
|
|
245
|
+
pipelines: PlatformPipelineResource[];
|
|
246
|
+
webhooks: PlatformWebhookResource[];
|
|
247
|
+
};
|
|
248
|
+
type PlatformPipelineImportInput = {
|
|
249
|
+
pipelineId: string;
|
|
250
|
+
};
|
|
251
|
+
type PlatformLockAcquired = {
|
|
252
|
+
acquired: true;
|
|
253
|
+
expiresAt: string;
|
|
254
|
+
};
|
|
255
|
+
type PlatformLockReleased = {
|
|
256
|
+
released: boolean;
|
|
257
|
+
};
|
|
258
|
+
declare const platformPipelineStageInputSchema: z.ZodType<PlatformPipelineStageInput>;
|
|
259
|
+
declare const platformPipelineUpsertInputSchema: z.ZodType<PlatformPipelineUpsertInput>;
|
|
260
|
+
declare const platformPipelineImportInputSchema: z.ZodType<PlatformPipelineImportInput>;
|
|
261
|
+
declare const platformPipelineResourceSchema: z.ZodType<PlatformPipelineResource>;
|
|
262
|
+
declare const platformWebhookResourceSchema: z.ZodType<PlatformWebhookResource>;
|
|
263
|
+
declare const platformResourcesSchema: z.ZodType<PlatformResources>;
|
|
264
|
+
declare const platformLockAcquiredSchema: z.ZodType<PlatformLockAcquired>;
|
|
265
|
+
declare const platformLockReleasedSchema: z.ZodType<PlatformLockReleased>;
|
|
266
|
+
declare const PLATFORM_DOMAIN_STATUSES: readonly ["active", "inactive", "pending", "suspended"];
|
|
267
|
+
type PlatformDomainStatus = (typeof PLATFORM_DOMAIN_STATUSES)[number];
|
|
268
|
+
type PlatformBrandResource = {
|
|
269
|
+
id: string;
|
|
270
|
+
/** 선언 키 — UI로 만든 브랜드는 null(import로 결속) */
|
|
271
|
+
key: string | null;
|
|
272
|
+
name: string;
|
|
273
|
+
logo: string | null;
|
|
274
|
+
description: string | null;
|
|
275
|
+
isSystemBrand: boolean;
|
|
276
|
+
managedBy: PlatformManagedBy | null;
|
|
277
|
+
/** 이 브랜드의 도메인들 — 선언의 `domain`은 isPrimary인 것 하나에 대응한다 */
|
|
278
|
+
domains: Array<{
|
|
279
|
+
id: string;
|
|
280
|
+
domain: string;
|
|
281
|
+
isPrimary: boolean;
|
|
282
|
+
status: PlatformDomainStatus;
|
|
283
|
+
}>;
|
|
284
|
+
/** 1:1 형제 브랜드앱의 slug(있으면) */
|
|
285
|
+
brandappSlug: string | null;
|
|
286
|
+
};
|
|
287
|
+
type PlatformBrandUpsertInput = {
|
|
288
|
+
name: string;
|
|
289
|
+
logo?: string | null;
|
|
290
|
+
description?: string | null;
|
|
291
|
+
/** 시스템 브랜드(리옵트 내부 서브 제품) 표식 — 생략 = 유지 */
|
|
292
|
+
isSystemBrand?: boolean;
|
|
293
|
+
/**
|
|
294
|
+
* 기본(primary) 도메인 호스트명. 생략 = 유지. 다른 값이면 새 Domain을 만들어 primary로 올리고 옛 것은
|
|
295
|
+
* primary만 내린다(지우지 않는다 — 브랜드프론트 페이지가 물려 있을 수 있다).
|
|
296
|
+
*/
|
|
297
|
+
domain?: string;
|
|
298
|
+
};
|
|
299
|
+
type PlatformBrandImportInput = {
|
|
300
|
+
brandId: string;
|
|
301
|
+
};
|
|
302
|
+
declare const PLATFORM_BRANDAPP_STATUSES: readonly ["draft", "active", "suspended", "archived"];
|
|
303
|
+
type PlatformBrandappResource = {
|
|
304
|
+
id: string;
|
|
305
|
+
/** 선언 키 = slug */
|
|
306
|
+
slug: string;
|
|
307
|
+
name: string;
|
|
308
|
+
description: string | null;
|
|
309
|
+
logo: string | null;
|
|
310
|
+
status: string;
|
|
311
|
+
aiEnabled: boolean;
|
|
312
|
+
isSystemBrandapp: boolean;
|
|
313
|
+
brandId: string;
|
|
314
|
+
/** 브랜드의 선언 키(있으면) */
|
|
315
|
+
brandKey: string | null;
|
|
316
|
+
domainId: string | null;
|
|
317
|
+
settings: Record<string, unknown> | null;
|
|
318
|
+
managedBy: PlatformManagedBy | null;
|
|
319
|
+
};
|
|
320
|
+
type PlatformBrandappUpsertInput = {
|
|
321
|
+
name: string;
|
|
322
|
+
/** 브랜드 선언 키 — 같은 워크스페이스의 `brand/<key>`. Brand:Brandapp은 1:1 */
|
|
323
|
+
brand: string;
|
|
324
|
+
description?: string | null;
|
|
325
|
+
logo?: string | null;
|
|
326
|
+
aiEnabled?: boolean;
|
|
327
|
+
isSystemBrandapp?: boolean;
|
|
328
|
+
/** 생략 = 유지. 주면 통째로 교체 */
|
|
329
|
+
settings?: Record<string, unknown>;
|
|
330
|
+
};
|
|
331
|
+
declare const PLATFORM_TOKEN_ENDPOINT_AUTH_METHODS: readonly ["client_secret_post", "client_secret_basic", "none"];
|
|
332
|
+
declare const PLATFORM_OAUTH_GRANT_TYPES: readonly ["authorization_code", "refresh_token", "client_credentials"];
|
|
333
|
+
declare const PLATFORM_OAUTH_APPLICATION_TYPES: readonly ["web", "native"];
|
|
334
|
+
type PlatformOAuthClientResource = {
|
|
335
|
+
id: string;
|
|
336
|
+
key: string | null;
|
|
337
|
+
clientId: string;
|
|
338
|
+
name: string | null;
|
|
339
|
+
/** 결속된 브랜드앱 slug(metadata.brandappId) — 없으면 플랫폼 API가 거절하는 클라이언트 */
|
|
340
|
+
brandappSlug: string | null;
|
|
341
|
+
disabled: boolean;
|
|
342
|
+
scopes: string[];
|
|
343
|
+
clientCredentialsScopes: string[];
|
|
344
|
+
grantTypes: string[];
|
|
345
|
+
redirectUris: string[];
|
|
346
|
+
postLogoutRedirectUris: string[];
|
|
347
|
+
tokenEndpointAuthMethod: string | null;
|
|
348
|
+
requirePKCE: boolean;
|
|
349
|
+
skipConsent: boolean;
|
|
350
|
+
enableEndSession: boolean;
|
|
351
|
+
applicationType: string | null;
|
|
352
|
+
hasSecret: boolean;
|
|
353
|
+
managedBy: PlatformManagedBy | null;
|
|
354
|
+
/**
|
|
355
|
+
* 🔴 **생성·회전 응답에만** 실린다 — 서버는 해시만 저장하므로 다시 읽을 수 없다. CLI가 마스킹하거나
|
|
356
|
+
* `--secrets-out`(0600)으로 쓴다.
|
|
357
|
+
*/
|
|
358
|
+
clientSecret?: string;
|
|
359
|
+
};
|
|
360
|
+
type PlatformOAuthClientUpsertInput = {
|
|
361
|
+
/** 브랜드앱 slug — 워크스페이스·source 도출 축(metadata.brandappId) */
|
|
362
|
+
brandapp: string;
|
|
363
|
+
name?: string;
|
|
364
|
+
scopes: string[];
|
|
365
|
+
grantTypes: string[];
|
|
366
|
+
redirectUris?: string[];
|
|
367
|
+
postLogoutRedirectUris?: string[];
|
|
368
|
+
/** 생략 = 생성 시 client_secret_post / 갱신 시 유지. `none`은 public client(시크릿 없음) */
|
|
369
|
+
tokenEndpointAuthMethod?: (typeof PLATFORM_TOKEN_ENDPOINT_AUTH_METHODS)[number];
|
|
370
|
+
requirePKCE?: boolean;
|
|
371
|
+
skipConsent?: boolean;
|
|
372
|
+
enableEndSession?: boolean;
|
|
373
|
+
applicationType?: (typeof PLATFORM_OAUTH_APPLICATION_TYPES)[number];
|
|
374
|
+
disabled?: boolean;
|
|
375
|
+
};
|
|
376
|
+
type PlatformOAuthClientImportInput = {
|
|
377
|
+
clientId: string;
|
|
378
|
+
};
|
|
379
|
+
/** EAV 엔티티 자원 — SDK `EavEntity & { attributes }`와 같은 어휘(computeDiff 입력으로 그대로 쓴다) */
|
|
380
|
+
type PlatformEavEntityResource = {
|
|
381
|
+
id: string;
|
|
382
|
+
name: string;
|
|
383
|
+
description: string | null;
|
|
384
|
+
icon: string | null;
|
|
385
|
+
linkedTo: string;
|
|
386
|
+
attributes: Array<{
|
|
387
|
+
id: string;
|
|
388
|
+
name: string;
|
|
389
|
+
label: string;
|
|
390
|
+
dataType: string;
|
|
391
|
+
isRequired: boolean;
|
|
392
|
+
isUnique: boolean;
|
|
393
|
+
defaultValue: string | null;
|
|
394
|
+
validation: unknown;
|
|
395
|
+
options: unknown;
|
|
396
|
+
sortOrder: number;
|
|
397
|
+
}>;
|
|
398
|
+
/** 이 엔티티의 레코드 수 — 삭제 plan의 영향 수 */
|
|
399
|
+
recordCount: number;
|
|
400
|
+
};
|
|
401
|
+
type PlatformEavBrandappResources = {
|
|
402
|
+
brandappId: string;
|
|
403
|
+
brandappSlug: string;
|
|
404
|
+
entities: PlatformEavEntityResource[];
|
|
405
|
+
};
|
|
406
|
+
/**
|
|
407
|
+
* 선언형 EAV 적용 연산 — 마이그레이션 러너의 `MigrationOperation`에 update 둘을 더한 집합.
|
|
408
|
+
* 서버가 한 트랜잭션으로 실행한다. 레코드가 남은 엔티티·값이 남은 속성 제거는 `allowDestructive` 없이 409.
|
|
409
|
+
*/
|
|
410
|
+
type PlatformEavSchemaOperation = {
|
|
411
|
+
kind: "addEntity";
|
|
412
|
+
name: string;
|
|
413
|
+
def?: {
|
|
414
|
+
description?: string | null;
|
|
415
|
+
icon?: string | null;
|
|
416
|
+
linkedTo?: "brandapp" | "brandappAuthUser";
|
|
417
|
+
};
|
|
418
|
+
} | {
|
|
419
|
+
kind: "updateEntity";
|
|
420
|
+
name: string;
|
|
421
|
+
changes: {
|
|
422
|
+
description?: string | null;
|
|
423
|
+
icon?: string | null;
|
|
424
|
+
};
|
|
425
|
+
} | {
|
|
426
|
+
kind: "removeEntity";
|
|
427
|
+
name: string;
|
|
428
|
+
} | {
|
|
429
|
+
kind: "addAttribute";
|
|
430
|
+
entity: string;
|
|
431
|
+
name: string;
|
|
432
|
+
def: Record<string, unknown>;
|
|
433
|
+
} | {
|
|
434
|
+
kind: "updateAttribute";
|
|
435
|
+
entity: string;
|
|
436
|
+
name: string;
|
|
437
|
+
changes: Record<string, unknown>;
|
|
438
|
+
} | {
|
|
439
|
+
kind: "removeAttribute";
|
|
440
|
+
entity: string;
|
|
441
|
+
name: string;
|
|
442
|
+
} | {
|
|
443
|
+
kind: "renameAttribute";
|
|
444
|
+
entity: string;
|
|
445
|
+
oldName: string;
|
|
446
|
+
newName: string;
|
|
447
|
+
};
|
|
448
|
+
type PlatformEavSchemaApplyInput = {
|
|
449
|
+
/** 브랜드앱 slug — 생략 = 호출 클라이언트의 브랜드앱 */
|
|
450
|
+
brandapp?: string;
|
|
451
|
+
operations: PlatformEavSchemaOperation[];
|
|
452
|
+
allowDestructive?: boolean;
|
|
453
|
+
};
|
|
454
|
+
type PlatformEavSchemaApplyResult = {
|
|
455
|
+
applied: number;
|
|
456
|
+
entities: PlatformEavEntityResource[];
|
|
457
|
+
};
|
|
458
|
+
declare const platformBrandUpsertInputSchema: z.ZodType<PlatformBrandUpsertInput>;
|
|
459
|
+
declare const platformBrandImportInputSchema: z.ZodType<PlatformBrandImportInput>;
|
|
460
|
+
declare const platformBrandResourceSchema: z.ZodType<PlatformBrandResource>;
|
|
461
|
+
declare const platformBrandappUpsertInputSchema: z.ZodType<PlatformBrandappUpsertInput>;
|
|
462
|
+
declare const platformBrandappResourceSchema: z.ZodType<PlatformBrandappResource>;
|
|
463
|
+
declare const platformOAuthClientUpsertInputSchema: z.ZodType<PlatformOAuthClientUpsertInput>;
|
|
464
|
+
declare const platformOAuthClientImportInputSchema: z.ZodType<PlatformOAuthClientImportInput>;
|
|
465
|
+
declare const platformOAuthClientResourceSchema: z.ZodType<PlatformOAuthClientResource>;
|
|
466
|
+
declare const platformEavEntityResourceSchema: z.ZodType<PlatformEavEntityResource>;
|
|
467
|
+
declare const platformEavBrandappResourcesSchema: z.ZodType<PlatformEavBrandappResources>;
|
|
468
|
+
declare const platformEavSchemaOperationSchema: z.ZodType<PlatformEavSchemaOperation>;
|
|
469
|
+
declare const platformEavSchemaApplyInputSchema: z.ZodType<PlatformEavSchemaApplyInput>;
|
|
470
|
+
declare const platformEavSchemaApplyResultSchema: z.ZodType<PlatformEavSchemaApplyResult>;
|
|
471
|
+
/** `GET /v1/resources` 전체(1단계 pipelines·webhooks + 2·3단계). */
|
|
472
|
+
type PlatformResourcesV2 = PlatformResources & {
|
|
473
|
+
brands: PlatformBrandResource[];
|
|
474
|
+
brandapps: PlatformBrandappResource[];
|
|
475
|
+
oauthClients: PlatformOAuthClientResource[];
|
|
476
|
+
eav: PlatformEavBrandappResources[];
|
|
477
|
+
};
|
|
478
|
+
declare const platformResourcesV2Schema: z.ZodType<PlatformResourcesV2>;
|
|
160
479
|
//#endregion
|
|
161
480
|
//#region src/workspace/client.d.ts
|
|
162
481
|
/**
|
|
@@ -234,6 +553,58 @@ type PlatformClient = {
|
|
|
234
553
|
upsertTask: (externalId: string, input: PlatformTaskUpsertInput) => Promise<PlatformWriteResult<PlatformTask>>;
|
|
235
554
|
getTask: (externalId: string) => Promise<PlatformTask>;
|
|
236
555
|
setTaskStage: (externalId: string, input: PlatformTaskStageInput) => Promise<PlatformWriteResult<PlatformTask>>;
|
|
556
|
+
/** RFC-0030 — 선언 키 기준 파이프라인 upsert(단계는 key로 조정, 빠진 단계는 삭제). scope `workspace:admin` */
|
|
557
|
+
upsertPipeline: (key: string, input: PlatformPipelineUpsertInput) => Promise<PlatformWriteResult<PlatformPipelineResource>>;
|
|
558
|
+
/** RFC-0030 — 업무가 남아 있으면 `allowDestructive` 없이는 409 DESTRUCTIVE_BLOCKED. 기본 파이프라인은 422 */
|
|
559
|
+
deletePipeline: (key: string, options?: {
|
|
560
|
+
allowDestructive?: boolean;
|
|
561
|
+
}) => Promise<{
|
|
562
|
+
id: string;
|
|
563
|
+
deleted: boolean;
|
|
564
|
+
}>;
|
|
565
|
+
/** RFC-0030 — UI로 만든 기존 파이프라인에 선언 키·`managedBy: "code"`를 결속 */
|
|
566
|
+
importPipeline: (key: string, input: PlatformPipelineImportInput) => Promise<PlatformPipelineResource>;
|
|
567
|
+
};
|
|
568
|
+
/** RFC-0030 — plan이 한 왕복으로 읽는 워크스페이스 자원 전부(파이프라인·웹훅·브랜드·브랜드앱·OAuth·EAV). scope `workspace:admin` */
|
|
569
|
+
resources: {
|
|
570
|
+
list: () => Promise<PlatformResourcesV2>;
|
|
571
|
+
};
|
|
572
|
+
/** RFC-0030 3단계 — 브랜드(+primary 도메인). 삭제 라우트는 없다(unsupported — superadmin에서 사람이). */
|
|
573
|
+
brands: {
|
|
574
|
+
upsert: (key: string, input: PlatformBrandUpsertInput) => Promise<PlatformWriteResult<PlatformBrandResource>>;
|
|
575
|
+
import: (key: string, input: PlatformBrandImportInput) => Promise<PlatformBrandResource>;
|
|
576
|
+
};
|
|
577
|
+
/** RFC-0030 3단계 — 브랜드앱(slug = 키). 삭제 라우트 없음. import는 slug가 정체성이라 본문이 없다. */
|
|
578
|
+
brandapps: {
|
|
579
|
+
upsert: (slug: string, input: PlatformBrandappUpsertInput) => Promise<PlatformWriteResult<PlatformBrandappResource>>;
|
|
580
|
+
import: (slug: string) => Promise<PlatformBrandappResource>;
|
|
581
|
+
};
|
|
582
|
+
/**
|
|
583
|
+
* RFC-0030 3단계 — OAuth 클라이언트. 🔴 생성·회전 응답의 `data.clientSecret`은 이때 한 번만 보인다.
|
|
584
|
+
* 삭제는 발급 토큰을 무효화한다(destructive — CLI가 `--allow-destructive`를 요구).
|
|
585
|
+
*/
|
|
586
|
+
oauthClients: {
|
|
587
|
+
upsert: (key: string, input: PlatformOAuthClientUpsertInput) => Promise<PlatformWriteResult<PlatformOAuthClientResource>>;
|
|
588
|
+
rotateSecret: (key: string) => Promise<PlatformOAuthClientResource>;
|
|
589
|
+
delete: (key: string, options?: {
|
|
590
|
+
allowDestructive?: boolean;
|
|
591
|
+
}) => Promise<{
|
|
592
|
+
id: string;
|
|
593
|
+
deleted: boolean;
|
|
594
|
+
}>;
|
|
595
|
+
import: (key: string, input: PlatformOAuthClientImportInput) => Promise<PlatformOAuthClientResource>;
|
|
596
|
+
};
|
|
597
|
+
/** RFC-0030 2단계 — EAV 스키마 연산을 한 트랜잭션으로. 레코드가 남은 삭제는 allowDestructive 없이 409. */
|
|
598
|
+
eav: {
|
|
599
|
+
applySchema: (input: PlatformEavSchemaApplyInput) => Promise<PlatformEavSchemaApplyResult>;
|
|
600
|
+
};
|
|
601
|
+
/**
|
|
602
|
+
* RFC-0030 — 워크스페이스 apply 락(Redis, TTL 30분, fail-closed). 잡혀 있으면 `PlatformApiError`
|
|
603
|
+
* code `LOCK_HELD`(409), Redis 불가면 `LOCK_UNAVAILABLE`(503). EAV 마이그레이션 러너와 같은 락이다.
|
|
604
|
+
*/
|
|
605
|
+
lock: {
|
|
606
|
+
acquire: (holderId: string) => Promise<PlatformLockAcquired>;
|
|
607
|
+
release: (holderId: string) => Promise<PlatformLockReleased>;
|
|
237
608
|
};
|
|
238
609
|
webhooks: {
|
|
239
610
|
list: () => Promise<PlatformWebhook[]>;
|
|
@@ -249,5 +620,5 @@ type PlatformClient = {
|
|
|
249
620
|
};
|
|
250
621
|
declare function createPlatformClient(config: PlatformClientConfig): PlatformClient;
|
|
251
622
|
//#endregion
|
|
252
|
-
export { DEFAULT_PLATFORM_SCOPES, PLATFORM_TASK_OUTCOMES, PLATFORM_TASK_PRIORITIES, PLATFORM_WEBHOOK_TRIGGERS, PlatformApiError, type PlatformClient, type PlatformClientConfig, type PlatformErrorBody, type PlatformMe, type PlatformPipeline, type PlatformTask, type PlatformTaskOutcome, type PlatformTaskPriority, type PlatformTaskStage, type PlatformTaskStageInput, type PlatformTaskUpsertInput, type PlatformUrls, type PlatformWebhook, type PlatformWebhookTrigger, type PlatformWebhookUpsertInput, type PlatformWorkTaskStageChangedEvent, type PlatformWriteMeta, type PlatformWriteResult, REOPT_PLATFORM_ID_URLS, REOPT_PLATFORM_URLS, createPlatformClient, platformErrorSchema, platformExternalIdSchema, platformMeSchema, platformPipelineSchema, platformTaskSchema, platformTaskStageInputSchema, platformTaskStageSchema, platformTaskUpsertInputSchema, platformWebhookSchema, platformWebhookUpsertInputSchema, platformWorkTaskStageChangedEventSchema, platformWriteMetaSchema, resolvePlatformUrls };
|
|
623
|
+
export { DEFAULT_PLATFORM_SCOPES, PLATFORM_ADMIN_SCOPE, PLATFORM_BRANDAPP_STATUSES, PLATFORM_DOMAIN_STATUSES, PLATFORM_MANAGED_BY_VALUES, PLATFORM_OAUTH_APPLICATION_TYPES, PLATFORM_OAUTH_GRANT_TYPES, PLATFORM_STAGE_COLORS, PLATFORM_TASK_OUTCOMES, PLATFORM_TASK_PRIORITIES, PLATFORM_TOKEN_ENDPOINT_AUTH_METHODS, PLATFORM_WEBHOOK_TRIGGERS, PlatformApiError, type PlatformBrandImportInput, type PlatformBrandResource, type PlatformBrandUpsertInput, type PlatformBrandappResource, type PlatformBrandappUpsertInput, type PlatformClient, type PlatformClientConfig, type PlatformCustomerUpsertInput, type PlatformDomainStatus, type PlatformEavBrandappResources, type PlatformEavEntityResource, type PlatformEavSchemaApplyInput, type PlatformEavSchemaApplyResult, type PlatformEavSchemaOperation, type PlatformErrorBody, type PlatformLockAcquired, type PlatformLockReleased, type PlatformManagedBy, type PlatformMe, type PlatformOAuthClientImportInput, type PlatformOAuthClientResource, type PlatformOAuthClientUpsertInput, type PlatformPipeline, type PlatformPipelineImportInput, type PlatformPipelineResource, type PlatformPipelineStageInput, type PlatformPipelineUpsertInput, type PlatformResources, type PlatformResourcesV2, type PlatformStageColor, type PlatformTask, type PlatformTaskOutcome, type PlatformTaskPriority, type PlatformTaskStage, type PlatformTaskStageInput, type PlatformTaskUpsertInput, type PlatformUrls, type PlatformWebhook, type PlatformWebhookResource, type PlatformWebhookTrigger, type PlatformWebhookUpsertInput, type PlatformWorkTaskStageChangedEvent, type PlatformWriteMeta, type PlatformWriteResult, REOPT_PLATFORM_ID_URLS, REOPT_PLATFORM_URLS, createPlatformClient, platformBrandImportInputSchema, platformBrandResourceSchema, platformBrandUpsertInputSchema, platformBrandappResourceSchema, platformBrandappUpsertInputSchema, platformCustomerUpsertInputSchema, platformEavBrandappResourcesSchema, platformEavEntityResourceSchema, platformEavSchemaApplyInputSchema, platformEavSchemaApplyResultSchema, platformEavSchemaOperationSchema, platformErrorSchema, platformExternalIdSchema, platformLockAcquiredSchema, platformLockReleasedSchema, platformMeSchema, platformOAuthClientImportInputSchema, platformOAuthClientResourceSchema, platformOAuthClientUpsertInputSchema, platformPipelineImportInputSchema, platformPipelineResourceSchema, platformPipelineSchema, platformPipelineStageInputSchema, platformPipelineUpsertInputSchema, platformResourceKeySchema, platformResourcesSchema, platformResourcesV2Schema, platformTaskSchema, platformTaskStageInputSchema, platformTaskStageSchema, platformTaskUpsertInputSchema, platformWebhookResourceSchema, platformWebhookSchema, platformWebhookUpsertInputSchema, platformWorkTaskStageChangedEventSchema, platformWriteMetaSchema, resolvePlatformUrls };
|
|
253
624
|
//# sourceMappingURL=index.d.ts.map
|