@ingestkorea/client-sens 1.7.0 → 1.9.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.
Files changed (157) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +98 -63
  3. package/dist-cjs/SensClient.js +57 -28
  4. package/dist-cjs/commands/GetAlimtalkResultCommand.js +5 -32
  5. package/dist-cjs/commands/GetAlimtalkStatusCommand.js +7 -35
  6. package/dist-cjs/commands/GetAlimtalkTemplateCommand.js +5 -32
  7. package/dist-cjs/commands/GetSMSResultCommand.js +8 -33
  8. package/dist-cjs/commands/GetSMSStatusCommand.js +7 -33
  9. package/dist-cjs/commands/ListAlimtalkChannelsCommand.js +6 -33
  10. package/dist-cjs/commands/ListAlimtalkStatusCommand.js +29 -35
  11. package/dist-cjs/commands/ListAlimtalkTemplatesCommand.js +5 -32
  12. package/dist-cjs/commands/ListSMSStatusCommand.js +37 -0
  13. package/dist-cjs/commands/SendAlimtalkCommand.js +36 -44
  14. package/dist-cjs/commands/SendMMSCommand.js +67 -103
  15. package/dist-cjs/commands/SendSMSCommand.js +38 -71
  16. package/dist-cjs/commands/constants.js +57 -14
  17. package/dist-cjs/commands/index.js +12 -11
  18. package/dist-cjs/index.js +2 -2
  19. package/dist-cjs/middleware/constants.js +10 -0
  20. package/dist-cjs/middleware/index.js +3 -4
  21. package/dist-cjs/middleware/middleware-metadata.js +4 -5
  22. package/dist-cjs/middleware/middleware-retry.js +32 -27
  23. package/dist-cjs/middleware/middleware-sign.js +10 -9
  24. package/dist-cjs/models/SendAlimtalk.js +3 -0
  25. package/dist-cjs/models/SendMMS.js +3 -0
  26. package/dist-cjs/models/SensClient.js +2 -0
  27. package/dist-cjs/models/SensErrorInfo.js +13 -0
  28. package/dist-cjs/models/SensMiddleware.js +2 -0
  29. package/dist-cjs/models/index.js +17 -14
  30. package/dist-cjs/protocols/GetAlimtalkResult.js +19 -22
  31. package/dist-cjs/protocols/GetAlimtalkStatus.js +39 -40
  32. package/dist-cjs/protocols/GetAlimtalkTemplate.js +56 -90
  33. package/dist-cjs/protocols/GetSMSResult.js +31 -48
  34. package/dist-cjs/protocols/GetSMSStatus.js +51 -37
  35. package/dist-cjs/protocols/ListAlimtalkChannels.js +27 -31
  36. package/dist-cjs/protocols/ListAlimtalkStatus.js +22 -19
  37. package/dist-cjs/protocols/ListAlimtalkTemplates.js +33 -25
  38. package/dist-cjs/protocols/ListSMSStatus.js +48 -0
  39. package/dist-cjs/protocols/SendAlimtalk.js +23 -27
  40. package/dist-cjs/protocols/SendMMS.js +8 -38
  41. package/dist-cjs/protocols/SendSMS.js +20 -22
  42. package/dist-cjs/protocols/constants.js +103 -34
  43. package/dist-es/SensClient.js +63 -30
  44. package/dist-es/commands/GetAlimtalkResultCommand.js +9 -19
  45. package/dist-es/commands/GetAlimtalkStatusCommand.js +12 -19
  46. package/dist-es/commands/GetAlimtalkTemplateCommand.js +9 -19
  47. package/dist-es/commands/GetSMSResultCommand.js +10 -20
  48. package/dist-es/commands/GetSMSStatusCommand.js +13 -20
  49. package/dist-es/commands/ListAlimtalkChannelsCommand.js +10 -22
  50. package/dist-es/commands/ListAlimtalkStatusCommand.js +39 -28
  51. package/dist-es/commands/ListAlimtalkTemplatesCommand.js +9 -19
  52. package/dist-es/commands/ListSMSStatusCommand.js +48 -0
  53. package/dist-es/commands/SendAlimtalkCommand.js +35 -30
  54. package/dist-es/commands/SendMMSCommand.js +70 -100
  55. package/dist-es/commands/SendSMSCommand.js +51 -66
  56. package/dist-es/commands/constants.js +65 -15
  57. package/dist-es/commands/index.js +28 -11
  58. package/dist-es/index.js +18 -2
  59. package/dist-es/middleware/constants.js +10 -0
  60. package/dist-es/middleware/index.js +19 -4
  61. package/dist-es/middleware/middleware-metadata.js +11 -5
  62. package/dist-es/middleware/middleware-retry.js +39 -30
  63. package/dist-es/middleware/middleware-sign.js +19 -14
  64. package/dist-es/models/GetAlimtalkResult.js +2 -1
  65. package/dist-es/models/GetAlimtalkStatus.js +2 -1
  66. package/dist-es/models/GetAlimtalkTemplate.js +2 -1
  67. package/dist-es/models/GetSMSResult.js +2 -1
  68. package/dist-es/models/GetSMSStatus.js +2 -1
  69. package/dist-es/models/ListAlimtalkChannels.js +2 -1
  70. package/dist-es/models/ListAlimtalkStatus.js +2 -1
  71. package/dist-es/models/ListAlimtalkTemplates.js +2 -1
  72. package/dist-es/models/ListSMSStatus.js +2 -0
  73. package/dist-es/models/MetadataBearer.js +2 -1
  74. package/dist-es/models/SendAlimtalk.js +5 -1
  75. package/dist-es/models/SendMMS.js +5 -1
  76. package/dist-es/models/SendSMS.js +2 -1
  77. package/dist-es/models/SensClient.js +2 -0
  78. package/dist-es/models/SensCommand.js +5 -1
  79. package/dist-es/models/SensErrorInfo.js +13 -0
  80. package/dist-es/models/SensMiddleware.js +2 -0
  81. package/dist-es/models/index.js +33 -14
  82. package/dist-es/protocols/GetAlimtalkResult.js +24 -23
  83. package/dist-es/protocols/GetAlimtalkStatus.js +51 -47
  84. package/dist-es/protocols/GetAlimtalkTemplate.js +78 -87
  85. package/dist-es/protocols/GetSMSResult.js +40 -47
  86. package/dist-es/protocols/GetSMSStatus.js +55 -37
  87. package/dist-es/protocols/ListAlimtalkChannels.js +31 -31
  88. package/dist-es/protocols/ListAlimtalkStatus.js +26 -32
  89. package/dist-es/protocols/ListAlimtalkTemplates.js +37 -24
  90. package/dist-es/protocols/ListSMSStatus.js +42 -0
  91. package/dist-es/protocols/SendAlimtalk.js +27 -26
  92. package/dist-es/protocols/SendMMS.js +10 -49
  93. package/dist-es/protocols/SendSMS.js +24 -31
  94. package/dist-es/protocols/constants.js +119 -39
  95. package/dist-types/SensClient.d.ts +3 -20
  96. package/dist-types/commands/GetAlimtalkResultCommand.d.ts +5 -10
  97. package/dist-types/commands/GetAlimtalkStatusCommand.d.ts +5 -10
  98. package/dist-types/commands/GetAlimtalkTemplateCommand.d.ts +5 -10
  99. package/dist-types/commands/GetSMSResultCommand.d.ts +5 -10
  100. package/dist-types/commands/GetSMSStatusCommand.d.ts +5 -10
  101. package/dist-types/commands/ListAlimtalkChannelsCommand.d.ts +5 -10
  102. package/dist-types/commands/ListAlimtalkStatusCommand.d.ts +5 -10
  103. package/dist-types/commands/ListAlimtalkTemplatesCommand.d.ts +5 -10
  104. package/dist-types/commands/ListSMSStatusCommand.d.ts +11 -0
  105. package/dist-types/commands/SendAlimtalkCommand.d.ts +5 -10
  106. package/dist-types/commands/SendMMSCommand.d.ts +5 -10
  107. package/dist-types/commands/SendSMSCommand.d.ts +9 -10
  108. package/dist-types/commands/constants.d.ts +14 -4
  109. package/dist-types/commands/index.d.ts +12 -11
  110. package/dist-types/index.d.ts +2 -2
  111. package/dist-types/middleware/constants.d.ts +7 -0
  112. package/dist-types/middleware/index.d.ts +3 -4
  113. package/dist-types/middleware/middleware-metadata.d.ts +2 -2
  114. package/dist-types/middleware/middleware-retry.d.ts +2 -2
  115. package/dist-types/middleware/middleware-sign.d.ts +2 -2
  116. package/dist-types/models/GetAlimtalkResult.d.ts +3 -3
  117. package/dist-types/models/GetAlimtalkStatus.d.ts +8 -5
  118. package/dist-types/models/GetAlimtalkTemplate.d.ts +5 -5
  119. package/dist-types/models/GetSMSResult.d.ts +7 -15
  120. package/dist-types/models/GetSMSStatus.d.ts +19 -4
  121. package/dist-types/models/ListAlimtalkChannels.d.ts +4 -4
  122. package/dist-types/models/ListAlimtalkStatus.d.ts +8 -8
  123. package/dist-types/models/ListAlimtalkTemplates.d.ts +2 -2
  124. package/dist-types/models/ListSMSStatus.d.ts +15 -0
  125. package/dist-types/models/MetadataBearer.d.ts +3 -3
  126. package/dist-types/models/SendAlimtalk.d.ts +7 -4
  127. package/dist-types/models/SendMMS.d.ts +5 -3
  128. package/dist-types/models/SendSMS.d.ts +2 -2
  129. package/dist-types/models/SensClient.d.ts +17 -0
  130. package/dist-types/models/SensCommand.d.ts +4 -6
  131. package/dist-types/models/SensErrorInfo.d.ts +21 -0
  132. package/dist-types/models/SensMiddleware.d.ts +8 -0
  133. package/dist-types/models/index.d.ts +17 -14
  134. package/dist-types/protocols/GetAlimtalkResult.d.ts +4 -11
  135. package/dist-types/protocols/GetAlimtalkStatus.d.ts +6 -12
  136. package/dist-types/protocols/GetAlimtalkTemplate.d.ts +4 -14
  137. package/dist-types/protocols/GetSMSResult.d.ts +4 -12
  138. package/dist-types/protocols/GetSMSStatus.d.ts +6 -11
  139. package/dist-types/protocols/ListAlimtalkChannels.d.ts +4 -11
  140. package/dist-types/protocols/ListAlimtalkStatus.d.ts +4 -10
  141. package/dist-types/protocols/ListAlimtalkTemplates.d.ts +5 -12
  142. package/dist-types/protocols/ListSMSStatus.d.ts +4 -0
  143. package/dist-types/protocols/SendAlimtalk.d.ts +5 -12
  144. package/dist-types/protocols/SendMMS.d.ts +4 -10
  145. package/dist-types/protocols/SendSMS.d.ts +5 -10
  146. package/dist-types/protocols/constants.d.ts +4 -2
  147. package/package.json +20 -4
  148. package/.github/pull_request_template.md +0 -19
  149. package/dist-cjs/middleware/middleware-sort-headers.js +0 -25
  150. package/dist-cjs/protocols/index.js +0 -28
  151. package/dist-es/middleware/middleware-sort-headers.js +0 -12
  152. package/dist-es/models/Middleware.js +0 -1
  153. package/dist-es/protocols/index.js +0 -12
  154. package/dist-types/middleware/middleware-sort-headers.d.ts +0 -2
  155. package/dist-types/models/Middleware.d.ts +0 -12
  156. package/dist-types/protocols/index.d.ts +0 -12
  157. /package/dist-cjs/models/{Middleware.js → ListSMSStatus.js} +0 -0
