@k-msg/provider 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/solapi.adapter.d.ts +48 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +84 -24
- package/dist/index.js.map +208 -6
- package/dist/index.mjs +84 -24
- package/dist/index.mjs.map +208 -6
- package/dist/solapi/provider.d.ts +16 -0
- package/dist/solapi/types/solapi.d.ts +31 -0
- package/package.json +3 -2
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type StandardRequest, type StandardResult, UniversalProvider } from "@k-msg/core";
|
|
2
|
+
import { type SolapiSdkClient } from "../adapters/solapi.adapter";
|
|
3
|
+
import type { SolapiConfig } from "./types/solapi";
|
|
4
|
+
export declare class SolapiProvider extends UniversalProvider {
|
|
5
|
+
constructor(config: SolapiConfig, client?: SolapiSdkClient);
|
|
6
|
+
send(params: StandardRequest): Promise<StandardResult>;
|
|
7
|
+
send(params: unknown): Promise<unknown>;
|
|
8
|
+
getBalance(): Promise<number>;
|
|
9
|
+
}
|
|
10
|
+
export declare const createSolapiProvider: (config: SolapiConfig) => SolapiProvider;
|
|
11
|
+
export declare const createDefaultSolapiProvider: () => SolapiProvider;
|
|
12
|
+
export declare class SolapiProviderFactory {
|
|
13
|
+
static create(config: SolapiConfig): SolapiProvider;
|
|
14
|
+
static createDefault(): SolapiProvider;
|
|
15
|
+
}
|
|
16
|
+
export declare function initializeSolapi(): void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ProviderConfig } from "@k-msg/core";
|
|
2
|
+
export interface SolapiConfig extends ProviderConfig {
|
|
3
|
+
/**
|
|
4
|
+
* SOLAPI API Secret
|
|
5
|
+
*/
|
|
6
|
+
apiSecret: string;
|
|
7
|
+
/**
|
|
8
|
+
* Default sender number (SMS/LMS/MMS/RCS).
|
|
9
|
+
*/
|
|
10
|
+
defaultFrom?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Default Kakao PF ID (for ALIMTALK/FRIENDTALK).
|
|
13
|
+
*/
|
|
14
|
+
kakaoPfId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Default RCS Brand ID.
|
|
17
|
+
*/
|
|
18
|
+
rcsBrandId?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Default Naver Talk ID (for NSA).
|
|
21
|
+
*/
|
|
22
|
+
naverTalkId?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Optional appId for Solapi send APIs.
|
|
25
|
+
*/
|
|
26
|
+
appId?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Default country code (e.g. "82"). Optional.
|
|
29
|
+
*/
|
|
30
|
+
defaultCountry?: string;
|
|
31
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k-msg/provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"packageManager": "bun@1.3.8",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Complete provider system with adapters and implementations for K-Message platform",
|
|
@@ -55,7 +55,8 @@
|
|
|
55
55
|
"publish": "bun publish --access public"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@k-msg/core": "0.
|
|
58
|
+
"@k-msg/core": "0.4.0",
|
|
59
|
+
"solapi": "^5.5.4",
|
|
59
60
|
"zod": "^4.0.14"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|