@distilled.cloud/acme 1.0.0-rc.14 → 1.0.0-rc.16
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/lib/credentials.d.ts +4 -4
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +39 -33
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts +26 -26
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +33 -33
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +22 -22
- package/lib/jose.d.ts +2 -2
- package/lib/jose.d.ts.map +1 -1
- package/lib/jose.js +22 -22
- package/lib/jose.js.map +1 -1
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +61 -58
- package/lib/protocol.js.map +1 -1
- package/lib/retry.d.ts +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +26 -25
- package/lib/retry.js.map +1 -1
- package/lib/services/acme.d.ts +47 -82
- package/lib/services/acme.d.ts.map +1 -1
- package/lib/services/acme.js +151 -530
- package/lib/traits.d.ts +2 -2
- package/lib/traits.js +10 -10
- package/package.json +7 -7
- package/src/credentials.ts +31 -26
- package/src/errors.ts +25 -24
- package/src/index.ts +1 -1
- package/src/jose.ts +3 -3
- package/src/protocol.ts +25 -20
- package/src/retry.ts +6 -4
- package/src/services/acme.ts +332 -289
- package/src/traits.ts +2 -2
- package/lib/protocol.test.d.ts +0 -2
- package/lib/protocol.test.d.ts.map +0 -1
- package/lib/protocol.test.js +0 -533
- package/lib/protocol.test.js.map +0 -1
- package/lib/services/acme.js.map +0 -1
- package/src/protocol.test.ts +0 -806
package/lib/services/acme.js
CHANGED
|
@@ -1,539 +1,160 @@
|
|
|
1
1
|
import * as API from "@distilled.cloud/core/api";
|
|
2
2
|
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
|
-
import * as S from "@distilled.cloud/core/schema";
|
|
4
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
5
6
|
import { AcmeProtocol } from "../protocol.js";
|
|
6
7
|
import * as Retry from "../retry.js";
|
|
7
8
|
import * as T from "../traits.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/*@__PURE__*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}),
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/*@__PURE__*/ S.TaggedError()("AcmeBadSignatureAlgorithm", {
|
|
65
|
-
code: S.Number,
|
|
66
|
-
message: S.String,
|
|
67
|
-
type: S.String,
|
|
68
|
-
detail: S.optional(S.String),
|
|
69
|
-
}), [{ message: { matches: "^urn:ietf:params:acme:error:badSignatureAlgorithm$" } }]) {
|
|
70
|
-
}
|
|
71
|
-
/** Certification Authority Authorization (CAA) records forbid the CA from issuing a certificate. */
|
|
72
|
-
export class AcmeCaa extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
73
|
-
/*@__PURE__*/ S.TaggedError()("AcmeCaa", {
|
|
74
|
-
code: S.Number,
|
|
75
|
-
message: S.String,
|
|
76
|
-
type: S.String,
|
|
77
|
-
detail: S.optional(S.String),
|
|
78
|
-
}), [{ message: { matches: "^urn:ietf:params:acme:error:caa$" } }]) {
|
|
79
|
-
}
|
|
80
|
-
/** The server could not connect to validation target. */
|
|
81
|
-
export class AcmeConnection extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
82
|
-
/*@__PURE__*/ S.TaggedError()("AcmeConnection", {
|
|
83
|
-
code: S.Number,
|
|
84
|
-
message: S.String,
|
|
85
|
-
type: S.String,
|
|
86
|
-
detail: S.optional(S.String),
|
|
87
|
-
}), [{ message: { matches: "^urn:ietf:params:acme:error:connection$" } }]) {
|
|
88
|
-
}
|
|
89
|
-
/** There was a problem with a DNS query during identifier validation. */
|
|
90
|
-
export class AcmeDns extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
91
|
-
/*@__PURE__*/ S.TaggedError()("AcmeDns", {
|
|
92
|
-
code: S.Number,
|
|
93
|
-
message: S.String,
|
|
94
|
-
type: S.String,
|
|
95
|
-
detail: S.optional(S.String),
|
|
96
|
-
}), [{ message: { matches: "^urn:ietf:params:acme:error:dns$" } }]) {
|
|
97
|
-
}
|
|
98
|
-
/** The request must include a value for the "externalAccountBinding" field. */
|
|
99
|
-
export class AcmeExternalAccountRequired extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
100
|
-
/*@__PURE__*/ S.TaggedError()("AcmeExternalAccountRequired", {
|
|
101
|
-
code: S.Number,
|
|
102
|
-
message: S.String,
|
|
103
|
-
type: S.String,
|
|
104
|
-
detail: S.optional(S.String),
|
|
105
|
-
}), [{ message: { matches: "^urn:ietf:params:acme:error:externalAccountRequired$" } }]) {
|
|
106
|
-
}
|
|
107
|
-
/** Response received didn't match the challenge's requirements. */
|
|
108
|
-
export class AcmeIncorrectResponse extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
109
|
-
/*@__PURE__*/ S.TaggedError()("AcmeIncorrectResponse", {
|
|
110
|
-
code: S.Number,
|
|
111
|
-
message: S.String,
|
|
112
|
-
type: S.String,
|
|
113
|
-
detail: S.optional(S.String),
|
|
114
|
-
}), [{ message: { matches: "^urn:ietf:params:acme:error:incorrectResponse$" } }]) {
|
|
115
|
-
}
|
|
116
|
-
/** A contact URL for an account was invalid. */
|
|
117
|
-
export class AcmeInvalidContact extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
118
|
-
/*@__PURE__*/ S.TaggedError()("AcmeInvalidContact", {
|
|
119
|
-
code: S.Number,
|
|
120
|
-
message: S.String,
|
|
121
|
-
type: S.String,
|
|
122
|
-
detail: S.optional(S.String),
|
|
123
|
-
}), [{ message: { matches: "^urn:ietf:params:acme:error:invalidContact$" } }]) {
|
|
124
|
-
}
|
|
125
|
-
/** The request message was malformed. */
|
|
126
|
-
export class AcmeMalformed extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
127
|
-
/*@__PURE__*/ S.TaggedError()("AcmeMalformed", {
|
|
128
|
-
code: S.Number,
|
|
129
|
-
message: S.String,
|
|
130
|
-
type: S.String,
|
|
131
|
-
detail: S.optional(S.String),
|
|
132
|
-
}), [{ message: { matches: "^urn:ietf:params:acme:error:malformed$" } }]) {
|
|
133
|
-
}
|
|
134
|
-
/** The request attempted to finalize an order that is not ready to be finalized. */
|
|
135
|
-
export class AcmeOrderNotReady extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
136
|
-
/*@__PURE__*/ S.TaggedError()("AcmeOrderNotReady", {
|
|
137
|
-
code: S.Number,
|
|
138
|
-
message: S.String,
|
|
139
|
-
type: S.String,
|
|
140
|
-
detail: S.optional(S.String),
|
|
141
|
-
}), [{ message: { matches: "^urn:ietf:params:acme:error:orderNotReady$" } }]) {
|
|
142
|
-
}
|
|
143
|
-
/** The request exceeds a rate limit. */
|
|
144
|
-
export class AcmeRateLimited extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
145
|
-
/*@__PURE__*/ S.TaggedError()("AcmeRateLimited", {
|
|
146
|
-
retryAfter: S.optional(S.Duration),
|
|
147
|
-
code: S.Number,
|
|
148
|
-
message: S.String,
|
|
149
|
-
type: S.String,
|
|
150
|
-
detail: S.optional(S.String),
|
|
151
|
-
}).pipe(C.withThrottlingError, C.withRetryableError), [{ message: { matches: "^urn:ietf:params:acme:error:rateLimited$" } }]) {
|
|
152
|
-
}
|
|
153
|
-
/** The server will not issue certificates for the identifier. */
|
|
154
|
-
export class AcmeRejectedIdentifier extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
155
|
-
/*@__PURE__*/ S.TaggedError()("AcmeRejectedIdentifier", {
|
|
156
|
-
code: S.Number,
|
|
157
|
-
message: S.String,
|
|
158
|
-
type: S.String,
|
|
159
|
-
detail: S.optional(S.String),
|
|
160
|
-
}), [{ message: { matches: "^urn:ietf:params:acme:error:rejectedIdentifier$" } }]) {
|
|
161
|
-
}
|
|
162
|
-
/** The server experienced an internal error. */
|
|
163
|
-
export class AcmeServerInternal extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
164
|
-
/*@__PURE__*/ S.TaggedError()("AcmeServerInternal", {
|
|
165
|
-
code: S.Number,
|
|
166
|
-
message: S.String,
|
|
167
|
-
type: S.String,
|
|
168
|
-
detail: S.optional(S.String),
|
|
169
|
-
}).pipe(C.withRetryableError), [{ message: { matches: "^urn:ietf:params:acme:error:serverInternal$" } }]) {
|
|
170
|
-
}
|
|
171
|
-
/** The server received a TLS error during validation. */
|
|
172
|
-
export class AcmeTls extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
173
|
-
/*@__PURE__*/ S.TaggedError()("AcmeTls", {
|
|
174
|
-
code: S.Number,
|
|
175
|
-
message: S.String,
|
|
176
|
-
type: S.String,
|
|
177
|
-
detail: S.optional(S.String),
|
|
178
|
-
}), [{ message: { matches: "^urn:ietf:params:acme:error:tls$" } }]) {
|
|
179
|
-
}
|
|
180
|
-
/** The client lacks sufficient authorization. */
|
|
181
|
-
export class AcmeUnauthorized extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
182
|
-
/*@__PURE__*/ S.TaggedError()("AcmeUnauthorized", {
|
|
183
|
-
code: S.Number,
|
|
184
|
-
message: S.String,
|
|
185
|
-
type: S.String,
|
|
186
|
-
detail: S.optional(S.String),
|
|
187
|
-
}), [{ message: { matches: "^urn:ietf:params:acme:error:unauthorized$" } }]) {
|
|
188
|
-
}
|
|
189
|
-
/** A contact URL for an account used an unsupported protocol scheme. */
|
|
190
|
-
export class AcmeUnsupportedContact extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
191
|
-
/*@__PURE__*/ S.TaggedError()("AcmeUnsupportedContact", {
|
|
192
|
-
code: S.Number,
|
|
193
|
-
message: S.String,
|
|
194
|
-
type: S.String,
|
|
195
|
-
detail: S.optional(S.String),
|
|
196
|
-
}), [{ message: { matches: "^urn:ietf:params:acme:error:unsupportedContact$" } }]) {
|
|
197
|
-
}
|
|
198
|
-
/** An identifier is of an unsupported type. */
|
|
199
|
-
export class AcmeUnsupportedIdentifier extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
200
|
-
/*@__PURE__*/ S.TaggedError()("AcmeUnsupportedIdentifier", {
|
|
201
|
-
code: S.Number,
|
|
202
|
-
message: S.String,
|
|
203
|
-
type: S.String,
|
|
204
|
-
detail: S.optional(S.String),
|
|
205
|
-
}), [{ message: { matches: "^urn:ietf:params:acme:error:unsupportedIdentifier$" } }]) {
|
|
206
|
-
}
|
|
207
|
-
/** Visit the "instance" URL and take actions specified there. */
|
|
208
|
-
export class AcmeUserActionRequired extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
|
|
209
|
-
/*@__PURE__*/ S.TaggedError()("AcmeUserActionRequired", {
|
|
210
|
-
code: S.Number,
|
|
211
|
-
message: S.String,
|
|
212
|
-
type: S.String,
|
|
213
|
-
detail: S.optional(S.String),
|
|
214
|
-
}), [{ message: { matches: "^urn:ietf:params:acme:error:userActionRequired$" } }]) {
|
|
215
|
-
}
|
|
216
|
-
export const DeactivateAuthorizationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
217
|
-
url: S.String.pipe(T.Label()),
|
|
218
|
-
status: S.String,
|
|
219
|
-
}).pipe(T.Http({ method: "POST", uri: "/authz/{url}/deactivate", code: 200 }))).annotate({
|
|
220
|
-
identifier: "DeactivateAuthorizationRequest",
|
|
9
|
+
const __0 = __L.at;
|
|
10
|
+
const __1 = T.Http;
|
|
11
|
+
const __2 = T.Label;
|
|
12
|
+
const __3 = S.String;
|
|
13
|
+
const __4 = S.Struct;
|
|
14
|
+
const __5 = S.suspend;
|
|
15
|
+
const __6 = S.optional;
|
|
16
|
+
const __7 = S.Array;
|
|
17
|
+
const __8 = S.Number;
|
|
18
|
+
const __9 = S.Boolean;
|
|
19
|
+
const __10 = S.TaggedError;
|
|
20
|
+
const __11 = T.applyErrorMatchers;
|
|
21
|
+
const __12 = S.Duration;
|
|
22
|
+
|
|
23
|
+
export const AcmeAccountDoesNotExist = /*@__PURE__*/ API.error(function AcmeAccountDoesNotExist(i) {
|
|
24
|
+
return API.newError(i, new.target, ['$5($4()("AcmeAccountDoesNotExist",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:accountDoesNotExist$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const AcmeAlreadyRevoked = /*@__PURE__*/ API.error(function AcmeAlreadyRevoked(i) {
|
|
28
|
+
return API.newError(i, new.target, ['$5($4()("AcmeAlreadyRevoked",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:alreadyRevoked$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export const AcmeBadCsr = /*@__PURE__*/ API.error(function AcmeBadCsr(i) {
|
|
32
|
+
return API.newError(i, new.target, ['$5($4()("AcmeBadCsr",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:badCSR$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export const AcmeBadNonce = /*@__PURE__*/ API.error(function AcmeBadNonce(i) {
|
|
36
|
+
return API.newError(i, new.target, ['$5($4()("AcmeBadNonce",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:badNonce$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export const AcmeBadPublicKey = /*@__PURE__*/ API.error(function AcmeBadPublicKey(i) {
|
|
40
|
+
return API.newError(i, new.target, ['$5($4()("AcmeBadPublicKey",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:badPublicKey$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export const AcmeBadRevocationReason = /*@__PURE__*/ API.error(function AcmeBadRevocationReason(i) {
|
|
44
|
+
return API.newError(i, new.target, ['$5($4()("AcmeBadRevocationReason",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:badRevocationReason$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export const AcmeBadSignatureAlgorithm = /*@__PURE__*/ API.error(function AcmeBadSignatureAlgorithm(i) {
|
|
48
|
+
return API.newError(i, new.target, ['$5($4()("AcmeBadSignatureAlgorithm",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:badSignatureAlgorithm$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export const AcmeCaa = /*@__PURE__*/ API.error(function AcmeCaa(i) {
|
|
52
|
+
return API.newError(i, new.target, ['$5($4()("AcmeCaa",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:caa$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export const AcmeConnection = /*@__PURE__*/ API.error(function AcmeConnection(i) {
|
|
56
|
+
return API.newError(i, new.target, ['$5($4()("AcmeConnection",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:connection$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export const AcmeDns = /*@__PURE__*/ API.error(function AcmeDns(i) {
|
|
60
|
+
return API.newError(i, new.target, ['$5($4()("AcmeDns",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:dns$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export const AcmeExternalAccountRequired = /*@__PURE__*/ API.error(function AcmeExternalAccountRequired(i) {
|
|
64
|
+
return API.newError(i, new.target, ['$5($4()("AcmeExternalAccountRequired",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:externalAccountRequired$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
221
65
|
});
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
})).annotate({ identifier: "Identifier" });
|
|
226
|
-
export const Subproblem = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
227
|
-
type: S.optional(S.String),
|
|
228
|
-
detail: S.optional(S.String),
|
|
229
|
-
identifier: S.optional(Identifier),
|
|
230
|
-
})).annotate({ identifier: "Subproblem" });
|
|
231
|
-
export const ProblemSubproblemsList = /*@__PURE__*/ S.Array(Subproblem);
|
|
232
|
-
export const Problem = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
233
|
-
type: S.optional(S.String),
|
|
234
|
-
detail: S.optional(S.String),
|
|
235
|
-
status: S.optional(S.Number),
|
|
236
|
-
instance: S.optional(S.String),
|
|
237
|
-
identifier: S.optional(Identifier),
|
|
238
|
-
subproblems: S.optional(ProblemSubproblemsList),
|
|
239
|
-
})).annotate({ identifier: "Problem" });
|
|
240
|
-
export const Challenge = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
241
|
-
type: S.String,
|
|
242
|
-
url: S.String,
|
|
243
|
-
status: S.String,
|
|
244
|
-
validated: S.optional(S.String),
|
|
245
|
-
token: S.optional(S.String),
|
|
246
|
-
error: S.optional(Problem),
|
|
247
|
-
})).annotate({ identifier: "Challenge" });
|
|
248
|
-
export const AuthorizationChallengesList = /*@__PURE__*/ S.Array(Challenge);
|
|
249
|
-
export const Authorization = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
250
|
-
identifier: Identifier,
|
|
251
|
-
status: S.String,
|
|
252
|
-
expires: S.optional(S.String),
|
|
253
|
-
challenges: AuthorizationChallengesList,
|
|
254
|
-
wildcard: S.optional(S.Boolean),
|
|
255
|
-
})).annotate({ identifier: "Authorization" });
|
|
256
|
-
export const DownloadCertificateRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
257
|
-
url: S.String.pipe(T.Label()),
|
|
258
|
-
}).pipe(T.Http({ method: "POST", uri: "/cert/{url}", code: 200 }))).annotate({
|
|
259
|
-
identifier: "DownloadCertificateRequest",
|
|
66
|
+
|
|
67
|
+
export const AcmeIncorrectResponse = /*@__PURE__*/ API.error(function AcmeIncorrectResponse(i) {
|
|
68
|
+
return API.newError(i, new.target, ['$5($4()("AcmeIncorrectResponse",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:incorrectResponse$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
260
69
|
});
|
|
261
|
-
|
|
262
|
-
export const
|
|
263
|
-
|
|
264
|
-
alternates: S.optional(CertificateChainAlternatesList),
|
|
265
|
-
})).annotate({ identifier: "CertificateChain" });
|
|
266
|
-
export const FinalizeOrderRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
267
|
-
url: S.String.pipe(T.Label()),
|
|
268
|
-
csr: S.String,
|
|
269
|
-
}).pipe(T.Http({ method: "POST", uri: "/finalize/{url}", code: 200 }))).annotate({ identifier: "FinalizeOrderRequest" });
|
|
270
|
-
export const OrderResponseIdentifiersList = /*@__PURE__*/ S.Array(Identifier);
|
|
271
|
-
export const OrderResponseAuthorizationsList = /*@__PURE__*/ S.Array(S.String);
|
|
272
|
-
export const OrderResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
273
|
-
status: S.String,
|
|
274
|
-
expires: S.optional(S.String),
|
|
275
|
-
identifiers: OrderResponseIdentifiersList,
|
|
276
|
-
notBefore: S.optional(S.String),
|
|
277
|
-
notAfter: S.optional(S.String),
|
|
278
|
-
error: S.optional(Problem),
|
|
279
|
-
authorizations: OrderResponseAuthorizationsList,
|
|
280
|
-
finalize: S.String,
|
|
281
|
-
certificate: S.optional(S.String),
|
|
282
|
-
location: S.optional(S.String),
|
|
283
|
-
})).annotate({ identifier: "OrderResponse" });
|
|
284
|
-
export const GetAuthorizationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
285
|
-
url: S.String.pipe(T.Label()),
|
|
286
|
-
}).pipe(T.Http({ method: "POST", uri: "/authz/{url}", code: 200 }))).annotate({ identifier: "GetAuthorizationRequest" });
|
|
287
|
-
export const GetDirectoryRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/directory", code: 200 }))).annotate({ identifier: "GetDirectoryRequest" });
|
|
288
|
-
export const DirectoryMetaCaaIdentitiesList = /*@__PURE__*/ S.Array(S.String);
|
|
289
|
-
export const DirectoryMeta = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
290
|
-
termsOfService: S.optional(S.String),
|
|
291
|
-
website: S.optional(S.String),
|
|
292
|
-
caaIdentities: S.optional(DirectoryMetaCaaIdentitiesList),
|
|
293
|
-
externalAccountRequired: S.optional(S.Boolean),
|
|
294
|
-
})).annotate({ identifier: "DirectoryMeta" });
|
|
295
|
-
export const Directory = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
296
|
-
newNonce: S.String,
|
|
297
|
-
newAccount: S.String,
|
|
298
|
-
newOrder: S.String,
|
|
299
|
-
newAuthz: S.optional(S.String),
|
|
300
|
-
revokeCert: S.String,
|
|
301
|
-
keyChange: S.optional(S.String),
|
|
302
|
-
meta: S.optional(DirectoryMeta),
|
|
303
|
-
})).annotate({ identifier: "Directory" });
|
|
304
|
-
export const GetOrderRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
305
|
-
url: S.String.pipe(T.Label()),
|
|
306
|
-
}).pipe(T.Http({ method: "POST", uri: "/order/{url}", code: 200 }))).annotate({ identifier: "GetOrderRequest" });
|
|
307
|
-
export const NewAccountRequestContactList = /*@__PURE__*/ S.Array(S.String);
|
|
308
|
-
export const ExternalAccountBinding = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
309
|
-
protected: S.String,
|
|
310
|
-
payload: S.String,
|
|
311
|
-
signature: S.String,
|
|
312
|
-
})).annotate({ identifier: "ExternalAccountBinding" });
|
|
313
|
-
export const NewAccountRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
314
|
-
contact: S.optional(NewAccountRequestContactList),
|
|
315
|
-
termsOfServiceAgreed: S.optional(S.Boolean),
|
|
316
|
-
onlyReturnExisting: S.optional(S.Boolean),
|
|
317
|
-
externalAccountBinding: S.optional(ExternalAccountBinding),
|
|
318
|
-
}).pipe(T.Http({ method: "POST", uri: "/newAccount", code: 200 }))).annotate({ identifier: "NewAccountRequest" });
|
|
319
|
-
export const AccountResponseContactList = /*@__PURE__*/ S.Array(S.String);
|
|
320
|
-
export const AccountResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
321
|
-
status: S.String,
|
|
322
|
-
contact: S.optional(AccountResponseContactList),
|
|
323
|
-
termsOfServiceAgreed: S.optional(S.Boolean),
|
|
324
|
-
orders: S.optional(S.String),
|
|
325
|
-
location: S.optional(S.String),
|
|
326
|
-
})).annotate({ identifier: "AccountResponse" });
|
|
327
|
-
export const NewNonceRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/newNonce", code: 200 }))).annotate({ identifier: "NewNonceRequest" });
|
|
328
|
-
export const NonceResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
329
|
-
replayNonce: S.String,
|
|
330
|
-
})).annotate({ identifier: "NonceResponse" });
|
|
331
|
-
export const NewOrderRequestIdentifiersList = /*@__PURE__*/ S.Array(Identifier);
|
|
332
|
-
export const NewOrderRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
333
|
-
identifiers: NewOrderRequestIdentifiersList,
|
|
334
|
-
notBefore: S.optional(S.String),
|
|
335
|
-
notAfter: S.optional(S.String),
|
|
336
|
-
}).pipe(T.Http({ method: "POST", uri: "/newOrder", code: 200 }))).annotate({ identifier: "NewOrderRequest" });
|
|
337
|
-
export const RespondChallengeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
338
|
-
url: S.String.pipe(T.Label()),
|
|
339
|
-
}).pipe(T.Http({ method: "POST", uri: "/challenge/{url}", code: 200 }))).annotate({ identifier: "RespondChallengeRequest" });
|
|
340
|
-
export const RevokeCertificateRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
341
|
-
certificate: S.String,
|
|
342
|
-
reason: S.optional(S.Number),
|
|
343
|
-
}).pipe(T.Http({ method: "POST", uri: "/revokeCert", code: 200 }))).annotate({ identifier: "RevokeCertificateRequest" });
|
|
344
|
-
export const RevokeCertificateResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
345
|
-
identifier: "RevokeCertificateResponse",
|
|
70
|
+
|
|
71
|
+
export const AcmeInvalidContact = /*@__PURE__*/ API.error(function AcmeInvalidContact(i) {
|
|
72
|
+
return API.newError(i, new.target, ['$5($4()("AcmeInvalidContact",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:invalidContact$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
346
73
|
});
|
|
347
|
-
|
|
348
|
-
export const
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
})
|
|
383
|
-
|
|
384
|
-
export const
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
],
|
|
435
|
-
protocol: AcmeProtocol,
|
|
436
|
-
retry: Retry.Retry,
|
|
437
|
-
}));
|
|
438
|
-
/** Create an account, or find the existing account for this key */
|
|
439
|
-
export const newAccount = /*@__PURE__*/ API.make(() => ({
|
|
440
|
-
input: NewAccountRequest,
|
|
441
|
-
output: AccountResponse,
|
|
442
|
-
errors: [
|
|
443
|
-
AcmeAccountDoesNotExist,
|
|
444
|
-
AcmeBadNonce,
|
|
445
|
-
AcmeBadPublicKey,
|
|
446
|
-
AcmeBadSignatureAlgorithm,
|
|
447
|
-
AcmeExternalAccountRequired,
|
|
448
|
-
AcmeInvalidContact,
|
|
449
|
-
AcmeMalformed,
|
|
450
|
-
AcmeRateLimited,
|
|
451
|
-
AcmeServerInternal,
|
|
452
|
-
AcmeUnauthorized,
|
|
453
|
-
AcmeUnsupportedContact,
|
|
454
|
-
AcmeUserActionRequired,
|
|
455
|
-
],
|
|
456
|
-
protocol: AcmeProtocol,
|
|
457
|
-
retry: Retry.Retry,
|
|
458
|
-
}));
|
|
459
|
-
/** Get a fresh anti-replay nonce (the `Replay-Nonce` header) */
|
|
460
|
-
export const newNonce = /*@__PURE__*/ API.make(() => ({
|
|
461
|
-
input: NewNonceRequest,
|
|
462
|
-
output: NonceResponse,
|
|
463
|
-
errors: [],
|
|
464
|
-
protocol: AcmeProtocol,
|
|
465
|
-
retry: Retry.Retry,
|
|
466
|
-
}));
|
|
467
|
-
/** Create an order for a set of identifiers */
|
|
468
|
-
export const newOrder = /*@__PURE__*/ API.make(() => ({
|
|
469
|
-
input: NewOrderRequest,
|
|
470
|
-
output: OrderResponse,
|
|
471
|
-
errors: [
|
|
472
|
-
AcmeAccountDoesNotExist,
|
|
473
|
-
AcmeBadNonce,
|
|
474
|
-
AcmeMalformed,
|
|
475
|
-
AcmeRateLimited,
|
|
476
|
-
AcmeRejectedIdentifier,
|
|
477
|
-
AcmeServerInternal,
|
|
478
|
-
AcmeUnauthorized,
|
|
479
|
-
AcmeUnsupportedIdentifier,
|
|
480
|
-
AcmeUserActionRequired,
|
|
481
|
-
],
|
|
482
|
-
protocol: AcmeProtocol,
|
|
483
|
-
retry: Retry.Retry,
|
|
484
|
-
}));
|
|
485
|
-
/** Tell the CA the challenge at `url` is ready to be validated */
|
|
486
|
-
export const respondChallenge = /*@__PURE__*/ API.make(() => ({
|
|
487
|
-
input: RespondChallengeRequest,
|
|
488
|
-
output: Challenge,
|
|
489
|
-
errors: [
|
|
490
|
-
AcmeAccountDoesNotExist,
|
|
491
|
-
AcmeBadNonce,
|
|
492
|
-
AcmeCaa,
|
|
493
|
-
AcmeConnection,
|
|
494
|
-
AcmeDns,
|
|
495
|
-
AcmeIncorrectResponse,
|
|
496
|
-
AcmeMalformed,
|
|
497
|
-
AcmeRateLimited,
|
|
498
|
-
AcmeServerInternal,
|
|
499
|
-
AcmeTls,
|
|
500
|
-
AcmeUnauthorized,
|
|
501
|
-
],
|
|
502
|
-
protocol: AcmeProtocol,
|
|
503
|
-
retry: Retry.Retry,
|
|
504
|
-
}));
|
|
505
|
-
/** Revoke a certificate */
|
|
506
|
-
export const revokeCertificate = /*@__PURE__*/ API.make(() => ({
|
|
507
|
-
input: RevokeCertificateRequest,
|
|
508
|
-
output: RevokeCertificateResponse,
|
|
509
|
-
errors: [
|
|
510
|
-
AcmeAccountDoesNotExist,
|
|
511
|
-
AcmeAlreadyRevoked,
|
|
512
|
-
AcmeBadNonce,
|
|
513
|
-
AcmeBadRevocationReason,
|
|
514
|
-
AcmeMalformed,
|
|
515
|
-
AcmeRateLimited,
|
|
516
|
-
AcmeServerInternal,
|
|
517
|
-
AcmeUnauthorized,
|
|
518
|
-
],
|
|
519
|
-
protocol: AcmeProtocol,
|
|
520
|
-
retry: Retry.Retry,
|
|
521
|
-
}));
|
|
522
|
-
/** Update (or deactivate) the account at `url` */
|
|
523
|
-
export const updateAccount = /*@__PURE__*/ API.make(() => ({
|
|
524
|
-
input: UpdateAccountRequest,
|
|
525
|
-
output: AccountResponse,
|
|
526
|
-
errors: [
|
|
527
|
-
AcmeAccountDoesNotExist,
|
|
528
|
-
AcmeBadNonce,
|
|
529
|
-
AcmeInvalidContact,
|
|
530
|
-
AcmeMalformed,
|
|
531
|
-
AcmeRateLimited,
|
|
532
|
-
AcmeServerInternal,
|
|
533
|
-
AcmeUnauthorized,
|
|
534
|
-
AcmeUnsupportedContact,
|
|
535
|
-
],
|
|
536
|
-
protocol: AcmeProtocol,
|
|
537
|
-
retry: Retry.Retry,
|
|
538
|
-
}));
|
|
539
|
-
//# sourceMappingURL=acme.js.map
|
|
74
|
+
|
|
75
|
+
export const AcmeMalformed = /*@__PURE__*/ API.error(function AcmeMalformed(i) {
|
|
76
|
+
return API.newError(i, new.target, ['$5($4()("AcmeMalformed",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:malformed$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export const AcmeOrderNotReady = /*@__PURE__*/ API.error(function AcmeOrderNotReady(i) {
|
|
80
|
+
return API.newError(i, new.target, ['$5($4()("AcmeOrderNotReady",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:orderNotReady$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export const AcmeRateLimited = /*@__PURE__*/ API.error(function AcmeRateLimited(i) {
|
|
84
|
+
return API.newError(i, new.target, ['$8($7()("AcmeRateLimited",{retryAfter:$4($3),code:$5,message:$6,type:$6,detail:$4($6)}).pipe($1,$2),[{message:{matches:"^urn:ietf:params:acme:error:rateLimited$"}}])', [__0, C.withThrottlingError, C.withRetryableError, __12, __6, __8, __3, __10, __11]]);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
export const AcmeRejectedIdentifier = /*@__PURE__*/ API.error(function AcmeRejectedIdentifier(i) {
|
|
88
|
+
return API.newError(i, new.target, ['$5($4()("AcmeRejectedIdentifier",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:rejectedIdentifier$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
export const AcmeServerInternal = /*@__PURE__*/ API.error(function AcmeServerInternal(i) {
|
|
92
|
+
return API.newError(i, new.target, ['$6($5()("AcmeServerInternal",{code:$2,message:$3,type:$3,detail:$4($3)}).pipe($1),[{message:{matches:"^urn:ietf:params:acme:error:serverInternal$"}}])', [__0, C.withRetryableError, __8, __3, __6, __10, __11]]);
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
export const AcmeTls = /*@__PURE__*/ API.error(function AcmeTls(i) {
|
|
96
|
+
return API.newError(i, new.target, ['$5($4()("AcmeTls",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:tls$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
export const AcmeUnauthorized = /*@__PURE__*/ API.error(function AcmeUnauthorized(i) {
|
|
100
|
+
return API.newError(i, new.target, ['$5($4()("AcmeUnauthorized",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:unauthorized$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export const AcmeUnsupportedContact = /*@__PURE__*/ API.error(function AcmeUnsupportedContact(i) {
|
|
104
|
+
return API.newError(i, new.target, ['$5($4()("AcmeUnsupportedContact",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:unsupportedContact$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
export const AcmeUnsupportedIdentifier = /*@__PURE__*/ API.error(function AcmeUnsupportedIdentifier(i) {
|
|
108
|
+
return API.newError(i, new.target, ['$5($4()("AcmeUnsupportedIdentifier",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:unsupportedIdentifier$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
export const AcmeUserActionRequired = /*@__PURE__*/ API.error(function AcmeUserActionRequired(i) {
|
|
112
|
+
return API.newError(i, new.target, ['$5($4()("AcmeUserActionRequired",{code:$1,message:$2,type:$2,detail:$3($2)}),[{message:{matches:"^urn:ietf:params:acme:error:userActionRequired$"}}])', [__0, __8, __3, __6, __10, __11]]);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
export const deactivateAuthorization = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:1,errors:[$7,$8,$9,$10,$11,$12],protocol:$13,retry:$14};$5(>2)@"DeactivateAuthorizationRequest";$4({url:$3.pipe($2()),status:$3}).pipe($1({method:"POST",uri:"/authz/{url}/deactivate",code:200}))', [__0, __1, __2, __3, __4, __5, __d1, AcmeAccountDoesNotExist, AcmeBadNonce, AcmeMalformed, AcmeRateLimited, AcmeServerInternal, AcmeUnauthorized, AcmeProtocol, Retry.Retry]] : API.call(deactivateAuthorization, i));
|
|
116
|
+
|
|
117
|
+
export const downloadCertificate = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$8,$9,$10,$11,$12,$13],protocol:$14,retry:$15};$5(>3)@"DownloadCertificateRequest";$5(>4)@"CertificateChain";$4({url:$3.pipe($2())}).pipe($1({method:"POST",uri:"/cert/{url}",code:200}));$4({chain:$3,alternates:$7(#6:0)})', [__0, __1, __2, __3, __4, __5, __d3, __6, AcmeAccountDoesNotExist, AcmeBadNonce, AcmeMalformed, AcmeRateLimited, AcmeServerInternal, AcmeUnauthorized, AcmeProtocol, Retry.Retry]] : API.call(downloadCertificate, i));
|
|
118
|
+
|
|
119
|
+
export const finalizeOrder = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:1,errors:[$7,$8,$9,$10,$11,$12,$13,$14],protocol:$15,retry:$16};$5(>2)@"FinalizeOrderRequest";$4({url:$3.pipe($2()),csr:$3}).pipe($1({method:"POST",uri:"/finalize/{url}",code:200}))', [__0, __1, __2, __3, __4, __5, __d4, AcmeAccountDoesNotExist, AcmeBadCsr, AcmeBadNonce, AcmeMalformed, AcmeOrderNotReady, AcmeRateLimited, AcmeServerInternal, AcmeUnauthorized, AcmeProtocol, Retry.Retry]] : API.call(finalizeOrder, i));
|
|
120
|
+
|
|
121
|
+
export const getAuthorization = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:1,errors:[$7,$8,$9,$10,$11,$12],protocol:$13,retry:$14};$5(>2)@"GetAuthorizationRequest";$4({url:$3.pipe($2())}).pipe($1({method:"POST",uri:"/authz/{url}",code:200}))', [__0, __1, __2, __3, __4, __5, __d1, AcmeAccountDoesNotExist, AcmeBadNonce, AcmeMalformed, AcmeRateLimited, AcmeServerInternal, AcmeUnauthorized, AcmeProtocol, Retry.Retry]] : API.call(getAuthorization, i));
|
|
122
|
+
|
|
123
|
+
export const getDirectory = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("Directory", '{input:#1,output:#3,errors:[],protocol:$8,retry:$9};$3(>4)@"Get%Request";$3(>5)@"%Meta";$3(>6)@"%";$2({}).pipe($1({method:"GET",uri:"/directory",code:200}));$2({termsOfService:$5($4),website:$5($4),caaIdentities:$5(#6:0),externalAccountRequired:$5($7)});$2({newNonce:$4,newAccount:$4,newOrder:$4,newAuthz:$5($4),revokeCert:$4,keyChange:$5($4),meta:$5(#2)})', [__0, __1, __4, __5, __3, __6, __d3, __9, AcmeProtocol, Retry.Retry]) : API.call(getDirectory, i));
|
|
124
|
+
|
|
125
|
+
export const getOrder = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:1,errors:[$7,$8,$9,$10,$11,$12],protocol:$13,retry:$14};$5(>2)@"GetOrderRequest";$4({url:$3.pipe($2())}).pipe($1({method:"POST",uri:"/order/{url}",code:200}))', [__0, __1, __2, __3, __4, __5, __d4, AcmeAccountDoesNotExist, AcmeBadNonce, AcmeMalformed, AcmeRateLimited, AcmeServerInternal, AcmeUnauthorized, AcmeProtocol, Retry.Retry]] : API.call(getOrder, i));
|
|
126
|
+
|
|
127
|
+
export const newAccount = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#2,output:#8:0,errors:[$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20],protocol:$21,retry:$22};$3(>3)@"ExternalAccountBinding";$3(>4)@"NewAccountRequest";$2({protected:$1,payload:$1,signature:$1});$2({contact:$6(#5:0),termsOfServiceAgreed:$6($7),onlyReturnExisting:$6($7),externalAccountBinding:$6(#1)}).pipe($4({method:"POST",uri:"/newAccount",code:200}))', [__0, __3, __4, __5, __1, __d3, __6, __9, __d5, AcmeAccountDoesNotExist, AcmeBadNonce, AcmeBadPublicKey, AcmeBadSignatureAlgorithm, AcmeExternalAccountRequired, AcmeInvalidContact, AcmeMalformed, AcmeRateLimited, AcmeServerInternal, AcmeUnauthorized, AcmeUnsupportedContact, AcmeUserActionRequired, AcmeProtocol, Retry.Retry]] : API.call(newAccount, i));
|
|
128
|
+
|
|
129
|
+
export const newNonce = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[],protocol:$5,retry:$6};$3(>3)@"NewNonceRequest";$3(>4)@"NonceResponse";$2({}).pipe($1({method:"GET",uri:"/newNonce",code:200}));$2({replayNonce:$4})', [__0, __1, __4, __5, __3, AcmeProtocol, Retry.Retry]] : API.call(newNonce, i));
|
|
130
|
+
|
|
131
|
+
export const newOrder = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2:1,errors:[$7,$8,$9,$10,$11,$12,$13,$14,$15],protocol:$16,retry:$17};$6(>2)@"NewOrderRequest";$5({identifiers:#2:0,notBefore:$4($3),notAfter:$4($3)}).pipe($1({method:"POST",uri:"/newOrder",code:200}))', [__0, __1, __d4, __3, __6, __4, __5, AcmeAccountDoesNotExist, AcmeBadNonce, AcmeMalformed, AcmeRateLimited, AcmeRejectedIdentifier, AcmeServerInternal, AcmeUnauthorized, AcmeUnsupportedIdentifier, AcmeUserActionRequired, AcmeProtocol, Retry.Retry]] : API.call(newOrder, i));
|
|
132
|
+
|
|
133
|
+
export const respondChallenge = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17],protocol:$18,retry:$19};$5(>2)@"RespondChallengeRequest";$4({url:$3.pipe($2())}).pipe($1({method:"POST",uri:"/challenge/{url}",code:200}))', [__0, __1, __2, __3, __4, __5, __d2, AcmeAccountDoesNotExist, AcmeBadNonce, AcmeCaa, AcmeConnection, AcmeDns, AcmeIncorrectResponse, AcmeMalformed, AcmeRateLimited, AcmeServerInternal, AcmeTls, AcmeUnauthorized, AcmeProtocol, Retry.Retry]] : API.call(respondChallenge, i));
|
|
134
|
+
|
|
135
|
+
export const revokeCertificate = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$7,$8,$9,$10,$11,$12,$13,$14],protocol:$15,retry:$16};$6(>3)@"RevokeCertificateRequest";$6(>4)@"RevokeCertificateResponse";$5({certificate:$2,reason:$4($3)}).pipe($1({method:"POST",uri:"/revokeCert",code:200}));$5({})', [__0, __1, __3, __8, __6, __4, __5, AcmeAccountDoesNotExist, AcmeAlreadyRevoked, AcmeBadNonce, AcmeBadRevocationReason, AcmeMalformed, AcmeRateLimited, AcmeServerInternal, AcmeUnauthorized, AcmeProtocol, Retry.Retry]] : API.call(revokeCertificate, i));
|
|
136
|
+
|
|
137
|
+
export const updateAccount = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#8:0,errors:[$9,$10,$11,$12,$13,$14,$15,$16],protocol:$17,retry:$18};$7(>2)@"UpdateAccountRequest";$6({url:$3.pipe($2()),contact:$5(#4:0),status:$5($3)}).pipe($1({method:"POST",uri:"/account/{url}",code:200}))', [__0, __1, __2, __3, __d3, __6, __4, __5, __d5, AcmeAccountDoesNotExist, AcmeBadNonce, AcmeInvalidContact, AcmeMalformed, AcmeRateLimited, AcmeServerInternal, AcmeUnauthorized, AcmeUnsupportedContact, AcmeProtocol, Retry.Retry]] : API.call(updateAccount, i));
|
|
138
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
139
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
// Shared schema data (see `op` in core/api).
|
|
143
|
+
function __d0() {
|
|
144
|
+
return ['$3(>4)@"Identifier";$3(>5)@"Subproblem";$5(#1);$3(>6)@"Problem";$2({type:$1,value:$1});$2({type:$4($1),detail:$4($1),identifier:$4(#0)});$2({type:$4($1),detail:$4($1),status:$4($6),instance:$4($1),identifier:$4(#0),subproblems:$4(#2)})', [__0, __3, __4, __5, __6, __7, __8]];
|
|
145
|
+
}
|
|
146
|
+
function __d1() {
|
|
147
|
+
return ['$2(#1:0);$8(>2)@"Authorization";$7({identifier:#3:0,status:$4,expires:$5($4),challenges:#0,wildcard:$5($6)})', [__0, __d2, __7, __d0, __3, __6, __9, __4, __5]];
|
|
148
|
+
}
|
|
149
|
+
function __d2() {
|
|
150
|
+
return ['$5(>1)@"Challenge";$4({type:$1,url:$1,status:$1,validated:$2($1),token:$2($1),error:$2(#3:3)})', [__0, __3, __6, __d0, __4, __5]];
|
|
151
|
+
}
|
|
152
|
+
function __d3() {
|
|
153
|
+
return ['$2($1)', [__0, __3, __7]];
|
|
154
|
+
}
|
|
155
|
+
function __d4() {
|
|
156
|
+
return ['$2(#1:0);$7(>2)@"OrderResponse";$6({status:$3,expires:$4($3),identifiers:#0,notBefore:$4($3),notAfter:$4($3),error:$4(#1:3),authorizations:#5:0,finalize:$3,certificate:$4($3),location:$4($3)})', [__0, __d0, __7, __3, __6, __d3, __4, __5]];
|
|
157
|
+
}
|
|
158
|
+
function __d5() {
|
|
159
|
+
return ['$6(>1)@"AccountResponse";$5({status:$1,contact:$3(#2:0),termsOfServiceAgreed:$3($4),orders:$3($1),location:$3($1)})', [__0, __3, __d3, __6, __9, __4, __5]];
|
|
160
|
+
}
|