@distilled.cloud/acme 1.0.0-rc.19 → 1.0.0-rc.21

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.
@@ -3,6 +3,7 @@ import * as C from "@distilled.cloud/core/category";
3
3
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs/acme.json (from RFC 8555). Do not edit.
4
4
  import * as S from "@distilled.cloud/core/schema-lite";
5
5
  import * as __L from "@distilled.cloud/core/schema-lite";
6
+ import { AcmeServiceErrors } from "../errors.ts";
6
7
  import { AcmeProtocol, type AcmeOpError, type AcmeOpContext } from "../protocol.ts";
7
8
  import * as Retry from "../retry.ts";
8
9
  import * as T from "../traits.ts";
@@ -32,8 +33,10 @@ export class AcmeAccountDoesNotExist
32
33
  message: S.String,
33
34
  type: S.String,
34
35
  detail: /*@__PURE__*/ S.optional(S.String),
36
+ body: /*@__PURE__*/ S.optional(S.Unknown),
37
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
35
38
  }),
36
- [{ message: { matches: "^urn:ietf:params:acme:error:accountDoesNotExist$" } }],
39
+ [{ body: { "/type": "urn:ietf:params:acme:error:accountDoesNotExist" } }],
37
40
  ) {}
38
41
 
39
42
  /** The request specified a certificate to be revoked that has already been revoked. */
@@ -44,8 +47,10 @@ export class AcmeAlreadyRevoked
44
47
  message: S.String,
45
48
  type: S.String,
46
49
  detail: /*@__PURE__*/ S.optional(S.String),
50
+ body: /*@__PURE__*/ S.optional(S.Unknown),
51
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
47
52
  }),
48
- [{ message: { matches: "^urn:ietf:params:acme:error:alreadyRevoked$" } }],
53
+ [{ body: { "/type": "urn:ietf:params:acme:error:alreadyRevoked" } }],
49
54
  ) {}
50
55
 
51
56
  /** The CSR is unacceptable (e.g., due to a short key). */
@@ -56,8 +61,10 @@ export class AcmeBadCsr
56
61
  message: S.String,
57
62
  type: S.String,
58
63
  detail: /*@__PURE__*/ S.optional(S.String),
64
+ body: /*@__PURE__*/ S.optional(S.Unknown),
65
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
59
66
  }),
60
- [{ message: { matches: "^urn:ietf:params:acme:error:badCSR$" } }],
67
+ [{ body: { "/type": "urn:ietf:params:acme:error:badCSR" } }],
61
68
  ) {}
62
69
 
63
70
  /** The client sent an unacceptable anti-replay nonce. */
@@ -68,8 +75,10 @@ export class AcmeBadNonce
68
75
  message: S.String,
69
76
  type: S.String,
70
77
  detail: /*@__PURE__*/ S.optional(S.String),
78
+ body: /*@__PURE__*/ S.optional(S.Unknown),
79
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
71
80
  }),
72
- [{ message: { matches: "^urn:ietf:params:acme:error:badNonce$" } }],
81
+ [{ body: { "/type": "urn:ietf:params:acme:error:badNonce" } }],
73
82
  ) {}
74
83
 
75
84
  /** The JWS was signed by a public key the server does not support. */
@@ -80,8 +89,10 @@ export class AcmeBadPublicKey
80
89
  message: S.String,
81
90
  type: S.String,
82
91
  detail: /*@__PURE__*/ S.optional(S.String),
92
+ body: /*@__PURE__*/ S.optional(S.Unknown),
93
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
83
94
  }),
84
- [{ message: { matches: "^urn:ietf:params:acme:error:badPublicKey$" } }],
95
+ [{ body: { "/type": "urn:ietf:params:acme:error:badPublicKey" } }],
85
96
  ) {}
86
97
 
87
98
  /** The revocation reason provided is not allowed by the server. */
@@ -92,8 +103,10 @@ export class AcmeBadRevocationReason
92
103
  message: S.String,
93
104
  type: S.String,
