@k-msg/core 0.9.0 → 0.10.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.
@@ -1,6 +1,6 @@
1
1
  import type { KMsgError } from "./errors";
2
2
  import type { Result } from "./result";
3
- import type { DeliveryStatusQuery, DeliveryStatusResult, KakaoChannel, KakaoChannelCategories, MessageType, SendOptions, SendResult } from "./types/index";
3
+ import type { DeliveryStatusQuery, DeliveryStatusResult, KakaoChannel, KakaoChannelCategories, MessageType, ProviderOnboardingSpec, SendOptions, SendResult } from "./types/index";
4
4
  export interface Template {
5
5
  id: string;
6
6
  code: string;
@@ -71,4 +71,5 @@ export interface Provider {
71
71
  healthCheck(): Promise<ProviderHealthStatus>;
72
72
  send(params: SendOptions): Promise<Result<SendResult, KMsgError>>;
73
73
  getDeliveryStatus?(query: DeliveryStatusQuery): Promise<Result<DeliveryStatusResult | null, KMsgError>>;
74
+ getOnboardingSpec?(): ProviderOnboardingSpec;
74
75
  }
@@ -3,3 +3,4 @@ export * from "./delivery-status";
3
3
  export * from "./history";
4
4
  export * from "./kakao-channel";
5
5
  export * from "./message";
6
+ export * from "./onboarding";
@@ -66,6 +66,7 @@ export interface CommonSendOptions {
66
66
  }
67
67
  export interface KakaoSendOptions {
68
68
  profileId?: string;
69
+ plusId?: string;
69
70
  disableSms?: boolean;
70
71
  adFlag?: boolean;
71
72
  buttons?: unknown[];
@@ -0,0 +1,42 @@
1
+ export type ProviderOnboardingCheckKind = "manual" | "config" | "capability" | "api_probe" | "inference";
2
+ export type ProviderOnboardingSeverity = "blocker" | "warning" | "info";
3
+ export type ProviderOnboardingScope = "doctor" | "preflight" | "send";
4
+ export type ProviderPlusIdPolicy = "optional" | "required" | "required_if_no_inference";
5
+ export type ProviderPlusIdInferenceSupport = "supported" | "unsupported";
6
+ export type ProviderChannelOnboardingMode = "manual" | "api" | "none";
7
+ export type ProviderTemplateLifecycleAvailability = "available" | "unavailable";
8
+ export type ProviderLiveTestSupport = "supported" | "partial" | "none";
9
+ export type ProviderOnboardingProbeOperation = "list_templates" | "list_kakao_channels";
10
+ export interface ProviderOnboardingCheckSpec {
11
+ id: string;
12
+ title: string;
13
+ description?: string;
14
+ kind: ProviderOnboardingCheckKind;
15
+ severity: ProviderOnboardingSeverity;
16
+ scopes: ProviderOnboardingScope[];
17
+ /**
18
+ * Relative key paths under provider config (e.g. "apiKey", "nested.token").
19
+ * Used when kind === "config".
20
+ */
21
+ configKeys?: string[];
22
+ /**
23
+ * Method names that must exist on provider instances.
24
+ * Used when kind === "capability".
25
+ */
26
+ capabilityMethods?: string[];
27
+ /**
28
+ * Well-known probe operation used when kind === "api_probe".
29
+ */
30
+ probeOperation?: ProviderOnboardingProbeOperation;
31
+ }
32
+ export interface ProviderOnboardingSpec {
33
+ providerId: string;
34
+ providerName?: string;
35
+ channelOnboarding: ProviderChannelOnboardingMode;
36
+ templateLifecycleApi: ProviderTemplateLifecycleAvailability;
37
+ plusIdPolicy: ProviderPlusIdPolicy;
38
+ plusIdInference: ProviderPlusIdInferenceSupport;
39
+ liveTestSupport?: ProviderLiveTestSupport;
40
+ checks: ProviderOnboardingCheckSpec[];
41
+ notes?: string[];
42
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k-msg/core",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "packageManager": "bun@1.3.8",
5
5
  "description": "Core types and interfaces for K-Message platform",
6
6
  "type": "module",