@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,104 @@
1
+ const SERVICE_NAME = 'seven-mcp';
2
+ const DEFAULT_ACCOUNT_NAME = 'oauth-tokens';
3
+ const CURRENT_ACCOUNT_KEY = 'current-account';
4
+ /**
5
+ * Get keytar module dynamically
6
+ */
7
+ async function getKeytar() {
8
+ try {
9
+ const keytar = await import('keytar');
10
+ return keytar.default || keytar;
11
+ }
12
+ catch (error) {
13
+ throw new Error('Keytar module not available. Please ensure it is properly installed.');
14
+ }
15
+ }
16
+ /**
17
+ * Store OAuth tokens securely in system keychain
18
+ * @param tokens - OAuth tokens to store
19
+ * @param account - Optional account identifier (email or user_id)
20
+ */
21
+ export async function storeTokens(tokens, account) {
22
+ const keytar = await getKeytar();
23
+ const accountName = account || DEFAULT_ACCOUNT_NAME;
24
+ const tokenData = JSON.stringify(tokens);
25
+ // Store the tokens
26
+ await keytar.setPassword(SERVICE_NAME, accountName, tokenData);
27
+ // Store the current account name for later retrieval
28
+ if (account) {
29
+ await keytar.setPassword(SERVICE_NAME, CURRENT_ACCOUNT_KEY, account);
30
+ }
31
+ }
32
+ /**
33
+ * Get the current account name
34
+ */
35
+ async function getCurrentAccount() {
36
+ const keytar = await getKeytar();
37
+ const account = await keytar.getPassword(SERVICE_NAME, CURRENT_ACCOUNT_KEY);
38
+ return account || DEFAULT_ACCOUNT_NAME;
39
+ }
40
+ /**
41
+ * Retrieve OAuth tokens from system keychain
42
+ * @param account - Optional account identifier, uses current account if not provided
43
+ */
44
+ export async function getTokens(account) {
45
+ const keytar = await getKeytar();
46
+ const accountName = account || await getCurrentAccount();
47
+ const tokenData = await keytar.getPassword(SERVICE_NAME, accountName);
48
+ if (!tokenData) {
49
+ // Try default account as fallback for backward compatibility
50
+ if (accountName !== DEFAULT_ACCOUNT_NAME) {
51
+ const defaultData = await keytar.getPassword(SERVICE_NAME, DEFAULT_ACCOUNT_NAME);
52
+ if (defaultData) {
53
+ try {
54
+ return JSON.parse(defaultData);
55
+ }
56
+ catch { }
57
+ }
58
+ }
59
+ return null;
60
+ }
61
+ try {
62
+ return JSON.parse(tokenData);
63
+ }
64
+ catch (error) {
65
+ return null;
66
+ }
67
+ }
68
+ /**
69
+ * Delete OAuth tokens from system keychain
70
+ * @param account - Optional account identifier, uses current account if not provided
71
+ */
72
+ export async function deleteTokens(account) {
73
+ const keytar = await getKeytar();
74
+ const accountName = account || await getCurrentAccount();
75
+ // Delete tokens for the account
76
+ const deleted = await keytar.deletePassword(SERVICE_NAME, accountName);
77
+ // If this was the current account, also delete the current account reference
78
+ const currentAccount = await getCurrentAccount();
79
+ if (currentAccount === accountName) {
80
+ await keytar.deletePassword(SERVICE_NAME, CURRENT_ACCOUNT_KEY);
81
+ }
82
+ return deleted;
83
+ }
84
+ /**
85
+ * Check if access token is expired or will expire soon
86
+ * @param bufferSeconds - Consider expired if expires within this many seconds (default: 60)
87
+ */
88
+ export function isTokenExpired(tokens, bufferSeconds = 60) {
89
+ const now = Math.floor(Date.now() / 1000);
90
+ return tokens.expires_at <= (now + bufferSeconds);
91
+ }
92
+ /**
93
+ * Check if OAuth tokens exist in keychain
94
+ */
95
+ export async function hasTokens() {
96
+ try {
97
+ const tokens = await getTokens();
98
+ return tokens !== null;
99
+ }
100
+ catch (error) {
101
+ return false;
102
+ }
103
+ }
104
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../src/oauth/tokens.ts"],"names":[],"mappings":"AAAA,MAAM,YAAY,GAAG,WAAW,CAAC;AACjC,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAC5C,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAU9C;;GAEG;AACH,KAAK,UAAU,SAAS;IACtB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;QACtC,OAAO,MAAM,CAAC,O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AC;QACH,MAAM,MAAM,GAAG,MAAM,SAAS,EAAE,CAAC;QACjC,OAAO,MAAM,KAAK,IAAI,CAAC;IACzB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { SevenClient } from '../client.js';
2
+ export declare function getBalance(client: SevenClient): Promise<unknown>;
3
+ export declare function getPricing(client: SevenClient, params?: {
4
+ country?: string;
5
+ format?: string;
6
+ }): Promise<unknown>;
7
+ export declare function getAnalytics(client: SevenClient, params?: {
8
+ start?: string;
9
+ end?: string;
10
+ subaccounts?: boolean;
11
+ }): Promise<unknown>;
12
+ export declare const accountTools: ({
13
+ name: string;
14
+ description: string;
15
+ inputSchema: {
16
+ type: string;
17
+ properties: {
18
+ country?: undefined;
19
+ format?: undefined;
20
+ start?: undefined;
21
+ end?: undefined;
22
+ subaccounts?: undefined;
23
+ };
24
+ };
25
+ } | {
26
+ name: string;
27
+ description: string;
28
+ inputSchema: {
29
+ type: string;
30
+ properties: {
31
+ country: {
32
+ type: string;
33
+ description: string;
34
+ };
35
+ format: {
36
+ type: string;
37
+ description: string;
38
+ enum: string[];
39
+ };
40
+ start?: undefined;
41
+ end?: undefined;
42
+ subaccounts?: undefined;
43
+ };
44
+ };
45
+ } | {
46
+ name: string;
47
+ description: string;
48
+ inputSchema: {
49
+ type: string;
50
+ properties: {
51
+ start: {
52
+ type: string;
53
+ description: string;
54
+ };
55
+ end: {
56
+ type: string;
57
+ description: string;
58
+ };
59
+ subaccounts: {
60
+ type: string;
61
+ description: string;
62
+ };
63
+ country?: undefined;
64
+ format?: undefined;
65
+ };
66
+ };
67
+ })[];
68
+ //# sourceMappingURL=account.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/tools/account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,wBAAsB,UAAU,CAAC,MAAM,EAAE,WAAW,oBAEnD;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,oBAEnG;AAED,wBAAsB,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,oBAEvH;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgDxB,CAAC"}
@@ -0,0 +1,59 @@
1
+ export async function getBalance(client) {
2
+ return await client.get('/balance');
3
+ }
4
+ export async function getPricing(client, params) {
5
+ return await client.get('/pricing', params);
6
+ }
7
+ export async function getAnalytics(client, params) {
8
+ return await client.get('/analytics', params);
9
+ }
10
+ export const accountTools = [
11
+ {
12
+ name: 'get_balance',
13
+ description: 'Check account balance',
14
+ inputSchema: {
15
+ type: 'object',
16
+ properties: {},
17
+ },
18
+ },
19
+ {
20
+ name: 'get_pricing',
21
+ description: 'Get pricing information for SMS, voice, and other services',
22
+ inputSchema: {
23
+ type: 'object',
24
+ properties: {
25
+ country: {
26
+ type: 'string',
27
+ description: 'Country code (ISO 3166-1 alpha-2) to get specific pricing',
28
+ },
29
+ format: {
30
+ type: 'string',
31
+ description: 'Response format',
32
+ enum: ['json', 'csv'],
33
+ },
34
+ },
35
+ },
36
+ },
37
+ {
38
+ name: 'get_analytics',
39
+ description: 'Get account statistics and analytics',
40
+ inputSchema: {
41
+ type: 'object',
42
+ properties: {
43
+ start: {
44
+ type: 'string',
45
+ description: 'Start date (YYYY-MM-DD)',
46
+ },
47
+ end: {
48
+ type: 'string',
49
+ description: 'End date (YYYY-MM-DD)',
50
+ },
51
+ subaccounts: {
52
+ type: 'boolean',
53
+ description: 'Include subaccount statistics',
54
+ },
55
+ },
56
+ },
57
+ },
58
+ ];
59
+ //# sourceMappingURL=account.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.js","sourceRoot":"","sources":["../../src/tools/account.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,MAAmB;IAClD,OAAO,MAAM,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,MAAmB,EAAE,MAA8C;IAClG,OAAO,MAAM,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAAmB,EAAE,MAAgE;IACtH,OAAO,MAAM,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,uBAAuB;QACpC,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;IACD;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,4DAA4D;QACzE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,2DAA2D;iBACzE;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,iBAAiB;oBAC9B,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;iBACtB;aACF;SACF;KACF;IACD;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,sCAAsC;QACnD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,yBAAyB;iBACvC;gBACD,GAAG,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,uBAAuB;iBACrC;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,+BAA+B;iBAC7C;aACF;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,101 @@
1
+ import { SevenClient } from '../client.js';
2
+ import type { ContactParams } from '../types.js';
3
+ export declare function listContacts(client: SevenClient): Promise<unknown>;
4
+ export declare function createContact(client: SevenClient, params: ContactParams): Promise<unknown>;
5
+ export declare function getContact(client: SevenClient, id: string): Promise<unknown>;
6
+ export declare function updateContact(client: SevenClient, id: string, params: ContactParams): Promise<unknown>;
7
+ export declare function deleteContact(client: SevenClient, id: string): Promise<unknown>;
8
+ export declare const contactsTools: ({
9
+ name: string;
10
+ description: string;
11
+ inputSchema: {
12
+ type: string;
13
+ properties: {
14
+ nick?: undefined;
15
+ empfaenger?: undefined;
16
+ email?: undefined;
17
+ groups?: undefined;
18
+ id?: undefined;
19
+ };
20
+ required?: undefined;
21
+ };
22
+ } | {
23
+ name: string;
24
+ description: string;
25
+ inputSchema: {
26
+ type: string;
27
+ properties: {
28
+ nick: {
29
+ type: string;
30
+ description: string;
31
+ };
32
+ empfaenger: {
33
+ type: string;
34
+ description: string;
35
+ };
36
+ email: {
37
+ type: string;
38
+ description: string;
39
+ };
40
+ groups: {
41
+ type: string;
42
+ description: string;
43
+ items: {
44
+ type: string;
45
+ };
46
+ };
47
+ id?: undefined;
48
+ };
49
+ required?: undefined;
50
+ };
51
+ } | {
52
+ name: string;
53
+ description: string;
54
+ inputSchema: {
55
+ type: string;
56
+ properties: {
57
+ id: {
58
+ type: string;
59
+ description: string;
60
+ };
61
+ nick?: undefined;
62
+ empfaenger?: undefined;
63
+ email?: undefined;
64
+ groups?: undefined;
65
+ };
66
+ required: string[];
67
+ };
68
+ } | {
69
+ name: string;
70
+ description: string;
71
+ inputSchema: {
72
+ type: string;
73
+ properties: {
74
+ id: {
75
+ type: string;
76
+ description: string;
77
+ };
78
+ nick: {
79
+ type: string;
80
+ description: string;
81
+ };
82
+ empfaenger: {
83
+ type: string;
84
+ description: string;
85
+ };
86
+ email: {
87
+ type: string;
88
+ description: string;
89
+ };
90
+ groups: {
91
+ type: string;
92
+ description: string;
93
+ items: {
94
+ type: string;
95
+ };
96
+ };
97
+ };
98
+ required: string[];
99
+ };
100
+ })[];
101
+ //# sourceMappingURL=contacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../../src/tools/contacts.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,UAAU,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,oBAE/D;AAED,wBAAsB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,oBAEzF;AAED,wBAAsB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,oBAElE;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8FzB,CAAC"}
@@ -0,0 +1,111 @@
1
+ export async function listContacts(client) {
2
+ return await client.get('/contacts');
3
+ }
4
+ export async function createContact(client, params) {
5
+ return await client.post('/contacts', params, { formEncoded: true });
6
+ }
7
+ export async function getContact(client, id) {
8
+ return await client.get(`/contacts/${id}`);
9
+ }
10
+ export async function updateContact(client, id, params) {
11
+ return await client.patch(`/contacts/${id}`, params, { formEncoded: true });
12
+ }
13
+ export async function deleteContact(client, id) {
14
+ return await client.delete(`/contacts/${id}`);
15
+ }
16
+ export const contactsTools = [
17
+ {
18
+ name: 'list_contacts',
19
+ description: 'List all contacts',
20
+ inputSchema: {
21
+ type: 'object',
22
+ properties: {},
23
+ },
24
+ },
25
+ {
26
+ name: 'create_contact',
27
+ description: 'Create a new contact',
28
+ inputSchema: {
29
+ type: 'object',
30
+ properties: {
31
+ nick: {
32
+ type: 'string',
33
+ description: 'Contact nickname',
34
+ },
35
+ empfaenger: {
36
+ type: 'string',
37
+ description: 'Phone number',
38
+ },
39
+ email: {
40
+ type: 'string',
41
+ description: 'Email address',
42
+ },
43
+ groups: {
44
+ type: 'array',
45
+ description: 'Array of group IDs to add the contact to',
46
+ items: { type: 'string' },
47
+ },
48
+ },
49
+ },
50
+ },
51
+ {
52
+ name: 'get_contact',
53
+ description: 'Get a specific contact by ID',
54
+ inputSchema: {
55
+ type: 'object',
56
+ properties: {
57
+ id: {
58
+ type: 'string',
59
+ description: 'Contact ID',
60
+ },
61
+ },
62
+ required: ['id'],
63
+ },
64
+ },
65
+ {
66
+ name: 'update_contact',
67
+ description: 'Update a contact. To add/remove contact from groups, provide the complete list of group IDs the contact should be a member of.',
68
+ inputSchema: {
69
+ type: 'object',
70
+ properties: {
71
+ id: {
72
+ type: 'string',
73
+ description: 'Contact ID to update',
74
+ },
75
+ nick: {
76
+ type: 'string',
77
+ description: 'Contact nickname',
78
+ },
79
+ empfaenger: {
80
+ type: 'string',
81
+ description: 'Phone number',
82
+ },
83
+ email: {
84
+ type: 'string',
85
+ description: 'Email address',
86
+ },
87
+ groups: {
88
+ type: 'array',
89
+ description: 'Complete array of group IDs the contact should be a member of (replaces existing groups)',
90
+ items: { type: 'string' },
91
+ },
92
+ },
93
+ required: ['id'],
94
+ },
95
+ },
96
+ {
97
+ name: 'delete_contact',
98
+ description: 'Delete a contact',
99
+ inputSchema: {
100
+ type: 'object',
101
+ properties: {
102
+ id: {
103
+ type: 'string',
104
+ description: 'Contact ID to delete',
105
+ },
106
+ },
107
+ required: ['id'],
108
+ },
109
+ },
110
+ ];
111
+ //# sourceMappingURL=contacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../src/tools/contacts.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAAmB;IACpD,OAAO,MAAM,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAmB,EAAE,MAAqB;IAC5E,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,MAAmB,EAAE,EAAU;IAC9D,OAAO,MAAM,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAmB,EAAE,EAAU,EAAE,MAAqB;IACxF,OAAO,MAAM,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAmB,EAAE,EAAU;IACjE,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,mBAAmB;QAChC,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,E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0F;oBACvG,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;iBAC1B;aACF;YACD,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB;KACF;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,kBAAkB;QAC/B,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE;oBACF,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,sBAAsB;iBACpC;aACF;YACD,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB;KACF;CACF,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { SevenClient } from '../client.js';
2
+ import type { GroupParams } from '../types.js';
3
+ export declare function listGroups(client: SevenClient): Promise<unknown>;
4
+ export declare function createGroup(client: SevenClient, params: GroupParams): Promise<unknown>;
5
+ export declare function getGroup(client: SevenClient, id: string): Promise<unknown>;
6
+ export declare function updateGroup(client: SevenClient, id: string, params: GroupParams): Promise<unknown>;
7
+ export declare function deleteGroup(client: SevenClient, id: string): Promise<unknown>;
8
+ export declare const groupsTools: ({
9
+ name: string;
10
+ description: string;
11
+ inputSchema: {
12
+ type: string;
13
+ properties: {
14
+ name?: undefined;
15
+ id?: undefined;
16
+ };
17
+ required?: undefined;
18
+ };
19
+ } | {
20
+ name: string;
21
+ description: string;
22
+ inputSchema: {
23
+ type: string;
24
+ properties: {
25
+ name: {
26
+ type: string;
27
+ description: string;
28
+ };
29
+ id?: undefined;
30
+ };
31
+ required: string[];
32
+ };
33
+ } | {
34
+ name: string;
35
+ description: string;
36
+ inputSchema: {
37
+ type: string;
38
+ properties: {
39
+ id: {
40
+ type: string;
41
+ description: string;
42
+ };
43
+ name?: undefined;
44
+ };
45
+ required: string[];
46
+ };
47
+ } | {
48
+ name: string;
49
+ description: string;
50
+ inputSchema: {
51
+ type: string;
52
+ properties: {
53
+ id: {
54
+ type: string;
55
+ description: string;
56
+ };
57
+ name: {
58
+ type: string;
59
+ description: string;
60
+ };
61
+ };
62
+ required: string[];
63
+ };
64
+ })[];
65
+ //# sourceMappingURL=groups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../src/tools/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,wBAAsB,UAAU,CAAC,MAAM,EAAE,WAAW,oBAEnD;AAED,wBAAsB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,oBAEzE;AAED,wBAAsB,QAAQ,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,oBAE7D;AAED,wBAAsB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,oBAErF;AAED,wBAAsB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,oBAEhE;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqEvB,CAAC"}
@@ -0,0 +1,86 @@
1
+ export async function listGroups(client) {
2
+ return await client.get('/groups');
3
+ }
4
+ export async function createGroup(client, params) {
5
+ return await client.post('/groups', params, { formEncoded: true });
6
+ }
7
+ export async function getGroup(client, id) {
8
+ return await client.get(`/groups/${id}`);
9
+ }
10
+ export async function updateGroup(client, id, params) {
11
+ return await client.patch(`/groups/${id}`, params, { formEncoded: true });
12
+ }
13
+ export async function deleteGroup(client, id) {
14
+ return await client.delete(`/groups/${id}`);
15
+ }
16
+ export const groupsTools = [
17
+ {
18
+ name: 'list_groups',
19
+ description: 'List all contact groups',
20
+ inputSchema: {
21
+ type: 'object',
22
+ properties: {},
23
+ },
24
+ },
25
+ {
26
+ name: 'create_group',
27
+ description: 'Create a new contact group',
28
+ inputSchema: {
29
+ type: 'object',
30
+ properties: {
31
+ name: {
32
+ type: 'string',
33
+ description: 'Group name',
34
+ },
35
+ },
36
+ required: ['name'],
37
+ },
38
+ },
39
+ {
40
+ name: 'get_group',
41
+ description: 'Get a specific group by ID',
42
+ inputSchema: {
43
+ type: 'object',
44
+ properties: {
45
+ id: {
46
+ type: 'string',
47
+ description: 'Group ID',
48
+ },
49
+ },
50
+ required: ['id'],
51
+ },
52
+ },
53
+ {
54
+ name: 'update_group',
55
+ description: 'Update a contact group (only name can be updated)',
56
+ inputSchema: {
57
+ type: 'object',
58
+ properties: {
59
+ id: {
60
+ type: 'string',
61
+ description: 'Group ID to update',
62
+ },
63
+ name: {
64
+ type: 'string',
65
+ description: 'Group name',
66
+ },
67
+ },
68
+ required: ['id', 'name'],
69
+ },
70
+ },
71
+ {
72
+ name: 'delete_group',
73
+ description: 'Delete a contact group',
74
+ inputSchema: {
75
+ type: 'object',
76
+ properties: {
77
+ id: {
78
+ type: 'string',
79
+ description: 'Group ID to delete',
80
+ },
81
+ },
82
+ required: ['id'],
83
+ },
84
+ },
85
+ ];
86
+ //# sourceMappingURL=groups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"groups.js","sourceRoot":"","sources":["../../src/tools/groups.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,MAAmB;IAClD,OAAO,MAAM,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AACrC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,MAAmB,EAAE,MAAmB;IACxE,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;AACrE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,MAAmB,EAAE,EAAU;IAC5D,OAAO,MAAM,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AAC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AAE,QAAQ;oBACd,WAAW,EAAE,YAAY;iBAC1B;aACF;YACD,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC;SACzB;KACF;IACD;QACE,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,wBAAwB;QACrC,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE;oBACF,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,oBAAoB;iBAClC;aACF;YACD,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB;KACF;CACF,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { SevenClient } from '../client.js';
2
+ import type { LookupParams } from '../types.js';
3
+ export declare function lookupFormat(client: SevenClient, params: LookupParams): Promise<unknown>;
4
+ export declare function lookupRCS(client: SevenClient, params: LookupParams): Promise<unknown>;
5
+ export declare function lookupHLR(client: SevenClient, params: LookupParams): Promise<unknown>;
6
+ export declare function lookupMNP(client: SevenClient, params: LookupParams): Promise<unknown>;
7
+ export declare function lookupCNAM(client: SevenClient, params: LookupParams): Promise<unknown>;
8
+ export declare const lookupTools: {
9
+ name: string;
10
+ description: string;
11
+ inputSchema: {
12
+ type: string;
13
+ properties: {
14
+ number: {
15
+ type: string;
16
+ description: string;
17
+ };
18
+ };
19
+ required: string[];
20
+ };
21
+ }[];
22
+ //# sourceMappingURL=lookup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../src/tools/lookup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,wBAAsB,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,oBAE3E;AAED,wBAAsB,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,oBAExE;AAED,wBAAsB,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,oBAExE;AAED,wBAAsB,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,oBAExE;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,oBAEzE;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;GAuEvB,CAAC"}