94
105
  detail: /*@__PURE__*/ S.optional(S.String),
106
+ body: /*@__PURE__*/ S.optional(S.Unknown),
107
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
95
108
  }),
96
- [{ message: { matches: "^urn:ietf:params:acme:error:badRevocationReason$" } }],
109
+ [{ body: { "/type": "urn:ietf:params:acme:error:badRevocationReason" } }],
97
110
  ) {}
98
111
 
99
112
  /** The JWS was signed with an algorithm the server does not support. */
@@ -104,8 +117,10 @@ export class AcmeBadSignatureAlgorithm
104
117
  message: S.String,
105
118
  type: S.String,
106
119
  detail: /*@__PURE__*/ S.optional(S.String),
120
+ body: /*@__PURE__*/ S.optional(S.Unknown),
121
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
107
122
  }),
108
- [{ message: { matches: "^urn:ietf:params:acme:error:badSignatureAlgorithm$" } }],
123
+ [{ body: { "/type": "urn:ietf:params:acme:error:badSignatureAlgorithm" } }],
109
124
  ) {}
110
125
 
111
126
  /** Certification Authority Authorization (CAA) records forbid the CA from issuing a certificate. */
@@ -116,8 +131,10 @@ export class AcmeCaa
116
131
  message: S.String,
117
132
  type: S.String,
118
133
  detail: /*@__PURE__*/ S.optional(S.String),
134
+ body: /*@__PURE__*/ S.optional(S.Unknown),
135
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
119
136
  }),
120
- [{ message: { matches: "^urn:ietf:params:acme:error:caa$" } }],
137
+ [{ body: { "/type": "urn:ietf:params:acme:error:caa" } }],
121
138
  ) {}
122
139
 
123
140
  /** The server could not connect to validation target. */
@@ -128,8 +145,10 @@ export class AcmeConnection
128
145
  message: S.String,
129
146
  type: S.String,
130
147
  detail: /*@__PURE__*/ S.optional(S.String),
148
+ body: /*@__PURE__*/ S.optional(S.Unknown),
149
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
131
150
  }),
132
- [{ message: { matches: "^urn:ietf:params:acme:error:connection$" } }],
151
+ [{ body: { "/type": "urn:ietf:params:acme:error:connection" } }],
133
152
  ) {}
134
153
 
135
154
  /** There was a problem with a DNS query during identifier validation. */
@@ -140,8 +159,10 @@ export class AcmeDns
140
159
  message: S.String,
141
160
  type: S.String,
142
161
  detail: /*@__PURE__*/ S.optional(S.String),
162
+ body: /*@__PURE__*/ S.optional(S.Unknown),
163
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
143
164
  }),
144
- [{ message: { matches: "^urn:ietf:params:acme:error:dns$" } }],
165
+ [{ body: { "/type": "urn:ietf:params:acme:error:dns" } }],
145
166
  ) {}
146
167
 
147
168
  /** The request must include a value for the "externalAccountBinding" field. */
@@ -152,8 +173,10 @@ export class AcmeExternalAccountRequired
152
173
  message: S.String,
153
174
  type: S.String,
154
175
  detail: /*@__PURE__*/ S.optional(S.String),
176
+ body: /*@__PURE__*/ S.optional(S.Unknown),
177
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
155
178
  }),
156
- [{ message: { matches: "^urn:ietf:params:acme:error:externalAccountRequired$" } }],
179
+ [{ body: { "/type": "urn:ietf:params:acme:error:externalAccountRequired" } }],
157
180
  ) {}
158
181
 
159
182
  /** Response received didn't match the challenge's requirements. */
@@ -164,8 +187,10 @@ export class AcmeIncorrectResponse
164
187
  message: S.String,
165
188
  type: S.String,
166
189
  detail: /*@__PURE__*/ S.optional(S.String),
190
+ body: /*@__PURE__*/ S.optional(S.Unknown),
191
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
167
192
  }),
