@t4h.framework/http 0.4.4 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# @t4h.framework/http
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#158](https://github.com/tech4humans-brasil/framework/pull/158) [`8e8ffb2`](https://github.com/tech4humans-brasil/framework/commit/8e8ffb2ac0739e2f2a1f0af2ed9ebeffe2964776) Thanks [@gusteycamargo](https://github.com/gusteycamargo)! - Adds `@t4h.framework/webhook` and unifies the external advance of a pending
|
|
8
|
+
activity behind one callback route.
|
|
9
|
+
|
|
10
|
+
**webhook**: `webhook()` sends an outbound request (with `<<callbackUrl>>`
|
|
11
|
+
replaced by the activity callback URL, 60s timeout) through
|
|
12
|
+
`HttpClientRequestClaim` and suspends the workflow until the third party posts
|
|
13
|
+
to that URL. The partner's answer is kept as `callback.dispatch`; the callback
|
|
14
|
+
body is validated against `schema`; `{ wait: false }` returns a handle to wait
|
|
15
|
+
on later. Ships `deriveCallbackToken`/`isCallbackTokenValid` and
|
|
16
|
+
`verifyCallbackAuth` for hosts.
|
|
17
|
+
|
|
18
|
+
**core**: `AsyncActivityCallbackAuth` (hmac, basic, header, bearer, jwt),
|
|
19
|
+
`pending({ auth })`, `advance(payload, bootstrap, context?)` receiving the
|
|
20
|
+
callback method and headers, and the `GetActivityCallbackUrlClaim` hosts must
|
|
21
|
+
provide.
|
|
22
|
+
|
|
23
|
+
**http**: `timeoutInMs` on `HttpClientRequestClaimInput`.
|
|
24
|
+
|
|
25
|
+
**dev**: `POST /projects/:project/workflows/:workflow/runs/:run/activities/:activity/callbacks?token=…`
|
|
26
|
+
replaces the `PATCH …/activities/:id` advance route. Each delivery is stored
|
|
27
|
+
as a pending callback (method + request); the token is derived from the
|
|
28
|
+
activity id, the declared `auth` is verified before the workflow advances.
|
|
29
|
+
|
|
30
|
+
**vite-panel-plugin**: the Inbox advance route follows the new callbacks
|
|
31
|
+
endpoint, with the token in the curl.
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Updated dependencies [[`8e8ffb2`](https://github.com/tech4humans-brasil/framework/commit/8e8ffb2ac0739e2f2a1f0af2ed9ebeffe2964776)]:
|
|
36
|
+
- @t4h.framework/core@0.11.0
|
|
37
|
+
- @t4h.framework/cache@0.6.1
|
|
38
|
+
- @t4h.framework/fs@0.9.1
|
|
39
|
+
|
|
40
|
+
## 0.5.0
|
|
41
|
+
|
|
42
|
+
### Minor Changes
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [[`8098041`](https://github.com/tech4humans-brasil/framework/commit/80980419d59a987378b7c94372ee2f7b7dcc00f5)]:
|
|
45
|
+
- @t4h.framework/core@0.10.0
|
|
46
|
+
- @t4h.framework/cache@0.6.0
|
|
47
|
+
- @t4h.framework/fs@0.9.0
|
|
48
|
+
|
|
3
49
|
## 0.4.4
|
|
4
50
|
|
|
5
51
|
### Patch Changes
|
|
@@ -8,6 +8,7 @@ export interface HttpClientRequestClaimInput {
|
|
|
8
8
|
headers: NonNullable<HttpRequestActivityInput['headers']>;
|
|
9
9
|
redirect: NonNullable<HttpRequestActivityInput['redirect']>;
|
|
10
10
|
retry: NonNullable<HttpRequestActivityInput['retry']>;
|
|
11
|
+
timeoutInMs?: number;
|
|
11
12
|
}
|
|
12
13
|
export interface HttpClientRequestClaimOutput {
|
|
13
14
|
status: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClientRequestClaim.d.ts","sourceRoot":"","sources":["../../src/models/HttpClientRequestClaim.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,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MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAA;IACtD,IAAI,EAAE,QAAQ,CAAA;CACf;AAED,8BAAsB,sBAAsB;aAC1B,OAAO,CACrB,OAAO,EAAE,2BAA2B,GACnC,4BAA4B,GAAG,OAAO,CAAC,4BAA4B,CAAC;CACxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClientRequestClaim.js","sourceRoot":"","sources":["../../src/models/HttpClientRequestClaim.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HttpClientRequestClaim.js","sourceRoot":"","sources":["../../src/models/HttpClientRequestClaim.ts"],"names":[],"mappings":"AAqBA,MAAM,OAAgB,sBAAsB;CAI3C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t4h.framework/http",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "HTTP module for the T4H Framework",
|
|
5
5
|
"homepage": "https://github.com/tech4humans-brasil/framework/tree/main/packages/http",
|
|
6
6
|
"bugs": "https://github.com/tech4humans-brasil/framework/issues",
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
"uuidv7": "^1.1.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@t4h.framework/cache": "^0.
|
|
42
|
-
"@t4h.framework/core": "^0.
|
|
43
|
-
"@t4h.framework/fs": "^0.
|
|
41
|
+
"@t4h.framework/cache": "^0.6.1",
|
|
42
|
+
"@t4h.framework/core": "^0.11.0",
|
|
43
|
+
"@t4h.framework/fs": "^0.9.1",
|
|
44
44
|
"@types/type-is": "^1.6.7",
|
|
45
45
|
"@vitest/coverage-v8": "^4.0.18",
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
47
|
"vitest": "^4.0.18"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@t4h.framework/cache": "^0.
|
|
51
|
-
"@t4h.framework/core": "^0.
|
|
52
|
-
"@t4h.framework/fs": "^0.
|
|
50
|
+
"@t4h.framework/cache": "^0.6.1",
|
|
51
|
+
"@t4h.framework/core": "^0.11.0",
|
|
52
|
+
"@t4h.framework/fs": "^0.9.1"
|
|
53
53
|
},
|
|
54
54
|
"packageManager": "yarn@4.12.0",
|
|
55
55
|
"engines": {
|