@forumulate/sdk 0.1.0 → 0.3.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 +138 -65
- package/dist/index.d.ts +89 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +109 -12
- package/dist/index.js.map +1 -1
- package/dist/schema.d.ts +212036 -32654
- package/dist/schema.d.ts.map +1 -1
- package/dist/typed.d.ts +12 -1
- package/dist/typed.d.ts.map +1 -1
- package/dist/types.d.ts +59 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,114 +1,187 @@
|
|
|
1
1
|
# @forumulate/sdk
|
|
2
2
|
|
|
3
|
-
A typed TypeScript client for the Forumulate REST API.
|
|
4
|
-
`fetch`) and the browser.
|
|
3
|
+
A typed TypeScript client for the [Forumulate](https://forumulate.com) REST API: docs, forum, blog and everything else in an organization. It has no runtime dependencies and runs in Node 18+, Bun, Deno and the browser (global `fetch`).
|
|
5
4
|
|
|
6
5
|
## Install
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
```sh
|
|
8
|
+
npm install @forumulate/sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Authenticate
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
Mint a Personal Access Token at **Account → Tokens** ([forumulate.com/account/tokens](https://forumulate.com/account/tokens)). A token needs `read` to read and `read` + `write` to change anything. [API tokens and scopes](https://forumulate.com/guides/api-tokens-and-scopes) explains the two gates a token passes.
|
|
12
14
|
|
|
13
15
|
```ts
|
|
14
16
|
import { ForumulateClient } from '@forumulate/sdk';
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
token: process.env.FORUMULATE_TOKEN, // a Personal Access Token
|
|
19
|
-
});
|
|
18
|
+
// Reads FORUMULATE_TOKEN and FORUMULATE_URL (default https://forumulate.com).
|
|
19
|
+
const forumulate = ForumulateClient.fromEnv();
|
|
20
20
|
|
|
21
|
-
//
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
26
|
-
const { collection } = await forumulate.spaces.createCollection(organization.id, space.id, {
|
|
27
|
-
name: 'Guides', slug: 'guides',
|
|
21
|
+
// …or explicitly. The API base is the site plus /api.
|
|
22
|
+
const explicit = new ForumulateClient({
|
|
23
|
+
baseUrl: 'https://forumulate.com/api',
|
|
24
|
+
token: process.env.FORUMULATE_TOKEN,
|
|
28
25
|
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
| Variable | Default | Meaning |
|
|
29
|
+
| -------------------- | ------------------------ | -------------------------------------------------------------------------------- |
|
|
30
|
+
| `FORUMULATE_TOKEN` | none | Personal Access Token, sent as `Authorization: Bearer`. |
|
|
31
|
+
| `FORUMULATE_URL` | `https://forumulate.com` | The site. The API is its `/api`. A value already ending in `/api` is used as-is. |
|
|
32
|
+
| `FORUMULATE_API_URL` | none | Exact API base, for a local API with no `/api` prefix (`http://localhost:4000`). |
|
|
33
|
+
|
|
34
|
+
The [CLI](https://www.npmjs.com/package/@forumulate/cli) and the [MCP server](https://www.npmjs.com/package/@forumulate/mcp) read the same variables.
|
|
35
|
+
|
|
36
|
+
## Quickstart
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
const { user } = await forumulate.auth.me();
|
|
40
|
+
const { orgs } = await forumulate.orgs.list();
|
|
41
|
+
const orgId = orgs[0]!.id; // ids and slugs are both accepted wherever an org id is
|
|
42
|
+
const { spaces } = await forumulate.spaces.list(orgId);
|
|
43
|
+
console.log(
|
|
44
|
+
user.email,
|
|
45
|
+
spaces.map((s) => `${s.slug} [${s.type}]`),
|
|
46
|
+
);
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Common tasks
|
|
50
|
+
|
|
51
|
+
### 1. Write and publish a page from markdown
|
|
52
|
+
|
|
53
|
+
`items` is the type-agnostic surface: the same calls write a docs page, a blog post or a forum topic.
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
const { item } = await forumulate.items.create(orgId, spaceId, {
|
|
57
|
+
title: 'Install',
|
|
58
|
+
slug: 'install',
|
|
59
|
+
body: '# Install\n\nRun `npm i acme`.',
|
|
35
60
|
});
|
|
36
|
-
await forumulate.
|
|
61
|
+
await forumulate.items.publish(orgId, spaceId, item.id);
|
|
37
62
|
|
|
38
|
-
//
|
|
39
|
-
|
|
63
|
+
// Later: replace the body and republish.
|
|
64
|
+
await forumulate.items.setContent(orgId, spaceId, item.id, { body: '# Install\n\n…' });
|
|
65
|
+
await forumulate.items.publish(orgId, spaceId, item.id);
|
|
40
66
|
```
|
|
41
67
|
|
|
42
|
-
###
|
|
68
|
+
### 2. List everything in a space, with content
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
const res = await forumulate.items.list(orgId, spaceId, { limit: 100, include: ['body'] });
|
|
72
|
+
for (const it of res.items) console.log(it.id, it.title, it.contentIn);
|
|
73
|
+
// res.page.nextCursor pages onward; res.sync.checkpoint drives an incremental sync.
|
|
74
|
+
```
|
|
43
75
|
|
|
44
|
-
|
|
45
|
-
|
|
76
|
+
Ask for `body`. `sections` is filled only for pieces written against a shape, so a space of free-form pages answers `include: ['sections']` alone with empty objects.
|
|
77
|
+
|
|
78
|
+
### 3. Search
|
|
46
79
|
|
|
47
80
|
```ts
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
81
|
+
// Everything you can see in an org: docs, forum, blog.
|
|
82
|
+
const { hits } = await forumulate.search.unified(orgId, 'rate limits', { limit: 10 });
|
|
83
|
+
|
|
84
|
+
// A public docs space, no token needed.
|
|
85
|
+
const anon = new ForumulateClient({ baseUrl: 'https://forumulate.com/api' });
|
|
86
|
+
const { hits: pub } = await anon.public.search(orgId, spaceId, 'rate limits');
|
|
54
87
|
```
|
|
55
88
|
|
|
56
|
-
###
|
|
89
|
+
### 4. Start a forum topic and reply
|
|
57
90
|
|
|
58
91
|
```ts
|
|
59
|
-
const
|
|
92
|
+
const doc = (text: string) => ({
|
|
93
|
+
type: 'doc' as const,
|
|
94
|
+
content: [{ type: 'paragraph', content: [{ type: 'text', text }] }],
|
|
95
|
+
});
|
|
96
|
+
const { topic } = await forumulate.forum.createTopic(orgId, forumSpaceId, {
|
|
97
|
+
title: 'v2 is out',
|
|
98
|
+
content: doc('Here is what changed.'),
|
|
99
|
+
});
|
|
100
|
+
const topicId = (topic as { id: string }).id;
|
|
101
|
+
await forumulate.forum.reply(orgId, forumSpaceId, topicId, doc('Upgrade notes are in the docs.'));
|
|
60
102
|
```
|
|
61
103
|
|
|
62
|
-
###
|
|
104
|
+
### 5. Verify a webhook
|
|
63
105
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
106
|
+
```ts
|
|
107
|
+
import { verifyWebhookSignature } from '@forumulate/sdk';
|
|
108
|
+
|
|
109
|
+
const ok = await verifyWebhookSignature({
|
|
110
|
+
secret: process.env.FORUMULATE_WEBHOOK_SECRET!,
|
|
111
|
+
body: rawBody, // the exact bytes received, before JSON.parse
|
|
112
|
+
signature: req.headers['x-forumulate-signature'] as string,
|
|
113
|
+
timestamp: req.headers['x-forumulate-timestamp'] as string, // deliveries older than 5 min fail
|
|
114
|
+
});
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Create the webhook with `forumulate.webhooks.create(orgId, { url, events })`.
|
|
118
|
+
|
|
119
|
+
## Every endpoint: `typed()`
|
|
120
|
+
|
|
121
|
+
The helpers above cover the common paths. `typed(method, path, init)` covers every route in the OpenAPI spec, with the path, params, query, body and response all inferred, and autocomplete on path and method:
|
|
69
122
|
|
|
70
123
|
```ts
|
|
71
|
-
// Path param required and checked; response payload is typed from the spec.
|
|
72
124
|
const { spaces } = await forumulate.typed('get', '/orgs/{orgId}/spaces', {
|
|
73
125
|
params: { orgId },
|
|
74
|
-
query: {
|
|
126
|
+
query: { limit: 50 },
|
|
75
127
|
});
|
|
76
128
|
|
|
77
|
-
// POST body shape (including enum unions like `type`) comes from the schema.
|
|
78
129
|
await forumulate.typed('post', '/orgs/{orgId}/spaces', {
|
|
79
130
|
params: { orgId },
|
|
80
131
|
body: { name: 'Docs', slug: 'docs', type: 'DOCS', visibility: 'PUBLIC' },
|
|
81
132
|
});
|
|
82
133
|
```
|
|
83
134
|
|
|
84
|
-
`{
|
|
85
|
-
`raw: true` to get the untouched `Response` (e.g. for binary downloads).
|
|
135
|
+
Pass `raw: true` for the untouched `Response` (binary downloads). For anything else, `request(method, path, { body, query, headers })` is the untyped escape hatch that `typed` and the helpers use.
|
|
86
136
|
|
|
87
|
-
|
|
137
|
+
## Errors
|
|
88
138
|
|
|
89
|
-
|
|
90
|
-
helpers delegate to):
|
|
139
|
+
Every non-2xx response throws a `ForumulateError` carrying `status`, `code` and `message` from the API's error envelope.
|
|
91
140
|
|
|
92
141
|
```ts
|
|
93
|
-
|
|
142
|
+
import { ForumulateError } from '@forumulate/sdk';
|
|
143
|
+
|
|
144
|
+
try {
|
|
145
|
+
await forumulate.orgs.create({ name: '', slug: '' });
|
|
146
|
+
} catch (err) {
|
|
147
|
+
if (err instanceof ForumulateError && err.code === 'validation.failed') {
|
|
148
|
+
/* … */
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
A `401` means the token is missing or revoked. A `403` means it lacks a scope or capability; see [API tokens and scopes](https://forumulate.com/guides/api-tokens-and-scopes).
|
|
154
|
+
|
|
155
|
+
## Options
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
new ForumulateClient({
|
|
159
|
+
baseUrl: 'https://forumulate.com/api',
|
|
160
|
+
token,
|
|
161
|
+
headers: { 'Forumulate-Version': '2026-09-01' }, // pin the API version for this client
|
|
162
|
+
fetch: customFetch, // any fetch-compatible function
|
|
163
|
+
credentials: true, // browser on the same origin: send the session cookie instead of a token
|
|
164
|
+
});
|
|
94
165
|
```
|
|
95
166
|
|
|
96
|
-
|
|
167
|
+
Set a descriptive `User-Agent` when you run outside a browser: the edge firewall challenges default library User-Agents.
|
|
97
168
|
|
|
98
|
-
|
|
99
|
-
types-only (no runtime dependency), and large (~30k lines) — do not hand-edit it.
|
|
100
|
-
The **complete** machine-readable spec is served by the running API at
|
|
101
|
-
`/docs-json`; regenerate `schema.ts` from it whenever the API shape changes:
|
|
169
|
+
## Links
|
|
102
170
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
171
|
+
- [API reference](https://forumulate.com/reference): every route, with the OpenAPI document at `https://forumulate.com/api/openapi.json`.
|
|
172
|
+
- [Guides](https://forumulate.com/guides) · [Community](https://forumulate.com/community)
|
|
173
|
+
- [`@forumulate/cli`](https://www.npmjs.com/package/@forumulate/cli): the same API from a terminal or CI.
|
|
174
|
+
- [`@forumulate/mcp`](https://www.npmjs.com/package/@forumulate/mcp): connect Claude, Cursor or VS Code to your organization.
|
|
106
175
|
|
|
107
|
-
|
|
108
|
-
pnpm --filter @forumulate/sdk generate-schema # → src/schema.ts
|
|
109
|
-
# (equivalently: npx openapi-typescript openapi.json -o src/schema.ts)
|
|
176
|
+
## Maintainers: regenerating the types
|
|
110
177
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
178
|
+
`src/schema.ts` backs `typed()`. It is generated and types-only; do not hand-edit it. Refresh it from the deployed spec:
|
|
179
|
+
|
|
180
|
+
```sh
|
|
181
|
+
curl -s https://forumulate.com/api/openapi.json -o packages/sdk/openapi.json
|
|
182
|
+
pnpm --filter @forumulate/sdk generate-schema # → src/schema.ts
|
|
114
183
|
```
|
|
184
|
+
|
|
185
|
+
## License
|
|
186
|
+
|
|
187
|
+
MIT
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export * from './types';
|
|
2
2
|
export { verifyWebhookSignature, type VerifyWebhookInput } from './webhooks';
|
|
3
3
|
export type { paths } from './schema';
|
|
4
|
-
export type { HttpMethod, MethodsOf, OperationOf, TypedRequestInit, TypedResponse
|
|
4
|
+
export type { HttpMethod, MethodsOf, OperationOf, TypedRequestInit, TypedResponse } from './typed';
|
|
5
5
|
import type { paths } from './schema';
|
|
6
6
|
import type { HttpMethod, TypedRequestInit, TypedResponse } from './typed';
|
|
7
|
-
import type { Organization, Space, SpaceType, SpaceVisibility, Collection, Page, BlockDoc, SearchHit, UnifiedHit, Comment, Webhook, WebhookFormat, PublicPage, Conformance, Item, PageInfo, EffectiveShape, ShapeOverride } from './types';
|
|
7
|
+
import type { Organization, Space, SpaceType, SpaceVisibility, Collection, Page, BlockDoc, SearchHit, UnifiedHit, Comment, Webhook, WebhookFormat, PublicPage, Conformance, DomainSetup, DomainSummary, Item, PageInfo, EffectiveShape, ShapeOverride } from './types';
|
|
8
8
|
/** Thrown for any non-2xx API response. Mirrors the API's error envelope. */
|
|
9
9
|
export declare class ForumulateError extends Error {
|
|
10
10
|
readonly status: number;
|
|
@@ -12,7 +12,7 @@ export declare class ForumulateError extends Error {
|
|
|
12
12
|
constructor(status: number, code: string, message: string);
|
|
13
13
|
}
|
|
14
14
|
export interface ForumulateClientOptions {
|
|
15
|
-
/** API
|
|
15
|
+
/** API base, `https://forumulate.com/api` for the hosted product (see `fromEnv`). */
|
|
16
16
|
baseUrl: string;
|
|
17
17
|
/** Personal Access Token for `Authorization: Bearer` auth. */
|
|
18
18
|
token?: string;
|
|
@@ -20,27 +20,58 @@ export interface ForumulateClientOptions {
|
|
|
20
20
|
credentials?: boolean;
|
|
21
21
|
/** Injectable fetch (for tests / non-global-fetch runtimes). Defaults to global fetch. */
|
|
22
22
|
fetch?: typeof fetch;
|
|
23
|
+
/**
|
|
24
|
+
* Headers sent on EVERY request — `Forumulate-Version` is the one that
|
|
25
|
+
* matters here, because pinning the API version is a per-client decision and
|
|
26
|
+
* there was no way to express it at all.
|
|
27
|
+
*
|
|
28
|
+
* The client could send exactly two headers it chose itself, `Authorization`
|
|
29
|
+
* and `Content-Type`, and nothing else: so a caller could not pin a version
|
|
30
|
+
* and could not send `Idempotency-Key`, which `POST …/items` REQUIRES. The
|
|
31
|
+
* typed surface covered 1,225 operations and one of them was unreachable
|
|
32
|
+
* from the SDK that advertised it.
|
|
33
|
+
*/
|
|
34
|
+
headers?: Record<string, string>;
|
|
23
35
|
}
|
|
24
36
|
type Query = Record<string, string | number | boolean | undefined>;
|
|
25
37
|
/**
|
|
26
38
|
* Typed client for the Forumulate REST API.
|
|
27
39
|
*
|
|
28
40
|
* ```ts
|
|
29
|
-
* const forumulate = new ForumulateClient({ baseUrl: '
|
|
30
|
-
* const {
|
|
41
|
+
* const forumulate = new ForumulateClient({ baseUrl: 'https://forumulate.com/api', token: pat });
|
|
42
|
+
* const { orgs } = await forumulate.orgs.list();
|
|
43
|
+
*
|
|
44
|
+
* // or, from FORUMULATE_TOKEN / FORUMULATE_URL:
|
|
45
|
+
* const fromEnv = ForumulateClient.fromEnv();
|
|
31
46
|
* ```
|
|
32
47
|
*/
|
|
33
48
|
export declare class ForumulateClient {
|
|
34
49
|
private readonly baseUrl;
|
|
35
50
|
private readonly token?;
|
|
36
51
|
private readonly credentials;
|
|
52
|
+
private readonly defaultHeaders;
|
|
37
53
|
private readonly _fetch;
|
|
38
54
|
constructor(opts: ForumulateClientOptions);
|
|
55
|
+
/**
|
|
56
|
+
* A client configured from the environment, by the same names the CLI and
|
|
57
|
+
* `@forumulate/mcp` read — so one `.env` drives all three:
|
|
58
|
+
*
|
|
59
|
+
* - `FORUMULATE_TOKEN`: the Personal Access Token.
|
|
60
|
+
* - `FORUMULATE_URL`: the site, default `https://forumulate.com`; the API is
|
|
61
|
+
* its `/api` (a value already ending in `/api` is used as-is).
|
|
62
|
+
* - `FORUMULATE_API_URL`: the exact API base, for a local API with no `/api`
|
|
63
|
+
* prefix (`http://localhost:4000`). Wins over `FORUMULATE_URL`.
|
|
64
|
+
*
|
|
65
|
+
* `env` defaults to `process.env` where there is one (Node, Bun, Deno);
|
|
66
|
+
* anything in `opts` overrides what the environment said.
|
|
67
|
+
*/
|
|
68
|
+
static fromEnv(env?: Record<string, string | undefined>, opts?: Partial<ForumulateClientOptions>): ForumulateClient;
|
|
39
69
|
/** Low-level request. Exposed so callers can reach endpoints the typed helpers don't cover yet. */
|
|
40
70
|
request<T>(method: string, path: string, opts?: {
|
|
41
71
|
body?: unknown;
|
|
42
72
|
query?: Query;
|
|
43
73
|
raw?: boolean;
|
|
74
|
+
headers?: Record<string, string>;
|
|
44
75
|
}): Promise<T>;
|
|
45
76
|
/**
|
|
46
77
|
* Fully-typed request against ANY endpoint in the OpenAPI spec.
|
|
@@ -228,16 +259,68 @@ export declare class ForumulateClient {
|
|
|
228
259
|
sections: Record<string, string>;
|
|
229
260
|
};
|
|
230
261
|
}>;
|
|
231
|
-
/**
|
|
262
|
+
/**
|
|
263
|
+
* Make it readable. Kinds that are live on creation say so and change nothing.
|
|
264
|
+
*
|
|
265
|
+
* `conformance` describes the piece AFTER publishing — which declared slots
|
|
266
|
+
* are filled and which are still missing — so an agent that has just made
|
|
267
|
+
* its work readable can tell a complete piece from one with holes in it
|
|
268
|
+
* without fetching it again. The server has always sent it and this type
|
|
269
|
+
* omitted it, so a TypeScript caller could not see the field the docs
|
|
270
|
+
* promise (E-11).
|
|
271
|
+
*/
|
|
232
272
|
publish: (orgId: string, spaceId: string, itemId: string) => Promise<{
|
|
233
273
|
published: boolean;
|
|
234
274
|
note?: string;
|
|
275
|
+
conformance: Conformance;
|
|
276
|
+
}>;
|
|
277
|
+
/**
|
|
278
|
+
* Replace a piece's whole body — as markdown, or as blocks.
|
|
279
|
+
*
|
|
280
|
+
* The create door has always taken markdown and this one took blocks only,
|
|
281
|
+
* so "make it from this file" worked and "update it from the same file" did
|
|
282
|
+
* not. Both now; blocks win if a caller sends both.
|
|
283
|
+
*/
|
|
284
|
+
setContent: (orgId: string, spaceId: string, itemId: string, input: {
|
|
285
|
+
body?: string;
|
|
286
|
+
content?: BlockDoc;
|
|
287
|
+
}) => Promise<{
|
|
288
|
+
conformance: Conformance;
|
|
235
289
|
}>;
|
|
236
290
|
/** Replace one named section. Idempotent — sending it twice writes it once. */
|
|
237
291
|
setSection: (orgId: string, spaceId: string, itemId: string, key: string, markdown: string) => Promise<{
|
|
238
292
|
conformance: Conformance;
|
|
239
293
|
}>;
|
|
240
294
|
};
|
|
295
|
+
/**
|
|
296
|
+
* The addresses a space answers at.
|
|
297
|
+
*
|
|
298
|
+
* Published because the question a customer asks about a custom domain —
|
|
299
|
+
* "why is it not live yet" — is answerable only from `verified`, `active` and
|
|
300
|
+
* the setup records, and the SDK could not reach any of them (DX-2). A failed
|
|
301
|
+
* verification is a 200 with `verified: false`: read the body, not the status.
|
|
302
|
+
*/
|
|
303
|
+
readonly domains: {
|
|
304
|
+
list: (orgId: string, spaceId: string) => Promise<{
|
|
305
|
+
domains: DomainSummary[];
|
|
306
|
+
}>;
|
|
307
|
+
add: (orgId: string, spaceId: string, input: {
|
|
308
|
+
hostname: string;
|
|
309
|
+
basePath?: string;
|
|
310
|
+
}) => Promise<{
|
|
311
|
+
domain: DomainSummary;
|
|
312
|
+
}>;
|
|
313
|
+
/** Re-run the ownership check. `activate: false` proves it without switching traffic. */
|
|
314
|
+
verify: (orgId: string, spaceId: string, domainId: string, activate?: boolean) => Promise<{
|
|
315
|
+
domain: DomainSummary;
|
|
316
|
+
}>;
|
|
317
|
+
/** Switch traffic to an address whose ownership is already proven. */
|
|
318
|
+
activate: (orgId: string, spaceId: string, domainId: string) => Promise<{
|
|
319
|
+
domain: DomainSummary;
|
|
320
|
+
}>;
|
|
321
|
+
/** What to configure, and what is still missing. */
|
|
322
|
+
setup: (orgId: string, spaceId: string, domainId: string) => Promise<DomainSetup>;
|
|
323
|
+
};
|
|
241
324
|
readonly webhooks: {
|
|
242
325
|
list: (orgId: string) => Promise<{
|
|
243
326
|
webhooks: Webhook[];
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC7E,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC7E,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,KAAK,EACV,YAAY,EACZ,KAAK,EACL,SAAS,EACT,eAAe,EACf,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,OAAO,EACP,OAAO,EACP,aAAa,EACb,UAAU,EACV,WAAW,EACX,WAAW,EACX,aAAa,EACb,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,6EAA6E;AAC7E,qBAAa,eAAgB,SAAQ,KAAK;IAEtC,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM;gBADZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM;CAKlB;AAED,MAAM,WAAW,uBAAuB;IACtC,qFAAqF;IACrF,OAAO,E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