@ycadence/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/dist/index.js.map CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/client.ts"],
3
+ "sources": ["../src/errors.ts", "../src/operations.ts", "../src/pagination.ts", "../src/version.ts", "../src/client.ts", "../src/types.ts"],
4
4
  "sourcesContent": [
5
- "/**\n * The YCadence client.\n *\n * Shared by the CLI, the MCP server and anyone integrating from TypeScript, so\n * there is one place that knows how to talk to the API — how errors are shaped,\n * how paging works, how a key is presented. Three separate implementations of\n * that would disagree, and the disagreement would surface as \"the CLI works but\n * the MCP server does not\".\n */\n\nexport interface ClientOptions {\n /** e.g. https://devpulse.yarlis.com. Trailing slashes are tolerated. */\n baseUrl: string\n apiKey: string\n /**\n * A Google identity token for an instance behind IAP or an authenticated\n * Cloud Run service, sent as `Authorization: Bearer`. The transport's\n * credential and YCadence's are different things and travel in different\n * headers: the key always goes in `x-api-key`.\n *\n * A function is called before every request, because these tokens last\n * about an hour and a long-running caller — the MCP server — outlives one.\n */\n identityToken?: string | (() => string | Promise<string>)\n /** Defaults to 30s. A request that hangs forever is worse than one that fails. */\n timeoutMs?: number\n fetch?: typeof globalThis.fetch\n}\n\nexport interface ApiFailure {\n error: string\n code: string\n issues?: { path: string; message: string }[]\n}\n\nexport class YCadenceError extends Error {\n constructor(\n readonly status: number,\n readonly code: string,\n message: string,\n readonly issues?: ApiFailure['issues']\n ) {\n super(message)\n this.name = 'YCadenceError'\n }\n\n /** Whether retrying unchanged could plausibly succeed. */\n get retryable(): boolean {\n return this.status === 429 || this.status >= 500\n }\n}\n\nexport interface WorkItem {\n id: string\n key: string\n sequenceId: number\n name: string\n priority: 'urgent' | 'high' | 'medium' | 'low' | 'none'\n stateId: string | null\n assigneeIds: string[]\n labelIds: string[]\n parentId: string | null\n sortOrder: string\n createdAt: string\n}\n\nexport interface Page<T> {\n items: T[]\n nextCursor: string | null\n}\n\nexport class YCadenceClient {\n private readonly baseUrl: string\n private readonly apiKey: string\n private readonly identityToken: ClientOptions['identityToken']\n private readonly timeoutMs: number\n private readonly doFetch: typeof globalThis.fetch\n\n constructor(options: ClientOptions) {\n this.baseUrl = options.baseUrl.replace(/\\/+$/, '')\n this.apiKey = options.apiKey\n this.identityToken = options.identityToken\n this.timeoutMs = options.timeoutMs ?? 30_000\n this.doFetch = options.fetch ?? globalThis.fetch\n }\n\n async health(): Promise<{ status: string; checks: Record<string, string> }> {\n return this.request('GET', '/api/health')\n }\n\n async listWorkItems(\n projectId: string,\n options: { filter?: unknown; limit?: number; cursor?: string } = {}\n ): Promise<Page<WorkItem>> {\n const query = new URLSearchParams()\n if (options.filter !== undefined) query.set('filter', JSON.stringify(options.filter))\n if (options.limit !== undefined) query.set('limit', String(options.limit))\n if (options.cursor !== undefined) query.set('cursor', options.cursor)\n\n return this.request('GET', `/api/v1/projects/${projectId}/work-items?${query}`)\n }\n\n /**\n * Every work item matching a filter, following the cursor.\n *\n * An async generator rather than an array: a project can hold tens of\n * thousands of items, and a caller that wanted the first twenty should not\n * pay for all of them — nor should the process hold them all in memory.\n */\n async *iterateWorkItems(\n projectId: string,\n options: { filter?: unknown; pageSize?: number } = {}\n ): AsyncGenerator<WorkItem> {\n let cursor: string | undefined\n\n do {\n const page = await this.listWorkItems(projectId, {\n filter: options.filter,\n limit: options.pageSize ?? 100,\n cursor,\n })\n for (const item of page.items) yield item\n cursor = page.nextCursor ?? undefined\n } while (cursor !== undefined)\n }\n\n async createWorkItem(projectId: string, body: Record<string, unknown>): Promise<WorkItem> {\n return this.request('POST', `/api/v1/projects/${projectId}/work-items`, body)\n }\n\n async getWorkItem(workItemId: string): Promise<WorkItem & { description: string | null }> {\n return this.request('GET', `/api/v1/work-items/${workItemId}`)\n }\n\n async updateWorkItem(workItemId: string, body: Record<string, unknown>): Promise<WorkItem> {\n return this.request('PATCH', `/api/v1/work-items/${workItemId}`, body)\n }\n\n async deleteWorkItem(workItemId: string): Promise<void> {\n await this.request('DELETE', `/api/v1/work-items/${workItemId}`)\n }\n\n async listStates(\n projectId: string\n ): Promise<{ states: { id: string; name: string; group: string }[] }> {\n return this.request('GET', `/api/v1/projects/${projectId}/states`)\n }\n\n async listLabels(projectId: string): Promise<{ labels: { id: string; name: string }[] }> {\n return this.request('GET', `/api/v1/projects/${projectId}/labels`)\n }\n\n async listCycles(\n projectId: string\n ): Promise<{ cycles: { id: string; name: string; status: string }[] }> {\n return this.request('GET', `/api/v1/projects/${projectId}/cycles`)\n }\n\n async previewImport(projectId: string, body: Record<string, unknown>): Promise<ImportPreview> {\n return this.request('POST', `/api/v1/projects/${projectId}/imports/preview`, body)\n }\n\n async startImport(projectId: string, body: Record<string, unknown>): Promise<{ runId: string }> {\n return this.request('POST', `/api/v1/projects/${projectId}/imports`, body)\n }\n\n async getImport(runId: string): Promise<ImportRun> {\n return this.request('GET', `/api/v1/imports/${runId}`)\n }\n\n async listImports(projectId: string): Promise<{ runs: ImportRun[] }> {\n return this.request('GET', `/api/v1/projects/${projectId}/imports`)\n }\n\n async listViews(projectId: string): Promise<{ views: { id: string; name: string }[] }> {\n return this.request('GET', `/api/v1/projects/${projectId}/views`)\n }\n\n private async request<T>(method: string, path: string, body?: unknown): Promise<T> {\n // An explicit timeout, because the default is none: a hung request holds a\n // CLI open until the user gives up, and blocks an agent indefinitely.\n const controller = new AbortController()\n const timer = setTimeout(() => controller.abort(), this.timeoutMs)\n\n let response: Response\n try {\n const identityToken =\n typeof this.identityToken === 'function' ? await this.identityToken() : this.identityToken\n\n response = await this.doFetch(`${this.baseUrl}${path}`, {\n method,\n headers: {\n // Never Authorization: in front of IAP that header must carry the\n // Google token, and a key there is rejected before the app runs.\n 'x-api-key': this.apiKey,\n ...(identityToken === undefined || identityToken.length === 0\n ? {}\n : { Authorization: `Bearer ${identityToken}` }),\n ...(body === undefined ? {} : { 'Content-Type': 'application/json' }),\n },\n body: body === undefined ? undefined : JSON.stringify(body),\n signal: controller.signal,\n })\n } catch (error) {\n if (error instanceof Error && error.name === 'AbortError') {\n throw new YCadenceError(\n 408,\n 'timeout',\n `${method} ${path} timed out after ${this.timeoutMs}ms.`\n )\n }\n throw new YCadenceError(\n 0,\n 'network_error',\n `Could not reach ${this.baseUrl}: ${error instanceof Error ? error.message : 'unknown error'}`\n )\n } finally {\n clearTimeout(timer)\n }\n\n if (response.status === 204) return undefined as T\n\n const text = await response.text()\n const parsed = text.length === 0 ? undefined : safeJson(text)\n\n if (!response.ok) {\n const failure = (parsed ?? {}) as ApiFailure\n throw new YCadenceError(\n response.status,\n failure.code ?? 'unknown',\n // The server's message when there is one; the status only as a fallback,\n // so an unexpected error shape still produces something actionable.\n failure.error ?? `${method} ${path} failed with ${response.status}.`,\n failure.issues\n )\n }\n\n return parsed as T\n }\n}\n\nfunction safeJson(text: string): unknown {\n try {\n return JSON.parse(text)\n } catch {\n return undefined\n }\n}\n\nexport interface ImportPreview {\n source: string\n total: number\n states: { name: string; suggestedStateId: string | null }[]\n labels: { name: string; exists: boolean }[]\n assignees: { value: string; matched: boolean }[]\n skipped: { row: number; reason: string }[]\n unmappedPriorities: string[]\n /**\n * False when re-importing would create duplicates rather than update — a CSV\n * with no id column. Worth showing before the import, not after.\n */\n idempotent: boolean\n}\n\nexport interface ImportRun {\n id: string\n source: string\n status: string\n totalItems: number\n createdCount: number\n updatedCount: number\n cursor: number\n skipped: { row: number; reason: string }[]\n unmatched: { kind: string; value: string; item: string }[]\n error: string | null\n}\n\n/**\n * @deprecated Renamed to {@link YCadenceClient}. This alias stays for one\n * release so existing integrations keep compiling.\n */\nexport const DevPulseClient = YCadenceClient\n/** @deprecated Renamed to {@link YCadenceClient}. */\nexport type DevPulseClient = YCadenceClient\n\n/**\n * @deprecated Renamed to {@link YCadenceError}. The alias is the same class,\n * so `error instanceof DevPulseError` still matches errors the client throws.\n */\nexport const DevPulseError = YCadenceError\n/** @deprecated Renamed to {@link YCadenceError}. */\nexport type DevPulseError = YCadenceError\n"
5
+ "/**\n * Errors the client throws.\n *\n * One base class, `YCadenceError`, so `instanceof YCadenceError` catches every\n * failure the client produces, and a subclass per kind of failure, so a caller\n * can branch on the class instead of comparing status codes. The base keeps its\n * original positional constructor `(status, code, message, issues)`, because\n * integrations construct it in their own tests.\n */\n\nexport interface ApiIssue {\n path: string\n message: string\n}\n\n/** The error body every v1 route returns (`packages/api/src/types.ts`). */\nexport interface ApiFailure {\n error: string\n code: string\n issues?: ApiIssue[]\n /** Added by the work management contracts; absent on older servers. */\n details?: Record<string, unknown>\n requestId?: string\n}\n\nexport interface ErrorExtras {\n /** The server's request id, from the body or the `x-request-id` header. */\n requestId?: string\n details?: Record<string, unknown>\n /** Seconds, from `Retry-After`, when the server sent one. */\n retryAfter?: number\n method?: string\n path?: string\n}\n\nexport class YCadenceError extends Error {\n readonly requestId: string | undefined\n readonly details: Record<string, unknown> | undefined\n readonly retryAfter: number | undefined\n readonly method: string | undefined\n readonly path: string | undefined\n\n constructor(\n readonly status: number,\n readonly code: string,\n message: string,\n readonly issues?: ApiIssue[],\n extras: ErrorExtras = {}\n ) {\n super(message)\n this.name = 'YCadenceError'\n this.requestId = extras.requestId\n this.details = extras.details\n this.retryAfter = extras.retryAfter\n this.method = extras.method\n this.path = extras.path\n }\n\n /**\n * Whether retrying unchanged could plausibly succeed: rate limits, server\n * errors, timeouts and an unreachable host. A 4xx means the request itself\n * needs to change.\n */\n get retryable(): boolean {\n return this.status === 0 || this.status === 408 || this.status === 429 || this.status >= 500\n }\n}\n\n/** 400 or 422: the request was understood and refused as invalid. */\nexport class YCadenceValidationError extends YCadenceError {\n override name = 'YCadenceValidationError'\n}\n\n/** 401 or 403: no credential, a bad one, or not allowed. */\nexport class YCadencePermissionError extends YCadenceError {\n override name = 'YCadencePermissionError'\n}\n\n/** 404: missing, deleted, or in another organization. */\nexport class YCadenceNotFoundError extends YCadenceError {\n override name = 'YCadenceNotFoundError'\n}\n\n/** 409: a domain rule, a version conflict, or the same idempotency key still running. */\nexport class YCadenceConflictError extends YCadenceError {\n override name = 'YCadenceConflictError'\n}\n\n/** 412: an `If-Match` precondition failed; reload and try again. */\nexport class YCadencePreconditionError extends YCadenceError {\n override name = 'YCadencePreconditionError'\n}\n\n/** 429: slow down; `retryAfter` says for how long when the server said. */\nexport class YCadenceRateLimitError extends YCadenceError {\n override name = 'YCadenceRateLimitError'\n}\n\n/** Status 0 or 408: the host could not be reached, or did not answer in time. */\nexport class YCadenceNetworkError extends YCadenceError {\n override name = 'YCadenceNetworkError'\n}\n\n/** The class that matches a status. */\nexport function errorClassFor(status: number): typeof YCadenceError {\n if (status === 0 || status === 408) return YCadenceNetworkError\n if (status === 400 || status === 422) return YCadenceValidationError\n if (status === 401 || status === 403) return YCadencePermissionError\n if (status === 404) return YCadenceNotFoundError\n if (status === 409) return YCadenceConflictError\n if (status === 412) return YCadencePreconditionError\n if (status === 429) return YCadenceRateLimitError\n return YCadenceError\n}\n\nexport function createError(\n status: number,\n code: string,\n message: string,\n issues?: ApiIssue[],\n extras: ErrorExtras = {}\n): YCadenceError {\n const ErrorClass = errorClassFor(status)\n return new ErrorClass(status, code, message, issues, extras)\n}\n\n/**\n * Thrown, unchanged, through the client by a custom `fetch` that wants to stop\n * a request without it being reported as a network error. The CLI's\n * `--dry-run` uses it to show a mutation instead of sending it.\n */\nexport class RequestIntercepted extends Error {\n override name = 'RequestIntercepted'\n constructor(\n readonly request: {\n method: string\n url: string\n headers: Record<string, string>\n body: unknown\n }\n ) {\n super(`${request.method} ${request.url} was not sent.`)\n }\n}\n",
6
+ "/**\n * Every API operation the client calls, in one table.\n *\n * The client builds each request from this table rather than from a path\n * written inline in a method, so there is one place to compare with the\n * server: `apps/web/lib/api/sdk-contract.test.ts` fails when an entry has no\n * matching route contract (unless it is marked `pending`), and the CLI's\n * reference and `--dry-run` name operations by these ids.\n */\n\nexport type HttpMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE'\n\nexport interface Operation {\n method: HttpMethod\n /** The route contract's path, with `{param}` placeholders. */\n path: string\n /**\n * Planned by the work management contracts and not served yet. The client\n * still calls it; a 404 from an older server is reported as such.\n */\n pending?: string\n}\n\nexport const OPERATIONS = {\n health: { method: 'GET', path: '/api/health' },\n me: { method: 'GET', path: '/api/v1/me' },\n listProjects: { method: 'GET', path: '/api/v1/projects' },\n\n listWorkItems: { method: 'GET', path: '/api/v1/projects/{projectId}/work-items' },\n createWorkItem: { method: 'POST', path: '/api/v1/projects/{projectId}/work-items' },\n getWorkItem: { method: 'GET', path: '/api/v1/work-items/{workItemId}' },\n updateWorkItem: { method: 'PATCH', path: '/api/v1/work-items/{workItemId}' },\n deleteWorkItem: { method: 'DELETE', path: '/api/v1/work-items/{workItemId}' },\n\n listStates: { method: 'GET', path: '/api/v1/projects/{projectId}/states' },\n listLabels: { method: 'GET', path: '/api/v1/projects/{projectId}/labels' },\n createLabel: { method: 'POST', path: '/api/v1/projects/{projectId}/labels' },\n listTypes: { method: 'GET', path: '/api/v1/projects/{projectId}/types' },\n\n listCycles: { method: 'GET', path: '/api/v1/projects/{projectId}/cycles' },\n createCycle: { method: 'POST', path: '/api/v1/projects/{projectId}/cycles' },\n getCycleProgress: { method: 'GET', path: '/api/v1/cycles/{cycleId}/progress' },\n addWorkItemsToCycle: { method: 'POST', path: '/api/v1/cycles/{cycleId}/work-items' },\n\n listViews: { method: 'GET', path: '/api/v1/projects/{projectId}/views' },\n createView: { method: 'POST', path: '/api/v1/projects/{projectId}/views' },\n\n listIntake: { method: 'GET', path: '/api/v1/projects/{projectId}/intake' },\n submitIntake: { method: 'POST', path: '/api/v1/projects/{projectId}/intake' },\n triageIntake: { method: 'POST', path: '/api/v1/intake-items/{intakeItemId}/triage' },\n\n previewImport: { method: 'POST', path: '/api/v1/projects/{projectId}/imports/preview' },\n startImport: { method: 'POST', path: '/api/v1/projects/{projectId}/imports' },\n listImports: { method: 'GET', path: '/api/v1/projects/{projectId}/imports' },\n getImport: { method: 'GET', path: '/api/v1/imports/{runId}' },\n} as const satisfies Record<string, Operation>\n\nexport type OperationId = keyof typeof OPERATIONS\n\n/** GET and HEAD are safe to repeat; anything else needs an idempotency key first. */\nexport function isIdempotentMethod(method: string): boolean {\n return method === 'GET' || method === 'HEAD'\n}\n\n/** Fill `{param}` placeholders, encoding each value. */\nexport function buildPath(template: string, params: Record<string, string> = {}): string {\n return template.replace(/\\{(\\w+)\\}/g, (_match, name: string) => {\n const value = params[name]\n if (value === undefined || value === '') {\n throw new TypeError(`Missing path parameter \"${name}\" for ${template}.`)\n }\n return encodeURIComponent(value)\n })\n}\n",
7
+ "import type { Page } from './types'\n\n/**\n * Follow `nextCursor` to the end, one page at a time.\n *\n * Lazy: a caller that breaks out early pays for the pages it read and no more.\n */\nexport async function* paginate<T>(\n fetchPage: (cursor: string | undefined) => Promise<Page<T>>,\n options: { cursor?: string; maxItems?: number } = {}\n): AsyncGenerator<T> {\n let cursor = options.cursor\n let yielded = 0\n do {\n const page = await fetchPage(cursor)\n for (const item of page.items) {\n if (options.maxItems !== undefined && yielded >= options.maxItems) return\n yielded += 1\n yield item\n }\n cursor = page.nextCursor ?? undefined\n } while (cursor !== undefined)\n}\n\n/** Every item from {@link paginate}, as an array, up to `maxItems`. */\nexport async function collect<T>(\n iterable: AsyncIterable<T>,\n maxItems = Number.POSITIVE_INFINITY\n): Promise<T[]> {\n const items: T[] = []\n for await (const item of iterable) {\n if (items.length >= maxItems) break\n items.push(item)\n }\n return items\n}\n",
8
+ "/**\n * The published version, for `User-Agent`.\n *\n * Replaced at build time (`bun build --define`) from package.json, so the\n * Version PR that bumps package.json needs no second edit. Unbuilt source —\n * tests, the workspace — reports `0.0.0-dev`.\n */\ndeclare const __YCADENCE_SDK_VERSION__: string | undefined\n\nexport const SDK_VERSION: string =\n typeof __YCADENCE_SDK_VERSION__ === 'string' ? __YCADENCE_SDK_VERSION__ : '0.0.0-dev'\n",
9
+ "/**\n * The YCadence client.\n *\n * Shared by the CLI, the MCP server and anyone integrating from TypeScript, so\n * there is one place that knows how to talk to the API — how errors are shaped,\n * how paging works, how a key is presented, when a request is safe to retry.\n * Three separate implementations of that would disagree, and the disagreement\n * would surface as \"the CLI works but the MCP server does not\".\n */\n\nimport { type ApiFailure, createError, RequestIntercepted, YCadenceError } from './errors'\nimport { buildPath, isIdempotentMethod, OPERATIONS, type OperationId } from './operations'\nimport { paginate } from './pagination'\nimport type {\n CreateViewInput,\n CreateWorkItemInput,\n Cycle,\n CycleProgress,\n Health,\n ImportInput,\n ImportPreview,\n ImportRun,\n IntakeItem,\n Label,\n ListWorkItemsOptions,\n Me,\n Page,\n Project,\n State,\n SubmitIntakeInput,\n SubmitIntakeResult,\n TriageInput,\n TriageResult,\n UpdateWorkItemInput,\n View,\n WorkItem,\n WorkItemDetail,\n} from './types'\nimport { SDK_VERSION } from './version'\n\nexport interface RetryOptions {\n /** Attempts after the first. Default 2. `0` turns retrying off. */\n retries?: number\n /** First backoff, doubled each attempt, with jitter. Default 250ms. */\n baseDelayMs?: number\n /** Ceiling for one wait, including a server's `Retry-After`. Default 8s. */\n maxDelayMs?: number\n}\n\n/** What happened to one HTTP exchange; for logging. Never carries credentials. */\nexport interface ResponseInfo {\n method: string\n path: string\n status: number\n requestId: string | undefined\n durationMs: number\n attempt: number\n replayed: boolean\n}\n\nexport interface ClientOptions {\n /** e.g. https://ycadence.example.com. Trailing slashes are tolerated. */\n baseUrl: string\n apiKey: string\n /**\n * A Google identity token for an instance behind IAP or an authenticated\n * Cloud Run service, sent as `Authorization: Bearer`. The transport's\n * credential and the product's are different things and travel in different\n * headers: the key always goes in `x-api-key`.\n *\n * A function is called before every request, because these tokens last\n * about an hour and a long-running caller — the MCP server — outlives one.\n */\n identityToken?: string | (() => string | undefined | Promise<string | undefined>)\n /** Defaults to 30s. A request that hangs forever is worse than one that fails. */\n timeoutMs?: number\n fetch?: typeof globalThis.fetch\n /**\n * Retries for 429, 5xx, timeouts and network errors. Only GET requests, and\n * mutations sent with an idempotency key, are retried: repeating any other\n * write could apply it twice.\n */\n retry?: RetryOptions\n /** Prepended to the default `User-Agent`, e.g. `ycadence-cli/0.2.0`. */\n userAgent?: string\n /** Called after every response, including ones that are retried. */\n onResponse?: (info: ResponseInfo) => void\n /** Injected for tests; defaults to a timer. */\n sleep?: (ms: number) => Promise<void>\n}\n\n/** Per-call options for any request. */\nexport interface RequestOptions {\n /**\n * Sent as `Idempotency-Key` on a mutation, which also makes the mutation\n * safe to retry. Servers that do not support the header ignore it.\n */\n idempotencyKey?: string\n /**\n * The version the caller last saw, sent as `If-Match: \"<version>\"`. A server\n * that versions the resource answers 409 `version_conflict` or 412 when it\n * has moved on; one that does not ignores the header.\n */\n expectedVersion?: number | string\n signal?: AbortSignal\n /** Overrides the client's retry count for this call. */\n retries?: number\n}\n\nconst DEFAULT_RETRY: Required<RetryOptions> = { retries: 2, baseDelayMs: 250, maxDelayMs: 8_000 }\n\nexport class YCadenceClient {\n private readonly baseUrl: string\n private readonly apiKey: string\n private readonly identityToken: ClientOptions['identityToken']\n private readonly timeoutMs: number\n private readonly doFetch: typeof globalThis.fetch\n private readonly retry: Required<RetryOptions>\n private readonly userAgent: string\n private readonly onResponse: ClientOptions['onResponse']\n private readonly sleep: (ms: number) => Promise<void>\n\n constructor(private readonly options: ClientOptions) {\n this.baseUrl = options.baseUrl.replace(/\\/+$/, '')\n this.apiKey = options.apiKey\n this.identityToken = options.identityToken\n this.timeoutMs = options.timeoutMs ?? 30_000\n this.doFetch =\n options.fetch ?? (((input, init) => globalThis.fetch(input, init)) as typeof globalThis.fetch)\n this.retry = { ...DEFAULT_RETRY, ...options.retry }\n this.userAgent = [options.userAgent, `ycadence-sdk/${SDK_VERSION}`]\n .filter((part) => part !== undefined && part !== '')\n .join(' ')\n this.onResponse = options.onResponse\n this.sleep = options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)))\n }\n\n /** A copy of this client with some options replaced. */\n withOptions(overrides: Partial<ClientOptions>): YCadenceClient {\n return new YCadenceClient({ ...this.options, ...overrides })\n }\n\n /** The fetch this client sends with; for wrapping in `withOptions`. */\n get fetchImplementation(): typeof globalThis.fetch {\n return this.doFetch\n }\n\n async health(): Promise<Health> {\n return this.call('health')\n }\n\n /** Who the credential is. A 404 means the server predates Slice 2A. */\n async me(options?: RequestOptions): Promise<Me> {\n return this.call('me', {}, undefined, undefined, options)\n }\n\n /** Projects the credential can read; `q` matches a name or identifier prefix. */\n async listProjects(\n query: { q?: string; archived?: boolean; limit?: number; cursor?: string } = {},\n options?: RequestOptions\n ): Promise<Page<Project>> {\n return this.call('listProjects', {}, query, undefined, options)\n }\n\n async listWorkItems(\n projectId: string,\n query: ListWorkItemsOptions = {},\n options?: RequestOptions\n ): Promise<Page<WorkItem>> {\n return this.call(\n 'listWorkItems',\n { projectId },\n {\n filter: query.filter === undefined ? undefined : JSON.stringify(query.filter),\n limit: query.limit,\n cursor: query.cursor,\n state: query.state,\n priority: query.priority,\n },\n undefined,\n options\n )\n }\n\n /**\n * Every work item matching a filter, following the cursor.\n *\n * An async generator rather than an array: a project can hold tens of\n * thousands of items, and a caller that wanted the first twenty should not\n * pay for all of them — nor should the process hold them all in memory.\n */\n iterateWorkItems(\n projectId: string,\n options: { filter?: unknown; pageSize?: number } = {}\n ): AsyncGenerator<WorkItem> {\n return paginate((cursor) =>\n this.listWorkItems(projectId, {\n filter: options.filter,\n limit: options.pageSize ?? 100,\n cursor,\n })\n )\n }\n\n async createWorkItem(\n projectId: string,\n body: CreateWorkItemInput | Record<string, unknown>,\n options?: RequestOptions\n ): Promise<WorkItem> {\n return this.call('createWorkItem', { projectId }, undefined, body, options)\n }\n\n async getWorkItem(workItemId: string, options?: RequestOptions): Promise<WorkItemDetail> {\n return this.call('getWorkItem', { workItemId }, undefined, undefined, options)\n }\n\n async updateWorkItem(\n workItemId: string,\n body: UpdateWorkItemInput | Record<string, unknown>,\n options?: RequestOptions\n ): Promise<WorkItem> {\n return this.call('updateWorkItem', { workItemId }, undefined, body, options)\n }\n\n async deleteWorkItem(workItemId: string, options?: RequestOptions): Promise<void> {\n await this.call('deleteWorkItem', { workItemId }, undefined, undefined, options)\n }\n\n async listStates(projectId: string, options?: RequestOptions): Promise<{ states: State[] }> {\n return this.call('listStates', { projectId }, undefined, undefined, options)\n }\n\n async listLabels(projectId: string, options?: RequestOptions): Promise<{ labels: Label[] }> {\n return this.call('listLabels', { projectId }, undefined, undefined, options)\n }\n\n async createLabel(\n projectId: string,\n body: { name: string; color: string; description?: string },\n options?: RequestOptions\n ): Promise<Label> {\n return this.call('createLabel', { projectId }, undefined, body, options)\n }\n\n async listTypes(projectId: string, options?: RequestOptions): Promise<{ types: unknown[] }> {\n return this.call('listTypes', { projectId }, undefined, undefined, options)\n }\n\n async listCycles(projectId: string, options?: RequestOptions): Promise<{ cycles: Cycle[] }> {\n return this.call('listCycles', { projectId }, undefined, undefined, options)\n }\n\n async createCycle(\n projectId: string,\n body: { name: string; description?: string; startDate?: string; endDate?: string },\n options?: RequestOptions\n ): Promise<Cycle> {\n return this.call('createCycle', { projectId }, undefined, body, options)\n }\n\n async getCycleProgress(cycleId: string, options?: RequestOptions): Promise<CycleProgress> {\n return this.call('getCycleProgress', { cycleId }, undefined, undefined, options)\n }\n\n async addWorkItemsToCycle(\n cycleId: string,\n workItemIds: string[],\n options?: RequestOptions\n ): Promise<{ added: number }> {\n return this.call('addWorkItemsToCycle', { cycleId }, undefined, { workItemIds }, options)\n }\n\n async listViews(projectId: string, options?: RequestOptions): Promise<{ views: View[] }> {\n return this.call('listViews', { projectId }, undefined, undefined, options)\n }\n\n async createView(\n projectId: string,\n body: CreateViewInput,\n options?: RequestOptions\n ): Promise<View> {\n return this.call('createView', { projectId }, undefined, body, options)\n }\n\n async listIntake(\n projectId: string,\n query: { includeDecided?: boolean } = {},\n options?: RequestOptions\n ): Promise<{ items: IntakeItem[] }> {\n return this.call('listIntake', { projectId }, query, undefined, options)\n }\n\n async submitIntake(\n projectId: string,\n body: SubmitIntakeInput,\n options?: RequestOptions\n ): Promise<SubmitIntakeResult> {\n return this.call('submitIntake', { projectId }, undefined, body, options)\n }\n\n async triageIntake(\n intakeItemId: string,\n body: TriageInput,\n options?: RequestOptions\n ): Promise<TriageResult> {\n return this.call('triageIntake', { intakeItemId }, undefined, body, options)\n }\n\n async previewImport(\n projectId: string,\n body: ImportInput | Record<string, unknown>,\n options?: RequestOptions\n ): Promise<ImportPreview> {\n return this.call('previewImport', { projectId }, undefined, body, options)\n }\n\n async startImport(\n projectId: string,\n body: ImportInput | Record<string, unknown>,\n options?: RequestOptions\n ): Promise<{ runId: string }> {\n return this.call('startImport', { projectId }, undefined, body, options)\n }\n\n async getImport(runId: string, options?: RequestOptions): Promise<ImportRun> {\n return this.call('getImport', { runId }, undefined, undefined, options)\n }\n\n async listImports(projectId: string, options?: RequestOptions): Promise<{ runs: ImportRun[] }> {\n return this.call('listImports', { projectId }, undefined, undefined, options)\n }\n\n /** Call any operation in the table by id. */\n async call<T>(\n operation: OperationId,\n params: Record<string, string> = {},\n query?: Record<string, string | number | boolean | undefined>,\n body?: unknown,\n options: RequestOptions = {}\n ): Promise<T> {\n const { method, path } = OPERATIONS[operation]\n let url = buildPath(path, params)\n if (query !== undefined) {\n const search = new URLSearchParams()\n for (const [name, value] of Object.entries(query)) {\n if (value !== undefined) search.set(name, String(value))\n }\n const encoded = search.toString()\n if (encoded.length > 0) url += `?${encoded}`\n }\n return this.request<T>(method, url, body, options)\n }\n\n private async request<T>(\n method: string,\n path: string,\n body: unknown,\n options: RequestOptions\n ): Promise<T> {\n const retryable = isIdempotentMethod(method) || options.idempotencyKey !== undefined\n const retries = retryable ? (options.retries ?? this.retry.retries) : 0\n\n for (let attempt = 0; ; attempt += 1) {\n try {\n return await this.send<T>(method, path, body, options, attempt)\n } catch (error) {\n const failure = error as YCadenceError\n const again =\n attempt < retries &&\n typeof failure.retryable === 'boolean' &&\n // 409 request_in_progress: the first request with this key is still\n // running, so asking again later is exactly right.\n (failure.retryable || failure.code === 'request_in_progress')\n if (!again) throw error\n await this.sleep(this.backoff(attempt, failure.retryAfter))\n }\n }\n }\n\n private backoff(attempt: number, retryAfter: number | undefined): number {\n if (retryAfter !== undefined) return Math.min(retryAfter * 1000, this.retry.maxDelayMs)\n const exponential = this.retry.baseDelayMs * 2 ** attempt\n // Full jitter on the upper half, so a fleet of clients does not retry in step.\n const jittered = exponential / 2 + Math.random() * (exponential / 2)\n return Math.min(jittered, this.retry.maxDelayMs)\n }\n\n private async send<T>(\n method: string,\n path: string,\n body: unknown,\n options: RequestOptions,\n attempt: number\n ): Promise<T> {\n // An explicit timeout, because the default is none: a hung request holds a\n // CLI open until the user gives up, and blocks an agent indefinitely.\n const controller = new AbortController()\n const timer = setTimeout(() => controller.abort(), this.timeoutMs)\n const abort = () => controller.abort()\n options.signal?.addEventListener('abort', abort)\n const started = Date.now()\n\n let response: Response\n try {\n const identityToken =\n typeof this.identityToken === 'function' ? await this.identityToken() : this.identityToken\n\n const headers: Record<string, string> = {\n // Never Authorization for the key: in front of IAP that header must\n // carry the Google token, and a key there is rejected before the app runs.\n 'x-api-key': this.apiKey,\n ...(identityToken === undefined || identityToken.length === 0\n ? {}\n : { Authorization: `Bearer ${identityToken}` }),\n ...(body === undefined ? {} : { 'Content-Type': 'application/json' }),\n Accept: 'application/json',\n 'User-Agent': this.userAgent,\n }\n if (options.idempotencyKey !== undefined && !isIdempotentMethod(method)) {\n headers['Idempotency-Key'] = options.idempotencyKey\n }\n if (options.expectedVersion !== undefined && !isIdempotentMethod(method)) {\n headers['If-Match'] = `\"${String(options.expectedVersion).replace(/\"/g, '')}\"`\n }\n\n response = await this.doFetch(`${this.baseUrl}${path}`, {\n method,\n headers,\n body: body === undefined ? undefined : JSON.stringify(body),\n signal: controller.signal,\n })\n } catch (error) {\n if (error instanceof RequestIntercepted) throw error\n if (error instanceof Error && error.name === 'AbortError') {\n throw createError(\n 408,\n 'timeout',\n `${method} ${path} timed out after ${this.timeoutMs}ms.`,\n undefined,\n { method, path }\n )\n }\n throw createError(\n 0,\n 'network_error',\n `Could not reach ${this.baseUrl}: ${error instanceof Error ? error.message : 'unknown error'}`,\n undefined,\n { method, path }\n )\n } finally {\n clearTimeout(timer)\n options.signal?.removeEventListener('abort', abort)\n }\n\n const headerRequestId = response.headers?.get?.('x-request-id') ?? undefined\n this.onResponse?.({\n method,\n path,\n status: response.status,\n requestId: headerRequestId,\n durationMs: Date.now() - started,\n attempt,\n replayed: response.headers?.get?.('idempotent-replayed') === 'true',\n })\n\n if (response.status === 204) return undefined as T\n\n const text = await response.text()\n const parsed = text.length === 0 ? undefined : safeJson(text)\n\n if (!response.ok) {\n const failure = (isRecord(parsed) ? parsed : {}) as Partial<ApiFailure>\n throw createError(\n response.status,\n typeof failure.code === 'string' ? failure.code : codeForStatus(response.status),\n // The server's message when there is one; the status only as a fallback,\n // so an unexpected error shape still produces something actionable.\n typeof failure.error === 'string'\n ? failure.error\n : `${method} ${path} failed with ${response.status}.`,\n failure.issues,\n {\n requestId: failure.requestId ?? headerRequestId,\n details: failure.details,\n retryAfter: parseRetryAfter(response.headers?.get?.('retry-after') ?? null),\n method,\n path,\n }\n )\n }\n\n return parsed as T\n }\n}\n\nfunction safeJson(text: string): unknown {\n try {\n return JSON.parse(text)\n } catch {\n return undefined\n }\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n\nfunction codeForStatus(status: number): string {\n const codes: Record<number, string> = {\n 400: 'bad_request',\n 401: 'unauthorized',\n 403: 'forbidden',\n 404: 'not_found',\n 409: 'conflict',\n 412: 'precondition_failed',\n 422: 'validation_failed',\n 429: 'rate_limited',\n }\n return codes[status] ?? (status >= 500 ? 'server_error' : 'unknown')\n}\n\n/** Seconds, from either form `Retry-After` takes: a number or an HTTP date. */\nexport function parseRetryAfter(value: string | null, now = Date.now()): number | undefined {\n if (value === null || value.trim() === '') return undefined\n const seconds = Number(value)\n if (Number.isFinite(seconds)) return Math.max(0, seconds)\n const date = Date.parse(value)\n if (Number.isNaN(date)) return undefined\n return Math.max(0, Math.ceil((date - now) / 1000))\n}\n\nexport type { ImportPreview, ImportRun, Page, WorkItem } from './types'\n\n/**\n * @deprecated Renamed to {@link YCadenceClient}. This alias stays for one\n * release so existing integrations keep compiling.\n */\nexport const DevPulseClient = YCadenceClient\n/** @deprecated Renamed to {@link YCadenceClient}. */\nexport type DevPulseClient = YCadenceClient\n\nexport { type ApiFailure, YCadenceError } from './errors'\n\n/**\n * @deprecated Renamed to {@link YCadenceError}. The alias is the same class,\n * so `error instanceof DevPulseError` still matches errors the client throws.\n */\nexport const DevPulseError = YCadenceError\n/** @deprecated Renamed to {@link YCadenceError}. */\nexport type DevPulseError = YCadenceError\n",
10
+ "/**\n * Request and response shapes of the v1 API, as they arrive over JSON.\n *\n * The routes define these with zod in `apps/web` (`lib/api/contracts.ts` and\n * the route files). The SDK is published without dependencies, so it cannot\n * import those schemas; instead each response type has a field list below that\n * the compiler checks against the type, and `apps/web/lib/api/sdk-contract.test.ts`\n * checks against the route's zod schema. A field added on one side and not the\n * other fails that test rather than reaching a user.\n *\n * Dates are ISO strings: that is what JSON carries.\n */\n\nexport type Priority = 'urgent' | 'high' | 'medium' | 'low' | 'none'\nexport const PRIORITIES: readonly Priority[] = ['urgent', 'high', 'medium', 'low', 'none']\n\nexport type StateGroup = 'backlog' | 'unstarted' | 'started' | 'completed' | 'cancelled' | 'triage'\n\nexport interface WorkItem {\n id: string\n key: string\n sequenceId: number\n name: string\n priority: Priority\n stateId: string | null\n assigneeIds: string[]\n labelIds: string[]\n parentId: string | null\n sortOrder: string\n createdAt: string\n /**\n * Returned by `GET /work-items/{id}` (always, from Slice 2A on); not yet by\n * lists or writes.\n */\n projectId?: string\n /** Not returned yet. Sent back as `If-Match` once the server versions items. */\n version?: number\n}\n\nexport interface WorkItemDetail extends WorkItem {\n /** Optional only so the SDK still reads a server older than Slice 2A. */\n projectId?: string\n description: string | null\n startDate: string | null\n targetDate: string | null\n archivedAt: string | null\n updatedAt: string\n}\n\nexport interface Page<T> {\n items: T[]\n nextCursor: string | null\n}\n\nexport interface CreateWorkItemInput {\n name: string\n description?: string\n stateId?: string\n priority?: Priority\n assigneeIds?: string[]\n labelIds?: string[]\n parentId?: string\n /** ISO date. */\n startDate?: string\n targetDate?: string\n /** One of the project's work item types; absent means the project's default. */\n typeId?: string\n}\n\n/**\n * The fields PATCH accepts today. The server strips anything else, so sending\n * an unlisted field would look like success and change nothing.\n */\nexport interface UpdateWorkItemInput {\n name?: string\n description?: string\n stateId?: string\n priority?: Priority\n parentId?: string | null\n startDate?: string | null\n targetDate?: string | null\n /** A work item type of the item's project; null clears it. */\n typeId?: string | null\n}\n\nexport interface ListWorkItemsOptions {\n /** A @devpulse/query expression; sent JSON-encoded as `filter`. */\n filter?: unknown\n limit?: number\n cursor?: string\n /** A state id. */\n state?: string\n priority?: Priority\n}\n\nexport interface State {\n id: string\n name: string\n group: StateGroup | string\n color: string\n description: string | null\n /** Fractional-index sort key; the list arrives already ordered by it. */\n sequence: string\n isDefault: boolean\n}\n\nexport interface Label {\n id: string\n name: string\n color: string\n description: string | null\n sortOrder: string\n}\n\nexport interface Cycle {\n id: string\n name: string\n description: string | null\n startDate: string | null\n endDate: string | null\n status: 'draft' | 'upcoming' | 'active' | 'completed'\n sortOrder: string\n completedAt: string | null\n archivedAt: string | null\n}\n\nexport interface CycleProgress {\n progress: unknown\n burndown: unknown\n frozen: boolean\n}\n\nexport interface View {\n id: string\n name: string\n description: string | null\n filter: unknown\n display: unknown\n access: 'private' | 'public'\n ownerId: string | null\n sortOrder: string\n}\n\nexport interface CreateViewInput {\n name: string\n description?: string\n where?: unknown\n display?: Record<string, unknown>\n access?: 'private' | 'public'\n}\n\nexport type IntakeStatus = 'pending' | 'accepted' | 'declined' | 'snoozed' | 'duplicate'\n\nexport interface IntakeItem {\n id: string\n workItemId: string\n status: IntakeStatus\n source: string\n sourceEmail: string | null\n snoozedUntil: string | null\n submittedAt: string\n}\n\nexport interface SubmitIntakeInput {\n title: string\n description?: string\n source?: 'in_app' | 'form' | 'email' | 'api' | 'integration'\n sourceEmail?: string\n extra?: Record<string, unknown>\n}\n\nexport interface SubmitIntakeResult {\n intakeItemId: string\n workItemId: string\n sequenceId: number\n}\n\nexport interface TriageInput {\n status: 'accepted' | 'declined' | 'snoozed' | 'duplicate'\n /** ISO date; required when snoozing. */\n snoozedUntil?: string\n /** Required when marking a duplicate. */\n duplicateOfId?: string\n}\n\nexport interface TriageResult {\n status: string\n movedToStateId: string | null\n}\n\nexport interface ImportPreview {\n source: string\n total: number\n states: { name: string; suggestedStateId: string | null }[]\n labels: { name: string; exists: boolean }[]\n assignees: { value: string; matched: boolean }[]\n skipped: { row: number; reason: string }[]\n unmappedPriorities: string[]\n /**\n * False when re-importing would create duplicates rather than update — a CSV\n * with no id column. Worth showing before the import, not after.\n */\n idempotent: boolean\n}\n\nexport interface ImportRun {\n id: string\n source: string\n status: string\n totalItems: number\n createdCount: number\n updatedCount: number\n cursor: number\n skipped: { row: number; reason: string }[]\n unmatched: { kind: string; value: string; item: string }[]\n error: string | null\n startedAt?: string | null\n finishedAt?: string | null\n createdAt?: string\n}\n\nexport type ImportSource = 'csv' | 'github' | 'jira' | 'linear'\n\nexport interface ImportInput {\n source: ImportSource\n /** CSV text, or the parsed JSON export for the API sources. */\n data: unknown\n repository?: string\n baseUrl?: string\n /** Source state name to state id. Only for `startImport`. */\n stateMap?: Record<string, string>\n}\n\nexport interface Health {\n status: string\n checks: Record<string, string>\n}\n\n/** `GET /api/v1/me`: who the credential is. Never includes the key. */\nexport interface Me {\n principal: {\n kind: 'personal_key' | 'service_key' | string\n scopeType?: 'project' | 'organization' | 'personal' | string\n apiKeyId: string\n keyPrefix: string\n userId: string | null\n email: string | null\n organizationRole?: string | null\n }\n organization: { id: string; slug: string; name: string }\n project: { id: string; identifier: string; name: string } | null\n scopes: string[]\n expiresAt: string | null\n}\n\n/** `GET /api/v1/projects`. */\nexport interface Project {\n id: string\n identifier: string\n name: string\n archivedAt: string | null\n}\n\n/**\n * Field lists, checked by the compiler to name every key of the type (and no\n * others), and by the contract test to match the route's response schema.\n */\ntype FieldsOf<T> = { [K in keyof Required<T>]: true }\n\nexport const WORK_ITEM_FIELDS: FieldsOf<WorkItem> = {\n id: true,\n key: true,\n sequenceId: true,\n name: true,\n priority: true,\n stateId: true,\n assigneeIds: true,\n labelIds: true,\n parentId: true,\n sortOrder: true,\n createdAt: true,\n projectId: true,\n version: true,\n}\n\nexport const WORK_ITEM_DETAIL_FIELDS: FieldsOf<WorkItemDetail> = {\n ...WORK_ITEM_FIELDS,\n description: true,\n startDate: true,\n targetDate: true,\n archivedAt: true,\n updatedAt: true,\n}\n\nexport const STATE_FIELDS: FieldsOf<State> = {\n id: true,\n name: true,\n group: true,\n color: true,\n description: true,\n sequence: true,\n isDefault: true,\n}\n\nexport const LABEL_FIELDS: FieldsOf<Label> = {\n id: true,\n name: true,\n color: true,\n description: true,\n sortOrder: true,\n}\n\nexport const CYCLE_FIELDS: FieldsOf<Cycle> = {\n id: true,\n name: true,\n description: true,\n startDate: true,\n endDate: true,\n status: true,\n sortOrder: true,\n completedAt: true,\n archivedAt: true,\n}\n\nexport const VIEW_FIELDS: FieldsOf<View> = {\n id: true,\n name: true,\n description: true,\n filter: true,\n display: true,\n access: true,\n ownerId: true,\n sortOrder: true,\n}\n\nexport const INTAKE_ITEM_FIELDS: FieldsOf<IntakeItem> = {\n id: true,\n workItemId: true,\n status: true,\n source: true,\n sourceEmail: true,\n snoozedUntil: true,\n submittedAt: true,\n}\n\nexport const IMPORT_RUN_FIELDS: FieldsOf<ImportRun> = {\n id: true,\n source: true,\n status: true,\n totalItems: true,\n createdCount: true,\n updatedCount: true,\n cursor: true,\n skipped: true,\n unmatched: true,\n error: true,\n startedAt: true,\n finishedAt: true,\n createdAt: true,\n}\n\n/**\n * Fields the SDK declares ahead of the server (the work management contracts\n * add them). The contract test allows them to be missing from today's schemas.\n */\nexport const PEN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A,EACJ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,WAAW;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,WAAW;AACb;AAMO,IAAM,iBAAoD;AAAA,EAC/D,UAAU,CAAC,aAAa,SAAS;AACnC;",
13
+ "debugId": "010578A6F259BB5064756E2164756E21",
9
14
  "names": []
10
15
  }
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Every API operation the client calls, in one table.
3
+ *
4
+ * The client builds each request from this table rather than from a path
5
+ * written inline in a method, so there is one place to compare with the
6
+ * server: `apps/web/lib/api/sdk-contract.test.ts` fails when an entry has no
7
+ * matching route contract (unless it is marked `pending`), and the CLI's
8
+ * reference and `--dry-run` name operations by these ids.
9
+ */
10
+ export type HttpMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
11
+ export interface Operation {
12
+ method: HttpMethod;
13
+ /** The route contract's path, with `{param}` placeholders. */
14
+ path: string;
15
+ /**
16
+ * Planned by the work management contracts and not served yet. The client
17
+ * still calls it; a 404 from an older server is reported as such.
18
+ */
19
+ pending?: string;
20
+ }
21
+ export declare const OPERATIONS: {
22
+ readonly health: {
23
+ readonly method: 'GET';
24
+ readonly path: '/api/health';
25
+ };
26
+ readonly me: {
27
+ readonly method: 'GET';
28
+ readonly path: '/api/v1/me';
29
+ };
30
+ readonly listProjects: {
31
+ readonly method: 'GET';
32
+ readonly path: '/api/v1/projects';
33
+ };
34
+ readonly listWorkItems: {
35
+ readonly method: 'GET';
36
+ readonly path: '/api/v1/projects/{projectId}/work-items';
37
+ };
38
+ readonly createWorkItem: {
39
+ readonly method: 'POST';
40
+ readonly path: '/api/v1/projects/{projectId}/work-items';
41
+ };
42
+ readonly getWorkItem: {
43
+ readonly method: 'GET';
44
+ readonly path: '/api/v1/work-items/{workItemId}';
45
+ };
46
+ readonly updateWorkItem: {
47
+ readonly method: 'PATCH';
48
+ readonly path: '/api/v1/work-items/{workItemId}';
49
+ };
50
+ readonly deleteWorkItem: {
51
+ readonly method: 'DELETE';
52
+ readonly path: '/api/v1/work-items/{workItemId}';
53
+ };
54
+ readonly listStates: {
55
+ readonly method: 'GET';
56
+ readonly path: '/api/v1/projects/{projectId}/states';
57
+ };
58
+ readonly listLabels: {
59
+ readonly method: 'GET';
60
+ readonly path: '/api/v1/projects/{projectId}/labels';
61
+ };
62
+ readonly createLabel: {
63
+ readonly method: 'POST';
64
+ readonly path: '/api/v1/projects/{projectId}/labels';
65
+ };
66
+ readonly listTypes: {
67
+ readonly method: 'GET';
68
+ readonly path: '/api/v1/projects/{projectId}/types';
69
+ };
70
+ readonly listCycles: {
71
+ readonly method: 'GET';
72
+ readonly path: '/api/v1/projects/{projectId}/cycles';
73
+ };
74
+ readonly createCycle: {
75
+ readonly method: 'POST';
76
+ readonly path: '/api/v1/projects/{projectId}/cycles';
77
+ };
78
+ readonly getCycleProgress: {
79
+ readonly method: 'GET';
80
+ readonly path: '/api/v1/cycles/{cycleId}/progress';
81
+ };
82
+ readonly addWorkItemsToCycle: {
83
+ readonly method: 'POST';
84
+ readonly path: '/api/v1/cycles/{cycleId}/work-items';
85
+ };
86
+ readonly listViews: {
87
+ readonly method: 'GET';
88
+ readonly path: '/api/v1/projects/{projectId}/views';
89
+ };
90
+ readonly createView: {
91
+ readonly method: 'POST';
92
+ readonly path: '/api/v1/projects/{projectId}/views';
93
+ };
94
+ readonly listIntake: {
95
+ readonly method: 'GET';
96
+ readonly path: '/api/v1/projects/{projectId}/intake';
97
+ };
98
+ readonly submitIntake: {
99
+ readonly method: 'POST';
100
+ readonly path: '/api/v1/projects/{projectId}/intake';
101
+ };
102
+ readonly triageIntake: {
103
+ readonly method: 'POST';
104
+ readonly path: '/api/v1/intake-items/{intakeItemId}/triage';
105
+ };
106
+ readonly previewImport: {
107
+ readonly method: 'POST';
108
+ readonly path: '/api/v1/projects/{projectId}/imports/preview';
109
+ };
110
+ readonly startImport: {
111
+ readonly method: 'POST';
112
+ readonly path: '/api/v1/projects/{projectId}/imports';
113
+ };
114
+ readonly listImports: {
115
+ readonly method: 'GET';
116
+ readonly path: '/api/v1/projects/{projectId}/imports';
117
+ };
118
+ readonly getImport: {
119
+ readonly method: 'GET';
120
+ readonly path: '/api/v1/imports/{runId}';
121
+ };
122
+ };
123
+ export type OperationId = keyof typeof OPERATIONS;
124
+ /** GET and HEAD are safe to repeat; anything else needs an idempotency key first. */
125
+ export declare function isIdempotentMethod(method: string): boolean;
126
+ /** Fill `{param}` placeholders, encoding each value. */
127
+ export declare function buildPath(template: string, params?: Record<string, string>): string;
128
+ //# sourceMappingURL=operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAA;AAEpE,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,UAAU,CAAA;IAClB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,eAAO,MAAM,UAAU;;iBACX,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,aAAa;;;iBACtC,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,YAAY;;;iBACvB,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,kBAAkB;;;iBAEtC,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,yCAAyC;;;iBAC7D,MAAM,EAAE,MAAM;iBAAE,IAAI,EAAE,yCAAyC;;;iBAClE,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,iCAAiC;;;iBACnD,MAAM,EAAE,OAAO;iBAAE,IAAI,EAAE,iCAAiC;;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MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAAG,MAAM,CAQvF"}
@@ -0,0 +1,13 @@
1
+ import type { Page } from './types';
2
+ /**
3
+ * Follow `nextCursor` to the end, one page at a time.
4
+ *
5
+ * Lazy: a caller that breaks out early pays for the pages it read and no more.
6
+ */
7
+ export declare function paginate<T>(fetchPage: (cursor: string | undefined) => Promise<Page<T>>, options?: {
8
+ cursor?: string;
9
+ maxItems?: number;
10
+ }): AsyncGenerator<T>;
11
+ /** Every item from {@link paginate}, as an array, up to `maxItems`. */
12
+ export declare function collect<T>(iterable: AsyncIterable<T>, maxItems?: number): Promise<T[]>;
13
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAEnC;;;;GAIG;AACH,wBAAuB,QAAQ,CAAC,CAAC,EAC/B,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAC3D,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GACnD,cAAc,CAAC,CAAC,CAAC,CAYnB;AAED,uEAAuE;AACvE,wBAAsB,OAAO,CAAC,CAAC,EAC7B,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAC1B,QAAQ,SAA2B,GAClC,OAAO,CAAC,CAAC,EAAE,CAAC,CAOd"}
@@ -0,0 +1,284 @@
1
+ /**
2
+ * Request and response shapes of the v1 API, as they arrive over JSON.
3
+ *
4
+ * The routes define these with zod in `apps/web` (`lib/api/contracts.ts` and
5
+ * the route files). The SDK is published without dependencies, so it cannot
6
+ * import those schemas; instead each response type has a field list below that
7
+ * the compiler checks against the type, and `apps/web/lib/api/sdk-contract.test.ts`
8
+ * checks against the route's zod schema. A field added on one side and not the
9
+ * other fails that test rather than reaching a user.
10
+ *
11
+ * Dates are ISO strings: that is what JSON carries.
12
+ */
13
+ export type Priority = 'urgent' | 'high' | 'medium' | 'low' | 'none';
14
+ export declare const PRIORITIES: readonly Priority[];
15
+ export type StateGroup = 'backlog' | 'unstarted' | 'started' | 'completed' | 'cancelled' | 'triage';
16
+ export interface WorkItem {
17
+ id: string;
18
+ key: string;
19
+ sequenceId: number;
20
+ name: string;
21
+ priority: Priority;
22
+ stateId: string | null;
23
+ assigneeIds: string[];
24
+ labelIds: string[];
25
+ parentId: string | null;
26
+ sortOrder: string;
27
+ createdAt: string;
28
+ /**
29
+ * Returned by `GET /work-items/{id}` (always, from Slice 2A on); not yet by
30
+ * lists or writes.
31
+ */
32
+ projectId?: string;
33
+ /** Not returned yet. Sent back as `If-Match` once the server versions items. */
34
+ version?: number;
35
+ }
36
+ export interface WorkItemDetail extends WorkItem {
37
+ /** Optional only so the SDK still reads a server older than Slice 2A. */
38
+ projectId?: string;
39
+ description: string | null;
40
+ startDate: string | null;
41
+ targetDate: string | null;
42
+ archivedAt: string | null;
43
+ updatedAt: string;
44
+ }
45
+ export interface Page<T> {
46
+ items: T[];
47
+ nextCursor: string | null;
48
+ }
49
+ export interface CreateWorkItemInput {
50
+ name: string;
51
+ description?: string;
52
+ stateId?: string;
53
+ priority?: Priority;
54
+ assigneeIds?: string[];
55
+ labelIds?: string[];
56
+ parentId?: string;
57
+ /** ISO date. */
58
+ startDate?: string;
59
+ targetDate?: string;
60
+ /** One of the project's work item types; absent means the project's default. */
61
+ typeId?: string;
62
+ }
63
+ /**
64
+ * The fields PATCH accepts today. The server strips anything else, so sending
65
+ * an unlisted field would look like success and change nothing.
66
+ */
67
+ export interface UpdateWorkItemInput {
68
+ name?: string;
69
+ description?: string;
70
+ stateId?: string;
71
+ priority?: Priority;
72
+ parentId?: string | null;
73
+ startDate?: string | null;
74
+ targetDate?: string | null;
75
+ /** A work item type of the item's project; null clears it. */
76
+ typeId?: string | null;
77
+ }
78
+ export interface ListWorkItemsOptions {
79
+ /** A @devpulse/query expression; sent JSON-encoded as `filter`. */
80
+ filter?: unknown;
81
+ limit?: number;
82
+ cursor?: string;
83
+ /** A state id. */
84
+ state?: string;
85
+ priority?: Priority;
86
+ }
87
+ export interface State {
88
+ id: string;
89
+ name: string;
90
+ group: StateGroup | string;
91
+ color: string;
92
+ description: string | null;
93
+ /** Fractional-index sort key; the list arrives already ordered by it. */
94
+ sequence: string;
95
+ isDefault: boolean;
96
+ }
97
+ export interface Label {
98
+ id: string;
99
+ name: string;
100
+ color: string;
101
+ description: string | null;
102
+ sortOrder: string;
103
+ }
104
+ export interface Cycle {
105
+ id: string;
106
+ name: string;
107
+ description: string | null;
108
+ startDate: string | null;
109
+ endDate: string | null;
110
+ status: 'draft' | 'upcoming' | 'active' | 'completed';
111
+ sortOrder: string;
112
+ completedAt: string | null;
113
+ archivedAt: string | null;
114
+ }
115
+ export interface CycleProgress {
116
+ progress: unknown;
117
+ burndown: unknown;
118
+ frozen: boolean;
119
+ }
120
+ export interface View {
121
+ id: string;
122
+ name: string;
123
+ description: string | null;
124
+ filter: unknown;
125
+ display: unknown;
126
+ access: 'private' | 'public';
127
+ ownerId: string | null;
128
+ sortOrder: string;
129
+ }
130
+ export interface CreateViewInput {
131
+ name: string;
132
+ description?: string;
133
+ where?: unknown;
134
+ display?: Record<string, unknown>;
135
+ access?: 'private' | 'public';
136
+ }
137
+ export type IntakeStatus = 'pending' | 'accepted' | 'declined' | 'snoozed' | 'duplicate';
138
+ export interface IntakeItem {
139
+ id: string;
140
+ workItemId: string;
141
+ status: IntakeStatus;
142
+ source: string;
143
+ sourceEmail: string | null;
144
+ snoozedUntil: string | null;
145
+ submittedAt: string;
146
+ }
147
+ export interface SubmitIntakeInput {
148
+ title: string;
149
+ description?: string;
150
+ source?: 'in_app' | 'form' | 'email' | 'api' | 'integration';
151
+ sourceEmail?: string;
152
+ extra?: Record<string, unknown>;
153
+ }
154
+ export interface SubmitIntakeResult {
155
+ intakeItemId: string;
156
+ workItemId: string;
157
+ sequenceId: number;
158
+ }
159
+ export interface TriageInput {
160
+ status: 'accepted' | 'declined' | 'snoozed' | 'duplicate';
161
+ /** ISO date; required when snoozing. */
162
+ snoozedUntil?: string;
163
+ /** Required when marking a duplicate. */
164
+ duplicateOfId?: string;
165
+ }
166
+ export interface TriageResult {
167
+ status: string;
168
+ movedToStateId: string | null;
169
+ }
170
+ export interface ImportPreview {
171
+ source: string;
172
+ total: number;
173
+ states: {
174
+ name: string;
175
+ suggestedStateId: string | null;
176
+ }[];
177
+ labels: {
178
+ name: string;
179
+ exists: boolean;
180
+ }[];
181
+ assignees: {
182
+ value: string;
183
+ matched: boolean;
184
+ }[];
185
+ skipped: {
186
+ row: number;
187
+ reason: string;
188
+ }[];
189
+ unmappedPriorities: string[];
190
+ /**
191
+ * False when re-importing would create duplicates rather than update — a CSV
192
+ * with no id column. Worth showing before the import, not after.
193
+ */
194
+ idempotent: boolean;
195
+ }
196
+ export interface ImportRun {
197
+ id: string;
198
+ source: string;
199
+ status: string;
200
+ totalItems: number;
201
+ createdCount: number;
202
+ updatedCount: number;
203
+ cursor: number;
204
+ skipped: {
205
+ row: number;
206
+ reason: string;
207
+ }[];
208
+ unmatched: {
209
+ kind: string;
210
+ value: string;
211
+ item: string;
212
+ }[];
213
+ error: string | null;
214
+ startedAt?: string | null;
215
+ finishedAt?: string | null;
216
+ createdAt?: string;
217
+ }
218
+ export type ImportSource = 'csv' | 'github' | 'jira' | 'linear';
219
+ export interface ImportInput {
220
+ source: ImportSource;
221
+ /** CSV text, or the parsed JSON export for the API sources. */
222
+ data: unknown;
223
+ repository?: string;
224
+ baseUrl?: string;
225
+ /** Source state name to state id. Only for `startImport`. */
226
+ stateMap?: Record<string, string>;
227
+ }
228
+ export interface Health {
229
+ status: string;
230
+ checks: Record<string, string>;
231
+ }
232
+ /** `GET /api/v1/me`: who the credential is. Never includes the key. */
233
+ export interface Me {
234
+ principal: {
235
+ kind: 'personal_key' | 'service_key' | string;
236
+ scopeType?: 'project' | 'organization' | 'personal' | string;
237
+ apiKeyId: string;
238
+ keyPrefix: string;
239
+ userId: string | null;
240
+ email: string | null;
241
+ organizationRole?: string | null;
242
+ };
243
+ organization: {
244
+ id: string;
245
+ slug: string;
246
+ name: string;
247
+ };
248
+ project: {
249
+ id: string;
250
+ identifier: string;
251
+ name: string;
252
+ } | null;
253
+ scopes: string[];
254
+ expiresAt: string | null;
255
+ }
256
+ /** `GET /api/v1/projects`. */
257
+ export interface Project {
258
+ id: string;
259
+ identifier: string;
260
+ name: string;
261
+ archivedAt: string | null;
262
+ }
263
+ /**
264
+ * Field lists, checked by the compiler to name every key of the type (and no
265
+ * others), and by the contract test to match the route's response schema.
266
+ */
267
+ type FieldsOf<T> = {
268
+ [K in keyof Required<T>]: true;
269
+ };
270
+ export declare const WORK_ITEM_FIELDS: FieldsOf<WorkItem>;
271
+ export declare const WORK_ITEM_DETAIL_FIELDS: FieldsOf<WorkItemDetail>;
272
+ export declare const STATE_FIELDS: FieldsOf<State>;
273
+ export declare const LABEL_FIELDS: FieldsOf<Label>;
274
+ export declare const CYCLE_FIELDS: FieldsOf<Cycle>;
275
+ export declare const VIEW_FIELDS: FieldsOf<View>;
276
+ export declare const INTAKE_ITEM_FIELDS: FieldsOf<IntakeItem>;
277
+ export declare const IMPORT_RUN_FIELDS: FieldsOf<ImportRun>;
278
+ /**
279
+ * Fields the SDK declares ahead of the server (the work management contracts
280
+ * add them). The contract test allows them to be missing from today's schemas.
281
+ */
282
+ export declare const PENDING_FIELDS: Record<string, readonly string[]>;
283
+ export {};
284
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,KAA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IAAI;KAAG,CAAC,IAAI,MAAM,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI;CAAE,CAAA;AAErD,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,QAAQ,CAc/C,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,cAAc,CAO5D,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,KAAK,CAQxC,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,KAAK,CAMxC,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,KAAK,CAUxC,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,IAAI,CAStC,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,UAAU,CAQnD,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,SAAS,CAcjD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAE5D,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const SDK_VERSION: string;
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,WAAW,EAAE,MAC6D,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycadence/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "TypeScript client for the YCadence API.",
5
5
  "keywords": [
6
6
  "ycadence",
@@ -47,7 +47,7 @@
47
47
  "provenance": false
48
48
  },
49
49
  "scripts": {
50
- "build": "rm -rf dist && bun build src/index.ts --outdir dist --target node --format esm --sourcemap=linked && tsc -p tsconfig.build.json",
50
+ "build": "rm -rf dist && bun build src/index.ts --outdir dist --target node --format esm --sourcemap=linked --define __YCADENCE_SDK_VERSION__=\\\"$(node -p \"require('./package.json').version\")\\\" && tsc -p tsconfig.build.json",
51
51
  "prepack": "cp ../../LICENSE LICENSE && bun run build",
52
52
  "type-check": "tsc --noEmit",
53
53
  "test": "vitest run"