mailmeteor 0.0.4 → 0.0.6
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 +182 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +811 -1
- package/dist/index.mjs +182 -7
- package/dist/index.mjs.map +1 -1
- package/dist/types/generated-sdk/index.d.ts +2 -2
- package/dist/types/generated-sdk/index.d.ts.map +1 -1
- package/dist/types/generated-sdk/sdk.gen.d.ts +83 -5
- package/dist/types/generated-sdk/sdk.gen.d.ts.map +1 -1
- package/dist/types/generated-sdk/types.gen.d.ts +674 -0
- package/dist/types/generated-sdk/types.gen.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -953,7 +953,7 @@ class HeyApiRegistry5 {
|
|
|
953
953
|
get(key) {
|
|
954
954
|
const instance = this.instances.get(key ?? this.defaultKey);
|
|
955
955
|
if (!instance) {
|
|
956
|
-
throw new Error(`No SDK client found. Create one with "new
|
|
956
|
+
throw new Error(`No SDK client found. Create one with "new Contacts2()" to fix this error.`);
|
|
957
957
|
}
|
|
958
958
|
return instance;
|
|
959
959
|
}
|
|
@@ -969,7 +969,7 @@ class HeyApiRegistry6 {
|
|
|
969
969
|
get(key) {
|
|
970
970
|
const instance = this.instances.get(key ?? this.defaultKey);
|
|
971
971
|
if (!instance) {
|
|
972
|
-
throw new Error(`No SDK client found. Create one with "new
|
|
972
|
+
throw new Error(`No SDK client found. Create one with "new BillingAddons2()" to fix this error.`);
|
|
973
973
|
}
|
|
974
974
|
return instance;
|
|
975
975
|
}
|
|
@@ -985,7 +985,7 @@ class HeyApiRegistry7 {
|
|
|
985
985
|
get(key) {
|
|
986
986
|
const instance = this.instances.get(key ?? this.defaultKey);
|
|
987
987
|
if (!instance) {
|
|
988
|
-
throw new Error(`No SDK client found. Create one with "new
|
|
988
|
+
throw new Error(`No SDK client found. Create one with "new BillingSubscription2()" to fix this error.`);
|
|
989
989
|
}
|
|
990
990
|
return instance;
|
|
991
991
|
}
|
|
@@ -994,6 +994,22 @@ class HeyApiRegistry7 {
|
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
996
|
class HeyApiRegistry8 {
|
|
997
|
+
constructor() {
|
|
998
|
+
this.defaultKey = 'default';
|
|
999
|
+
this.instances = new Map();
|
|
1000
|
+
}
|
|
1001
|
+
get(key) {
|
|
1002
|
+
const instance = this.instances.get(key ?? this.defaultKey);
|
|
1003
|
+
if (!instance) {
|
|
1004
|
+
throw new Error(`No SDK client found. Create one with "new Billing2()" to fix this error.`);
|
|
1005
|
+
}
|
|
1006
|
+
return instance;
|
|
1007
|
+
}
|
|
1008
|
+
set(value, key) {
|
|
1009
|
+
this.instances.set(key ?? this.defaultKey, value);
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
class HeyApiRegistry9 {
|
|
997
1013
|
constructor() {
|
|
998
1014
|
this.defaultKey = 'default';
|
|
999
1015
|
this.instances = new Map();
|
|
@@ -1265,6 +1281,164 @@ class ContactLists2 extends HeyApiClient {
|
|
|
1265
1281
|
}
|
|
1266
1282
|
}
|
|
1267
1283
|
ContactLists2.__registry = new HeyApiRegistry4();
|
|
1284
|
+
class Contacts extends HeyApiClient {
|
|
1285
|
+
delAll(parameters, options) {
|
|
1286
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'body', key: 'owner' }, { in: 'body', key: 'contact_list' }] }]);
|
|
1287
|
+
return (options?.client ?? this.client).delete({
|
|
1288
|
+
responseStyle: 'data',
|
|
1289
|
+
url: '/contacts',
|
|
1290
|
+
...options,
|
|
1291
|
+
...params,
|
|
1292
|
+
headers: {
|
|
1293
|
+
'Content-Type': 'application/json',
|
|
1294
|
+
...options?.headers,
|
|
1295
|
+
...params.headers
|
|
1296
|
+
}
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
list(parameters, options) {
|
|
1300
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
1301
|
+
{ in: 'query', key: 'owner' },
|
|
1302
|
+
{ in: 'query', key: 'limit' },
|
|
1303
|
+
{ in: 'query', key: 'email' },
|
|
1304
|
+
{ in: 'query', key: 'unsubscribed' },
|
|
1305
|
+
{ in: 'query', key: 'contact_list' }
|
|
1306
|
+
] }]);
|
|
1307
|
+
return (options?.client ?? this.client).get({
|
|
1308
|
+
responseStyle: 'data',
|
|
1309
|
+
url: '/contacts',
|
|
1310
|
+
...options,
|
|
1311
|
+
...params
|
|
1312
|
+
});
|
|
1313
|
+
}
|
|
1314
|
+
create(parameters, options) {
|
|
1315
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
1316
|
+
{ in: 'body', key: 'owner' },
|
|
1317
|
+
{ in: 'body', key: 'email' },
|
|
1318
|
+
{ in: 'body', key: 'blocked' },
|
|
1319
|
+
{ in: 'body', key: 'unsubscribed' },
|
|
1320
|
+
{ in: 'body', key: 'contact_lists' },
|
|
1321
|
+
{ in: 'body', key: 'properties' },
|
|
1322
|
+
{ in: 'body', key: 'notes' },
|
|
1323
|
+
{ in: 'body', key: 'metadata' }
|
|
1324
|
+
] }]);
|
|
1325
|
+
return (options?.client ?? this.client).post({
|
|
1326
|
+
responseStyle: 'data',
|
|
1327
|
+
url: '/contacts',
|
|
1328
|
+
...options,
|
|
1329
|
+
...params,
|
|
1330
|
+
headers: {
|
|
1331
|
+
'Content-Type': 'application/json',
|
|
1332
|
+
...options?.headers,
|
|
1333
|
+
...params.headers
|
|
1334
|
+
}
|
|
1335
|
+
});
|
|
1336
|
+
}
|
|
1337
|
+
batchCreate(parameters, options) {
|
|
1338
|
+
const params = buildClientParams([parameters], [{ args: [{ in: 'body', key: 'contacts' }] }]);
|
|
1339
|
+
return (options?.client ?? this.client).post({
|
|
1340
|
+
responseStyle: 'data',
|
|
1341
|
+
url: '/contacts/batch',
|
|
1342
|
+
...options,
|
|
1343
|
+
...params,
|
|
1344
|
+
headers: {
|
|
1345
|
+
'Content-Type': 'application/json',
|
|
1346
|
+
...options?.headers,
|
|
1347
|
+
...params.headers
|
|
1348
|
+
}
|
|
1349
|
+
});
|
|
1350
|
+
}
|
|
1351
|
+
batchCreate2(parameters, options) {
|
|
1352
|
+
const params = buildClientParams([parameters], [{ args: [{ key: 'body', map: 'body' }] }]);
|
|
1353
|
+
return (options?.client ?? this.client).post({
|
|
1354
|
+
responseStyle: 'data',
|
|
1355
|
+
url: '/contacts/batch_legacy',
|
|
1356
|
+
...options,
|
|
1357
|
+
...params,
|
|
1358
|
+
headers: {
|
|
1359
|
+
'Content-Type': 'application/json',
|
|
1360
|
+
...options?.headers,
|
|
1361
|
+
...params.headers
|
|
1362
|
+
}
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
del(contact_id, options) {
|
|
1366
|
+
const params = buildClientParams([contact_id], [{ in: 'path', key: 'contact_id' }]);
|
|
1367
|
+
return (options?.client ?? this.client).delete({
|
|
1368
|
+
responseStyle: 'data',
|
|
1369
|
+
url: '/contacts/{contact_id}',
|
|
1370
|
+
...options,
|
|
1371
|
+
...params
|
|
1372
|
+
});
|
|
1373
|
+
}
|
|
1374
|
+
retrieve(contact_id, options) {
|
|
1375
|
+
const params = buildClientParams([contact_id], [{ in: 'path', key: 'contact_id' }]);
|
|
1376
|
+
return (options?.client ?? this.client).get({
|
|
1377
|
+
responseStyle: 'data',
|
|
1378
|
+
url: '/contacts/{contact_id}',
|
|
1379
|
+
...options,
|
|
1380
|
+
...params
|
|
1381
|
+
});
|
|
1382
|
+
}
|
|
1383
|
+
update(contact_id, parameters, options) {
|
|
1384
|
+
const params = buildClientParams([contact_id, parameters], [{ in: 'path', key: 'contact_id' }, { args: [
|
|
1385
|
+
{ in: 'body', key: 'blocked' },
|
|
1386
|
+
{ in: 'body', key: 'unsubscribed' },
|
|
1387
|
+
{ in: 'body', key: 'contact_lists' },
|
|
1388
|
+
{ in: 'body', key: 'properties' },
|
|
1389
|
+
{ in: 'body', key: 'notes' },
|
|
1390
|
+
{ in: 'body', key: 'metadata' }
|
|
1391
|
+
] }]);
|
|
1392
|
+
return (options?.client ?? this.client).patch({
|
|
1393
|
+
responseStyle: 'data',
|
|
1394
|
+
url: '/contacts/{contact_id}',
|
|
1395
|
+
...options,
|
|
1396
|
+
...params,
|
|
1397
|
+
headers: {
|
|
1398
|
+
'Content-Type': 'application/json',
|
|
1399
|
+
...options?.headers,
|
|
1400
|
+
...params.headers
|
|
1401
|
+
}
|
|
1402
|
+
});
|
|
1403
|
+
}
|
|
1404
|
+
block(contact_id, options) {
|
|
1405
|
+
const params = buildClientParams([contact_id], [{ in: 'path', key: 'contact_id' }]);
|
|
1406
|
+
return (options?.client ?? this.client).post({
|
|
1407
|
+
responseStyle: 'data',
|
|
1408
|
+
url: '/contacts/{contact_id}/block',
|
|
1409
|
+
...options,
|
|
1410
|
+
...params
|
|
1411
|
+
});
|
|
1412
|
+
}
|
|
1413
|
+
unblock(contact_id, options) {
|
|
1414
|
+
const params = buildClientParams([contact_id], [{ in: 'path', key: 'contact_id' }]);
|
|
1415
|
+
return (options?.client ?? this.client).post({
|
|
1416
|
+
responseStyle: 'data',
|
|
1417
|
+
url: '/contacts/{contact_id}/unblock',
|
|
1418
|
+
...options,
|
|
1419
|
+
...params
|
|
1420
|
+
});
|
|
1421
|
+
}
|
|
1422
|
+
resubscribe(contact_id, options) {
|
|
1423
|
+
const params = buildClientParams([contact_id], [{ in: 'path', key: 'contact_id' }]);
|
|
1424
|
+
return (options?.client ?? this.client).post({
|
|
1425
|
+
responseStyle: 'data',
|
|
1426
|
+
url: '/contacts/{contact_id}/resubscribe',
|
|
1427
|
+
...options,
|
|
1428
|
+
...params
|
|
1429
|
+
});
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
class Contacts2 extends HeyApiClient {
|
|
1433
|
+
constructor(args) {
|
|
1434
|
+
super(args);
|
|
1435
|
+
Contacts2.__registry.set(this, args?.key);
|
|
1436
|
+
}
|
|
1437
|
+
get contacts() {
|
|
1438
|
+
return this._contacts ?? (this._contacts = new Contacts({ client: this.client }));
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
Contacts2.__registry = new HeyApiRegistry5();
|
|
1268
1442
|
class BillingAddons extends HeyApiClient {
|
|
1269
1443
|
getAddons(options) {
|
|
1270
1444
|
return (options?.client ?? this.client).get({
|
|
@@ -1320,7 +1494,7 @@ class BillingAddons2 extends HeyApiClient {
|
|
|
1320
1494
|
return this._billingAddons ?? (this._billingAddons = new BillingAddons({ client: this.client }));
|
|
1321
1495
|
}
|
|
1322
1496
|
}
|
|
1323
|
-
BillingAddons2.__registry = new
|
|
1497
|
+
BillingAddons2.__registry = new HeyApiRegistry6();
|
|
1324
1498
|
class BillingSubscription extends HeyApiClient {
|
|
1325
1499
|
get(options) {
|
|
1326
1500
|
return (options?.client ?? this.client).get({
|
|
@@ -1367,7 +1541,7 @@ class BillingSubscription2 extends HeyApiClient {
|
|
|
1367
1541
|
return this._billingSubscription ?? (this._billingSubscription = new BillingSubscription({ client: this.client }));
|
|
1368
1542
|
}
|
|
1369
1543
|
}
|
|
1370
|
-
BillingSubscription2.__registry = new
|
|
1544
|
+
BillingSubscription2.__registry = new HeyApiRegistry7();
|
|
1371
1545
|
class Billing extends HeyApiClient {
|
|
1372
1546
|
getPrices(parameters, options) {
|
|
1373
1547
|
const params = buildClientParams([parameters], [{ args: [{ in: 'query', key: 'currency' }] }]);
|
|
@@ -1388,7 +1562,7 @@ class Billing2 extends HeyApiClient {
|
|
|
1388
1562
|
return this._billing ?? (this._billing = new Billing({ client: this.client }));
|
|
1389
1563
|
}
|
|
1390
1564
|
}
|
|
1391
|
-
Billing2.__registry = new
|
|
1565
|
+
Billing2.__registry = new HeyApiRegistry8();
|
|
1392
1566
|
class Default extends HeyApiClient {
|
|
1393
1567
|
constructor(args) {
|
|
1394
1568
|
super(args);
|
|
@@ -1402,7 +1576,7 @@ class Default extends HeyApiClient {
|
|
|
1402
1576
|
});
|
|
1403
1577
|
}
|
|
1404
1578
|
}
|
|
1405
|
-
Default.__registry = new
|
|
1579
|
+
Default.__registry = new HeyApiRegistry9();
|
|
1406
1580
|
|
|
1407
1581
|
var types_gen = /*#__PURE__*/Object.freeze({
|
|
1408
1582
|
__proto__: null
|
|
@@ -1423,6 +1597,7 @@ class Mailmeteor {
|
|
|
1423
1597
|
this.contactLists = new ContactLists({ client: this.client });
|
|
1424
1598
|
this.organizations = new Organizations({ client: this.client });
|
|
1425
1599
|
this.users = new Users({ client: this.client });
|
|
1600
|
+
this.contacts = new Contacts({ client: this.client });
|
|
1426
1601
|
}
|
|
1427
1602
|
setApiKey(key) {
|
|
1428
1603
|
const currentConfig = this.client.getConfig();
|