168
- [{ message: { matches: "^urn:ietf:params:acme:error:incorrectResponse$" } }],
193
+ [{ body: { "/type": "urn:ietf:params:acme:error:incorrectResponse" } }],
169
194
  ) {}
170
195
 
171
196
  /** A contact URL for an account was invalid. */
@@ -176,8 +201,10 @@ export class AcmeInvalidContact
176
201
  message: S.String,
177
202
  type: S.String,
178
203
  detail: /*@__PURE__*/ S.optional(S.String),
204
+ body: /*@__PURE__*/ S.optional(S.Unknown),
205
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
179
206
  }),
180
- [{ message: { matches: "^urn:ietf:params:acme:error:invalidContact$" } }],
207
+ [{ body: { "/type": "urn:ietf:params:acme:error:invalidContact" } }],
181
208
  ) {}
182
209
 
183
210
  /** The request message was malformed. */
@@ -188,8 +215,10 @@ export class AcmeMalformed
188
215
  message: S.String,
189
216
  type: S.String,
190
217
  detail: /*@__PURE__*/ S.optional(S.String),
218
+ body: /*@__PURE__*/ S.optional(S.Unknown),
219
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
191
220
  }),
192
- [{ message: { matches: "^urn:ietf:params:acme:error:malformed$" } }],
221
+ [{ body: { "/type": "urn:ietf:params:acme:error:malformed" } }],
193
222
  ) {}
194
223
 
195
224
  /** The request attempted to finalize an order that is not ready to be finalized. */
@@ -200,8 +229,10 @@ export class AcmeOrderNotReady
200
229
  message: S.String,
201
230
  type: S.String,
202
231
  detail: /*@__PURE__*/ S.optional(S.String),
232
+ body: /*@__PURE__*/ S.optional(S.Unknown),
233
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
203
234
  }),
204
- [{ message: { matches: "^urn:ietf:params:acme:error:orderNotReady$" } }],
235
+ [{ body: { "/type": "urn:ietf:params:acme:error:orderNotReady" } }],
205
236
  ) {}
206
237
 
207
238
  /** The request exceeds a rate limit. */
@@ -213,8 +244,10 @@ export class AcmeRateLimited
213
244
  message: S.String,
214
245
  type: S.String,
215
246
  detail: /*@__PURE__*/ S.optional(S.String),
247
+ body: /*@__PURE__*/ S.optional(S.Unknown),
248
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
216
249
  }).pipe(C.withThrottlingError, C.withRetryableError),
217
- [{ message: { matches: "^urn:ietf:params:acme:error:rateLimited$" } }],
250
+ [{ body: { "/type": "urn:ietf:params:acme:error:rateLimited" } }],
218
251
  ) {}
219
252
 
220
253
  /** The server will not issue certificates for the identifier. */
@@ -225,8 +258,10 @@ export class AcmeRejectedIdentifier
225
258
  message: S.String,
226
259
  type: S.String,
227
260
  detail: /*@__PURE__*/ S.optional(S.String),
261
+ body: /*@__PURE__*/ S.optional(S.Unknown),
262
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
228
263
  }),
229
- [{ message: { matches: "^urn:ietf:params:acme:error:rejectedIdentifier$" } }],
264
+ [{ body: { "/type": "urn:ietf:params:acme:error:rejectedIdentifier" } }],
230
265
  ) {}
231
266
 
232
267
  /** The server experienced an internal error. */
@@ -237,8 +272,11 @@ export class AcmeServerInternal
237
272
  message: S.String,
238
273
  type: S.String,
239
274
  detail: /*@__PURE__*/ S.optional(S.String),
275
+ body: /*@__PURE__*/ S.optional(S.Unknown),
276
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
277
+ retryAfter: /*@__PURE__*/ S.optional(S.Duration),
240
278
  }).pipe(C.withRetryableError),
241
- [{ message: { matches: "^urn:ietf:params:acme:error:serverInternal$" } }],
279
+ [{ body: { "/type": "urn:ietf:params:acme:error:serverInternal" } }],
242
280
  ) {}
243
281
 
244
282
  /** The server received a TLS error during validation. */
