@t4h.framework/http 0.5.0 → 0.6.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/CHANGELOG.md CHANGED
@@ -1,5 +1,51 @@
1
1
  # @t4h.framework/http
2
2
 
3
+ ## 0.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`72e08ff`](https://github.com/tech4humans-brasil/framework/commit/72e08ff86e0ce735ef73ccdf33b0dc01cdb8b6f5)]:
8
+ - @t4h.framework/core@0.12.0
9
+ - @t4h.framework/cache@0.6.2
10
+ - @t4h.framework/fs@0.9.2
11
+
12
+ ## 0.6.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#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
17
+ activity behind one callback route.
18
+
19
+ **webhook**: `webhook()` sends an outbound request (with `<<callbackUrl>>`
20
+ replaced by the activity callback URL, 60s timeout) through
21
+ `HttpClientRequestClaim` and suspends the workflow until the third party posts
22
+ to that URL. The partner's answer is kept as `callback.dispatch`; the callback
23
+ body is validated against `schema`; `{ wait: false }` returns a handle to wait
24
+ on later. Ships `deriveCallbackToken`/`isCallbackTokenValid` and
25
+ `verifyCallbackAuth` for hosts.
26
+
27
+ **core**: `AsyncActivityCallbackAuth` (hmac, basic, header, bearer, jwt),
28
+ `pending({ auth })`, `advance(payload, bootstrap, context?)` receiving the
29
+ callback method and headers, and the `GetActivityCallbackUrlClaim` hosts must
30
+ provide.
31
+
32
+ **http**: `timeoutInMs` on `HttpClientRequestClaimInput`.
33
+
34
+ **dev**: `POST /projects/:project/workflows/:workflow/runs/:run/activities/:activity/callbacks?token=…`
35
+ replaces the `PATCH …/activities/:id` advance route. Each delivery is stored
36
+ as a pending callback (method + request); the token is derived from the
37
+ activity id, the declared `auth` is verified before the workflow advances.
38
+
39
+ **vite-panel-plugin**: the Inbox advance route follows the new callbacks
40
+ endpoint, with the token in the curl.
41
+
42
+ ### Patch Changes
43
+
44
+ - Updated dependencies [[`8e8ffb2`](https://github.com/tech4humans-brasil/framework/commit/8e8ffb2ac0739e2f2a1f0af2ed9ebeffe2964776)]:
45
+ - @t4h.framework/core@0.11.0
46
+ - @t4h.framework/cache@0.6.1
47
+ - @t4h.framework/fs@0.9.1
48
+
3
49
  ## 0.5.0
4
50
 
5
51
  ### Minor 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,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAE1D,MAAM,WAAW,2BAA2B;IAC1C,GAAG,EAAE,GAAG,CAAA;IACR,MAAM,EAAE,WAAW,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAAC,CAAA;IACvD,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,GAAG,QAAQ,GAAG,QAAQ,GAAG,eAAe,GAAG,SAAS,CAAA;IAC7E,OAAO,EAAE,WAAW,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC,CAAA;IACzD,QAAQ,EAAE,WAAW,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC,CAAA;IAC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AAG,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":"AAoBA,MAAM,OAAgB,sBAAsB;CAI3C"}
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.5.0",
3
+ "version": "0.6.1",
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.6.0",
42
- "@t4h.framework/core": "^0.10.0",
43
- "@t4h.framework/fs": "^0.9.0",
41
+ "@t4h.framework/cache": "^0.6.2",
42
+ "@t4h.framework/core": "^0.12.0",
43
+ "@t4h.framework/fs": "^0.9.2",
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.6.0",
51
- "@t4h.framework/core": "^0.10.0",
52
- "@t4h.framework/fs": "^0.9.0"
50
+ "@t4h.framework/cache": "^0.6.2",
51
+ "@t4h.framework/core": "^0.12.0",
52
+ "@t4h.framework/fs": "^0.9.2"
53
53
  },
54
54
  "packageManager": "yarn@4.12.0",
55
55
  "engines": {