@seven.io/mcp 1.0.3

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 (87) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +295 -0
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +129 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/client.d.ts +18 -0
  8. package/dist/client.d.ts.map +1 -0
  9. package/dist/client.js +88 -0
  10. package/dist/client.js.map +1 -0
  11. package/dist/index.d.ts +3 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +245 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/oauth/flow.d.ts +12 -0
  16. package/dist/oauth/flow.d.ts.map +1 -0
  17. package/dist/oauth/flow.js +132 -0
  18. package/dist/oauth/flow.js.map +1 -0
  19. package/dist/oauth/pkce.d.ts +17 -0
  20. package/dist/oauth/pkce.d.ts.map +1 -0
  21. package/dist/oauth/pkce.js +39 -0
  22. package/dist/oauth/pkce.js.map +1 -0
  23. package/dist/oauth/refresh.d.ts +22 -0
  24. package/dist/oauth/refresh.d.ts.map +1 -0
  25. package/dist/oauth/refresh.js +53 -0
  26. package/dist/oauth/refresh.js.map +1 -0
  27. package/dist/oauth/server.d.ts +18 -0
  28. package/dist/oauth/server.d.ts.map +1 -0
  29. package/dist/oauth/server.js +553 -0
  30. package/dist/oauth/server.js.map +1 -0
  31. package/dist/oauth/tokens.d.ts +33 -0
  32. package/dist/oauth/tokens.d.ts.map +1 -0
  33. package/dist/oauth/tokens.js +104 -0
  34. package/dist/oauth/tokens.js.map +1 -0
  35. package/dist/tools/account.d.ts +68 -0
  36. package/dist/tools/account.d.ts.map +1 -0
  37. package/dist/tools/account.js +59 -0
  38. package/dist/tools/account.js.map +1 -0
  39. package/dist/tools/contacts.d.ts +101 -0
  40. package/dist/tools/contacts.d.ts.map +1 -0
  41. package/dist/tools/contacts.js +111 -0
  42. package/dist/tools/contacts.js.map +1 -0
  43. package/dist/tools/groups.d.ts +65 -0
  44. package/dist/tools/groups.d.ts.map +1 -0
  45. package/dist/tools/groups.js +86 -0
  46. package/dist/tools/groups.js.map +1 -0
  47. package/dist/tools/lookup.d.ts +22 -0
  48. package/dist/tools/lookup.d.ts.map +1 -0
  49. package/dist/tools/lookup.js +88 -0
  50. package/dist/tools/lookup.js.map +1 -0
  51. package/dist/tools/numbers.d.ts +79 -0
  52. package/dist/tools/numbers.d.ts.map +1 -0
  53. package/dist/tools/numbers.js +106 -0
  54. package/dist/tools/numbers.js.map +1 -0
  55. package/dist/tools/rcs.d.ts +100 -0
  56. package/dist/tools/rcs.d.ts.map +1 -0
  57. package/dist/tools/rcs.js +86 -0
  58. package/dist/tools/rcs.js.map +1 -0
  59. package/dist/tools/sender.d.ts +25 -0
  60. package/dist/tools/sender.d.ts.map +1 -0
  61. package/dist/tools/sender.js +25 -0
  62. package/dist/tools/sender.js.map +1 -0
  63. package/dist/tools/sms.d.ts +110 -0
  64. package/dist/tools/sms.d.ts.map +1 -0
  65. package/dist/tools/sms.js +95 -0
  66. package/dist/tools/sms.js.map +1 -0
  67. package/dist/tools/status.d.ts +81 -0
  68. package/dist/tools/status.d.ts.map +1 -0
  69. package/dist/tools/status.js +88 -0
  70. package/dist/tools/status.js.map +1 -0
  71. package/dist/tools/subaccounts.d.ts +108 -0
  72. package/dist/tools/subaccounts.d.ts.map +1 -0
  73. package/dist/tools/subaccounts.js +98 -0
  74. package/dist/tools/subaccounts.js.map +1 -0
  75. package/dist/tools/voice.d.ts +57 -0
  76. package/dist/tools/voice.d.ts.map +1 -0
  77. package/dist/tools/voice.js +54 -0
  78. package/dist/tools/voice.js.map +1 -0
  79. package/dist/tools/webhooks.d.ts +60 -0
  80. package/dist/tools/webhooks.d.ts.map +1 -0
  81. package/dist/tools/webhooks.js +58 -0
  82. package/dist/tools/webhooks.js.map +1 -0
  83. package/dist/types.d.ts +69 -0
  84. package/dist/types.d.ts.map +1 -0
  85. package/dist/types.js +2 -0
  86. package/dist/types.js.map +1 -0
  87. package/package.json +49 -0
