@marlinjai/mail-contract 0.23.0 → 0.24.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.js CHANGED
@@ -152,6 +152,7 @@ __export(index_exports, {
152
152
  DOMAIN_ORDER_KINDS: () => DOMAIN_ORDER_KINDS,
153
153
  DOMAIN_ORDER_STATES: () => DOMAIN_ORDER_STATES,
154
154
  DOMAIN_PRICE_CHANGED_REASON: () => DOMAIN_PRICE_CHANGED_REASON,
155
+ DOMAIN_RENEWAL_STATES: () => DOMAIN_RENEWAL_STATES,
155
156
  DOMAIN_UNAVAILABLE_REASONS: () => DOMAIN_UNAVAILABLE_REASONS,
156
157
  DateOnly: () => DateOnly,
157
158
  DatePassedAnswer: () => DatePassedAnswer,
@@ -171,6 +172,8 @@ __export(index_exports, {
171
172
  DomainRecord: () => DomainRecord,
172
173
  DomainRecordInput: () => DomainRecordInput,
173
174
  DomainRegistrant: () => DomainRegistrant,
175
+ DomainRenewal: () => DomainRenewal,
176
+ DomainRenewalState: () => DomainRenewalState,
174
177
  DomainSearchQuery: () => DomainSearchQuery,
175
178
  DomainSearchResult: () => DomainSearchResult,
176
179
  DomainUnavailableReason: () => DomainUnavailableReason,
@@ -3740,6 +3743,7 @@ var AUDIT_ACTIONS = [
3740
3743
  "domain_order.ready",
3741
3744
  "domain_order.needs_attention",
3742
3745
  "domain_order.kind_changed",
3746
+ "domain_order.no_charge",
3743
3747
  "domain_order.refunded",
3744
3748
  "domain_order.cancelled",
3745
3749
  // Bought domains, managed by their holder
@@ -5070,6 +5074,14 @@ var DomainLeave = import_zod17.z.object({
5070
5074
  requested_at: Timestamp,
5071
5075
  done_at: Timestamp.nullable()
5072
5076
  });
5077
+ var DOMAIN_RENEWAL_STATES = ["invoiced", "failed", "paid", "stopped", "lapsed"];
5078
+ var DomainRenewalState = import_zod17.z.enum(DOMAIN_RENEWAL_STATES);
5079
+ var DomainRenewal = import_zod17.z.object({
5080
+ state: DomainRenewalState,
5081
+ amount_cents: import_zod17.z.number().int().min(0),
5082
+ /** Stripe's hosted page to pay the renewal by hand; null until Stripe has made it. */
5083
+ pay_url: import_zod17.z.string().url().nullable()
5084
+ });
5073
5085
  var BoughtDomain = import_zod17.z.object({
5074
5086
  /** The order the domain was bought with. */
5075
5087
  id: Id,
@@ -5084,6 +5096,10 @@ var BoughtDomain = import_zod17.z.object({
5084
5096
  currency: import_zod17.z.literal("EUR"),
5085
5097
  /** Registered for one of Lumitra's own companies, never charged. */
5086
5098
  no_charge: import_zod17.z.boolean(),
5099
+ /** When the next year is charged (45 days before expiry); null when it is never charged. */
5100
+ next_charge_at: Timestamp.nullable(),
5101
+ /** The current year's renewal, once it was charged; null before. */
5102
+ renewal: DomainRenewal.nullable(),
5087
5103
  /** The earliest moment each way of leaving is possible. */
5088
5104
  move_account_from: Timestamp,
5089
5105
  transfer_from: Timestamp,
@@ -7493,6 +7509,7 @@ function matchRoute(method, pathname) {
7493
7509
  DOMAIN_ORDER_KINDS,
7494
7510
  DOMAIN_ORDER_STATES,
7495
7511
  DOMAIN_PRICE_CHANGED_REASON,
7512
+ DOMAIN_RENEWAL_STATES,
7496
7513
  DOMAIN_UNAVAILABLE_REASONS,
7497
7514
  DateOnly,
7498
7515
  DatePassedAnswer,
@@ -7512,6 +7529,8 @@ function matchRoute(method, pathname) {
7512
7529
  DomainRecord,
7513
7530
  DomainRecordInput,
7514
7531
  DomainRegistrant,
7532
+ DomainRenewal,
7533
+ DomainRenewalState,
7515
7534
  DomainSearchQuery,
7516
7535
  DomainSearchResult,
7517
7536
  DomainUnavailableReason,
package/dist/index.mjs CHANGED
@@ -3048,6 +3048,7 @@ var AUDIT_ACTIONS = [
3048
3048
  "domain_order.ready",
3049
3049
  "domain_order.needs_attention",
3050
3050
  "domain_order.kind_changed",
3051
+ "domain_order.no_charge",
3051
3052
  "domain_order.refunded",
3052
3053
  "domain_order.cancelled",
3053
3054
  // Bought domains, managed by their holder
@@ -4378,6 +4379,14 @@ var DomainLeave = z17.object({
4378
4379
  requested_at: Timestamp,
4379
4380
  done_at: Timestamp.nullable()
4380
4381
  });
4382
+ var DOMAIN_RENEWAL_STATES = ["invoiced", "failed", "paid", "stopped", "lapsed"];
4383
+ var DomainRenewalState = z17.enum(DOMAIN_RENEWAL_STATES);
4384
+ var DomainRenewal = z17.object({
4385
+ state: DomainRenewalState,
4386
+ amount_cents: z17.number().int().min(0),
4387
+ /** Stripe's hosted page to pay the renewal by hand; null until Stripe has made it. */
4388
+ pay_url: z17.string().url().nullable()
4389
+ });
4381
4390
  var BoughtDomain = z17.object({
4382
4391
  /** The order the domain was bought with. */
4383
4392
  id: Id,
@@ -4392,6 +4401,10 @@ var BoughtDomain = z17.object({
4392
4401
  currency: z17.literal("EUR"),
4393
4402
  /** Registered for one of Lumitra's own companies, never charged. */
4394
4403
  no_charge: z17.boolean(),
4404
+ /** When the next year is charged (45 days before expiry); null when it is never charged. */
4405
+ next_charge_at: Timestamp.nullable(),
4406
+ /** The current year's renewal, once it was charged; null before. */
4407
+ renewal: DomainRenewal.nullable(),
4395
4408
  /** The earliest moment each way of leaving is possible. */
4396
4409
  move_account_from: Timestamp,
4397
4410
  transfer_from: Timestamp,
@@ -6800,6 +6813,7 @@ export {
6800
6813
  DOMAIN_ORDER_KINDS,
6801
6814
  DOMAIN_ORDER_STATES,
6802
6815
  DOMAIN_PRICE_CHANGED_REASON,
6816
+ DOMAIN_RENEWAL_STATES,
6803
6817
  DOMAIN_UNAVAILABLE_REASONS,
6804
6818
  DateOnly,
6805
6819
  DatePassedAnswer,
@@ -6819,6 +6833,8 @@ export {
6819
6833
  DomainRecord,
6820
6834
  DomainRecordInput,
6821
6835
  DomainRegistrant,
6836
+ DomainRenewal,
6837
+ DomainRenewalState,
6822
6838
  DomainSearchQuery,
6823
6839
  DomainSearchResult,
6824
6840
  DomainUnavailableReason,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.23.0",
6
+ "version": "0.24.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": {