@drawbridge/drawbridge-utils 0.0.167 → 0.0.168
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/connections/index.cjs +4 -14
- package/dist/connections/index.d.cts +4 -19
- package/dist/connections/index.d.ts +4 -19
- package/dist/connections/index.js +4 -14
- package/dist/plans.cjs +4 -4
- package/dist/plans.d.cts +4 -4
- package/dist/plans.d.ts +4 -4
- package/dist/plans.js +4 -4
- package/dist/pricing.cjs +4 -4
- package/dist/pricing.js +4 -4
- package/dist/providers.cjs +4 -14
- package/dist/providers.js +4 -14
- package/package.json +1 -1
|
@@ -1614,10 +1614,10 @@ var free = {
|
|
|
1614
1614
|
};
|
|
1615
1615
|
var plans = {
|
|
1616
1616
|
DB00002: {
|
|
1617
|
-
// A verified sending domain is a PAID capability
|
|
1618
|
-
// lead-facing email
|
|
1619
|
-
//
|
|
1620
|
-
//
|
|
1617
|
+
// A verified sending domain is a PAID capability. Every plan sends
|
|
1618
|
+
// lead-facing email from the platform address — the send is billed as an
|
|
1619
|
+
// action, so the allowance is the entitlement — and sending from your own
|
|
1620
|
+
// domain is what the paid tiers add on top.
|
|
1621
1621
|
features: all.features([organization.networking.key, organization.members.key]),
|
|
1622
1622
|
limits: all.limits({ actions: 5e3, members: 3, storage: gigabyte * 10 }),
|
|
1623
1623
|
marketing: {
|
|
@@ -2221,16 +2221,6 @@ var drawbridge_default2 = {
|
|
|
2221
2221
|
const request2 = { to };
|
|
2222
2222
|
const { ok: sendable } = await canSend({ channel: "email", to });
|
|
2223
2223
|
if (!sendable) return { message: "Recipient has opted out \u2014 skipped.", request: request2, response: { skipped: true }, skipped: true };
|
|
2224
|
-
const organization2 = await read.get({ collection: "organization", query: { id: workflow.organization } });
|
|
2225
|
-
const subscription = (organization2 == null ? void 0 : organization2.subscription) ? await read.get({ collection: "subscription", query: { id: organization2.subscription } }) : null;
|
|
2226
|
-
if ((subscription == null ? void 0 : subscription.status) !== "active") {
|
|
2227
|
-
return {
|
|
2228
|
-
message: "Organization has no active subscription \u2014 workflow-step email skipped.",
|
|
2229
|
-
request: request2,
|
|
2230
|
-
response: { skipped: true },
|
|
2231
|
-
skipped: true
|
|
2232
|
-
};
|
|
2233
|
-
}
|
|
2234
2224
|
return {
|
|
2235
2225
|
message: "Email queued for delivery to " + to + ".",
|
|
2236
2226
|
request: request2,
|
|
@@ -2397,25 +2397,10 @@ var drawbridge = {
|
|
|
2397
2397
|
|
|
2398
2398
|
if( ! sendable ) return { message : 'Recipient has opted out — skipped.', request, response : { skipped : true }, skipped : true };
|
|
2399
2399
|
|
|
2400
|
-
//
|
|
2401
|
-
//
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
const subscription = organization?.subscription
|
|
2405
|
-
? await read.get({ collection : 'subscription', query : { id : organization.subscription } })
|
|
2406
|
-
: null;
|
|
2407
|
-
|
|
2408
|
-
if( subscription?.status !== 'active' ){
|
|
2409
|
-
|
|
2410
|
-
return {
|
|
2411
|
-
message : 'Organization has no active subscription — workflow-step email skipped.',
|
|
2412
|
-
request,
|
|
2413
|
-
response : { skipped : true },
|
|
2414
|
-
skipped : true
|
|
2415
|
-
};
|
|
2416
|
-
|
|
2417
|
-
}
|
|
2418
|
-
|
|
2400
|
+
// NO SUBSCRIPTION CHECK. The send is billed as an action, so the plan's
|
|
2401
|
+
// allowance is the entitlement and a free organization sends within its
|
|
2402
|
+
// 200 like any other. Entries stop at the free cap before a workflow
|
|
2403
|
+
// can fire on them, which is where the cap is enforced.
|
|
2419
2404
|
return {
|
|
2420
2405
|
message : 'Email queued for delivery to ' + to + '.',
|
|
2421
2406
|
request,
|
|
@@ -2397,25 +2397,10 @@ var drawbridge = {
|
|
|
2397
2397
|
|
|
2398
2398
|
if( ! sendable ) return { message : 'Recipient has opted out — skipped.', request, response : { skipped : true }, skipped : true };
|
|
2399
2399
|
|
|
2400
|
-
//
|
|
2401
|
-
//
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
const subscription = organization?.subscription
|
|
2405
|
-
? await read.get({ collection : 'subscription', query : { id : organization.subscription } })
|
|
2406
|
-
: null;
|
|
2407
|
-
|
|
2408
|
-
if( subscription?.status !== 'active' ){
|
|
2409
|
-
|
|
2410
|
-
return {
|
|
2411
|
-
message : 'Organization has no active subscription — workflow-step email skipped.',
|
|
2412
|
-
request,
|
|
2413
|
-
response : { skipped : true },
|
|
2414
|
-
skipped : true
|
|
2415
|
-
};
|
|
2416
|
-
|
|
2417
|
-
}
|
|
2418
|
-
|
|
2400
|
+
// NO SUBSCRIPTION CHECK. The send is billed as an action, so the plan's
|
|
2401
|
+
// allowance is the entitlement and a free organization sends within its
|
|
2402
|
+
// 200 like any other. Entries stop at the free cap before a workflow
|
|
2403
|
+
// can fire on them, which is where the cap is enforced.
|
|
2419
2404
|
return {
|
|
2420
2405
|
message : 'Email queued for delivery to ' + to + '.',
|
|
2421
2406
|
request,
|
|
@@ -1538,10 +1538,10 @@ var free = {
|
|
|
1538
1538
|
};
|
|
1539
1539
|
var plans = {
|
|
1540
1540
|
DB00002: {
|
|
1541
|
-
// A verified sending domain is a PAID capability
|
|
1542
|
-
// lead-facing email
|
|
1543
|
-
//
|
|
1544
|
-
//
|
|
1541
|
+
// A verified sending domain is a PAID capability. Every plan sends
|
|
1542
|
+
// lead-facing email from the platform address — the send is billed as an
|
|
1543
|
+
// action, so the allowance is the entitlement — and sending from your own
|
|
1544
|
+
// domain is what the paid tiers add on top.
|
|
1545
1545
|
features: all.features([organization.networking.key, organization.members.key]),
|
|
1546
1546
|
limits: all.limits({ actions: 5e3, members: 3, storage: gigabyte * 10 }),
|
|
1547
1547
|
marketing: {
|
|
@@ -2145,16 +2145,6 @@ var drawbridge_default2 = {
|
|
|
2145
2145
|
const request2 = { to };
|
|
2146
2146
|
const { ok: sendable } = await canSend({ channel: "email", to });
|
|
2147
2147
|
if (!sendable) return { message: "Recipient has opted out \u2014 skipped.", request: request2, response: { skipped: true }, skipped: true };
|
|
2148
|
-
const organization2 = await read.get({ collection: "organization", query: { id: workflow.organization } });
|
|
2149
|
-
const subscription = (organization2 == null ? void 0 : organization2.subscription) ? await read.get({ collection: "subscription", query: { id: organization2.subscription } }) : null;
|
|
2150
|
-
if ((subscription == null ? void 0 : subscription.status) !== "active") {
|
|
2151
|
-
return {
|
|
2152
|
-
message: "Organization has no active subscription \u2014 workflow-step email skipped.",
|
|
2153
|
-
request: request2,
|
|
2154
|
-
response: { skipped: true },
|
|
2155
|
-
skipped: true
|
|
2156
|
-
};
|
|
2157
|
-
}
|
|
2158
2148
|
return {
|
|
2159
2149
|
message: "Email queued for delivery to " + to + ".",
|
|
2160
2150
|
request: request2,
|
package/dist/plans.cjs
CHANGED
|
@@ -360,10 +360,10 @@ var free = {
|
|
|
360
360
|
};
|
|
361
361
|
var plans = {
|
|
362
362
|
DB00002: {
|
|
363
|
-
// A verified sending domain is a PAID capability
|
|
364
|
-
// lead-facing email
|
|
365
|
-
//
|
|
366
|
-
//
|
|
363
|
+
// A verified sending domain is a PAID capability. Every plan sends
|
|
364
|
+
// lead-facing email from the platform address — the send is billed as an
|
|
365
|
+
// action, so the allowance is the entitlement — and sending from your own
|
|
366
|
+
// domain is what the paid tiers add on top.
|
|
367
367
|
features: all.features([organization.networking.key, organization.members.key]),
|
|
368
368
|
limits: all.limits({ actions: 5e3, members: 3, storage: gigabyte * 10 }),
|
|
369
369
|
marketing: {
|
package/dist/plans.d.cts
CHANGED
|
@@ -121,10 +121,10 @@ const free = {
|
|
|
121
121
|
|
|
122
122
|
const plans = {
|
|
123
123
|
DB00002 : {
|
|
124
|
-
// A verified sending domain is a PAID capability
|
|
125
|
-
// lead-facing email
|
|
126
|
-
//
|
|
127
|
-
//
|
|
124
|
+
// A verified sending domain is a PAID capability. Every plan sends
|
|
125
|
+
// lead-facing email from the platform address — the send is billed as an
|
|
126
|
+
// action, so the allowance is the entitlement — and sending from your own
|
|
127
|
+
// domain is what the paid tiers add on top.
|
|
128
128
|
features : all.features([ organization.networking.key, organization.members.key ]),
|
|
129
129
|
limits : all.limits({ actions : 5000, members : 3, storage : gigabyte * 10 }),
|
|
130
130
|
marketing : {
|
package/dist/plans.d.ts
CHANGED
|
@@ -121,10 +121,10 @@ const free = {
|
|
|
121
121
|
|
|
122
122
|
const plans = {
|
|
123
123
|
DB00002 : {
|
|
124
|
-
// A verified sending domain is a PAID capability
|
|
125
|
-
// lead-facing email
|
|
126
|
-
//
|
|
127
|
-
//
|
|
124
|
+
// A verified sending domain is a PAID capability. Every plan sends
|
|
125
|
+
// lead-facing email from the platform address — the send is billed as an
|
|
126
|
+
// action, so the allowance is the entitlement — and sending from your own
|
|
127
|
+
// domain is what the paid tiers add on top.
|
|
128
128
|
features : all.features([ organization.networking.key, organization.members.key ]),
|
|
129
129
|
limits : all.limits({ actions : 5000, members : 3, storage : gigabyte * 10 }),
|
|
130
130
|
marketing : {
|
package/dist/plans.js
CHANGED
|
@@ -321,10 +321,10 @@ var free = {
|
|
|
321
321
|
};
|
|
322
322
|
var plans = {
|
|
323
323
|
DB00002: {
|
|
324
|
-
// A verified sending domain is a PAID capability
|
|
325
|
-
// lead-facing email
|
|
326
|
-
//
|
|
327
|
-
//
|
|
324
|
+
// A verified sending domain is a PAID capability. Every plan sends
|
|
325
|
+
// lead-facing email from the platform address — the send is billed as an
|
|
326
|
+
// action, so the allowance is the entitlement — and sending from your own
|
|
327
|
+
// domain is what the paid tiers add on top.
|
|
328
328
|
features: all.features([organization.networking.key, organization.members.key]),
|
|
329
329
|
limits: all.limits({ actions: 5e3, members: 3, storage: gigabyte * 10 }),
|
|
330
330
|
marketing: {
|
package/dist/pricing.cjs
CHANGED
|
@@ -651,10 +651,10 @@ var free = {
|
|
|
651
651
|
};
|
|
652
652
|
var plans = {
|
|
653
653
|
DB00002: {
|
|
654
|
-
// A verified sending domain is a PAID capability
|
|
655
|
-
// lead-facing email
|
|
656
|
-
//
|
|
657
|
-
//
|
|
654
|
+
// A verified sending domain is a PAID capability. Every plan sends
|
|
655
|
+
// lead-facing email from the platform address — the send is billed as an
|
|
656
|
+
// action, so the allowance is the entitlement — and sending from your own
|
|
657
|
+
// domain is what the paid tiers add on top.
|
|
658
658
|
features: all.features([organization.networking.key, organization.members.key]),
|
|
659
659
|
limits: all.limits({ actions: 5e3, members: 3, storage: gigabyte * 10 }),
|
|
660
660
|
marketing: {
|
package/dist/pricing.js
CHANGED
|
@@ -599,10 +599,10 @@ var free = {
|
|
|
599
599
|
};
|
|
600
600
|
var plans = {
|
|
601
601
|
DB00002: {
|
|
602
|
-
// A verified sending domain is a PAID capability
|
|
603
|
-
// lead-facing email
|
|
604
|
-
//
|
|
605
|
-
//
|
|
602
|
+
// A verified sending domain is a PAID capability. Every plan sends
|
|
603
|
+
// lead-facing email from the platform address — the send is billed as an
|
|
604
|
+
// action, so the allowance is the entitlement — and sending from your own
|
|
605
|
+
// domain is what the paid tiers add on top.
|
|
606
606
|
features: all.features([organization.networking.key, organization.members.key]),
|
|
607
607
|
limits: all.limits({ actions: 5e3, members: 3, storage: gigabyte * 10 }),
|
|
608
608
|
marketing: {
|
package/dist/providers.cjs
CHANGED
|
@@ -1523,10 +1523,10 @@ var free = {
|
|
|
1523
1523
|
};
|
|
1524
1524
|
var plans = {
|
|
1525
1525
|
DB00002: {
|
|
1526
|
-
// A verified sending domain is a PAID capability
|
|
1527
|
-
// lead-facing email
|
|
1528
|
-
//
|
|
1529
|
-
//
|
|
1526
|
+
// A verified sending domain is a PAID capability. Every plan sends
|
|
1527
|
+
// lead-facing email from the platform address — the send is billed as an
|
|
1528
|
+
// action, so the allowance is the entitlement — and sending from your own
|
|
1529
|
+
// domain is what the paid tiers add on top.
|
|
1530
1530
|
features: all.features([organization.networking.key, organization.members.key]),
|
|
1531
1531
|
limits: all.limits({ actions: 5e3, members: 3, storage: gigabyte * 10 }),
|
|
1532
1532
|
marketing: {
|
|
@@ -2130,16 +2130,6 @@ var drawbridge_default2 = {
|
|
|
2130
2130
|
const request2 = { to };
|
|
2131
2131
|
const { ok: sendable } = await canSend({ channel: "email", to });
|
|
2132
2132
|
if (!sendable) return { message: "Recipient has opted out \u2014 skipped.", request: request2, response: { skipped: true }, skipped: true };
|
|
2133
|
-
const organization2 = await read.get({ collection: "organization", query: { id: workflow.organization } });
|
|
2134
|
-
const subscription = (organization2 == null ? void 0 : organization2.subscription) ? await read.get({ collection: "subscription", query: { id: organization2.subscription } }) : null;
|
|
2135
|
-
if ((subscription == null ? void 0 : subscription.status) !== "active") {
|
|
2136
|
-
return {
|
|
2137
|
-
message: "Organization has no active subscription \u2014 workflow-step email skipped.",
|
|
2138
|
-
request: request2,
|
|
2139
|
-
response: { skipped: true },
|
|
2140
|
-
skipped: true
|
|
2141
|
-
};
|
|
2142
|
-
}
|
|
2143
2133
|
return {
|
|
2144
2134
|
message: "Email queued for delivery to " + to + ".",
|
|
2145
2135
|
request: request2,
|
package/dist/providers.js
CHANGED
|
@@ -1474,10 +1474,10 @@ var free = {
|
|
|
1474
1474
|
};
|
|
1475
1475
|
var plans = {
|
|
1476
1476
|
DB00002: {
|
|
1477
|
-
// A verified sending domain is a PAID capability
|
|
1478
|
-
// lead-facing email
|
|
1479
|
-
//
|
|
1480
|
-
//
|
|
1477
|
+
// A verified sending domain is a PAID capability. Every plan sends
|
|
1478
|
+
// lead-facing email from the platform address — the send is billed as an
|
|
1479
|
+
// action, so the allowance is the entitlement — and sending from your own
|
|
1480
|
+
// domain is what the paid tiers add on top.
|
|
1481
1481
|
features: all.features([organization.networking.key, organization.members.key]),
|
|
1482
1482
|
limits: all.limits({ actions: 5e3, members: 3, storage: gigabyte * 10 }),
|
|
1483
1483
|
marketing: {
|
|
@@ -2081,16 +2081,6 @@ var drawbridge_default2 = {
|
|
|
2081
2081
|
const request2 = { to };
|
|
2082
2082
|
const { ok: sendable } = await canSend({ channel: "email", to });
|
|
2083
2083
|
if (!sendable) return { message: "Recipient has opted out \u2014 skipped.", request: request2, response: { skipped: true }, skipped: true };
|
|
2084
|
-
const organization2 = await read.get({ collection: "organization", query: { id: workflow.organization } });
|
|
2085
|
-
const subscription = (organization2 == null ? void 0 : organization2.subscription) ? await read.get({ collection: "subscription", query: { id: organization2.subscription } }) : null;
|
|
2086
|
-
if ((subscription == null ? void 0 : subscription.status) !== "active") {
|
|
2087
|
-
return {
|
|
2088
|
-
message: "Organization has no active subscription \u2014 workflow-step email skipped.",
|
|
2089
|
-
request: request2,
|
|
2090
|
-
response: { skipped: true },
|
|
2091
|
-
skipped: true
|
|
2092
|
-
};
|
|
2093
|
-
}
|
|
2094
2084
|
return {
|
|
2095
2085
|
message: "Email queued for delivery to " + to + ".",
|
|
2096
2086
|
request: request2,
|
package/package.json
CHANGED