@marlinjai/mail-sdk 0.12.0 → 0.14.0

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
@@ -350,11 +350,38 @@ const client = dashboardMail.forUser({ subject: session.subject }); // no worksp
350
350
  const workspace = await client.workspaces.create({
351
351
  slug: 'opuntia',
352
352
  name: 'ŌPUNTIA',
353
+ // Required since 0.14.0: every workspace belongs to a company of the shared login.
354
+ company_id: session.companyId,
353
355
  owner: { email: session.email, name: session.name },
354
356
  });
355
357
  // From here on, calls for this workspace pass its id: forUser({ subject, workspaceId: workspace.id }).
356
358
  ```
357
359
 
360
+ ### Company roles: who is in without an invitation (0.14.0)
361
+
362
+ An owner or admin of a workspace's company is in the workspace without being
363
+ invited. The service never talks to the shared login, so the dashboard tells
364
+ it: before acting for a person, it states that person's owner and admin roles
365
+ in companies, complete, exactly as the verified session reports them.
366
+
367
+ ```ts
368
+ const result = await dashboardMail.forUser({ subject: session.subject }).members.syncCompanyRole({
369
+ email: session.email,
370
+ name: session.name,
371
+ // Every company where the session says owner or admin, and nothing else.
372
+ companies: [{ company_id: 'tenant_opuntia', role: 'owner' }],
373
+ });
374
+ // { granted: [...workspace ids], revoked: [...], unchanged: [...] }
375
+ ```
376
+
377
+ The service gives the person a member row in every workspace of those
378
+ companies and takes away every company role the statement does not name, so an
379
+ empty list is how a lost role is reported. Only the dashboard's service token
380
+ may make this call (an API key and every trusted application are refused), it
381
+ takes no `Idempotency-Key`, and the roles must never come from anywhere but
382
+ the verified session: this call is believed because of who sends it. A role
383
+ not confirmed again within `COMPANY_ROLE_MAX_AGE_HOURS` (24) counts as absent.
384
+
358
385
  Adding a person to an existing workspace binds them by their auth-brain
359
386
  subject, not an email invite (the service never sees a login, so the caller
360
387
  resolves the person first):
package/dist/index.d.mts CHANGED
@@ -209,6 +209,11 @@ declare function createNamespaces(config: CoreConfig): {
209
209
  subject: string;
210
210
  created_at: string;
211
211
  role: "owner" | "admin" | "editor" | "viewer";
212
+ source?: "invited" | "company" | undefined;
213
+ company_role?: "owner" | "admin" | null | undefined;
214
+ company_checked_at?: string | null | undefined;
215
+ direct_role?: "owner" | "admin" | "editor" | "viewer" | null | undefined;
216
+ inherited?: boolean | undefined;
212
217
  }[];
213
218
  next_cursor: string | null;
214
219
  }>;
@@ -224,6 +229,11 @@ declare function createNamespaces(config: CoreConfig): {
224
229
  subject: string;
225
230
  created_at: string;
226
231
  role: "owner" | "admin" | "editor" | "viewer";
232
+ source?: "invited" | "company" | undefined;
233
+ company_role?: "owner" | "admin" | null | undefined;
234
+ company_checked_at?: string | null | undefined;
235
+ direct_role?: "owner" | "admin" | "editor" | "viewer" | null | undefined;
236
+ inherited?: boolean | undefined;
227
237
  }>;
228
238
  update: (id: string, body: RouteBody<"members.update">, opts?: RequestOpts) => Promise<{
229
239
  id: string;
@@ -232,10 +242,28 @@ declare function createNamespaces(config: CoreConfig): {
232
242
  subject: string;
233
243
  created_at: string;
234
244
  role: "owner" | "admin" | "editor" | "viewer";
245
+ source?: "invited" | "company" | undefined;
246
+ company_role?: "owner" | "admin" | null | undefined;
247
+ company_checked_at?: string | null | undefined;
248
+ direct_role?: "owner" | "admin" | "editor" | "viewer" | null | undefined;
249
+ inherited?: boolean | undefined;
235
250
  }>;
236
251
  remove: (id: string, opts?: RequestOpts) => Promise<{
237
252
  ok: true;
238
253
  }>;
254
+ /**
255
+ * The dashboard only: states the signed-in person's owner and admin
256
+ * roles in companies, complete, as the shared login's verified session
257
+ * reports them. The service gives the person a member row in every
258
+ * workspace of those companies and takes away every company role not
259
+ * stated. Never send a role that came from anywhere but the verified
260
+ * session.
261
+ */
262
+ syncCompanyRole: (body: RouteBody<"members.syncCompanyRole">, opts?: RequestOpts) => Promise<{
263
+ unchanged: string[];
264
+ granted: string[];
265
+ revoked: string[];
266
+ }>;
239
267
  };
240
268
  /**
241
269
  * Invitations: an admin invites an address with a role (the token is in
@@ -245,7 +273,7 @@ declare function createNamespaces(config: CoreConfig): {
245
273
  invites: {
246
274
  create: (body: RouteBody<"invites.create">, opts?: RequestOpts) => Promise<{
247
275
  invite: {
248
- status: "pending" | "accepted" | "revoked" | "expired";
276
+ status: "pending" | "revoked" | "accepted" | "expired";
249
277
  id: string;
250
278
  email: string;
251
279
  created_at: string;
@@ -262,7 +290,7 @@ declare function createNamespaces(config: CoreConfig): {
262
290
  }>;
263
291
  list: (query?: RouteQuery<"invites.list">, opts?: RequestOpts) => Promise<{
264
292
  data: {
265
- status: "pending" | "accepted" | "revoked" | "expired";
293
+ status: "pending" | "revoked" | "accepted" | "expired";
266
294
  id: string;
267
295
  email: string;
268
296
  created_at: string;
@@ -278,7 +306,7 @@ declare function createNamespaces(config: CoreConfig): {
278
306
  next_cursor: string | null;
279
307
  }>;
280
308
  revoke: (id: string, opts?: RequestOpts) => Promise<{
281
- status: "pending" | "accepted" | "revoked" | "expired";
309
+ status: "pending" | "revoked" | "accepted" | "expired";
282
310
  id: string;
283
311
  email: string;
284
312
  created_at: string;
@@ -1225,6 +1253,7 @@ declare function createNamespaces(config: CoreConfig): {
1225
1253
  kind: "smtp";
1226
1254
  created_at: string;
1227
1255
  updated_at: string;
1256
+ reply_to: string | null;
1228
1257
  config: {
1229
1258
  host: string;
1230
1259
  port: number;
@@ -1247,7 +1276,6 @@ declare function createNamespaces(config: CoreConfig): {
1247
1276
  };
1248
1277
  from_name: string;
1249
1278
  from_email: string;
1250
- reply_to: string | null;
1251
1279
  policy: {
1252
1280
  daily_recipient_budget: number;
1253
1281
  min_interval_ms: number;
@@ -1259,6 +1287,7 @@ declare function createNamespaces(config: CoreConfig): {
1259
1287
  kind: "resend";
1260
1288
  created_at: string;
1261
1289
  updated_at: string;
1290
+ reply_to: string | null;
1262
1291
  config: {};
1263
1292
  has_secret: boolean;
1264
1293
  rejections: {
@@ -1276,7 +1305,6 @@ declare function createNamespaces(config: CoreConfig): {
1276
1305
  };
1277
1306
  from_name: string;
1278
1307
  from_email: string;
1279
- reply_to: string | null;
1280
1308
  policy: {
1281
1309
  daily_recipient_budget: number;
1282
1310
  min_interval_ms: number;
@@ -1298,6 +1326,7 @@ declare function createNamespaces(config: CoreConfig): {
1298
1326
  kind: "smtp";
1299
1327
  created_at: string;
1300
1328
  updated_at: string;
1329
+ reply_to: string | null;
1301
1330
  config: {
1302
1331
  host: string;
1303
1332
  port: number;
@@ -1320,7 +1349,6 @@ declare function createNamespaces(config: CoreConfig): {
1320
1349
  };
1321
1350
  from_name: string;
1322
1351
  from_email: string;
1323
- reply_to: string | null;
1324
1352
  policy: {
1325
1353
  daily_recipient_budget: number;
1326
1354
  min_interval_ms: number;
@@ -1332,6 +1360,7 @@ declare function createNamespaces(config: CoreConfig): {
1332
1360
  kind: "resend";
1333
1361
  created_at: string;
1334
1362
  updated_at: string;
1363
+ reply_to: string | null;
1335
1364
  config: {};
1336
1365
  has_secret: boolean;
1337
1366
  rejections: {
@@ -1349,7 +1378,6 @@ declare function createNamespaces(config: CoreConfig): {
1349
1378
  };
1350
1379
  from_name: string;
1351
1380
  from_email: string;
1352
- reply_to: string | null;
1353
1381
  policy: {
1354
1382
  daily_recipient_budget: number;
1355
1383
  min_interval_ms: number;
@@ -1369,6 +1397,7 @@ declare function createNamespaces(config: CoreConfig): {
1369
1397
  kind: "smtp";
1370
1398
  created_at: string;
1371
1399
  updated_at: string;
1400
+ reply_to: string | null;
1372
1401
  config: {
1373
1402
  host: string;
1374
1403
  port: number;
@@ -1391,7 +1420,6 @@ declare function createNamespaces(config: CoreConfig): {
1391
1420
  };
1392
1421
  from_name: string;
1393
1422
  from_email: string;
1394
- reply_to: string | null;
1395
1423
  policy: {
1396
1424
  daily_recipient_budget: number;
1397
1425
  min_interval_ms: number;
@@ -1403,6 +1431,7 @@ declare function createNamespaces(config: CoreConfig): {
1403
1431
  kind: "resend";
1404
1432
  created_at: string;
1405
1433
  updated_at: string;
1434
+ reply_to: string | null;
1406
1435
  config: {};
1407
1436
  has_secret: boolean;
1408
1437
  rejections: {
@@ -1420,7 +1449,6 @@ declare function createNamespaces(config: CoreConfig): {
1420
1449
  };
1421
1450
  from_name: string;
1422
1451
  from_email: string;
1423
- reply_to: string | null;
1424
1452
  policy: {
1425
1453
  daily_recipient_budget: number;
1426
1454
  min_interval_ms: number;
@@ -1440,6 +1468,7 @@ declare function createNamespaces(config: CoreConfig): {
1440
1468
  kind: "smtp";
1441
1469
  created_at: string;
1442
1470
  updated_at: string;
1471
+ reply_to: string | null;
1443
1472
  config: {
1444
1473
  host: string;
1445
1474
  port: number;
@@ -1462,7 +1491,6 @@ declare function createNamespaces(config: CoreConfig): {
1462
1491
  };
1463
1492
  from_name: string;
1464
1493
  from_email: string;
1465
- reply_to: string | null;
1466
1494
  policy: {
1467
1495
  daily_recipient_budget: number;
1468
1496
  min_interval_ms: number;
@@ -1474,6 +1502,7 @@ declare function createNamespaces(config: CoreConfig): {
1474
1502
  kind: "resend";
1475
1503
  created_at: string;
1476
1504
  updated_at: string;
1505
+ reply_to: string | null;
1477
1506
  config: {};
1478
1507
  has_secret: boolean;
1479
1508
  rejections: {
@@ -1491,7 +1520,6 @@ declare function createNamespaces(config: CoreConfig): {
1491
1520
  };
1492
1521
  from_name: string;
1493
1522
  from_email: string;
1494
- reply_to: string | null;
1495
1523
  policy: {
1496
1524
  daily_recipient_budget: number;
1497
1525
  min_interval_ms: number;
@@ -1525,6 +1553,7 @@ declare function createNamespaces(config: CoreConfig): {
1525
1553
  kind: "smtp";
1526
1554
  created_at: string;
1527
1555
  updated_at: string;
1556
+ reply_to: string | null;
1528
1557
  config: {
1529
1558
  host: string;
1530
1559
  port: number;
@@ -1547,7 +1576,6 @@ declare function createNamespaces(config: CoreConfig): {
1547
1576
  };
1548
1577
  from_name: string;
1549
1578
  from_email: string;
1550
- reply_to: string | null;
1551
1579
  policy: {
1552
1580
  daily_recipient_budget: number;
1553
1581
  min_interval_ms: number;
@@ -1559,6 +1587,7 @@ declare function createNamespaces(config: CoreConfig): {
1559
1587
  kind: "resend";
1560
1588
  created_at: string;
1561
1589
  updated_at: string;
1590
+ reply_to: string | null;
1562
1591
  config: {};
1563
1592
  has_secret: boolean;
1564
1593
  rejections: {
@@ -1576,7 +1605,6 @@ declare function createNamespaces(config: CoreConfig): {
1576
1605
  };
1577
1606
  from_name: string;
1578
1607
  from_email: string;
1579
- reply_to: string | null;
1580
1608
  policy: {
1581
1609
  daily_recipient_budget: number;
1582
1610
  min_interval_ms: number;
@@ -1597,6 +1625,7 @@ declare function createNamespaces(config: CoreConfig): {
1597
1625
  kind: "smtp";
1598
1626
  created_at: string;
1599
1627
  updated_at: string;
1628
+ reply_to: string | null;
1600
1629
  config: {
1601
1630
  host: string;
1602
1631
  port: number;
@@ -1619,7 +1648,6 @@ declare function createNamespaces(config: CoreConfig): {
1619
1648
  };
1620
1649
  from_name: string;
1621
1650
  from_email: string;
1622
- reply_to: string | null;
1623
1651
  policy: {
1624
1652
  daily_recipient_budget: number;
1625
1653
  min_interval_ms: number;
@@ -1631,6 +1659,7 @@ declare function createNamespaces(config: CoreConfig): {
1631
1659
  kind: "resend";
1632
1660
  created_at: string;
1633
1661
  updated_at: string;
1662
+ reply_to: string | null;
1634
1663
  config: {};
1635
1664
  has_secret: boolean;
1636
1665
  rejections: {
@@ -1648,7 +1677,6 @@ declare function createNamespaces(config: CoreConfig): {
1648
1677
  };
1649
1678
  from_name: string;
1650
1679
  from_email: string;
1651
- reply_to: string | null;
1652
1680
  policy: {
1653
1681
  daily_recipient_budget: number;
1654
1682
  min_interval_ms: number;
@@ -1821,7 +1849,7 @@ declare function createNamespaces(config: CoreConfig): {
1821
1849
  list: (query?: RouteQuery<"suppressions.list">, opts?: RequestOpts) => Promise<{
1822
1850
  data: {
1823
1851
  id: string;
1824
- reason: "manual" | "unsubscribed" | "bounced" | "complained";
1852
+ reason: "manual" | "bounced" | "complained" | "unsubscribed";
1825
1853
  email: string;
1826
1854
  note: string | null;
1827
1855
  created_at: string;
@@ -1832,7 +1860,7 @@ declare function createNamespaces(config: CoreConfig): {
1832
1860
  }>;
1833
1861
  create: (body: RouteBody<"suppressions.create">, opts?: RequestOpts) => Promise<{
1834
1862
  id: string;
1835
- reason: "manual" | "unsubscribed" | "bounced" | "complained";
1863
+ reason: "manual" | "bounced" | "complained" | "unsubscribed";
1836
1864
  email: string;
1837
1865
  note: string | null;
1838
1866
  created_at: string;
@@ -1870,6 +1898,8 @@ declare function createNamespaces(config: CoreConfig): {
1870
1898
  failed: number;
1871
1899
  skipped: number;
1872
1900
  };
1901
+ reply_to: string | null;
1902
+ transactional: boolean;
1873
1903
  scheduled_at: string | null;
1874
1904
  ab_test: {
1875
1905
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -1924,6 +1954,8 @@ declare function createNamespaces(config: CoreConfig): {
1924
1954
  failed: number;
1925
1955
  skipped: number;
1926
1956
  };
1957
+ reply_to: string | null;
1958
+ transactional: boolean;
1927
1959
  scheduled_at: string | null;
1928
1960
  ab_test: {
1929
1961
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -1976,6 +2008,8 @@ declare function createNamespaces(config: CoreConfig): {
1976
2008
  failed: number;
1977
2009
  skipped: number;
1978
2010
  };
2011
+ reply_to: string | null;
2012
+ transactional: boolean;
1979
2013
  scheduled_at: string | null;
1980
2014
  ab_test: {
1981
2015
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2030,6 +2064,8 @@ declare function createNamespaces(config: CoreConfig): {
2030
2064
  failed: number;
2031
2065
  skipped: number;
2032
2066
  };
2067
+ reply_to: string | null;
2068
+ transactional: boolean;
2033
2069
  scheduled_at: string | null;
2034
2070
  ab_test: {
2035
2071
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2151,6 +2187,8 @@ declare function createNamespaces(config: CoreConfig): {
2151
2187
  failed: number;
2152
2188
  skipped: number;
2153
2189
  };
2190
+ reply_to: string | null;
2191
+ transactional: boolean;
2154
2192
  scheduled_at: string | null;
2155
2193
  ab_test: {
2156
2194
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2203,6 +2241,8 @@ declare function createNamespaces(config: CoreConfig): {
2203
2241
  failed: number;
2204
2242
  skipped: number;
2205
2243
  };
2244
+ reply_to: string | null;
2245
+ transactional: boolean;
2206
2246
  scheduled_at: string | null;
2207
2247
  ab_test: {
2208
2248
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2255,6 +2295,8 @@ declare function createNamespaces(config: CoreConfig): {
2255
2295
  failed: number;
2256
2296
  skipped: number;
2257
2297
  };
2298
+ reply_to: string | null;
2299
+ transactional: boolean;
2258
2300
  scheduled_at: string | null;
2259
2301
  ab_test: {
2260
2302
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2307,6 +2349,8 @@ declare function createNamespaces(config: CoreConfig): {
2307
2349
  failed: number;
2308
2350
  skipped: number;
2309
2351
  };
2352
+ reply_to: string | null;
2353
+ transactional: boolean;
2310
2354
  scheduled_at: string | null;
2311
2355
  ab_test: {
2312
2356
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2359,6 +2403,8 @@ declare function createNamespaces(config: CoreConfig): {
2359
2403
  failed: number;
2360
2404
  skipped: number;
2361
2405
  };
2406
+ reply_to: string | null;
2407
+ transactional: boolean;
2362
2408
  scheduled_at: string | null;
2363
2409
  ab_test: {
2364
2410
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2411,6 +2457,8 @@ declare function createNamespaces(config: CoreConfig): {
2411
2457
  failed: number;
2412
2458
  skipped: number;
2413
2459
  };
2460
+ reply_to: string | null;
2461
+ transactional: boolean;
2414
2462
  scheduled_at: string | null;
2415
2463
  ab_test: {
2416
2464
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2471,6 +2519,8 @@ declare function createNamespaces(config: CoreConfig): {
2471
2519
  failed: number;
2472
2520
  skipped: number;
2473
2521
  };
2522
+ reply_to: string | null;
2523
+ transactional: boolean;
2474
2524
  scheduled_at: string | null;
2475
2525
  ab_test: {
2476
2526
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2523,6 +2573,8 @@ declare function createNamespaces(config: CoreConfig): {
2523
2573
  failed: number;
2524
2574
  skipped: number;
2525
2575
  };
2576
+ reply_to: string | null;
2577
+ transactional: boolean;
2526
2578
  scheduled_at: string | null;
2527
2579
  ab_test: {
2528
2580
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2575,6 +2627,8 @@ declare function createNamespaces(config: CoreConfig): {
2575
2627
  failed: number;
2576
2628
  skipped: number;
2577
2629
  };
2630
+ reply_to: string | null;
2631
+ transactional: boolean;
2578
2632
  scheduled_at: string | null;
2579
2633
  ab_test: {
2580
2634
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2627,6 +2681,8 @@ declare function createNamespaces(config: CoreConfig): {
2627
2681
  failed: number;
2628
2682
  skipped: number;
2629
2683
  };
2684
+ reply_to: string | null;
2685
+ transactional: boolean;
2630
2686
  scheduled_at: string | null;
2631
2687
  ab_test: {
2632
2688
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2679,6 +2735,8 @@ declare function createNamespaces(config: CoreConfig): {
2679
2735
  failed: number;
2680
2736
  skipped: number;
2681
2737
  };
2738
+ reply_to: string | null;
2739
+ transactional: boolean;
2682
2740
  scheduled_at: string | null;
2683
2741
  ab_test: {
2684
2742
  status: "pending" | "testing" | "awaiting_pick" | "decided";
package/dist/index.d.ts CHANGED
@@ -209,6 +209,11 @@ declare function createNamespaces(config: CoreConfig): {
209
209
  subject: string;
210
210
  created_at: string;
211
211
  role: "owner" | "admin" | "editor" | "viewer";
212
+ source?: "invited" | "company" | undefined;
213
+ company_role?: "owner" | "admin" | null | undefined;
214
+ company_checked_at?: string | null | undefined;
215
+ direct_role?: "owner" | "admin" | "editor" | "viewer" | null | undefined;
216
+ inherited?: boolean | undefined;
212
217
  }[];
213
218
  next_cursor: string | null;
214
219
  }>;
@@ -224,6 +229,11 @@ declare function createNamespaces(config: CoreConfig): {
224
229
  subject: string;
225
230
  created_at: string;
226
231
  role: "owner" | "admin" | "editor" | "viewer";
232
+ source?: "invited" | "company" | undefined;
233
+ company_role?: "owner" | "admin" | null | undefined;
234
+ company_checked_at?: string | null | undefined;
235
+ direct_role?: "owner" | "admin" | "editor" | "viewer" | null | undefined;
236
+ inherited?: boolean | undefined;
227
237
  }>;
228
238
  update: (id: string, body: RouteBody<"members.update">, opts?: RequestOpts) => Promise<{
229
239
  id: string;
@@ -232,10 +242,28 @@ declare function createNamespaces(config: CoreConfig): {
232
242
  subject: string;
233
243
  created_at: string;
234
244
  role: "owner" | "admin" | "editor" | "viewer";
245
+ source?: "invited" | "company" | undefined;
246
+ company_role?: "owner" | "admin" | null | undefined;
247
+ company_checked_at?: string | null | undefined;
248
+ direct_role?: "owner" | "admin" | "editor" | "viewer" | null | undefined;
249
+ inherited?: boolean | undefined;
235
250
  }>;
236
251
  remove: (id: string, opts?: RequestOpts) => Promise<{
237
252
  ok: true;
238
253
  }>;
254
+ /**
255
+ * The dashboard only: states the signed-in person's owner and admin
256
+ * roles in companies, complete, as the shared login's verified session
257
+ * reports them. The service gives the person a member row in every
258
+ * workspace of those companies and takes away every company role not
259
+ * stated. Never send a role that came from anywhere but the verified
260
+ * session.
261
+ */
262
+ syncCompanyRole: (body: RouteBody<"members.syncCompanyRole">, opts?: RequestOpts) => Promise<{
263
+ unchanged: string[];
264
+ granted: string[];
265
+ revoked: string[];
266
+ }>;
239
267
  };
240
268
  /**
241
269
  * Invitations: an admin invites an address with a role (the token is in
@@ -245,7 +273,7 @@ declare function createNamespaces(config: CoreConfig): {
245
273
  invites: {
246
274
  create: (body: RouteBody<"invites.create">, opts?: RequestOpts) => Promise<{
247
275
  invite: {
248
- status: "pending" | "accepted" | "revoked" | "expired";
276
+ status: "pending" | "revoked" | "accepted" | "expired";
249
277
  id: string;
250
278
  email: string;
251
279
  created_at: string;
@@ -262,7 +290,7 @@ declare function createNamespaces(config: CoreConfig): {
262
290
  }>;
263
291
  list: (query?: RouteQuery<"invites.list">, opts?: RequestOpts) => Promise<{
264
292
  data: {
265
- status: "pending" | "accepted" | "revoked" | "expired";
293
+ status: "pending" | "revoked" | "accepted" | "expired";
266
294
  id: string;
267
295
  email: string;
268
296
  created_at: string;
@@ -278,7 +306,7 @@ declare function createNamespaces(config: CoreConfig): {
278
306
  next_cursor: string | null;
279
307
  }>;
280
308
  revoke: (id: string, opts?: RequestOpts) => Promise<{
281
- status: "pending" | "accepted" | "revoked" | "expired";
309
+ status: "pending" | "revoked" | "accepted" | "expired";
282
310
  id: string;
283
311
  email: string;
284
312
  created_at: string;
@@ -1225,6 +1253,7 @@ declare function createNamespaces(config: CoreConfig): {
1225
1253
  kind: "smtp";
1226
1254
  created_at: string;
1227
1255
  updated_at: string;
1256
+ reply_to: string | null;
1228
1257
  config: {
1229
1258
  host: string;
1230
1259
  port: number;
@@ -1247,7 +1276,6 @@ declare function createNamespaces(config: CoreConfig): {
1247
1276
  };
1248
1277
  from_name: string;
1249
1278
  from_email: string;
1250
- reply_to: string | null;
1251
1279
  policy: {
1252
1280
  daily_recipient_budget: number;
1253
1281
  min_interval_ms: number;
@@ -1259,6 +1287,7 @@ declare function createNamespaces(config: CoreConfig): {
1259
1287
  kind: "resend";
1260
1288
  created_at: string;
1261
1289
  updated_at: string;
1290
+ reply_to: string | null;
1262
1291
  config: {};
1263
1292
  has_secret: boolean;
1264
1293
  rejections: {
@@ -1276,7 +1305,6 @@ declare function createNamespaces(config: CoreConfig): {
1276
1305
  };
1277
1306
  from_name: string;
1278
1307
  from_email: string;
1279
- reply_to: string | null;
1280
1308
  policy: {
1281
1309
  daily_recipient_budget: number;
1282
1310
  min_interval_ms: number;
@@ -1298,6 +1326,7 @@ declare function createNamespaces(config: CoreConfig): {
1298
1326
  kind: "smtp";
1299
1327
  created_at: string;
1300
1328
  updated_at: string;
1329
+ reply_to: string | null;
1301
1330
  config: {
1302
1331
  host: string;
1303
1332
  port: number;
@@ -1320,7 +1349,6 @@ declare function createNamespaces(config: CoreConfig): {
1320
1349
  };
1321
1350
  from_name: string;
1322
1351
  from_email: string;
1323
- reply_to: string | null;
1324
1352
  policy: {
1325
1353
  daily_recipient_budget: number;
1326
1354
  min_interval_ms: number;
@@ -1332,6 +1360,7 @@ declare function createNamespaces(config: CoreConfig): {
1332
1360
  kind: "resend";
1333
1361
  created_at: string;
1334
1362
  updated_at: string;
1363
+ reply_to: string | null;
1335
1364
  config: {};
1336
1365
  has_secret: boolean;
1337
1366
  rejections: {
@@ -1349,7 +1378,6 @@ declare function createNamespaces(config: CoreConfig): {
1349
1378
  };
1350
1379
  from_name: string;
1351
1380
  from_email: string;
1352
- reply_to: string | null;
1353
1381
  policy: {
1354
1382
  daily_recipient_budget: number;
1355
1383
  min_interval_ms: number;
@@ -1369,6 +1397,7 @@ declare function createNamespaces(config: CoreConfig): {
1369
1397
  kind: "smtp";
1370
1398
  created_at: string;
1371
1399
  updated_at: string;
1400
+ reply_to: string | null;
1372
1401
  config: {
1373
1402
  host: string;
1374
1403
  port: number;
@@ -1391,7 +1420,6 @@ declare function createNamespaces(config: CoreConfig): {
1391
1420
  };
1392
1421
  from_name: string;
1393
1422
  from_email: string;
1394
- reply_to: string | null;
1395
1423
  policy: {
1396
1424
  daily_recipient_budget: number;
1397
1425
  min_interval_ms: number;
@@ -1403,6 +1431,7 @@ declare function createNamespaces(config: CoreConfig): {
1403
1431
  kind: "resend";
1404
1432
  created_at: string;
1405
1433
  updated_at: string;
1434
+ reply_to: string | null;
1406
1435
  config: {};
1407
1436
  has_secret: boolean;
1408
1437
  rejections: {
@@ -1420,7 +1449,6 @@ declare function createNamespaces(config: CoreConfig): {
1420
1449
  };
1421
1450
  from_name: string;
1422
1451
  from_email: string;
1423
- reply_to: string | null;
1424
1452
  policy: {
1425
1453
  daily_recipient_budget: number;
1426
1454
  min_interval_ms: number;
@@ -1440,6 +1468,7 @@ declare function createNamespaces(config: CoreConfig): {
1440
1468
  kind: "smtp";
1441
1469
  created_at: string;
1442
1470
  updated_at: string;
1471
+ reply_to: string | null;
1443
1472
  config: {
1444
1473
  host: string;
1445
1474
  port: number;
@@ -1462,7 +1491,6 @@ declare function createNamespaces(config: CoreConfig): {
1462
1491
  };
1463
1492
  from_name: string;
1464
1493
  from_email: string;
1465
- reply_to: string | null;
1466
1494
  policy: {
1467
1495
  daily_recipient_budget: number;
1468
1496
  min_interval_ms: number;
@@ -1474,6 +1502,7 @@ declare function createNamespaces(config: CoreConfig): {
1474
1502
  kind: "resend";
1475
1503
  created_at: string;
1476
1504
  updated_at: string;
1505
+ reply_to: string | null;
1477
1506
  config: {};
1478
1507
  has_secret: boolean;
1479
1508
  rejections: {
@@ -1491,7 +1520,6 @@ declare function createNamespaces(config: CoreConfig): {
1491
1520
  };
1492
1521
  from_name: string;
1493
1522
  from_email: string;
1494
- reply_to: string | null;
1495
1523
  policy: {
1496
1524
  daily_recipient_budget: number;
1497
1525
  min_interval_ms: number;
@@ -1525,6 +1553,7 @@ declare function createNamespaces(config: CoreConfig): {
1525
1553
  kind: "smtp";
1526
1554
  created_at: string;
1527
1555
  updated_at: string;
1556
+ reply_to: string | null;
1528
1557
  config: {
1529
1558
  host: string;
1530
1559
  port: number;
@@ -1547,7 +1576,6 @@ declare function createNamespaces(config: CoreConfig): {
1547
1576
  };
1548
1577
  from_name: string;
1549
1578
  from_email: string;
1550
- reply_to: string | null;
1551
1579
  policy: {
1552
1580
  daily_recipient_budget: number;
1553
1581
  min_interval_ms: number;
@@ -1559,6 +1587,7 @@ declare function createNamespaces(config: CoreConfig): {
1559
1587
  kind: "resend";
1560
1588
  created_at: string;
1561
1589
  updated_at: string;
1590
+ reply_to: string | null;
1562
1591
  config: {};
1563
1592
  has_secret: boolean;
1564
1593
  rejections: {
@@ -1576,7 +1605,6 @@ declare function createNamespaces(config: CoreConfig): {
1576
1605
  };
1577
1606
  from_name: string;
1578
1607
  from_email: string;
1579
- reply_to: string | null;
1580
1608
  policy: {
1581
1609
  daily_recipient_budget: number;
1582
1610
  min_interval_ms: number;
@@ -1597,6 +1625,7 @@ declare function createNamespaces(config: CoreConfig): {
1597
1625
  kind: "smtp";
1598
1626
  created_at: string;
1599
1627
  updated_at: string;
1628
+ reply_to: string | null;
1600
1629
  config: {
1601
1630
  host: string;
1602
1631
  port: number;
@@ -1619,7 +1648,6 @@ declare function createNamespaces(config: CoreConfig): {
1619
1648
  };
1620
1649
  from_name: string;
1621
1650
  from_email: string;
1622
- reply_to: string | null;
1623
1651
  policy: {
1624
1652
  daily_recipient_budget: number;
1625
1653
  min_interval_ms: number;
@@ -1631,6 +1659,7 @@ declare function createNamespaces(config: CoreConfig): {
1631
1659
  kind: "resend";
1632
1660
  created_at: string;
1633
1661
  updated_at: string;
1662
+ reply_to: string | null;
1634
1663
  config: {};
1635
1664
  has_secret: boolean;
1636
1665
  rejections: {
@@ -1648,7 +1677,6 @@ declare function createNamespaces(config: CoreConfig): {
1648
1677
  };
1649
1678
  from_name: string;
1650
1679
  from_email: string;
1651
- reply_to: string | null;
1652
1680
  policy: {
1653
1681
  daily_recipient_budget: number;
1654
1682
  min_interval_ms: number;
@@ -1821,7 +1849,7 @@ declare function createNamespaces(config: CoreConfig): {
1821
1849
  list: (query?: RouteQuery<"suppressions.list">, opts?: RequestOpts) => Promise<{
1822
1850
  data: {
1823
1851
  id: string;
1824
- reason: "manual" | "unsubscribed" | "bounced" | "complained";
1852
+ reason: "manual" | "bounced" | "complained" | "unsubscribed";
1825
1853
  email: string;
1826
1854
  note: string | null;
1827
1855
  created_at: string;
@@ -1832,7 +1860,7 @@ declare function createNamespaces(config: CoreConfig): {
1832
1860
  }>;
1833
1861
  create: (body: RouteBody<"suppressions.create">, opts?: RequestOpts) => Promise<{
1834
1862
  id: string;
1835
- reason: "manual" | "unsubscribed" | "bounced" | "complained";
1863
+ reason: "manual" | "bounced" | "complained" | "unsubscribed";
1836
1864
  email: string;
1837
1865
  note: string | null;
1838
1866
  created_at: string;
@@ -1870,6 +1898,8 @@ declare function createNamespaces(config: CoreConfig): {
1870
1898
  failed: number;
1871
1899
  skipped: number;
1872
1900
  };
1901
+ reply_to: string | null;
1902
+ transactional: boolean;
1873
1903
  scheduled_at: string | null;
1874
1904
  ab_test: {
1875
1905
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -1924,6 +1954,8 @@ declare function createNamespaces(config: CoreConfig): {
1924
1954
  failed: number;
1925
1955
  skipped: number;
1926
1956
  };
1957
+ reply_to: string | null;
1958
+ transactional: boolean;
1927
1959
  scheduled_at: string | null;
1928
1960
  ab_test: {
1929
1961
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -1976,6 +2008,8 @@ declare function createNamespaces(config: CoreConfig): {
1976
2008
  failed: number;
1977
2009
  skipped: number;
1978
2010
  };
2011
+ reply_to: string | null;
2012
+ transactional: boolean;
1979
2013
  scheduled_at: string | null;
1980
2014
  ab_test: {
1981
2015
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2030,6 +2064,8 @@ declare function createNamespaces(config: CoreConfig): {
2030
2064
  failed: number;
2031
2065
  skipped: number;
2032
2066
  };
2067
+ reply_to: string | null;
2068
+ transactional: boolean;
2033
2069
  scheduled_at: string | null;
2034
2070
  ab_test: {
2035
2071
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2151,6 +2187,8 @@ declare function createNamespaces(config: CoreConfig): {
2151
2187
  failed: number;
2152
2188
  skipped: number;
2153
2189
  };
2190
+ reply_to: string | null;
2191
+ transactional: boolean;
2154
2192
  scheduled_at: string | null;
2155
2193
  ab_test: {
2156
2194
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2203,6 +2241,8 @@ declare function createNamespaces(config: CoreConfig): {
2203
2241
  failed: number;
2204
2242
  skipped: number;
2205
2243
  };
2244
+ reply_to: string | null;
2245
+ transactional: boolean;
2206
2246
  scheduled_at: string | null;
2207
2247
  ab_test: {
2208
2248
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2255,6 +2295,8 @@ declare function createNamespaces(config: CoreConfig): {
2255
2295
  failed: number;
2256
2296
  skipped: number;
2257
2297
  };
2298
+ reply_to: string | null;
2299
+ transactional: boolean;
2258
2300
  scheduled_at: string | null;
2259
2301
  ab_test: {
2260
2302
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2307,6 +2349,8 @@ declare function createNamespaces(config: CoreConfig): {
2307
2349
  failed: number;
2308
2350
  skipped: number;
2309
2351
  };
2352
+ reply_to: string | null;
2353
+ transactional: boolean;
2310
2354
  scheduled_at: string | null;
2311
2355
  ab_test: {
2312
2356
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2359,6 +2403,8 @@ declare function createNamespaces(config: CoreConfig): {
2359
2403
  failed: number;
2360
2404
  skipped: number;
2361
2405
  };
2406
+ reply_to: string | null;
2407
+ transactional: boolean;
2362
2408
  scheduled_at: string | null;
2363
2409
  ab_test: {
2364
2410
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2411,6 +2457,8 @@ declare function createNamespaces(config: CoreConfig): {
2411
2457
  failed: number;
2412
2458
  skipped: number;
2413
2459
  };
2460
+ reply_to: string | null;
2461
+ transactional: boolean;
2414
2462
  scheduled_at: string | null;
2415
2463
  ab_test: {
2416
2464
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2471,6 +2519,8 @@ declare function createNamespaces(config: CoreConfig): {
2471
2519
  failed: number;
2472
2520
  skipped: number;
2473
2521
  };
2522
+ reply_to: string | null;
2523
+ transactional: boolean;
2474
2524
  scheduled_at: string | null;
2475
2525
  ab_test: {
2476
2526
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2523,6 +2573,8 @@ declare function createNamespaces(config: CoreConfig): {
2523
2573
  failed: number;
2524
2574
  skipped: number;
2525
2575
  };
2576
+ reply_to: string | null;
2577
+ transactional: boolean;
2526
2578
  scheduled_at: string | null;
2527
2579
  ab_test: {
2528
2580
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2575,6 +2627,8 @@ declare function createNamespaces(config: CoreConfig): {
2575
2627
  failed: number;
2576
2628
  skipped: number;
2577
2629
  };
2630
+ reply_to: string | null;
2631
+ transactional: boolean;
2578
2632
  scheduled_at: string | null;
2579
2633
  ab_test: {
2580
2634
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2627,6 +2681,8 @@ declare function createNamespaces(config: CoreConfig): {
2627
2681
  failed: number;
2628
2682
  skipped: number;
2629
2683
  };
2684
+ reply_to: string | null;
2685
+ transactional: boolean;
2630
2686
  scheduled_at: string | null;
2631
2687
  ab_test: {
2632
2688
  status: "pending" | "testing" | "awaiting_pick" | "decided";
@@ -2679,6 +2735,8 @@ declare function createNamespaces(config: CoreConfig): {
2679
2735
  failed: number;
2680
2736
  skipped: number;
2681
2737
  };
2738
+ reply_to: string | null;
2739
+ transactional: boolean;
2682
2740
  scheduled_at: string | null;
2683
2741
  ab_test: {
2684
2742
  status: "pending" | "testing" | "awaiting_pick" | "decided";
package/dist/index.js CHANGED
@@ -414,7 +414,16 @@ function createNamespaces(config) {
414
414
  */
415
415
  add: (body, opts) => execute(config, "members.add", { body }, opts),
416
416
  update: (id, body, opts) => execute(config, "members.update", { params: { id }, body }, opts),
417
- remove: (id, opts) => execute(config, "members.remove", { params: { id } }, opts)
417
+ remove: (id, opts) => execute(config, "members.remove", { params: { id } }, opts),
418
+ /**
419
+ * The dashboard only: states the signed-in person's owner and admin
420
+ * roles in companies, complete, as the shared login's verified session
421
+ * reports them. The service gives the person a member row in every
422
+ * workspace of those companies and takes away every company role not
423
+ * stated. Never send a role that came from anywhere but the verified
424
+ * session.
425
+ */
426
+ syncCompanyRole: (body, opts) => execute(config, "members.syncCompanyRole", { body }, opts)
418
427
  },
419
428
  /**
420
429
  * Invitations: an admin invites an address with a role (the token is in
package/dist/index.mjs CHANGED
@@ -398,7 +398,16 @@ function createNamespaces(config) {
398
398
  */
399
399
  add: (body, opts) => execute(config, "members.add", { body }, opts),
400
400
  update: (id, body, opts) => execute(config, "members.update", { params: { id }, body }, opts),
401
- remove: (id, opts) => execute(config, "members.remove", { params: { id } }, opts)
401
+ remove: (id, opts) => execute(config, "members.remove", { params: { id } }, opts),
402
+ /**
403
+ * The dashboard only: states the signed-in person's owner and admin
404
+ * roles in companies, complete, as the shared login's verified session
405
+ * reports them. The service gives the person a member row in every
406
+ * workspace of those companies and takes away every company role not
407
+ * stated. Never send a role that came from anywhere but the verified
408
+ * session.
409
+ */
410
+ syncCompanyRole: (body, opts) => execute(config, "members.syncCompanyRole", { body }, opts)
402
411
  },
403
412
  /**
404
413
  * Invitations: an admin invites an address with a role (the token is in
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.12.0",
6
+ "version": "0.14.0",
7
7
  "description": "Typed client for the Lumitra Mail v1 API: Node and edge runtimes, retries with idempotency, cursor pagination, webhook verification",
8
8
  "license": "MIT",
9
9
  "repository": {
@@ -32,7 +32,7 @@
32
32
  "LICENSE"
33
33
  ],
34
34
  "dependencies": {
35
- "@marlinjai/mail-contract": "^0.12.0"
35
+ "@marlinjai/mail-contract": "^0.14.0"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "zod": "^3.25.0"