@tailor-platform/function-types 0.10.0 → 0.10.2

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +41 -6
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @tailor-platform/function-types
2
2
 
3
+ ## 0.10.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#193](https://github.com/tailor-platform/function/pull/193) [`d3cf52e`](https://github.com/tailor-platform/function/commit/d3cf52ec9534361b620261469c1b2564ded9f130) Thanks [@toiroakr](https://github.com/toiroakr)! - Remove the "known gap" note about `tailor.aigateway` from the deprecation README now that `@tailor-platform/sdk@1.73.0` adds a runtime wrapper for it (`aigateway.get(name)`, imported from `@tailor-platform/sdk/runtime`).
8
+
9
+ ## 0.10.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#190](https://github.com/tailor-platform/function/pull/190) [`09dfbcc`](https://github.com/tailor-platform/function/commit/09dfbccaa0449077bf0e768bb85939918de2709f) Thanks [@toiroakr](https://github.com/toiroakr)! - Deprecate this package in favor of `@tailor-platform/sdk`, which now covers the same `tailor.*` / `tailordb.*` runtime surface. The README documents the deprecation and migration steps.
14
+
3
15
  ## 0.10.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -1,18 +1,53 @@
1
1
  # @tailor-platform/function-types
2
2
 
3
- ## Usage
3
+ **Deprecated.** These types are now built into [`@tailor-platform/sdk`](https://www.npmjs.com/package/@tailor-platform/sdk), which exposes the same `tailor.*` / `tailordb.*` runtime surface plus typed wrappers you can import directly instead of relying on ambient globals. New projects should use `@tailor-platform/sdk` instead of this package; existing projects should migrate using the steps below.
4
+
5
+ This package will no longer receive updates for new runtime APIs, while `@tailor-platform/sdk` will keep gaining new runtime APIs.
6
+
7
+ ## Migrating to `@tailor-platform/sdk`
8
+
9
+ 1. Add `@tailor-platform/sdk` and remove this package:
10
+
11
+ ```sh
12
+ npm i -D @tailor-platform/sdk
13
+ npm uninstall @tailor-platform/function-types
14
+ ```
15
+
16
+ If your project already depends on `@tailor-platform/sdk` (e.g. for `tailor.config.ts`, resolvers, or workflows), you can skip the install step.
17
+
18
+ 2. Update `tsconfig.json` to load the runtime globals from the SDK instead:
19
+
20
+ ```diff
21
+ {
22
+ "compilerOptions": {
23
+ - "types": ["@tailor-platform/function-types"]
24
+ + "types": ["@tailor-platform/sdk/runtime/globals"]
25
+ }
26
+ }
27
+ ```
28
+
29
+ 3. No other code changes are required. The global `tailor.*` and `tailordb.*` identifiers keep the same names and shapes (including the legacy capitalized `Tailordb.Client`, which `@tailor-platform/sdk` also keeps around for compatibility with this package).
30
+
31
+ ### Prefer typed imports over ambient globals (optional)
32
+
33
+ Instead of relying on the ambient `tailor` / `tailordb` globals, `@tailor-platform/sdk/runtime` exposes the same APIs as regular imports, which is easier to trace and doesn't require the `tsconfig.json` `types` change above:
34
+
35
+ ```typescript
36
+ import { iconv, secretmanager, idp, workflow, context, authconnection, aigateway, file } from "@tailor-platform/sdk/runtime";
37
+
38
+ const secret = await secretmanager.getSecret("my-vault", "API_KEY");
39
+ const gateway = await aigateway.get("my-aigateway");
40
+ ```
41
+
42
+ ## Legacy usage (this package)
4
43
 
5
- Install package.
6
44
  ```sh
7
45
  npm i -D @tailor-platform/function-types
8
46
  ```
9
47
 
10
- Add types to `tsconfig.json`.
11
- ```
48
+ ```json
12
49
  {
13
- ...
14
50
  "compilerOptions": {
15
- ...
16
51
  "types": ["@tailor-platform/function-types"]
17
52
  }
18
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/function-types",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "TypeScript types for Tailor Platform Function service",
5
5
  "repository": {
6
6
  "type": "git",