@@ -0,0 +1,95 @@
1
+ export async function sendSMS(client, params) {
2
+ return await client.post('/sms', params);
3
+ }
4
+ export async function deleteSMS(client, ids) {
5
+ return await client.delete(`/sms?ids=${Array.isArray(ids) ? ids.join(',') : ids}`);
6
+ }
7
+ export const smsTools = [
8
+ {
9
+ name: 'send_sms',
10
+ description: 'Send an SMS message to one or multiple recipients',
11
+ inputSchema: {
12
+ type: 'object',
13
+ properties: {
14
+ to: {
15
+ type: ['string', 'array'],
16
+ description: 'Recipient phone number(s)',
17
+ items: { type: 'string' },
18
+ },
19
+ text: {
20
+ type: 'string',
21
+ description: 'SMS message text',
22
+ },
23
+ from: {
24
+ type: 'string',
25
+ description: 'Sender ID (alphanumeric or phone number)',
26
+ },
27
+ delay: {
28
+ type: 'string',
29
+ description: 'Delayed sending timestamp (Unix timestamp or ISO 8601)',
30
+ },
31
+ debug: {
32
+ type: 'boolean',
33
+ description: 'Enable debug mode (no actual sending)',
34
+ },
35
+ flash: {
36
+ type: 'boolean',
37
+ description: 'Send as flash SMS',
38
+ },
39
+ no_reload: {
40
+ type: 'boolean',
41
+ description: 'Disable automatic reloading of phone numbers',
42
+ },
43
+ unicode: {
44
+ type: 'boolean',
45
+ description: 'Enable unicode mode',
46
+ },
47
+ utf8: {
48
+ type: 'boolean',
49
+ description: 'Enable UTF-8 encoding',
50
+ },
51
+ details: {
52
+ type: 'boolean',
53
+ description: 'Return detailed response',
54
+ },
55
+ return_msg_id: {
56
+ type: 'boolean',
57
+ description: 'Return message ID',
58
+ },
59
+ performance_tracking: {
60
+ type: 'boolean',
61
+ description: 'Enable performance tracking',
62
+ },
63
+ label: {
64
+ type: 'string',
65
+ description: 'Custom label for the message',
66
+ },
67
+ foreign_id: {
68
+ type: 'string',
69
+ description: 'Custom ID for tracking',
70
+ },
71
+ ttl: {
72
+ type: 'number',
73
+ description: 'Time to live in minutes',
74
+ },
75
+ },
76
+ required: ['to', 'text'],
77
+ },
78
+ },
79
+ {
80
+ name: 'delete_sms',
81
+ description: 'Delete scheduled SMS message(s)',
82
+ inputSchema: {
83
+ type: 'object',
84
+ properties: {
85
+ ids: {
86
+ type: ['string', 'array'],
87
+ description: 'SMS message ID(s) to delete',
88
+ items: { type: 'string' },
89
+ },
90
+ },
91
+ required: ['ids'],
92
+ },
93
+ },
94
+ ];
95
+ //# sourceMappingURL=sms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sms.js","sourceRoot":"","sources":["../../src/tools/sms.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,MAAmB,EAAE,MAAiB;IAClE,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,MAAmB,EAAE,GAAsB;IACzE,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC,YAAY,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AACrF,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB;QACE,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,mDAAmD;QAChE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE;oBACF,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;oBACzB,WAAW,EAAE,2BAA2B;oBACxC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;iBAC1B;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kBAAkB;iBAChC;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,0CAA0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IAAI,EAAE,QAAQ,EAAE;iBAC1B;aACF;YACD,QAAQ,EAAE,CAAC,KAAK,CAAC;SAClB;KACF;CACF,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { SevenClient } from '../client.js';
2
+ export declare function getStatus(client: SevenClient, params: {
3
+ msg_id?: string;
4
+ date?: string;
5
+ }): Promise<unknown>;
6
+ export declare function getLogbookSent(client: SevenClient, params?: {
7
+ date_from?: string;
8
+ date_to?: string;
9
+ state?: string;
10
+ }): Promise<unknown>;
11
+ export declare function getLogbookReceived(client: SevenClient, params?: {
12
+ date_from?: string;
13
+ date_to?: string;
14
+ }): Promise<unknown>;
15
+ export declare function getLogbookVoice(client: SevenClient, params?: {
16
+ date_from?: string;
17
+ date_to?: string;
18
+ }): Promise<unknown>;
19
+ export declare const statusTools: ({
20
+ name: string;
21
+ description: string;
22
+ inputSchema: {
23
+ type: string;
24
+ properties: {
25
+ msg_id: {
26
+ type: string;
27
+ description: string;
28
+ };
29
+ date: {
30
+ type: string;
31
+ description: string;
32
+ };
33
+ date_from?: undefined;
34
+ date_to?: undefined;
35
+ state?: undefined;
36
+ };
37
+ };
38
+ } | {
39
+ name: string;
40
+ description: string;
41
+ inputSchema: {
42
+ type: string;
43
+ properties: {
44
+ date_from: {
45
+ type: string;
46
+ description: string;
47
+ };
48
+ date_to: {
49
+ type: string;
50
+ description: string;
51
+ };
52
+ state: {
53
+ type: string;
54
+ description: string;
55
+ enum: string[];
56
+ };
57
+ msg_id?: undefined;
58
+ date?: undefined;
59
+ };
60
+ };
61
+ } | {
62
+ name: string;
63
+ description: string;
64
+ inputSchema: {
65
+ type: string;
66
+ properties: {
67
+ date_from: {
68
+ type: string;
69
+ description: string;
70
+ };
71
+ date_to: {
72
+ type: string;
73
+ description: string;
74
+ };
75
+ msg_id?: undefined;
76
+ date?: undefined;
77
+ state?: undefined;
78
+ };
79
+ };
80
+ })[];
81
+ //# sourceMappingURL=status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/tools/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,wBAAsB,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,oBAE9F;AAED,wBAAsB,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,oBAE1H;AAED,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,oBAE9G;AAED,wBAAsB,eAAe,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,oBAE3G;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0EvB,CAAC"}
@@ -0,0 +1,88 @@
1
+ export async function getStatus(client, params) {
2
+ return await client.get('/status', params);
3
+ }
4
+ export async function getLogbookSent(client, params) {
5
+ return await client.get('/journal/outbound', params);
6
+ }
7
+ export async function getLogbookReceived(client, params) {
8
+ return await client.get('/journal/inbound', params);
9
+ }
10
+ export async function getLogbookVoice(client, params) {
11
+ return await client.get('/journal/voice', params);
12
+ }
13
+ export const statusTools = [
14
+ {
15
+ name: 'get_status',
16
+ description: 'Check delivery status of sent messages',
17
+ inputSchema: {
18
+ type: 'object',
19
+ properties: {
20
+ msg_id: {
21
+ type: 'string',
22
+ description: 'Message ID to check status',
23
+ },
24
+ date: {
25
+ type: 'string',
26
+ description: 'Date for status report (YYYY-MM-DD)',
27
+ },
28
+ },
29
+ },
30
+ },
31
+ {
32
+ name: 'get_logbook_sent',
33
+ description: 'View sent messages in logbook',
34
+ inputSchema: {
35
+ type: 'object',
36
+ properties: {
37
+ date_from: {
38
+ type: 'string',
39
+ description: 'Start date (YYYY-MM-DD)',
40
+ },
41
+ date_to: {
42
+ type: 'string',
43
+ description: 'End date (YYYY-MM-DD)',
44
+ },
45
+ state: {
46
+ type: 'string',
47
+ description: 'Filter by message state',
48
+ enum: ['pending', 'delivered', 'failed'],
49
+ },
50
+ },
51
+ },
52
+ },
53
+ {
54
+ name: 'get_logbook_received',
55
+ description: 'View received SMS messages',
56
+ inputSchema: {
57
+ type: 'object',
58
+ properties: {
59
+ date_from: {
60
+ type: 'string',
61
+ description: 'Start date (YYYY-MM-DD)',
62
+ },
63
+ date_to: {
64
+ type: 'string',
65
+ description: 'End date (YYYY-MM-DD)',
66
+ },
67
+ },
68
+ },
69
+ },
70
+ {
71
+ name: 'get_logbook_voice',
72
+ description: 'View voice call history',
73
+ inputSchema: {
74
+ type: 'object',
75
+ properties: {
76
+ date_from: {
77
+ type: 'string',
78
+ description: 'Start date (YYYY-MM-DD)',
79
+ },
80
+ date_to: {
81
+ type: 'string',
82
+ description: 'End date (YYYY-MM-DD)',
83
+ },
84
+ },
85
+ },
86
+ },
87
+ ];
88
+ //# sourceMappingURL=status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/tools/status.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,MAAmB,EAAE,MAA0C;IAC7F,OAAO,MAAM,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAAmB,EAAE,MAAiE;IACzH,OAAO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EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,yBAAyB;iBACvC;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,uBAAuB;iBACrC;aACF;SACF;KACF;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,yBAAyB;QACtC,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,yBAAyB;iBACvC;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,uBAAuB;iBACrC;aACF;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,108 @@
1
+ import { SevenClient } from '../client.js';
2
+ import type { SubaccountParams } from '../types.js';
3
+ export declare function listSubaccounts(client: SevenClient): Promise<unknown>;
4
+ export declare function createSubaccount(client: SevenClient, params: SubaccountParams): Promise<unknown>;
5
+ export declare function updateSubaccount(client: SevenClient, params: SubaccountParams & {
6
+ id: string;
7
+ }): Promise<unknown>;
8
+ export declare function transferCredits(client: SevenClient, params: {
9
+ id: string;
10
+ amount: number;
11
+ }): Promise<unknown>;
12
+ export declare function deleteSubaccount(client: SevenClient, id: string): Promise<unknown>;
13
+ export declare const subaccountsTools: ({
14
+ name: string;
15
+ description: string;
16
+ inputSchema: {
17
+ type: string;
18
+ properties: {
19
+ name?: undefined;
20
+ email?: undefined;
21
+ auto_recharge?: undefined;
22
+ id?: undefined;
23
+ amount?: undefined;
24
+ };
25
+ required?: undefined;
26
+ };
27
+ } | {
28
+ name: string;
29
+ description: string;
30
+ inputSchema: {
31
+ type: string;
32
+ properties: {
33
+ name: {
34
+ type: string;
35
+ description: string;
36
+ };
37
+ email: {
38
+ type: string;
39
+ description: string;
40
+ };
41
+ auto_recharge: {
42
+ type: string;
43
+ description: string;
44
+ };
45
+ id?: undefined;
46
+ amount?: undefined;
47
+ };
48
+ required: string[];
49
+ };
50
+ } | {
51
+ name: string;
52
+ description: string;
53
+ inputSchema: {
54
+ type: string;
55
+ properties: {
56
+ id: {
57
+ type: string;
58
+ description: string;
59
+ };
60
+ auto_recharge: {
61
+ type: string;
62
+ description: string;
63
+ };
64
+ name?: undefined;
65
+ email?: undefined;
66
+ amount?: undefined;
67
+ };
68
+ required: string[];
69
+ };
70
+ } | {
71
+ name: string;
72
+ description: string;
73
+ inputSchema: {
74
+ type: string;
75
+ properties: {
76
+ id: {
77
+ type: string;
78
+ description: string;
79
+ };
80
+ amount: {
81
+ type: string;
82
+ description: string;
83
+ };
84
+ name?: undefined;
85
+ email?: undefined;
86
+ auto_recharge?: undefined;
87
+ };
88
+ required: string[];
89
+ };
90
+ } | {
91
+ name: string;
92
+ description: string;
93
+ inputSchema: {
94
+ type: string;
95
+ properties: {
96
+ id: {
97
+ type: string;
98
+ description: string;
99
+ };
100
+ name?: undefined;
101
+ email?: undefined;
102
+ auto_recharge?: undefined;
103
+ amount?: undefined;
104
+ };
105
+ required: string[];
106
+ };
107
+ })[];
108
+ //# sourceMappingURL=subaccounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subaccounts.d.ts","sourceRoot":"","sources":["../../src/tools/subaccounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,wBAAsB,eAAe,CAAC,MAAM,EAAE,WAAW,oBAExD;AAED,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,oBAEnF;AAED,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,oBAEpG;AAED,wBAAsB,eAAe,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,oBAEhG;AAED,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,oBAErE;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiF5B,CAAC"}
@@ -0,0 +1,98 @@
1
+ export async function listSubaccounts(client) {
2
+ return await client.get('/subaccounts?action=read');
3
+ }
4
+ export async function createSubaccount(client, params) {
5
+ return await client.post('/subaccounts?action=create', params);
6
+ }
7
+ export async function updateSubaccount(client, params) {
8
+ return await client.post('/subaccounts?action=update', params);
9
+ }
10
+ export async function transferCredits(client, params) {
11
+ return await client.post('/subaccounts?action=transfer_credits', params);
12
+ }
13
+ export async function deleteSubaccount(client, id) {
14
+ return await client.post('/subaccounts?action=delete', { id });
15
+ }
16
+ export const subaccountsTools = [
17
+ {
18
+ name: 'list_subaccounts',
19
+ description: 'List all subaccounts',
20
+ inputSchema: {
21
+ type: 'object',
22
+ properties: {},
23
+ },
24
+ },
25
+ {
26
+ name: 'create_subaccount',
27
+ description: 'Create a new subaccount',
28
+ inputSchema: {
29
+ type: 'object',
30
+ properties: {
31
+ name: {
32
+ type: 'string',
33
+ description: 'Subaccount name',
34
+ },
35
+ email: {
36
+ type: 'string',
37
+ description: 'Subaccount email',
38
+ },
39
+ auto_recharge: {
40
+ type: 'boolean',
41
+ description: 'Enable automatic credit transfer',
42
+ },
43
+ },
44
+ required: ['name', 'email'],
45
+ },
46
+ },
47
+ {
48
+ name: 'update_subaccount',
49
+ description: 'Update subaccount auto credit transfer settings',
50
+ inputSchema: {
51
+ type: 'object',
52
+ properties: {
53
+ id: {
54
+ type: 'string',
55
+ description: 'Subaccount ID',
56
+ },
57
+ auto_recharge: {
58
+ type: 'boolean',
59
+ description: 'Enable/disable automatic credit transfer',
60
+ },
61
+ },
62
+ required: ['id'],
63
+ },
64
+ },
65
+ {
66
+ name: 'transfer_credits',
67
+ description: 'Manually transfer credits to a subaccount',
68
+ inputSchema: {
69
+ type: 'object',
70
+ properties: {
71
+ id: {
72
+ type: 'string',
73
+ description: 'Subaccount ID',
74
+ },
75
+ amount: {
76
+ type: 'number',
77
+ description: 'Amount of credits to transfer',
78
+ },
79
+ },
80
+ required: ['id', 'amount'],
81
+ },
82
+ },
83
+ {
84
+ name: 'delete_subaccount',
85
+ description: 'Delete a subaccount',
86
+ inputSchema: {
87
+ type: 'object',
88
+ properties: {
89
+ id: {
90
+ type: 'string',
91
+ description: 'Subaccount ID to delete',
92
+ },
93
+ },
94
+ required: ['id'],
95
+ },
96
+ },
97
+ ];
98
+ //# sourceMappingURL=subaccounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subaccounts.js","sourceRoot":"","sources":["../../src/tools/subaccounts.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAAmB;IACvD,OAAO,MAAM,MAAM,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,MAAmB,EAAE,MAAwB;IAClF,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,4BAA4B,EAAE,MAAM,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,MAAmB,EAAE,MAAyC;IACnG,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,4BAA4B,EAAE,MAAM,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAAmB,EAAE,MAAsC;IAC/F,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,sCAAsC,EAAE,MAAM,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC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oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,+BAA+B;iBAC7C;aACF;YACD,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC;SAC3B;KACF;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,qBAAqB;QAClC,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE;oBACF,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,yBAAyB;iBACvC;aACF;YACD,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB;KACF;CACF,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { SevenClient } from '../client.js';
2
+ import type { VoiceParams } from '../types.js';
3
+ export declare function sendVoice(client: SevenClient, params: VoiceParams): Promise<unknown>;
4
+ export declare function hangupVoice(client: SevenClient, callId: string): Promise<unknown>;
5
+ export declare const voiceTools: ({
6
+ name: string;
7
+ description: string;
8
+ inputSchema: {
9
+ type: string;
10
+ properties: {
11
+ to: {
12
+ type: string[];
13
+ description: string;
14
+ items: {
15
+ type: string;
16
+ };
17
+ };
18
+ text: {
19
+ type: string;
20
+ description: string;
21
+ };
22
+ from: {
23
+ type: string;
24
+ description: string;
25
+ };
26
+ xml: {
27
+ type: string;
28
+ description: string;
29
+ };
30
+ debug: {
31
+ type: string;
32
+ description: string;
33
+ };
34
+ call_id?: undefined;
35
+ };
36
+ required: string[];
37
+ };
38
+ } | {
39
+ name: string;
40
+ description: string;
41
+ inputSchema: {
42
+ type: string;
43
+ properties: {
44
+ call_id: {
45
+ type: string;
46
+ description: string;
47
+ };
48
+ to?: undefined;
49
+ text?: undefined;
50
+ from?: undefined;
51
+ xml?: undefined;
52
+ debug?: undefined;
53
+ };
54
+ required: string[];
55
+ };
56
+ })[];
57
+ //# sourceMappingURL=voice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../../src/tools/voice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,wBAAsB,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,oBAEvE;AAED,wBAAsB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,oBAEpE;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8CtB,CAAC"}
@@ -0,0 +1,54 @@
1
+ export async function sendVoice(client, params) {
2
+ return await client.post('/voice', params);
3
+ }
4
+ export async function hangupVoice(client, callId) {
5
+ return await client.post(`/voice/${callId}/hangup`);
6
+ }
7
+ export const voiceTools = [
8
+ {
9
+ name: 'send_voice',
10
+ description: 'Send a voice call with text-to-speech',
11
+ inputSchema: {
12
+ type: 'object',
13
+ properties: {
14
+ to: {
15
+ type: ['string', 'array'],
16
+ description: 'Recipient phone number(s)',
17
+ items: { type: 'string' },
18
+ },
19
+ text: {
20
+ type: 'string',
21
+ description: 'Text to be converted to speech',
22
+ },
23
+ from: {
24
+ type: 'string',
25
+ description: 'Caller ID',
26
+ },
27
+ xml: {
28
+ type: 'boolean',
29
+ description: 'Use XML for advanced voice features',
30
+ },
31
+ debug: {
32
+ type: 'boolean',
33
+ description: 'Enable debug mode',
34
+ },
35
+ },
36
+ required: ['to', 'text'],
37
+ },
38
+ },
39
+ {
40
+ name: 'hangup_voice',
41
+ description: 'End an active voice call',
42
+ inputSchema: {
43
+ type: 'object',
44
+ properties: {
45
+ call_id: {
46
+ type: 'string',
47
+ description: 'Voice call ID to hangup',
48
+ },
49
+ },
50
+ required: ['call_id'],
51
+ },
52
+ },
53
+ ];
54
+ //# sourceMappingURL=voice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice.js","sourceRoot":"","sources":["../../src/tools/voice.ts"],"names":[],"mappings":"A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1,60 @@
1
+ import { SevenClient } from '../client.js';
2
+ import type { WebhookParams } from '../types.js';
3
+ export declare function listWebhooks(client: SevenClient): Promise<unknown>;
4
+ export declare function createWebhook(client: SevenClient, params: WebhookParams): Promise<unknown>;
5
+ export declare function deleteWebhook(client: SevenClient, id: string): Promise<unknown>;
6
+ export declare const webhooksTools: ({
7
+ name: string;
8
+ description: string;
9
+ inputSchema: {
10
+ type: string;
11
+ properties: {
12
+ target_url?: undefined;
13
+ event_type?: undefined;
14
+ request_method?: undefined;
15
+ id?: undefined;
16
+ };
17
+ required?: undefined;
18
+ };
19
+ } | {
20
+ name: string;
21
+ description: string;
22
+ inputSchema: {
23
+ type: string;
24
+ properties: {
25
+ target_url: {
26
+ type: string;
27
+ description: string;
28
+ };
29
+ event_type: {
30
+ type: string;
31
+ description: string;
32
+ enum: string[];
33
+ };
34
+ request_method: {
35
+ type: string;
36
+ description: string;
37
+ enum: string[];
38
+ };
39
+ id?: undefined;
40
+ };
41
+ required: string[];
42
+ };
43
+ } | {
44
+ name: string;
45
+ description: string;
46
+ inputSchema: {
47
+ type: string;
48
+ properties: {
49
+ id: {
50
+ type: string;
51
+ description: string;
52
+ };
53
+ target_url?: undefined;
54
+ event_type?: undefined;
55
+ request_method?: undefined;
56
+ };
57
+ required: string[];
58
+ };
59
+ })[];
60
+ //# sourceMappingURL=webhooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/tools/webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,wBAAsB,YAAY,CAAC,MAAM,EAAE,WAAW,oBAErD;AAED,wBAAsB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,oBAE7E;AAED,wBAAsB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,oBAElE;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+CzB,CAAC"}