@tappify/extension-sdk 2.1.0-beta.1 → 2.1.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/README.md +18 -54
- package/dist/{chunk-6HETNZJY.cjs → chunk-2DBSVKAU.cjs} +1 -1
- package/dist/{chunk-6HETNZJY.cjs.map → chunk-2DBSVKAU.cjs.map} +1 -1
- package/dist/{chunk-O357OJXL.cjs → chunk-3YWVYA42.cjs} +18 -14
- package/dist/chunk-3YWVYA42.cjs.map +1 -0
- package/dist/{chunk-GAUZYBXE.cjs → chunk-5AAPD5WV.cjs} +11 -11
- package/dist/chunk-5AAPD5WV.cjs.map +1 -0
- package/dist/{chunk-SGEYDV3K.mjs → chunk-BDCX6LRQ.mjs} +3 -3
- package/dist/chunk-BDCX6LRQ.mjs.map +1 -0
- package/dist/{chunk-KZ5NGFUP.mjs → chunk-C3YNVHBP.mjs} +7 -20
- package/dist/chunk-C3YNVHBP.mjs.map +1 -0
- package/dist/{chunk-QXD7WVKK.mjs → chunk-CSTYBKZC.mjs} +1 -1
- package/dist/chunk-CSTYBKZC.mjs.map +1 -0
- package/dist/{chunk-SWG7CNTZ.mjs → chunk-CTSZ5D7S.mjs} +5 -9
- package/dist/chunk-CTSZ5D7S.mjs.map +1 -0
- package/dist/chunk-EW54H7CR.cjs +722 -0
- package/dist/chunk-EW54H7CR.cjs.map +1 -0
- package/dist/chunk-EX3NFXDK.mjs +722 -0
- package/dist/chunk-EX3NFXDK.mjs.map +1 -0
- package/dist/{chunk-A74HCO6T.cjs → chunk-G7XZSN2Q.cjs} +18 -31
- package/dist/chunk-G7XZSN2Q.cjs.map +1 -0
- package/dist/{chunk-RBIQT75L.mjs → chunk-GG3IX52W.mjs} +2 -2
- package/dist/{chunk-SLGOHIBL.mjs → chunk-IGK2AP6J.mjs} +17 -13
- package/dist/chunk-IGK2AP6J.mjs.map +1 -0
- package/dist/{chunk-VV7ELNRW.cjs → chunk-JMUK3K47.cjs} +3 -3
- package/dist/{chunk-VV7ELNRW.cjs.map → chunk-JMUK3K47.cjs.map} +1 -1
- package/dist/{chunk-SGCYEEXD.mjs → chunk-MNDVYPEP.mjs} +2 -9
- package/dist/chunk-MNDVYPEP.mjs.map +1 -0
- package/dist/{chunk-BPCGXXMD.cjs → chunk-NFUPPCX4.cjs} +18 -22
- package/dist/chunk-NFUPPCX4.cjs.map +1 -0
- package/dist/{chunk-PRCZMOLD.cjs → chunk-OPPYEA7F.cjs} +3 -3
- package/dist/{chunk-PRCZMOLD.cjs.map → chunk-OPPYEA7F.cjs.map} +1 -1
- package/dist/{chunk-7YKH4LZN.cjs → chunk-PYJMJF44.cjs} +2 -9
- package/dist/chunk-PYJMJF44.cjs.map +1 -0
- package/dist/{chunk-QA5AL3VZ.mjs → chunk-QHM7XNRK.mjs} +2 -2
- package/dist/{chunk-QA5AL3VZ.mjs.map → chunk-QHM7XNRK.mjs.map} +1 -1
- package/dist/codegen.cjs.map +1 -1
- package/dist/codegen.d.cts +7 -40
- package/dist/codegen.d.ts +7 -40
- package/dist/codegen.mjs.map +1 -1
- package/dist/{constants-BAimnqOK.d.cts → constants-DJ_KgZpN.d.cts} +8 -41
- package/dist/{constants-BAimnqOK.d.ts → constants-DJ_KgZpN.d.ts} +8 -41
- package/dist/{context-Cr93B05o.d.ts → context-Dt6xh_5t.d.cts} +4 -5
- package/dist/{context-DJ3REtdT.d.cts → context-Ml7k_V14.d.ts} +4 -5
- package/dist/{errors-Cqh0wrqt.d.ts → errors-COsBh7kd.d.cts} +2 -3
- package/dist/{errors-Cqh0wrqt.d.cts → errors-COsBh7kd.d.ts} +2 -3
- package/dist/handler-CZIlZ5vu.d.ts +227 -0
- package/dist/handler-kU9Jf36K.d.cts +227 -0
- package/dist/host.cjs +4 -4
- package/dist/host.d.cts +4 -4
- package/dist/host.d.ts +4 -4
- package/dist/host.mjs +3 -3
- package/dist/index.cjs +34 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +627 -69
- package/dist/index.d.ts +627 -69
- package/dist/index.mjs +33 -4
- package/dist/manifest.cjs +23 -132
- package/dist/manifest.cjs.map +1 -1
- package/dist/manifest.d.cts +12 -93
- package/dist/manifest.d.ts +12 -93
- package/dist/manifest.mjs +9 -118
- package/dist/manifest.mjs.map +1 -1
- package/dist/server.cjs +66 -14
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +6 -6
- package/dist/server.d.ts +6 -6
- package/dist/server.mjs +61 -9
- package/dist/server.mjs.map +1 -1
- package/dist/styles.css +367 -0
- package/dist/testing/index.cjs +13 -72
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts +10 -29
- package/dist/testing/index.d.ts +10 -29
- package/dist/testing/index.mjs +13 -72
- package/dist/testing/index.mjs.map +1 -1
- package/dist/testing/jest.cjs +5 -5
- package/dist/testing/jest.mjs +2 -2
- package/dist/testing/vitest.cjs +5 -5
- package/dist/testing/vitest.cjs.map +1 -1
- package/dist/testing/vitest.d.cts +0 -10
- package/dist/testing/vitest.d.ts +0 -10
- package/dist/testing/vitest.mjs +2 -2
- package/dist/testing/vitest.mjs.map +1 -1
- package/dist/{types-BYGcp5pZ.d.ts → types-DDAGLpov.d.ts} +3 -4
- package/dist/{types-I1JOZyI_.d.cts → types-DrpQSv_2.d.cts} +3 -4
- package/dist/vite-preview.cjs +125 -294
- package/dist/vite-preview.cjs.map +1 -1
- package/dist/vite-preview.d.cts +24 -6
- package/dist/vite-preview.d.ts +24 -6
- package/dist/vite-preview.mjs +118 -287
- package/dist/vite-preview.mjs.map +1 -1
- package/dist/vite.cjs +23 -133
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.cts +7 -40
- package/dist/vite.d.ts +7 -40
- package/dist/vite.mjs +17 -127
- package/dist/vite.mjs.map +1 -1
- package/package.json +2 -12
- package/schema/extension-v2.json +121 -432
- package/dist/chunk-2CY5HVY7.mjs +0 -59
- package/dist/chunk-2CY5HVY7.mjs.map +0 -1
- package/dist/chunk-7YKH4LZN.cjs.map +0 -1
- package/dist/chunk-A74HCO6T.cjs.map +0 -1
- package/dist/chunk-BPCGXXMD.cjs.map +0 -1
- package/dist/chunk-EB5XWQAU.cjs +0 -132
- package/dist/chunk-EB5XWQAU.cjs.map +0 -1
- package/dist/chunk-GAUZYBXE.cjs.map +0 -1
- package/dist/chunk-KZ5NGFUP.mjs.map +0 -1
- package/dist/chunk-O357OJXL.cjs.map +0 -1
- package/dist/chunk-ONJMPO3P.cjs +0 -59
- package/dist/chunk-ONJMPO3P.cjs.map +0 -1
- package/dist/chunk-QJMZRV7A.mjs +0 -132
- package/dist/chunk-QJMZRV7A.mjs.map +0 -1
- package/dist/chunk-QXD7WVKK.mjs.map +0 -1
- package/dist/chunk-SGCYEEXD.mjs.map +0 -1
- package/dist/chunk-SGEYDV3K.mjs.map +0 -1
- package/dist/chunk-SLGOHIBL.mjs.map +0 -1
- package/dist/chunk-SWG7CNTZ.mjs.map +0 -1
- package/dist/client-CV1qzQgx.d.cts +0 -25
- package/dist/client-CnlSHDWE.d.ts +0 -25
- package/dist/ui/styles.css +0 -740
- package/dist/ui.cjs +0 -1018
- package/dist/ui.cjs.map +0 -1
- package/dist/ui.d.cts +0 -231
- package/dist/ui.d.ts +0 -231
- package/dist/ui.mjs +0 -1018
- package/dist/ui.mjs.map +0 -1
- package/dist/vite-preview-bootstrap.cjs +0 -66
- package/dist/vite-preview-bootstrap.cjs.map +0 -1
- package/dist/vite-preview-bootstrap.d.cts +0 -15
- package/dist/vite-preview-bootstrap.d.ts +0 -15
- package/dist/vite-preview-bootstrap.mjs +0 -66
- package/dist/vite-preview-bootstrap.mjs.map +0 -1
- package/dist/work-events-DB3WR468.d.ts +0 -547
- package/dist/work-events-Dxe7Djdy.d.cts +0 -547
- /package/dist/{chunk-RBIQT75L.mjs.map → chunk-GG3IX52W.mjs.map} +0 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { JSONWebKeySet } from 'jose';
|
|
2
|
+
import { K as TapPlatformFilter, a as TapFilters, $ as TapSettingsValues, w as TapCredentialValues, ab as ToolId, ac as ToolInput, A as ActionId, k as ActionInput, f as TapProcedureName, g as TapProcedureInput, h as TapProcedureOutput, c as TapHostEvents } from './types-DDAGLpov.js';
|
|
3
|
+
|
|
4
|
+
/** Which install made the call, as the token's claims name it. */
|
|
5
|
+
interface TappifyInstall {
|
|
6
|
+
/** The install id, which is the key to scope anything you store yourself by. */
|
|
7
|
+
id: string;
|
|
8
|
+
extensionId: string;
|
|
9
|
+
/** `null` for an install on the workspace rather than one project. */
|
|
10
|
+
projectId: string | null;
|
|
11
|
+
organizationId: string;
|
|
12
|
+
}
|
|
13
|
+
/** The project and the filter bar the call was made from. */
|
|
14
|
+
interface TappifyCallContext {
|
|
15
|
+
projectId: string | null;
|
|
16
|
+
/** The same value as `filters.platform`, hoisted for convenience. */
|
|
17
|
+
platform: TapPlatformFilter;
|
|
18
|
+
/** The range start, as `YYYY-MM-DD`, or an empty string when none was sent. */
|
|
19
|
+
from: string;
|
|
20
|
+
/** The range end, as `YYYY-MM-DD`, or an empty string when none was sent. */
|
|
21
|
+
to: string;
|
|
22
|
+
filters: TapFilters;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The install- and organization-scoped storage documents Tappify passes to the
|
|
26
|
+
* server on every call, keyed by collection name.
|
|
27
|
+
*/
|
|
28
|
+
type TappifyDocuments = Record<string, unknown> & {
|
|
29
|
+
/** The settings contribution's document, or `null` before it is first saved. */
|
|
30
|
+
settings?: TapSettingsValues | null;
|
|
31
|
+
};
|
|
32
|
+
/** The verified claims of an install token, as `verifyTappifyToken` returns them. */
|
|
33
|
+
interface TappifyClaims {
|
|
34
|
+
iss: string;
|
|
35
|
+
/** Always `ext:<extensionId>`, which is what the verifier checked. */
|
|
36
|
+
aud: string;
|
|
37
|
+
exp: number;
|
|
38
|
+
iat: number;
|
|
39
|
+
installId: string;
|
|
40
|
+
extensionId: string;
|
|
41
|
+
projectId: string | null;
|
|
42
|
+
organizationId: string;
|
|
43
|
+
/** The scopes the install granted, as strings. */
|
|
44
|
+
scopes: string[];
|
|
45
|
+
/** Present when the token carries one, naming the teammate behind the call. */
|
|
46
|
+
userId?: string;
|
|
47
|
+
}
|
|
48
|
+
/** The single argument every route handler receives. */
|
|
49
|
+
interface TappifyRequest<TInput = unknown, TEvent = unknown> {
|
|
50
|
+
install: TappifyInstall;
|
|
51
|
+
context: TappifyCallContext;
|
|
52
|
+
/**
|
|
53
|
+
* The call's `input`, or `{}` when the body carried none, and `undefined` on a
|
|
54
|
+
* context or events route, which take no input.
|
|
55
|
+
*/
|
|
56
|
+
input: TInput;
|
|
57
|
+
credentials: TapCredentialValues;
|
|
58
|
+
documents: TappifyDocuments;
|
|
59
|
+
/** The event payload on an events route, and `undefined` on every other. */
|
|
60
|
+
event: TEvent | undefined;
|
|
61
|
+
/** The idempotency key from `X-Tappify-Event-Id`; deduplicate writes on it. */
|
|
62
|
+
eventId: string;
|
|
63
|
+
claims: TappifyClaims;
|
|
64
|
+
/** The original request, for a header or the raw body. */
|
|
65
|
+
request: Request;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The signature every entry in `TappifyHandlerOptions` has: one argument, and a
|
|
69
|
+
* value or a promise of one.
|
|
70
|
+
*/
|
|
71
|
+
type TappifyRouteHandler<TInput = unknown, TOutput = unknown, TEvent = unknown> = (request: TappifyRequest<TInput, TEvent>) => TOutput | Promise<TOutput>;
|
|
72
|
+
/** What the `GET /tappify/health` route answers with. */
|
|
73
|
+
interface TappifyHealth {
|
|
74
|
+
/** Whether the server is ready to take calls; the publish check reads it. */
|
|
75
|
+
ok: boolean;
|
|
76
|
+
version?: string;
|
|
77
|
+
/** A line for the owner when the server is not ready. */
|
|
78
|
+
message?: string;
|
|
79
|
+
}
|
|
80
|
+
/** What Tappify asks a connector's metrics route for. */
|
|
81
|
+
interface MetricsInput {
|
|
82
|
+
projectId: string | null;
|
|
83
|
+
platform: TapPlatformFilter;
|
|
84
|
+
/** The metric keys to answer for, from the ones the manifest declares. */
|
|
85
|
+
metrics: string[];
|
|
86
|
+
from: string;
|
|
87
|
+
to: string;
|
|
88
|
+
}
|
|
89
|
+
/** One metric's answer inside a `MetricsResponse`. */
|
|
90
|
+
interface MetricsSeries {
|
|
91
|
+
/** The declared metric key this series answers for. */
|
|
92
|
+
metric: string;
|
|
93
|
+
/** Has to match the unit the manifest declares for that key. */
|
|
94
|
+
unit: 'count' | 'ratio' | 'currency' | 'seconds' | 'bytes';
|
|
95
|
+
/** One value per declared dimension, when the series is broken down. */
|
|
96
|
+
dimensions?: Record<string, string>;
|
|
97
|
+
/** `[timestamp, value]` pairs, oldest first. */
|
|
98
|
+
points: [string, number][];
|
|
99
|
+
}
|
|
100
|
+
/** What a connector's metrics route answers with: one series per asked metric. */
|
|
101
|
+
interface MetricsResponse {
|
|
102
|
+
series: MetricsSeries[];
|
|
103
|
+
}
|
|
104
|
+
/** What a mention route answers with: the items the owner can pick from. */
|
|
105
|
+
interface MentionItems {
|
|
106
|
+
items: {
|
|
107
|
+
id: string;
|
|
108
|
+
label: string;
|
|
109
|
+
}[];
|
|
110
|
+
}
|
|
111
|
+
/** What a context route answers with, for the owner's chat to read. */
|
|
112
|
+
interface ContextBlock {
|
|
113
|
+
/** A line of prose the assistant can use as it is. */
|
|
114
|
+
summary: string;
|
|
115
|
+
/** The numbers behind the summary, for the assistant to quote. */
|
|
116
|
+
data?: Record<string, unknown>;
|
|
117
|
+
}
|
|
118
|
+
/** The work-tracker operations a handler's `work` table can answer. */
|
|
119
|
+
type WorkOperation = 'list_containers' | 'create' | 'attach' | 'comment' | 'status' | 'resolve';
|
|
120
|
+
/** The second argument of `verifyTappifyToken`. */
|
|
121
|
+
interface VerifyTokenOptions {
|
|
122
|
+
/** The `id` from the manifest; the token's audience has to be `ext:<id>`. */
|
|
123
|
+
extensionId: string;
|
|
124
|
+
/** Where to fetch the signing keys. Defaults to `DEFAULT_JWKS_URL`. */
|
|
125
|
+
jwksUrl?: string;
|
|
126
|
+
/** A key set to verify against, which skips the fetch. For tests. */
|
|
127
|
+
jwks?: JSONWebKeySet;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The routes and settings `createTappifyHandler` builds a fetch handler from.
|
|
131
|
+
*
|
|
132
|
+
* @remarks
|
|
133
|
+
* The `tools`, `actions` and `procedures` tables are keyed by the names the
|
|
134
|
+
* augmentation `tappify extension types` writes, so a handler for an undeclared
|
|
135
|
+
* name does not compile. `events` is keyed by Tappify's own event catalogue and
|
|
136
|
+
* `work` by the fixed set of work operations; `mentions` and `context` take any id.
|
|
137
|
+
* A route Tappify calls with no handler registered answers 404 with
|
|
138
|
+
* `TAP_HANDLER_MISSING`. Export this object as well as the handler: the testing
|
|
139
|
+
* entry's `createTestClient` takes the options, not the built handler.
|
|
140
|
+
*/
|
|
141
|
+
interface TappifyHandlerOptions {
|
|
142
|
+
/** The `id` from the manifest, which the install token's audience has to match. */
|
|
143
|
+
extensionId: string;
|
|
144
|
+
/** Where to fetch the signing keys. Defaults to `DEFAULT_JWKS_URL`. */
|
|
145
|
+
jwksUrl?: string;
|
|
146
|
+
/** A key set to verify against, which skips the fetch. For tests. */
|
|
147
|
+
jwks?: JSONWebKeySet;
|
|
148
|
+
/** The prefix your framework mounts the handler under, such as `/api`. */
|
|
149
|
+
basePath?: string;
|
|
150
|
+
/** Answers `GET /tappify/health`. Left out, the route answers `{ ok: true }`. */
|
|
151
|
+
health?: () => TappifyHealth | Promise<TappifyHealth>;
|
|
152
|
+
/** Answers `POST /tappify/metrics` for a connector contribution. */
|
|
153
|
+
metrics?: TappifyRouteHandler<MetricsInput, MetricsResponse>;
|
|
154
|
+
/** One handler per declared tool, answering `POST /tappify/tools/<id>`. */
|
|
155
|
+
tools?: {
|
|
156
|
+
[T in ToolId]?: TappifyRouteHandler<ToolInput<T>, unknown>;
|
|
157
|
+
};
|
|
158
|
+
/** One handler per declared mention, answering `GET /tappify/mentions/<id>?q=`. */
|
|
159
|
+
mentions?: Record<string, TappifyRouteHandler<{
|
|
160
|
+
q: string;
|
|
161
|
+
}, MentionItems>>;
|
|
162
|
+
/** One handler per declared action, answering `POST /tappify/actions/<id>`. */
|
|
163
|
+
actions?: {
|
|
164
|
+
[A in ActionId]?: TappifyRouteHandler<ActionInput<A>, unknown>;
|
|
165
|
+
};
|
|
166
|
+
/** One handler per declared procedure, which is what `useTapServer` calls. */
|
|
167
|
+
procedures?: {
|
|
168
|
+
[N in TapProcedureName]?: TappifyRouteHandler<TapProcedureInput<N>, TapProcedureOutput<N>>;
|
|
169
|
+
};
|
|
170
|
+
/** One handler per declared context block, answering `GET /tappify/context/<id>`. */
|
|
171
|
+
context?: Record<string, TappifyRouteHandler<undefined, ContextBlock>>;
|
|
172
|
+
/** One handler per Tappify event you subscribe to; each answers 204. */
|
|
173
|
+
events?: {
|
|
174
|
+
[E in keyof TapHostEvents]?: TappifyRouteHandler<undefined, void, TapHostEvents[E]>;
|
|
175
|
+
};
|
|
176
|
+
/** One handler per work operation, answering `POST /tappify/work/<operation>`. */
|
|
177
|
+
work?: {
|
|
178
|
+
[O in WorkOperation]?: TappifyRouteHandler<Record<string, unknown>, unknown>;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* What `createTappifyHandler` returns: a `fetch` handler, which is what Cloudflare
|
|
184
|
+
* Workers, Vercel and the two adapters all take.
|
|
185
|
+
*/
|
|
186
|
+
type TappifyFetchHandler = (request: Request) => Promise<Response>;
|
|
187
|
+
/**
|
|
188
|
+
* Builds the one `fetch` handler that answers every route Tappify calls on your
|
|
189
|
+
* server.
|
|
190
|
+
*
|
|
191
|
+
* @remarks
|
|
192
|
+
* It routes the paths under `/tappify`, minus `basePath` when your framework mounts
|
|
193
|
+
* it under a prefix, and hands each matched handler a `TappifyRequest`. Every
|
|
194
|
+
* route but `GET /tappify/health` needs a bearer install token, which it verifies
|
|
195
|
+
* with `verifyTappifyToken`, and an `X-Tappify-Event-Id` header; a missing token is
|
|
196
|
+
* 401 `TAP_TOKEN_MISSING`, a missing id 400 `TAP_EVENT_ID_MISSING`, an unknown path
|
|
197
|
+
* 404 `TAP_ROUTE_UNKNOWN` and a declared name with no handler 404
|
|
198
|
+
* `TAP_HANDLER_MISSING`. A body that is not JSON is 400 `TAP_BODY_INVALID` and one
|
|
199
|
+
* over 1 MB is 413 `TAP_BODY_TOO_LARGE`. A `TapServerError` a handler throws is
|
|
200
|
+
* answered with its own code and status, and a `TapError` other than the two token
|
|
201
|
+
* failures with its own code and 400; anything else becomes 500
|
|
202
|
+
* `TAP_INTERNAL_ERROR` with a fixed message, so an internal failure never reaches
|
|
203
|
+
* the owner. An events route answers 204 with no body, and every other route
|
|
204
|
+
* answers the handler's return value as JSON. Export the options object as well as
|
|
205
|
+
* the handler: `createTestClient` takes the options.
|
|
206
|
+
*
|
|
207
|
+
* @example
|
|
208
|
+
* ```ts
|
|
209
|
+
* import {
|
|
210
|
+
* createTappifyHandler,
|
|
211
|
+
* type TappifyHandlerOptions,
|
|
212
|
+
* } from '@tappify/extension-sdk/server';
|
|
213
|
+
*
|
|
214
|
+
* const handlerOptions: TappifyHandlerOptions = {
|
|
215
|
+
* extensionId: 'starter',
|
|
216
|
+
* health: () => ({ ok: true, version: '0.1.0' }),
|
|
217
|
+
* procedures: {
|
|
218
|
+
* getSummary: () => ({ installs: 1260, delta: 0.087, topKeyword: 'photo editor' }),
|
|
219
|
+
* },
|
|
220
|
+
* };
|
|
221
|
+
*
|
|
222
|
+
* const handler = createTappifyHandler(handlerOptions);
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
declare function createTappifyHandler(options: TappifyHandlerOptions): TappifyFetchHandler;
|
|
226
|
+
|
|
227
|
+
export { type ContextBlock as C, type MentionItems as M, type TappifyFetchHandler as T, type VerifyTokenOptions as V, type WorkOperation as W, type TappifyClaims as a, type MetricsInput as b, type MetricsResponse as c, type MetricsSeries as d, type TappifyCallContext as e, type TappifyDocuments as f, type TappifyHandlerOptions as g, type TappifyHealth as h, type TappifyInstall as i, type TappifyRequest as j, type TappifyRouteHandler as k, createTappifyHandler as l };
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { JSONWebKeySet } from 'jose';
|
|
2
|
+
import { K as TapPlatformFilter, a as TapFilters, $ as TapSettingsValues, w as TapCredentialValues, ab as ToolId, ac as ToolInput, A as ActionId, k as ActionInput, f as TapProcedureName, g as TapProcedureInput, h as TapProcedureOutput, c as TapHostEvents } from './types-DrpQSv_2.cjs';
|
|
3
|
+
|
|
4
|
+
/** Which install made the call, as the token's claims name it. */
|
|
5
|
+
interface TappifyInstall {
|
|
6
|
+
/** The install id, which is the key to scope anything you store yourself by. */
|
|
7
|
+
id: string;
|
|
8
|
+
extensionId: string;
|
|
9
|
+
/** `null` for an install on the workspace rather than one project. */
|
|
10
|
+
projectId: string | null;
|
|
11
|
+
organizationId: string;
|
|
12
|
+
}
|
|
13
|
+
/** The project and the filter bar the call was made from. */
|
|
14
|
+
interface TappifyCallContext {
|
|
15
|
+
projectId: string | null;
|
|
16
|
+
/** The same value as `filters.platform`, hoisted for convenience. */
|
|
17
|
+
platform: TapPlatformFilter;
|
|
18
|
+
/** The range start, as `YYYY-MM-DD`, or an empty string when none was sent. */
|
|
19
|
+
from: string;
|
|
20
|
+
/** The range end, as `YYYY-MM-DD`, or an empty string when none was sent. */
|
|
21
|
+
to: string;
|
|
22
|
+
filters: TapFilters;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The install- and organization-scoped storage documents Tappify passes to the
|
|
26
|
+
* server on every call, keyed by collection name.
|
|
27
|
+
*/
|
|
28
|
+
type TappifyDocuments = Record<string, unknown> & {
|
|
29
|
+
/** The settings contribution's document, or `null` before it is first saved. */
|
|
30
|
+
settings?: TapSettingsValues | null;
|
|
31
|
+
};
|
|
32
|
+
/** The verified claims of an install token, as `verifyTappifyToken` returns them. */
|
|
33
|
+
interface TappifyClaims {
|
|
34
|
+
iss: string;
|
|
35
|
+
/** Always `ext:<extensionId>`, which is what the verifier checked. */
|
|
36
|
+
aud: string;
|
|
37
|
+
exp: number;
|
|
38
|
+
iat: number;
|
|
39
|
+
installId: string;
|
|
40
|
+
extensionId: string;
|
|
41
|
+
projectId: string | null;
|
|
42
|
+
organizationId: string;
|
|
43
|
+
/** The scopes the install granted, as strings. */
|
|
44
|
+
scopes: string[];
|
|
45
|
+
/** Present when the token carries one, naming the teammate behind the call. */
|
|
46
|
+
userId?: string;
|
|
47
|
+
}
|
|
48
|
+
/** The single argument every route handler receives. */
|
|
49
|
+
interface TappifyRequest<TInput = unknown, TEvent = unknown> {
|
|
50
|
+
install: TappifyInstall;
|
|
51
|
+
context: TappifyCallContext;
|
|
52
|
+
/**
|
|
53
|
+
* The call's `input`, or `{}` when the body carried none, and `undefined` on a
|
|
54
|
+
* context or events route, which take no input.
|
|
55
|
+
*/
|
|
56
|
+
input: TInput;
|
|
57
|
+
credentials: TapCredentialValues;
|
|
58
|
+
documents: TappifyDocuments;
|
|
59
|
+
/** The event payload on an events route, and `undefined` on every other. */
|
|
60
|
+
event: TEvent | undefined;
|
|
61
|
+
/** The idempotency key from `X-Tappify-Event-Id`; deduplicate writes on it. */
|
|
62
|
+
eventId: string;
|
|
63
|
+
claims: TappifyClaims;
|
|
64
|
+
/** The original request, for a header or the raw body. */
|
|
65
|
+
request: Request;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The signature every entry in `TappifyHandlerOptions` has: one argument, and a
|
|
69
|
+
* value or a promise of one.
|
|
70
|
+
*/
|
|
71
|
+
type TappifyRouteHandler<TInput = unknown, TOutput = unknown, TEvent = unknown> = (request: TappifyRequest<TInput, TEvent>) => TOutput | Promise<TOutput>;
|
|
72
|
+
/** What the `GET /tappify/health` route answers with. */
|
|
73
|
+
interface TappifyHealth {
|
|
74
|
+
/** Whether the server is ready to take calls; the publish check reads it. */
|
|
75
|
+
ok: boolean;
|
|
76
|
+
version?: string;
|
|
77
|
+
/** A line for the owner when the server is not ready. */
|
|
78
|
+
message?: string;
|
|
79
|
+
}
|
|
80
|
+
/** What Tappify asks a connector's metrics route for. */
|
|
81
|
+
interface MetricsInput {
|
|
82
|
+
projectId: string | null;
|
|
83
|
+
platform: TapPlatformFilter;
|
|
84
|
+
/** The metric keys to answer for, from the ones the manifest declares. */
|
|
85
|
+
metrics: string[];
|
|
86
|
+
from: string;
|
|
87
|
+
to: string;
|
|
88
|
+
}
|
|
89
|
+
/** One metric's answer inside a `MetricsResponse`. */
|
|
90
|
+
interface MetricsSeries {
|
|
91
|
+
/** The declared metric key this series answers for. */
|
|
92
|
+
metric: string;
|
|
93
|
+
/** Has to match the unit the manifest declares for that key. */
|
|
94
|
+
unit: 'count' | 'ratio' | 'currency' | 'seconds' | 'bytes';
|
|
95
|
+
/** One value per declared dimension, when the series is broken down. */
|
|
96
|
+
dimensions?: Record<string, string>;
|
|
97
|
+
/** `[timestamp, value]` pairs, oldest first. */
|
|
98
|
+
points: [string, number][];
|
|
99
|
+
}
|
|
100
|
+
/** What a connector's metrics route answers with: one series per asked metric. */
|
|
101
|
+
interface MetricsResponse {
|
|
102
|
+
series: MetricsSeries[];
|
|
103
|
+
}
|
|
104
|
+
/** What a mention route answers with: the items the owner can pick from. */
|
|
105
|
+
interface MentionItems {
|
|
106
|
+
items: {
|
|
107
|
+
id: string;
|
|
108
|
+
label: string;
|
|
109
|
+
}[];
|
|
110
|
+
}
|
|
111
|
+
/** What a context route answers with, for the owner's chat to read. */
|
|
112
|
+
interface ContextBlock {
|
|
113
|
+
/** A line of prose the assistant can use as it is. */
|
|
114
|
+
summary: string;
|
|
115
|
+
/** The numbers behind the summary, for the assistant to quote. */
|
|
116
|
+
data?: Record<string, unknown>;
|
|
117
|
+
}
|
|
118
|
+
/** The work-tracker operations a handler's `work` table can answer. */
|
|
119
|
+
type WorkOperation = 'list_containers' | 'create' | 'attach' | 'comment' | 'status' | 'resolve';
|
|
120
|
+
/** The second argument of `verifyTappifyToken`. */
|
|
121
|
+
interface VerifyTokenOptions {
|
|
122
|
+
/** The `id` from the manifest; the token's audience has to be `ext:<id>`. */
|
|
123
|
+
extensionId: string;
|
|
124
|
+
/** Where to fetch the signing keys. Defaults to `DEFAULT_JWKS_URL`. */
|
|
125
|
+
jwksUrl?: string;
|
|
126
|
+
/** A key set to verify against, which skips the fetch. For tests. */
|
|
127
|
+
jwks?: JSONWebKeySet;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The routes and settings `createTappifyHandler` builds a fetch handler from.
|
|
131
|
+
*
|
|
132
|
+
* @remarks
|
|
133
|
+
* The `tools`, `actions` and `procedures` tables are keyed by the names the
|
|
134
|
+
* augmentation `tappify extension types` writes, so a handler for an undeclared
|
|
135
|
+
* name does not compile. `events` is keyed by Tappify's own event catalogue and
|
|
136
|
+
* `work` by the fixed set of work operations; `mentions` and `context` take any id.
|
|
137
|
+
* A route Tappify calls with no handler registered answers 404 with
|
|
138
|
+
* `TAP_HANDLER_MISSING`. Export this object as well as the handler: the testing
|
|
139
|
+
* entry's `createTestClient` takes the options, not the built handler.
|
|
140
|
+
*/
|
|
141
|
+
interface TappifyHandlerOptions {
|
|
142
|
+
/** The `id` from the manifest, which the install token's audience has to match. */
|
|
143
|
+
extensionId: string;
|
|
144
|
+
/** Where to fetch the signing keys. Defaults to `DEFAULT_JWKS_URL`. */
|
|
145
|
+
jwksUrl?: string;
|
|
146
|
+
/** A key set to verify against, which skips the fetch. For tests. */
|
|
147
|
+
jwks?: JSONWebKeySet;
|
|
148
|
+
/** The prefix your framework mounts the handler under, such as `/api`. */
|
|
149
|
+
basePath?: string;
|
|
150
|
+
/** Answers `GET /tappify/health`. Left out, the route answers `{ ok: true }`. */
|
|
151
|
+
health?: () => TappifyHealth | Promise<TappifyHealth>;
|
|
152
|
+
/** Answers `POST /tappify/metrics` for a connector contribution. */
|
|
153
|
+
metrics?: TappifyRouteHandler<MetricsInput, MetricsResponse>;
|
|
154
|
+
/** One handler per declared tool, answering `POST /tappify/tools/<id>`. */
|
|
155
|
+
tools?: {
|
|
156
|
+
[T in ToolId]?: TappifyRouteHandler<ToolInput<T>, unknown>;
|
|
157
|
+
};
|
|
158
|
+
/** One handler per declared mention, answering `GET /tappify/mentions/<id>?q=`. */
|
|
159
|
+
mentions?: Record<string, TappifyRouteHandler<{
|
|
160
|
+
q: string;
|
|
161
|
+
}, MentionItems>>;
|
|
162
|
+
/** One handler per declared action, answering `POST /tappify/actions/<id>`. */
|
|
163
|
+
actions?: {
|
|
164
|
+
[A in ActionId]?: TappifyRouteHandler<ActionInput<A>, unknown>;
|
|
165
|
+
};
|
|
166
|
+
/** One handler per declared procedure, which is what `useTapServer` calls. */
|
|
167
|
+
procedures?: {
|
|
168
|
+
[N in TapProcedureName]?: TappifyRouteHandler<TapProcedureInput<N>, TapProcedureOutput<N>>;
|
|
169
|
+
};
|
|
170
|
+
/** One handler per declared context block, answering `GET /tappify/context/<id>`. */
|
|
171
|
+
context?: Record<string, TappifyRouteHandler<undefined, ContextBlock>>;
|
|
172
|
+
/** One handler per Tappify event you subscribe to; each answers 204. */
|
|
173
|
+
events?: {
|
|
174
|
+
[E in keyof TapHostEvents]?: TappifyRouteHandler<undefined, void, TapHostEvents[E]>;
|
|
175
|
+
};
|
|
176
|
+
/** One handler per work operation, answering `POST /tappify/work/<operation>`. */
|
|
177
|
+
work?: {
|
|
178
|
+
[O in WorkOperation]?: TappifyRouteHandler<Record<string, unknown>, unknown>;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* What `createTappifyHandler` returns: a `fetch` handler, which is what Cloudflare
|
|
184
|
+
* Workers, Vercel and the two adapters all take.
|
|
185
|
+
*/
|
|
186
|
+
type TappifyFetchHandler = (request: Request) => Promise<Response>;
|
|
187
|
+
/**
|
|
188
|
+
* Builds the one `fetch` handler that answers every route Tappify calls on your
|
|
189
|
+
* server.
|
|
190
|
+
*
|
|
191
|
+
* @remarks
|
|
192
|
+
* It routes the paths under `/tappify`, minus `basePath` when your framework mounts
|
|
193
|
+
* it under a prefix, and hands each matched handler a `TappifyRequest`. Every
|
|
194
|
+
* route but `GET /tappify/health` needs a bearer install token, which it verifies
|
|
195
|
+
* with `verifyTappifyToken`, and an `X-Tappify-Event-Id` header; a missing token is
|
|
196
|
+
* 401 `TAP_TOKEN_MISSING`, a missing id 400 `TAP_EVENT_ID_MISSING`, an unknown path
|
|
197
|
+
* 404 `TAP_ROUTE_UNKNOWN` and a declared name with no handler 404
|
|
198
|
+
* `TAP_HANDLER_MISSING`. A body that is not JSON is 400 `TAP_BODY_INVALID` and one
|
|
199
|
+
* over 1 MB is 413 `TAP_BODY_TOO_LARGE`. A `TapServerError` a handler throws is
|
|
200
|
+
* answered with its own code and status, and a `TapError` other than the two token
|
|
201
|
+
* failures with its own code and 400; anything else becomes 500
|
|
202
|
+
* `TAP_INTERNAL_ERROR` with a fixed message, so an internal failure never reaches
|
|
203
|
+
* the owner. An events route answers 204 with no body, and every other route
|
|
204
|
+
* answers the handler's return value as JSON. Export the options object as well as
|
|
205
|
+
* the handler: `createTestClient` takes the options.
|
|
206
|
+
*
|
|
207
|
+
* @example
|
|
208
|
+
* ```ts
|
|
209
|
+
* import {
|
|
210
|
+
* createTappifyHandler,
|
|
211
|
+
* type TappifyHandlerOptions,
|
|
212
|
+
* } from '@tappify/extension-sdk/server';
|
|
213
|
+
*
|
|
214
|
+
* const handlerOptions: TappifyHandlerOptions = {
|
|
215
|
+
* extensionId: 'starter',
|
|
216
|
+
* health: () => ({ ok: true, version: '0.1.0' }),
|
|
217
|
+
* procedures: {
|
|
218
|
+
* getSummary: () => ({ installs: 1260, delta: 0.087, topKeyword: 'photo editor' }),
|
|
219
|
+
* },
|
|
220
|
+
* };
|
|
221
|
+
*
|
|
222
|
+
* const handler = createTappifyHandler(handlerOptions);
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
declare function createTappifyHandler(options: TappifyHandlerOptions): TappifyFetchHandler;
|
|
226
|
+
|
|
227
|
+
export { type ContextBlock as C, type MentionItems as M, type TappifyFetchHandler as T, type VerifyTokenOptions as V, type WorkOperation as W, type TappifyClaims as a, type MetricsInput as b, type MetricsResponse as c, type MetricsSeries as d, type TappifyCallContext as e, type TappifyDocuments as f, type TappifyHandlerOptions as g, type TappifyHealth as h, type TappifyInstall as i, type TappifyRequest as j, type TappifyRouteHandler as k, createTappifyHandler as l };
|
package/dist/host.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkJMUK3K47cjs = require('./chunk-JMUK3K47.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
7
|
+
var _chunkOPPYEA7Fcjs = require('./chunk-OPPYEA7F.cjs');
|
|
8
|
+
require('./chunk-2DBSVKAU.cjs');
|
|
9
9
|
require('./chunk-Q7SFCCGT.cjs');
|
|
10
10
|
|
|
11
11
|
// src/host/collect-styles.ts
|
|
@@ -21,5 +21,5 @@ function collectStyles(remoteModule) {
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
exports.TapContext =
|
|
24
|
+
exports.TapContext = _chunkOPPYEA7Fcjs.TapContext; exports.TapHostProvider = _chunkJMUK3K47cjs.TapHostProvider; exports.collectStyles = collectStyles; exports.createHostQueryClient = _chunkJMUK3K47cjs.createHostQueryClient;
|
|
25
25
|
//# sourceMappingURL=host.cjs.map
|
package/dist/host.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { T as TapContext } from './context-
|
|
2
|
-
import { T as Tap } from './types-
|
|
3
|
-
export { A as ActionId, k as ActionInput, P as PromptId, l as PromptInput, m as TapActionMap, n as TapActionRun, o as TapApp, p as TapChangeKey, q as TapChatCard, r as TapCollection, s as TapComparisonSide, t as TapConfirmOptions, u as TapCrashIssue, v as TapCrashesResult, w as TapCredentialValues, x as TapCredentials, y as TapDateRange, a as TapFilters, z as TapFormatters, B as TapHostEventMap, c as TapHostEvents, C as TapInternals, D as TapKeyword, E as TapKeywordsResult, F as TapListing, G as TapListingResult, H as TapPageProps, I as TapPath, J as TapPlatform, K as TapPlatformFilter, g as TapProcedureInput, L as TapProcedureMap, f as TapProcedureName, h as TapProcedureOutput, M as TapProcedures, N as TapProjectResult, O as TapPromptMap, d as TapQuery, Q as TapRelease, e as TapResult, R as TapRevenueResult, S as TapReview, U as TapReviewsResult, V as TapRowActionProps, W as TapSeriesMetric, X as TapSeriesPoint, Y as TapSeriesResult, Z as TapSettings, _ as TapSettingsProps, $ as TapSettingsValues, a0 as TapSingleton, j as TapSingletonDocument, i as TapSingletonName, b as TapSize, a1 as TapStorage, a2 as TapStorageMap, a3 as TapTabProps, a4 as TapTableColumn, a5 as TapTelemetryEvents, a6 as TapToastTone, a7 as TapToolMap, a8 as TapWebhookMap, a9 as TapWidgetProps, aa as TelemetryEvent, ab as ToolId, ac as ToolInput, ad as WebhookName, ae as WebhookPayload } from './types-
|
|
1
|
+
export { T as TapContext } from './context-Dt6xh_5t.cjs';
|
|
2
|
+
import { T as Tap } from './types-DrpQSv_2.cjs';
|
|
3
|
+
export { A as ActionId, k as ActionInput, P as PromptId, l as PromptInput, m as TapActionMap, n as TapActionRun, o as TapApp, p as TapChangeKey, q as TapChatCard, r as TapCollection, s as TapComparisonSide, t as TapConfirmOptions, u as TapCrashIssue, v as TapCrashesResult, w as TapCredentialValues, x as TapCredentials, y as TapDateRange, a as TapFilters, z as TapFormatters, B as TapHostEventMap, c as TapHostEvents, C as TapInternals, D as TapKeyword, E as TapKeywordsResult, F as TapListing, G as TapListingResult, H as TapPageProps, I as TapPath, J as TapPlatform, K as TapPlatformFilter, g as TapProcedureInput, L as TapProcedureMap, f as TapProcedureName, h as TapProcedureOutput, M as TapProcedures, N as TapProjectResult, O as TapPromptMap, d as TapQuery, Q as TapRelease, e as TapResult, R as TapRevenueResult, S as TapReview, U as TapReviewsResult, V as TapRowActionProps, W as TapSeriesMetric, X as TapSeriesPoint, Y as TapSeriesResult, Z as TapSettings, _ as TapSettingsProps, $ as TapSettingsValues, a0 as TapSingleton, j as TapSingletonDocument, i as TapSingletonName, b as TapSize, a1 as TapStorage, a2 as TapStorageMap, a3 as TapTabProps, a4 as TapTableColumn, a5 as TapTelemetryEvents, a6 as TapToastTone, a7 as TapToolMap, a8 as TapWebhookMap, a9 as TapWidgetProps, aa as TelemetryEvent, ab as ToolId, ac as ToolInput, ad as WebhookName, ae as WebhookPayload } from './types-DrpQSv_2.cjs';
|
|
4
4
|
import { QueryClient } from '@tanstack/react-query';
|
|
5
5
|
import { ReactNode, ReactElement } from 'react';
|
|
6
|
-
export { D as DataQueryKind, H as HostEventName, a as HostPage, S as ScopeKey, b as SlotId } from './constants-
|
|
6
|
+
export { D as DataQueryKind, H as HostEventName, a as HostPage, S as ScopeKey, b as SlotId } from './constants-DJ_KgZpN.cjs';
|
|
7
7
|
|
|
8
8
|
declare function collectStyles(remoteModule: unknown): string[];
|
|
9
9
|
|
package/dist/host.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { T as TapContext } from './context-
|
|
2
|
-
import { T as Tap } from './types-
|
|
3
|
-
export { A as ActionId, k as ActionInput, P as PromptId, l as PromptInput, m as TapActionMap, n as TapActionRun, o as TapApp, p as TapChangeKey, q as TapChatCard, r as TapCollection, s as TapComparisonSide, t as TapConfirmOptions, u as TapCrashIssue, v as TapCrashesResult, w as TapCredentialValues, x as TapCredentials, y as TapDateRange, a as TapFilters, z as TapFormatters, B as TapHostEventMap, c as TapHostEvents, C as TapInternals, D as TapKeyword, E as TapKeywordsResult, F as TapListing, G as TapListingResult, H as TapPageProps, I as TapPath, J as TapPlatform, K as TapPlatformFilter, g as TapProcedureInput, L as TapProcedureMap, f as TapProcedureName, h as TapProcedureOutput, M as TapProcedures, N as TapProjectResult, O as TapPromptMap, d as TapQuery, Q as TapRelease, e as TapResult, R as TapRevenueResult, S as TapReview, U as TapReviewsResult, V as TapRowActionProps, W as TapSeriesMetric, X as TapSeriesPoint, Y as TapSeriesResult, Z as TapSettings, _ as TapSettingsProps, $ as TapSettingsValues, a0 as TapSingleton, j as TapSingletonDocument, i as TapSingletonName, b as TapSize, a1 as TapStorage, a2 as TapStorageMap, a3 as TapTabProps, a4 as TapTableColumn, a5 as TapTelemetryEvents, a6 as TapToastTone, a7 as TapToolMap, a8 as TapWebhookMap, a9 as TapWidgetProps, aa as TelemetryEvent, ab as ToolId, ac as ToolInput, ad as WebhookName, ae as WebhookPayload } from './types-
|
|
1
|
+
export { T as TapContext } from './context-Ml7k_V14.js';
|
|
2
|
+
import { T as Tap } from './types-DDAGLpov.js';
|
|
3
|
+
export { A as ActionId, k as ActionInput, P as PromptId, l as PromptInput, m as TapActionMap, n as TapActionRun, o as TapApp, p as TapChangeKey, q as TapChatCard, r as TapCollection, s as TapComparisonSide, t as TapConfirmOptions, u as TapCrashIssue, v as TapCrashesResult, w as TapCredentialValues, x as TapCredentials, y as TapDateRange, a as TapFilters, z as TapFormatters, B as TapHostEventMap, c as TapHostEvents, C as TapInternals, D as TapKeyword, E as TapKeywordsResult, F as TapListing, G as TapListingResult, H as TapPageProps, I as TapPath, J as TapPlatform, K as TapPlatformFilter, g as TapProcedureInput, L as TapProcedureMap, f as TapProcedureName, h as TapProcedureOutput, M as TapProcedures, N as TapProjectResult, O as TapPromptMap, d as TapQuery, Q as TapRelease, e as TapResult, R as TapRevenueResult, S as TapReview, U as TapReviewsResult, V as TapRowActionProps, W as TapSeriesMetric, X as TapSeriesPoint, Y as TapSeriesResult, Z as TapSettings, _ as TapSettingsProps, $ as TapSettingsValues, a0 as TapSingleton, j as TapSingletonDocument, i as TapSingletonName, b as TapSize, a1 as TapStorage, a2 as TapStorageMap, a3 as TapTabProps, a4 as TapTableColumn, a5 as TapTelemetryEvents, a6 as TapToastTone, a7 as TapToolMap, a8 as TapWebhookMap, a9 as TapWidgetProps, aa as TelemetryEvent, ab as ToolId, ac as ToolInput, ad as WebhookName, ae as WebhookPayload } from './types-DDAGLpov.js';
|
|
4
4
|
import { QueryClient } from '@tanstack/react-query';
|
|
5
5
|
import { ReactNode, ReactElement } from 'react';
|
|
6
|
-
export { D as DataQueryKind, H as HostEventName, a as HostPage, S as ScopeKey, b as SlotId } from './constants-
|
|
6
|
+
export { D as DataQueryKind, H as HostEventName, a as HostPage, S as ScopeKey, b as SlotId } from './constants-DJ_KgZpN.js';
|
|
7
7
|
|
|
8
8
|
declare function collectStyles(remoteModule: unknown): string[];
|
|
9
9
|
|
package/dist/host.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TapHostProvider,
|
|
3
3
|
createHostQueryClient
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GG3IX52W.mjs";
|
|
5
5
|
import {
|
|
6
6
|
TapContext
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-QHM7XNRK.mjs";
|
|
8
|
+
import "./chunk-CSTYBKZC.mjs";
|
|
9
9
|
import "./chunk-J5LGTIGS.mjs";
|
|
10
10
|
|
|
11
11
|
// src/host/collect-styles.ts
|
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -13,18 +13,33 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
var _chunkEW54H7CRcjs = require('./chunk-EW54H7CR.cjs');
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
|
|
19
|
-
var _chunkGAUZYBXEcjs = require('./chunk-GAUZYBXE.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var _chunkPRCZMOLDcjs = require('./chunk-PRCZMOLD.cjs');
|
|
23
22
|
|
|
24
23
|
|
|
25
24
|
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
var _chunk5AAPD5WVcjs = require('./chunk-5AAPD5WV.cjs');
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
var _chunkOPPYEA7Fcjs = require('./chunk-OPPYEA7F.cjs');
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
var _chunk2DBSVKAUcjs = require('./chunk-2DBSVKAU.cjs');
|
|
28
43
|
require('./chunk-Q7SFCCGT.cjs');
|
|
29
44
|
|
|
30
45
|
|
|
@@ -47,5 +62,19 @@ require('./chunk-Q7SFCCGT.cjs');
|
|
|
47
62
|
|
|
48
63
|
|
|
49
64
|
|
|
50
|
-
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
exports.TAP_ERROR_CODES = _chunk2DBSVKAUcjs.TAP_ERROR_CODES; exports.TapButton = _chunkEW54H7CRcjs.TapButton; exports.TapCard = _chunkEW54H7CRcjs.TapCard; exports.TapDialog = _chunkEW54H7CRcjs.TapDialog; exports.TapEmptyState = _chunkEW54H7CRcjs.TapEmptyState; exports.TapError = _chunk2DBSVKAUcjs.TapError; exports.TapErrorState = _chunkEW54H7CRcjs.TapErrorState; exports.TapForm = _chunkEW54H7CRcjs.TapForm; exports.TapInput = _chunkEW54H7CRcjs.TapInput; exports.TapPageHeader = _chunkEW54H7CRcjs.TapPageHeader; exports.TapSelect = _chunkEW54H7CRcjs.TapSelect; exports.TapServerError = _chunk2DBSVKAUcjs.TapServerError; exports.TapSkeleton = _chunkEW54H7CRcjs.TapSkeleton; exports.TapStat = _chunkEW54H7CRcjs.TapStat; exports.TapTable = _chunkEW54H7CRcjs.TapTable; exports.cn = _chunkEW54H7CRcjs.cn; exports.dataQueryKey = _chunk5AAPD5WVcjs.dataQueryKey; exports.formFields = _chunkEW54H7CRcjs.formFields; exports.installPrefix = _chunk5AAPD5WVcjs.installPrefix; exports.procedurePrefix = _chunk5AAPD5WVcjs.procedurePrefix; exports.procedureQueryKey = _chunk5AAPD5WVcjs.procedureQueryKey; exports.storageQueryKey = _chunk5AAPD5WVcjs.storageQueryKey; exports.useTap = _chunkOPPYEA7Fcjs.useTap; exports.useTapAuth = _chunk5AAPD5WVcjs.useTapAuth; exports.useTapContext = _chunk5AAPD5WVcjs.useTapContext; exports.useTapFilters = _chunk5AAPD5WVcjs.useTapFilters; exports.useTapParams = _chunk5AAPD5WVcjs.useTapParams; exports.useTapProject = _chunk5AAPD5WVcjs.useTapProject; exports.useTapQuery = _chunk5AAPD5WVcjs.useTapQuery; exports.useTapServer = _chunk5AAPD5WVcjs.useTapServer; exports.useTapSize = _chunk5AAPD5WVcjs.useTapSize; exports.useTapState = _chunk5AAPD5WVcjs.useTapState; exports.useTapStorage = _chunk5AAPD5WVcjs.useTapStorage; exports.useTapTheme = _chunk5AAPD5WVcjs.useTapTheme;
|
|
51
80
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/extension-sdk/extension-sdk/dist/index.cjs"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/extension-sdk/extension-sdk/dist/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,iwDAAC","file":"/home/runner/work/extension-sdk/extension-sdk/dist/index.cjs"}
|