@@ -249,8 +287,10 @@ export class AcmeTls
249
287
  message: S.String,
250
288
  type: S.String,
251
289
  detail: /*@__PURE__*/ S.optional(S.String),
290
+ body: /*@__PURE__*/ S.optional(S.Unknown),
291
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
252
292
  }),
253
- [{ message: { matches: "^urn:ietf:params:acme:error:tls$" } }],
293
+ [{ body: { "/type": "urn:ietf:params:acme:error:tls" } }],
254
294
  ) {}
255
295
 
256
296
  /** The client lacks sufficient authorization. */
@@ -261,8 +301,10 @@ export class AcmeUnauthorized
261
301
  message: S.String,
262
302
  type: S.String,
263
303
  detail: /*@__PURE__*/ S.optional(S.String),
304
+ body: /*@__PURE__*/ S.optional(S.Unknown),
305
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
264
306
  }),
265
- [{ message: { matches: "^urn:ietf:params:acme:error:unauthorized$" } }],
307
+ [{ body: { "/type": "urn:ietf:params:acme:error:unauthorized" } }],
266
308
  ) {}
267
309
 
268
310
  /** A contact URL for an account used an unsupported protocol scheme. */
@@ -273,8 +315,10 @@ export class AcmeUnsupportedContact
273
315
  message: S.String,
274
316
  type: S.String,
275
317
  detail: /*@__PURE__*/ S.optional(S.String),
318
+ body: /*@__PURE__*/ S.optional(S.Unknown),
319
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
276
320
  }),
277
- [{ message: { matches: "^urn:ietf:params:acme:error:unsupportedContact$" } }],
321
+ [{ body: { "/type": "urn:ietf:params:acme:error:unsupportedContact" } }],
278
322
  ) {}
279
323
 
280
324
  /** An identifier is of an unsupported type. */
@@ -285,8 +329,10 @@ export class AcmeUnsupportedIdentifier
285
329
  message: S.String,
286
330
  type: S.String,
287
331
  detail: /*@__PURE__*/ S.optional(S.String),
332
+ body: /*@__PURE__*/ S.optional(S.Unknown),
333
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
288
334
  }),
289
- [{ message: { matches: "^urn:ietf:params:acme:error:unsupportedIdentifier$" } }],
335
+ [{ body: { "/type": "urn:ietf:params:acme:error:unsupportedIdentifier" } }],
290
336
  ) {}
291
337
 
292
338
  /** Visit the "instance" URL and take actions specified there. */
@@ -297,8 +343,10 @@ export class AcmeUserActionRequired
297
343
  message: S.String,
298
344
  type: S.String,
299
345
  detail: /*@__PURE__*/ S.optional(S.String),
346
+ body: /*@__PURE__*/ S.optional(S.Unknown),
347
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
300
348
  }),
301
- [{ message: { matches: "^urn:ietf:params:acme:error:userActionRequired$" } }],
349
+ [{ body: { "/type": "urn:ietf:params:acme:error:userActionRequired" } }],
302
350
  ) {}
303
351
 
304
352
  export interface DeactivateAuthorizationRequest {
@@ -536,6 +584,7 @@ export const deactivateAuthorization: API.OperationMethod<
536
584
  AcmeServerInternal,
537
585
  AcmeUnauthorized,
538
586
  ],
587
+ serviceErrors: AcmeServiceErrors,
539
588
  protocol: AcmeProtocol,
540
589
  retry: Retry.Retry,
541
590
  telemetry: TELEMETRY,
@@ -567,6 +616,7 @@ export const downloadCertificate: API.OperationMethod<
567
616
  AcmeServerInternal,
568
617
  AcmeUnauthorized,
569
618
  ],
619
+ serviceErrors: AcmeServiceErrors,
570
620
  protocol: AcmeProtocol,
571
621
  retry: Retry.Retry,
572
622
  telemetry: TELEMETRY,
@@ -602,6 +652,7 @@ export const finalizeOrder: API.OperationMethod<
602
652
  AcmeServerInternal,
