mailmeteor 0.0.46 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +28 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +82 -1
- package/dist/index.mjs +28 -3
- package/dist/index.mjs.map +1 -1
- package/dist/types/generated-sdk/index.d.ts +1 -1
- package/dist/types/generated-sdk/index.d.ts.map +1 -1
- package/dist/types/generated-sdk/sdk.gen.d.ts +4 -1
- package/dist/types/generated-sdk/sdk.gen.d.ts.map +1 -1
- package/dist/types/generated-sdk/types.gen.d.ts +66 -0
- package/dist/types/generated-sdk/types.gen.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1633,7 +1633,8 @@ class PipelineConversations extends HeyApiClient {
|
|
|
1633
1633
|
const params = buildClientParams([pipeline_conversation_id, parameters], [{ in: 'path', key: 'pipeline_conversation_id' }, { args: [
|
|
1634
1634
|
{ in: 'query', key: 'include_metrics' },
|
|
1635
1635
|
{ in: 'body', key: 'owner' },
|
|
1636
|
-
{ in: 'body', key: 'status' }
|
|
1636
|
+
{ in: 'body', key: 'status' },
|
|
1637
|
+
{ in: 'body', key: 'is_read' }
|
|
1637
1638
|
] }]);
|
|
1638
1639
|
return (options?.client ?? this.client).patch({
|
|
1639
1640
|
responseStyle: 'data',
|
|
@@ -1751,6 +1752,24 @@ class Integrations extends HeyApiClient {
|
|
|
1751
1752
|
...params
|
|
1752
1753
|
});
|
|
1753
1754
|
}
|
|
1755
|
+
connectAccount(integration_id, account_id, options) {
|
|
1756
|
+
const params = buildClientParams([integration_id, account_id], [{ in: 'path', key: 'integration_id' }, { in: 'path', key: 'account_id' }]);
|
|
1757
|
+
return (options?.client ?? this.client).post({
|
|
1758
|
+
responseStyle: 'data',
|
|
1759
|
+
url: '/integrations/{integration_id}/accounts/{account_id}/connect',
|
|
1760
|
+
...options,
|
|
1761
|
+
...params
|
|
1762
|
+
});
|
|
1763
|
+
}
|
|
1764
|
+
disconnectAccount(integration_id, account_id, options) {
|
|
1765
|
+
const params = buildClientParams([integration_id, account_id], [{ in: 'path', key: 'integration_id' }, { in: 'path', key: 'account_id' }]);
|
|
1766
|
+
return (options?.client ?? this.client).post({
|
|
1767
|
+
responseStyle: 'data',
|
|
1768
|
+
url: '/integrations/{integration_id}/accounts/{account_id}/disconnect',
|
|
1769
|
+
...options,
|
|
1770
|
+
...params
|
|
1771
|
+
});
|
|
1772
|
+
}
|
|
1754
1773
|
}
|
|
1755
1774
|
class Integrations2 extends HeyApiClient {
|
|
1756
1775
|
constructor(args) {
|
|
@@ -1797,6 +1816,12 @@ function querySerializer(query) {
|
|
|
1797
1816
|
}
|
|
1798
1817
|
return parts.join('&');
|
|
1799
1818
|
}
|
|
1819
|
+
function getAuthorizationHeader(apiKey) {
|
|
1820
|
+
if (apiKey.startsWith('sk_')) {
|
|
1821
|
+
return `Basic ${Buffer.from(String(apiKey) + ':').toString('base64')}`;
|
|
1822
|
+
}
|
|
1823
|
+
return `Bearer ${apiKey}`;
|
|
1824
|
+
}
|
|
1800
1825
|
class Mailmeteor {
|
|
1801
1826
|
constructor(key, config) {
|
|
1802
1827
|
const baseUrl = config?.baseUrl || 'https://api.mailmeteor.com/v1';
|
|
@@ -1805,7 +1830,7 @@ class Mailmeteor {
|
|
|
1805
1830
|
throwOnError: true,
|
|
1806
1831
|
querySerializer,
|
|
1807
1832
|
headers: {
|
|
1808
|
-
'Authorization':
|
|
1833
|
+
'Authorization': getAuthorizationHeader(key),
|
|
1809
1834
|
},
|
|
1810
1835
|
}));
|
|
1811
1836
|
this.billingAddons = new BillingAddons({ client: this.client });
|
|
@@ -1826,7 +1851,7 @@ class Mailmeteor {
|
|
|
1826
1851
|
...currentConfig,
|
|
1827
1852
|
headers: {
|
|
1828
1853
|
...currentHeaders,
|
|
1829
|
-
'Authorization':
|
|
1854
|
+
'Authorization': getAuthorizationHeader(key),
|
|
1830
1855
|
},
|
|
1831
1856
|
});
|
|
1832
1857
|
}
|