mailmeteor 0.0.10 → 0.0.12

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Mailmeteor SDK
2
2
 
3
- Official Mailmeteor SDK for Node.js and TypeScript.
3
+ Official (not yet public) Mailmeteor SDK for Node.js and TypeScript.
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,7 +18,7 @@ import { Mailmeteor } from 'mailmeteor'
18
18
  const mailmeteor = new Mailmeteor('your-api-key')
19
19
 
20
20
  // Use the SDK
21
- const subscriptions = await mailmeteor.billingSubscription.getSubscriptions()
21
+ const subscriptions = await mailmeteor.emails.send()
22
22
  ```
23
23
 
24
24
  ### Custom Base URL
@@ -29,14 +29,6 @@ You can specify a custom base URL when initializing the SDK:
29
29
  const mailmeteor = new MailmeteorSDK('your-api-key', { baseUrl: 'https://custom-api.example.com/v1' })
30
30
  ```
31
31
 
32
- ## API Resources
33
-
34
- The SDK provides access to the following resources:
35
-
36
- - `billingAddons` - Manage billing add-ons
37
- - `billingSubscription` - Manage billing subscriptions
38
- - `billing` - General billing operations
39
-
40
32
  ## TypeScript Support
41
33
 
42
34
  The SDK is written in TypeScript and includes complete type definitions. You can import types from the SDK:
package/dist/index.cjs CHANGED
@@ -1609,12 +1609,29 @@ var types_gen = /*#__PURE__*/Object.freeze({
1609
1609
  __proto__: null
1610
1610
  });
1611
1611
 
1612
+ function querySerializer(query) {
1613
+ const parts = [];
1614
+ for (const [key, value] of Object.entries(query)) {
1615
+ if (value === undefined || value === null)
1616
+ continue;
1617
+ if (Array.isArray(value)) {
1618
+ for (const item of value) {
1619
+ parts.push(`${encodeURIComponent(key)}[]=${encodeURIComponent(String(item))}`);
1620
+ }
1621
+ }
1622
+ else {
1623
+ parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
1624
+ }
1625
+ }
1626
+ return parts.join('&');
1627
+ }
1612
1628
  class Mailmeteor {
1613
1629
  constructor(key, config) {
1614
1630
  const baseUrl = config?.baseUrl || "https://api.mailmeteor.com/v1";
1615
1631
  this.client = createClient(createConfig({
1616
1632
  baseUrl,
1617
1633
  throwOnError: true,
1634
+ querySerializer,
1618
1635
  headers: {
1619
1636
  'Authorization': `Bearer ${key}`,
1620
1637
  },