@marlinjai/mail-contract 0.16.0 → 0.17.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/dist/index.d.mts +159 -17
- package/dist/index.d.ts +159 -17
- package/dist/index.js +33 -2
- package/dist/index.mjs +30 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -105,6 +105,7 @@ __export(index_exports, {
|
|
|
105
105
|
AutomationWithFlow: () => AutomationWithFlow,
|
|
106
106
|
BEARER_PREFIX: () => BEARER_PREFIX,
|
|
107
107
|
BILLING_NOT_CONFIGURED_REASON: () => BILLING_NOT_CONFIGURED_REASON,
|
|
108
|
+
BillingAddons: () => BillingAddons,
|
|
108
109
|
BoundedAutomationFilter: () => BoundedAutomationFilter,
|
|
109
110
|
BoundedSegmentFilter: () => BoundedSegmentFilter,
|
|
110
111
|
COMPANY_GRANT_ROLES: () => COMPANY_GRANT_ROLES,
|
|
@@ -161,6 +162,7 @@ __export(index_exports, {
|
|
|
161
162
|
EventListQuery: () => EventListQuery,
|
|
162
163
|
EventName: () => EventName,
|
|
163
164
|
ExportFormat: () => ExportFormat,
|
|
165
|
+
ExtraSendingDomainsUpdate: () => ExtraSendingDomainsUpdate,
|
|
164
166
|
FILTER_FIELD_OPERATORS: () => FILTER_FIELD_OPERATORS,
|
|
165
167
|
FILTER_OPERATORS: () => FILTER_OPERATORS,
|
|
166
168
|
FilterCondition: () => FilterCondition,
|
|
@@ -227,6 +229,7 @@ __export(index_exports, {
|
|
|
227
229
|
MAX_DOCUMENT_BYTES: () => MAX_DOCUMENT_BYTES,
|
|
228
230
|
MAX_ENGAGEMENT_DAYS: () => MAX_ENGAGEMENT_DAYS,
|
|
229
231
|
MAX_EXPORT_WARNINGS_HEADER_LENGTH: () => MAX_EXPORT_WARNINGS_HEADER_LENGTH,
|
|
232
|
+
MAX_EXTRA_SENDING_DOMAINS: () => MAX_EXTRA_SENDING_DOMAINS,
|
|
230
233
|
MAX_FILTER_DEPTH: () => MAX_FILTER_DEPTH,
|
|
231
234
|
MAX_IMPORTED_REMOTE_IMAGES: () => MAX_IMPORTED_REMOTE_IMAGES,
|
|
232
235
|
MAX_IMPORT_BYTES: () => MAX_IMPORT_BYTES,
|
|
@@ -3672,6 +3675,7 @@ var AUDIT_ACTIONS = [
|
|
|
3672
3675
|
"billing.checkout_started",
|
|
3673
3676
|
"billing.subscription_changed",
|
|
3674
3677
|
"billing.exemption_changed",
|
|
3678
|
+
"billing.extra_sending_domains_changed",
|
|
3675
3679
|
// A1: automations
|
|
3676
3680
|
"automation.created",
|
|
3677
3681
|
"automation.updated",
|
|
@@ -5099,8 +5103,23 @@ var Subscription = import_zod17.z.object({
|
|
|
5099
5103
|
* A design partner outside billing (plan `design_partner`, no limits, no
|
|
5100
5104
|
* checkout). Set only by an operator, never through the API.
|
|
5101
5105
|
*/
|
|
5102
|
-
billing_exempt: import_zod17.z.boolean()
|
|
5106
|
+
billing_exempt: import_zod17.z.boolean(),
|
|
5107
|
+
/**
|
|
5108
|
+
* Own sending domains bought on top of the plan's included ones (the
|
|
5109
|
+
* add-on), each a monthly charge on the same subscription. 0 without the
|
|
5110
|
+
* add-on; the usage limit `sending_domains` is the plan's plus these.
|
|
5111
|
+
*/
|
|
5112
|
+
extra_sending_domains: import_zod17.z.number().int().min(0)
|
|
5103
5113
|
});
|
|
5114
|
+
var BillingAddons = import_zod17.z.object({
|
|
5115
|
+
sending_domain: import_zod17.z.object({
|
|
5116
|
+
monthly_price_cents: import_zod17.z.number().int().min(0),
|
|
5117
|
+
currency: import_zod17.z.string().length(3),
|
|
5118
|
+
sellable: import_zod17.z.boolean()
|
|
5119
|
+
})
|
|
5120
|
+
});
|
|
5121
|
+
var MAX_EXTRA_SENDING_DOMAINS = 100;
|
|
5122
|
+
var ExtraSendingDomainsUpdate = import_zod17.z.object({ quantity: import_zod17.z.number().int().min(0).max(MAX_EXTRA_SENDING_DOMAINS) });
|
|
5104
5123
|
var USAGE_METRICS = ["messages", "contacts", "members", "providers", "webhook_endpoints", "active_automations", "sending_domains"];
|
|
5105
5124
|
var UsageMetric = import_zod17.z.enum(USAGE_METRICS);
|
|
5106
5125
|
var USAGE_WARNING_RATIO = 0.8;
|
|
@@ -6337,7 +6356,7 @@ var billingRoutes = {
|
|
|
6337
6356
|
"billing.plans": {
|
|
6338
6357
|
method: "GET",
|
|
6339
6358
|
path: "/v1/billing/plans",
|
|
6340
|
-
response: import_zod18.z.object({ data: import_zod18.z.array(CatalogPlan) }),
|
|
6359
|
+
response: import_zod18.z.object({ data: import_zod18.z.array(CatalogPlan), addons: BillingAddons }),
|
|
6341
6360
|
status: 200,
|
|
6342
6361
|
access: "read",
|
|
6343
6362
|
phase: "S5"
|
|
@@ -6368,6 +6387,15 @@ var billingRoutes = {
|
|
|
6368
6387
|
status: 200,
|
|
6369
6388
|
access: "admin",
|
|
6370
6389
|
phase: "S5"
|
|
6390
|
+
},
|
|
6391
|
+
"billing.setExtraSendingDomains": {
|
|
6392
|
+
method: "PUT",
|
|
6393
|
+
path: "/v1/billing/extra-sending-domains",
|
|
6394
|
+
body: ExtraSendingDomainsUpdate,
|
|
6395
|
+
response: Subscription,
|
|
6396
|
+
status: 200,
|
|
6397
|
+
access: "admin",
|
|
6398
|
+
phase: "S5"
|
|
6371
6399
|
}
|
|
6372
6400
|
};
|
|
6373
6401
|
var inviteRoutes = {
|
|
@@ -6742,6 +6770,7 @@ function matchRoute(method, pathname) {
|
|
|
6742
6770
|
AutomationWithFlow,
|
|
6743
6771
|
BEARER_PREFIX,
|
|
6744
6772
|
BILLING_NOT_CONFIGURED_REASON,
|
|
6773
|
+
BillingAddons,
|
|
6745
6774
|
BoundedAutomationFilter,
|
|
6746
6775
|
BoundedSegmentFilter,
|
|
6747
6776
|
COMPANY_GRANT_ROLES,
|
|
@@ -6798,6 +6827,7 @@ function matchRoute(method, pathname) {
|
|
|
6798
6827
|
EventListQuery,
|
|
6799
6828
|
EventName,
|
|
6800
6829
|
ExportFormat,
|
|
6830
|
+
ExtraSendingDomainsUpdate,
|
|
6801
6831
|
FILTER_FIELD_OPERATORS,
|
|
6802
6832
|
FILTER_OPERATORS,
|
|
6803
6833
|
FilterCondition,
|
|
@@ -6864,6 +6894,7 @@ function matchRoute(method, pathname) {
|
|
|
6864
6894
|
MAX_DOCUMENT_BYTES,
|
|
6865
6895
|
MAX_ENGAGEMENT_DAYS,
|
|
6866
6896
|
MAX_EXPORT_WARNINGS_HEADER_LENGTH,
|
|
6897
|
+
MAX_EXTRA_SENDING_DOMAINS,
|
|
6867
6898
|
MAX_FILTER_DEPTH,
|
|
6868
6899
|
MAX_IMPORTED_REMOTE_IMAGES,
|
|
6869
6900
|
MAX_IMPORT_BYTES,
|
package/dist/index.mjs
CHANGED
|
@@ -3022,6 +3022,7 @@ var AUDIT_ACTIONS = [
|
|
|
3022
3022
|
"billing.checkout_started",
|
|
3023
3023
|
"billing.subscription_changed",
|
|
3024
3024
|
"billing.exemption_changed",
|
|
3025
|
+
"billing.extra_sending_domains_changed",
|
|
3025
3026
|
// A1: automations
|
|
3026
3027
|
"automation.created",
|
|
3027
3028
|
"automation.updated",
|
|
@@ -4449,8 +4450,23 @@ var Subscription = z17.object({
|
|
|
4449
4450
|
* A design partner outside billing (plan `design_partner`, no limits, no
|
|
4450
4451
|
* checkout). Set only by an operator, never through the API.
|
|
4451
4452
|
*/
|
|
4452
|
-
billing_exempt: z17.boolean()
|
|
4453
|
+
billing_exempt: z17.boolean(),
|
|
4454
|
+
/**
|
|
4455
|
+
* Own sending domains bought on top of the plan's included ones (the
|
|
4456
|
+
* add-on), each a monthly charge on the same subscription. 0 without the
|
|
4457
|
+
* add-on; the usage limit `sending_domains` is the plan's plus these.
|
|
4458
|
+
*/
|
|
4459
|
+
extra_sending_domains: z17.number().int().min(0)
|
|
4453
4460
|
});
|
|
4461
|
+
var BillingAddons = z17.object({
|
|
4462
|
+
sending_domain: z17.object({
|
|
4463
|
+
monthly_price_cents: z17.number().int().min(0),
|
|
4464
|
+
currency: z17.string().length(3),
|
|
4465
|
+
sellable: z17.boolean()
|
|
4466
|
+
})
|
|
4467
|
+
});
|
|
4468
|
+
var MAX_EXTRA_SENDING_DOMAINS = 100;
|
|
4469
|
+
var ExtraSendingDomainsUpdate = z17.object({ quantity: z17.number().int().min(0).max(MAX_EXTRA_SENDING_DOMAINS) });
|
|
4454
4470
|
var USAGE_METRICS = ["messages", "contacts", "members", "providers", "webhook_endpoints", "active_automations", "sending_domains"];
|
|
4455
4471
|
var UsageMetric = z17.enum(USAGE_METRICS);
|
|
4456
4472
|
var USAGE_WARNING_RATIO = 0.8;
|
|
@@ -5687,7 +5703,7 @@ var billingRoutes = {
|
|
|
5687
5703
|
"billing.plans": {
|
|
5688
5704
|
method: "GET",
|
|
5689
5705
|
path: "/v1/billing/plans",
|
|
5690
|
-
response: z18.object({ data: z18.array(CatalogPlan) }),
|
|
5706
|
+
response: z18.object({ data: z18.array(CatalogPlan), addons: BillingAddons }),
|
|
5691
5707
|
status: 200,
|
|
5692
5708
|
access: "read",
|
|
5693
5709
|
phase: "S5"
|
|
@@ -5718,6 +5734,15 @@ var billingRoutes = {
|
|
|
5718
5734
|
status: 200,
|
|
5719
5735
|
access: "admin",
|
|
5720
5736
|
phase: "S5"
|
|
5737
|
+
},
|
|
5738
|
+
"billing.setExtraSendingDomains": {
|
|
5739
|
+
method: "PUT",
|
|
5740
|
+
path: "/v1/billing/extra-sending-domains",
|
|
5741
|
+
body: ExtraSendingDomainsUpdate,
|
|
5742
|
+
response: Subscription,
|
|
5743
|
+
status: 200,
|
|
5744
|
+
access: "admin",
|
|
5745
|
+
phase: "S5"
|
|
5721
5746
|
}
|
|
5722
5747
|
};
|
|
5723
5748
|
var inviteRoutes = {
|
|
@@ -6091,6 +6116,7 @@ export {
|
|
|
6091
6116
|
AutomationWithFlow,
|
|
6092
6117
|
BEARER_PREFIX,
|
|
6093
6118
|
BILLING_NOT_CONFIGURED_REASON,
|
|
6119
|
+
BillingAddons,
|
|
6094
6120
|
BoundedAutomationFilter,
|
|
6095
6121
|
BoundedSegmentFilter,
|
|
6096
6122
|
COMPANY_GRANT_ROLES,
|
|
@@ -6147,6 +6173,7 @@ export {
|
|
|
6147
6173
|
EventListQuery,
|
|
6148
6174
|
EventName,
|
|
6149
6175
|
ExportFormat,
|
|
6176
|
+
ExtraSendingDomainsUpdate,
|
|
6150
6177
|
FILTER_FIELD_OPERATORS,
|
|
6151
6178
|
FILTER_OPERATORS,
|
|
6152
6179
|
FilterCondition,
|
|
@@ -6213,6 +6240,7 @@ export {
|
|
|
6213
6240
|
MAX_DOCUMENT_BYTES,
|
|
6214
6241
|
MAX_ENGAGEMENT_DAYS,
|
|
6215
6242
|
MAX_EXPORT_WARNINGS_HEADER_LENGTH,
|
|
6243
|
+
MAX_EXTRA_SENDING_DOMAINS,
|
|
6216
6244
|
MAX_FILTER_DEPTH,
|
|
6217
6245
|
MAX_IMPORTED_REMOTE_IMAGES,
|
|
6218
6246
|
MAX_IMPORT_BYTES,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.17.0",
|
|
7
7
|
"description": "The v1 API contract of the mail service: zod schemas and types for every request, response, error and webhook, the route table, and webhook signing helpers",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"repository": {
|