@@ -1,9 +1,9 @@
1
- import { TemplateButton } from "./SendAlimtalk";
2
- export interface GetAlimtalkTemplateInput {
1
+ import { TemplateButton } from "./SendAlimtalk.js";
2
+ export interface GetAlimtalkTemplateRequest {
3
3
  channelId: string;
4
4
  templateCode: string;
5
5
  }
6
- export interface GetAlimtalkTemplateOutput {
6
+ export interface GetAlimtalkTemplateResult {
7
7
  templates?: TemplateDetail[];
8
8
  }
9
9
  export interface TemplateDetail {
@@ -24,7 +24,7 @@ export interface TemplateDetail {
24
24
  comments?: Comment[];
25
25
  templateInspectionStatus?: string;
26
26
  templateStatus?: string;
27
- buttons?: TemplateButtons[];
27
+ buttons?: TemplateButtonExtend[];
28
28
  securityFlag?: boolean;
29
29
  isBlock?: boolean;
30
30
  isDormant?: boolean;
@@ -40,6 +40,6 @@ export interface Attachment {
40
40
  fileName?: string;
41
41
  fileUrl?: string;
42
42
  }
43
- export interface TemplateButtons extends Partial<TemplateButton> {
43
+ export interface TemplateButtonExtend extends Partial<TemplateButton> {
44
44
  order?: number;
45
45
  }
@@ -1,26 +1,18 @@
1
- export interface GetSMSResultInput {
1
+ import { SMSMessageRequestStatus } from "./GetSMSStatus.js";
2
+ export interface GetSMSResultRequest {
2
3
  messageId: string;
3
4
  }
4
- export interface GetSMSResultOutput {
5
+ export interface GetSMSResultResult {
5
6
  statusCode?: string;
6
7
  statusName?: string;
7
- messages?: SMSResultMessage[];
8
+ messages?: SMSMessageStatus[];
8
9
  }
9
- export interface SMSResultMessage {
10
- requestTime?: string;
11
- contentType?: string;
10
+ export interface SMSMessageStatus extends SMSMessageRequestStatus {
11
+ subject?: string;
12
12
  content?: string;
13
- countryCode?: string;
14
- from?: string;
15
- to?: string;
16
- status?: string;
17
- statusCode?: string;
18
- statusMessage?: string;
19
- statusName?: string;
20
- completeTime?: string;
21
- telcoCode?: string;
22
13
  files?: File[];
23
14
  }
24
15
  export interface File {
16
+ fileId?: string;
25
17
  name?: string;
26
18
  }
@@ -1,17 +1,32 @@
1
- export interface GetSMSStatusInput {
1
+ export interface GetSMSStatusRequest {
2
2
  requestId: string;
3
+ pageSize?: number;
4
+ nextToken?: string;
3
5
  }
4
- export interface GetSMSStatusOutput {
6
+ export interface GetSMSStatusResult {
5
7
  requestId?: string;
6
8
  statusCode?: string;
7
9
  statusName?: string;
8
- messages?: SMSStatusMessage[];
10
+ messages?: SMSMessageRequestStatus[];
11
+ pageSize?: number;
12
+ pageIndex?: number;
13
+ itemCount?: number;
14
+ hasMore?: boolean;
15
+ nextToken?: string;
9
16
  }
10
- export interface SMSStatusMessage {
17
+ export interface SMSMessageRequestStatus {
18
+ requestId?: string;
11
19
  messageId?: string;
12
20
  requestTime?: string;
13
21
  contentType?: string;
22
+ type?: string;
14
23
  countryCode?: string;
15
24
  from?: string;
16
25
  to?: string;
26
+ completeTime?: string;
27
+ telcoCode?: string;
28
+ status?: string;
29
+ statusCode?: string;
30
+ statusName?: string;
31
+ statusMessage?: string;
17
32
  }
@@ -1,9 +1,9 @@
1
- export interface ListAlimtalkChannelsInput {
1
+ export interface ListAlimtalkChannelsRequest {
2
2
  }
3
- export interface ListAlimtalkChannelsOutput {
4
- channels: Channel[];
3
+ export interface ListAlimtalkChannelsResult {
4
+ channels: AlimtalkChannel[];
5
5
  }
6
- export interface Channel {
6
+ export interface AlimtalkChannel {
7
7
  createTime?: string;
8
8
  updateTime?: string;
9
9
  serviceId?: string;
@@ -1,16 +1,16 @@
1
- import { GetAlimtalkStatusOutput } from "./GetAlimtalkStatus";
2
- export interface ListAlimtalkStatusInput {
1
+ import { GetAlimtalkStatusResult } from "./GetAlimtalkStatus.js";
2
+ export interface ListAlimtalkStatusRequest {
3
3
  plusFriendId: string;
4
- requestId?: string;
5
- messageId?: string;
6
4
  requestStartTime?: string;
7
5
  requestEndTime?: string;
6
+ pageSize?: number;
8
7
  requestStatusName?: "success" | "fail";
9
- messageStatusName?: "success" | "fail" | "processing";
8
+ messageStatusName?: "success" | "processing" | "fail";
9
+ requestId?: string;
10
+ messageId?: string;
10
11
  templateCode?: string;
11
12
  to?: string;
12
- pageIndex?: number;
13
- pageSize?: number;
13
+ nextToken?: string;
14
14
  }
15
- export interface ListAlimtalkStatusOutput extends GetAlimtalkStatusOutput {
15
+ export interface ListAlimtalkStatusResult extends GetAlimtalkStatusResult {
16
16
  }
@@ -1,7 +1,7 @@
1
- export interface ListAlimtalkTemplatesInput {
1
+ export interface ListAlimtalkTemplatesRequest {
2
2
  channelId: string;
3
3
  }
4
- export interface ListAlimtalkTemplatesOutput {
4
+ export interface ListAlimtalkTemplatesResult {
5
5
  templates?: Template[];
6
6
  }
7
7
  export interface Template {
@@ -0,0 +1,15 @@
1
+ import { GetSMSStatusResult } from "./GetSMSStatus.js";
2
+ export interface ListSMSStatusRequest {
3
+ requestStartTime?: string;
4
+ requestEndTime?: string;
5
+ type?: "SMS" | "LMS" | "MMS";
6
+ contentType?: "COMM" | "AD";
7
+ status?: "READY" | "PROCESSING" | "COMPLETED";
8
+ from?: string;
9
+ to?: string;
10
+ statusName?: "success" | "fail";
11
+ pageSize?: number;
12
+ nextToken?: string;
13
+ }
14
+ export interface ListSMSStatusResult extends GetSMSStatusResult {
15
+ }
@@ -2,7 +2,7 @@ export interface MetadataBearer {
2
2
  $metadata: ResponseMetadata;
3
3
  }
4
4
  export interface ResponseMetadata {
5
- httpStatusCode?: number;
6
- attempts?: number;
7
- totalRetryDelay?: number;
5
+ httpStatusCode: number;
6
+ attempts: number;
7
+ totalRetryDelay: number;
8
8
  }
@@ -1,18 +1,21 @@
1
- export interface SendAlimtalkInput {
1
+ export declare const ALIMTALK_MAX_RECIPIENTS = 100;
2
+ export declare const ALIMTALK_MAX_CONTENT_LENGTH = 1000;
3
+ export interface SendAlimtalkRequest {
2
4
  plusFriendId: string;
3
5
  templateCode: string;
4
6
  messages: AlimtalkMessage[];
5
7
  }
6
- export interface SendAlimtalkOutput {
8
+ export interface SendAlimtalkResult {
7
9
  requestId?: string;
8
10
  requestTime?: string;
9
11
  statusCode?: string;
10
12
  statusName?: string;
11
- messages?: ReceivedMessage[];
13
+ messages?: AlimtalkMessageRequestStatus[];
12
14
  }
13
15
  export interface AlimtalkMessage {
14
16
  to: string;
15
17
  content: string;
18
+ useSmsFailover?: boolean;
16
19
  buttons?: TemplateButton[];
17
20
  }
18
21
  export interface TemplateButton {
@@ -27,7 +30,7 @@ declare const ALIMTALK_BUTTON_TYPES: readonly ["DS", "WL", "AL", "BK", "MD", "AC
27
30
  declare const ALIMTALK_BUTTON_NAMES: readonly ["배송 조회", "웹 링크", "앱 링크", "봇 키워드", "메시지 전달", "채널 추가"];
28
31
  export type AlimtalkButtonType = (typeof ALIMTALK_BUTTON_TYPES)[number];
29
32
  export type AlimtalkButtonName = (typeof ALIMTALK_BUTTON_NAMES)[number];
30
- export interface ReceivedMessage {
33
+ export interface AlimtalkMessageRequestStatus {
31
34
  messageId?: string;
32
35
  to?: string;
33
36
  countryCode?: string;
@@ -1,10 +1,12 @@
1
- import { SendSMSInput, SendSMSOutput } from "./SendSMS";
1
+ import { SendSMSRequest, SendSMSResult } from "./SendSMS.js";
2
+ export declare const MMS_MAX_SUPPORT_FILE_SIZE = 300;
3
+ export declare const MMS_SUPPORT_FILE_EXTENSION: string[];
2
4
  export type SendFile = {
3
5
  name: string;
4
6
  body?: string;
5
7
  };
6
- export interface SendMMSInput extends SendSMSInput {
8
+ export interface SendMMSRequest extends SendSMSRequest {
7
9
  files: SendFile[];
8
10
  }
9
- export interface SendMMSOutput extends SendSMSOutput {
11
+ export interface SendMMSResult extends SendSMSResult {
10
12
  }
@@ -6,7 +6,7 @@ export type SMSMessage = {
6
6
  subject?: string;
7
7
  content?: string;
8
8
  };
9
- export interface SendSMSInput {
9
+ export interface SendSMSRequest {
10
10
  from: string;
11
11
  content: string;
12
12
  messages: SMSMessage[];
@@ -15,7 +15,7 @@ export interface SendSMSInput {
15
15
  countryCode?: CountryCode;
16
16
  subject?: string;
17
17
  }
18
- export interface SendSMSOutput {
18
+ export interface SendSMSResult {
19
19
  requestId?: string;
20
20
  requestTime?: string;
21
21
  statusCode?: string;
@@ -0,0 +1,17 @@
1
+ export type Credentials = {
2
+ accessKey: string;
3
+ secretKey: string;
4
+ };
5
+ export type ServiceId = {
6
+ kakao: string;
7
+ push: string;
8
+ sms: string;
9
+ };
10
+ export interface SensClientConfig {
11
+ credentials?: Partial<Credentials>;
12
+ serviceId?: Partial<ServiceId>;
13
+ }
14
+ export interface SensClientResolvedConfig {
15
+ credentials: Credentials;
16
+ serviceId: ServiceId;
17
+ }
@@ -1,11 +1,9 @@
1
1
  import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
- import { MetadataBearer } from "./MetadataBearer";
2
+ export type RequestSerializer<InputType, Config> = (input: InputType, config: Config) => Promise<HttpRequest>;
3
+ export type ResponseDeserializer<OutputType, Config> = (response: HttpResponse, config: Config) => Promise<OutputType>;
3
4
  export declare abstract class SensCommand<ClientInput, ClientOutput, ClientResolvedConfig> {
4
5
  input: ClientInput;
5
6
  constructor(input: ClientInput);
6
- abstract serialize(input: ClientInput, config: ClientResolvedConfig): Promise<HttpRequest>;
7
- abstract deserialize(output: {
8
- response: HttpResponse;
9
- output: MetadataBearer;
10
- }): Promise<ClientOutput>;
7
+ abstract serializer: RequestSerializer<ClientInput, ClientResolvedConfig>;
8
+ abstract deserializer: ResponseDeserializer<ClientOutput, ClientResolvedConfig>;
11
9
  }
@@ -0,0 +1,21 @@
1
+ export interface SensErrorResponse {
2
+ status: number;
3
+ errorMessage?: string;
4
+ errors?: object;
5
+ }
6
+ export interface SensErrorInput {
7
+ code: number;
8
+ type: string;
9
+ message: string;
10
+ invalidInputs?: InvalidInputs[];
11
+ }
12
+ export type InvalidInputs = {
13
+ type: string;
14
+ message: string;
15
+ };
16
+ export declare class SensError extends Error {
17
+ readonly code: number;
18
+ readonly type: string;
19
+ readonly invalidInputs: InvalidInputs[];
20
+ constructor(info: SensErrorInput);
21
+ }
@@ -0,0 +1,8 @@
1
+ import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
+ import { SensClientResolvedConfig } from "./SensClient.js";
3
+ export type Middleware = (next: Handler) => Handler;
4
+ export type Handler = (input: {
5
+ request: HttpRequest;
6
+ }, context: SensClientResolvedConfig) => Promise<{
7
+ response: HttpResponse;
8
+ }>;
@@ -1,14 +1,17 @@
1
- export * from "./MetadataBearer";
2
- export * from "./Middleware";
3
- export * from "./SensCommand";
4
- export * from "./SendAlimtalk";
5
- export * from "./GetAlimtalkStatus";
6
- export * from "./GetAlimtalkResult";
7
- export * from "./GetAlimtalkTemplate";
8
- export * from "./ListAlimtalkStatus";
9
- export * from "./ListAlimtalkTemplates";
10
- export * from "./ListAlimtalkChannels";
11
- export * from "./SendSMS";
12
- export * from "./SendMMS";
13
- export * from "./GetSMSStatus";
14
- export * from "./GetSMSResult";
1
+ export * from "./GetAlimtalkResult.js";
2
+ export * from "./GetAlimtalkStatus.js";
3
+ export * from "./GetAlimtalkTemplate.js";
4
+ export * from "./GetSMSResult.js";
5
+ export * from "./GetSMSStatus.js";
6
+ export * from "./ListAlimtalkChannels.js";
7
+ export * from "./ListAlimtalkStatus.js";
8
+ export * from "./ListAlimtalkTemplates.js";
9
+ export * from "./ListSMSStatus.js";
10
+ export * from "./MetadataBearer.js";
11
+ export * from "./SendAlimtalk.js";
12
+ export * from "./SendMMS.js";
13
+ export * from "./SendSMS.js";
14
+ export * from "./SensClient.js";
15
+ export * from "./SensCommand.js";
16
+ export * from "./SensErrorInfo.js";
17
+ export * from "./SensMiddleware.js";
@@ -1,11 +1,4 @@
1
- import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
- import { GetAlimtalkResultOutput, Failover, MetadataBearer } from "../models";
3
- import { SensClientResolvedConfig } from "../SensClient";
4
- import { GetAlimtalkResultCommandInput, GetAlimtalkResultCommandOutput } from "../commands/GetAlimtalkResultCommand";
5
- export declare const serializeIngestkorea_restJson_GetAlimtalkResultCommand: (input: GetAlimtalkResultCommandInput, config: SensClientResolvedConfig) => Promise<HttpRequest>;
6
- export declare const deserializeIngestkorea_restJson_GetAlimtalkResultCommand: (response: {
7
- response: HttpResponse;
8
- output: MetadataBearer;
9
- }) => Promise<GetAlimtalkResultCommandOutput>;
10
- export declare const deserializeIngestkorea_restJson_GetAlimtalkResultOutput: (output: any) => Promise<GetAlimtalkResultOutput>;
11
- export declare const deserializeIngestkorea_restJson_AlimtalkFailover: (output: any) => Failover;
1
+ import { SensClientResolvedConfig, RequestSerializer, ResponseDeserializer } from "../models/index.js";
2
+ import { GetAlimtalkResultCommandInput, GetAlimtalkResultCommandOutput } from "../commands/GetAlimtalkResultCommand.js";
3
+ export declare const se_GetAlimtalkResultCommand: RequestSerializer<GetAlimtalkResultCommandInput, SensClientResolvedConfig>;
4
+ export declare const de_GetAlimtalkResultCommand: ResponseDeserializer<GetAlimtalkResultCommandOutput, SensClientResolvedConfig>;
@@ -1,12 +1,6 @@
1
- import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
- import { GetAlimtalkStatusOutput, StatusMessage, MetadataBearer } from "../models";
3
- import { SensClientResolvedConfig } from "../SensClient";
4
- import { GetAlimtalkStatusCommandInput, GetAlimtalkStatusCommandOutput } from "../commands/GetAlimtalkStatusCommand";
5
- export declare const serializeIngestkorea_restJson_GetAlimtalkStatusCommand: (input: GetAlimtalkStatusCommandInput, config: SensClientResolvedConfig) => Promise<HttpRequest>;
6
- export declare const deserializeIngestkorea_restJson_GetAlimtalkStatusCommand: (response: {
7
- response: HttpResponse;
8
- output: MetadataBearer;
9
- }) => Promise<GetAlimtalkStatusCommandOutput>;
10
- export declare const deserializeIngestkorea_restJson_GetAlimtalkStatusOutput: (output: any) => Promise<GetAlimtalkStatusOutput>;
11
- export declare const deserializeIngestkorea_restJson_GetAlimtalkStatusMessages: (outputs: any[]) => StatusMessage[];
12
- export declare const parseStatusMessage: (output: any) => StatusMessage;
1
+ import { SensClientResolvedConfig, RequestSerializer, ResponseDeserializer, GetAlimtalkStatusResult, AlimtalkMessageStatus } from "../models/index.js";
2
+ import { GetAlimtalkStatusCommandInput, GetAlimtalkStatusCommandOutput } from "../commands/GetAlimtalkStatusCommand.js";
3
+ export declare const se_GetAlimtalkStatusCommand: RequestSerializer<GetAlimtalkStatusCommandInput, SensClientResolvedConfig>;
4
+ export declare const de_GetAlimtalkStatusCommand: ResponseDeserializer<GetAlimtalkStatusCommandOutput, SensClientResolvedConfig>;
5
+ export declare const de_GetAlimtalkStatusResult: (output: any) => GetAlimtalkStatusResult;
6
+ export declare const de_AlimtalkMessageStatus: (output: any) => AlimtalkMessageStatus;
@@ -1,14 +1,4 @@
1
- import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
- import { GetAlimtalkTemplateOutput, TemplateDetail, Comment, Attachment, TemplateButtons, MetadataBearer } from "../models";
3
- import { SensClientResolvedConfig } from "../SensClient";
4
- import { GetAlimtalkTemplateCommandInput, GetAlimtalkTemplateCommandOutput } from "../commands/GetAlimtalkTemplateCommand";
5
- export declare const serializeIngestkorea_restJson_GetAlimtalkTemplateCommand: (input: GetAlimtalkTemplateCommandInput, config: SensClientResolvedConfig) => Promise<HttpRequest>;
6
- export declare const deserializeIngestkorea_restJson_GetAlimtalkTemplateCommand: (response: {
7
- response: HttpResponse;
8
- output: MetadataBearer;
9
- }) => Promise<GetAlimtalkTemplateCommandOutput>;
10
- export declare const deserializeIngestkorea_restJson_GetAlimtalkTemplateOutput: (output: any[]) => Promise<GetAlimtalkTemplateOutput>;
11
- export declare const deserializeIngestkorea_restJson_AlimtalkTemplateDetail: (outputs: any[]) => TemplateDetail[];
12
- export declare const deserializeIngestkorea_restJson_AlimtalkTemplateComment: (outputs: any[]) => Comment[];
13
- export declare const deserializeIngestkorea_restJson_AlimtalkTemplateCommentAttachment: (outputs: any[]) => Attachment[];
14
- export declare const deserializeIngestkorea_restJson_AlimtalkTemplateButton: (outputs: any[]) => TemplateButtons[];
1
+ import { SensClientResolvedConfig, RequestSerializer, ResponseDeserializer } from "../models/index.js";
2
+ import { GetAlimtalkTemplateCommandInput, GetAlimtalkTemplateCommandOutput } from "../commands/GetAlimtalkTemplateCommand.js";
3
+ export declare const se_GetAlimtalkTemplateCommand: RequestSerializer<GetAlimtalkTemplateCommandInput, SensClientResolvedConfig>;
4
+ export declare const de_GetAlimtalkTemplateCommand: ResponseDeserializer<GetAlimtalkTemplateCommandOutput, SensClientResolvedConfig>;
@@ -1,12 +1,4 @@
1
- import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
- import { GetSMSResultOutput, SMSResultMessage, File, MetadataBearer } from "../models";
3
- import { SensClientResolvedConfig } from "../SensClient";
4
- import { GetSMSResultCommandInput, GetSMSResultCommandOutput } from "../commands/GetSMSResultCommand";
5
- export declare const serializeIngestkorea_restJson_GetSMSResultCommand: (input: GetSMSResultCommandInput, config: SensClientResolvedConfig) => Promise<HttpRequest>;
6
- export declare const deserializeIngestkorea_restJson_GetSMSResultCommand: (response: {
7
- response: HttpResponse;
8
- output: MetadataBearer;
9
- }) => Promise<GetSMSResultCommandOutput>;
10
- export declare const deserializeIngestkorea_restJson_GetSMSResultOutput: (output: any) => Promise<GetSMSResultOutput>;
11
- export declare const deserializeIngestkorea_restJson_SMSResultMessage: (outputs: any[]) => SMSResultMessage[];
12
- export declare const deserializeIngestkorea_restJson_File: (outputs: any[]) => File[];
1
+ import { SensClientResolvedConfig, RequestSerializer, ResponseDeserializer } from "../models/index.js";
2
+ import { GetSMSResultCommandInput, GetSMSResultCommandOutput } from "../commands/GetSMSResultCommand.js";
3
+ export declare const se_GetSMSResultCommand: RequestSerializer<GetSMSResultCommandInput, SensClientResolvedConfig>;
4
+ export declare const de_GetSMSResultCommand: ResponseDeserializer<GetSMSResultCommandOutput, SensClientResolvedConfig>;
@@ -1,11 +1,6 @@
1
- import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
- import { GetSMSStatusOutput, SMSStatusMessage, MetadataBearer } from "../models";
3
- import { SensClientResolvedConfig } from "../SensClient";
4
- import { GetSMSStatusCommandInput, GetSMSStatusCommandOutput } from "../commands/GetSMSStatusCommand";
5
- export declare const serializeIngestkorea_restJson_GetSMSStatusCommand: (input: GetSMSStatusCommandInput, config: SensClientResolvedConfig) => Promise<HttpRequest>;
6
- export declare const deserializeIngestkorea_restJson_GetSMSStatusCommand: (response: {
7
- response: HttpResponse;
8
- output: MetadataBearer;
9
- }) => Promise<GetSMSStatusCommandOutput>;
10
- export declare const deserializeIngestkorea_restJson_GetSMSStatusOutput: (output: any) => Promise<GetSMSStatusOutput>;
11
- export declare const deserializeIngestkorea_restJson_SMSStatusMessage: (outputs: any[]) => SMSStatusMessage[];
1
+ import { SensClientResolvedConfig, RequestSerializer, ResponseDeserializer, GetSMSStatusResult, SMSMessageRequestStatus } from "../models/index.js";
2
+ import { GetSMSStatusCommandInput, GetSMSStatusCommandOutput } from "../commands/GetSMSStatusCommand.js";
3
+ export declare const se_GetSMSStatusCommand: RequestSerializer<GetSMSStatusCommandInput, SensClientResolvedConfig>;
4
+ export declare const de_GetSMSStatusCommand: ResponseDeserializer<GetSMSStatusCommandOutput, SensClientResolvedConfig>;
5
+ export declare const de_GetSMSStatusResult: (output: any) => GetSMSStatusResult;
6
+ export declare const de_SMSMessageRequestStatus: (output: any) => SMSMessageRequestStatus;
@@ -1,11 +1,4 @@
1
- import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
- import { ListAlimtalkChannelsOutput, Channel, MetadataBearer } from "../models";
3
- import { SensClientResolvedConfig } from "../SensClient";
4
- import { ListAlimtalkChannelsCommandInput, ListAlimtalkChannelsCommandOutput } from "../commands/ListAlimtalkChannelsCommand";
5
- export declare const serializeIngestkorea_restJson_ListAlimtalkChannelsCommand: (input: ListAlimtalkChannelsCommandInput, config: SensClientResolvedConfig) => Promise<HttpRequest>;
6
- export declare const deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand: (response: {
7
- response: HttpResponse;
8
- output: MetadataBearer;
9
- }) => Promise<ListAlimtalkChannelsCommandOutput>;
10
- export declare const deserializeIngestkorea_restJson_ListAlimtalkChannelsOutput: (outputs: any[]) => Promise<ListAlimtalkChannelsOutput>;
11
- export declare const deserializeIngestkorea_restJson_Channel: (outputs: any[]) => Channel[];
1
+ import { SensClientResolvedConfig, RequestSerializer, ResponseDeserializer } from "../models/index.js";
2
+ import { ListAlimtalkChannelsCommandInput, ListAlimtalkChannelsCommandOutput } from "../commands/ListAlimtalkChannelsCommand.js";
3
+ export declare const se_ListAlimtalkChannelsCommand: RequestSerializer<ListAlimtalkChannelsCommandInput, SensClientResolvedConfig>;
4
+ export declare const de_ListAlimtalkChannelsCommand: ResponseDeserializer<ListAlimtalkChannelsCommandOutput, SensClientResolvedConfig>;
@@ -1,10 +1,4 @@
1
- import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
- import { ListAlimtalkStatusOutput, MetadataBearer } from "../models";
3
- import { SensClientResolvedConfig } from "../SensClient";
4
- import { ListAlimtalkStatusCommandInput, ListAlimtalkStatusCommandOutput } from "../commands/ListAlimtalkStatusCommand";
5
- export declare const serializeIngestkorea_restJson_ListAlimtalkStatusCommand: (input: ListAlimtalkStatusCommandInput, config: SensClientResolvedConfig) => Promise<HttpRequest>;
6
- export declare const deserializeIngestkorea_restJson_ListAlimtalkStatusCommand: (response: {
7
- response: HttpResponse;
8
- output: MetadataBearer;
9
- }) => Promise<ListAlimtalkStatusCommandOutput>;
10
- export declare const deserializeIngestkorea_restJson_ListAlimtalkStatusOutput: (output: any) => Promise<ListAlimtalkStatusOutput>;
1
+ import { SensClientResolvedConfig, RequestSerializer, ResponseDeserializer } from "../models/index.js";
2
+ import { ListAlimtalkStatusCommandInput, ListAlimtalkStatusCommandOutput } from "../commands/ListAlimtalkStatusCommand.js";
3
+ export declare const se_ListAlimtalkStatusCommand: RequestSerializer<ListAlimtalkStatusCommandInput, SensClientResolvedConfig>;
4
+ export declare const de_ListAlimtalkStatusCommand: ResponseDeserializer<ListAlimtalkStatusCommandOutput, SensClientResolvedConfig>;
@@ -1,12 +1,5 @@
1
- import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
- import { ListAlimtalkTemplatesOutput, Template, MetadataBearer } from "../models";
3
- import { SensClientResolvedConfig } from "../SensClient";
4
- import { ListAlimtalkTemplatesCommandInput, ListAlimtalkTemplatesCommandOutput } from "../commands/ListAlimtalkTemplatesCommand";
5
- export declare const serializeIngestkorea_restJson_ListAlimtalkTemplatesCommand: (input: ListAlimtalkTemplatesCommandInput, config: SensClientResolvedConfig) => Promise<HttpRequest>;
6
- export declare const deserializeIngestkorea_restJson_ListAlimtalkTemplatesCommand: (response: {
7
- response: HttpResponse;
8
- output: MetadataBearer;
9
- }) => Promise<ListAlimtalkTemplatesCommandOutput>;
10
- export declare const deserializeIngestkorea_restJson_ListAlimtalkTemplatesOutput: (output: any[]) => Promise<ListAlimtalkTemplatesOutput>;
11
- export declare const deserializeIngestkorea_restJson_AlimtalkTemplates: (outputs: any[]) => Template[];
12
- export declare const parseTemplate: (output: any) => Template;
1
+ import { SensClientResolvedConfig, RequestSerializer, ResponseDeserializer, Template } from "../models/index.js";
2
+ import { ListAlimtalkTemplatesCommandInput, ListAlimtalkTemplatesCommandOutput } from "../commands/ListAlimtalkTemplatesCommand.js";
3
+ export declare const se_ListAlimtalkTemplatesCommand: RequestSerializer<ListAlimtalkTemplatesCommandInput, SensClientResolvedConfig>;
4
+ export declare const de_ListAlimtalkTemplatesCommand: ResponseDeserializer<ListAlimtalkTemplatesCommandOutput, SensClientResolvedConfig>;
5
+ export declare const de_Template: (output: any) => Template;
@@ -0,0 +1,4 @@
1
+ import { SensClientResolvedConfig, RequestSerializer, ResponseDeserializer } from "../models/index.js";
2
+ import { ListSMSStatusCommandInput, ListSMSStatusCommandOutput } from "../commands/ListSMSStatusCommand.js";
3
+ export declare const se_ListSMSStatusCommand: RequestSerializer<ListSMSStatusCommandInput, SensClientResolvedConfig>;
4
+ export declare const de_ListSMSStatusCommand: ResponseDeserializer<ListSMSStatusCommandOutput, SensClientResolvedConfig>;
@@ -1,12 +1,5 @@
1
- import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
- import { SendAlimtalkOutput, ReceivedMessage, MetadataBearer } from "../models";
3
- import { SensClientResolvedConfig } from "../SensClient";
4
- import { SendAlimtalkCommandInput, SendAlimtalkCommandOutput } from "../commands/SendAlimtalkCommand";
5
- export declare const serializeIngestkorea_restJson_SendAlimtalkCommand: (input: SendAlimtalkCommandInput, config: SensClientResolvedConfig) => Promise<HttpRequest>;
6
- export declare const deserializeIngestkorea_restJson_SendAlimtalkCommand: (response: {
7
- response: HttpResponse;
8
- output: MetadataBearer;
9
- }) => Promise<SendAlimtalkCommandOutput>;
10
- export declare const deserializeIngestkorea_restJson_SendMessageOutput: (output: any) => Promise<SendAlimtalkOutput>;
11
- export declare const deserializeIngestkorea_restJson_ReceivedMessages: (outputs: any[]) => ReceivedMessage[];
12
- export declare const parseReceivedMessage: (output: any) => ReceivedMessage;
1
+ import { SensClientResolvedConfig, RequestSerializer, ResponseDeserializer, AlimtalkMessageRequestStatus } from "../models/index.js";
2
+ import { SendAlimtalkCommandInput, SendAlimtalkCommandOutput } from "../commands/SendAlimtalkCommand.js";
3
+ export declare const se_SendAlimtalkCommand: RequestSerializer<SendAlimtalkCommandInput, SensClientResolvedConfig>;
4
+ export declare const de_SendAlimtalkCommand: ResponseDeserializer<SendAlimtalkCommandOutput, SensClientResolvedConfig>;
5
+ export declare const de_AlimtalkMessageRequestStatus: (output: any) => AlimtalkMessageRequestStatus;
@@ -1,10 +1,4 @@
1
- import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
- import { SendMMSOutput, MetadataBearer } from "../models";
3
- import { SensClientResolvedConfig } from "../SensClient";
4
- import { SendMMSCommandInput, SendMMSCommandOutput } from "../commands/SendMMSCommand";
5
- export declare const serializeIngestkorea_restJson_SendMMSCommand: (input: SendMMSCommandInput, config: SensClientResolvedConfig) => Promise<HttpRequest>;
6
- export declare const deserializeIngestkorea_restJson_SendMMSCommand: (response: {
7
- response: HttpResponse;
8
- output: MetadataBearer;
9
- }) => Promise<SendMMSCommandOutput>;
10
- export declare const deserializeIngestkorea_restJson_SendMMSOutput: (output: any) => Promise<SendMMSOutput>;
1
+ import { SensClientResolvedConfig, RequestSerializer, ResponseDeserializer } from "../models/index.js";
2
+ import { SendMMSCommandInput, SendMMSCommandOutput } from "../commands/SendMMSCommand.js";
3
+ export declare const se_SendMMSCommand: RequestSerializer<SendMMSCommandInput, SensClientResolvedConfig>;
4
+ export declare const de_SendMMSCommand: ResponseDeserializer<SendMMSCommandOutput, SensClientResolvedConfig>;
@@ -1,10 +1,5 @@
1
- import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
- import { SendSMSOutput, MetadataBearer } from "../models";
3
- import { SensClientResolvedConfig } from "../SensClient";
4
- import { SendSMSCommandInput, SendSMSCommandOutput } from "../commands/SendSMSCommand";
5
- export declare const serializeIngestkorea_restJson_SendSMSCommand: (input: SendSMSCommandInput, config: SensClientResolvedConfig) => Promise<HttpRequest>;
6
- export declare const deserializeIngestkorea_restJson_SendSMSCommand: (response: {
7
- response: HttpResponse;
8
- output: MetadataBearer;
9
- }) => Promise<SendSMSCommandOutput>;
10
- export declare const deserializeIngestkorea_restJson_SendSMSOutput: (output: any) => Promise<SendSMSOutput>;
1
+ import { SensClientResolvedConfig, RequestSerializer, ResponseDeserializer, SendSMSResult } from "../models/index.js";
2
+ import { SendSMSCommandInput, SendSMSCommandOutput } from "../commands/SendSMSCommand.js";
3
+ export declare const se_SendSMSCommand: RequestSerializer<SendSMSCommandInput, SensClientResolvedConfig>;
4
+ export declare const de_SendSMSCommand: ResponseDeserializer<SendSMSCommandOutput, SensClientResolvedConfig>;
5
+ export declare const de_SendSMSResult: (output: any) => SendSMSResult;
@@ -1,5 +1,7 @@
1
1
  import { HttpResponse } from "@ingestkorea/util-http-handler";
2
- import { ResponseMetadata } from "../models";
2
+ import { ResponseMetadata } from "../models/index.js";
3
+ export declare const deserializeMetadata: (response: HttpResponse) => ResponseMetadata;
3
4
  export declare const parseBody: (output: HttpResponse) => Promise<any>;
4
5
  export declare const parseErrorBody: (output: HttpResponse) => Promise<void>;
5
- export declare const deserializeMetadata: (response: HttpResponse) => ResponseMetadata;
6
+ export declare const compact: <T>(obj: T) => T;
7
+ export declare const convertToUtc: (input: string) => string;
package/package.json CHANGED
@@ -1,16 +1,32 @@
1
1
  {
2
2
  "name": "@ingestkorea/client-sens",
3
- "version": "1.7.0",
3
+ "version": "1.9.0",
4
4
  "description": "INGESTKOREA SDK Naver Cloud Platform SENS Client for Node.js.",
5
+ "exports": {
6
+ ".": {
7
+ "import": "./dist-es/index.js",
8
+ "require": "./dist-cjs/index.js",
9
+ "types": "./dist-types/index.d.ts"
10
+ }
11
+ },
5
12
  "main": "./dist-cjs/index.js",
6
13
  "module": "./dist-es/index.js",
7
14
  "types": "./dist-types/index.d.ts",
15
+ "files": [
16
+ "dist-cjs",
17
+ "dist-es",
18
+ "dist-types",
19
+ "!dist-cjs/test/**",
20
+ "!dist-es/test/**",
21
+ "!dist-types/test/**"
22
+ ],
8
23
  "scripts": {
9
24
  "build": "npm run clean && npm run build:cjs && npm run build:es && npm run build:types",
10
25
  "build:cjs": "tsc -p tsconfig.cjs.json",
11
26
  "build:es": "tsc -p tsconfig.es.json",
12
27
  "build:types": "tsc -p tsconfig.types.json",
13
- "clean": "rm -rf ./dist-*"
28
+ "clean": "rm -rf dist-*",
29
+ "prepublishOnly": "npm run build"
14
30
  },
15
31
  "repository": {
16
32
  "type": "git",
@@ -23,8 +39,8 @@
23
39
  },
24
40
  "homepage": "https://github.com/ingestkorea/client-sens#readme",
25
41
  "devDependencies": {
26
- "@types/node": "^18.11.0",
27
- "typescript": "^5.5.3"
42
+ "@types/node": "^22",
43
+ "typescript": "^5"
28
44
  },
29
45
  "dependencies": {
30
46
  "@ingestkorea/util-error-handler": "^1.0.3",