@k-msg/core 0.2.0 → 0.3.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 +25 -25
- package/dist/index.js.map +5 -5
- package/dist/index.mjs +25 -25
- 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/standard.d.ts +28 -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" | "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/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,31 @@ export interface StandardRequest {
|
|
|
39
39
|
scheduledAt?: Date;
|
|
40
40
|
senderNumber?: string;
|
|
41
41
|
subject?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Provider-specific KakaoTalk options (e.g. SOLAPI kakaoOptions).
|
|
44
|
+
*/
|
|
45
|
+
kakaoOptions?: {
|
|
46
|
+
pfId?: string;
|
|
47
|
+
templateId?: string;
|
|
48
|
+
variables?: Record<string, string>;
|
|
49
|
+
disableSms?: boolean;
|
|
50
|
+
adFlag?: boolean;
|
|
51
|
+
buttons?: unknown[];
|
|
52
|
+
imageId?: string;
|
|
53
|
+
[key: string]: unknown;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Provider-specific RCS options (e.g. SOLAPI rcsOptions).
|
|
57
|
+
*/
|
|
58
|
+
rcsOptions?: {
|
|
59
|
+
brandId?: string;
|
|
60
|
+
templateId?: string;
|
|
61
|
+
variables?: Record<string, string>;
|
|
62
|
+
disableSms?: boolean;
|
|
63
|
+
buttons?: unknown[];
|
|
64
|
+
additionalBody?: unknown;
|
|
65
|
+
[key: string]: unknown;
|
|
66
|
+
};
|
|
42
67
|
[key: string]: any;
|
|
43
68
|
};
|
|
44
69
|
}
|
|
@@ -49,7 +74,7 @@ export interface StandardResult {
|
|
|
49
74
|
timestamp: Date;
|
|
50
75
|
phoneNumber: string;
|
|
51
76
|
error?: StandardError;
|
|
52
|
-
metadata?: Record<string,
|
|
77
|
+
metadata?: Record<string, unknown>;
|
|
53
78
|
}
|
|
54
79
|
export declare enum TemplateCategory {
|
|
55
80
|
AUTHENTICATION = "AUTHENTICATION",
|