@ontemper/sdk 0.4.7 → 0.4.9-pr-5300.1
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/README.md +9 -0
- package/dist/As2Resource.d.ts +34 -1
- package/dist/As2Resource.d.ts.map +1 -1
- package/dist/As2Resource.js +7 -1
- package/dist/As2Resource.js.map +1 -1
- package/dist/HttpApiResource.d.ts +294 -5
- package/dist/HttpApiResource.d.ts.map +1 -1
- package/dist/HttpApiResource.js +135 -15
- package/dist/HttpApiResource.js.map +1 -1
- package/dist/Manifest.d.ts +1 -1
- package/dist/Manifest.d.ts.map +1 -1
- package/dist/Manifest.js +1 -1
- package/dist/Manifest.js.map +1 -1
- package/dist/TransportResource.d.ts +33 -0
- package/dist/TransportResource.d.ts.map +1 -0
- package/dist/TransportResource.js +20 -0
- package/dist/TransportResource.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -123,6 +123,15 @@ const partners = yield * PartnerApis;
|
|
|
123
123
|
const { key, value } = yield * partners.select({ tenantKey }); // ResourceNotFoundError when no record matches
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
+
- `HttpApiResource` reads the `http_api` type at catalog revision 2. `auth` is one of `none`, `basic`,
|
|
127
|
+
`bearer`, `api_key`, `oauth2_client_credentials`, `oauth2_password`, `oauth2_jwt_bearer`, `oauth1_tba`,
|
|
128
|
+
or `aws_sigv4`. The two token-grant variants hold the client in `auth.tokenRequest`
|
|
129
|
+
(`OAuthTokenRequest`: `tokenUrl`, `clientId`, `clientAuthentication`, and `tokenRequestFormat`, `form`
|
|
130
|
+
by default). An auth `type` that a newer platform adds decodes as
|
|
131
|
+
`{ type: 'unsupported', variant, fields }`, with `fields` `Redacted`. A known type with a missing or
|
|
132
|
+
invalid field fails. The record can also carry `tls`, `proxy`, and `secondaryTenantKey`.
|
|
133
|
+
- Every `x-secret` field of a system type decodes to `Redacted`: for example `clientSecret`, `privateKey`,
|
|
134
|
+
`password`, `tenantKey`, and `tls.clientKey`.
|
|
126
135
|
- The SDK reads a declaration on its first `yield*` in a request and keeps the value for the rest of
|
|
127
136
|
that request. It caches each read for 30 s, so an edit reaches a running workflow without a redeploy.
|
|
128
137
|
- A read that the platform cannot answer is a defect. The SDK answers `500 {"message":"Internal server error"}`
|
package/dist/As2Resource.d.ts
CHANGED
|
@@ -72,9 +72,42 @@ export declare const As2PartnerResource: Schema.Struct<{
|
|
|
72
72
|
readonly encryptOutgoing: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
|
|
73
73
|
readonly requireSignedIncoming: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
|
|
74
74
|
readonly requireEncryptedIncoming: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
|
|
75
|
-
readonly
|
|
75
|
+
readonly compression: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["none", "zlib"]>, never>;
|
|
76
|
+
readonly receipt: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["none", "sync", "async"]>, never>;
|
|
77
|
+
readonly receiptSigningAlgorithm: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["sha-1", "sha-256", "sha-384", "sha-512"]>, never>;
|
|
76
78
|
readonly digestAlgorithm: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["sha-1", "sha-256", "sha-384", "sha-512"]>, never>;
|
|
77
79
|
readonly encryptionAlgorithm: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["3des", "aes128-cbc", "aes192-cbc", "aes256-cbc", "aes128-gcm", "aes256-gcm"]>, never>;
|
|
80
|
+
readonly httpAuth: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Struct<{
|
|
81
|
+
readonly type: Schema.Literal<"none">;
|
|
82
|
+
}>, Schema.Struct<{
|
|
83
|
+
readonly type: Schema.Literal<"basic">;
|
|
84
|
+
readonly username: Schema.String;
|
|
85
|
+
readonly password: Schema.RedactedFromValue<Schema.String>;
|
|
86
|
+
}>]>, never>;
|
|
87
|
+
readonly tls: Schema.optionalKey<Schema.Struct<{
|
|
88
|
+
readonly caCertificate: Schema.optionalKey<Schema.String>;
|
|
89
|
+
readonly clientCertificate: Schema.optionalKey<Schema.String>;
|
|
90
|
+
readonly clientKey: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
91
|
+
readonly clientKeyPassphrase: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
92
|
+
readonly serverName: Schema.optionalKey<Schema.String>;
|
|
93
|
+
}>>;
|
|
94
|
+
readonly proxy: Schema.optionalKey<Schema.Struct<{
|
|
95
|
+
readonly url: Schema.String;
|
|
96
|
+
readonly auth: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Struct<{
|
|
97
|
+
readonly type: Schema.Literal<"none">;
|
|
98
|
+
}>, Schema.Struct<{
|
|
99
|
+
readonly type: Schema.Literal<"basic">;
|
|
100
|
+
readonly username: Schema.String;
|
|
101
|
+
readonly password: Schema.RedactedFromValue<Schema.String>;
|
|
102
|
+
}>]>, never>;
|
|
103
|
+
readonly tls: Schema.optionalKey<Schema.Struct<{
|
|
104
|
+
readonly caCertificate: Schema.optionalKey<Schema.String>;
|
|
105
|
+
readonly clientCertificate: Schema.optionalKey<Schema.String>;
|
|
106
|
+
readonly clientKey: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
107
|
+
readonly clientKeyPassphrase: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
108
|
+
readonly serverName: Schema.optionalKey<Schema.String>;
|
|
109
|
+
}>>;
|
|
110
|
+
}>>;
|
|
78
111
|
}>;
|
|
79
112
|
export type As2PartnerResource = typeof As2PartnerResource.Type;
|
|
80
113
|
//# sourceMappingURL=As2Resource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"As2Resource.d.ts","sourceRoot":"","sources":["../src/As2Resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AA0BxC,gHAAgH;AAChH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;EAG9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAC;AAalE,oHAAoH;AACpH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"As2Resource.d.ts","sourceRoot":"","sources":["../src/As2Resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AA0BxC,gHAAgH;AAChH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;EAG9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAC;AAalE,oHAAoH;AACpH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyC7B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC,IAAI,CAAC"}
|
package/dist/As2Resource.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Effect, Schema } from 'effect';
|
|
2
|
+
import { TransportAuth, TransportProxy, TransportTls } from './TransportResource.js';
|
|
2
3
|
// An `x-secret` field: the value arrives `Redacted`, so logging the record never prints it; an empty key cannot sign.
|
|
3
4
|
const Secret = Schema.RedactedFromValue(Schema.String.check(Schema.isMinLength(1)));
|
|
4
5
|
const SwitchOn = Schema.Boolean.pipe(Schema.withDecodingDefaultKey(Effect.succeed(true)));
|
|
@@ -48,7 +49,9 @@ export const As2PartnerResource = Schema.Struct({
|
|
|
48
49
|
encryptOutgoing: SwitchOn,
|
|
49
50
|
requireSignedIncoming: SwitchOn,
|
|
50
51
|
requireEncryptedIncoming: SwitchOn,
|
|
51
|
-
|
|
52
|
+
compression: Schema.Literals(['none', 'zlib']).pipe(Schema.withDecodingDefaultKey(Effect.succeed('none'))),
|
|
53
|
+
receipt: Schema.Literals(['none', 'sync', 'async']).pipe(Schema.withDecodingDefaultKey(Effect.succeed('sync'))),
|
|
54
|
+
receiptSigningAlgorithm: Schema.Literals(['sha-1', 'sha-256', 'sha-384', 'sha-512']).pipe(Schema.withDecodingDefaultKey(Effect.succeed('sha-256'))),
|
|
52
55
|
digestAlgorithm: Schema.Literals(['sha-1', 'sha-256', 'sha-384', 'sha-512']).pipe(Schema.withDecodingDefaultKey(Effect.succeed('sha-256'))),
|
|
53
56
|
encryptionAlgorithm: Schema.Literals([
|
|
54
57
|
'3des',
|
|
@@ -58,5 +61,8 @@ export const As2PartnerResource = Schema.Struct({
|
|
|
58
61
|
'aes128-gcm',
|
|
59
62
|
'aes256-gcm',
|
|
60
63
|
]).pipe(Schema.withDecodingDefaultKey(Effect.succeed('aes256-cbc'))),
|
|
64
|
+
httpAuth: TransportAuth,
|
|
65
|
+
tls: Schema.optionalKey(TransportTls),
|
|
66
|
+
proxy: Schema.optionalKey(TransportProxy),
|
|
61
67
|
});
|
|
62
68
|
//# sourceMappingURL=As2Resource.js.map
|
package/dist/As2Resource.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"As2Resource.js","sourceRoot":"","sources":["../src/As2Resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"As2Resource.js","sourceRoot":"","sources":["../src/As2Resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErF,sHAAsH;AACtH,MAAM,MAAM,GAAG,MAAM,CAAC,iBAAiB,C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,CAAC,CAAC,IAAI,CAC/E,MAAM,CAAC,sBAAsB,CAAC,MAAM,CAAC,OAAO,CAAC,SAAkB,CAAC,CAAC,CAClE;IACD,mBAAmB,EAAE,MAAM,CAAC,QAAQ,CAAC;QACnC,MAAM;QACN,YAAY;QACZ,YAAY;QACZ,YAAY;QACZ,YAAY;QACZ,YAAY;KACb,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,MAAM,CAAC,OAAO,CAAC,YAAqB,CAAC,CAAC,CAAC;IAC7E,QAAQ,EAAE,aAAa;IACvB,GAAG,EAAE,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC;CAC1C,CAAC,CAAC"}
|
|
@@ -1,4 +1,181 @@
|
|
|
1
1
|
import { Schema } from 'effect';
|
|
2
|
+
/** TLS trust and client-certificate material; certificate fields are PEM, and nothing disables verification. */
|
|
3
|
+
export declare const TlsSettings: Schema.Struct<{
|
|
4
|
+
readonly caCertificate: Schema.optionalKey<Schema.String>;
|
|
5
|
+
readonly clientCertificate: Schema.optionalKey<Schema.String>;
|
|
6
|
+
readonly clientKey: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
7
|
+
readonly clientKeyPassphrase: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
8
|
+
readonly serverName: Schema.optionalKey<Schema.String>;
|
|
9
|
+
}>;
|
|
10
|
+
export type TlsSettings = typeof TlsSettings.Type;
|
|
11
|
+
/** An outbound HTTP CONNECT proxy: URL, optional Basic credentials, and optional TLS to the proxy. */
|
|
12
|
+
export declare const HttpProxy: Schema.Struct<{
|
|
13
|
+
readonly url: Schema.String;
|
|
14
|
+
readonly auth: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Struct<{
|
|
15
|
+
readonly type: Schema.Literal<"none">;
|
|
16
|
+
}>, Schema.Struct<{
|
|
17
|
+
readonly type: Schema.Literal<"basic">;
|
|
18
|
+
readonly username: Schema.String;
|
|
19
|
+
readonly password: Schema.RedactedFromValue<Schema.String>;
|
|
20
|
+
}>]>, never>;
|
|
21
|
+
readonly tls: Schema.optionalKey<Schema.Struct<{
|
|
22
|
+
readonly caCertificate: Schema.optionalKey<Schema.String>;
|
|
23
|
+
readonly clientCertificate: Schema.optionalKey<Schema.String>;
|
|
24
|
+
readonly clientKey: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
25
|
+
readonly clientKeyPassphrase: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
26
|
+
readonly serverName: Schema.optionalKey<Schema.String>;
|
|
27
|
+
}>>;
|
|
28
|
+
}>;
|
|
29
|
+
export type HttpProxy = typeof HttpProxy.Type;
|
|
30
|
+
/** An OAuth 2.0 token request: endpoint, client, and how the client authenticates. */
|
|
31
|
+
export declare const OAuthTokenRequest: Schema.Struct<{
|
|
32
|
+
readonly tokenUrl: Schema.String;
|
|
33
|
+
readonly clientId: Schema.String;
|
|
34
|
+
readonly clientAuthentication: Schema.Union<readonly [Schema.Struct<{
|
|
35
|
+
readonly type: Schema.Literal<"none">;
|
|
36
|
+
}>, Schema.Struct<{
|
|
37
|
+
readonly type: Schema.Literal<"basic">;
|
|
38
|
+
readonly clientSecret: Schema.RedactedFromValue<Schema.String>;
|
|
39
|
+
}>, Schema.Struct<{
|
|
40
|
+
readonly type: Schema.Literal<"body">;
|
|
41
|
+
readonly clientSecret: Schema.RedactedFromValue<Schema.String>;
|
|
42
|
+
}>, Schema.Struct<{
|
|
43
|
+
readonly type: Schema.Literal<"query">;
|
|
44
|
+
readonly clientSecret: Schema.RedactedFromValue<Schema.String>;
|
|
45
|
+
}>, Schema.Struct<{
|
|
46
|
+
readonly type: Schema.Literal<"private_key_jwt">;
|
|
47
|
+
readonly privateKey: Schema.RedactedFromValue<Schema.String>;
|
|
48
|
+
readonly keyId: Schema.optionalKey<Schema.String>;
|
|
49
|
+
readonly algorithm: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["RS256", "PS256", "ES256"]>, never>;
|
|
50
|
+
}>]>;
|
|
51
|
+
readonly scope: Schema.optionalKey<Schema.String>;
|
|
52
|
+
readonly audience: Schema.optionalKey<Schema.String>;
|
|
53
|
+
readonly extraParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
54
|
+
readonly tokenRequestFormat: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["form", "json"]>, never>;
|
|
55
|
+
}>;
|
|
56
|
+
export type OAuthTokenRequest = typeof OAuthTokenRequest.Type;
|
|
57
|
+
/**
|
|
58
|
+
* An `auth` variant a newer platform added, unvalidated: `variant` holds its `type`, and `fields` the auth object
|
|
59
|
+
* as it arrived, `type` included. `fields` is `Redacted` because the SDK cannot tell which of its fields are secret.
|
|
60
|
+
*/
|
|
61
|
+
export declare const HttpApiUnsupportedAuth: Schema.Struct<{
|
|
62
|
+
readonly type: Schema.Literal<"unsupported">;
|
|
63
|
+
readonly variant: Schema.String;
|
|
64
|
+
readonly fields: Schema.Redacted<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
65
|
+
}>;
|
|
66
|
+
export type HttpApiUnsupportedAuth = typeof HttpApiUnsupportedAuth.Type;
|
|
67
|
+
/** The `auth` of an `http_api` record: one known variant, or `unsupported` for a variant a newer platform added. */
|
|
68
|
+
export declare const HttpApiAuth: Schema.Union<readonly [Schema.Struct<{
|
|
69
|
+
readonly type: Schema.Literal<"none">;
|
|
70
|
+
}>, Schema.Struct<{
|
|
71
|
+
readonly type: Schema.Literal<"basic">;
|
|
72
|
+
readonly username: Schema.String;
|
|
73
|
+
readonly password: Schema.RedactedFromValue<Schema.String>;
|
|
74
|
+
}>, Schema.Struct<{
|
|
75
|
+
readonly type: Schema.Literal<"bearer">;
|
|
76
|
+
readonly token: Schema.RedactedFromValue<Schema.String>;
|
|
77
|
+
}>, Schema.Struct<{
|
|
78
|
+
readonly type: Schema.Literal<"api_key">;
|
|
79
|
+
readonly apiKey: Schema.RedactedFromValue<Schema.String>;
|
|
80
|
+
readonly placement: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["authorization_bearer", "header", "query"]>, never>;
|
|
81
|
+
readonly name: Schema.withDecodingDefaultKey<Schema.String, never>;
|
|
82
|
+
}>, Schema.Struct<{
|
|
83
|
+
readonly type: Schema.Literal<"oauth2_client_credentials">;
|
|
84
|
+
readonly tokenRequest: Schema.Struct<{
|
|
85
|
+
readonly tokenUrl: Schema.String;
|
|
86
|
+
readonly clientId: Schema.String;
|
|
87
|
+
readonly clientAuthentication: Schema.Union<readonly [Schema.Struct<{
|
|
88
|
+
readonly type: Schema.Literal<"none">;
|
|
89
|
+
}>, Schema.Struct<{
|
|
90
|
+
readonly type: Schema.Literal<"basic">;
|
|
91
|
+
readonly clientSecret: Schema.RedactedFromValue<Schema.String>;
|
|
92
|
+
}>, Schema.Struct<{
|
|
93
|
+
readonly type: Schema.Literal<"body">;
|
|
94
|
+
readonly clientSecret: Schema.RedactedFromValue<Schema.String>;
|
|
95
|
+
}>, Schema.Struct<{
|
|
96
|
+
readonly type: Schema.Literal<"query">;
|
|
97
|
+
readonly clientSecret: Schema.RedactedFromValue<Schema.String>;
|
|
98
|
+
}>, Schema.Struct<{
|
|
99
|
+
readonly type: Schema.Literal<"private_key_jwt">;
|
|
100
|
+
readonly privateKey: Schema.RedactedFromValue<Schema.String>;
|
|
101
|
+
readonly keyId: Schema.optionalKey<Schema.String>;
|
|
102
|
+
readonly algorithm: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["RS256", "PS256", "ES256"]>, never>;
|
|
103
|
+
}>]>;
|
|
104
|
+
readonly scope: Schema.optionalKey<Schema.String>;
|
|
105
|
+
readonly audience: Schema.optionalKey<Schema.String>;
|
|
106
|
+
readonly extraParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
107
|
+
readonly tokenRequestFormat: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["form", "json"]>, never>;
|
|
108
|
+
}>;
|
|
109
|
+
}>, Schema.Struct<{
|
|
110
|
+
readonly type: Schema.Literal<"oauth2_password">;
|
|
111
|
+
readonly tokenRequest: Schema.Struct<{
|
|
112
|
+
readonly tokenUrl: Schema.String;
|
|
113
|
+
readonly clientId: Schema.String;
|
|
114
|
+
readonly clientAuthentication: Schema.Union<readonly [Schema.Struct<{
|
|
115
|
+
readonly type: Schema.Literal<"none">;
|
|
116
|
+
}>, Schema.Struct<{
|
|
117
|
+
readonly type: Schema.Literal<"basic">;
|
|
118
|
+
readonly clientSecret: Schema.RedactedFromValue<Schema.String>;
|
|
119
|
+
}>, Schema.Struct<{
|
|
120
|
+
readonly type: Schema.Literal<"body">;
|
|
121
|
+
readonly clientSecret: Schema.RedactedFromValue<Schema.String>;
|
|
122
|
+
}>, Schema.Struct<{
|
|
123
|
+
readonly type: Schema.Literal<"query">;
|
|
124
|
+
readonly clientSecret: Schema.RedactedFromValue<Schema.String>;
|
|
125
|
+
}>, Schema.Struct<{
|
|
126
|
+
readonly type: Schema.Literal<"private_key_jwt">;
|
|
127
|
+
readonly privateKey: Schema.RedactedFromValue<Schema.String>;
|
|
128
|
+
readonly keyId: Schema.optionalKey<Schema.String>;
|
|
129
|
+
readonly algorithm: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["RS256", "PS256", "ES256"]>, never>;
|
|
130
|
+
}>]>;
|
|
131
|
+
readonly scope: Schema.optionalKey<Schema.String>;
|
|
132
|
+
readonly audience: Schema.optionalKey<Schema.String>;
|
|
133
|
+
readonly extraParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
134
|
+
readonly tokenRequestFormat: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["form", "json"]>, never>;
|
|
135
|
+
}>;
|
|
136
|
+
readonly username: Schema.String;
|
|
137
|
+
readonly password: Schema.RedactedFromValue<Schema.String>;
|
|
138
|
+
}>, Schema.Struct<{
|
|
139
|
+
readonly type: Schema.Literal<"oauth2_jwt_bearer">;
|
|
140
|
+
readonly tokenUrl: Schema.String;
|
|
141
|
+
readonly issuer: Schema.String;
|
|
142
|
+
readonly subject: Schema.String;
|
|
143
|
+
readonly audience: Schema.String;
|
|
144
|
+
readonly privateKey: Schema.RedactedFromValue<Schema.String>;
|
|
145
|
+
readonly keyId: Schema.optionalKey<Schema.String>;
|
|
146
|
+
readonly algorithm: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["RS256", "PS256", "ES256"]>, never>;
|
|
147
|
+
readonly scope: Schema.optionalKey<Schema.String>;
|
|
148
|
+
}>, Schema.Struct<{
|
|
149
|
+
readonly type: Schema.Literal<"oauth1_tba">;
|
|
150
|
+
readonly realm: Schema.String;
|
|
151
|
+
readonly consumerKey: Schema.String;
|
|
152
|
+
readonly consumerSecret: Schema.RedactedFromValue<Schema.String>;
|
|
153
|
+
readonly tokenId: Schema.String;
|
|
154
|
+
readonly tokenSecret: Schema.RedactedFromValue<Schema.String>;
|
|
155
|
+
}>, Schema.Struct<{
|
|
156
|
+
readonly type: Schema.Literal<"aws_sigv4">;
|
|
157
|
+
readonly region: Schema.String;
|
|
158
|
+
readonly service: Schema.String;
|
|
159
|
+
readonly awsAuth: Schema.Union<readonly [Schema.Struct<{
|
|
160
|
+
readonly type: Schema.Literal<"access_key">;
|
|
161
|
+
readonly accessKeyId: Schema.String;
|
|
162
|
+
readonly secretAccessKey: Schema.RedactedFromValue<Schema.String>;
|
|
163
|
+
readonly sessionToken: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
164
|
+
}>, Schema.Struct<{
|
|
165
|
+
readonly type: Schema.Literal<"assume_role">;
|
|
166
|
+
readonly roleArn: Schema.String;
|
|
167
|
+
readonly externalId: Schema.optionalKey<Schema.String>;
|
|
168
|
+
}>, Schema.Struct<{
|
|
169
|
+
readonly type: Schema.Literal<"ambient">;
|
|
170
|
+
}>]>;
|
|
171
|
+
}>, Schema.decodeTo<Schema.Struct<{
|
|
172
|
+
readonly type: Schema.Literal<"unsupported">;
|
|
173
|
+
readonly variant: Schema.String;
|
|
174
|
+
readonly fields: Schema.Redacted<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
175
|
+
}>, Schema.StructWithRest<Schema.Struct<{
|
|
176
|
+
readonly type: Schema.String;
|
|
177
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, never, never>]>;
|
|
178
|
+
export type HttpApiAuth = typeof HttpApiAuth.Type;
|
|
2
179
|
/** The resolved value of the `http_api` system type, with the defaults its schema declares. */
|
|
3
180
|
export declare const HttpApiResource: Schema.Struct<{
|
|
4
181
|
readonly baseUrl: Schema.String;
|
|
@@ -19,14 +196,126 @@ export declare const HttpApiResource: Schema.Struct<{
|
|
|
19
196
|
readonly name: Schema.withDecodingDefaultKey<Schema.String, never>;
|
|
20
197
|
}>, Schema.Struct<{
|
|
21
198
|
readonly type: Schema.Literal<"oauth2_client_credentials">;
|
|
199
|
+
readonly tokenRequest: Schema.Struct<{
|
|
200
|
+
readonly tokenUrl: Schema.String;
|
|
201
|
+
readonly clientId: Schema.String;
|
|
202
|
+
readonly clientAuthentication: Schema.Union<readonly [Schema.Struct<{
|
|
203
|
+
readonly type: Schema.Literal<"none">;
|
|
204
|
+
}>, Schema.Struct<{
|
|
205
|
+
readonly type: Schema.Literal<"basic">;
|
|
206
|
+
readonly clientSecret: Schema.RedactedFromValue<Schema.String>;
|
|
207
|
+
}>, Schema.Struct<{
|
|
208
|
+
readonly type: Schema.Literal<"body">;
|
|
209
|
+
readonly clientSecret: Schema.RedactedFromValue<Schema.String>;
|
|
210
|
+
}>, Schema.Struct<{
|
|
211
|
+
readonly type: Schema.Literal<"query">;
|
|
212
|
+
readonly clientSecret: Schema.RedactedFromValue<Schema.String>;
|
|
213
|
+
}>, Schema.Struct<{
|
|
214
|
+
readonly type: Schema.Literal<"private_key_jwt">;
|
|
215
|
+
readonly privateKey: Schema.RedactedFromValue<Schema.String>;
|
|
216
|
+
readonly keyId: Schema.optionalKey<Schema.String>;
|
|
217
|
+
readonly algorithm: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["RS256", "PS256", "ES256"]>, never>;
|
|
218
|
+
}>]>;
|
|
219
|
+
readonly scope: Schema.optionalKey<Schema.String>;
|
|
220
|
+
readonly audience: Schema.optionalKey<Schema.String>;
|
|
221
|
+
readonly extraParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
222
|
+
readonly tokenRequestFormat: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["form", "json"]>, never>;
|
|
223
|
+
}>;
|
|
224
|
+
}>, Schema.Struct<{
|
|
225
|
+
readonly type: Schema.Literal<"oauth2_password">;
|
|
226
|
+
readonly tokenRequest: Schema.Struct<{
|
|
227
|
+
readonly tokenUrl: Schema.String;
|
|
228
|
+
readonly clientId: Schema.String;
|
|
229
|
+
readonly clientAuthentication: Schema.Union<readonly [Schema.Struct<{
|
|
230
|
+
readonly type: Schema.Literal<"none">;
|
|
231
|
+
}>, Schema.Struct<{
|
|
232
|
+
readonly type: Schema.Literal<"basic">;
|
|
233
|
+
readonly clientSecret: Schema.RedactedFromValue<Schema.String>;
|
|
234
|
+
}>, Schema.Struct<{
|
|
235
|
+
readonly type: Schema.Literal<"body">;
|
|
236
|
+
readonly clientSecret: Schema.RedactedFromValue<Schema.String>;
|
|
237
|
+
}>, Schema.Struct<{
|
|
238
|
+
readonly type: Schema.Literal<"query">;
|
|
239
|
+
readonly clientSecret: Schema.RedactedFromValue<Schema.String>;
|
|
240
|
+
}>, Schema.Struct<{
|
|
241
|
+
readonly type: Schema.Literal<"private_key_jwt">;
|
|
242
|
+
readonly privateKey: Schema.RedactedFromValue<Schema.String>;
|
|
243
|
+
readonly keyId: Schema.optionalKey<Schema.String>;
|
|
244
|
+
readonly algorithm: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["RS256", "PS256", "ES256"]>, never>;
|
|
245
|
+
}>]>;
|
|
246
|
+
readonly scope: Schema.optionalKey<Schema.String>;
|
|
247
|
+
readonly audience: Schema.optionalKey<Schema.String>;
|
|
248
|
+
readonly extraParams: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
249
|
+
readonly tokenRequestFormat: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["form", "json"]>, never>;
|
|
250
|
+
}>;
|
|
251
|
+
readonly username: Schema.String;
|
|
252
|
+
readonly password: Schema.RedactedFromValue<Schema.String>;
|
|
253
|
+
}>, Schema.Struct<{
|
|
254
|
+
readonly type: Schema.Literal<"oauth2_jwt_bearer">;
|
|
22
255
|
readonly tokenUrl: Schema.String;
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
256
|
+
readonly issuer: Schema.String;
|
|
257
|
+
readonly subject: Schema.String;
|
|
258
|
+
readonly audience: Schema.String;
|
|
259
|
+
readonly privateKey: Schema.RedactedFromValue<Schema.String>;
|
|
260
|
+
readonly keyId: Schema.optionalKey<Schema.String>;
|
|
261
|
+
readonly algorithm: Schema.withDecodingDefaultKey<Schema.Literals<readonly ["RS256", "PS256", "ES256"]>, never>;
|
|
25
262
|
readonly scope: Schema.optionalKey<Schema.String>;
|
|
26
|
-
|
|
27
|
-
readonly
|
|
28
|
-
|
|
263
|
+
}>, Schema.Struct<{
|
|
264
|
+
readonly type: Schema.Literal<"oauth1_tba">;
|
|
265
|
+
readonly realm: Schema.String;
|
|
266
|
+
readonly consumerKey: Schema.String;
|
|
267
|
+
readonly consumerSecret: Schema.RedactedFromValue<Schema.String>;
|
|
268
|
+
readonly tokenId: Schema.String;
|
|
269
|
+
readonly tokenSecret: Schema.RedactedFromValue<Schema.String>;
|
|
270
|
+
}>, Schema.Struct<{
|
|
271
|
+
readonly type: Schema.Literal<"aws_sigv4">;
|
|
272
|
+
readonly region: Schema.String;
|
|
273
|
+
readonly service: Schema.String;
|
|
274
|
+
readonly awsAuth: Schema.Union<readonly [Schema.Struct<{
|
|
275
|
+
readonly type: Schema.Literal<"access_key">;
|
|
276
|
+
readonly accessKeyId: Schema.String;
|
|
277
|
+
readonly secretAccessKey: Schema.RedactedFromValue<Schema.String>;
|
|
278
|
+
readonly sessionToken: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
279
|
+
}>, Schema.Struct<{
|
|
280
|
+
readonly type: Schema.Literal<"assume_role">;
|
|
281
|
+
readonly roleArn: Schema.String;
|
|
282
|
+
readonly externalId: Schema.optionalKey<Schema.String>;
|
|
283
|
+
}>, Schema.Struct<{
|
|
284
|
+
readonly type: Schema.Literal<"ambient">;
|
|
285
|
+
}>]>;
|
|
286
|
+
}>, Schema.decodeTo<Schema.Struct<{
|
|
287
|
+
readonly type: Schema.Literal<"unsupported">;
|
|
288
|
+
readonly variant: Schema.String;
|
|
289
|
+
readonly fields: Schema.Redacted<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
290
|
+
}>, Schema.StructWithRest<Schema.Struct<{
|
|
291
|
+
readonly type: Schema.String;
|
|
292
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, never, never>]>, never>;
|
|
293
|
+
readonly tls: Schema.optionalKey<Schema.Struct<{
|
|
294
|
+
readonly caCertificate: Schema.optionalKey<Schema.String>;
|
|
295
|
+
readonly clientCertificate: Schema.optionalKey<Schema.String>;
|
|
296
|
+
readonly clientKey: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
297
|
+
readonly clientKeyPassphrase: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
298
|
+
readonly serverName: Schema.optionalKey<Schema.String>;
|
|
299
|
+
}>>;
|
|
300
|
+
readonly proxy: Schema.optionalKey<Schema.Struct<{
|
|
301
|
+
readonly url: Schema.String;
|
|
302
|
+
readonly auth: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Struct<{
|
|
303
|
+
readonly type: Schema.Literal<"none">;
|
|
304
|
+
}>, Schema.Struct<{
|
|
305
|
+
readonly type: Schema.Literal<"basic">;
|
|
306
|
+
readonly username: Schema.String;
|
|
307
|
+
readonly password: Schema.RedactedFromValue<Schema.String>;
|
|
308
|
+
}>]>, never>;
|
|
309
|
+
readonly tls: Schema.optionalKey<Schema.Struct<{
|
|
310
|
+
readonly caCertificate: Schema.optionalKey<Schema.String>;
|
|
311
|
+
readonly clientCertificate: Schema.optionalKey<Schema.String>;
|
|
312
|
+
readonly clientKey: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
313
|
+
readonly clientKeyPassphrase: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
314
|
+
readonly serverName: Schema.optionalKey<Schema.String>;
|
|
315
|
+
}>>;
|
|
316
|
+
}>>;
|
|
29
317
|
readonly tenantKey: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
318
|
+
readonly secondaryTenantKey: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
30
319
|
}>;
|
|
31
320
|
export type HttpApiResource = typeof HttpApiResource.Type;
|
|
32
321
|
//# sourceMappingURL=HttpApiResource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpApiResource.d.ts","sourceRoot":"","sources":["../src/HttpApiResource.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"HttpApiResource.d.ts","sourceRoot":"","sources":["../src/HttpApiResource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,MAAM,EAAwB,MAAM,QAAQ,CAAC;AAsBxE,gHAAgH;AAChH,eAAO,MAAM,WAAW;;;;;;EAmBvB,CAAC;AACF,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAC;AAElD,sGAAsG;AACtG,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;EAOpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAC;AAoC9C,sFAAsF;AACtF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;EAU5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAC;AA6C9D;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;EAIjC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC,IAAI,CAAC;AA0BxE,oHAAoH;AACpH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oHAA4C,CAAC;AACrE,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAC;AAElD,+FAA+F;AAC/F,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,IAAI,CAAC"}
|
package/dist/HttpApiResource.js
CHANGED
|
@@ -1,35 +1,155 @@
|
|
|
1
|
-
import { Effect, Schema } from 'effect';
|
|
1
|
+
import { Effect, Redacted, Schema, SchemaTransformation } from 'effect';
|
|
2
|
+
// The `http_api` system type at catalog revision 2 (T-4256), as `@ontemper/resources` reads it (`records.ts`).
|
|
2
3
|
/** An `x-secret` field: the value arrives `Redacted`, so logging the record never prints it. */
|
|
3
4
|
const Secret = Schema.RedactedFromValue(Schema.String);
|
|
4
|
-
|
|
5
|
+
// A catalog `nonEmptySecret`: an empty credential cannot sign or authenticate, so it fails at decode.
|
|
6
|
+
const NonEmptySecret = Schema.RedactedFromValue(Schema.String.check(Schema.isMinLength(1)));
|
|
7
|
+
const NonEmptyString = Schema.String.check(Schema.isMinLength(1));
|
|
8
|
+
// Clients log request URLs verbatim, so userinfo in the authority would log a reusable credential.
|
|
9
|
+
const AbsoluteHttpUrl = Schema.String.check(
|
|
10
|
+
// Carried into the manifest's JSON Schema, so deploy rejects a non-http URL before a run does.
|
|
11
|
+
Schema.isPattern(/^https?:\/\//i), Schema.makeFilter((url) => {
|
|
12
|
+
if (!URL.canParse(url))
|
|
13
|
+
return 'Expected an absolute http(s) URL';
|
|
14
|
+
const parsed = new URL(url);
|
|
15
|
+
if (!['http:', 'https:'].includes(parsed.protocol))
|
|
16
|
+
return 'Expected an absolute http(s) URL';
|
|
17
|
+
return (!parsed.username && !parsed.password) || 'Expected a URL without embedded credentials';
|
|
18
|
+
}));
|
|
19
|
+
/** TLS trust and client-certificate material; certificate fields are PEM, and nothing disables verification. */
|
|
20
|
+
export const TlsSettings = Schema.Struct({
|
|
21
|
+
caCertificate: Schema.optionalKey(Schema.String),
|
|
22
|
+
clientCertificate: Schema.optionalKey(Schema.String),
|
|
23
|
+
clientKey: Schema.optionalKey(Secret),
|
|
24
|
+
clientKeyPassphrase: Schema.optionalKey(Secret),
|
|
25
|
+
serverName: Schema.optionalKey(Schema.String),
|
|
26
|
+
}).check(
|
|
27
|
+
// tls.connect needs both halves for client authentication; one half fails the handshake on every connect.
|
|
28
|
+
Schema.makeFilter(({ clientCertificate, clientKey }) => (clientCertificate === undefined) === (clientKey === undefined) ||
|
|
29
|
+
'Expected clientCertificate and clientKey together or neither'), Schema.makeFilter(({ clientKey, clientKeyPassphrase }) => clientKeyPassphrase === undefined ||
|
|
30
|
+
clientKey !== undefined ||
|
|
31
|
+
'Expected clientKeyPassphrase only with clientKey'));
|
|
32
|
+
/** An outbound HTTP CONNECT proxy: URL, optional Basic credentials, and optional TLS to the proxy. */
|
|
33
|
+
export const HttpProxy = Schema.Struct({
|
|
34
|
+
url: AbsoluteHttpUrl,
|
|
35
|
+
auth: Schema.Union([
|
|
36
|
+
Schema.Struct({ type: Schema.Literal('none') }),
|
|
37
|
+
Schema.Struct({ type: Schema.Literal('basic'), username: Schema.String, password: Secret }),
|
|
38
|
+
]).pipe(Schema.withDecodingDefaultKey(Effect.succeed({ type: 'none' }))),
|
|
39
|
+
tls: Schema.optionalKey(TlsSettings),
|
|
40
|
+
});
|
|
41
|
+
// Closed: the type decides which identity signs, and a guess could fall back to the runtime's own identity.
|
|
42
|
+
const AwsAuth = Schema.Union([
|
|
43
|
+
Schema.Struct({
|
|
44
|
+
type: Schema.Literal('access_key'),
|
|
45
|
+
accessKeyId: NonEmptyString,
|
|
46
|
+
secretAccessKey: NonEmptySecret,
|
|
47
|
+
sessionToken: Schema.optionalKey(NonEmptySecret),
|
|
48
|
+
}),
|
|
49
|
+
Schema.Struct({
|
|
50
|
+
type: Schema.Literal('assume_role'),
|
|
51
|
+
roleArn: NonEmptyString,
|
|
52
|
+
externalId: Schema.optionalKey(Schema.String),
|
|
53
|
+
}),
|
|
54
|
+
Schema.Struct({ type: Schema.Literal('ambient') }),
|
|
55
|
+
]);
|
|
56
|
+
const JwtAlgorithm = Schema.Literals(['RS256', 'PS256', 'ES256']).pipe(Schema.withDecodingDefaultKey(Effect.succeed('RS256')));
|
|
57
|
+
// Closed: the type decides where the client secret travels.
|
|
58
|
+
const OAuthClientAuthentication = Schema.Union([
|
|
59
|
+
Schema.Struct({ type: Schema.Literal('none') }),
|
|
60
|
+
Schema.Struct({ type: Schema.Literal('basic'), clientSecret: NonEmptySecret }),
|
|
61
|
+
Schema.Struct({ type: Schema.Literal('body'), clientSecret: NonEmptySecret }),
|
|
62
|
+
Schema.Struct({ type: Schema.Literal('query'), clientSecret: NonEmptySecret }),
|
|
63
|
+
Schema.Struct({
|
|
64
|
+
type: Schema.Literal('private_key_jwt'),
|
|
65
|
+
privateKey: NonEmptySecret,
|
|
66
|
+
keyId: Schema.optionalKey(Schema.String),
|
|
67
|
+
algorithm: JwtAlgorithm,
|
|
68
|
+
}),
|
|
69
|
+
]);
|
|
70
|
+
/** An OAuth 2.0 token request: endpoint, client, and how the client authenticates. */
|
|
71
|
+
export const OAuthTokenRequest = Schema.Struct({
|
|
72
|
+
tokenUrl: AbsoluteHttpUrl,
|
|
73
|
+
clientId: Schema.String,
|
|
74
|
+
clientAuthentication: OAuthClientAuthentication,
|
|
75
|
+
scope: Schema.optionalKey(Schema.String),
|
|
76
|
+
audience: Schema.optionalKey(Schema.String),
|
|
77
|
+
extraParams: Schema.optionalKey(Schema.Record(Schema.String, Schema.String)),
|
|
78
|
+
tokenRequestFormat: Schema.Literals(['form', 'json']).pipe(Schema.withDecodingDefaultKey(Effect.succeed('form'))),
|
|
79
|
+
});
|
|
80
|
+
const knownAuth = [
|
|
5
81
|
Schema.Struct({ type: Schema.Literal('none') }),
|
|
6
82
|
Schema.Struct({ type: Schema.Literal('basic'), username: Schema.String, password: Secret }),
|
|
7
83
|
Schema.Struct({ type: Schema.Literal('bearer'), token: Secret }),
|
|
8
84
|
Schema.Struct({
|
|
9
85
|
type: Schema.Literal('api_key'),
|
|
10
86
|
apiKey: Secret,
|
|
87
|
+
// Closed: the placement decides where the key travels.
|
|
11
88
|
placement: Schema.Literals(['authorization_bearer', 'header', 'query']).pipe(Schema.withDecodingDefaultKey(Effect.succeed('header'))),
|
|
12
|
-
name:
|
|
89
|
+
name: NonEmptyString.pipe(Schema.withDecodingDefaultKey(Effect.succeed('x-api-key'))),
|
|
13
90
|
}),
|
|
91
|
+
Schema.Struct({ type: Schema.Literal('oauth2_client_credentials'), tokenRequest: OAuthTokenRequest }),
|
|
14
92
|
Schema.Struct({
|
|
15
|
-
type: Schema.Literal('
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
93
|
+
type: Schema.Literal('oauth2_password'),
|
|
94
|
+
tokenRequest: OAuthTokenRequest,
|
|
95
|
+
username: Schema.String,
|
|
96
|
+
password: Secret,
|
|
97
|
+
}),
|
|
98
|
+
Schema.Struct({
|
|
99
|
+
type: Schema.Literal('oauth2_jwt_bearer'),
|
|
100
|
+
tokenUrl: AbsoluteHttpUrl,
|
|
101
|
+
issuer: Schema.String,
|
|
102
|
+
subject: Schema.String,
|
|
103
|
+
audience: Schema.String,
|
|
104
|
+
privateKey: NonEmptySecret,
|
|
105
|
+
keyId: Schema.optionalKey(Schema.String),
|
|
106
|
+
algorithm: JwtAlgorithm,
|
|
19
107
|
scope: Schema.optionalKey(Schema.String),
|
|
20
|
-
audience: Schema.optionalKey(Schema.String),
|
|
21
|
-
extraParams: Schema.optionalKey(Schema.Record(Schema.String, Schema.String)),
|
|
22
108
|
}),
|
|
23
|
-
|
|
109
|
+
Schema.Struct({
|
|
110
|
+
type: Schema.Literal('oauth1_tba'),
|
|
111
|
+
realm: Schema.String,
|
|
112
|
+
consumerKey: Schema.String,
|
|
113
|
+
consumerSecret: NonEmptySecret,
|
|
114
|
+
tokenId: Schema.String,
|
|
115
|
+
tokenSecret: NonEmptySecret,
|
|
116
|
+
}),
|
|
117
|
+
Schema.Struct({ type: Schema.Literal('aws_sigv4'), region: Schema.String, service: Schema.String, awsAuth: AwsAuth }),
|
|
118
|
+
];
|
|
119
|
+
const knownAuthTypes = new Set(knownAuth.map((member) => member.fields.type.literal));
|
|
120
|
+
/**
|
|
121
|
+
* An `auth` variant a newer platform added, unvalidated: `variant` holds its `type`, and `fields` the auth object
|
|
122
|
+
* as it arrived, `type` included. `fields` is `Redacted` because the SDK cannot tell which of its fields are secret.
|
|
123
|
+
*/
|
|
124
|
+
export const HttpApiUnsupportedAuth = Schema.Struct({
|
|
125
|
+
type: Schema.Literal('unsupported'),
|
|
126
|
+
variant: Schema.String,
|
|
127
|
+
fields: Schema.Redacted(Schema.JsonObject),
|
|
128
|
+
});
|
|
129
|
+
// Only an unrecognized `type` passes here, so a known variant with a broken field fails decode and deploy.
|
|
130
|
+
const UnknownAuth = Schema.StructWithRest(Schema.Struct({
|
|
131
|
+
type: Schema.String.check(Schema.makeFilter((type) => !knownAuthTypes.has(type) || 'Expected the fields of a known auth type', {
|
|
132
|
+
toJsonSchema: () => ({ not: { enum: [...knownAuthTypes] } }),
|
|
133
|
+
})),
|
|
134
|
+
}), [Schema.Record(Schema.String, Schema.Json)]).pipe(Schema.decodeTo(HttpApiUnsupportedAuth, SchemaTransformation.transform({
|
|
135
|
+
decode: (auth) => ({
|
|
136
|
+
type: 'unsupported',
|
|
137
|
+
variant: auth.type,
|
|
138
|
+
fields: Redacted.make(auth),
|
|
139
|
+
}),
|
|
140
|
+
encode: ({ variant, fields }) => ({ ...Redacted.value(fields), type: variant }),
|
|
141
|
+
})));
|
|
142
|
+
/** The `auth` of an `http_api` record: one known variant, or `unsupported` for a variant a newer platform added. */
|
|
143
|
+
export const HttpApiAuth = Schema.Union([...knownAuth, UnknownAuth]);
|
|
24
144
|
/** The resolved value of the `http_api` system type, with the defaults its schema declares. */
|
|
25
145
|
export const HttpApiResource = Schema.Struct({
|
|
26
|
-
// Requests join paths onto `baseUrl
|
|
27
|
-
baseUrl:
|
|
28
|
-
// Carried into the manifest's JSON Schema, so deploy rejects a non-http base before a run does.
|
|
29
|
-
Schema.isPattern(/^https?:\/\//i), Schema.makeFilter((url) => (URL.canParse(url) && ['http:', 'https:'].includes(new URL(url).protocol)) ||
|
|
30
|
-
'Expected an absolute http(s) URL')),
|
|
146
|
+
// Requests join paths onto `baseUrl` as strings, so a query or fragment in the base corrupts every call.
|
|
147
|
+
baseUrl: AbsoluteHttpUrl.check(Schema.makeFilter((url) => !/[?#]/.test(url) || 'Expected a base URL without a query string or fragment')),
|
|
31
148
|
headers: Schema.Record(Schema.String, Schema.String).pipe(Schema.withDecodingDefaultKey(Effect.succeed({}))),
|
|
32
149
|
auth: HttpApiAuth.pipe(Schema.withDecodingDefaultKey(Effect.succeed({ type: 'none' }))),
|
|
150
|
+
tls: Schema.optionalKey(TlsSettings),
|
|
151
|
+
proxy: Schema.optionalKey(HttpProxy),
|
|
33
152
|
tenantKey: Schema.optionalKey(Secret),
|
|
153
|
+
secondaryTenantKey: Schema.optionalKey(Secret),
|
|
34
154
|
});
|
|
35
155
|
//# sourceMappingURL=HttpApiResource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpApiResource.js","sourceRoot":"","sources":["../src/HttpApiResource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"HttpApiResource.js","sourceRoot":"","sources":["../src/HttpApiResource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAExE,+GAA+G;AAE/G,gGAAgG;AAChG,MAAM,MAAM,GAAG,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACvD,sGAAsG;AACtG,MAAM,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5F,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;AAElE,mGAAmG;AACnG,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK;AACzC,+FAA+F;AAC/F,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,EACjC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,EAAE;IACxB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,kCAAkC,CAAC;IAClE,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC;QAAE,OAAO,kCAAkC,CAAC;IAC9F,OAAO,CAAC,CAAC,MAAM,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IACD,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5G,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,CAAC,CAAC,CAAC;IAChG,GAAG,EAAE,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC;IACpC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC;IACrC,kBAAkB,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC;CAC/C,CAAC,CAAC"}
|
package/dist/Manifest.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpApi, type HttpApiGroup } from 'effect/unstable/httpapi';
|
|
2
2
|
import { type WorkflowManifest } from './Contract/Manifest.js';
|
|
3
|
-
export declare const SDK_VERSION = "0.4.
|
|
3
|
+
export declare const SDK_VERSION = "0.4.9-pr-5300.1";
|
|
4
4
|
export declare const RUNTIME_API_VERSION = 1;
|
|
5
5
|
/** The route the SDK serves for platform probes; an API declaring `GET` on it collides with it on every request. */
|
|
6
6
|
export declare const HEALTHCHECK_PATH = "/healthcheck";
|
package/dist/Manifest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Manifest.d.ts","sourceRoot":"","sources":["../src/Manifest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAML,KAAK,gBAAgB,EAEtB,MAAM,wBAAwB,CAAC;AAShC,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Manifest.d.ts","sourceRoot":"","sources":["../src/Manifest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAML,KAAK,gBAAgB,EAEtB,MAAM,wBAAwB,CAAC;AAShC,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC,oHAAoH;AACpH,eAAO,MAAM,gBAAgB,iBAAiB,CAAC;AA6D/C,eAAO,MAAM,YAAY,GAAI,EAAE,SAAS,MAAM,EAAE,MAAM,SAAS,YAAY,CAAC,UAAU,OAC/E,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,KAC/B,gBA2DF,CAAC"}
|
package/dist/Manifest.js
CHANGED
|
@@ -5,7 +5,7 @@ import { declarationOf } from './Resource.js';
|
|
|
5
5
|
import { Trigger } from './Trigger.js';
|
|
6
6
|
const decodeTrigger = Schema.decodeUnknownSync(TriggerMetadata, { onExcessProperty: 'error' });
|
|
7
7
|
const identityOf = (resource) => `${resource.kind}:${resource.kind === 'resourceType' ? resource.type : resource.key}`;
|
|
8
|
-
export const SDK_VERSION = '0.4.
|
|
8
|
+
export const SDK_VERSION = '0.4.9-pr-5300.1';
|
|
9
9
|
export const RUNTIME_API_VERSION = 1;
|
|
10
10
|
/** The route the SDK serves for platform probes; an API declaring `GET` on it collides with it on every request. */
|
|
11
11
|
export const HEALTHCHECK_PATH = '/healthcheck';
|
package/dist/Manifest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Manifest.js","sourceRoot":"","sources":["../src/Manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,OAAO,EAAqB,MAAM,yBAAyB,CAAC;AACrE,OAAO,EACL,wBAAwB,EAGxB,gBAAgB,EAChB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AAK,EAAE,GAAG,CAAC,UAAU;QACrB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC;KACpC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
export declare const TransportTls: Schema.Struct<{
|
|
3
|
+
readonly caCertificate: Schema.optionalKey<Schema.String>;
|
|
4
|
+
readonly clientCertificate: Schema.optionalKey<Schema.String>;
|
|
5
|
+
readonly clientKey: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
6
|
+
readonly clientKeyPassphrase: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
7
|
+
readonly serverName: Schema.optionalKey<Schema.String>;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const TransportAuth: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Struct<{
|
|
10
|
+
readonly type: Schema.Literal<"none">;
|
|
11
|
+
}>, Schema.Struct<{
|
|
12
|
+
readonly type: Schema.Literal<"basic">;
|
|
13
|
+
readonly username: Schema.String;
|
|
14
|
+
readonly password: Schema.RedactedFromValue<Schema.String>;
|
|
15
|
+
}>]>, never>;
|
|
16
|
+
export declare const TransportProxy: Schema.Struct<{
|
|
17
|
+
readonly url: Schema.String;
|
|
18
|
+
readonly auth: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Struct<{
|
|
19
|
+
readonly type: Schema.Literal<"none">;
|
|
20
|
+
}>, Schema.Struct<{
|
|
21
|
+
readonly type: Schema.Literal<"basic">;
|
|
22
|
+
readonly username: Schema.String;
|
|
23
|
+
readonly password: Schema.RedactedFromValue<Schema.String>;
|
|
24
|
+
}>]>, never>;
|
|
25
|
+
readonly tls: Schema.optionalKey<Schema.Struct<{
|
|
26
|
+
readonly caCertificate: Schema.optionalKey<Schema.String>;
|
|
27
|
+
readonly clientCertificate: Schema.optionalKey<Schema.String>;
|
|
28
|
+
readonly clientKey: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
29
|
+
readonly clientKeyPassphrase: Schema.optionalKey<Schema.RedactedFromValue<Schema.String>>;
|
|
30
|
+
readonly serverName: Schema.optionalKey<Schema.String>;
|
|
31
|
+
}>>;
|
|
32
|
+
}>;
|
|
33
|
+
//# sourceMappingURL=TransportResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransportResource.d.ts","sourceRoot":"","sources":["../src/TransportResource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKxC,eAAO,MAAM,YAAY;;;;;;EAMvB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;YAGuD,CAAC;AAElF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;EAIzB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Effect, Schema } from 'effect';
|
|
2
|
+
const Secret = Schema.RedactedFromValue(Schema.String);
|
|
3
|
+
const NonEmptyString = Schema.String.check(Schema.isMinLength(1));
|
|
4
|
+
export const TransportTls = Schema.Struct({
|
|
5
|
+
caCertificate: Schema.optionalKey(Schema.String),
|
|
6
|
+
clientCertificate: Schema.optionalKey(Schema.String),
|
|
7
|
+
clientKey: Schema.optionalKey(Secret),
|
|
8
|
+
clientKeyPassphrase: Schema.optionalKey(Secret),
|
|
9
|
+
serverName: Schema.optionalKey(NonEmptyString),
|
|
10
|
+
});
|
|
11
|
+
export const TransportAuth = Schema.Union([
|
|
12
|
+
Schema.Struct({ type: Schema.Literal('none') }),
|
|
13
|
+
Schema.Struct({ type: Schema.Literal('basic'), username: Schema.String, password: Secret }),
|
|
14
|
+
]).pipe(Schema.withDecodingDefaultKey(Effect.succeed({ type: 'none' })));
|
|
15
|
+
export const TransportProxy = Schema.Struct({
|
|
16
|
+
url: NonEmptyString,
|
|
17
|
+
auth: TransportAuth,
|
|
18
|
+
tls: Schema.optionalKey(TransportTls),
|
|
19
|
+
});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AM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;IAC1C,GAAG,EAAE,cAAc;IACnB,IAAI,EAAE,aAAa;IACnB,GAAG,EAAE,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC;CACtC,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { type OutboundFetch } from './HttpClient.js';
|
|
|
4
4
|
export type { InvocationContext, InvocationTriggerKind } from './Contract/Invocation.js';
|
|
5
5
|
export { ManifestResource, ResponsePolicy, TriggerKind, TriggerMetadata, WorkflowManifest, WorkflowManifestEndpoint, } from './Contract/Manifest.js';
|
|
6
6
|
export { As2IdentityResource, As2PartnerResource } from './As2Resource.js';
|
|
7
|
-
export { HttpApiResource } from './HttpApiResource.js';
|
|
7
|
+
export { HttpApiAuth, HttpApiResource, HttpApiUnsupportedAuth, HttpProxy, OAuthTokenRequest, TlsSettings, } from './HttpApiResource.js';
|
|
8
8
|
export { Invocation } from './Invocation.js';
|
|
9
9
|
export { type SpanLinesOptions, type SpanOutcome, withSpanLines } from './LogContext.js';
|
|
10
10
|
export { type DeadlineExceededBody } from './Middleware.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACrG,OAAO,EACL,KAAK,YAAY,EACjB,cAAc,EACd,KAAK,WAAW,EAChB,kBAAkB,EAClB,eAAe,EACf,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,YAAY,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACzF,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,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EACR,KAAK,iBAAiB,EACtB,YAAY,EACZ,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ export { childMessageId, currentCorrelation, withCorrelation, withFreshTrace, }
|
|
|
3
3
|
export {} from './HttpClient.js';
|
|
4
4
|
export { ManifestResource, ResponsePolicy, TriggerKind, TriggerMetadata, WorkflowManifest, WorkflowManifestEndpoint, } from './Contract/Manifest.js';
|
|
5
5
|
export { As2IdentityResource, As2PartnerResource } from './As2Resource.js';
|
|
6
|
-
export { HttpApiResource } from './HttpApiResource.js';
|
|
6
|
+
export { HttpApiAuth, HttpApiResource, HttpApiUnsupportedAuth, HttpProxy, OAuthTokenRequest, TlsSettings, } from './HttpApiResource.js';
|
|
7
7
|
export { Invocation } from './Invocation.js';
|
|
8
8
|
export { withSpanLines } from './LogContext.js';
|
|
9
9
|
export {} from './Middleware.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACrG,OAAO,EAEL,cAAc,EAEd,kBAAkB,EAClB,eAAe,EACf,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAsB,MAAM,iBAAiB,CAAC;AAErD,OAAO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B,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAoE,MAAM,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ontemper/sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9-pr-5300.1",
|
|
4
4
|
"description": "Effect workflow SDK for Temper.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"license": "MIT",
|
|
67
67
|
"sideEffects": false,
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "940941585ff7a455c3181ba23297ca2c8b63c54e",
|
|
69
69
|
"scripts": {
|
|
70
70
|
"build": "tsc -p tsconfig.json",
|
|
71
71
|
"test": "vitest run",
|