@k-msg/core 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/config.d.ts +4 -2
- package/dist/index.js +19 -19
- package/dist/index.js.map +5 -5
- package/dist/index.mjs +19 -19
- package/dist/index.mjs.map +5 -5
- package/dist/types/history.d.ts +9 -0
- package/dist/types/message.d.ts +1 -1
- package/dist/types/platform.d.ts +51 -0
- package/dist/types/standard.d.ts +75 -3
- package/package.json +1 -1
package/dist/types/history.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ export interface HistoryQuery {
|
|
|
6
6
|
endDate: string | Date;
|
|
7
7
|
page?: number;
|
|
8
8
|
pageSize?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Cursor key for providers that use cursor-based pagination (e.g. SOLAPI).
|
|
11
|
+
* When provided, it takes precedence over `page`.
|
|
12
|
+
*/
|
|
13
|
+
startKey?: string;
|
|
9
14
|
phone?: string;
|
|
10
15
|
requestNo?: string;
|
|
11
16
|
companyId?: string;
|
|
@@ -26,6 +31,10 @@ export interface HistoryResult {
|
|
|
26
31
|
providerId: string;
|
|
27
32
|
channel: HistoryChannel;
|
|
28
33
|
totalCount: number;
|
|
34
|
+
/**
|
|
35
|
+
* Cursor key for fetching the next page when provider supports cursor pagination.
|
|
36
|
+
*/
|
|
37
|
+
nextKey?: string | null;
|
|
29
38
|
items: HistoryItem[];
|
|
30
39
|
raw?: unknown;
|
|
31
40
|
}
|
package/dist/types/message.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type MessageType = "ALIMTALK" | "FRIENDTALK" | "SMS" | "LMS" | "MMS";
|
|
1
|
+
export type MessageType = "ALIMTALK" | "FRIENDTALK" | "SMS" | "LMS" | "MMS" | "NSA" | "VOICE" | "FAX" | "RCS_SMS" | "RCS_LMS" | "RCS_MMS" | "RCS_TPL" | "RCS_ITPL" | "RCS_LTPL";
|
|
2
2
|
export interface BaseOptions {
|
|
3
3
|
to: string;
|
|
4
4
|
from: string;
|
package/dist/types/platform.d.ts
CHANGED
|
@@ -38,6 +38,57 @@ export interface UnifiedMessageSendOptions {
|
|
|
38
38
|
scheduledAt?: Date;
|
|
39
39
|
senderNumber?: string;
|
|
40
40
|
subject?: string;
|
|
41
|
+
country?: string;
|
|
42
|
+
customFields?: Record<string, string>;
|
|
43
|
+
kakaoOptions?: {
|
|
44
|
+
pfId?: string;
|
|
45
|
+
templateId?: string;
|
|
46
|
+
variables?: Record<string, string>;
|
|
47
|
+
disableSms?: boolean;
|
|
48
|
+
adFlag?: boolean;
|
|
49
|
+
buttons?: unknown[];
|
|
50
|
+
imageId?: string;
|
|
51
|
+
[key: string]: unknown;
|
|
52
|
+
};
|
|
53
|
+
naverOptions?: {
|
|
54
|
+
talkId?: string;
|
|
55
|
+
templateId?: string;
|
|
56
|
+
disableSms?: boolean;
|
|
57
|
+
variables?: Record<string, string>;
|
|
58
|
+
buttons?: unknown[];
|
|
59
|
+
[key: string]: unknown;
|
|
60
|
+
};
|
|
61
|
+
voiceOptions?: {
|
|
62
|
+
voiceType: "FEMALE" | "MALE";
|
|
63
|
+
headerMessage?: string;
|
|
64
|
+
tailMessage?: string;
|
|
65
|
+
replyRange?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
66
|
+
counselorNumber?: string;
|
|
67
|
+
[key: string]: unknown;
|
|
68
|
+
};
|
|
69
|
+
faxOptions?: {
|
|
70
|
+
fileIds?: string[];
|
|
71
|
+
fileUrls?: string[];
|
|
72
|
+
[key: string]: unknown;
|
|
73
|
+
};
|
|
74
|
+
rcsOptions?: {
|
|
75
|
+
brandId?: string;
|
|
76
|
+
templateId?: string;
|
|
77
|
+
copyAllowed?: boolean;
|
|
78
|
+
variables?: Record<string, string>;
|
|
79
|
+
mmsType?: "M3" | "S3" | "M4" | "S4" | "M5" | "S5" | "M6" | "S6";
|
|
80
|
+
commercialType?: boolean;
|
|
81
|
+
disableSms?: boolean;
|
|
82
|
+
buttons?: unknown[];
|
|
83
|
+
additionalBody?: {
|
|
84
|
+
title?: string;
|
|
85
|
+
description?: string;
|
|
86
|
+
imageId?: string;
|
|
87
|
+
buttons?: unknown[];
|
|
88
|
+
[key: string]: unknown;
|
|
89
|
+
};
|
|
90
|
+
[key: string]: unknown;
|
|
91
|
+
};
|
|
41
92
|
[key: string]: unknown;
|
|
42
93
|
};
|
|
43
94
|
}
|
package/dist/types/standard.d.ts
CHANGED
|
@@ -25,13 +25,13 @@ export interface StandardError {
|
|
|
25
25
|
code: StandardErrorCode;
|
|
26
26
|
message: string;
|
|
27
27
|
retryable: boolean;
|
|
28
|
-
details?: Record<string,
|
|
28
|
+
details?: Record<string, unknown>;
|
|
29
29
|
}
|
|
30
30
|
export interface StandardRequest {
|
|
31
31
|
channel?: MessageType;
|
|
32
32
|
templateCode: string;
|
|
33
33
|
phoneNumber: string;
|
|
34
|
-
variables: Record<string,
|
|
34
|
+
variables: Record<string, unknown>;
|
|
35
35
|
text?: string;
|
|
36
36
|
imageUrl?: string;
|
|
37
37
|
buttons?: Button[];
|
|
@@ -39,6 +39,78 @@ export interface StandardRequest {
|
|
|
39
39
|
scheduledAt?: Date;
|
|
40
40
|
senderNumber?: string;
|
|
41
41
|
subject?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Optional international country code for providers that support it (e.g. SOLAPI).
|
|
44
|
+
*/
|
|
45
|
+
country?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Provider-supported custom fields (string values only).
|
|
48
|
+
*/
|
|
49
|
+
customFields?: Record<string, string>;
|
|
50
|
+
/**
|
|
51
|
+
* Provider-specific KakaoTalk options (e.g. SOLAPI kakaoOptions).
|
|
52
|
+
*/
|
|
53
|
+
kakaoOptions?: {
|
|
54
|
+
pfId?: string;
|
|
55
|
+
templateId?: string;
|
|
56
|
+
variables?: Record<string, string>;
|
|
57
|
+
disableSms?: boolean;
|
|
58
|
+
adFlag?: boolean;
|
|
59
|
+
buttons?: unknown[];
|
|
60
|
+
imageId?: string;
|
|
61
|
+
[key: string]: unknown;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Provider-specific Naver SmartAlert options (e.g. SOLAPI naverOptions).
|
|
65
|
+
*/
|
|
66
|
+
naverOptions?: {
|
|
67
|
+
talkId?: string;
|
|
68
|
+
templateId?: string;
|
|
69
|
+
disableSms?: boolean;
|
|
70
|
+
variables?: Record<string, string>;
|
|
71
|
+
buttons?: unknown[];
|
|
72
|
+
[key: string]: unknown;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Provider-specific voice(TTS) options (e.g. SOLAPI voiceOptions).
|
|
76
|
+
*/
|
|
77
|
+
voiceOptions?: {
|
|
78
|
+
voiceType: "FEMALE" | "MALE";
|
|
79
|
+
headerMessage?: string;
|
|
80
|
+
tailMessage?: string;
|
|
81
|
+
replyRange?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
82
|
+
counselorNumber?: string;
|
|
83
|
+
[key: string]: unknown;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Provider-specific fax options (e.g. SOLAPI faxOptions).
|
|
87
|
+
*/
|
|
88
|
+
faxOptions?: {
|
|
89
|
+
fileIds?: string[];
|
|
90
|
+
fileUrls?: string[];
|
|
91
|
+
[key: string]: unknown;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Provider-specific RCS options (e.g. SOLAPI rcsOptions).
|
|
95
|
+
*/
|
|
96
|
+
rcsOptions?: {
|
|
97
|
+
brandId?: string;
|
|
98
|
+
templateId?: string;
|
|
99
|
+
copyAllowed?: boolean;
|
|
100
|
+
variables?: Record<string, string>;
|
|
101
|
+
mmsType?: "M3" | "S3" | "M4" | "S4" | "M5" | "S5" | "M6" | "S6";
|
|
102
|
+
commercialType?: boolean;
|
|
103
|
+
disableSms?: boolean;
|
|
104
|
+
buttons?: unknown[];
|
|
105
|
+
additionalBody?: {
|
|
106
|
+
title?: string;
|
|
107
|
+
description?: string;
|
|
108
|
+
imageId?: string;
|
|
109
|
+
buttons?: unknown[];
|
|
110
|
+
[key: string]: unknown;
|
|
111
|
+
};
|
|
112
|
+
[key: string]: unknown;
|
|
113
|
+
};
|
|
42
114
|
[key: string]: any;
|
|
43
115
|
};
|
|
44
116
|
}
|
|
@@ -49,7 +121,7 @@ export interface StandardResult {
|
|
|
49
121
|
timestamp: Date;
|
|
50
122
|
phoneNumber: string;
|
|
51
123
|
error?: StandardError;
|
|
52
|
-
metadata?: Record<string,
|
|
124
|
+
metadata?: Record<string, unknown>;
|
|
53
125
|
}
|
|
54
126
|
export declare enum TemplateCategory {
|
|
55
127
|
AUTHENTICATION = "AUTHENTICATION",
|