603
653
  AcmeUnauthorized,
604
654
  ],
655
+ serviceErrors: AcmeServiceErrors,
605
656
  protocol: AcmeProtocol,
606
657
  retry: Retry.Retry,
607
658
  telemetry: TELEMETRY,
@@ -633,6 +684,7 @@ export const getAuthorization: API.OperationMethod<
633
684
  AcmeServerInternal,
634
685
  AcmeUnauthorized,
635
686
  ],
687
+ serviceErrors: AcmeServiceErrors,
636
688
  protocol: AcmeProtocol,
637
689
  retry: Retry.Retry,
638
690
  telemetry: TELEMETRY,
@@ -650,6 +702,7 @@ export const getDirectory: API.OperationMethod<
650
702
  input: __S(36, __c9, 0) as any as S.Schema<GetDirectoryRequest>,
651
703
  output: __S(38, __c9, 2) as any as S.Schema<Directory>,
652
704
  errors: [],
705
+ serviceErrors: AcmeServiceErrors,
653
706
  protocol: AcmeProtocol,
654
707
  retry: Retry.Retry,
655
708
  telemetry: TELEMETRY,
@@ -681,6 +734,7 @@ export const getOrder: API.OperationMethod<
681
734
  AcmeServerInternal,
682
735
  AcmeUnauthorized,
683
736
  ],
737
+ serviceErrors: AcmeServiceErrors,
684
738
  protocol: AcmeProtocol,
685
739
  retry: Retry.Retry,
686
740
  telemetry: TELEMETRY,
@@ -724,6 +778,7 @@ export const newAccount: API.OperationMethod<
724
778
  AcmeUnsupportedContact,
725
779
  AcmeUserActionRequired,
726
780
  ],
781
+ serviceErrors: AcmeServiceErrors,
727
782
  protocol: AcmeProtocol,
728
783
  retry: Retry.Retry,
729
784
  telemetry: TELEMETRY,
@@ -741,6 +796,7 @@ export const newNonce: API.OperationMethod<
741
796
  input: __S(52, __c13, 0) as any as S.Schema<NewNonceRequest>,
742
797
  output: __S(53, __c13, 1) as any as S.Schema<NonceResponse>,
743
798
  errors: [],
799
+ serviceErrors: AcmeServiceErrors,
744
800
  protocol: AcmeProtocol,
745
801
  retry: Retry.Retry,
746
802
  telemetry: TELEMETRY,
@@ -778,6 +834,7 @@ export const newOrder: API.OperationMethod<
778
834
  AcmeUnsupportedIdentifier,
779
835
  AcmeUserActionRequired,
780
836
  ],
837
+ serviceErrors: AcmeServiceErrors,
781
838
  protocol: AcmeProtocol,
782
839
  retry: Retry.Retry,
783
840
  telemetry: TELEMETRY,
@@ -819,6 +876,7 @@ export const respondChallenge: API.OperationMethod<
819
876
  AcmeTls,
820
877
  AcmeUnauthorized,
821
878
  ],
879
+ serviceErrors: AcmeServiceErrors,
822
880
  protocol: AcmeProtocol,
823
881
  retry: Retry.Retry,
824
882
  telemetry: TELEMETRY,
@@ -854,6 +912,7 @@ export const revokeCertificate: API.OperationMethod<
854
912
  AcmeServerInternal,
855
913
  AcmeUnauthorized,
856
914
  ],
915
+ serviceErrors: AcmeServiceErrors,
857
916
  protocol: AcmeProtocol,
858
917
  retry: Retry.Retry,
859
918
  telemetry: TELEMETRY,
@@ -889,6 +948,7 @@ export const updateAccount: API.OperationMethod<
889
948
  AcmeUnauthorized,
890
949
  AcmeUnsupportedContact,
891
950
  ],
951
+ serviceErrors: AcmeServiceErrors,
892
952
  protocol: AcmeProtocol,
893
953
  retry: Retry.Retry,
894
954
  telemetry: TELEMETRY,