@k-msg/channel 0.1.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/README.md ADDED
@@ -0,0 +1,79 @@
1
+ # @k-msg/channel
2
+
3
+ Channel and sender number management for the K-Message platform.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @k-msg/channel @k-msg/core
9
+ # or
10
+ bun add @k-msg/channel @k-msg/core
11
+ ```
12
+
13
+ ## Features
14
+
15
+ - **Channel Management**: Complete channel lifecycle management
16
+ - **Sender Number Registration**: Automated sender number registration and verification
17
+ - **Business Verification**: Business information verification for AlimTalk channels
18
+ - **Permission Management**: Role-based access control for channels
19
+ - **Status Monitoring**: Real-time channel status monitoring
20
+
21
+ ## Basic Usage
22
+
23
+ ```typescript
24
+ import { ChannelService } from '@k-msg/channel';
25
+
26
+ const channelService = new ChannelService();
27
+
28
+ // Create a new AlimTalk channel
29
+ const channel = await channelService.createChannel({
30
+ name: 'My Business Channel',
31
+ provider: 'iwinv',
32
+ businessInfo: {
33
+ name: 'My Company Ltd.',
34
+ registrationNumber: '123-45-67890',
35
+ category: 'E-COMMERCE',
36
+ contactEmail: 'contact@mycompany.com',
37
+ contactPhone: '02-1234-5678'
38
+ }
39
+ });
40
+
41
+ // Register sender number
42
+ const senderNumber = await channelService.addSenderNumber(channel.id, {
43
+ phoneNumber: '15881234',
44
+ purpose: 'MARKETING'
45
+ });
46
+ ```
47
+
48
+ ## Channel Verification
49
+
50
+ ```typescript
51
+ // Verify business information
52
+ const verification = await channelService.verifyBusiness(channel.id, {
53
+ documents: [
54
+ { type: 'BUSINESS_LICENSE', url: 'https://docs.example.com/license.pdf' },
55
+ { type: 'REPRESENTATIVE_ID', url: 'https://docs.example.com/id.pdf' }
56
+ ]
57
+ });
58
+
59
+ // Check verification status
60
+ const status = await channelService.getVerificationStatus(channel.id);
61
+ console.log('Verification status:', status);
62
+ ```
63
+
64
+ ## Sender Number Management
65
+
66
+ ```typescript
67
+ // List all sender numbers for a channel
68
+ const senderNumbers = await channelService.getSenderNumbers(channel.id);
69
+
70
+ // Verify sender number with SMS
71
+ await channelService.verifySenderNumber(senderNumber.id, '123456');
72
+
73
+ // Check sender number status
74
+ const numberStatus = await channelService.getSenderNumberStatus(senderNumber.id);
75
+ ```
76
+
77
+ ## License
78
+
79
+ MIT