@tailor-platform/function-types 0.10.0 → 0.10.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,11 @@
1
1
  # @tailor-platform/function-types
2
2
 
3
+ ## 0.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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.
8
+
3
9
  ## 0.10.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -1,18 +1,56 @@
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 (e.g. it never picked up `tailor.aigateway.get()`, 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, file } from "@tailor-platform/sdk/runtime";
37
+
38
+ const secret = await secretmanager.getSecret("my-vault", "API_KEY");
39
+ ```
40
+
41
+ ### Known gap: `tailor.aigateway`
42
+
43
+ `@tailor-platform/sdk` does not yet expose a runtime equivalent of `tailor.aigateway.get(name)`. If your code uses it, keep this package installed alongside `@tailor-platform/sdk` for that one namespace until the SDK adds support, or reach out to the SDK team if you need this migrated sooner.
44
+
45
+ ## Legacy usage (this package)
4
46
 
5
- Install package.
6
47
  ```sh
7
48
  npm i -D @tailor-platform/function-types
8
49
  ```
9
50
 
10
- Add types to `tsconfig.json`.
11
- ```
51
+ ```json
12
52
  {
13
- ...
14
53
  "compilerOptions": {
15
- ...
16
54
  "types": ["@tailor-platform/function-types"]
17
55
  }
18
56
  }
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.1",
4
4
  "description": "TypeScript types for Tailor Platform Function service",
5
5
  "repository": {
6
6
  "type": "git",