@sendly/node 3.15.1 → 3.15.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.
package/dist/index.d.mts CHANGED
@@ -328,6 +328,11 @@ interface BatchMessageItem {
328
328
  * Message content
329
329
  */
330
330
  text: string;
331
+ /**
332
+ * Custom JSON metadata for this message (max 4KB).
333
+ * Merged with batch-level metadata, with per-message metadata taking priority.
334
+ */
335
+ metadata?: Record<string, any>;
331
336
  }
332
337
  /**
333
338
  * Request payload for sending batch messages
@@ -2057,6 +2062,15 @@ declare class AccountResource {
2057
2062
  limit?: number;
2058
2063
  offset?: number;
2059
2064
  }): Promise<CreditTransaction[]>;
2065
+ transferCredits(options: {
2066
+ targetOrganizationId: string;
2067
+ amount: number;
2068
+ }): Promise<{
2069
+ success: boolean;
2070
+ amount: number;
2071
+ sourceBalance: number;
2072
+ targetBalance: number;
2073
+ }>;
2060
2074
  /**
2061
2075
  * List API keys for the account
2062
2076
  *
package/dist/index.d.ts CHANGED
@@ -328,6 +328,11 @@ interface BatchMessageItem {
328
328
  * Message content
329
329
  */
330
330
  text: string;
331
+ /**
332
+ * Custom JSON metadata for this message (max 4KB).
333
+ * Merged with batch-level metadata, with per-message metadata taking priority.
334
+ */
335
+ metadata?: Record<string, any>;
331
336
  }
332
337
  /**
333
338
  * Request payload for sending batch messages
@@ -2057,6 +2062,15 @@ declare class AccountResource {
2057
2062
  limit?: number;
2058
2063
  offset?: number;
2059
2064
  }): Promise<CreditTransaction[]>;
2065
+ transferCredits(options: {
2066
+ targetOrganizationId: string;
2067
+ amount: number;
2068
+ }): Promise<{
2069
+ success: boolean;
2070
+ amount: number;
2071
+ sourceBalance: number;
2072
+ targetBalance: number;
2073
+ }>;
2060
2074
  /**
2061
2075
  * List API keys for the account
2062
2076
  *
package/dist/index.js CHANGED
@@ -1414,6 +1414,16 @@ var AccountResource = class {
1414
1414
  });
1415
1415
  return transactions;
1416
1416
  }
1417
+ async transferCredits(options) {
1418
+ return this.http.request({
1419
+ method: "POST",
1420
+ path: "/credits/transfer",
1421
+ body: {
1422
+ targetOrganizationId: options.targetOrganizationId,
1423
+ amount: options.amount
1424
+ }
1425
+ });
1426
+ }
1417
1427
  /**
1418
1428
  * List API keys for the account
1419
1429
  *
package/dist/index.mjs CHANGED
@@ -1354,6 +1354,16 @@ var AccountResource = class {
1354
1354
  });
1355
1355
  return transactions;
1356
1356
  }
1357
+ async transferCredits(options) {
1358
+ return this.http.request({
1359
+ method: "POST",
1360
+ path: "/credits/transfer",
1361
+ body: {
1362
+ targetOrganizationId: options.targetOrganizationId,
1363
+ amount: options.amount
1364
+ }
1365
+ });
1366
+ }
1357
1367
  /**
1358
1368
  * List API keys for the account
1359
1369
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendly/node",
3
- "version": "3.15.1",
3
+ "version": "3.15.3",
4
4
  "description": "Official Sendly Node.js SDK for SMS messaging",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",