quickbase-js 2.0.0-alpha.4 → 2.0.0-alpha.6
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/auth/temp-token.d.ts.map +1 -1
- package/dist/auth/temp-token.js +6 -1
- package/dist/auth/temp-token.js.map +1 -1
- package/dist/client/request.d.ts.map +1 -1
- package/dist/client/request.js +1 -0
- package/dist/client/request.js.map +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/config.js.map +1 -1
- package/dist/quickbase.esm.js +2 -2
- package/dist/quickbase.esm.js.map +2 -2
- package/dist/quickbase.min.js +2 -2
- package/dist/quickbase.min.js.map +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts", "../src/core/types.ts", "../src/core/errors.ts", "../src/core/logger.ts", "../src/core/config.ts", "../src/core/dates.ts", "../src/auth/user-token.ts", "../src/auth/token-cache.ts", "../src/auth/temp-token.ts", "../src/auth/sso-token.ts", "../src/auth/index.ts", "../src/client/retry.ts", "../src/client/request.ts", "../src/client/throttle.ts", "../src/client/pagination.ts", "../src/generated/client.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * QuickBase SDK v2\n *\n * A TypeScript/JavaScript client for the QuickBase JSON RESTful API.\n *\n * @example\n * ```typescript\n * import { createClient } from 'quickbase-js';\n *\n * const client = createClient({\n * realm: 'mycompany',\n * auth: {\n * type: 'user-token',\n * userToken: 'your-user-token',\n * },\n * });\n *\n * const app = await client.getApp({ appId: 'bpqe82s1' });\n * console.log(app.name);\n * ```\n */\n\n// Core exports\nexport type {\n QuickbaseConfig,\n AuthConfig,\n UserTokenAuthConfig,\n TempTokenAuthConfig,\n SsoTokenAuthConfig,\n RateLimitConfig,\n RetryConfig,\n RateLimitInfo,\n PaginationMetadata,\n PaginatedResponse,\n FieldInfo,\n} from './core/index.js';\n\nexport {\n QuickbaseError,\n RateLimitError,\n AuthenticationError,\n AuthorizationError,\n NotFoundError,\n ValidationError,\n TimeoutError,\n ServerError,\n} from './core/index.js';\n\n// Auth exports (for advanced usage)\nexport type { AuthStrategy } from './auth/index.js';\nexport {\n UserTokenStrategy,\n TempTokenStrategy,\n SsoTokenStrategy,\n createAuthStrategy,\n} from './auth/index.js';\n\n// Client exports\nexport type { RequestOptions } from './client/index.js';\nexport { SlidingWindowThrottle, NoOpThrottle } from './client/index.js';\n\n// Generated types and client\nexport type { QuickbaseAPI } from './generated/types.js';\nexport * from './generated/types.js';\nexport { createApiMethods } from './generated/client.js';\n\n// Main client factory\nimport type { QuickbaseConfig, ResolvedConfig } from './core/types.js';\nimport { resolveConfig } from './core/config.js';\nimport { createLogger } from './core/logger.js';\nimport { createAuthStrategy } from './auth/index.js';\nimport { createThrottle } from './client/throttle.js';\nimport { createRequestExecutor } from './client/request.js';\nimport type { QuickbaseAPI } from './generated/types.js';\nimport { createApiMethods } from './generated/client.js';\n\n/**\n * QuickBase client with typed API methods\n */\nexport interface QuickbaseClient extends QuickbaseAPI {\n /** Execute a raw request (for custom API calls) */\n request: <T = unknown>(options: {\n method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';\n path: string;\n body?: unknown;\n query?: Record<string, string | number | boolean | undefined>;\n dbid?: string;\n }) => Promise<T>;\n\n /** Get the resolved configuration */\n getConfig: () => ResolvedConfig;\n}\n\n/**\n * Create a QuickBase client\n *\n * @example User token authentication\n * ```typescript\n * const client = createClient({\n * realm: 'mycompany',\n * auth: {\n * type: 'user-token',\n * userToken: 'your-user-token',\n * },\n * });\n * ```\n *\n * @example Temporary token authentication\n * ```typescript\n * const client = createClient({\n * realm: 'mycompany',\n * auth: {\n * type: 'temp-token',\n * userToken: 'your-user-token',\n * appToken: 'optional-app-token',\n * },\n * });\n * ```\n *\n * @example With rate limiting callback\n * ```typescript\n * const client = createClient({\n * realm: 'mycompany',\n * auth: { type: 'user-token', userToken: 'token' },\n * rateLimit: {\n * onRateLimit: (info) => {\n * console.log(`Rate limited! Retry after ${info.retryAfter}s`);\n * },\n * },\n * });\n * ```\n */\nexport function createClient(config: QuickbaseConfig): QuickbaseClient {\n const resolvedConfig = resolveConfig(config);\n const logger = createLogger(resolvedConfig.debug);\n\n const authContext = {\n realm: resolvedConfig.realm,\n baseUrl: resolvedConfig.baseUrl,\n fetchApi: resolvedConfig.fetchApi,\n logger,\n };\n\n const auth = createAuthStrategy(resolvedConfig.auth, authContext);\n const throttle = createThrottle(resolvedConfig.proactiveThrottle);\n\n const executor = createRequestExecutor({\n config: resolvedConfig,\n auth,\n throttle,\n logger,\n });\n\n // Create typed API methods\n const apiMethods = createApiMethods(executor.execute, resolvedConfig.autoPaginate);\n\n return {\n ...apiMethods,\n request: executor.execute,\n getConfig: () => resolvedConfig,\n };\n}\n\n// Default export\nexport default createClient;\n", "/**\n * Core types for the QuickBase SDK v2\n */\n\n// =============================================================================\n// Configuration Types\n// =============================================================================\n\nexport interface QuickbaseConfig {\n /** Your QuickBase realm (e.g., \"mycompany\" for mycompany.quickbase.com) */\n realm: string;\n\n /** Authentication configuration */\n auth: AuthConfig;\n\n /** Rate limiting and retry configuration */\n rateLimit?: RateLimitConfig;\n\n /** Request timeout in milliseconds (default: 30000) */\n timeout?: number;\n\n /** Enable debug logging (default: false) */\n debug?: boolean;\n\n /** Custom fetch implementation (default: global fetch) */\n fetchApi?: typeof fetch;\n\n /** Base URL override (default: https://api.quickbase.com/v1) */\n baseUrl?: string;\n\n /** Automatically paginate all paginated requests when awaited (default: false) */\n autoPaginate?: boolean;\n\n /** Convert ISO date strings in responses to JavaScript Date objects (default: true) */\n convertDates?: boolean;\n}\n\nexport type AuthConfig =\n | UserTokenAuthConfig\n | TempTokenAuthConfig\n | SsoTokenAuthConfig;\n\nexport interface UserTokenAuthConfig {\n type: 'user-token';\n /** Your QuickBase user token */\n userToken: string;\n}\n\nexport interface TempTokenAuthConfig {\n type: 'temp-token';\n /**\n * User token used to fetch temporary tokens (optional)\n * Not required when running in QuickBase Code Pages - the browser session is used\n */\n userToken?: string;\n /** App token (optional, for apps that require it) */\n appToken?: string;\n /** Token lifespan in milliseconds (default: 290000 = ~4m50s) */\n tokenLifespanMs?: number;\n}\n\nexport interface SsoTokenAuthConfig {\n type: 'sso';\n /** SAML token for SSO authentication */\n samlToken: string;\n}\n\nexport interface RateLimitConfig {\n /**\n * Client-side proactive throttling (optional)\n * QuickBase allows 100 requests per 10 seconds per user token\n */\n proactiveThrottle?: {\n enabled: boolean;\n /** Requests allowed per 10 seconds (default: 100) */\n requestsPer10Seconds?: number;\n };\n\n /** Retry configuration for rate limit and server errors */\n retry?: RetryConfig;\n\n /** Callback when rate limited */\n onRateLimit?: (info: RateLimitInfo) => void;\n}\n\nexport interface RetryConfig {\n /** Maximum retry attempts (default: 3) */\n maxAttempts?: number;\n /** Initial delay in milliseconds (default: 1000) */\n initialDelayMs?: number;\n /** Maximum delay in milliseconds (default: 30000) */\n maxDelayMs?: number;\n /** Backoff multiplier (default: 2) */\n multiplier?: number;\n}\n\n// =============================================================================\n// Runtime Types\n// =============================================================================\n\nexport interface RequestContext {\n /** The API method being called */\n methodName: string;\n /** Current attempt number (1-based) */\n attempt: number;\n /** Maximum attempts allowed */\n maxAttempts: number;\n /** Database ID (for temp token auth) */\n dbid?: string;\n /** Request start timestamp */\n startTime: number;\n}\n\nexport interface RateLimitInfo {\n /** When the rate limit occurred */\n timestamp: Date;\n /** The request URL */\n requestUrl: string;\n /** HTTP status code */\n httpStatus: number;\n /** Retry-After header value (seconds) */\n retryAfter?: number;\n /** Cloudflare ray ID */\n cfRay?: string;\n /** Transaction ID */\n tid?: string;\n /** QuickBase API ray ID */\n qbApiRay?: string;\n /** Which retry attempt this was */\n attempt: number;\n}\n\n// =============================================================================\n// Response Types\n// =============================================================================\n\nexport interface PaginationMetadata {\n totalRecords: number;\n numRecords: number;\n numFields: number;\n skip?: number;\n top?: number;\n}\n\nexport interface PaginatedResponse<T> {\n data: T[];\n metadata: PaginationMetadata;\n fields?: FieldInfo[];\n}\n\nexport interface FieldInfo {\n id: number;\n label: string;\n type: string;\n}\n\n// =============================================================================\n// Internal Types\n// =============================================================================\n\nexport interface ResolvedConfig {\n realm: string;\n baseUrl: string;\n timeout: number;\n debug: boolean;\n fetchApi: typeof fetch;\n auth: AuthConfig;\n retry: Required<RetryConfig>;\n proactiveThrottle: {\n enabled: boolean;\n requestsPer10Seconds: number;\n };\n onRateLimit?: (info: RateLimitInfo) => void;\n autoPaginate: boolean;\n convertDates: boolean;\n}\n\n/** Default configuration values */\nexport const DEFAULT_CONFIG = {\n baseUrl: 'https://api.quickbase.com/v1',\n timeout: 30000,\n debug: false,\n retry: {\n maxAttempts: 3,\n initialDelayMs: 1000,\n maxDelayMs: 30000,\n multiplier: 2,\n },\n proactiveThrottle: {\n enabled: false,\n requestsPer10Seconds: 100,\n },\n tempTokenLifespanMs: 290000, // ~4m50s (QuickBase tokens expire at 5m)\n autoPaginate: false,\n convertDates: true,\n} as const;\n", "/**\n * Custom error types for the QuickBase SDK\n */\n\nimport type { RateLimitInfo } from './types.js';\n\n/**\n * Base error class for all QuickBase SDK errors\n */\nexport class QuickbaseError extends Error {\n readonly statusCode: number;\n readonly description?: string;\n readonly rayId?: string;\n\n constructor(\n message: string,\n statusCode: number,\n options?: {\n description?: string;\n rayId?: string;\n cause?: Error;\n }\n ) {\n super(message, { cause: options?.cause });\n this.name = 'QuickbaseError';\n this.statusCode = statusCode;\n this.description = options?.description;\n this.rayId = options?.rayId;\n\n // Maintains proper stack trace in V8 environments\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, QuickbaseError);\n }\n }\n\n toJSON() {\n return {\n name: this.name,\n message: this.message,\n statusCode: this.statusCode,\n description: this.description,\n rayId: this.rayId,\n };\n }\n}\n\n/**\n * Error thrown when rate limited (HTTP 429)\n */\nexport class RateLimitError extends QuickbaseError {\n readonly retryAfter?: number;\n readonly rateLimitInfo: RateLimitInfo;\n\n constructor(rateLimitInfo: RateLimitInfo, message?: string) {\n super(\n message || `Rate limited. Retry after ${rateLimitInfo.retryAfter ?? 'unknown'} seconds`,\n 429,\n { rayId: rateLimitInfo.qbApiRay || rateLimitInfo.cfRay }\n );\n this.name = 'RateLimitError';\n this.retryAfter = rateLimitInfo.retryAfter;\n this.rateLimitInfo = rateLimitInfo;\n }\n\n toJSON() {\n return {\n ...super.toJSON(),\n retryAfter: this.retryAfter,\n rateLimitInfo: this.rateLimitInfo,\n };\n }\n}\n\n/**\n * Error thrown when authentication fails (HTTP 401)\n */\nexport class AuthenticationError extends QuickbaseError {\n constructor(message: string, options?: { rayId?: string; cause?: Error }) {\n super(message, 401, options);\n this.name = 'AuthenticationError';\n }\n}\n\n/**\n * Error thrown when authorization fails (HTTP 403)\n */\nexport class AuthorizationError extends QuickbaseError {\n constructor(message: string, options?: { rayId?: string; cause?: Error }) {\n super(message, 403, options);\n this.name = 'AuthorizationError';\n }\n}\n\n/**\n * Error thrown when a resource is not found (HTTP 404)\n */\nexport class NotFoundError extends QuickbaseError {\n constructor(message: string, options?: { rayId?: string; cause?: Error }) {\n super(message, 404, options);\n this.name = 'NotFoundError';\n }\n}\n\n/**\n * Error thrown for bad requests (HTTP 400)\n */\nexport class ValidationError extends QuickbaseError {\n readonly errors?: Array<{ field?: string; message: string }>;\n\n constructor(\n message: string,\n options?: {\n description?: string;\n rayId?: string;\n errors?: Array<{ field?: string; message: string }>;\n cause?: Error;\n }\n ) {\n super(message, 400, options);\n this.name = 'ValidationError';\n this.errors = options?.errors;\n }\n\n toJSON() {\n return {\n ...super.toJSON(),\n errors: this.errors,\n };\n }\n}\n\n/**\n * Error thrown when request times out\n */\nexport class TimeoutError extends QuickbaseError {\n readonly timeoutMs: number;\n\n constructor(timeoutMs: number, options?: { rayId?: string; cause?: Error }) {\n super(`Request timed out after ${timeoutMs}ms`, 0, options);\n this.name = 'TimeoutError';\n this.timeoutMs = timeoutMs;\n }\n\n toJSON() {\n return {\n ...super.toJSON(),\n timeoutMs: this.timeoutMs,\n };\n }\n}\n\n/**\n * Error thrown for server errors (HTTP 5xx)\n */\nexport class ServerError extends QuickbaseError {\n constructor(\n statusCode: number,\n message: string,\n options?: { description?: string; rayId?: string; cause?: Error }\n ) {\n super(message, statusCode, options);\n this.name = 'ServerError';\n }\n}\n\n/**\n * Parse an error response from the QuickBase API\n */\nexport async function parseErrorResponse(\n response: Response,\n requestUrl: string\n): Promise<QuickbaseError> {\n const rayId = response.headers.get('qb-api-ray') || response.headers.get('cf-ray') || undefined;\n\n let body: { message?: string; description?: string; errors?: unknown[] } | null = null;\n try {\n body = await response.json() as { message?: string; description?: string; errors?: unknown[] };\n } catch {\n // Response body is not JSON\n }\n\n const message = body?.message || response.statusText || 'Unknown error';\n const description = body?.description;\n\n switch (response.status) {\n case 400:\n return new ValidationError(message, {\n description,\n rayId,\n errors: body?.errors as Array<{ field?: string; message: string }>,\n });\n\n case 401:\n return new AuthenticationError(message, { rayId });\n\n case 403:\n return new AuthorizationError(message, { rayId });\n\n case 404:\n return new NotFoundError(message, { rayId });\n\n case 429: {\n const retryAfter = response.headers.get('Retry-After');\n const rateLimitInfo: RateLimitInfo = {\n timestamp: new Date(),\n requestUrl,\n httpStatus: 429,\n retryAfter: retryAfter ? parseInt(retryAfter, 10) : undefined,\n cfRay: response.headers.get('cf-ray') || undefined,\n tid: response.headers.get('tid') || undefined,\n qbApiRay: response.headers.get('qb-api-ray') || undefined,\n attempt: 1, // Will be updated by caller\n };\n return new RateLimitError(rateLimitInfo, message);\n }\n\n default:\n if (response.status >= 500) {\n return new ServerError(response.status, message, { description, rayId });\n }\n return new QuickbaseError(message, response.status, { description, rayId });\n }\n}\n\n/**\n * Check if an error is retryable\n */\nexport function isRetryableError(error: unknown): boolean {\n if (error instanceof RateLimitError) {\n return true;\n }\n if (error instanceof ServerError) {\n return true;\n }\n if (error instanceof TimeoutError) {\n return true;\n }\n return false;\n}\n", "/**\n * Logger utility that respects the debug configuration\n */\n\nexport class Logger {\n private readonly enabled: boolean;\n private readonly prefix: string;\n\n constructor(enabled: boolean = false, prefix: string = 'quickbase-js') {\n this.enabled = enabled;\n this.prefix = prefix;\n }\n\n private formatMessage(level: string, message: string): string {\n const timestamp = new Date().toISOString();\n return `[${timestamp}] [${this.prefix}] [${level}] ${message}`;\n }\n\n debug(message: string, data?: unknown): void {\n if (this.enabled) {\n if (data !== undefined) {\n console.log(this.formatMessage('DEBUG', message), data);\n } else {\n console.log(this.formatMessage('DEBUG', message));\n }\n }\n }\n\n info(message: string, data?: unknown): void {\n if (this.enabled) {\n if (data !== undefined) {\n console.info(this.formatMessage('INFO', message), data);\n } else {\n console.info(this.formatMessage('INFO', message));\n }\n }\n }\n\n warn(message: string, data?: unknown): void {\n // Warnings are always logged, regardless of debug setting\n if (data !== undefined) {\n console.warn(this.formatMessage('WARN', message), data);\n } else {\n console.warn(this.formatMessage('WARN', message));\n }\n }\n\n error(message: string, error?: unknown): void {\n // Errors are always logged, regardless of debug setting\n if (error !== undefined) {\n console.error(this.formatMessage('ERROR', message), error);\n } else {\n console.error(this.formatMessage('ERROR', message));\n }\n }\n\n /**\n * Log rate limit information\n */\n rateLimit(info: {\n url: string;\n status: number;\n retryAfter?: number;\n attempt: number;\n rayId?: string;\n }): void {\n if (this.enabled) {\n this.debug(\n `Rate limited (attempt ${info.attempt}): ${info.url} - ` +\n `Status ${info.status}, Retry-After: ${info.retryAfter ?? 'not specified'}s` +\n (info.rayId ? `, Ray: ${info.rayId}` : '')\n );\n }\n }\n\n /**\n * Log request timing\n */\n timing(method: string, url: string, durationMs: number): void {\n if (this.enabled) {\n this.debug(`${method} ${url} completed in ${durationMs}ms`);\n }\n }\n\n /**\n * Log retry attempt\n */\n retry(attempt: number, maxAttempts: number, delayMs: number, reason: string): void {\n if (this.enabled) {\n this.debug(\n `Retry ${attempt}/${maxAttempts} in ${delayMs}ms: ${reason}`\n );\n }\n }\n\n /**\n * Log token operations (without exposing the actual token)\n */\n token(operation: 'fetch' | 'cache-hit' | 'cache-miss' | 'refresh' | 'expire', dbid?: string): void {\n if (this.enabled) {\n const target = dbid ? ` for dbid: ${dbid}` : '';\n this.debug(`Token ${operation}${target}`);\n }\n }\n}\n\n/**\n * Create a no-op logger for when logging is disabled\n * This avoids conditional checks at every log call\n */\nexport function createLogger(enabled: boolean): Logger {\n return new Logger(enabled);\n}\n", "/**\n * Configuration resolution and validation\n */\n\nimport type { QuickbaseConfig, ResolvedConfig, RetryConfig } from './types.js';\nimport { DEFAULT_CONFIG } from './types.js';\n\n/**\n * Resolve user configuration with defaults\n */\nexport function resolveConfig(config: QuickbaseConfig): ResolvedConfig {\n validateConfig(config);\n\n const retry: Required<RetryConfig> = {\n maxAttempts: config.rateLimit?.retry?.maxAttempts ?? DEFAULT_CONFIG.retry.maxAttempts,\n initialDelayMs: config.rateLimit?.retry?.initialDelayMs ?? DEFAULT_CONFIG.retry.initialDelayMs,\n maxDelayMs: config.rateLimit?.retry?.maxDelayMs ?? DEFAULT_CONFIG.retry.maxDelayMs,\n multiplier: config.rateLimit?.retry?.multiplier ?? DEFAULT_CONFIG.retry.multiplier,\n };\n\n const proactiveThrottle = {\n enabled: config.rateLimit?.proactiveThrottle?.enabled ?? DEFAULT_CONFIG.proactiveThrottle.enabled,\n requestsPer10Seconds:\n config.rateLimit?.proactiveThrottle?.requestsPer10Seconds ??\n DEFAULT_CONFIG.proactiveThrottle.requestsPer10Seconds,\n };\n\n return {\n realm: config.realm,\n baseUrl: config.baseUrl ?? DEFAULT_CONFIG.baseUrl,\n timeout: config.timeout ?? DEFAULT_CONFIG.timeout,\n debug: config.debug ?? DEFAULT_CONFIG.debug,\n fetchApi: config.fetchApi ?? globalThis.fetch,\n auth: config.auth,\n retry,\n proactiveThrottle,\n onRateLimit: config.rateLimit?.onRateLimit,\n autoPaginate: config.autoPaginate ?? DEFAULT_CONFIG.autoPaginate,\n convertDates: config.convertDates ?? DEFAULT_CONFIG.convertDates,\n };\n}\n\n/**\n * Validate configuration and throw if invalid\n */\nfunction validateConfig(config: QuickbaseConfig): void {\n if (!config.realm) {\n throw new Error('QuickBase realm is required');\n }\n\n if (typeof config.realm !== 'string') {\n throw new Error('QuickBase realm must be a string');\n }\n\n // Remove .quickbase.com suffix if provided\n if (config.realm.includes('.')) {\n throw new Error(\n 'Realm should be just the subdomain (e.g., \"mycompany\" not \"mycompany.quickbase.com\")'\n );\n }\n\n if (!config.auth) {\n throw new Error('Authentication configuration is required');\n }\n\n validateAuthConfig(config.auth);\n\n if (config.timeout !== undefined) {\n if (typeof config.timeout !== 'number' || config.timeout <= 0) {\n throw new Error('Timeout must be a positive number');\n }\n }\n\n if (config.rateLimit?.retry) {\n validateRetryConfig(config.rateLimit.retry);\n }\n\n if (config.rateLimit?.proactiveThrottle) {\n validateThrottleConfig(config.rateLimit.proactiveThrottle);\n }\n}\n\nfunction validateAuthConfig(auth: QuickbaseConfig['auth']): void {\n switch (auth.type) {\n case 'user-token':\n if (!auth.userToken) {\n throw new Error('User token is required for user-token auth');\n }\n break;\n\n case 'temp-token':\n // userToken is optional for temp-token auth\n // When running in Code Pages, the browser session is used\n break;\n\n case 'sso':\n if (!auth.samlToken) {\n throw new Error('SAML token is required for SSO auth');\n }\n break;\n\n default:\n throw new Error(`Unknown auth type: ${(auth as { type: string }).type}`);\n }\n}\n\nfunction validateRetryConfig(retry: RetryConfig): void {\n if (retry.maxAttempts !== undefined) {\n if (typeof retry.maxAttempts !== 'number' || retry.maxAttempts < 0) {\n throw new Error('maxAttempts must be a non-negative number');\n }\n }\n\n if (retry.initialDelayMs !== undefined) {\n if (typeof retry.initialDelayMs !== 'number' || retry.initialDelayMs < 0) {\n throw new Error('initialDelayMs must be a non-negative number');\n }\n }\n\n if (retry.maxDelayMs !== undefined) {\n if (typeof retry.maxDelayMs !== 'number' || retry.maxDelayMs < 0) {\n throw new Error('maxDelayMs must be a non-negative number');\n }\n }\n\n if (retry.multiplier !== undefined) {\n if (typeof retry.multiplier !== 'number' || retry.multiplier < 1) {\n throw new Error('multiplier must be a number >= 1');\n }\n }\n}\n\nfunction validateThrottleConfig(throttle: { enabled?: boolean; requestsPer10Seconds?: number }): void {\n if (throttle.requestsPer10Seconds !== undefined) {\n if (typeof throttle.requestsPer10Seconds !== 'number' || throttle.requestsPer10Seconds <= 0) {\n throw new Error('requestsPer10Seconds must be a positive number');\n }\n }\n}\n\n/**\n * Build the realm hostname from the realm name\n */\nexport function getRealmHostname(realm: string): string {\n return `${realm}.quickbase.com`;\n}\n", "/**\n * Date transformation utilities\n *\n * Converts ISO 8601 date strings in API responses to JavaScript Date objects.\n */\n\n/**\n * ISO 8601 date pattern\n * Matches: 2024-01-15, 2024-01-15T10:30:00, 2024-01-15T10:30:00.000Z, etc.\n */\nconst ISO_DATE_PATTERN = /^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,3})?(Z|[+-]\\d{2}:?\\d{2})?)?$/;\n\n/**\n * Check if a string looks like an ISO 8601 date\n */\nexport function isIsoDateString(value: string): boolean {\n return ISO_DATE_PATTERN.test(value);\n}\n\n/**\n * Recursively transform ISO date strings to Date objects in an object\n *\n * @param obj - The object to transform\n * @param enabled - Whether to perform conversion (pass false to skip)\n * @returns A new object with date strings converted to Date objects\n */\nexport function transformDates<T>(obj: T, enabled: boolean): T {\n if (!enabled || obj === null || obj === undefined) {\n return obj;\n }\n\n if (typeof obj !== 'object') {\n return obj;\n }\n\n if (Array.isArray(obj)) {\n return obj.map((item) => transformDates(item, enabled)) as T;\n }\n\n if (obj instanceof Date) {\n return obj;\n }\n\n const result: Record<string, unknown> = {};\n\n for (const [key, value] of Object.entries(obj)) {\n if (typeof value === 'string' && isIsoDateString(value)) {\n // Convert ISO date string to Date object\n result[key] = new Date(value);\n } else if (value instanceof Date) {\n // Keep existing Date objects as-is\n result[key] = value;\n } else if (typeof value === 'object' && value !== null) {\n // Recursively transform nested objects\n result[key] = transformDates(value, enabled);\n } else {\n // Keep other values as-is\n result[key] = value;\n }\n }\n\n return result as T;\n}\n", "/**\n * User Token Authentication Strategy\n *\n * Simplest auth method - uses a persistent user token directly.\n * Token is passed in the Authorization header as \"QB-USER-TOKEN {token}\"\n */\n\nimport type { AuthStrategy, AuthContext } from './types.js';\nimport type { Logger } from '../core/logger.js';\n\nexport class UserTokenStrategy implements AuthStrategy {\n private readonly userToken: string;\n private readonly logger: Logger;\n\n constructor(userToken: string, context: AuthContext) {\n this.userToken = userToken;\n this.logger = context.logger;\n }\n\n async getToken(_dbid?: string): Promise<string> {\n // User tokens don't change, just return the configured token\n return this.userToken;\n }\n\n getAuthorizationHeader(token: string): string {\n return `QB-USER-TOKEN ${token}`;\n }\n\n async handleAuthError(_dbid?: string): Promise<boolean> {\n // User tokens can't be refreshed - if auth fails, it's a permanent failure\n this.logger.debug('Auth error with user token - cannot refresh');\n return false;\n }\n\n invalidate(_dbid?: string): void {\n // No-op for user tokens - they don't have cached state\n }\n}\n", "/**\n * Token cache with TTL support\n *\n * Manages cached temporary tokens with expiration handling.\n * Tokens are stored per-dbid since QuickBase temp tokens are database-specific.\n */\n\nimport type { CachedToken } from './types.js';\n\nexport class TokenCache {\n private readonly cache = new Map<string, CachedToken>();\n private readonly defaultLifespanMs: number;\n\n constructor(defaultLifespanMs: number) {\n this.defaultLifespanMs = defaultLifespanMs;\n }\n\n /**\n * Get a cached token if it exists and is not expired\n */\n get(dbid: string): string | null {\n const entry = this.cache.get(dbid);\n if (!entry) {\n return null;\n }\n\n // Check if token is expired (with 10 second buffer)\n if (Date.now() >= entry.expiresAt - 10000) {\n this.cache.delete(dbid);\n return null;\n }\n\n return entry.token;\n }\n\n /**\n * Store a token with optional custom lifespan\n */\n set(dbid: string, token: string, lifespanMs?: number): void {\n const expiresAt = Date.now() + (lifespanMs ?? this.defaultLifespanMs);\n this.cache.set(dbid, { token, expiresAt });\n }\n\n /**\n * Remove a specific token from cache\n */\n delete(dbid: string): boolean {\n return this.cache.delete(dbid);\n }\n\n /**\n * Clear all cached tokens\n */\n clear(): void {\n this.cache.clear();\n }\n\n /**\n * Check if a token exists and is valid\n */\n has(dbid: string): boolean {\n return this.get(dbid) !== null;\n }\n\n /**\n * Get time until token expires (in ms), or null if not cached\n */\n getTimeToExpiry(dbid: string): number | null {\n const entry = this.cache.get(dbid);\n if (!entry) {\n return null;\n }\n const ttl = entry.expiresAt - Date.now();\n return ttl > 0 ? ttl : null;\n }\n\n /**\n * Get the number of cached tokens\n */\n get size(): number {\n // Clean up expired entries first\n this.cleanup();\n return this.cache.size;\n }\n\n /**\n * Remove expired entries from cache\n */\n private cleanup(): void {\n const now = Date.now();\n for (const [dbid, entry] of this.cache) {\n if (now >= entry.expiresAt) {\n this.cache.delete(dbid);\n }\n }\n }\n}\n", "/**\n * Temporary Token Authentication Strategy\n *\n * Fetches database-specific temporary tokens from the QuickBase API.\n * Tokens are cached and automatically refreshed when expired.\n */\n\nimport type { AuthStrategy, AuthContext } from './types.js';\nimport type { Logger } from '../core/logger.js';\nimport { TokenCache } from './token-cache.js';\nimport { DEFAULT_CONFIG } from '../core/types.js';\nimport { AuthenticationError } from '../core/errors.js';\n\nexport class TempTokenStrategy implements AuthStrategy {\n private readonly userToken?: string;\n private readonly appToken?: string;\n private readonly realm: string;\n private readonly baseUrl: string;\n private readonly fetchApi: typeof fetch;\n private readonly logger: Logger;\n private readonly cache: TokenCache;\n\n /**\n * Track pending token fetches to deduplicate concurrent requests\n * This prevents multiple simultaneous API calls for the same dbid\n */\n private readonly pendingFetches = new Map<string, Promise<string>>();\n\n constructor(\n userToken: string | undefined,\n context: AuthContext,\n options?: { appToken?: string; tokenLifespanMs?: number }\n ) {\n this.userToken = userToken;\n this.appToken = options?.appToken;\n this.realm = context.realm;\n this.baseUrl = context.baseUrl;\n this.fetchApi = context.fetchApi;\n this.logger = context.logger;\n this.cache = new TokenCache(\n options?.tokenLifespanMs ?? DEFAULT_CONFIG.tempTokenLifespanMs\n );\n }\n\n async getToken(dbid?: string): Promise<string> {\n if (!dbid) {\n throw new Error('Database ID (dbid) is required for temporary token authentication');\n }\n\n // Check cache first\n const cachedToken = this.cache.get(dbid);\n if (cachedToken) {\n this.logger.token('cache-hit', dbid);\n return cachedToken;\n }\n\n this.logger.token('cache-miss', dbid);\n\n // Check if there's already a fetch in progress for this dbid\n const pendingFetch = this.pendingFetches.get(dbid);\n if (pendingFetch) {\n this.logger.debug(`Waiting for existing token fetch for dbid: ${dbid}`);\n return pendingFetch;\n }\n\n // Fetch new token\n const fetchPromise = this.fetchToken(dbid);\n this.pendingFetches.set(dbid, fetchPromise);\n\n try {\n const token = await fetchPromise;\n return token;\n } finally {\n this.pendingFetches.delete(dbid);\n }\n }\n\n private async fetchToken(dbid: string): Promise<string> {\n this.logger.token('fetch', dbid);\n\n const url = `${this.baseUrl}/auth/temporary/${dbid}`;\n const headers: Record<string, string> = {\n 'QB-Realm-Hostname': `${this.realm}.quickbase.com`,\n 'Authorization': `QB-USER-TOKEN ${this.userToken}`,\n 'Content-Type': 'application/json',\n };\n\n if (this.appToken) {\n headers['QB-App-Token'] = this.appToken;\n }\n\n const response = await this.fetchApi(url, {\n method: 'GET',\n headers,\n });\n\n if (!response.ok) {\n const errorText = await response.text();\n throw new AuthenticationError(\n `Failed to fetch temporary token for ${dbid}: ${response.status} ${errorText}`,\n { rayId: response.headers.get('qb-api-ray') || undefined }\n );\n }\n\n const data = await response.json() as { temporaryAuthorization?: string };\n const token = data.temporaryAuthorization;\n\n if (!token) {\n throw new AuthenticationError(\n `No temporary token in response for ${dbid}`\n );\n }\n\n // Cache the token\n this.cache.set(dbid, token);\n this.logger.debug(`Cached new token for dbid: ${dbid}`);\n\n return token;\n }\n\n getAuthorizationHeader(token: string): string {\n return `QB-TEMP-TOKEN ${token}`;\n }\n\n async handleAuthError(dbid?: string): Promise<boolean> {\n if (!dbid) {\n this.logger.debug('Auth error without dbid - cannot refresh temp token');\n return false;\n }\n\n // Invalidate the cached token\n this.invalidate(dbid);\n\n // Try to fetch a new token\n try {\n this.logger.token('refresh', dbid);\n await this.getToken(dbid);\n return true;\n } catch (error) {\n this.logger.error(`Failed to refresh temp token for ${dbid}`, error);\n return false;\n }\n }\n\n invalidate(dbid?: string): void {\n if (dbid) {\n this.logger.token('expire', dbid);\n this.cache.delete(dbid);\n } else {\n // Invalidate all tokens\n this.cache.clear();\n }\n }\n}\n", "/**\n * SSO Token Authentication Strategy\n *\n * Exchanges a SAML token for a QuickBase temporary token via OAuth token exchange.\n */\n\nimport type { AuthStrategy, AuthContext } from './types.js';\nimport type { Logger } from '../core/logger.js';\nimport { TokenCache } from './token-cache.js';\nimport { DEFAULT_CONFIG } from '../core/types.js';\nimport { AuthenticationError } from '../core/errors.js';\n\nexport class SsoTokenStrategy implements AuthStrategy {\n private readonly samlToken: string;\n private readonly realm: string;\n private readonly baseUrl: string;\n private readonly fetchApi: typeof fetch;\n private readonly logger: Logger;\n private readonly cache: TokenCache;\n\n /**\n * Track pending SSO token exchange to deduplicate concurrent requests\n */\n private pendingExchange: Promise<string> | null = null;\n\n constructor(\n samlToken: string,\n context: AuthContext,\n options?: { tokenLifespanMs?: number }\n ) {\n this.samlToken = samlToken;\n this.realm = context.realm;\n this.baseUrl = context.baseUrl;\n this.fetchApi = context.fetchApi;\n this.logger = context.logger;\n // SSO tokens are global, not per-dbid, so we use a single cache key\n this.cache = new TokenCache(\n options?.tokenLifespanMs ?? DEFAULT_CONFIG.tempTokenLifespanMs\n );\n }\n\n private get cacheKey(): string {\n return '__sso__';\n }\n\n async getToken(_dbid?: string): Promise<string> {\n // Check cache first\n const cachedToken = this.cache.get(this.cacheKey);\n if (cachedToken) {\n this.logger.token('cache-hit');\n return cachedToken;\n }\n\n this.logger.token('cache-miss');\n\n // Check if there's already an exchange in progress\n if (this.pendingExchange) {\n this.logger.debug('Waiting for existing SSO token exchange');\n return this.pendingExchange;\n }\n\n // Exchange SAML token for QuickBase token\n const exchangePromise = this.exchangeToken();\n this.pendingExchange = exchangePromise;\n\n try {\n return await exchangePromise;\n } finally {\n this.pendingExchange = null;\n }\n }\n\n private async exchangeToken(): Promise<string> {\n this.logger.token('fetch');\n\n const url = `${this.baseUrl}/auth/oauth/token`;\n\n const body = new URLSearchParams({\n grant_type: 'urn:ietf:params:oauth:grant-type:token-exchange',\n requested_token_type: 'urn:quickbase:params:oauth:token-type:temp_token',\n subject_token: this.samlToken,\n subject_token_type: 'urn:ietf:params:oauth:token-type:saml2',\n });\n\n const response = await this.fetchApi(url, {\n method: 'POST',\n headers: {\n 'QB-Realm-Hostname': `${this.realm}.quickbase.com`,\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n body: body.toString(),\n });\n\n if (!response.ok) {\n const errorText = await response.text();\n throw new AuthenticationError(\n `SSO token exchange failed: ${response.status} ${errorText}`,\n { rayId: response.headers.get('qb-api-ray') || undefined }\n );\n }\n\n const data = await response.json() as {\n access_token?: string;\n issued_token_type?: string;\n token_type?: string;\n };\n\n const token = data.access_token;\n if (!token) {\n throw new AuthenticationError('No access_token in SSO exchange response');\n }\n\n // Cache the token\n this.cache.set(this.cacheKey, token);\n this.logger.debug('Cached new SSO token');\n\n return token;\n }\n\n getAuthorizationHeader(token: string): string {\n return `QB-TEMP-TOKEN ${token}`;\n }\n\n async handleAuthError(_dbid?: string): Promise<boolean> {\n // Invalidate the cached token\n this.invalidate();\n\n // Try to exchange for a new token\n try {\n this.logger.token('refresh');\n await this.getToken();\n return true;\n } catch (error) {\n this.logger.error('Failed to refresh SSO token', error);\n return false;\n }\n }\n\n invalidate(_dbid?: string): void {\n this.logger.token('expire');\n this.cache.clear();\n }\n}\n", "/**\n * Authentication module exports\n */\n\nexport type { AuthStrategy, AuthContext, CachedToken } from './types.js';\nexport { UserTokenStrategy } from './user-token.js';\nexport { TempTokenStrategy } from './temp-token.js';\nexport { SsoTokenStrategy } from './sso-token.js';\nexport { TokenCache } from './token-cache.js';\n\nimport type { AuthConfig } from '../core/types.js';\nimport type { AuthStrategy, AuthContext } from './types.js';\nimport { UserTokenStrategy } from './user-token.js';\nimport { TempTokenStrategy } from './temp-token.js';\nimport { SsoTokenStrategy } from './sso-token.js';\n\n/**\n * Factory function to create the appropriate auth strategy\n */\nexport function createAuthStrategy(\n authConfig: AuthConfig,\n context: AuthContext\n): AuthStrategy {\n switch (authConfig.type) {\n case 'user-token':\n return new UserTokenStrategy(authConfig.userToken, context);\n\n case 'temp-token':\n return new TempTokenStrategy(authConfig.userToken, context, {\n appToken: authConfig.appToken,\n tokenLifespanMs: authConfig.tokenLifespanMs,\n });\n\n case 'sso':\n return new SsoTokenStrategy(authConfig.samlToken, context);\n\n default:\n throw new Error(`Unknown auth type: ${(authConfig as { type: string }).type}`);\n }\n}\n", "/**\n * Retry logic with exponential backoff\n *\n * Handles:\n * - HTTP 429 (Rate Limited) - uses Retry-After header\n * - HTTP 5xx (Server Errors) - exponential backoff\n * - Timeout errors - exponential backoff\n */\n\nimport type { RequestContext, RateLimitInfo, ResolvedConfig } from '../core/types.js';\nimport type { Logger } from '../core/logger.js';\nimport {\n RateLimitError,\n ServerError,\n TimeoutError,\n isRetryableError,\n} from '../core/errors.js';\n\nexport interface RetryOptions {\n maxAttempts: number;\n initialDelayMs: number;\n maxDelayMs: number;\n multiplier: number;\n}\n\n/**\n * Calculate delay for exponential backoff\n */\nexport function calculateBackoffDelay(\n attempt: number,\n options: RetryOptions\n): number {\n // Exponential backoff: initialDelay * multiplier^(attempt-1)\n const delay = options.initialDelayMs * Math.pow(options.multiplier, attempt - 1);\n\n // Add jitter (\u00B110%) to prevent thundering herd\n const jitter = delay * 0.1 * (Math.random() * 2 - 1);\n\n return Math.min(delay + jitter, options.maxDelayMs);\n}\n\n/**\n * Get delay from Retry-After header or fall back to backoff calculation\n */\nexport function getRetryDelay(\n response: Response | null,\n attempt: number,\n options: RetryOptions\n): number {\n if (response) {\n const retryAfter = response.headers.get('Retry-After');\n if (retryAfter) {\n // Retry-After can be seconds or a date string\n const seconds = parseInt(retryAfter, 10);\n if (!isNaN(seconds)) {\n return seconds * 1000;\n }\n\n // Try parsing as a date\n const date = Date.parse(retryAfter);\n if (!isNaN(date)) {\n return Math.max(0, date - Date.now());\n }\n }\n }\n\n return calculateBackoffDelay(attempt, options);\n}\n\n/**\n * Extract rate limit info from response headers\n */\nexport function extractRateLimitInfo(\n response: Response,\n requestUrl: string,\n attempt: number\n): RateLimitInfo {\n const retryAfter = response.headers.get('Retry-After');\n\n return {\n timestamp: new Date(),\n requestUrl,\n httpStatus: response.status,\n retryAfter: retryAfter ? parseInt(retryAfter, 10) : undefined,\n cfRay: response.headers.get('cf-ray') || undefined,\n tid: response.headers.get('tid') || undefined,\n qbApiRay: response.headers.get('qb-api-ray') || undefined,\n attempt,\n };\n}\n\n/**\n * Sleep for a given duration\n */\nexport function sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Determine if a response status is retryable\n */\nexport function isRetryableStatus(status: number): boolean {\n return status === 429 || (status >= 500 && status < 600);\n}\n\n/**\n * Execute a request with retry logic\n */\nexport async function executeWithRetry<T>(\n fn: (context: RequestContext) => Promise<T>,\n context: RequestContext,\n config: ResolvedConfig,\n logger: Logger\n): Promise<T> {\n const options: RetryOptions = config.retry;\n let lastError: Error | null = null;\n\n for (let attempt = 1; attempt <= options.maxAttempts; attempt++) {\n context.attempt = attempt;\n\n try {\n return await fn(context);\n } catch (error) {\n lastError = error as Error;\n\n // Check if error is retryable\n if (!isRetryableError(error)) {\n throw error;\n }\n\n // Don't retry if we've exhausted attempts\n if (attempt >= options.maxAttempts) {\n throw error;\n }\n\n // Calculate retry delay\n let delayMs: number;\n let reason: string;\n\n if (error instanceof RateLimitError) {\n delayMs = error.retryAfter\n ? error.retryAfter * 1000\n : calculateBackoffDelay(attempt, options);\n reason = `Rate limited (429)`;\n\n // Notify callback\n if (config.onRateLimit) {\n config.onRateLimit(error.rateLimitInfo);\n }\n } else if (error instanceof ServerError) {\n delayMs = calculateBackoffDelay(attempt, options);\n reason = `Server error (${error.statusCode})`;\n } else if (error instanceof TimeoutError) {\n delayMs = calculateBackoffDelay(attempt, options);\n reason = `Timeout`;\n } else {\n delayMs = calculateBackoffDelay(attempt, options);\n reason = `Unknown retryable error`;\n }\n\n logger.retry(attempt, options.maxAttempts, delayMs, reason);\n\n await sleep(delayMs);\n }\n }\n\n // This should never be reached, but TypeScript needs it\n throw lastError || new Error('Retry loop exited unexpectedly');\n}\n", "/**\n * Request execution module\n *\n * Handles the full request lifecycle:\n * 1. Authentication\n * 2. Throttling (if enabled)\n * 3. Request execution\n * 4. Error handling with retry\n */\n\nimport type { RequestContext, ResolvedConfig } from '../core/types.js';\nimport type { AuthStrategy } from '../auth/types.js';\nimport type { Logger } from '../core/logger.js';\nimport type { Throttle } from './throttle.js';\nimport {\n QuickbaseError,\n RateLimitError,\n TimeoutError,\n parseErrorResponse,\n isRetryableError,\n} from '../core/errors.js';\nimport { extractRateLimitInfo, sleep } from './retry.js';\nimport { getRealmHostname } from '../core/config.js';\nimport { transformDates } from '../core/dates.js';\n\nexport interface RequestOptions {\n method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';\n path: string;\n body?: unknown;\n query?: Record<string, string | number | boolean | undefined>;\n /** Database ID for temp token auth */\n dbid?: string;\n /** Custom headers */\n headers?: Record<string, string>;\n}\n\nexport interface RequestExecutorOptions {\n config: ResolvedConfig;\n auth: AuthStrategy;\n throttle: Throttle;\n logger: Logger;\n}\n\n/**\n * Extract dbid from request options for temp-token auth.\n * Checks multiple locations where table/app ID may appear.\n */\nexport function extractDbid(options: RequestOptions): string | undefined {\n // 1. Explicit dbid takes priority\n if (options.dbid) {\n return options.dbid;\n }\n\n // 2. Check query params for tableId\n if (options.query?.tableId) {\n return String(options.query.tableId);\n }\n\n // 3. Check query params for appId (for app-level operations)\n if (options.query?.appId) {\n return String(options.query.appId);\n }\n\n // 4. Check path for tableId (e.g., /v1/tables/{tableId}/...)\n const tableIdMatch = options.path.match(/\\/tables\\/([^/?]+)/);\n if (tableIdMatch) {\n return tableIdMatch[1];\n }\n\n // 5. Check path for appId (e.g., /v1/apps/{appId}/...)\n const appIdMatch = options.path.match(/\\/apps\\/([^/?]+)/);\n if (appIdMatch) {\n return appIdMatch[1];\n }\n\n // 6. Check request body for 'from' field (runQuery, deleteRecords)\n if (options.body && typeof options.body === 'object') {\n const body = options.body as Record<string, unknown>;\n if (typeof body.from === 'string') {\n return body.from;\n }\n // 7. Check request body for 'to' field (upsert)\n if (typeof body.to === 'string') {\n return body.to;\n }\n }\n\n return undefined;\n}\n\n/**\n * Build URL with query parameters\n */\nfunction buildUrl(\n baseUrl: string,\n path: string,\n query?: Record<string, string | number | boolean | undefined>\n): string {\n // Ensure baseUrl ends with / and path doesn't start with / to properly join them\n // new URL('/apps/x', 'https://api.quickbase.com/v1') would give https://api.quickbase.com/apps/x (wrong)\n // new URL('apps/x', 'https://api.quickbase.com/v1/') gives https://api.quickbase.com/v1/apps/x (correct)\n const normalizedBase = baseUrl.endsWith('/') ? baseUrl : `${baseUrl}/`;\n const normalizedPath = path.startsWith('/') ? path.slice(1) : path;\n const url = new URL(normalizedPath, normalizedBase);\n\n if (query) {\n for (const [key, value] of Object.entries(query)) {\n if (value !== undefined) {\n url.searchParams.set(key, String(value));\n }\n }\n }\n\n return url.toString();\n}\n\n/**\n * Create request headers\n */\nasync function buildHeaders(\n auth: AuthStrategy,\n realmHostname: string,\n dbid?: string,\n customHeaders?: Record<string, string>\n): Promise<Record<string, string>> {\n const token = await auth.getToken(dbid);\n const authHeader = auth.getAuthorizationHeader(token);\n\n return {\n 'Content-Type': 'application/json',\n 'QB-Realm-Hostname': realmHostname,\n 'Authorization': authHeader,\n ...customHeaders,\n };\n}\n\n/**\n * Execute a single request (no retry logic)\n */\nasync function executeSingleRequest(\n options: RequestOptions,\n executor: RequestExecutorOptions,\n context: RequestContext\n): Promise<Response> {\n const { config, auth, throttle, logger } = executor;\n const url = buildUrl(config.baseUrl, options.path, options.query);\n const realmHostname = getRealmHostname(config.realm);\n\n // Get auth headers (use extracted dbid from context)\n const headers = await buildHeaders(auth, realmHostname, context.dbid, options.headers);\n\n // Apply throttling if enabled\n await throttle.acquire();\n\n // Build fetch options\n const fetchOptions: RequestInit = {\n method: options.method,\n headers,\n };\n\n if (options.body !== undefined) {\n fetchOptions.body = JSON.stringify(options.body);\n }\n\n // Create abort controller for timeout\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), config.timeout);\n fetchOptions.signal = controller.signal;\n\n const startTime = Date.now();\n\n try {\n const response = await config.fetchApi(url, fetchOptions);\n const duration = Date.now() - startTime;\n\n logger.timing(options.method, options.path, duration);\n\n return response;\n } catch (error) {\n if (error instanceof Error && error.name === 'AbortError') {\n throw new TimeoutError(config.timeout);\n }\n throw error;\n } finally {\n clearTimeout(timeoutId);\n }\n}\n\n/**\n * Handle response and throw appropriate errors\n */\nasync function handleResponse(\n response: Response,\n requestUrl: string,\n context: RequestContext,\n executor: RequestExecutorOptions\n): Promise<Response> {\n const { config, logger } = executor;\n\n if (response.ok) {\n return response;\n }\n\n // Extract rate limit info for 429s\n if (response.status === 429) {\n const rateLimitInfo = extractRateLimitInfo(response, requestUrl, context.attempt);\n\n logger.rateLimit({\n url: requestUrl,\n status: 429,\n retryAfter: rateLimitInfo.retryAfter,\n attempt: context.attempt,\n rayId: rateLimitInfo.qbApiRay || rateLimitInfo.cfRay,\n });\n\n // Notify callback\n if (config.onRateLimit) {\n config.onRateLimit(rateLimitInfo);\n }\n\n throw new RateLimitError(rateLimitInfo);\n }\n\n // Parse and throw appropriate error\n throw await parseErrorResponse(response, requestUrl);\n}\n\n/**\n * Execute a request with full retry logic\n */\nexport async function executeRequest<T = unknown>(\n options: RequestOptions,\n executor: RequestExecutorOptions\n): Promise<T> {\n const { config, auth, logger } = executor;\n const maxAttempts = config.retry.maxAttempts;\n\n // Extract dbid for temp-token auth\n const dbid = extractDbid(options);\n\n const context: RequestContext = {\n methodName: `${options.method} ${options.path}`,\n attempt: 1,\n maxAttempts,\n dbid,\n startTime: Date.now(),\n };\n\n let lastError: Error | null = null;\n\n for (let attempt = 1; attempt <= maxAttempts; attempt++) {\n context.attempt = attempt;\n\n try {\n const response = await executeSingleRequest(options, executor, context);\n const url = buildUrl(config.baseUrl, options.path, options.query);\n\n await handleResponse(response, url, context, executor);\n\n // Parse JSON response and optionally transform dates\n const data = await response.json();\n return transformDates(data, config.convertDates) as T;\n } catch (error) {\n lastError = error as Error;\n\n // Check if error is retryable\n if (!isRetryableError(error)) {\n throw error;\n }\n\n // Don't retry if we've exhausted attempts\n if (attempt >= maxAttempts) {\n throw error;\n }\n\n // Handle auth errors specially - try to refresh token\n if (error instanceof QuickbaseError && error.statusCode === 401) {\n const refreshed = await auth.handleAuthError(dbid);\n if (!refreshed) {\n throw error;\n }\n logger.debug('Token refreshed, retrying request');\n continue;\n }\n\n // Calculate retry delay\n let delayMs: number;\n let reason: string;\n\n if (error instanceof RateLimitError) {\n delayMs = error.retryAfter\n ? error.retryAfter * 1000\n : calculateBackoff(attempt, config.retry);\n reason = 'Rate limited (429)';\n } else if (error instanceof TimeoutError) {\n delayMs = calculateBackoff(attempt, config.retry);\n reason = 'Timeout';\n } else if (error instanceof QuickbaseError && error.statusCode >= 500) {\n delayMs = calculateBackoff(attempt, config.retry);\n reason = `Server error (${error.statusCode})`;\n } else {\n delayMs = calculateBackoff(attempt, config.retry);\n reason = 'Retryable error';\n }\n\n logger.retry(attempt, maxAttempts, delayMs, reason);\n await sleep(delayMs);\n }\n }\n\n throw lastError || new Error('Request failed');\n}\n\n/**\n * Calculate exponential backoff delay with jitter\n */\nfunction calculateBackoff(\n attempt: number,\n config: { initialDelayMs: number; maxDelayMs: number; multiplier: number }\n): number {\n const delay = config.initialDelayMs * Math.pow(config.multiplier, attempt - 1);\n const jitter = delay * 0.1 * (Math.random() * 2 - 1);\n return Math.min(delay + jitter, config.maxDelayMs);\n}\n\n/**\n * Create a request executor\n */\nexport function createRequestExecutor(options: RequestExecutorOptions) {\n return {\n execute: <T = unknown>(requestOptions: RequestOptions) =>\n executeRequest<T>(requestOptions, options),\n };\n}\n", "/**\n * Client-side throttling (optional)\n *\n * Implements a sliding window rate limiter that matches QuickBase's\n * \"100 requests per 10 seconds per user token\" limit.\n *\n * This is OPTIONAL - QuickBase handles rate limiting server-side.\n * Enable this if you want to avoid hitting 429s proactively.\n */\n\nexport class SlidingWindowThrottle {\n private readonly requestsPer10Seconds: number;\n private readonly timestamps: number[] = [];\n\n constructor(requestsPer10Seconds: number = 100) {\n this.requestsPer10Seconds = requestsPer10Seconds;\n }\n\n /**\n * Wait until a request slot is available\n */\n async acquire(): Promise<void> {\n const now = Date.now();\n const windowStart = now - 10000; // 10 second window\n\n // Remove timestamps outside the window\n while (this.timestamps.length > 0 && this.timestamps[0]! < windowStart) {\n this.timestamps.shift();\n }\n\n // If we're at the limit, wait until the oldest request exits the window\n if (this.timestamps.length >= this.requestsPer10Seconds) {\n const oldestTimestamp = this.timestamps[0]!;\n const waitTime = oldestTimestamp + 10000 - now;\n\n if (waitTime > 0) {\n await this.sleep(waitTime);\n // Recurse to recheck after waiting\n return this.acquire();\n }\n }\n\n // Record this request\n this.timestamps.push(Date.now());\n }\n\n /**\n * Get the number of requests made in the current window\n */\n getWindowCount(): number {\n const windowStart = Date.now() - 10000;\n return this.timestamps.filter((t) => t >= windowStart).length;\n }\n\n /**\n * Get remaining requests available in the current window\n */\n getRemaining(): number {\n return Math.max(0, this.requestsPer10Seconds - this.getWindowCount());\n }\n\n /**\n * Reset the throttle state\n */\n reset(): void {\n this.timestamps.length = 0;\n }\n\n private sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n}\n\n/**\n * No-op throttle for when proactive throttling is disabled\n */\nexport class NoOpThrottle {\n async acquire(): Promise<void> {\n // No-op\n }\n\n getWindowCount(): number {\n return 0;\n }\n\n getRemaining(): number {\n return Infinity;\n }\n\n reset(): void {\n // No-op\n }\n}\n\nexport type Throttle = SlidingWindowThrottle | NoOpThrottle;\n\nexport function createThrottle(config: {\n enabled: boolean;\n requestsPer10Seconds: number;\n}): Throttle {\n if (config.enabled) {\n return new SlidingWindowThrottle(config.requestsPer10Seconds);\n }\n return new NoOpThrottle();\n}\n", "/**\n * Pagination support with fluent API\n *\n * Provides automatic pagination for QuickBase API endpoints that return\n * paginated results. Supports both skip-based and token-based pagination.\n *\n * @example\n * ```typescript\n * // Fetch single page (default)\n * const page = await client.runQuery({ ... });\n *\n * // Fetch all pages automatically\n * const all = await client.runQuery({ ... }).all();\n *\n * // Fetch with record limit\n * const limited = await client.runQuery({ ... }).paginate({ limit: 500 });\n *\n * // Explicitly single page (if autoPaginate is enabled globally)\n * const single = await client.runQuery({ ... }).noPaginate();\n * ```\n */\n\n/**\n * Pagination options for controlling automatic pagination behavior\n */\nexport interface PaginationOptions {\n /** Maximum number of records to fetch across all pages */\n limit?: number;\n /** Starting offset for skip-based pagination */\n skip?: number;\n}\n\n/**\n * Metadata returned with paginated responses\n */\nexport interface PaginationMetadata {\n totalRecords?: number;\n numRecords?: number;\n numFields?: number;\n skip?: number;\n top?: number;\n nextPageToken?: string;\n nextToken?: string;\n}\n\n/**\n * A paginated response from the QuickBase API\n */\nexport interface PaginatedResponse<T = unknown> {\n data?: T[];\n fields?: Array<{ id: number; label: string; type: string }>;\n metadata: PaginationMetadata;\n [key: string]: unknown;\n}\n\n/**\n * Determines the type of pagination from a response\n */\nexport type PaginationType = 'skip' | 'token' | 'none';\n\n/**\n * Detect pagination type from response metadata\n */\nexport function detectPaginationType(metadata: PaginationMetadata): PaginationType {\n if (metadata.totalRecords !== undefined && metadata.skip !== undefined) {\n return 'skip';\n }\n if (metadata.nextPageToken !== undefined || metadata.nextToken !== undefined) {\n return 'token';\n }\n return 'none';\n}\n\n/**\n * Check if a response has more pages available\n */\nexport function hasMorePages(\n response: PaginatedResponse,\n paginationType: PaginationType,\n currentCount: number\n): boolean {\n const { metadata } = response;\n\n if (paginationType === 'skip') {\n return (\n metadata.totalRecords !== undefined &&\n currentCount < metadata.totalRecords\n );\n }\n\n if (paginationType === 'token') {\n const nextToken = metadata.nextPageToken ?? metadata.nextToken;\n return nextToken !== undefined && nextToken !== '';\n }\n\n return false;\n}\n\n/**\n * Find the data array key in a response object\n */\nexport function findDataKey(response: PaginatedResponse): string {\n for (const key of Object.keys(response)) {\n if (Array.isArray(response[key])) {\n return key;\n }\n }\n return 'data';\n}\n\n/**\n * Check if a response looks like a paginated response\n */\nexport function isPaginatedResponse(response: unknown): response is PaginatedResponse {\n if (!response || typeof response !== 'object') {\n return false;\n }\n\n const obj = response as Record<string, unknown>;\n\n // Must have metadata object\n if (!obj.metadata || typeof obj.metadata !== 'object') {\n return false;\n }\n\n // Must have an array field\n const hasArrayField = Object.values(obj).some(Array.isArray);\n if (!hasArrayField) {\n return false;\n }\n\n const metadata = obj.metadata as PaginationMetadata;\n\n // Check for pagination indicators\n return (\n metadata.totalRecords !== undefined ||\n metadata.numRecords !== undefined ||\n metadata.nextPageToken !== undefined ||\n metadata.nextToken !== undefined\n );\n}\n\n/**\n * Request executor function type\n */\nexport type RequestExecutor<T> = () => Promise<T>;\n\n/**\n * Request executor with pagination parameters\n */\nexport type PaginatedRequestExecutor<T> = (params: {\n skip?: number;\n nextPageToken?: string;\n nextToken?: string;\n}) => Promise<T>;\n\n/**\n * A thenable request that supports fluent pagination methods\n *\n * This class wraps an API request and allows chaining pagination methods\n * while still being directly awaitable.\n */\nexport class PaginatedRequest<T> implements PromiseLike<T> {\n private readonly executor: RequestExecutor<T>;\n private readonly paginatedExecutor?: PaginatedRequestExecutor<T>;\n private readonly defaultAutoPaginate: boolean;\n\n constructor(\n executor: RequestExecutor<T>,\n options?: {\n paginatedExecutor?: PaginatedRequestExecutor<T>;\n autoPaginate?: boolean;\n }\n ) {\n this.executor = executor;\n this.paginatedExecutor = options?.paginatedExecutor;\n this.defaultAutoPaginate = options?.autoPaginate ?? false;\n }\n\n /**\n * Implement PromiseLike to allow direct awaiting\n * Default behavior respects the global autoPaginate setting\n */\n then<TResult1 = T, TResult2 = never>(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null\n ): Promise<TResult1 | TResult2> {\n const promise = this.defaultAutoPaginate ? this.all() : this.executor();\n return promise.then(onfulfilled, onrejected);\n }\n\n /**\n * Fetch all pages and combine results\n */\n async all(): Promise<T> {\n return this.paginate({});\n }\n\n /**\n * Fetch pages with optional limit\n */\n async paginate(options: PaginationOptions = {}): Promise<T> {\n if (!this.paginatedExecutor) {\n // Not a paginated endpoint, just execute normally\n return this.executor();\n }\n\n const { limit, skip: initialSkip = 0 } = options;\n let allRecords: unknown[] = [];\n let lastResponse: PaginatedResponse | null = null;\n let paginationType: PaginationType = 'none';\n let currentSkip = initialSkip;\n let nextToken: string | undefined;\n\n // Fetch first page\n const firstResponse = await this.paginatedExecutor({ skip: initialSkip }) as PaginatedResponse;\n\n if (!isPaginatedResponse(firstResponse)) {\n // Not a paginated response, return as-is\n return firstResponse as T;\n }\n\n lastResponse = firstResponse;\n paginationType = detectPaginationType(firstResponse.metadata);\n\n const dataKey = findDataKey(firstResponse);\n const firstPageData = (firstResponse[dataKey] as unknown[]) || [];\n\n // Apply limit to first page if needed\n if (limit !== undefined && firstPageData.length > limit) {\n allRecords = firstPageData.slice(0, limit);\n } else {\n allRecords = [...firstPageData];\n }\n\n // Initialize continuation state\n if (paginationType === 'skip') {\n currentSkip = initialSkip + firstPageData.length;\n } else if (paginationType === 'token') {\n nextToken = firstResponse.metadata.nextPageToken ?? firstResponse.metadata.nextToken;\n }\n\n // Fetch remaining pages\n while (hasMorePages(lastResponse, paginationType, allRecords.length)) {\n // Check limit\n if (limit !== undefined && allRecords.length >= limit) {\n break;\n }\n\n // Fetch next page\n let nextResponse: PaginatedResponse;\n\n if (paginationType === 'skip') {\n nextResponse = await this.paginatedExecutor({ skip: currentSkip }) as PaginatedResponse;\n } else if (paginationType === 'token' && nextToken) {\n const tokenKey = lastResponse.metadata.nextPageToken !== undefined\n ? 'nextPageToken'\n : 'nextToken';\n nextResponse = await this.paginatedExecutor({ [tokenKey]: nextToken }) as PaginatedResponse;\n } else {\n break;\n }\n\n lastResponse = nextResponse;\n const pageData = (nextResponse[dataKey] as unknown[]) || [];\n\n // Check for empty response\n if (pageData.length === 0) {\n break;\n }\n\n // Apply limit if needed\n if (limit !== undefined) {\n const remainingCapacity = limit - allRecords.length;\n allRecords = allRecords.concat(pageData.slice(0, remainingCapacity));\n } else {\n allRecords = allRecords.concat(pageData);\n }\n\n // Update continuation state\n if (paginationType === 'skip') {\n currentSkip += pageData.length;\n } else if (paginationType === 'token') {\n nextToken = nextResponse.metadata.nextPageToken ?? nextResponse.metadata.nextToken;\n if (!nextToken) {\n break;\n }\n }\n }\n\n // Build final response\n const finalResponse: PaginatedResponse = {\n ...lastResponse,\n [dataKey]: allRecords,\n metadata: {\n ...lastResponse.metadata,\n numRecords: allRecords.length,\n skip: initialSkip,\n },\n };\n\n // Clear pagination tokens in final response\n if (paginationType === 'token') {\n delete finalResponse.metadata.nextPageToken;\n delete finalResponse.metadata.nextToken;\n }\n\n return finalResponse as T;\n }\n\n /**\n * Explicitly fetch only a single page (no pagination)\n */\n async noPaginate(): Promise<T> {\n return this.executor();\n }\n\n /**\n * Get the underlying promise (for compatibility)\n */\n toPromise(): Promise<T> {\n return this.then();\n }\n}\n\n/**\n * Create a paginated request wrapper\n */\nexport function createPaginatedRequest<T>(\n executor: RequestExecutor<T>,\n options?: {\n paginatedExecutor?: PaginatedRequestExecutor<T>;\n autoPaginate?: boolean;\n }\n): PaginatedRequest<T> {\n return new PaginatedRequest(executor, options);\n}\n", "/**\n * Auto-generated QuickBase API client implementation\n * DO NOT EDIT - Regenerate with: npm run spec:generate\n */\n\nimport { PaginatedRequest, createPaginatedRequest } from '../client/pagination.js';\n\nimport type {\n QuickbaseAPI,\n CreateAppRequest,\n CreateAppResponse,\n GetAppParams,\n GetAppResponse,\n UpdateAppParams,\n UpdateAppRequest,\n UpdateAppResponse,\n DeleteAppParams,\n DeleteAppRequest,\n DeleteAppResponse,\n GetAppEventsParams,\n GetAppEventsResponse,\n CopyAppParams,\n CopyAppRequest,\n CopyAppResponse,\n GetAppTablesParams,\n GetAppTablesResponse,\n CreateTableParams,\n CreateTableRequest,\n CreateTableResponse,\n GetTableParams,\n GetTableResponse,\n UpdateTableParams,\n UpdateTableRequest,\n UpdateTableResponse,\n DeleteTableParams,\n DeleteTableResponse,\n GetRelationshipsParams,\n GetRelationshipsResponse,\n CreateRelationshipParams,\n CreateRelationshipRequest,\n CreateRelationshipResponse,\n UpdateRelationshipParams,\n UpdateRelationshipRequest,\n UpdateRelationshipResponse,\n DeleteRelationshipParams,\n DeleteRelationshipResponse,\n GetTableReportsParams,\n GetTableReportsResponse,\n GetReportParams,\n GetReportResponse,\n RunReportParams,\n RunReportRequest,\n RunReportResponse,\n GetFieldsParams,\n GetFieldsResponse,\n CreateFieldParams,\n CreateFieldRequest,\n CreateFieldResponse,\n DeleteFieldsParams,\n DeleteFieldsRequest,\n DeleteFieldsResponse,\n GetFieldParams,\n GetFieldResponse,\n UpdateFieldParams,\n UpdateFieldRequest,\n UpdateFieldResponse,\n GetFieldsUsageParams,\n GetFieldsUsageResponse,\n GetFieldUsageParams,\n GetFieldUsageResponse,\n RunFormulaRequest,\n RunFormulaResponse,\n UpsertRequest,\n UpsertResponse,\n DeleteRecordsRequest,\n DeleteRecordsResponse,\n RunQueryRequest,\n RunQueryResponse,\n GetTempTokenDBIDParams,\n GetTempTokenDBIDResponse,\n ExchangeSsoTokenRequest,\n ExchangeSsoTokenResponse,\n CloneUserTokenRequest,\n CloneUserTokenResponse,\n TransferUserTokenRequest,\n TransferUserTokenResponse,\n DeactivateUserTokenResponse,\n DeleteUserTokenResponse,\n DownloadFileParams,\n DownloadFileResponse,\n DeleteFileParams,\n DeleteFileResponse,\n GetUsersParams,\n GetUsersRequest,\n GetUsersResponse,\n DenyUsersParams,\n DenyUsersRequest,\n DenyUsersResponse,\n DenyUsersAndGroupsParams,\n DenyUsersAndGroupsRequest,\n DenyUsersAndGroupsResponse,\n UndenyUsersParams,\n UndenyUsersRequest,\n UndenyUsersResponse,\n AddMembersToGroupParams,\n AddMembersToGroupRequest,\n AddMembersToGroupResponse,\n RemoveMembersFromGroupParams,\n RemoveMembersFromGroupRequest,\n RemoveMembersFromGroupResponse,\n AddManagersToGroupParams,\n AddManagersToGroupRequest,\n AddManagersToGroupResponse,\n RemoveManagersFromGroupParams,\n RemoveManagersFromGroupRequest,\n RemoveManagersFromGroupResponse,\n AddSubgroupsToGroupParams,\n AddSubgroupsToGroupRequest,\n AddSubgroupsToGroupResponse,\n RemoveSubgroupsFromGroupParams,\n RemoveSubgroupsFromGroupRequest,\n RemoveSubgroupsFromGroupResponse,\n AuditRequest,\n AuditResponse,\n PlatformAnalyticReadsParams,\n PlatformAnalyticReadsResponse,\n PlatformAnalyticEventSummariesParams,\n PlatformAnalyticEventSummariesRequest,\n PlatformAnalyticEventSummariesResponse,\n ExportSolutionParams,\n ExportSolutionResponse,\n UpdateSolutionParams,\n UpdateSolutionRequest,\n UpdateSolutionResponse,\n CreateSolutionRequest,\n CreateSolutionResponse,\n ExportSolutionToRecordParams,\n ExportSolutionToRecordResponse,\n CreateSolutionFromRecordParams,\n CreateSolutionFromRecordResponse,\n UpdateSolutionToRecordParams,\n UpdateSolutionToRecordResponse,\n ChangesetSolutionParams,\n ChangesetSolutionRequest,\n ChangesetSolutionResponse,\n ChangesetSolutionFromRecordParams,\n ChangesetSolutionFromRecordResponse,\n GenerateDocumentParams,\n GenerateDocumentResponse,\n} from './types.js';\n\nexport type RequestFn = <T>(options: {\n method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';\n path: string;\n body?: unknown;\n query?: Record<string, string | number | boolean | undefined>;\n}) => Promise<T>;\n\n/**\n * Create typed API methods from a request function\n * @param request - The request executor function\n * @param autoPaginate - Default auto-pagination behavior (default: false)\n */\nexport function createApiMethods(request: RequestFn, autoPaginate: boolean = false): QuickbaseAPI {\n return {\n /**\n * Create an app\n *\n * Creates an application in an account. You must have application creation rights in the respective account. Main properties and application variables can be set with this API.\n *\n * @param body - Request body\n * @param body.assignToken - Set to true if you would like to assign the app to the user token you used to create the application. The default is false. (optional)\n * @param body.variables - The app variables. A maximum of 10 variables can be inserted at a time. See [About Application Variables](https://help.quickbase.com/user-assistance/variables.html) (optional)\n * @param body.name - The app name. You are allowed to create multiple apps with the same name, in the same realm, because they will have different dbid values. We urge you to be careful about doing this.\n * @param body.securityProperties - Application security properties. (optional)\n * @param body.description - The description for the app. If this property is left out, the app description will be blank. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/createApp\n */\n createApp(body: CreateAppRequest): Promise<CreateAppResponse> {\n return request<CreateAppResponse>({\n method: 'POST',\n path: '/apps',\n body,\n });\n },\n\n /**\n * Get an app\n *\n * Returns the main properties of an application, including application variables.\n *\n * @param params.appId - The unique identifier of an app\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getApp\n */\n getApp(params: GetAppParams): Promise<GetAppResponse> {\n return request<GetAppResponse>({\n method: 'GET',\n path: `/apps/${params.appId}`,\n });\n },\n\n /**\n * Update an app\n *\n * Updates the main properties and/or application variables for a specific application. Any properties of the app that you do not specify in the request body will remain unchanged.\n *\n * @param params.appId - The unique identifier of an app\n *\n * @param body - Request body (optional)\n * @param body.variables - The app variables. A maximum of 10 variables can be updated at a time. See [About Application Variables](https://help.quickbase.com/user-assistance/variables.html) (optional)\n * @param body.name - The name for the app. (optional)\n * @param body.securityProperties - Security properties of the application (optional)\n * @param body.description - The description for the app. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/updateApp\n */\n updateApp(params: UpdateAppParams, body?: UpdateAppRequest): Promise<UpdateAppResponse> {\n return request<UpdateAppResponse>({\n method: 'POST',\n path: `/apps/${params.appId}`,\n body,\n });\n },\n\n /**\n * Delete an app\n *\n * Deletes an entire application, including all of the tables and data.\n *\n * @param params.appId - The unique identifier of an app\n *\n * @param body - Request body\n * @param body.name - To confirm application deletion we ask for application name.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/deleteApp\n */\n deleteApp(params: DeleteAppParams, body: DeleteAppRequest): Promise<DeleteAppResponse> {\n return request<DeleteAppResponse>({\n method: 'DELETE',\n path: `/apps/${params.appId}`,\n body,\n });\n },\n\n /**\n * Get app events\n *\n * Get a list of events that can be triggered based on data or user actions in this application, includes: Email notification, Reminders, Subscriptions, QB Actions, Webhooks, record change triggered Automations (does not include scheduled).\n *\n * @param params.appId - The unique identifier of an app\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getAppEvents\n */\n getAppEvents(params: GetAppEventsParams): Promise<GetAppEventsResponse> {\n return request<GetAppEventsResponse>({\n method: 'GET',\n path: `/apps/${params.appId}/events`,\n });\n },\n\n /**\n * Copy an app\n *\n * Copies the specified application. The new application will have the same schema as the original. See below for additional copy options.\n *\n * @param params.appId - The unique identifier of an app\n *\n * @param body - Request body\n * @param body.name - The name of the newly copied app\n * @param body.description - The description of the newly copied app (optional)\n * @param body.properties - The configuration properties for performing the app copy (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/copyApp\n */\n copyApp(params: CopyAppParams, body: CopyAppRequest): Promise<CopyAppResponse> {\n return request<CopyAppResponse>({\n method: 'POST',\n path: `/apps/${params.appId}/copy`,\n body,\n });\n },\n\n /**\n * Get tables for an app\n *\n * Gets a list of all the tables that exist in a specific application. The properties for each table are the same as what is returned in Get table.\n *\n * @param params.appId - The unique identifier of an app\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getAppTables\n */\n getAppTables(params: GetAppTablesParams): Promise<GetAppTablesResponse> {\n return request<GetAppTablesResponse>({\n method: 'GET',\n path: '/tables',\n query: { appId: params.appId },\n });\n },\n\n /**\n * Create a table\n *\n * Creates a table in an application.\n *\n * @param params.appId - The unique identifier of an app\n *\n * @param body - Request body\n * @param body.name - The name for the table.\n * @param body.pluralRecordName - The plural noun for records in the table. If this value is not passed the default value is 'Records'. (optional)\n * @param body.singleRecordName - The singular noun for records in the table. If this value is not passed the default value is 'Record'. (optional)\n * @param body.description - The description for the table. If this value is not passed the default value is blank. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/createTable\n */\n createTable(params: CreateTableParams, body: CreateTableRequest): Promise<CreateTableResponse> {\n return request<CreateTableResponse>({\n method: 'POST',\n path: '/tables',\n query: { appId: params.appId },\n body,\n });\n },\n\n /**\n * Get a table\n *\n * Gets the properties of an individual table that is part of an application.\n *\n * @param params.appId - The unique identifier of an app\n * @param params.tableId - The unique identifier (dbid) of the table.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getTable\n */\n getTable(params: GetTableParams): Promise<GetTableResponse> {\n return request<GetTableResponse>({\n method: 'GET',\n path: `/tables/${params.tableId}`,\n query: { appId: params.appId },\n });\n },\n\n /**\n * Update a table\n *\n * Updates the main properties of a specific table. Any properties of the table that you do not specify in the request body will remain unchanged.\n *\n * @param params.appId - The unique identifier of an app\n * @param params.tableId - The unique identifier (dbid) of the table.\n *\n * @param body - Request body (optional)\n * @param body.name - The name for the table. (optional)\n * @param body.pluralRecordName - The plural noun for records in the table. If this value is not passed the default value is 'Records'. (optional)\n * @param body.singleRecordName - The singular noun for records in the table. If this value is not passed the default value is 'Record'. (optional)\n * @param body.description - The description for the table. If this value is not passed the default value is blank. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/updateTable\n */\n updateTable(params: UpdateTableParams, body?: UpdateTableRequest): Promise<UpdateTableResponse> {\n return request<UpdateTableResponse>({\n method: 'POST',\n path: `/tables/${params.tableId}`,\n query: { appId: params.appId },\n body,\n });\n },\n\n /**\n * Delete a table\n *\n * Deletes a specific table in an application, including all of the data within it.\n *\n * @param params.appId - The unique identifier of an app\n * @param params.tableId - The unique identifier (dbid) of the table.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/deleteTable\n */\n deleteTable(params: DeleteTableParams): Promise<DeleteTableResponse> {\n return request<DeleteTableResponse>({\n method: 'DELETE',\n path: `/tables/${params.tableId}`,\n query: { appId: params.appId },\n });\n },\n\n /**\n * Get all relationships\n *\n * Get a list of all relationships, and their definitions, for a specific table. Details are provided for the child side of relationships within a given application. Limited details are returned for cross-application relationships.\n *\n * @param params.skip - The number of relationships to skip. (optional)\n * @param params.tableId - The unique identifier (dbid) of the child table.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getRelationships\n */\n getRelationships(params: GetRelationshipsParams): PaginatedRequest<GetRelationshipsResponse> {\n const executor = () => {\n return request<GetRelationshipsResponse>({\n method: 'GET',\n path: `/tables/${params.tableId}/relationships`,\n query: { skip: params.skip },\n });\n };\n const paginatedExecutor = (paginationParams: { skip?: number; nextPageToken?: string; nextToken?: string }) => {\n return request<GetRelationshipsResponse>({\n method: 'GET',\n path: `/tables/${params.tableId}/relationships`,\n query: { skip: params.skip, ...paginationParams },\n });\n };\n return createPaginatedRequest(executor, { paginatedExecutor, autoPaginate });\n },\n\n /**\n * Create a relationship\n *\n * Creates a relationship in a table as well as lookup/summary fields. Relationships can only be created for tables within the same app.\n *\n * @param params.tableId - The unique identifier (dbid) of the table. This will be the child table.\n *\n * @param body - Request body\n * @param body.summaryFields - Array of summary field objects which will turn into summary fields in the parent table. When you specify the 'COUNT' accumulation type, you have to specify 0 as the summaryFid (or not set it in the request). 'DISTINCT-COUNT' requires that summaryFid be set to an actual fid. (optional)\n * @param body.lookupFieldIds - Array of field ids in the parent table that will become lookup fields in the child table. (optional)\n * @param body.parentTableId - The parent table id for the relationship.\n * @param body.foreignKeyField - This property is optional. If it is not provided, the foreign key field will be created with the label \u2018Related <record>\u2019, where <record> is the name of a record in the parent table. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/createRelationship\n */\n createRelationship(params: CreateRelationshipParams, body: CreateRelationshipRequest): Promise<CreateRelationshipResponse> {\n return request<CreateRelationshipResponse>({\n method: 'POST',\n path: `/tables/${params.tableId}/relationship`,\n body,\n });\n },\n\n /**\n * Update a relationship\n *\n * Use this endpoint to add lookup fields and summary fields to an existing relationship. Updating a relationship will not delete existing lookup/summary fields.\n *\n * @param params.tableId - The unique identifier (dbid) of the table. This will be the child table.\n * @param params.relationshipId - The relationship id. This is the field id of the reference field on the child table.\n *\n * @param body - Request body (optional)\n * @param body.summaryFields - An array of objects, each representing a configuration of one field from the child table, that will become summary fields on the parent table. When you specify the 'COUNT' accumulation type, you have to specify 0 as the summaryFid (or not set it in the request). 'DISTINCT-COUNT' requires that summaryFid be set to an actual fid. (optional)\n * @param body.lookupFieldIds - An array of field ids on the parent table that will become lookup fields on the child table. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/updateRelationship\n */\n updateRelationship(params: UpdateRelationshipParams, body?: UpdateRelationshipRequest): Promise<UpdateRelationshipResponse> {\n return request<UpdateRelationshipResponse>({\n method: 'POST',\n path: `/tables/${params.tableId}/relationship/${params.relationshipId}`,\n body,\n });\n },\n\n /**\n * Delete a relationship\n *\n * Use this endpoint to delete an entire relationship, including all lookup and summary fields. The reference field in the relationship will not be deleted.\n *\n * @param params.tableId - The unique identifier (dbid) of the table. This will be the child table.\n * @param params.relationshipId - The relationship id. This is the field id of the reference field on the child table.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/deleteRelationship\n */\n deleteRelationship(params: DeleteRelationshipParams): Promise<DeleteRelationshipResponse> {\n return request<DeleteRelationshipResponse>({\n method: 'DELETE',\n path: `/tables/${params.tableId}/relationship/${params.relationshipId}`,\n });\n },\n\n /**\n * Get reports for a table\n *\n * Get the schema (properties) of all reports for a table. If the user running the API is an application administrator, the API will also return all personal reports with owner's user id.\n *\n * @param params.tableId - The unique identifier of the table.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getTableReports\n */\n getTableReports(params: GetTableReportsParams): Promise<GetTableReportsResponse> {\n return request<GetTableReportsResponse>({\n method: 'GET',\n path: '/reports',\n query: { tableId: params.tableId },\n });\n },\n\n /**\n * Get a report\n *\n * Get the schema (properties) of an individual report.\n *\n * @param params.tableId - The unique identifier of table.\n * @param params.reportId - The identifier of the report, unique to the table.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getReport\n */\n getReport(params: GetReportParams): Promise<GetReportResponse> {\n return request<GetReportResponse>({\n method: 'GET',\n path: `/reports/${params.reportId}`,\n query: { tableId: params.tableId },\n });\n },\n\n /**\n * Run a report\n *\n * Runs a report, based on an ID and returns the underlying data associated with it. The format of the data will vary based on the report type. Reports that focus on record-level data (table, calendar, etc.) return the individual records. Aggregate reports (summary, chart) will return the summarized information as configured in the report. UI-specific elements are not returned, such as totals, averages and visualizations. Returns data with intelligent pagination based on the approximate size of each record. The metadata object will include the necessary information to iterate over the response and gather more data.\n *\n * @param params.tableId - The identifier of the table for the report.\n * @param params.skip - The number of records to skip. You can set this value when paginating through a set of results. (optional)\n * @param params.top - The maximum number of records to return. You can override the default Quickbase pagination to get more or fewer results. If your requested value here exceeds the dynamic maximums, we will return a subset of results and the rest can be gathered in subsequent API calls. (optional)\n * @param params.reportId - The identifier of the report, unique to the table.\n *\n * @param body - Request body (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/runReport\n */\n runReport(params: RunReportParams, body?: RunReportRequest): PaginatedRequest<RunReportResponse> {\n const executor = () => {\n return request<RunReportResponse>({\n method: 'POST',\n path: `/reports/${params.reportId}/run`,\n query: { tableId: params.tableId, skip: params.skip, top: params.top },\n body,\n });\n };\n const paginatedExecutor = (paginationParams: { skip?: number; nextPageToken?: string; nextToken?: string }) => {\n const bodyRecord = body as unknown as Record<string, unknown> | undefined;\n const paginatedBody = paginationParams.skip !== undefined || paginationParams.nextPageToken || paginationParams.nextToken\n ? {\n ...(bodyRecord || {}),\n options: {\n ...(bodyRecord?.options as Record<string, unknown> || {}),\n ...(paginationParams.skip !== undefined ? { skip: paginationParams.skip } : {}),\n },\n ...(paginationParams.nextPageToken ? { nextPageToken: paginationParams.nextPageToken } : {}),\n ...(paginationParams.nextToken ? { nextToken: paginationParams.nextToken } : {}),\n }\n : body;\n return request<RunReportResponse>({\n method: 'POST',\n path: `/reports/${params.reportId}/run`,\n query: { tableId: params.tableId, skip: params.skip, top: params.top },\n body: paginatedBody,\n });\n };\n return createPaginatedRequest(executor, { paginatedExecutor, autoPaginate });\n },\n\n /**\n * Get fields for a table\n *\n * Gets the properties for all fields in a specific table. The properties for each field are the same as in Get field.\n *\n * @param params.tableId - The unique identifier (dbid) of the table.\n * @param params.includeFieldPerms - Set to 'true' if you'd like to get back the custom permissions for the field(s). (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getFields\n */\n getFields(params: GetFieldsParams): Promise<GetFieldsResponse> {\n return request<GetFieldsResponse>({\n method: 'GET',\n path: '/fields',\n query: { tableId: params.tableId, includeFieldPerms: params.includeFieldPerms },\n });\n },\n\n /**\n * Create a field\n *\n * Creates a field within a table, including the custom permissions of that field.\n *\n * @param params.tableId - The unique identifier of the table.\n *\n * @param body - Request body\n * @param body.audited - Indicates if the field is being tracked as part of Quickbase Audit Logs. You can only set this property to \"true\" if the app has audit logs enabled. See Enable data change logs under [Quickbase Audit Logs](https://help.quickbase.com/user-assistance/audit_logs.html). Defaults to false. (optional)\n * @param body.fieldHelp - The configured help text shown to users within the product. (optional)\n * @param body.bold - Indicates if the field is configured to display in bold in the product. Defaults to false. (optional)\n * @param body.properties - Specific field properties. (optional)\n * @param body.appearsByDefault - Indicates if the field is marked as a default in reports. Defaults to true. (optional)\n * @param body.fieldType - The [field types](https://help.quickbase.com/user-assistance/field_types.html), click on any of the field type links for more info.\n * @param body.permissions - Field Permissions for different roles. (optional)\n * @param body.addToForms - Whether the field you are adding should appear on forms. Defaults to false. (optional)\n * @param body.label - The label (name) of the field.\n * @param body.findEnabled - Indicates if the field is marked as searchable. Defaults to true. (optional)\n * @param body.noWrap - Indicates if the field is configured to not wrap when displayed in the product. Defaults to false. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/createField\n */\n createField(params: CreateFieldParams, body: CreateFieldRequest): Promise<CreateFieldResponse> {\n return request<CreateFieldResponse>({\n method: 'POST',\n path: '/fields',\n query: { tableId: params.tableId },\n body,\n });\n },\n\n /**\n * Delete field(s)\n *\n * Deletes one or many fields in a table, based on field id. This will also permanently delete any data or calculations in that field.\n *\n * @param params.tableId - The unique identifier of the table.\n *\n * @param body - Request body\n * @param body.fieldIds - List of field ids to be deleted.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/deleteFields\n */\n deleteFields(params: DeleteFieldsParams, body: DeleteFieldsRequest): Promise<DeleteFieldsResponse> {\n return request<DeleteFieldsResponse>({\n method: 'DELETE',\n path: '/fields',\n query: { tableId: params.tableId },\n body,\n });\n },\n\n /**\n * Get field\n *\n * Gets the properties of an individual field, based on field id. \n Properties present on all field types are returned at the top level. Properties unique to a specific type of field are returned under the 'properties' attribute. Please see [Field types page](../fieldInfo) for more details on the properties for each field type.\n *\n * @param params.tableId - The unique identifier (dbid) of the table.\n * @param params.includeFieldPerms - Set to 'true' if you'd like to get back the custom permissions for the field(s). (optional)\n * @param params.fieldId - The unique identifier (fid) of the field.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getField\n */\n getField(params: GetFieldParams): Promise<GetFieldResponse> {\n return request<GetFieldResponse>({\n method: 'GET',\n path: `/fields/${params.fieldId}`,\n query: { tableId: params.tableId, includeFieldPerms: params.includeFieldPerms },\n });\n },\n\n /**\n * Update a field\n *\n * Updates the properties and custom permissions of a field. The attempt to update certain properties might cause existing data to no longer obey the field\u2019s new properties and may be rejected. See the descriptions of required, unique, and choices, below, for specific situations. Any properties of the field that you do not specify in the request body will remain unchanged.\n *\n * @param params.tableId - The unique identifier of the table.\n * @param params.fieldId - The unique identifier (fid) of the field.\n *\n * @param body - Request body (optional)\n * @param body.audited - Indicates if the field is being tracked as part of Quickbase Audit Logs. You can only set this property to \"true\" if the app has audit logs enabled. See Enable data change logs under [Quickbase Audit Logs](https://help.quickbase.com/user-assistance/audit_logs.html). (optional)\n * @param body.fieldHelp - The configured help text shown to users within the product. (optional)\n * @param body.bold - Indicates if the field is configured to display in bold in the product. (optional)\n * @param body.required - Indicates if the field is required (i.e. if every record must have a non-null value in this field). If you attempt to change a field from not-required to required, and the table currently contains records that have null values in that field, you will get an error indicating that there are null values of the field. In this case you need to find and update those records with null values of the field before changing the field to required. (optional)\n * @param body.properties - Specific field properties. (optional)\n * @param body.appearsByDefault - Indicates if the field is marked as a default in reports. (optional)\n * @param body.unique - Indicates if every record in the table must contain a unique value of this field. If you attempt to change a field from not-unique to unique, and the table currently contains records with the same value of this field, you will get an error. In this case you need to find and update those records with duplicate values of the field before changing the field to unique. (optional)\n * @param body.permissions - Field Permissions for different roles. (optional)\n * @param body.addToForms - Whether the field you are adding should appear on forms. (optional)\n * @param body.label - The label (name) of the field. (optional)\n * @param body.findEnabled - Indicates if the field is marked as searchable. (optional)\n * @param body.noWrap - Indicates if the field is configured to not wrap when displayed in the product. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/updateField\n */\n updateField(params: UpdateFieldParams, body?: UpdateFieldRequest): Promise<UpdateFieldResponse> {\n return request<UpdateFieldResponse>({\n method: 'POST',\n path: `/fields/${params.fieldId}`,\n query: { tableId: params.tableId },\n body,\n });\n },\n\n /**\n * Get usage for all fields\n *\n * Get all the field usage statistics for a table. This is a summary of the information that can be found in the usage table of field properties.\n *\n * @param params.tableId - The unique identifier (dbid) of the table.\n * @param params.skip - The number of fields to skip from the list. (optional)\n * @param params.top - The maximum number of fields to return. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getFieldsUsage\n */\n getFieldsUsage(params: GetFieldsUsageParams): Promise<GetFieldsUsageResponse> {\n return request<GetFieldsUsageResponse>({\n method: 'GET',\n path: '/fields/usage',\n query: { tableId: params.tableId, skip: params.skip, top: params.top },\n });\n },\n\n /**\n * Get usage for a field\n *\n * Get a single fields usage statistics. This is a summary of the information that can be found in the usage table of field properties.\n *\n * @param params.tableId - The unique identifier (dbid) of the table.\n * @param params.fieldId - The unique identifier (fid) of the field.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getFieldUsage\n */\n getFieldUsage(params: GetFieldUsageParams): Promise<GetFieldUsageResponse> {\n return request<GetFieldUsageResponse>({\n method: 'GET',\n path: `/fields/usage/${params.fieldId}`,\n query: { tableId: params.tableId },\n });\n },\n\n /**\n * Run a formula\n *\n * Allows running a formula via an API call. Use this method in custom code to get the value back of a formula without a discrete field on a record.\n *\n * @param body - Request body\n * @param body.formula - The formula to run. This must be a valid Quickbase formula.\n * @param body.rid - The record ID to run the formula against. Only necessary for formulas that are run in the context of a record. For example, the formula User() does not need a record ID. (optional)\n * @param body.from - The unique identifier (dbid) of the table.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/runFormula\n */\n runFormula(body: RunFormulaRequest): Promise<RunFormulaResponse> {\n return request<RunFormulaResponse>({\n method: 'POST',\n path: '/formula/run',\n body,\n });\n },\n\n /**\n * Insert/Update record(s)\n *\n * Insert and/or update record(s) in a table. In this single API call, inserts and updates can be submitted. Update can use the key field on the table, or any other supported unique field. Refer to the [Field types page](../fieldInfo) for more information about how each field type should be formatted. This operation allows for incremental processing of successful records, even when some of the records fail. \n **Note:** This endpoint supports a maximum payload size of 40MB.\n *\n * @param body - Request body\n * @param body.to - The table identifier.\n * @param body.data - Record data array, where each record contains key-value mappings of fields to be defined/updated and their values. (optional)\n * @param body.mergeFieldId - The merge field id. (optional)\n * @param body.fieldsToReturn - Specify an array of field ids that will return data for any updates or added record. Record ID (FID 3) is always returned if any field ID is requested. (optional)\n *\n * @returns Response\n *\n * @see https://developer.quickbase.com/operation/upsert\n */\n upsert(body: UpsertRequest): PaginatedRequest<UpsertResponse> {\n const executor = () => {\n return request<UpsertResponse>({\n method: 'POST',\n path: '/records',\n body,\n });\n };\n const paginatedExecutor = (paginationParams: { skip?: number; nextPageToken?: string; nextToken?: string }) => {\n const bodyRecord = body as unknown as Record<string, unknown> | undefined;\n const paginatedBody = paginationParams.skip !== undefined || paginationParams.nextPageToken || paginationParams.nextToken\n ? {\n ...(bodyRecord || {}),\n options: {\n ...(bodyRecord?.options as Record<string, unknown> || {}),\n ...(paginationParams.skip !== undefined ? { skip: paginationParams.skip } : {}),\n },\n ...(paginationParams.nextPageToken ? { nextPageToken: paginationParams.nextPageToken } : {}),\n ...(paginationParams.nextToken ? { nextToken: paginationParams.nextToken } : {}),\n }\n : body;\n return request<UpsertResponse>({\n method: 'POST',\n path: '/records',\n body: paginatedBody,\n });\n };\n return createPaginatedRequest(executor, { paginatedExecutor, autoPaginate });\n },\n\n /**\n * Delete record(s)\n *\n * Deletes record(s) in a table based on a query. Alternatively, all records in the table can be deleted.\n *\n * @param body - Request body\n * @param body.from - The unique identifier of the table.\n * @param body.where - The filter to delete records. To delete all records specify a filter that will include all records, for example {3.GT.0} where 3 is the ID of the Record ID field.\n *\n * @returns Successful delete records response.\n *\n * @see https://developer.quickbase.com/operation/deleteRecords\n */\n deleteRecords(body: DeleteRecordsRequest): Promise<DeleteRecordsResponse> {\n return request<DeleteRecordsResponse>({\n method: 'DELETE',\n path: '/records',\n body,\n });\n },\n\n /**\n * Query for data\n *\n * Pass in a query in the [Quickbase query language](https://help.quickbase.com/api-guide/componentsquery.html). Returns record data with [intelligent pagination](../pagination) based on the approximate size of each record. The metadata object will include the necessary information to iterate over the response and gather more data.\n *\n * @param body - Request body\n * @param body.options - Additional query options. (optional)\n * @param body.where - The filter, using the Quickbase query language, which determines the records to return. If this parameter is omitted, the query will return all records. (optional)\n * @param body.groupBy - An array that contains the fields to group the records by. (optional)\n * @param body.sortBy - An array of field IDs and sort directions. If this attribute is not set or set to false, queries will be unsorted to improve performance. (optional)\n * @param body.select - An array of field ids for the fields that should be returned in the response. If empty, the default columns on the table will be returned. (optional)\n * @param body.from - The table identifier.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/runQuery\n */\n runQuery(body: RunQueryRequest): PaginatedRequest<RunQueryResponse> {\n const executor = () => {\n return request<RunQueryResponse>({\n method: 'POST',\n path: '/records/query',\n body,\n });\n };\n const paginatedExecutor = (paginationParams: { skip?: number; nextPageToken?: string; nextToken?: string }) => {\n const bodyRecord = body as unknown as Record<string, unknown> | undefined;\n const paginatedBody = paginationParams.skip !== undefined || paginationParams.nextPageToken || paginationParams.nextToken\n ? {\n ...(bodyRecord || {}),\n options: {\n ...(bodyRecord?.options as Record<string, unknown> || {}),\n ...(paginationParams.skip !== undefined ? { skip: paginationParams.skip } : {}),\n },\n ...(paginationParams.nextPageToken ? { nextPageToken: paginationParams.nextPageToken } : {}),\n ...(paginationParams.nextToken ? { nextToken: paginationParams.nextToken } : {}),\n }\n : body;\n return request<RunQueryResponse>({\n method: 'POST',\n path: '/records/query',\n body: paginatedBody,\n });\n };\n return createPaginatedRequest(executor, { paginatedExecutor, autoPaginate });\n },\n\n /**\n * Get a temporary token for a dbid\n *\n * Use this endpoint to get a temporary authorization token, scoped to either an app or a table. It can only be used inside of code pages for client-side authentication because it relies on the browser session. Learn more about [extending Quickbase](https://helpv2.quickbase.com/hc/en-us/articles/4570341709844-Extending-Quickbase). You can then use this token to make other API calls (see [authorization](../auth)). This token expires in 5 minutes.\n *\n * @param params.dbid - The unique identifier of an app or table.\n *\n * @returns This token is used in the authorization header value (similar to the QB-USER-TOKEN), except it uses the QB-TEMP-TOKEN prefix header['Authorization'] = 'QB-TEMP-TOKEN {token}'\n *\n * @see https://developer.quickbase.com/operation/getTempTokenDBID\n */\n getTempTokenDBID(params: GetTempTokenDBIDParams): Promise<GetTempTokenDBIDResponse> {\n return request<GetTempTokenDBIDResponse>({\n method: 'GET',\n path: `/auth/temporary/${params.dbid}`,\n });\n },\n\n /**\n * Exchange an SSO token\n *\n * Use this endpoint to exchange a SAML assertion for a Quickbase token following [RFC 8693](https://www.rfc-editor.org/rfc/rfc8693.html). Callers can choose to return a token compatible with SCIM, XML, or RESTful APIs. The token duration is determined by the [SAML timeout session time](https://helpv2.quickbase.com/hc/en-us/articles/4570410646420-SAML-assertion-example#:~:text=Setting%20SAML%20timeout%20session%20time). You must be able to create a SAML assertion in your code to use this endpoint. The SAML assertion is verified against the configuration on the realm. Learn more about about [SAML assertions](https://helpv2.quickbase.com/hc/en-us/articles/4570410646420-SAML-assertion-example).\n *\n * @param body - Request body\n * @param body.grant_type - The value `urn:ietf:params:oauth:grant-type:token-exchange` indicates that a token exchange is being performed.\n * @param body.requested_token_type - An identifier for the type of the requested security token. For the RESTful API, use `urn:quickbase:params:oauth:token-type:temp_token`. For the XML or SCIM APIs use `urn:quickbase:params:oauth:token-type:temp_ticket`.\n * @param body.subject_token - A security token that represents the identity of the party on behalf of whom the request is being made. For SAML 2.0, the value should be a base64url-encoded SAML 2.0 assertion.\n * @param body.subject_token_type - An identifier that indicates the type of the security token in the `subject_token` parameter.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/exchangeSsoToken\n */\n exchangeSsoToken(body: ExchangeSsoTokenRequest): Promise<ExchangeSsoTokenResponse> {\n return request<ExchangeSsoTokenResponse>({\n method: 'POST',\n path: '/auth/oauth/token',\n body,\n });\n },\n\n /**\n * Clone a user token\n *\n * Clones the authenticated user token. All applications associated with that token are automatically associated with the new token.\n *\n * @param body - Request body\n * @param body.name - The new name for the cloned user token. (optional)\n * @param body.description - The description for the cloned user token. (optional)\n *\n * @returns Response\n *\n * @see https://developer.quickbase.com/operation/cloneUserToken\n */\n cloneUserToken(body: CloneUserTokenRequest): Promise<CloneUserTokenResponse> {\n return request<CloneUserTokenResponse>({\n method: 'POST',\n path: '/usertoken/clone',\n body,\n });\n },\n\n /**\n * Transfer a user token\n *\n * Transfers the specified user token. Application associations will remain intact. For security, permissions must manually be reconciled.\n *\n * @param body - Request body\n * @param body.id - The id of the user token to transfer (optional)\n * @param body.from - The id of the user to transfer the user token from (optional)\n * @param body.to - The id of the user to transfer the user token to (optional)\n *\n * @returns Response\n *\n * @see https://developer.quickbase.com/operation/transferUserToken\n */\n transferUserToken(body: TransferUserTokenRequest): Promise<TransferUserTokenResponse> {\n return request<TransferUserTokenResponse>({\n method: 'POST',\n path: '/usertoken/transfer',\n body,\n });\n },\n\n /**\n * Deactivate a user token\n *\n * Deactivates the authenticated user token. Once this is done, the user token must be reactivated in the user interface.\n *\n * @returns Response\n *\n * @see https://developer.quickbase.com/operation/deactivateUserToken\n */\n deactivateUserToken(): Promise<DeactivateUserTokenResponse> {\n return request<DeactivateUserTokenResponse>({\n method: 'POST',\n path: '/usertoken/deactivate',\n });\n },\n\n /**\n * Delete a user token\n *\n * Deletes the authenticated user token. This is not reversible.\n *\n * @returns Response\n *\n * @see https://developer.quickbase.com/operation/deleteUserToken\n */\n deleteUserToken(): Promise<DeleteUserTokenResponse> {\n return request<DeleteUserTokenResponse>({\n method: 'DELETE',\n path: '/usertoken',\n });\n },\n\n /**\n * Download file\n *\n * Downloads the file attachment, with the file attachment content encoded in base64 format. The API response returns the file name in the `Content-Disposition` header. Meta-data about files can be retrieved from the /records and /reports endpoints, where applicable. Use those endpoints to get the necessary information to fetch files.\n *\n * @param params.tableId - The unique identifier of the table.\n * @param params.recordId - The unique identifier of the record.\n * @param params.fieldId - The unique identifier of the field.\n * @param params.versionNumber - The file attachment version number.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/downloadFile\n */\n downloadFile(params: DownloadFileParams): Promise<DownloadFileResponse> {\n return request<DownloadFileResponse>({\n method: 'GET',\n path: `/files/${params.tableId}/${params.recordId}/${params.fieldId}/${params.versionNumber}`,\n });\n },\n\n /**\n * Delete file\n *\n * Deletes one file attachment version. Meta-data about files can be retrieved from the /records and /reports endpoints, where applicable. Use those endpoints to get the necessary information to delete file versions.\n *\n * @param params.tableId - The unique identifier of the table.\n * @param params.recordId - The unique identifier of the record.\n * @param params.fieldId - The unique identifier of the field.\n * @param params.versionNumber - The file attachment version number.\n *\n * @returns Successfully Deleted the File Attachment\n *\n * @see https://developer.quickbase.com/operation/deleteFile\n */\n deleteFile(params: DeleteFileParams): Promise<DeleteFileResponse> {\n return request<DeleteFileResponse>({\n method: 'DELETE',\n path: `/files/${params.tableId}/${params.recordId}/${params.fieldId}/${params.versionNumber}`,\n });\n },\n\n /**\n * Get users\n *\n * Get all users in an account or narrowed down list of users filtered by email(s). The returned users may be paginated depending on the user count. The count of the returned users may vary. When `nextPageToken` value in the response is not empty, that indicates that there are more results to be returned, you can use this value to get the next result set ('page').\n *\n * @param params.accountId - The account id being used to get users. If no value is specified, the first account associated with the requesting user token is chosen. (optional)\n *\n * @param body - Request body (optional)\n * @param body.emails - When provided, the returned users will be narrowed down only to the users included in this list. (optional)\n * @param body.appIds - When provided, the returned users will be narrowed down only to the users assigned to the app id's provided in this list. The provided app id's should belong to the same account. (optional)\n * @param body.nextPageToken - Next page token used to get the next 'page' of results when available. When this field is empty, the first page is returned. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getUsers\n */\n getUsers(params: GetUsersParams, body?: GetUsersRequest): PaginatedRequest<GetUsersResponse> {\n const executor = () => {\n return request<GetUsersResponse>({\n method: 'POST',\n path: '/users',\n query: { accountId: params.accountId },\n body,\n });\n };\n const paginatedExecutor = (paginationParams: { skip?: number; nextPageToken?: string; nextToken?: string }) => {\n const bodyRecord = body as unknown as Record<string, unknown> | undefined;\n const paginatedBody = paginationParams.skip !== undefined || paginationParams.nextPageToken || paginationParams.nextToken\n ? {\n ...(bodyRecord || {}),\n options: {\n ...(bodyRecord?.options as Record<string, unknown> || {}),\n ...(paginationParams.skip !== undefined ? { skip: paginationParams.skip } : {}),\n },\n ...(paginationParams.nextPageToken ? { nextPageToken: paginationParams.nextPageToken } : {}),\n ...(paginationParams.nextToken ? { nextToken: paginationParams.nextToken } : {}),\n }\n : body;\n return request<GetUsersResponse>({\n method: 'POST',\n path: '/users',\n query: { accountId: params.accountId },\n body: paginatedBody,\n });\n };\n return createPaginatedRequest(executor, { paginatedExecutor, autoPaginate });\n },\n\n /**\n * Deny users\n *\n * Denies users access to the realm but leaves them listed in groups they have been added to.\n *\n * @param params.accountId - The account id being used to deny users. If no value is specified, the first account associated with the requesting user token is chosen. (optional)\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/denyUsers\n */\n denyUsers(params: DenyUsersParams, body: DenyUsersRequest): Promise<DenyUsersResponse> {\n return request<DenyUsersResponse>({\n method: 'PUT',\n path: '/users/deny',\n query: { accountId: params.accountId },\n body,\n });\n },\n\n /**\n * Deny and remove users from groups\n *\n * Denies users access to the realm and allows you to remove them from groups.\n *\n * @param params.accountId - The account id being used to deny users. If no value is specified, the first account associated with the requesting user token is chosen. (optional)\n * @param params.shouldDeleteFromGroups - Specifies if the users should also be removed from all groups.\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/denyUsersAndGroups\n */\n denyUsersAndGroups(params: DenyUsersAndGroupsParams, body: DenyUsersAndGroupsRequest): Promise<DenyUsersAndGroupsResponse> {\n return request<DenyUsersAndGroupsResponse>({\n method: 'PUT',\n path: `/users/deny/${params.shouldDeleteFromGroups}`,\n query: { accountId: params.accountId },\n body,\n });\n },\n\n /**\n * Undeny users\n *\n * Grants users that have previously been denied access to the realm.\n *\n * @param params.accountId - The account id being used to undeny users. If no value is specified, the first account associated with the requesting user token is chosen. (optional)\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/undenyUsers\n */\n undenyUsers(params: UndenyUsersParams, body: UndenyUsersRequest): Promise<UndenyUsersResponse> {\n return request<UndenyUsersResponse>({\n method: 'PUT',\n path: '/users/undeny',\n query: { accountId: params.accountId },\n body,\n });\n },\n\n /**\n * Add members\n *\n * Adds a list of users to a given group as members.\n *\n * @param params.gid - This is the ID of the group being modified.\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/addMembersToGroup\n */\n addMembersToGroup(params: AddMembersToGroupParams, body: AddMembersToGroupRequest): Promise<AddMembersToGroupResponse> {\n return request<AddMembersToGroupResponse>({\n method: 'POST',\n path: `/groups/${params.gid}/members`,\n body,\n });\n },\n\n /**\n * Remove members\n *\n * Removes a list of members from a given group.\n *\n * @param params.gid - This is the ID of the group being modified.\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/removeMembersFromGroup\n */\n removeMembersFromGroup(params: RemoveMembersFromGroupParams, body: RemoveMembersFromGroupRequest): Promise<RemoveMembersFromGroupResponse> {\n return request<RemoveMembersFromGroupResponse>({\n method: 'DELETE',\n path: `/groups/${params.gid}/members`,\n body,\n });\n },\n\n /**\n * Add managers\n *\n * Adds a list of users to a given group as managers.\n *\n * @param params.gid - This is the ID of the group being modified.\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/addManagersToGroup\n */\n addManagersToGroup(params: AddManagersToGroupParams, body: AddManagersToGroupRequest): Promise<AddManagersToGroupResponse> {\n return request<AddManagersToGroupResponse>({\n method: 'POST',\n path: `/groups/${params.gid}/managers`,\n body,\n });\n },\n\n /**\n * Remove managers\n *\n * Removes a list of managers from a given group.\n *\n * @param params.gid - This is the ID of the group being modified.\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/removeManagersFromGroup\n */\n removeManagersFromGroup(params: RemoveManagersFromGroupParams, body: RemoveManagersFromGroupRequest): Promise<RemoveManagersFromGroupResponse> {\n return request<RemoveManagersFromGroupResponse>({\n method: 'DELETE',\n path: `/groups/${params.gid}/managers`,\n body,\n });\n },\n\n /**\n * Add child groups\n *\n * Adds a list of groups to a given group.\n *\n * @param params.gid - This is the ID of the group being modified.\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/addSubgroupsToGroup\n */\n addSubgroupsToGroup(params: AddSubgroupsToGroupParams, body: AddSubgroupsToGroupRequest): Promise<AddSubgroupsToGroupResponse> {\n return request<AddSubgroupsToGroupResponse>({\n method: 'POST',\n path: `/groups/${params.gid}/subgroups`,\n body,\n });\n },\n\n /**\n * Remove child groups\n *\n * Removes a list of groups from a given group.\n *\n * @param params.gid - This is the ID of the group being modified.\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/removeSubgroupsFromGroup\n */\n removeSubgroupsFromGroup(params: RemoveSubgroupsFromGroupParams, body: RemoveSubgroupsFromGroupRequest): Promise<RemoveSubgroupsFromGroupResponse> {\n return request<RemoveSubgroupsFromGroupResponse>({\n method: 'DELETE',\n path: `/groups/${params.gid}/subgroups`,\n body,\n });\n },\n\n /**\n * Get audit logs\n *\n * Gathers the audit logs for a single day from a realm. By default, this API returns 10,000 entries. This can be changed with the numRows parameter. Integrators can iterate through batches to get an entire day's worth of logs. Each realm has a maximum entitlement of querying 1,000 days per year (allowing lookbacks for up to two years). Requests for paginated data do not count towards the annual limit. Transactional rate limits are 10 per 10 seconds. \n **Note:** This API is available for enterprise users only.\n *\n * @param body - Request body\n * @param body.nextToken - Token specifying start of page. For first page don't supply this. (optional)\n * @param body.numRows - Number of logs to return per page, default is 10000, minimum is 1000, max is 50000. (optional)\n * @param body.queryId - The query id of an audit log request. This id is needed to fetch subsequent paged results of a single query. (optional)\n * @param body.date - The date for which audit logs need to be fetched. This must be date-time only, as YYYY-MM-DD, and a valid date in the past. (optional)\n * @param body.topics - An array that may contain up to 20 [topics](https://resources.quickbase.com/nav/app/budurkasx/action/showpage/2b2941e4-f34d-4d41-9b0e-db790d20e9ab?pageIdV2=quickbase.com-DashboardGroup-15760d74-2243-4ce9-9495-7cc8790f12e7) to filter by. If empty, all topics are returned. (optional)\n *\n * @returns Query ran successfully and has returned the events for the given time period.\n *\n * @see https://developer.quickbase.com/operation/audit\n */\n audit(body: AuditRequest): Promise<AuditResponse> {\n return request<AuditResponse>({\n method: 'POST',\n path: '/audit',\n body,\n });\n },\n\n /**\n * Get read summaries\n *\n * Get user read and integration read summaries for any day in the past. \n **Note:** This API is available for enterprise users only.\n *\n * @param params.day - The date for which read summaries need to be fetched. This must be date-time only, as YYYY-MM-DD, and a valid date in the past. (optional)\n *\n * @returns Summaries returned succesfully\n *\n * @see https://developer.quickbase.com/operation/platformAnalyticReads\n */\n platformAnalyticReads(params: PlatformAnalyticReadsParams): Promise<PlatformAnalyticReadsResponse> {\n return request<PlatformAnalyticReadsResponse>({\n method: 'GET',\n path: '/analytics/reads',\n query: { day: params.day },\n });\n },\n\n /**\n * Get event summaries\n *\n * Get event summaries for any span of days up to one year and excluding future dates. \n **Note:** This API is available for enterprise users only. Data is updated hourly; to ensure accuracy, query dates should be at least one hour in the past. Transactional rate limits are 100 per hour.\n *\n * @param params.accountId - The ID of the account to query. If no value is specified, the first account matching the provided domain is chosen. (optional)\n *\n * @param body - Request body (optional)\n * @param body.start - The start date and time of the requested summaries in ISO 8601 time format.\n * @param body.end - The end date and time of the requested summaries in ISO 8601 time format.\n * @param body.groupBy - How the events should be grouped.\n * @param body.nextToken - A pagination token from a previous response. Used to fetch the next page. (optional)\n * @param body.where - A list of items to filter events by. Only events which match ALL criteria will be included in the results. (optional)\n *\n * @returns Event summaries returned succesfully\n *\n * @see https://developer.quickbase.com/operation/platformAnalyticEventSummaries\n */\n platformAnalyticEventSummaries(params: PlatformAnalyticEventSummariesParams, body?: PlatformAnalyticEventSummariesRequest): PaginatedRequest<PlatformAnalyticEventSummariesResponse> {\n const executor = () => {\n return request<PlatformAnalyticEventSummariesResponse>({\n method: 'POST',\n path: '/analytics/events/summaries',\n query: { accountId: params.accountId },\n body,\n });\n };\n const paginatedExecutor = (paginationParams: { skip?: number; nextPageToken?: string; nextToken?: string }) => {\n const bodyRecord = body as unknown as Record<string, unknown> | undefined;\n const paginatedBody = paginationParams.skip !== undefined || paginationParams.nextPageToken || paginationParams.nextToken\n ? {\n ...(bodyRecord || {}),\n options: {\n ...(bodyRecord?.options as Record<string, unknown> || {}),\n ...(paginationParams.skip !== undefined ? { skip: paginationParams.skip } : {}),\n },\n ...(paginationParams.nextPageToken ? { nextPageToken: paginationParams.nextPageToken } : {}),\n ...(paginationParams.nextToken ? { nextToken: paginationParams.nextToken } : {}),\n }\n : body;\n return request<PlatformAnalyticEventSummariesResponse>({\n method: 'POST',\n path: '/analytics/events/summaries',\n query: { accountId: params.accountId },\n body: paginatedBody,\n });\n };\n return createPaginatedRequest(executor, { paginatedExecutor, autoPaginate });\n },\n\n /**\n * Export a solution\n *\n * Returns the QBL for the specified solution. Learn more about [QBL syntax](https://help.quickbase.com/hc/en-us/articles/24845511223828-What-is-QBL). \n We are releasing schema coverage for QBL in stages. See [what's supported today](https://helpv2.quickbase.com/hc/en-us/articles/30119680754068-QBL-version-0-4-overview) in our QBL documentation.\n *\n * @param params.solutionId - The unique identifier of a solution\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/exportSolution\n */\n exportSolution(params: ExportSolutionParams): Promise<ExportSolutionResponse> {\n return request<ExportSolutionResponse>({\n method: 'GET',\n path: `/solutions/${params.solutionId}`,\n });\n },\n\n /**\n * Update a solution\n *\n * Updates the solution using the provided QBL. Learn more about [QBL syntax](https://help.quickbase.com/hc/en-us/articles/24845511223828-What-is-QBL). \n We are releasing schema coverage for QBL in stages. See [what's supported today](https://helpv2.quickbase.com/hc/en-us/articles/30119680754068-QBL-version-0-4-overview) in our QBL documentation.\n *\n * @param params.solutionId - The unique identifier of a solution\n *\n * @param body - The QBL to be used for the update. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/updateSolution\n */\n updateSolution(params: UpdateSolutionParams, body?: UpdateSolutionRequest): Promise<UpdateSolutionResponse> {\n return request<UpdateSolutionResponse>({\n method: 'PUT',\n path: `/solutions/${params.solutionId}`,\n body,\n });\n },\n\n /**\n * Create a solution\n *\n * Creates a solution using the provided QBL. Learn more about [QBL syntax](https://help.quickbase.com/hc/en-us/articles/24845511223828-What-is-QBL). \n We are releasing schema coverage for QBL in stages. See [what's supported today](https://helpv2.quickbase.com/hc/en-us/articles/30119680754068-QBL-version-0-4-overview) in our QBL documentation.\n *\n * @param body - The QBL to be used for the create.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/createSolution\n */\n createSolution(body: CreateSolutionRequest): Promise<CreateSolutionResponse> {\n return request<CreateSolutionResponse>({\n method: 'POST',\n path: '/solutions',\n body,\n });\n },\n\n /**\n * Export solution to record\n *\n * Exports the solution and outputs the resulting QBL in a new record in the specified table. The QBL will be saved to a file in the file attachment field that is specified. The table cannot have any required fields besides the file attachment field. \n We are releasing schema coverage for QBL in stages. See [what's supported today](https://helpv2.quickbase.com/hc/en-us/articles/30119680754068-QBL-version-0-4-overview) in our QBL documentation.\n *\n * @param params.solutionId - The unique identifier of the solution.\n * @param params.tableId - The unique identifier (dbid) of the table.\n * @param params.fieldId - The unique identifier (fid) of the field. It needs to be a file attachment field.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/exportSolutionToRecord\n */\n exportSolutionToRecord(params: ExportSolutionToRecordParams): Promise<ExportSolutionToRecordResponse> {\n return request<ExportSolutionToRecordResponse>({\n method: 'GET',\n path: `/solutions/${params.solutionId}/torecord`,\n query: { tableId: params.tableId, fieldId: params.fieldId },\n });\n },\n\n /**\n * Create solution from record\n *\n * Creates a solution using the QBL from the specified record. \n We are releasing schema coverage for QBL in stages. See [what's supported today](https://helpv2.quickbase.com/hc/en-us/articles/30119680754068-QBL-version-0-4-overview) in our QBL documentation.\n *\n * @param params.tableId - The unique identifier (dbid) of the table.\n * @param params.fieldId - The unique identifier (fid) of the field. It needs to be a file attachment field.\n * @param params.recordId - The unique identifier of the record.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/createSolutionFromRecord\n */\n createSolutionFromRecord(params: CreateSolutionFromRecordParams): Promise<CreateSolutionFromRecordResponse> {\n return request<CreateSolutionFromRecordResponse>({\n method: 'GET',\n path: '/solutions/fromrecord',\n query: { tableId: params.tableId, fieldId: params.fieldId, recordId: params.recordId },\n });\n },\n\n /**\n * Update solution from record\n *\n * Updates a solution using the QBL from the specified record. \n We are releasing schema coverage for QBL in stages. See [what's supported today](https://helpv2.quickbase.com/hc/en-us/articles/30119680754068-QBL-version-0-4-overview) in our QBL documentation.\n *\n * @param params.solutionId - The unique identifier of the solution.\n * @param params.tableId - The unique identifier (dbid) of the table.\n * @param params.fieldId - The unique identifier (fid) of the field. It needs to be a file attachment field.\n * @param params.recordId - The unique identifier of the record.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/updateSolutionToRecord\n */\n updateSolutionToRecord(params: UpdateSolutionToRecordParams): Promise<UpdateSolutionToRecordResponse> {\n return request<UpdateSolutionToRecordResponse>({\n method: 'GET',\n path: `/solutions/${params.solutionId}/fromrecord`,\n query: { tableId: params.tableId, fieldId: params.fieldId, recordId: params.recordId },\n });\n },\n\n /**\n * List solution changes\n *\n * Returns a list of changes that would occur if the provided QBL were to be applied. Learn more about [QBL syntax](https://help.quickbase.com/hc/en-us/articles/24845511223828-What-is-QBL). \n We are releasing schema coverage for QBL in stages. See [what's supported today](https://helpv2.quickbase.com/hc/en-us/articles/30119680754068-QBL-version-0-4-overview) in our QBL documentation.\n *\n * @param params.solutionId - The unique identifier of the solution.\n *\n * @param body - The QBL to be used for the changeset.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/changesetSolution\n */\n changesetSolution(params: ChangesetSolutionParams, body: ChangesetSolutionRequest): Promise<ChangesetSolutionResponse> {\n return request<ChangesetSolutionResponse>({\n method: 'PUT',\n path: `/solutions/${params.solutionId}/changeset`,\n body,\n });\n },\n\n /**\n * List solution changes from record\n *\n * Returns a list of changes that would occur if the QBL from the provided record were to be applied. \n We are releasing schema coverage for QBL in stages. See [what's supported today](https://helpv2.quickbase.com/hc/en-us/articles/30119680754068-QBL-version-0-4-overview) in our QBL documentation.\n *\n * @param params.solutionId - The unique identifier of the solution.\n * @param params.tableId - The unique identifier (dbid) of the table.\n * @param params.fieldId - The unique identifier (fid) of the field. It needs to be a file attachment field.\n * @param params.recordId - The unique identifier of the record.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/changesetSolutionFromRecord\n */\n changesetSolutionFromRecord(params: ChangesetSolutionFromRecordParams): Promise<ChangesetSolutionFromRecordResponse> {\n return request<ChangesetSolutionFromRecordResponse>({\n method: 'GET',\n path: `/solutions/${params.solutionId}/changeset/fromrecord`,\n query: { tableId: params.tableId, fieldId: params.fieldId, recordId: params.recordId },\n });\n },\n\n /**\n * Generate a document\n *\n * Generates a document from a template. This feature is only available on business or enterprise plans.\n *\n * @param params.templateId - This is the ID of document template.\n * @param params.tableId - The unique identifier of the table.\n * @param params.recordId - The ID of the record (optional)\n * @param params.filename - File name for the downloaded file\n * @param params.format - The format of the file that is returned. Default is \"pdf\". (optional)\n * @param params.margin - Margin formatted as top right bottom left, separated by spaces. Add to override the value set in the template builder. (optional)\n * @param params.unit - Unit of measurement for the margin. Default is \"in\". Add to override the value set in the template builder. (optional)\n * @param params.pageSize - Page size. Default is \"A4\". Add to override the value set in the template builder. (optional)\n * @param params.orientation - Page orientation. Default is \"portrait\". Add to override the value set in the template builder. (optional)\n * @param params.realm - Your Quickbase domain, for example demo.quickbase.com (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/generateDocument\n */\n generateDocument(params: GenerateDocumentParams): Promise<GenerateDocumentResponse> {\n return request<GenerateDocumentResponse>({\n method: 'GET',\n path: `/docTemplates/${params.templateId}/generate`,\n query: { tableId: params.tableId, recordId: params.recordId, filename: params.filename, format: params.format, margin: params.margin, unit: params.unit, pageSize: params.pageSize, orientation: params.orientation, realm: params.realm },\n });\n },\n };\n}\n"],
|
|
5
|
-
"mappings": ";;;;;ilBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,yBAAAE,EAAA,uBAAAC,EAAA,iBAAAC,EAAA,kBAAAC,EAAA,mBAAAC,EAAA,mBAAAC,EAAA,gBAAAC,EAAA,0BAAAC,EAAA,qBAAAC,EAAA,sBAAAC,EAAA,iBAAAC,EAAA,sBAAAC,EAAA,oBAAAC,EAAA,q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,CAC3O,CAAC,CACH,CACA,CACF,Cf37CO,SAASK,GAAaC,EAA0C,CACrE,IAAMC,EAAiBC,EAAcF,CAAM,EACrCG,EAASC,EAAaH,EAAe,KAAK,EAE1CI,EAAc,CAClB,MAAOJ,EAAe,MACtB,QAASA,EAAe,QACxB,SAAUA,EAAe,SACzB,OAAAE,CACF,EAEMG,EAAOC,EAAmBN,EAAe,KAAMI,CAAW,EAC1DG,EAAWC,EAAeR,EAAe,iBAAiB,EAE1DS,EAAWC,EAAsB,CACrC,OAAQV,EACR,KAAAK,EACA,SAAAE,EACA,OAAAL,CACF,CAAC,EAKD,MAAO,CACL,GAHiBS,EAAiBF,EAAS,QAAST,EAAe,YAAY,EAI/E,QAASS,EAAS,QAClB,UAAW,IAAMT,CACnB,CACF,CAGA,IAAOY,GAAQd",
|
|
4
|
+
"sourcesContent": ["/**\n * QuickBase SDK v2\n *\n * A TypeScript/JavaScript client for the QuickBase JSON RESTful API.\n *\n * @example\n * ```typescript\n * import { createClient } from 'quickbase-js';\n *\n * const client = createClient({\n * realm: 'mycompany',\n * auth: {\n * type: 'user-token',\n * userToken: 'your-user-token',\n * },\n * });\n *\n * const app = await client.getApp({ appId: 'bpqe82s1' });\n * console.log(app.name);\n * ```\n */\n\n// Core exports\nexport type {\n QuickbaseConfig,\n AuthConfig,\n UserTokenAuthConfig,\n TempTokenAuthConfig,\n SsoTokenAuthConfig,\n RateLimitConfig,\n RetryConfig,\n RateLimitInfo,\n PaginationMetadata,\n PaginatedResponse,\n FieldInfo,\n} from './core/index.js';\n\nexport {\n QuickbaseError,\n RateLimitError,\n AuthenticationError,\n AuthorizationError,\n NotFoundError,\n ValidationError,\n TimeoutError,\n ServerError,\n} from './core/index.js';\n\n// Auth exports (for advanced usage)\nexport type { AuthStrategy } from './auth/index.js';\nexport {\n UserTokenStrategy,\n TempTokenStrategy,\n SsoTokenStrategy,\n createAuthStrategy,\n} from './auth/index.js';\n\n// Client exports\nexport type { RequestOptions } from './client/index.js';\nexport { SlidingWindowThrottle, NoOpThrottle } from './client/index.js';\n\n// Generated types and client\nexport type { QuickbaseAPI } from './generated/types.js';\nexport * from './generated/types.js';\nexport { createApiMethods } from './generated/client.js';\n\n// Main client factory\nimport type { QuickbaseConfig, ResolvedConfig } from './core/types.js';\nimport { resolveConfig } from './core/config.js';\nimport { createLogger } from './core/logger.js';\nimport { createAuthStrategy } from './auth/index.js';\nimport { createThrottle } from './client/throttle.js';\nimport { createRequestExecutor } from './client/request.js';\nimport type { QuickbaseAPI } from './generated/types.js';\nimport { createApiMethods } from './generated/client.js';\n\n/**\n * QuickBase client with typed API methods\n */\nexport interface QuickbaseClient extends QuickbaseAPI {\n /** Execute a raw request (for custom API calls) */\n request: <T = unknown>(options: {\n method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';\n path: string;\n body?: unknown;\n query?: Record<string, string | number | boolean | undefined>;\n dbid?: string;\n }) => Promise<T>;\n\n /** Get the resolved configuration */\n getConfig: () => ResolvedConfig;\n}\n\n/**\n * Create a QuickBase client\n *\n * @example User token authentication\n * ```typescript\n * const client = createClient({\n * realm: 'mycompany',\n * auth: {\n * type: 'user-token',\n * userToken: 'your-user-token',\n * },\n * });\n * ```\n *\n * @example Temporary token authentication\n * ```typescript\n * const client = createClient({\n * realm: 'mycompany',\n * auth: {\n * type: 'temp-token',\n * userToken: 'your-user-token',\n * appToken: 'optional-app-token',\n * },\n * });\n * ```\n *\n * @example With rate limiting callback\n * ```typescript\n * const client = createClient({\n * realm: 'mycompany',\n * auth: { type: 'user-token', userToken: 'token' },\n * rateLimit: {\n * onRateLimit: (info) => {\n * console.log(`Rate limited! Retry after ${info.retryAfter}s`);\n * },\n * },\n * });\n * ```\n */\nexport function createClient(config: QuickbaseConfig): QuickbaseClient {\n const resolvedConfig = resolveConfig(config);\n const logger = createLogger(resolvedConfig.debug);\n\n const authContext = {\n realm: resolvedConfig.realm,\n baseUrl: resolvedConfig.baseUrl,\n fetchApi: resolvedConfig.fetchApi,\n logger,\n };\n\n const auth = createAuthStrategy(resolvedConfig.auth, authContext);\n const throttle = createThrottle(resolvedConfig.proactiveThrottle);\n\n const executor = createRequestExecutor({\n config: resolvedConfig,\n auth,\n throttle,\n logger,\n });\n\n // Create typed API methods\n const apiMethods = createApiMethods(executor.execute, resolvedConfig.autoPaginate);\n\n return {\n ...apiMethods,\n request: executor.execute,\n getConfig: () => resolvedConfig,\n };\n}\n\n// Default export\nexport default createClient;\n", "/**\n * Core types for the QuickBase SDK v2\n */\n\n// =============================================================================\n// Configuration Types\n// =============================================================================\n\nexport interface QuickbaseConfig {\n /** Your QuickBase realm (e.g., \"mycompany\" for mycompany.quickbase.com) */\n realm: string;\n\n /** Authentication configuration */\n auth: AuthConfig;\n\n /** Rate limiting and retry configuration */\n rateLimit?: RateLimitConfig;\n\n /** Request timeout in milliseconds (default: 30000) */\n timeout?: number;\n\n /** Enable debug logging (default: false) */\n debug?: boolean;\n\n /** Custom fetch implementation (default: global fetch) */\n fetchApi?: typeof fetch;\n\n /** Base URL override (default: https://api.quickbase.com/v1) */\n baseUrl?: string;\n\n /** Automatically paginate all paginated requests when awaited (default: false) */\n autoPaginate?: boolean;\n\n /** Convert ISO date strings in responses to JavaScript Date objects (default: true) */\n convertDates?: boolean;\n}\n\nexport type AuthConfig =\n | UserTokenAuthConfig\n | TempTokenAuthConfig\n | SsoTokenAuthConfig;\n\nexport interface UserTokenAuthConfig {\n type: 'user-token';\n /** Your QuickBase user token */\n userToken: string;\n}\n\nexport interface TempTokenAuthConfig {\n type: 'temp-token';\n /**\n * User token used to fetch temporary tokens (optional)\n * Not required when running in QuickBase Code Pages - the browser session is used\n */\n userToken?: string;\n /** App token (optional, for apps that require it) */\n appToken?: string;\n /** Token lifespan in milliseconds (default: 290000 = ~4m50s) */\n tokenLifespanMs?: number;\n}\n\nexport interface SsoTokenAuthConfig {\n type: 'sso';\n /** SAML token for SSO authentication */\n samlToken: string;\n}\n\nexport interface RateLimitConfig {\n /**\n * Client-side proactive throttling (optional)\n * QuickBase allows 100 requests per 10 seconds per user token\n */\n proactiveThrottle?: {\n enabled: boolean;\n /** Requests allowed per 10 seconds (default: 100) */\n requestsPer10Seconds?: number;\n };\n\n /** Retry configuration for rate limit and server errors */\n retry?: RetryConfig;\n\n /** Callback when rate limited */\n onRateLimit?: (info: RateLimitInfo) => void;\n}\n\nexport interface RetryConfig {\n /** Maximum retry attempts (default: 3) */\n maxAttempts?: number;\n /** Initial delay in milliseconds (default: 1000) */\n initialDelayMs?: number;\n /** Maximum delay in milliseconds (default: 30000) */\n maxDelayMs?: number;\n /** Backoff multiplier (default: 2) */\n multiplier?: number;\n}\n\n// =============================================================================\n// Runtime Types\n// =============================================================================\n\nexport interface RequestContext {\n /** The API method being called */\n methodName: string;\n /** Current attempt number (1-based) */\n attempt: number;\n /** Maximum attempts allowed */\n maxAttempts: number;\n /** Database ID (for temp token auth) */\n dbid?: string;\n /** Request start timestamp */\n startTime: number;\n}\n\nexport interface RateLimitInfo {\n /** When the rate limit occurred */\n timestamp: Date;\n /** The request URL */\n requestUrl: string;\n /** HTTP status code */\n httpStatus: number;\n /** Retry-After header value (seconds) */\n retryAfter?: number;\n /** Cloudflare ray ID */\n cfRay?: string;\n /** Transaction ID */\n tid?: string;\n /** QuickBase API ray ID */\n qbApiRay?: string;\n /** Which retry attempt this was */\n attempt: number;\n}\n\n// =============================================================================\n// Response Types\n// =============================================================================\n\nexport interface PaginationMetadata {\n totalRecords: number;\n numRecords: number;\n numFields: number;\n skip?: number;\n top?: number;\n}\n\nexport interface PaginatedResponse<T> {\n data: T[];\n metadata: PaginationMetadata;\n fields?: FieldInfo[];\n}\n\nexport interface FieldInfo {\n id: number;\n label: string;\n type: string;\n}\n\n// =============================================================================\n// Internal Types\n// =============================================================================\n\nexport interface ResolvedConfig {\n realm: string;\n baseUrl: string;\n timeout: number;\n debug: boolean;\n fetchApi: typeof fetch;\n auth: AuthConfig;\n retry: Required<RetryConfig>;\n proactiveThrottle: {\n enabled: boolean;\n requestsPer10Seconds: number;\n };\n onRateLimit?: (info: RateLimitInfo) => void;\n autoPaginate: boolean;\n convertDates: boolean;\n}\n\n/** Default configuration values */\nexport const DEFAULT_CONFIG = {\n baseUrl: 'https://api.quickbase.com/v1',\n timeout: 30000,\n debug: false,\n retry: {\n maxAttempts: 3,\n initialDelayMs: 1000,\n maxDelayMs: 30000,\n multiplier: 2,\n },\n proactiveThrottle: {\n enabled: false,\n requestsPer10Seconds: 100,\n },\n tempTokenLifespanMs: 290000, // ~4m50s (QuickBase tokens expire at 5m)\n autoPaginate: false,\n convertDates: true,\n} as const;\n", "/**\n * Custom error types for the QuickBase SDK\n */\n\nimport type { RateLimitInfo } from './types.js';\n\n/**\n * Base error class for all QuickBase SDK errors\n */\nexport class QuickbaseError extends Error {\n readonly statusCode: number;\n readonly description?: string;\n readonly rayId?: string;\n\n constructor(\n message: string,\n statusCode: number,\n options?: {\n description?: string;\n rayId?: string;\n cause?: Error;\n }\n ) {\n super(message, { cause: options?.cause });\n this.name = 'QuickbaseError';\n this.statusCode = statusCode;\n this.description = options?.description;\n this.rayId = options?.rayId;\n\n // Maintains proper stack trace in V8 environments\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, QuickbaseError);\n }\n }\n\n toJSON() {\n return {\n name: this.name,\n message: this.message,\n statusCode: this.statusCode,\n description: this.description,\n rayId: this.rayId,\n };\n }\n}\n\n/**\n * Error thrown when rate limited (HTTP 429)\n */\nexport class RateLimitError extends QuickbaseError {\n readonly retryAfter?: number;\n readonly rateLimitInfo: RateLimitInfo;\n\n constructor(rateLimitInfo: RateLimitInfo, message?: string) {\n super(\n message || `Rate limited. Retry after ${rateLimitInfo.retryAfter ?? 'unknown'} seconds`,\n 429,\n { rayId: rateLimitInfo.qbApiRay || rateLimitInfo.cfRay }\n );\n this.name = 'RateLimitError';\n this.retryAfter = rateLimitInfo.retryAfter;\n this.rateLimitInfo = rateLimitInfo;\n }\n\n toJSON() {\n return {\n ...super.toJSON(),\n retryAfter: this.retryAfter,\n rateLimitInfo: this.rateLimitInfo,\n };\n }\n}\n\n/**\n * Error thrown when authentication fails (HTTP 401)\n */\nexport class AuthenticationError extends QuickbaseError {\n constructor(message: string, options?: { rayId?: string; cause?: Error }) {\n super(message, 401, options);\n this.name = 'AuthenticationError';\n }\n}\n\n/**\n * Error thrown when authorization fails (HTTP 403)\n */\nexport class AuthorizationError extends QuickbaseError {\n constructor(message: string, options?: { rayId?: string; cause?: Error }) {\n super(message, 403, options);\n this.name = 'AuthorizationError';\n }\n}\n\n/**\n * Error thrown when a resource is not found (HTTP 404)\n */\nexport class NotFoundError extends QuickbaseError {\n constructor(message: string, options?: { rayId?: string; cause?: Error }) {\n super(message, 404, options);\n this.name = 'NotFoundError';\n }\n}\n\n/**\n * Error thrown for bad requests (HTTP 400)\n */\nexport class ValidationError extends QuickbaseError {\n readonly errors?: Array<{ field?: string; message: string }>;\n\n constructor(\n message: string,\n options?: {\n description?: string;\n rayId?: string;\n errors?: Array<{ field?: string; message: string }>;\n cause?: Error;\n }\n ) {\n super(message, 400, options);\n this.name = 'ValidationError';\n this.errors = options?.errors;\n }\n\n toJSON() {\n return {\n ...super.toJSON(),\n errors: this.errors,\n };\n }\n}\n\n/**\n * Error thrown when request times out\n */\nexport class TimeoutError extends QuickbaseError {\n readonly timeoutMs: number;\n\n constructor(timeoutMs: number, options?: { rayId?: string; cause?: Error }) {\n super(`Request timed out after ${timeoutMs}ms`, 0, options);\n this.name = 'TimeoutError';\n this.timeoutMs = timeoutMs;\n }\n\n toJSON() {\n return {\n ...super.toJSON(),\n timeoutMs: this.timeoutMs,\n };\n }\n}\n\n/**\n * Error thrown for server errors (HTTP 5xx)\n */\nexport class ServerError extends QuickbaseError {\n constructor(\n statusCode: number,\n message: string,\n options?: { description?: string; rayId?: string; cause?: Error }\n ) {\n super(message, statusCode, options);\n this.name = 'ServerError';\n }\n}\n\n/**\n * Parse an error response from the QuickBase API\n */\nexport async function parseErrorResponse(\n response: Response,\n requestUrl: string\n): Promise<QuickbaseError> {\n const rayId = response.headers.get('qb-api-ray') || response.headers.get('cf-ray') || undefined;\n\n let body: { message?: string; description?: string; errors?: unknown[] } | null = null;\n try {\n body = await response.json() as { message?: string; description?: string; errors?: unknown[] };\n } catch {\n // Response body is not JSON\n }\n\n const message = body?.message || response.statusText || 'Unknown error';\n const description = body?.description;\n\n switch (response.status) {\n case 400:\n return new ValidationError(message, {\n description,\n rayId,\n errors: body?.errors as Array<{ field?: string; message: string }>,\n });\n\n case 401:\n return new AuthenticationError(message, { rayId });\n\n case 403:\n return new AuthorizationError(message, { rayId });\n\n case 404:\n return new NotFoundError(message, { rayId });\n\n case 429: {\n const retryAfter = response.headers.get('Retry-After');\n const rateLimitInfo: RateLimitInfo = {\n timestamp: new Date(),\n requestUrl,\n httpStatus: 429,\n retryAfter: retryAfter ? parseInt(retryAfter, 10) : undefined,\n cfRay: response.headers.get('cf-ray') || undefined,\n tid: response.headers.get('tid') || undefined,\n qbApiRay: response.headers.get('qb-api-ray') || undefined,\n attempt: 1, // Will be updated by caller\n };\n return new RateLimitError(rateLimitInfo, message);\n }\n\n default:\n if (response.status >= 500) {\n return new ServerError(response.status, message, { description, rayId });\n }\n return new QuickbaseError(message, response.status, { description, rayId });\n }\n}\n\n/**\n * Check if an error is retryable\n */\nexport function isRetryableError(error: unknown): boolean {\n if (error instanceof RateLimitError) {\n return true;\n }\n if (error instanceof ServerError) {\n return true;\n }\n if (error instanceof TimeoutError) {\n return true;\n }\n return false;\n}\n", "/**\n * Logger utility that respects the debug configuration\n */\n\nexport class Logger {\n private readonly enabled: boolean;\n private readonly prefix: string;\n\n constructor(enabled: boolean = false, prefix: string = 'quickbase-js') {\n this.enabled = enabled;\n this.prefix = prefix;\n }\n\n private formatMessage(level: string, message: string): string {\n const timestamp = new Date().toISOString();\n return `[${timestamp}] [${this.prefix}] [${level}] ${message}`;\n }\n\n debug(message: string, data?: unknown): void {\n if (this.enabled) {\n if (data !== undefined) {\n console.log(this.formatMessage('DEBUG', message), data);\n } else {\n console.log(this.formatMessage('DEBUG', message));\n }\n }\n }\n\n info(message: string, data?: unknown): void {\n if (this.enabled) {\n if (data !== undefined) {\n console.info(this.formatMessage('INFO', message), data);\n } else {\n console.info(this.formatMessage('INFO', message));\n }\n }\n }\n\n warn(message: string, data?: unknown): void {\n // Warnings are always logged, regardless of debug setting\n if (data !== undefined) {\n console.warn(this.formatMessage('WARN', message), data);\n } else {\n console.warn(this.formatMessage('WARN', message));\n }\n }\n\n error(message: string, error?: unknown): void {\n // Errors are always logged, regardless of debug setting\n if (error !== undefined) {\n console.error(this.formatMessage('ERROR', message), error);\n } else {\n console.error(this.formatMessage('ERROR', message));\n }\n }\n\n /**\n * Log rate limit information\n */\n rateLimit(info: {\n url: string;\n status: number;\n retryAfter?: number;\n attempt: number;\n rayId?: string;\n }): void {\n if (this.enabled) {\n this.debug(\n `Rate limited (attempt ${info.attempt}): ${info.url} - ` +\n `Status ${info.status}, Retry-After: ${info.retryAfter ?? 'not specified'}s` +\n (info.rayId ? `, Ray: ${info.rayId}` : '')\n );\n }\n }\n\n /**\n * Log request timing\n */\n timing(method: string, url: string, durationMs: number): void {\n if (this.enabled) {\n this.debug(`${method} ${url} completed in ${durationMs}ms`);\n }\n }\n\n /**\n * Log retry attempt\n */\n retry(attempt: number, maxAttempts: number, delayMs: number, reason: string): void {\n if (this.enabled) {\n this.debug(\n `Retry ${attempt}/${maxAttempts} in ${delayMs}ms: ${reason}`\n );\n }\n }\n\n /**\n * Log token operations (without exposing the actual token)\n */\n token(operation: 'fetch' | 'cache-hit' | 'cache-miss' | 'refresh' | 'expire', dbid?: string): void {\n if (this.enabled) {\n const target = dbid ? ` for dbid: ${dbid}` : '';\n this.debug(`Token ${operation}${target}`);\n }\n }\n}\n\n/**\n * Create a no-op logger for when logging is disabled\n * This avoids conditional checks at every log call\n */\nexport function createLogger(enabled: boolean): Logger {\n return new Logger(enabled);\n}\n", "/**\n * Configuration resolution and validation\n */\n\nimport type { QuickbaseConfig, ResolvedConfig, RetryConfig } from './types.js';\nimport { DEFAULT_CONFIG } from './types.js';\n\n/**\n * Resolve user configuration with defaults\n */\nexport function resolveConfig(config: QuickbaseConfig): ResolvedConfig {\n validateConfig(config);\n\n const retry: Required<RetryConfig> = {\n maxAttempts: config.rateLimit?.retry?.maxAttempts ?? DEFAULT_CONFIG.retry.maxAttempts,\n initialDelayMs: config.rateLimit?.retry?.initialDelayMs ?? DEFAULT_CONFIG.retry.initialDelayMs,\n maxDelayMs: config.rateLimit?.retry?.maxDelayMs ?? DEFAULT_CONFIG.retry.maxDelayMs,\n multiplier: config.rateLimit?.retry?.multiplier ?? DEFAULT_CONFIG.retry.multiplier,\n };\n\n const proactiveThrottle = {\n enabled: config.rateLimit?.proactiveThrottle?.enabled ?? DEFAULT_CONFIG.proactiveThrottle.enabled,\n requestsPer10Seconds:\n config.rateLimit?.proactiveThrottle?.requestsPer10Seconds ??\n DEFAULT_CONFIG.proactiveThrottle.requestsPer10Seconds,\n };\n\n return {\n realm: config.realm,\n baseUrl: config.baseUrl ?? DEFAULT_CONFIG.baseUrl,\n timeout: config.timeout ?? DEFAULT_CONFIG.timeout,\n debug: config.debug ?? DEFAULT_CONFIG.debug,\n fetchApi: config.fetchApi ?? globalThis.fetch.bind(globalThis),\n auth: config.auth,\n retry,\n proactiveThrottle,\n onRateLimit: config.rateLimit?.onRateLimit,\n autoPaginate: config.autoPaginate ?? DEFAULT_CONFIG.autoPaginate,\n convertDates: config.convertDates ?? DEFAULT_CONFIG.convertDates,\n };\n}\n\n/**\n * Validate configuration and throw if invalid\n */\nfunction validateConfig(config: QuickbaseConfig): void {\n if (!config.realm) {\n throw new Error('QuickBase realm is required');\n }\n\n if (typeof config.realm !== 'string') {\n throw new Error('QuickBase realm must be a string');\n }\n\n // Remove .quickbase.com suffix if provided\n if (config.realm.includes('.')) {\n throw new Error(\n 'Realm should be just the subdomain (e.g., \"mycompany\" not \"mycompany.quickbase.com\")'\n );\n }\n\n if (!config.auth) {\n throw new Error('Authentication configuration is required');\n }\n\n validateAuthConfig(config.auth);\n\n if (config.timeout !== undefined) {\n if (typeof config.timeout !== 'number' || config.timeout <= 0) {\n throw new Error('Timeout must be a positive number');\n }\n }\n\n if (config.rateLimit?.retry) {\n validateRetryConfig(config.rateLimit.retry);\n }\n\n if (config.rateLimit?.proactiveThrottle) {\n validateThrottleConfig(config.rateLimit.proactiveThrottle);\n }\n}\n\nfunction validateAuthConfig(auth: QuickbaseConfig['auth']): void {\n switch (auth.type) {\n case 'user-token':\n if (!auth.userToken) {\n throw new Error('User token is required for user-token auth');\n }\n break;\n\n case 'temp-token':\n // userToken is optional for temp-token auth\n // When running in Code Pages, the browser session is used\n break;\n\n case 'sso':\n if (!auth.samlToken) {\n throw new Error('SAML token is required for SSO auth');\n }\n break;\n\n default:\n throw new Error(`Unknown auth type: ${(auth as { type: string }).type}`);\n }\n}\n\nfunction validateRetryConfig(retry: RetryConfig): void {\n if (retry.maxAttempts !== undefined) {\n if (typeof retry.maxAttempts !== 'number' || retry.maxAttempts < 0) {\n throw new Error('maxAttempts must be a non-negative number');\n }\n }\n\n if (retry.initialDelayMs !== undefined) {\n if (typeof retry.initialDelayMs !== 'number' || retry.initialDelayMs < 0) {\n throw new Error('initialDelayMs must be a non-negative number');\n }\n }\n\n if (retry.maxDelayMs !== undefined) {\n if (typeof retry.maxDelayMs !== 'number' || retry.maxDelayMs < 0) {\n throw new Error('maxDelayMs must be a non-negative number');\n }\n }\n\n if (retry.multiplier !== undefined) {\n if (typeof retry.multiplier !== 'number' || retry.multiplier < 1) {\n throw new Error('multiplier must be a number >= 1');\n }\n }\n}\n\nfunction validateThrottleConfig(throttle: { enabled?: boolean; requestsPer10Seconds?: number }): void {\n if (throttle.requestsPer10Seconds !== undefined) {\n if (typeof throttle.requestsPer10Seconds !== 'number' || throttle.requestsPer10Seconds <= 0) {\n throw new Error('requestsPer10Seconds must be a positive number');\n }\n }\n}\n\n/**\n * Build the realm hostname from the realm name\n */\nexport function getRealmHostname(realm: string): string {\n return `${realm}.quickbase.com`;\n}\n", "/**\n * Date transformation utilities\n *\n * Converts ISO 8601 date strings in API responses to JavaScript Date objects.\n */\n\n/**\n * ISO 8601 date pattern\n * Matches: 2024-01-15, 2024-01-15T10:30:00, 2024-01-15T10:30:00.000Z, etc.\n */\nconst ISO_DATE_PATTERN = /^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,3})?(Z|[+-]\\d{2}:?\\d{2})?)?$/;\n\n/**\n * Check if a string looks like an ISO 8601 date\n */\nexport function isIsoDateString(value: string): boolean {\n return ISO_DATE_PATTERN.test(value);\n}\n\n/**\n * Recursively transform ISO date strings to Date objects in an object\n *\n * @param obj - The object to transform\n * @param enabled - Whether to perform conversion (pass false to skip)\n * @returns A new object with date strings converted to Date objects\n */\nexport function transformDates<T>(obj: T, enabled: boolean): T {\n if (!enabled || obj === null || obj === undefined) {\n return obj;\n }\n\n if (typeof obj !== 'object') {\n return obj;\n }\n\n if (Array.isArray(obj)) {\n return obj.map((item) => transformDates(item, enabled)) as T;\n }\n\n if (obj instanceof Date) {\n return obj;\n }\n\n const result: Record<string, unknown> = {};\n\n for (const [key, value] of Object.entries(obj)) {\n if (typeof value === 'string' && isIsoDateString(value)) {\n // Convert ISO date string to Date object\n result[key] = new Date(value);\n } else if (value instanceof Date) {\n // Keep existing Date objects as-is\n result[key] = value;\n } else if (typeof value === 'object' && value !== null) {\n // Recursively transform nested objects\n result[key] = transformDates(value, enabled);\n } else {\n // Keep other values as-is\n result[key] = value;\n }\n }\n\n return result as T;\n}\n", "/**\n * User Token Authentication Strategy\n *\n * Simplest auth method - uses a persistent user token directly.\n * Token is passed in the Authorization header as \"QB-USER-TOKEN {token}\"\n */\n\nimport type { AuthStrategy, AuthContext } from './types.js';\nimport type { Logger } from '../core/logger.js';\n\nexport class UserTokenStrategy implements AuthStrategy {\n private readonly userToken: string;\n private readonly logger: Logger;\n\n constructor(userToken: string, context: AuthContext) {\n this.userToken = userToken;\n this.logger = context.logger;\n }\n\n async getToken(_dbid?: string): Promise<string> {\n // User tokens don't change, just return the configured token\n return this.userToken;\n }\n\n getAuthorizationHeader(token: string): string {\n return `QB-USER-TOKEN ${token}`;\n }\n\n async handleAuthError(_dbid?: string): Promise<boolean> {\n // User tokens can't be refreshed - if auth fails, it's a permanent failure\n this.logger.debug('Auth error with user token - cannot refresh');\n return false;\n }\n\n invalidate(_dbid?: string): void {\n // No-op for user tokens - they don't have cached state\n }\n}\n", "/**\n * Token cache with TTL support\n *\n * Manages cached temporary tokens with expiration handling.\n * Tokens are stored per-dbid since QuickBase temp tokens are database-specific.\n */\n\nimport type { CachedToken } from './types.js';\n\nexport class TokenCache {\n private readonly cache = new Map<string, CachedToken>();\n private readonly defaultLifespanMs: number;\n\n constructor(defaultLifespanMs: number) {\n this.defaultLifespanMs = defaultLifespanMs;\n }\n\n /**\n * Get a cached token if it exists and is not expired\n */\n get(dbid: string): string | null {\n const entry = this.cache.get(dbid);\n if (!entry) {\n return null;\n }\n\n // Check if token is expired (with 10 second buffer)\n if (Date.now() >= entry.expiresAt - 10000) {\n this.cache.delete(dbid);\n return null;\n }\n\n return entry.token;\n }\n\n /**\n * Store a token with optional custom lifespan\n */\n set(dbid: string, token: string, lifespanMs?: number): void {\n const expiresAt = Date.now() + (lifespanMs ?? this.defaultLifespanMs);\n this.cache.set(dbid, { token, expiresAt });\n }\n\n /**\n * Remove a specific token from cache\n */\n delete(dbid: string): boolean {\n return this.cache.delete(dbid);\n }\n\n /**\n * Clear all cached tokens\n */\n clear(): void {\n this.cache.clear();\n }\n\n /**\n * Check if a token exists and is valid\n */\n has(dbid: string): boolean {\n return this.get(dbid) !== null;\n }\n\n /**\n * Get time until token expires (in ms), or null if not cached\n */\n getTimeToExpiry(dbid: string): number | null {\n const entry = this.cache.get(dbid);\n if (!entry) {\n return null;\n }\n const ttl = entry.expiresAt - Date.now();\n return ttl > 0 ? ttl : null;\n }\n\n /**\n * Get the number of cached tokens\n */\n get size(): number {\n // Clean up expired entries first\n this.cleanup();\n return this.cache.size;\n }\n\n /**\n * Remove expired entries from cache\n */\n private cleanup(): void {\n const now = Date.now();\n for (const [dbid, entry] of this.cache) {\n if (now >= entry.expiresAt) {\n this.cache.delete(dbid);\n }\n }\n }\n}\n", "/**\n * Temporary Token Authentication Strategy\n *\n * Fetches database-specific temporary tokens from the QuickBase API.\n * Tokens are cached and automatically refreshed when expired.\n */\n\nimport type { AuthStrategy, AuthContext } from './types.js';\nimport type { Logger } from '../core/logger.js';\nimport { TokenCache } from './token-cache.js';\nimport { DEFAULT_CONFIG } from '../core/types.js';\nimport { AuthenticationError } from '../core/errors.js';\n\nexport class TempTokenStrategy implements AuthStrategy {\n private readonly userToken?: string;\n private readonly appToken?: string;\n private readonly realm: string;\n private readonly baseUrl: string;\n private readonly fetchApi: typeof fetch;\n private readonly logger: Logger;\n private readonly cache: TokenCache;\n\n /**\n * Track pending token fetches to deduplicate concurrent requests\n * This prevents multiple simultaneous API calls for the same dbid\n */\n private readonly pendingFetches = new Map<string, Promise<string>>();\n\n constructor(\n userToken: string | undefined,\n context: AuthContext,\n options?: { appToken?: string; tokenLifespanMs?: number }\n ) {\n this.userToken = userToken;\n this.appToken = options?.appToken;\n this.realm = context.realm;\n this.baseUrl = context.baseUrl;\n this.fetchApi = context.fetchApi;\n this.logger = context.logger;\n this.cache = new TokenCache(\n options?.tokenLifespanMs ?? DEFAULT_CONFIG.tempTokenLifespanMs\n );\n }\n\n async getToken(dbid?: string): Promise<string> {\n if (!dbid) {\n throw new Error('Database ID (dbid) is required for temporary token authentication');\n }\n\n // Check cache first\n const cachedToken = this.cache.get(dbid);\n if (cachedToken) {\n this.logger.token('cache-hit', dbid);\n return cachedToken;\n }\n\n this.logger.token('cache-miss', dbid);\n\n // Check if there's already a fetch in progress for this dbid\n const pendingFetch = this.pendingFetches.get(dbid);\n if (pendingFetch) {\n this.logger.debug(`Waiting for existing token fetch for dbid: ${dbid}`);\n return pendingFetch;\n }\n\n // Fetch new token\n const fetchPromise = this.fetchToken(dbid);\n this.pendingFetches.set(dbid, fetchPromise);\n\n try {\n const token = await fetchPromise;\n return token;\n } finally {\n this.pendingFetches.delete(dbid);\n }\n }\n\n private async fetchToken(dbid: string): Promise<string> {\n this.logger.token('fetch', dbid);\n\n const url = `${this.baseUrl}/auth/temporary/${dbid}`;\n const headers: Record<string, string> = {\n 'QB-Realm-Hostname': `${this.realm}.quickbase.com`,\n 'Content-Type': 'application/json',\n };\n\n // Only include Authorization header if we have a userToken\n // For Code Pages, browser session cookies handle auth instead\n if (this.userToken) {\n headers['Authorization'] = `QB-USER-TOKEN ${this.userToken}`;\n }\n\n if (this.appToken) {\n headers['QB-App-Token'] = this.appToken;\n }\n\n const response = await this.fetchApi(url, {\n method: 'GET',\n headers,\n credentials: 'include', // Include cookies for Code Page auth\n } as RequestInit);\n\n if (!response.ok) {\n const errorText = await response.text();\n throw new AuthenticationError(\n `Failed to fetch temporary token for ${dbid}: ${response.status} ${errorText}`,\n { rayId: response.headers.get('qb-api-ray') || undefined }\n );\n }\n\n const data = await response.json() as { temporaryAuthorization?: string };\n const token = data.temporaryAuthorization;\n\n if (!token) {\n throw new AuthenticationError(\n `No temporary token in response for ${dbid}`\n );\n }\n\n // Cache the token\n this.cache.set(dbid, token);\n this.logger.debug(`Cached new token for dbid: ${dbid}`);\n\n return token;\n }\n\n getAuthorizationHeader(token: string): string {\n return `QB-TEMP-TOKEN ${token}`;\n }\n\n async handleAuthError(dbid?: string): Promise<boolean> {\n if (!dbid) {\n this.logger.debug('Auth error without dbid - cannot refresh temp token');\n return false;\n }\n\n // Invalidate the cached token\n this.invalidate(dbid);\n\n // Try to fetch a new token\n try {\n this.logger.token('refresh', dbid);\n await this.getToken(dbid);\n return true;\n } catch (error) {\n this.logger.error(`Failed to refresh temp token for ${dbid}`, error);\n return false;\n }\n }\n\n invalidate(dbid?: string): void {\n if (dbid) {\n this.logger.token('expire', dbid);\n this.cache.delete(dbid);\n } else {\n // Invalidate all tokens\n this.cache.clear();\n }\n }\n}\n", "/**\n * SSO Token Authentication Strategy\n *\n * Exchanges a SAML token for a QuickBase temporary token via OAuth token exchange.\n */\n\nimport type { AuthStrategy, AuthContext } from './types.js';\nimport type { Logger } from '../core/logger.js';\nimport { TokenCache } from './token-cache.js';\nimport { DEFAULT_CONFIG } from '../core/types.js';\nimport { AuthenticationError } from '../core/errors.js';\n\nexport class SsoTokenStrategy implements AuthStrategy {\n private readonly samlToken: string;\n private readonly realm: string;\n private readonly baseUrl: string;\n private readonly fetchApi: typeof fetch;\n private readonly logger: Logger;\n private readonly cache: TokenCache;\n\n /**\n * Track pending SSO token exchange to deduplicate concurrent requests\n */\n private pendingExchange: Promise<string> | null = null;\n\n constructor(\n samlToken: string,\n context: AuthContext,\n options?: { tokenLifespanMs?: number }\n ) {\n this.samlToken = samlToken;\n this.realm = context.realm;\n this.baseUrl = context.baseUrl;\n this.fetchApi = context.fetchApi;\n this.logger = context.logger;\n // SSO tokens are global, not per-dbid, so we use a single cache key\n this.cache = new TokenCache(\n options?.tokenLifespanMs ?? DEFAULT_CONFIG.tempTokenLifespanMs\n );\n }\n\n private get cacheKey(): string {\n return '__sso__';\n }\n\n async getToken(_dbid?: string): Promise<string> {\n // Check cache first\n const cachedToken = this.cache.get(this.cacheKey);\n if (cachedToken) {\n this.logger.token('cache-hit');\n return cachedToken;\n }\n\n this.logger.token('cache-miss');\n\n // Check if there's already an exchange in progress\n if (this.pendingExchange) {\n this.logger.debug('Waiting for existing SSO token exchange');\n return this.pendingExchange;\n }\n\n // Exchange SAML token for QuickBase token\n const exchangePromise = this.exchangeToken();\n this.pendingExchange = exchangePromise;\n\n try {\n return await exchangePromise;\n } finally {\n this.pendingExchange = null;\n }\n }\n\n private async exchangeToken(): Promise<string> {\n this.logger.token('fetch');\n\n const url = `${this.baseUrl}/auth/oauth/token`;\n\n const body = new URLSearchParams({\n grant_type: 'urn:ietf:params:oauth:grant-type:token-exchange',\n requested_token_type: 'urn:quickbase:params:oauth:token-type:temp_token',\n subject_token: this.samlToken,\n subject_token_type: 'urn:ietf:params:oauth:token-type:saml2',\n });\n\n const response = await this.fetchApi(url, {\n method: 'POST',\n headers: {\n 'QB-Realm-Hostname': `${this.realm}.quickbase.com`,\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n body: body.toString(),\n });\n\n if (!response.ok) {\n const errorText = await response.text();\n throw new AuthenticationError(\n `SSO token exchange failed: ${response.status} ${errorText}`,\n { rayId: response.headers.get('qb-api-ray') || undefined }\n );\n }\n\n const data = await response.json() as {\n access_token?: string;\n issued_token_type?: string;\n token_type?: string;\n };\n\n const token = data.access_token;\n if (!token) {\n throw new AuthenticationError('No access_token in SSO exchange response');\n }\n\n // Cache the token\n this.cache.set(this.cacheKey, token);\n this.logger.debug('Cached new SSO token');\n\n return token;\n }\n\n getAuthorizationHeader(token: string): string {\n return `QB-TEMP-TOKEN ${token}`;\n }\n\n async handleAuthError(_dbid?: string): Promise<boolean> {\n // Invalidate the cached token\n this.invalidate();\n\n // Try to exchange for a new token\n try {\n this.logger.token('refresh');\n await this.getToken();\n return true;\n } catch (error) {\n this.logger.error('Failed to refresh SSO token', error);\n return false;\n }\n }\n\n invalidate(_dbid?: string): void {\n this.logger.token('expire');\n this.cache.clear();\n }\n}\n", "/**\n * Authentication module exports\n */\n\nexport type { AuthStrategy, AuthContext, CachedToken } from './types.js';\nexport { UserTokenStrategy } from './user-token.js';\nexport { TempTokenStrategy } from './temp-token.js';\nexport { SsoTokenStrategy } from './sso-token.js';\nexport { TokenCache } from './token-cache.js';\n\nimport type { AuthConfig } from '../core/types.js';\nimport type { AuthStrategy, AuthContext } from './types.js';\nimport { UserTokenStrategy } from './user-token.js';\nimport { TempTokenStrategy } from './temp-token.js';\nimport { SsoTokenStrategy } from './sso-token.js';\n\n/**\n * Factory function to create the appropriate auth strategy\n */\nexport function createAuthStrategy(\n authConfig: AuthConfig,\n context: AuthContext\n): AuthStrategy {\n switch (authConfig.type) {\n case 'user-token':\n return new UserTokenStrategy(authConfig.userToken, context);\n\n case 'temp-token':\n return new TempTokenStrategy(authConfig.userToken, context, {\n appToken: authConfig.appToken,\n tokenLifespanMs: authConfig.tokenLifespanMs,\n });\n\n case 'sso':\n return new SsoTokenStrategy(authConfig.samlToken, context);\n\n default:\n throw new Error(`Unknown auth type: ${(authConfig as { type: string }).type}`);\n }\n}\n", "/**\n * Retry logic with exponential backoff\n *\n * Handles:\n * - HTTP 429 (Rate Limited) - uses Retry-After header\n * - HTTP 5xx (Server Errors) - exponential backoff\n * - Timeout errors - exponential backoff\n */\n\nimport type { RequestContext, RateLimitInfo, ResolvedConfig } from '../core/types.js';\nimport type { Logger } from '../core/logger.js';\nimport {\n RateLimitError,\n ServerError,\n TimeoutError,\n isRetryableError,\n} from '../core/errors.js';\n\nexport interface RetryOptions {\n maxAttempts: number;\n initialDelayMs: number;\n maxDelayMs: number;\n multiplier: number;\n}\n\n/**\n * Calculate delay for exponential backoff\n */\nexport function calculateBackoffDelay(\n attempt: number,\n options: RetryOptions\n): number {\n // Exponential backoff: initialDelay * multiplier^(attempt-1)\n const delay = options.initialDelayMs * Math.pow(options.multiplier, attempt - 1);\n\n // Add jitter (\u00B110%) to prevent thundering herd\n const jitter = delay * 0.1 * (Math.random() * 2 - 1);\n\n return Math.min(delay + jitter, options.maxDelayMs);\n}\n\n/**\n * Get delay from Retry-After header or fall back to backoff calculation\n */\nexport function getRetryDelay(\n response: Response | null,\n attempt: number,\n options: RetryOptions\n): number {\n if (response) {\n const retryAfter = response.headers.get('Retry-After');\n if (retryAfter) {\n // Retry-After can be seconds or a date string\n const seconds = parseInt(retryAfter, 10);\n if (!isNaN(seconds)) {\n return seconds * 1000;\n }\n\n // Try parsing as a date\n const date = Date.parse(retryAfter);\n if (!isNaN(date)) {\n return Math.max(0, date - Date.now());\n }\n }\n }\n\n return calculateBackoffDelay(attempt, options);\n}\n\n/**\n * Extract rate limit info from response headers\n */\nexport function extractRateLimitInfo(\n response: Response,\n requestUrl: string,\n attempt: number\n): RateLimitInfo {\n const retryAfter = response.headers.get('Retry-After');\n\n return {\n timestamp: new Date(),\n requestUrl,\n httpStatus: response.status,\n retryAfter: retryAfter ? parseInt(retryAfter, 10) : undefined,\n cfRay: response.headers.get('cf-ray') || undefined,\n tid: response.headers.get('tid') || undefined,\n qbApiRay: response.headers.get('qb-api-ray') || undefined,\n attempt,\n };\n}\n\n/**\n * Sleep for a given duration\n */\nexport function sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Determine if a response status is retryable\n */\nexport function isRetryableStatus(status: number): boolean {\n return status === 429 || (status >= 500 && status < 600);\n}\n\n/**\n * Execute a request with retry logic\n */\nexport async function executeWithRetry<T>(\n fn: (context: RequestContext) => Promise<T>,\n context: RequestContext,\n config: ResolvedConfig,\n logger: Logger\n): Promise<T> {\n const options: RetryOptions = config.retry;\n let lastError: Error | null = null;\n\n for (let attempt = 1; attempt <= options.maxAttempts; attempt++) {\n context.attempt = attempt;\n\n try {\n return await fn(context);\n } catch (error) {\n lastError = error as Error;\n\n // Check if error is retryable\n if (!isRetryableError(error)) {\n throw error;\n }\n\n // Don't retry if we've exhausted attempts\n if (attempt >= options.maxAttempts) {\n throw error;\n }\n\n // Calculate retry delay\n let delayMs: number;\n let reason: string;\n\n if (error instanceof RateLimitError) {\n delayMs = error.retryAfter\n ? error.retryAfter * 1000\n : calculateBackoffDelay(attempt, options);\n reason = `Rate limited (429)`;\n\n // Notify callback\n if (config.onRateLimit) {\n config.onRateLimit(error.rateLimitInfo);\n }\n } else if (error instanceof ServerError) {\n delayMs = calculateBackoffDelay(attempt, options);\n reason = `Server error (${error.statusCode})`;\n } else if (error instanceof TimeoutError) {\n delayMs = calculateBackoffDelay(attempt, options);\n reason = `Timeout`;\n } else {\n delayMs = calculateBackoffDelay(attempt, options);\n reason = `Unknown retryable error`;\n }\n\n logger.retry(attempt, options.maxAttempts, delayMs, reason);\n\n await sleep(delayMs);\n }\n }\n\n // This should never be reached, but TypeScript needs it\n throw lastError || new Error('Retry loop exited unexpectedly');\n}\n", "/**\n * Request execution module\n *\n * Handles the full request lifecycle:\n * 1. Authentication\n * 2. Throttling (if enabled)\n * 3. Request execution\n * 4. Error handling with retry\n */\n\nimport type { RequestContext, ResolvedConfig } from '../core/types.js';\nimport type { AuthStrategy } from '../auth/types.js';\nimport type { Logger } from '../core/logger.js';\nimport type { Throttle } from './throttle.js';\nimport {\n QuickbaseError,\n RateLimitError,\n TimeoutError,\n parseErrorResponse,\n isRetryableError,\n} from '../core/errors.js';\nimport { extractRateLimitInfo, sleep } from './retry.js';\nimport { getRealmHostname } from '../core/config.js';\nimport { transformDates } from '../core/dates.js';\n\nexport interface RequestOptions {\n method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';\n path: string;\n body?: unknown;\n query?: Record<string, string | number | boolean | undefined>;\n /** Database ID for temp token auth */\n dbid?: string;\n /** Custom headers */\n headers?: Record<string, string>;\n}\n\nexport interface RequestExecutorOptions {\n config: ResolvedConfig;\n auth: AuthStrategy;\n throttle: Throttle;\n logger: Logger;\n}\n\n/**\n * Extract dbid from request options for temp-token auth.\n * Checks multiple locations where table/app ID may appear.\n */\nexport function extractDbid(options: RequestOptions): string | undefined {\n // 1. Explicit dbid takes priority\n if (options.dbid) {\n return options.dbid;\n }\n\n // 2. Check query params for tableId\n if (options.query?.tableId) {\n return String(options.query.tableId);\n }\n\n // 3. Check query params for appId (for app-level operations)\n if (options.query?.appId) {\n return String(options.query.appId);\n }\n\n // 4. Check path for tableId (e.g., /v1/tables/{tableId}/...)\n const tableIdMatch = options.path.match(/\\/tables\\/([^/?]+)/);\n if (tableIdMatch) {\n return tableIdMatch[1];\n }\n\n // 5. Check path for appId (e.g., /v1/apps/{appId}/...)\n const appIdMatch = options.path.match(/\\/apps\\/([^/?]+)/);\n if (appIdMatch) {\n return appIdMatch[1];\n }\n\n // 6. Check request body for 'from' field (runQuery, deleteRecords)\n if (options.body && typeof options.body === 'object') {\n const body = options.body as Record<string, unknown>;\n if (typeof body.from === 'string') {\n return body.from;\n }\n // 7. Check request body for 'to' field (upsert)\n if (typeof body.to === 'string') {\n return body.to;\n }\n }\n\n return undefined;\n}\n\n/**\n * Build URL with query parameters\n */\nfunction buildUrl(\n baseUrl: string,\n path: string,\n query?: Record<string, string | number | boolean | undefined>\n): string {\n // Ensure baseUrl ends with / and path doesn't start with / to properly join them\n // new URL('/apps/x', 'https://api.quickbase.com/v1') would give https://api.quickbase.com/apps/x (wrong)\n // new URL('apps/x', 'https://api.quickbase.com/v1/') gives https://api.quickbase.com/v1/apps/x (correct)\n const normalizedBase = baseUrl.endsWith('/') ? baseUrl : `${baseUrl}/`;\n const normalizedPath = path.startsWith('/') ? path.slice(1) : path;\n const url = new URL(normalizedPath, normalizedBase);\n\n if (query) {\n for (const [key, value] of Object.entries(query)) {\n if (value !== undefined) {\n url.searchParams.set(key, String(value));\n }\n }\n }\n\n return url.toString();\n}\n\n/**\n * Create request headers\n */\nasync function buildHeaders(\n auth: AuthStrategy,\n realmHostname: string,\n dbid?: string,\n customHeaders?: Record<string, string>\n): Promise<Record<string, string>> {\n const token = await auth.getToken(dbid);\n const authHeader = auth.getAuthorizationHeader(token);\n\n return {\n 'Content-Type': 'application/json',\n 'QB-Realm-Hostname': realmHostname,\n 'Authorization': authHeader,\n ...customHeaders,\n };\n}\n\n/**\n * Execute a single request (no retry logic)\n */\nasync function executeSingleRequest(\n options: RequestOptions,\n executor: RequestExecutorOptions,\n context: RequestContext\n): Promise<Response> {\n const { config, auth, throttle, logger } = executor;\n const url = buildUrl(config.baseUrl, options.path, options.query);\n const realmHostname = getRealmHostname(config.realm);\n\n // Get auth headers (use extracted dbid from context)\n const headers = await buildHeaders(auth, realmHostname, context.dbid, options.headers);\n\n // Apply throttling if enabled\n await throttle.acquire();\n\n // Build fetch options\n const fetchOptions: RequestInit = {\n method: options.method,\n headers,\n credentials: 'include', // Include cookies for Code Page auth\n };\n\n if (options.body !== undefined) {\n fetchOptions.body = JSON.stringify(options.body);\n }\n\n // Create abort controller for timeout\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), config.timeout);\n fetchOptions.signal = controller.signal;\n\n const startTime = Date.now();\n\n try {\n const response = await config.fetchApi(url, fetchOptions);\n const duration = Date.now() - startTime;\n\n logger.timing(options.method, options.path, duration);\n\n return response;\n } catch (error) {\n if (error instanceof Error && error.name === 'AbortError') {\n throw new TimeoutError(config.timeout);\n }\n throw error;\n } finally {\n clearTimeout(timeoutId);\n }\n}\n\n/**\n * Handle response and throw appropriate errors\n */\nasync function handleResponse(\n response: Response,\n requestUrl: string,\n context: RequestContext,\n executor: RequestExecutorOptions\n): Promise<Response> {\n const { config, logger } = executor;\n\n if (response.ok) {\n return response;\n }\n\n // Extract rate limit info for 429s\n if (response.status === 429) {\n const rateLimitInfo = extractRateLimitInfo(response, requestUrl, context.attempt);\n\n logger.rateLimit({\n url: requestUrl,\n status: 429,\n retryAfter: rateLimitInfo.retryAfter,\n attempt: context.attempt,\n rayId: rateLimitInfo.qbApiRay || rateLimitInfo.cfRay,\n });\n\n // Notify callback\n if (config.onRateLimit) {\n config.onRateLimit(rateLimitInfo);\n }\n\n throw new RateLimitError(rateLimitInfo);\n }\n\n // Parse and throw appropriate error\n throw await parseErrorResponse(response, requestUrl);\n}\n\n/**\n * Execute a request with full retry logic\n */\nexport async function executeRequest<T = unknown>(\n options: RequestOptions,\n executor: RequestExecutorOptions\n): Promise<T> {\n const { config, auth, logger } = executor;\n const maxAttempts = config.retry.maxAttempts;\n\n // Extract dbid for temp-token auth\n const dbid = extractDbid(options);\n\n const context: RequestContext = {\n methodName: `${options.method} ${options.path}`,\n attempt: 1,\n maxAttempts,\n dbid,\n startTime: Date.now(),\n };\n\n let lastError: Error | null = null;\n\n for (let attempt = 1; attempt <= maxAttempts; attempt++) {\n context.attempt = attempt;\n\n try {\n const response = await executeSingleRequest(options, executor, context);\n const url = buildUrl(config.baseUrl, options.path, options.query);\n\n await handleResponse(response, url, context, executor);\n\n // Parse JSON response and optionally transform dates\n const data = await response.json();\n return transformDates(data, config.convertDates) as T;\n } catch (error) {\n lastError = error as Error;\n\n // Check if error is retryable\n if (!isRetryableError(error)) {\n throw error;\n }\n\n // Don't retry if we've exhausted attempts\n if (attempt >= maxAttempts) {\n throw error;\n }\n\n // Handle auth errors specially - try to refresh token\n if (error instanceof QuickbaseError && error.statusCode === 401) {\n const refreshed = await auth.handleAuthError(dbid);\n if (!refreshed) {\n throw error;\n }\n logger.debug('Token refreshed, retrying request');\n continue;\n }\n\n // Calculate retry delay\n let delayMs: number;\n let reason: string;\n\n if (error instanceof RateLimitError) {\n delayMs = error.retryAfter\n ? error.retryAfter * 1000\n : calculateBackoff(attempt, config.retry);\n reason = 'Rate limited (429)';\n } else if (error instanceof TimeoutError) {\n delayMs = calculateBackoff(attempt, config.retry);\n reason = 'Timeout';\n } else if (error instanceof QuickbaseError && error.statusCode >= 500) {\n delayMs = calculateBackoff(attempt, config.retry);\n reason = `Server error (${error.statusCode})`;\n } else {\n delayMs = calculateBackoff(attempt, config.retry);\n reason = 'Retryable error';\n }\n\n logger.retry(attempt, maxAttempts, delayMs, reason);\n await sleep(delayMs);\n }\n }\n\n throw lastError || new Error('Request failed');\n}\n\n/**\n * Calculate exponential backoff delay with jitter\n */\nfunction calculateBackoff(\n attempt: number,\n config: { initialDelayMs: number; maxDelayMs: number; multiplier: number }\n): number {\n const delay = config.initialDelayMs * Math.pow(config.multiplier, attempt - 1);\n const jitter = delay * 0.1 * (Math.random() * 2 - 1);\n return Math.min(delay + jitter, config.maxDelayMs);\n}\n\n/**\n * Create a request executor\n */\nexport function createRequestExecutor(options: RequestExecutorOptions) {\n return {\n execute: <T = unknown>(requestOptions: RequestOptions) =>\n executeRequest<T>(requestOptions, options),\n };\n}\n", "/**\n * Client-side throttling (optional)\n *\n * Implements a sliding window rate limiter that matches QuickBase's\n * \"100 requests per 10 seconds per user token\" limit.\n *\n * This is OPTIONAL - QuickBase handles rate limiting server-side.\n * Enable this if you want to avoid hitting 429s proactively.\n */\n\nexport class SlidingWindowThrottle {\n private readonly requestsPer10Seconds: number;\n private readonly timestamps: number[] = [];\n\n constructor(requestsPer10Seconds: number = 100) {\n this.requestsPer10Seconds = requestsPer10Seconds;\n }\n\n /**\n * Wait until a request slot is available\n */\n async acquire(): Promise<void> {\n const now = Date.now();\n const windowStart = now - 10000; // 10 second window\n\n // Remove timestamps outside the window\n while (this.timestamps.length > 0 && this.timestamps[0]! < windowStart) {\n this.timestamps.shift();\n }\n\n // If we're at the limit, wait until the oldest request exits the window\n if (this.timestamps.length >= this.requestsPer10Seconds) {\n const oldestTimestamp = this.timestamps[0]!;\n const waitTime = oldestTimestamp + 10000 - now;\n\n if (waitTime > 0) {\n await this.sleep(waitTime);\n // Recurse to recheck after waiting\n return this.acquire();\n }\n }\n\n // Record this request\n this.timestamps.push(Date.now());\n }\n\n /**\n * Get the number of requests made in the current window\n */\n getWindowCount(): number {\n const windowStart = Date.now() - 10000;\n return this.timestamps.filter((t) => t >= windowStart).length;\n }\n\n /**\n * Get remaining requests available in the current window\n */\n getRemaining(): number {\n return Math.max(0, this.requestsPer10Seconds - this.getWindowCount());\n }\n\n /**\n * Reset the throttle state\n */\n reset(): void {\n this.timestamps.length = 0;\n }\n\n private sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n}\n\n/**\n * No-op throttle for when proactive throttling is disabled\n */\nexport class NoOpThrottle {\n async acquire(): Promise<void> {\n // No-op\n }\n\n getWindowCount(): number {\n return 0;\n }\n\n getRemaining(): number {\n return Infinity;\n }\n\n reset(): void {\n // No-op\n }\n}\n\nexport type Throttle = SlidingWindowThrottle | NoOpThrottle;\n\nexport function createThrottle(config: {\n enabled: boolean;\n requestsPer10Seconds: number;\n}): Throttle {\n if (config.enabled) {\n return new SlidingWindowThrottle(config.requestsPer10Seconds);\n }\n return new NoOpThrottle();\n}\n", "/**\n * Pagination support with fluent API\n *\n * Provides automatic pagination for QuickBase API endpoints that return\n * paginated results. Supports both skip-based and token-based pagination.\n *\n * @example\n * ```typescript\n * // Fetch single page (default)\n * const page = await client.runQuery({ ... });\n *\n * // Fetch all pages automatically\n * const all = await client.runQuery({ ... }).all();\n *\n * // Fetch with record limit\n * const limited = await client.runQuery({ ... }).paginate({ limit: 500 });\n *\n * // Explicitly single page (if autoPaginate is enabled globally)\n * const single = await client.runQuery({ ... }).noPaginate();\n * ```\n */\n\n/**\n * Pagination options for controlling automatic pagination behavior\n */\nexport interface PaginationOptions {\n /** Maximum number of records to fetch across all pages */\n limit?: number;\n /** Starting offset for skip-based pagination */\n skip?: number;\n}\n\n/**\n * Metadata returned with paginated responses\n */\nexport interface PaginationMetadata {\n totalRecords?: number;\n numRecords?: number;\n numFields?: number;\n skip?: number;\n top?: number;\n nextPageToken?: string;\n nextToken?: string;\n}\n\n/**\n * A paginated response from the QuickBase API\n */\nexport interface PaginatedResponse<T = unknown> {\n data?: T[];\n fields?: Array<{ id: number; label: string; type: string }>;\n metadata: PaginationMetadata;\n [key: string]: unknown;\n}\n\n/**\n * Determines the type of pagination from a response\n */\nexport type PaginationType = 'skip' | 'token' | 'none';\n\n/**\n * Detect pagination type from response metadata\n */\nexport function detectPaginationType(metadata: PaginationMetadata): PaginationType {\n if (metadata.totalRecords !== undefined && metadata.skip !== undefined) {\n return 'skip';\n }\n if (metadata.nextPageToken !== undefined || metadata.nextToken !== undefined) {\n return 'token';\n }\n return 'none';\n}\n\n/**\n * Check if a response has more pages available\n */\nexport function hasMorePages(\n response: PaginatedResponse,\n paginationType: PaginationType,\n currentCount: number\n): boolean {\n const { metadata } = response;\n\n if (paginationType === 'skip') {\n return (\n metadata.totalRecords !== undefined &&\n currentCount < metadata.totalRecords\n );\n }\n\n if (paginationType === 'token') {\n const nextToken = metadata.nextPageToken ?? metadata.nextToken;\n return nextToken !== undefined && nextToken !== '';\n }\n\n return false;\n}\n\n/**\n * Find the data array key in a response object\n */\nexport function findDataKey(response: PaginatedResponse): string {\n for (const key of Object.keys(response)) {\n if (Array.isArray(response[key])) {\n return key;\n }\n }\n return 'data';\n}\n\n/**\n * Check if a response looks like a paginated response\n */\nexport function isPaginatedResponse(response: unknown): response is PaginatedResponse {\n if (!response || typeof response !== 'object') {\n return false;\n }\n\n const obj = response as Record<string, unknown>;\n\n // Must have metadata object\n if (!obj.metadata || typeof obj.metadata !== 'object') {\n return false;\n }\n\n // Must have an array field\n const hasArrayField = Object.values(obj).some(Array.isArray);\n if (!hasArrayField) {\n return false;\n }\n\n const metadata = obj.metadata as PaginationMetadata;\n\n // Check for pagination indicators\n return (\n metadata.totalRecords !== undefined ||\n metadata.numRecords !== undefined ||\n metadata.nextPageToken !== undefined ||\n metadata.nextToken !== undefined\n );\n}\n\n/**\n * Request executor function type\n */\nexport type RequestExecutor<T> = () => Promise<T>;\n\n/**\n * Request executor with pagination parameters\n */\nexport type PaginatedRequestExecutor<T> = (params: {\n skip?: number;\n nextPageToken?: string;\n nextToken?: string;\n}) => Promise<T>;\n\n/**\n * A thenable request that supports fluent pagination methods\n *\n * This class wraps an API request and allows chaining pagination methods\n * while still being directly awaitable.\n */\nexport class PaginatedRequest<T> implements PromiseLike<T> {\n private readonly executor: RequestExecutor<T>;\n private readonly paginatedExecutor?: PaginatedRequestExecutor<T>;\n private readonly defaultAutoPaginate: boolean;\n\n constructor(\n executor: RequestExecutor<T>,\n options?: {\n paginatedExecutor?: PaginatedRequestExecutor<T>;\n autoPaginate?: boolean;\n }\n ) {\n this.executor = executor;\n this.paginatedExecutor = options?.paginatedExecutor;\n this.defaultAutoPaginate = options?.autoPaginate ?? false;\n }\n\n /**\n * Implement PromiseLike to allow direct awaiting\n * Default behavior respects the global autoPaginate setting\n */\n then<TResult1 = T, TResult2 = never>(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null\n ): Promise<TResult1 | TResult2> {\n const promise = this.defaultAutoPaginate ? this.all() : this.executor();\n return promise.then(onfulfilled, onrejected);\n }\n\n /**\n * Fetch all pages and combine results\n */\n async all(): Promise<T> {\n return this.paginate({});\n }\n\n /**\n * Fetch pages with optional limit\n */\n async paginate(options: PaginationOptions = {}): Promise<T> {\n if (!this.paginatedExecutor) {\n // Not a paginated endpoint, just execute normally\n return this.executor();\n }\n\n const { limit, skip: initialSkip = 0 } = options;\n let allRecords: unknown[] = [];\n let lastResponse: PaginatedResponse | null = null;\n let paginationType: PaginationType = 'none';\n let currentSkip = initialSkip;\n let nextToken: string | undefined;\n\n // Fetch first page\n const firstResponse = await this.paginatedExecutor({ skip: initialSkip }) as PaginatedResponse;\n\n if (!isPaginatedResponse(firstResponse)) {\n // Not a paginated response, return as-is\n return firstResponse as T;\n }\n\n lastResponse = firstResponse;\n paginationType = detectPaginationType(firstResponse.metadata);\n\n const dataKey = findDataKey(firstResponse);\n const firstPageData = (firstResponse[dataKey] as unknown[]) || [];\n\n // Apply limit to first page if needed\n if (limit !== undefined && firstPageData.length > limit) {\n allRecords = firstPageData.slice(0, limit);\n } else {\n allRecords = [...firstPageData];\n }\n\n // Initialize continuation state\n if (paginationType === 'skip') {\n currentSkip = initialSkip + firstPageData.length;\n } else if (paginationType === 'token') {\n nextToken = firstResponse.metadata.nextPageToken ?? firstResponse.metadata.nextToken;\n }\n\n // Fetch remaining pages\n while (hasMorePages(lastResponse, paginationType, allRecords.length)) {\n // Check limit\n if (limit !== undefined && allRecords.length >= limit) {\n break;\n }\n\n // Fetch next page\n let nextResponse: PaginatedResponse;\n\n if (paginationType === 'skip') {\n nextResponse = await this.paginatedExecutor({ skip: currentSkip }) as PaginatedResponse;\n } else if (paginationType === 'token' && nextToken) {\n const tokenKey = lastResponse.metadata.nextPageToken !== undefined\n ? 'nextPageToken'\n : 'nextToken';\n nextResponse = await this.paginatedExecutor({ [tokenKey]: nextToken }) as PaginatedResponse;\n } else {\n break;\n }\n\n lastResponse = nextResponse;\n const pageData = (nextResponse[dataKey] as unknown[]) || [];\n\n // Check for empty response\n if (pageData.length === 0) {\n break;\n }\n\n // Apply limit if needed\n if (limit !== undefined) {\n const remainingCapacity = limit - allRecords.length;\n allRecords = allRecords.concat(pageData.slice(0, remainingCapacity));\n } else {\n allRecords = allRecords.concat(pageData);\n }\n\n // Update continuation state\n if (paginationType === 'skip') {\n currentSkip += pageData.length;\n } else if (paginationType === 'token') {\n nextToken = nextResponse.metadata.nextPageToken ?? nextResponse.metadata.nextToken;\n if (!nextToken) {\n break;\n }\n }\n }\n\n // Build final response\n const finalResponse: PaginatedResponse = {\n ...lastResponse,\n [dataKey]: allRecords,\n metadata: {\n ...lastResponse.metadata,\n numRecords: allRecords.length,\n skip: initialSkip,\n },\n };\n\n // Clear pagination tokens in final response\n if (paginationType === 'token') {\n delete finalResponse.metadata.nextPageToken;\n delete finalResponse.metadata.nextToken;\n }\n\n return finalResponse as T;\n }\n\n /**\n * Explicitly fetch only a single page (no pagination)\n */\n async noPaginate(): Promise<T> {\n return this.executor();\n }\n\n /**\n * Get the underlying promise (for compatibility)\n */\n toPromise(): Promise<T> {\n return this.then();\n }\n}\n\n/**\n * Create a paginated request wrapper\n */\nexport function createPaginatedRequest<T>(\n executor: RequestExecutor<T>,\n options?: {\n paginatedExecutor?: PaginatedRequestExecutor<T>;\n autoPaginate?: boolean;\n }\n): PaginatedRequest<T> {\n return new PaginatedRequest(executor, options);\n}\n", "/**\n * Auto-generated QuickBase API client implementation\n * DO NOT EDIT - Regenerate with: npm run spec:generate\n */\n\nimport { PaginatedRequest, createPaginatedRequest } from '../client/pagination.js';\n\nimport type {\n QuickbaseAPI,\n CreateAppRequest,\n CreateAppResponse,\n GetAppParams,\n GetAppResponse,\n UpdateAppParams,\n UpdateAppRequest,\n UpdateAppResponse,\n DeleteAppParams,\n DeleteAppRequest,\n DeleteAppResponse,\n GetAppEventsParams,\n GetAppEventsResponse,\n CopyAppParams,\n CopyAppRequest,\n CopyAppResponse,\n GetAppTablesParams,\n GetAppTablesResponse,\n CreateTableParams,\n CreateTableRequest,\n CreateTableResponse,\n GetTableParams,\n GetTableResponse,\n UpdateTableParams,\n UpdateTableRequest,\n UpdateTableResponse,\n DeleteTableParams,\n DeleteTableResponse,\n GetRelationshipsParams,\n GetRelationshipsResponse,\n CreateRelationshipParams,\n CreateRelationshipRequest,\n CreateRelationshipResponse,\n UpdateRelationshipParams,\n UpdateRelationshipRequest,\n UpdateRelationshipResponse,\n DeleteRelationshipParams,\n DeleteRelationshipResponse,\n GetTableReportsParams,\n GetTableReportsResponse,\n GetReportParams,\n GetReportResponse,\n RunReportParams,\n RunReportRequest,\n RunReportResponse,\n GetFieldsParams,\n GetFieldsResponse,\n CreateFieldParams,\n CreateFieldRequest,\n CreateFieldResponse,\n DeleteFieldsParams,\n DeleteFieldsRequest,\n DeleteFieldsResponse,\n GetFieldParams,\n GetFieldResponse,\n UpdateFieldParams,\n UpdateFieldRequest,\n UpdateFieldResponse,\n GetFieldsUsageParams,\n GetFieldsUsageResponse,\n GetFieldUsageParams,\n GetFieldUsageResponse,\n RunFormulaRequest,\n RunFormulaResponse,\n UpsertRequest,\n UpsertResponse,\n DeleteRecordsRequest,\n DeleteRecordsResponse,\n RunQueryRequest,\n RunQueryResponse,\n GetTempTokenDBIDParams,\n GetTempTokenDBIDResponse,\n ExchangeSsoTokenRequest,\n ExchangeSsoTokenResponse,\n CloneUserTokenRequest,\n CloneUserTokenResponse,\n TransferUserTokenRequest,\n TransferUserTokenResponse,\n DeactivateUserTokenResponse,\n DeleteUserTokenResponse,\n DownloadFileParams,\n DownloadFileResponse,\n DeleteFileParams,\n DeleteFileResponse,\n GetUsersParams,\n GetUsersRequest,\n GetUsersResponse,\n DenyUsersParams,\n DenyUsersRequest,\n DenyUsersResponse,\n DenyUsersAndGroupsParams,\n DenyUsersAndGroupsRequest,\n DenyUsersAndGroupsResponse,\n UndenyUsersParams,\n UndenyUsersRequest,\n UndenyUsersResponse,\n AddMembersToGroupParams,\n AddMembersToGroupRequest,\n AddMembersToGroupResponse,\n RemoveMembersFromGroupParams,\n RemoveMembersFromGroupRequest,\n RemoveMembersFromGroupResponse,\n AddManagersToGroupParams,\n AddManagersToGroupRequest,\n AddManagersToGroupResponse,\n RemoveManagersFromGroupParams,\n RemoveManagersFromGroupRequest,\n RemoveManagersFromGroupResponse,\n AddSubgroupsToGroupParams,\n AddSubgroupsToGroupRequest,\n AddSubgroupsToGroupResponse,\n RemoveSubgroupsFromGroupParams,\n RemoveSubgroupsFromGroupRequest,\n RemoveSubgroupsFromGroupResponse,\n AuditRequest,\n AuditResponse,\n PlatformAnalyticReadsParams,\n PlatformAnalyticReadsResponse,\n PlatformAnalyticEventSummariesParams,\n PlatformAnalyticEventSummariesRequest,\n PlatformAnalyticEventSummariesResponse,\n ExportSolutionParams,\n ExportSolutionResponse,\n UpdateSolutionParams,\n UpdateSolutionRequest,\n UpdateSolutionResponse,\n CreateSolutionRequest,\n CreateSolutionResponse,\n ExportSolutionToRecordParams,\n ExportSolutionToRecordResponse,\n CreateSolutionFromRecordParams,\n CreateSolutionFromRecordResponse,\n UpdateSolutionToRecordParams,\n UpdateSolutionToRecordResponse,\n ChangesetSolutionParams,\n ChangesetSolutionRequest,\n ChangesetSolutionResponse,\n ChangesetSolutionFromRecordParams,\n ChangesetSolutionFromRecordResponse,\n GenerateDocumentParams,\n GenerateDocumentResponse,\n} from './types.js';\n\nexport type RequestFn = <T>(options: {\n method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';\n path: string;\n body?: unknown;\n query?: Record<string, string | number | boolean | undefined>;\n}) => Promise<T>;\n\n/**\n * Create typed API methods from a request function\n * @param request - The request executor function\n * @param autoPaginate - Default auto-pagination behavior (default: false)\n */\nexport function createApiMethods(request: RequestFn, autoPaginate: boolean = false): QuickbaseAPI {\n return {\n /**\n * Create an app\n *\n * Creates an application in an account. You must have application creation rights in the respective account. Main properties and application variables can be set with this API.\n *\n * @param body - Request body\n * @param body.assignToken - Set to true if you would like to assign the app to the user token you used to create the application. The default is false. (optional)\n * @param body.variables - The app variables. A maximum of 10 variables can be inserted at a time. See [About Application Variables](https://help.quickbase.com/user-assistance/variables.html) (optional)\n * @param body.name - The app name. You are allowed to create multiple apps with the same name, in the same realm, because they will have different dbid values. We urge you to be careful about doing this.\n * @param body.securityProperties - Application security properties. (optional)\n * @param body.description - The description for the app. If this property is left out, the app description will be blank. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/createApp\n */\n createApp(body: CreateAppRequest): Promise<CreateAppResponse> {\n return request<CreateAppResponse>({\n method: 'POST',\n path: '/apps',\n body,\n });\n },\n\n /**\n * Get an app\n *\n * Returns the main properties of an application, including application variables.\n *\n * @param params.appId - The unique identifier of an app\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getApp\n */\n getApp(params: GetAppParams): Promise<GetAppResponse> {\n return request<GetAppResponse>({\n method: 'GET',\n path: `/apps/${params.appId}`,\n });\n },\n\n /**\n * Update an app\n *\n * Updates the main properties and/or application variables for a specific application. Any properties of the app that you do not specify in the request body will remain unchanged.\n *\n * @param params.appId - The unique identifier of an app\n *\n * @param body - Request body (optional)\n * @param body.variables - The app variables. A maximum of 10 variables can be updated at a time. See [About Application Variables](https://help.quickbase.com/user-assistance/variables.html) (optional)\n * @param body.name - The name for the app. (optional)\n * @param body.securityProperties - Security properties of the application (optional)\n * @param body.description - The description for the app. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/updateApp\n */\n updateApp(params: UpdateAppParams, body?: UpdateAppRequest): Promise<UpdateAppResponse> {\n return request<UpdateAppResponse>({\n method: 'POST',\n path: `/apps/${params.appId}`,\n body,\n });\n },\n\n /**\n * Delete an app\n *\n * Deletes an entire application, including all of the tables and data.\n *\n * @param params.appId - The unique identifier of an app\n *\n * @param body - Request body\n * @param body.name - To confirm application deletion we ask for application name.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/deleteApp\n */\n deleteApp(params: DeleteAppParams, body: DeleteAppRequest): Promise<DeleteAppResponse> {\n return request<DeleteAppResponse>({\n method: 'DELETE',\n path: `/apps/${params.appId}`,\n body,\n });\n },\n\n /**\n * Get app events\n *\n * Get a list of events that can be triggered based on data or user actions in this application, includes: Email notification, Reminders, Subscriptions, QB Actions, Webhooks, record change triggered Automations (does not include scheduled).\n *\n * @param params.appId - The unique identifier of an app\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getAppEvents\n */\n getAppEvents(params: GetAppEventsParams): Promise<GetAppEventsResponse> {\n return request<GetAppEventsResponse>({\n method: 'GET',\n path: `/apps/${params.appId}/events`,\n });\n },\n\n /**\n * Copy an app\n *\n * Copies the specified application. The new application will have the same schema as the original. See below for additional copy options.\n *\n * @param params.appId - The unique identifier of an app\n *\n * @param body - Request body\n * @param body.name - The name of the newly copied app\n * @param body.description - The description of the newly copied app (optional)\n * @param body.properties - The configuration properties for performing the app copy (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/copyApp\n */\n copyApp(params: CopyAppParams, body: CopyAppRequest): Promise<CopyAppResponse> {\n return request<CopyAppResponse>({\n method: 'POST',\n path: `/apps/${params.appId}/copy`,\n body,\n });\n },\n\n /**\n * Get tables for an app\n *\n * Gets a list of all the tables that exist in a specific application. The properties for each table are the same as what is returned in Get table.\n *\n * @param params.appId - The unique identifier of an app\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getAppTables\n */\n getAppTables(params: GetAppTablesParams): Promise<GetAppTablesResponse> {\n return request<GetAppTablesResponse>({\n method: 'GET',\n path: '/tables',\n query: { appId: params.appId },\n });\n },\n\n /**\n * Create a table\n *\n * Creates a table in an application.\n *\n * @param params.appId - The unique identifier of an app\n *\n * @param body - Request body\n * @param body.name - The name for the table.\n * @param body.pluralRecordName - The plural noun for records in the table. If this value is not passed the default value is 'Records'. (optional)\n * @param body.singleRecordName - The singular noun for records in the table. If this value is not passed the default value is 'Record'. (optional)\n * @param body.description - The description for the table. If this value is not passed the default value is blank. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/createTable\n */\n createTable(params: CreateTableParams, body: CreateTableRequest): Promise<CreateTableResponse> {\n return request<CreateTableResponse>({\n method: 'POST',\n path: '/tables',\n query: { appId: params.appId },\n body,\n });\n },\n\n /**\n * Get a table\n *\n * Gets the properties of an individual table that is part of an application.\n *\n * @param params.appId - The unique identifier of an app\n * @param params.tableId - The unique identifier (dbid) of the table.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getTable\n */\n getTable(params: GetTableParams): Promise<GetTableResponse> {\n return request<GetTableResponse>({\n method: 'GET',\n path: `/tables/${params.tableId}`,\n query: { appId: params.appId },\n });\n },\n\n /**\n * Update a table\n *\n * Updates the main properties of a specific table. Any properties of the table that you do not specify in the request body will remain unchanged.\n *\n * @param params.appId - The unique identifier of an app\n * @param params.tableId - The unique identifier (dbid) of the table.\n *\n * @param body - Request body (optional)\n * @param body.name - The name for the table. (optional)\n * @param body.pluralRecordName - The plural noun for records in the table. If this value is not passed the default value is 'Records'. (optional)\n * @param body.singleRecordName - The singular noun for records in the table. If this value is not passed the default value is 'Record'. (optional)\n * @param body.description - The description for the table. If this value is not passed the default value is blank. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/updateTable\n */\n updateTable(params: UpdateTableParams, body?: UpdateTableRequest): Promise<UpdateTableResponse> {\n return request<UpdateTableResponse>({\n method: 'POST',\n path: `/tables/${params.tableId}`,\n query: { appId: params.appId },\n body,\n });\n },\n\n /**\n * Delete a table\n *\n * Deletes a specific table in an application, including all of the data within it.\n *\n * @param params.appId - The unique identifier of an app\n * @param params.tableId - The unique identifier (dbid) of the table.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/deleteTable\n */\n deleteTable(params: DeleteTableParams): Promise<DeleteTableResponse> {\n return request<DeleteTableResponse>({\n method: 'DELETE',\n path: `/tables/${params.tableId}`,\n query: { appId: params.appId },\n });\n },\n\n /**\n * Get all relationships\n *\n * Get a list of all relationships, and their definitions, for a specific table. Details are provided for the child side of relationships within a given application. Limited details are returned for cross-application relationships.\n *\n * @param params.skip - The number of relationships to skip. (optional)\n * @param params.tableId - The unique identifier (dbid) of the child table.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getRelationships\n */\n getRelationships(params: GetRelationshipsParams): PaginatedRequest<GetRelationshipsResponse> {\n const executor = () => {\n return request<GetRelationshipsResponse>({\n method: 'GET',\n path: `/tables/${params.tableId}/relationships`,\n query: { skip: params.skip },\n });\n };\n const paginatedExecutor = (paginationParams: { skip?: number; nextPageToken?: string; nextToken?: string }) => {\n return request<GetRelationshipsResponse>({\n method: 'GET',\n path: `/tables/${params.tableId}/relationships`,\n query: { skip: params.skip, ...paginationParams },\n });\n };\n return createPaginatedRequest(executor, { paginatedExecutor, autoPaginate });\n },\n\n /**\n * Create a relationship\n *\n * Creates a relationship in a table as well as lookup/summary fields. Relationships can only be created for tables within the same app.\n *\n * @param params.tableId - The unique identifier (dbid) of the table. This will be the child table.\n *\n * @param body - Request body\n * @param body.summaryFields - Array of summary field objects which will turn into summary fields in the parent table. When you specify the 'COUNT' accumulation type, you have to specify 0 as the summaryFid (or not set it in the request). 'DISTINCT-COUNT' requires that summaryFid be set to an actual fid. (optional)\n * @param body.lookupFieldIds - Array of field ids in the parent table that will become lookup fields in the child table. (optional)\n * @param body.parentTableId - The parent table id for the relationship.\n * @param body.foreignKeyField - This property is optional. If it is not provided, the foreign key field will be created with the label \u2018Related <record>\u2019, where <record> is the name of a record in the parent table. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/createRelationship\n */\n createRelationship(params: CreateRelationshipParams, body: CreateRelationshipRequest): Promise<CreateRelationshipResponse> {\n return request<CreateRelationshipResponse>({\n method: 'POST',\n path: `/tables/${params.tableId}/relationship`,\n body,\n });\n },\n\n /**\n * Update a relationship\n *\n * Use this endpoint to add lookup fields and summary fields to an existing relationship. Updating a relationship will not delete existing lookup/summary fields.\n *\n * @param params.tableId - The unique identifier (dbid) of the table. This will be the child table.\n * @param params.relationshipId - The relationship id. This is the field id of the reference field on the child table.\n *\n * @param body - Request body (optional)\n * @param body.summaryFields - An array of objects, each representing a configuration of one field from the child table, that will become summary fields on the parent table. When you specify the 'COUNT' accumulation type, you have to specify 0 as the summaryFid (or not set it in the request). 'DISTINCT-COUNT' requires that summaryFid be set to an actual fid. (optional)\n * @param body.lookupFieldIds - An array of field ids on the parent table that will become lookup fields on the child table. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/updateRelationship\n */\n updateRelationship(params: UpdateRelationshipParams, body?: UpdateRelationshipRequest): Promise<UpdateRelationshipResponse> {\n return request<UpdateRelationshipResponse>({\n method: 'POST',\n path: `/tables/${params.tableId}/relationship/${params.relationshipId}`,\n body,\n });\n },\n\n /**\n * Delete a relationship\n *\n * Use this endpoint to delete an entire relationship, including all lookup and summary fields. The reference field in the relationship will not be deleted.\n *\n * @param params.tableId - The unique identifier (dbid) of the table. This will be the child table.\n * @param params.relationshipId - The relationship id. This is the field id of the reference field on the child table.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/deleteRelationship\n */\n deleteRelationship(params: DeleteRelationshipParams): Promise<DeleteRelationshipResponse> {\n return request<DeleteRelationshipResponse>({\n method: 'DELETE',\n path: `/tables/${params.tableId}/relationship/${params.relationshipId}`,\n });\n },\n\n /**\n * Get reports for a table\n *\n * Get the schema (properties) of all reports for a table. If the user running the API is an application administrator, the API will also return all personal reports with owner's user id.\n *\n * @param params.tableId - The unique identifier of the table.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getTableReports\n */\n getTableReports(params: GetTableReportsParams): Promise<GetTableReportsResponse> {\n return request<GetTableReportsResponse>({\n method: 'GET',\n path: '/reports',\n query: { tableId: params.tableId },\n });\n },\n\n /**\n * Get a report\n *\n * Get the schema (properties) of an individual report.\n *\n * @param params.tableId - The unique identifier of table.\n * @param params.reportId - The identifier of the report, unique to the table.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getReport\n */\n getReport(params: GetReportParams): Promise<GetReportResponse> {\n return request<GetReportResponse>({\n method: 'GET',\n path: `/reports/${params.reportId}`,\n query: { tableId: params.tableId },\n });\n },\n\n /**\n * Run a report\n *\n * Runs a report, based on an ID and returns the underlying data associated with it. The format of the data will vary based on the report type. Reports that focus on record-level data (table, calendar, etc.) return the individual records. Aggregate reports (summary, chart) will return the summarized information as configured in the report. UI-specific elements are not returned, such as totals, averages and visualizations. Returns data with intelligent pagination based on the approximate size of each record. The metadata object will include the necessary information to iterate over the response and gather more data.\n *\n * @param params.tableId - The identifier of the table for the report.\n * @param params.skip - The number of records to skip. You can set this value when paginating through a set of results. (optional)\n * @param params.top - The maximum number of records to return. You can override the default Quickbase pagination to get more or fewer results. If your requested value here exceeds the dynamic maximums, we will return a subset of results and the rest can be gathered in subsequent API calls. (optional)\n * @param params.reportId - The identifier of the report, unique to the table.\n *\n * @param body - Request body (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/runReport\n */\n runReport(params: RunReportParams, body?: RunReportRequest): PaginatedRequest<RunReportResponse> {\n const executor = () => {\n return request<RunReportResponse>({\n method: 'POST',\n path: `/reports/${params.reportId}/run`,\n query: { tableId: params.tableId, skip: params.skip, top: params.top },\n body,\n });\n };\n const paginatedExecutor = (paginationParams: { skip?: number; nextPageToken?: string; nextToken?: string }) => {\n const bodyRecord = body as unknown as Record<string, unknown> | undefined;\n const paginatedBody = paginationParams.skip !== undefined || paginationParams.nextPageToken || paginationParams.nextToken\n ? {\n ...(bodyRecord || {}),\n options: {\n ...(bodyRecord?.options as Record<string, unknown> || {}),\n ...(paginationParams.skip !== undefined ? { skip: paginationParams.skip } : {}),\n },\n ...(paginationParams.nextPageToken ? { nextPageToken: paginationParams.nextPageToken } : {}),\n ...(paginationParams.nextToken ? { nextToken: paginationParams.nextToken } : {}),\n }\n : body;\n return request<RunReportResponse>({\n method: 'POST',\n path: `/reports/${params.reportId}/run`,\n query: { tableId: params.tableId, skip: params.skip, top: params.top },\n body: paginatedBody,\n });\n };\n return createPaginatedRequest(executor, { paginatedExecutor, autoPaginate });\n },\n\n /**\n * Get fields for a table\n *\n * Gets the properties for all fields in a specific table. The properties for each field are the same as in Get field.\n *\n * @param params.tableId - The unique identifier (dbid) of the table.\n * @param params.includeFieldPerms - Set to 'true' if you'd like to get back the custom permissions for the field(s). (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getFields\n */\n getFields(params: GetFieldsParams): Promise<GetFieldsResponse> {\n return request<GetFieldsResponse>({\n method: 'GET',\n path: '/fields',\n query: { tableId: params.tableId, includeFieldPerms: params.includeFieldPerms },\n });\n },\n\n /**\n * Create a field\n *\n * Creates a field within a table, including the custom permissions of that field.\n *\n * @param params.tableId - The unique identifier of the table.\n *\n * @param body - Request body\n * @param body.audited - Indicates if the field is being tracked as part of Quickbase Audit Logs. You can only set this property to \"true\" if the app has audit logs enabled. See Enable data change logs under [Quickbase Audit Logs](https://help.quickbase.com/user-assistance/audit_logs.html). Defaults to false. (optional)\n * @param body.fieldHelp - The configured help text shown to users within the product. (optional)\n * @param body.bold - Indicates if the field is configured to display in bold in the product. Defaults to false. (optional)\n * @param body.properties - Specific field properties. (optional)\n * @param body.appearsByDefault - Indicates if the field is marked as a default in reports. Defaults to true. (optional)\n * @param body.fieldType - The [field types](https://help.quickbase.com/user-assistance/field_types.html), click on any of the field type links for more info.\n * @param body.permissions - Field Permissions for different roles. (optional)\n * @param body.addToForms - Whether the field you are adding should appear on forms. Defaults to false. (optional)\n * @param body.label - The label (name) of the field.\n * @param body.findEnabled - Indicates if the field is marked as searchable. Defaults to true. (optional)\n * @param body.noWrap - Indicates if the field is configured to not wrap when displayed in the product. Defaults to false. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/createField\n */\n createField(params: CreateFieldParams, body: CreateFieldRequest): Promise<CreateFieldResponse> {\n return request<CreateFieldResponse>({\n method: 'POST',\n path: '/fields',\n query: { tableId: params.tableId },\n body,\n });\n },\n\n /**\n * Delete field(s)\n *\n * Deletes one or many fields in a table, based on field id. This will also permanently delete any data or calculations in that field.\n *\n * @param params.tableId - The unique identifier of the table.\n *\n * @param body - Request body\n * @param body.fieldIds - List of field ids to be deleted.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/deleteFields\n */\n deleteFields(params: DeleteFieldsParams, body: DeleteFieldsRequest): Promise<DeleteFieldsResponse> {\n return request<DeleteFieldsResponse>({\n method: 'DELETE',\n path: '/fields',\n query: { tableId: params.tableId },\n body,\n });\n },\n\n /**\n * Get field\n *\n * Gets the properties of an individual field, based on field id. \n Properties present on all field types are returned at the top level. Properties unique to a specific type of field are returned under the 'properties' attribute. Please see [Field types page](../fieldInfo) for more details on the properties for each field type.\n *\n * @param params.tableId - The unique identifier (dbid) of the table.\n * @param params.includeFieldPerms - Set to 'true' if you'd like to get back the custom permissions for the field(s). (optional)\n * @param params.fieldId - The unique identifier (fid) of the field.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getField\n */\n getField(params: GetFieldParams): Promise<GetFieldResponse> {\n return request<GetFieldResponse>({\n method: 'GET',\n path: `/fields/${params.fieldId}`,\n query: { tableId: params.tableId, includeFieldPerms: params.includeFieldPerms },\n });\n },\n\n /**\n * Update a field\n *\n * Updates the properties and custom permissions of a field. The attempt to update certain properties might cause existing data to no longer obey the field\u2019s new properties and may be rejected. See the descriptions of required, unique, and choices, below, for specific situations. Any properties of the field that you do not specify in the request body will remain unchanged.\n *\n * @param params.tableId - The unique identifier of the table.\n * @param params.fieldId - The unique identifier (fid) of the field.\n *\n * @param body - Request body (optional)\n * @param body.audited - Indicates if the field is being tracked as part of Quickbase Audit Logs. You can only set this property to \"true\" if the app has audit logs enabled. See Enable data change logs under [Quickbase Audit Logs](https://help.quickbase.com/user-assistance/audit_logs.html). (optional)\n * @param body.fieldHelp - The configured help text shown to users within the product. (optional)\n * @param body.bold - Indicates if the field is configured to display in bold in the product. (optional)\n * @param body.required - Indicates if the field is required (i.e. if every record must have a non-null value in this field). If you attempt to change a field from not-required to required, and the table currently contains records that have null values in that field, you will get an error indicating that there are null values of the field. In this case you need to find and update those records with null values of the field before changing the field to required. (optional)\n * @param body.properties - Specific field properties. (optional)\n * @param body.appearsByDefault - Indicates if the field is marked as a default in reports. (optional)\n * @param body.unique - Indicates if every record in the table must contain a unique value of this field. If you attempt to change a field from not-unique to unique, and the table currently contains records with the same value of this field, you will get an error. In this case you need to find and update those records with duplicate values of the field before changing the field to unique. (optional)\n * @param body.permissions - Field Permissions for different roles. (optional)\n * @param body.addToForms - Whether the field you are adding should appear on forms. (optional)\n * @param body.label - The label (name) of the field. (optional)\n * @param body.findEnabled - Indicates if the field is marked as searchable. (optional)\n * @param body.noWrap - Indicates if the field is configured to not wrap when displayed in the product. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/updateField\n */\n updateField(params: UpdateFieldParams, body?: UpdateFieldRequest): Promise<UpdateFieldResponse> {\n return request<UpdateFieldResponse>({\n method: 'POST',\n path: `/fields/${params.fieldId}`,\n query: { tableId: params.tableId },\n body,\n });\n },\n\n /**\n * Get usage for all fields\n *\n * Get all the field usage statistics for a table. This is a summary of the information that can be found in the usage table of field properties.\n *\n * @param params.tableId - The unique identifier (dbid) of the table.\n * @param params.skip - The number of fields to skip from the list. (optional)\n * @param params.top - The maximum number of fields to return. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getFieldsUsage\n */\n getFieldsUsage(params: GetFieldsUsageParams): Promise<GetFieldsUsageResponse> {\n return request<GetFieldsUsageResponse>({\n method: 'GET',\n path: '/fields/usage',\n query: { tableId: params.tableId, skip: params.skip, top: params.top },\n });\n },\n\n /**\n * Get usage for a field\n *\n * Get a single fields usage statistics. This is a summary of the information that can be found in the usage table of field properties.\n *\n * @param params.tableId - The unique identifier (dbid) of the table.\n * @param params.fieldId - The unique identifier (fid) of the field.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getFieldUsage\n */\n getFieldUsage(params: GetFieldUsageParams): Promise<GetFieldUsageResponse> {\n return request<GetFieldUsageResponse>({\n method: 'GET',\n path: `/fields/usage/${params.fieldId}`,\n query: { tableId: params.tableId },\n });\n },\n\n /**\n * Run a formula\n *\n * Allows running a formula via an API call. Use this method in custom code to get the value back of a formula without a discrete field on a record.\n *\n * @param body - Request body\n * @param body.formula - The formula to run. This must be a valid Quickbase formula.\n * @param body.rid - The record ID to run the formula against. Only necessary for formulas that are run in the context of a record. For example, the formula User() does not need a record ID. (optional)\n * @param body.from - The unique identifier (dbid) of the table.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/runFormula\n */\n runFormula(body: RunFormulaRequest): Promise<RunFormulaResponse> {\n return request<RunFormulaResponse>({\n method: 'POST',\n path: '/formula/run',\n body,\n });\n },\n\n /**\n * Insert/Update record(s)\n *\n * Insert and/or update record(s) in a table. In this single API call, inserts and updates can be submitted. Update can use the key field on the table, or any other supported unique field. Refer to the [Field types page](../fieldInfo) for more information about how each field type should be formatted. This operation allows for incremental processing of successful records, even when some of the records fail. \n **Note:** This endpoint supports a maximum payload size of 40MB.\n *\n * @param body - Request body\n * @param body.to - The table identifier.\n * @param body.data - Record data array, where each record contains key-value mappings of fields to be defined/updated and their values. (optional)\n * @param body.mergeFieldId - The merge field id. (optional)\n * @param body.fieldsToReturn - Specify an array of field ids that will return data for any updates or added record. Record ID (FID 3) is always returned if any field ID is requested. (optional)\n *\n * @returns Response\n *\n * @see https://developer.quickbase.com/operation/upsert\n */\n upsert(body: UpsertRequest): PaginatedRequest<UpsertResponse> {\n const executor = () => {\n return request<UpsertResponse>({\n method: 'POST',\n path: '/records',\n body,\n });\n };\n const paginatedExecutor = (paginationParams: { skip?: number; nextPageToken?: string; nextToken?: string }) => {\n const bodyRecord = body as unknown as Record<string, unknown> | undefined;\n const paginatedBody = paginationParams.skip !== undefined || paginationParams.nextPageToken || paginationParams.nextToken\n ? {\n ...(bodyRecord || {}),\n options: {\n ...(bodyRecord?.options as Record<string, unknown> || {}),\n ...(paginationParams.skip !== undefined ? { skip: paginationParams.skip } : {}),\n },\n ...(paginationParams.nextPageToken ? { nextPageToken: paginationParams.nextPageToken } : {}),\n ...(paginationParams.nextToken ? { nextToken: paginationParams.nextToken } : {}),\n }\n : body;\n return request<UpsertResponse>({\n method: 'POST',\n path: '/records',\n body: paginatedBody,\n });\n };\n return createPaginatedRequest(executor, { paginatedExecutor, autoPaginate });\n },\n\n /**\n * Delete record(s)\n *\n * Deletes record(s) in a table based on a query. Alternatively, all records in the table can be deleted.\n *\n * @param body - Request body\n * @param body.from - The unique identifier of the table.\n * @param body.where - The filter to delete records. To delete all records specify a filter that will include all records, for example {3.GT.0} where 3 is the ID of the Record ID field.\n *\n * @returns Successful delete records response.\n *\n * @see https://developer.quickbase.com/operation/deleteRecords\n */\n deleteRecords(body: DeleteRecordsRequest): Promise<DeleteRecordsResponse> {\n return request<DeleteRecordsResponse>({\n method: 'DELETE',\n path: '/records',\n body,\n });\n },\n\n /**\n * Query for data\n *\n * Pass in a query in the [Quickbase query language](https://help.quickbase.com/api-guide/componentsquery.html). Returns record data with [intelligent pagination](../pagination) based on the approximate size of each record. The metadata object will include the necessary information to iterate over the response and gather more data.\n *\n * @param body - Request body\n * @param body.options - Additional query options. (optional)\n * @param body.where - The filter, using the Quickbase query language, which determines the records to return. If this parameter is omitted, the query will return all records. (optional)\n * @param body.groupBy - An array that contains the fields to group the records by. (optional)\n * @param body.sortBy - An array of field IDs and sort directions. If this attribute is not set or set to false, queries will be unsorted to improve performance. (optional)\n * @param body.select - An array of field ids for the fields that should be returned in the response. If empty, the default columns on the table will be returned. (optional)\n * @param body.from - The table identifier.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/runQuery\n */\n runQuery(body: RunQueryRequest): PaginatedRequest<RunQueryResponse> {\n const executor = () => {\n return request<RunQueryResponse>({\n method: 'POST',\n path: '/records/query',\n body,\n });\n };\n const paginatedExecutor = (paginationParams: { skip?: number; nextPageToken?: string; nextToken?: string }) => {\n const bodyRecord = body as unknown as Record<string, unknown> | undefined;\n const paginatedBody = paginationParams.skip !== undefined || paginationParams.nextPageToken || paginationParams.nextToken\n ? {\n ...(bodyRecord || {}),\n options: {\n ...(bodyRecord?.options as Record<string, unknown> || {}),\n ...(paginationParams.skip !== undefined ? { skip: paginationParams.skip } : {}),\n },\n ...(paginationParams.nextPageToken ? { nextPageToken: paginationParams.nextPageToken } : {}),\n ...(paginationParams.nextToken ? { nextToken: paginationParams.nextToken } : {}),\n }\n : body;\n return request<RunQueryResponse>({\n method: 'POST',\n path: '/records/query',\n body: paginatedBody,\n });\n };\n return createPaginatedRequest(executor, { paginatedExecutor, autoPaginate });\n },\n\n /**\n * Get a temporary token for a dbid\n *\n * Use this endpoint to get a temporary authorization token, scoped to either an app or a table. It can only be used inside of code pages for client-side authentication because it relies on the browser session. Learn more about [extending Quickbase](https://helpv2.quickbase.com/hc/en-us/articles/4570341709844-Extending-Quickbase). You can then use this token to make other API calls (see [authorization](../auth)). This token expires in 5 minutes.\n *\n * @param params.dbid - The unique identifier of an app or table.\n *\n * @returns This token is used in the authorization header value (similar to the QB-USER-TOKEN), except it uses the QB-TEMP-TOKEN prefix header['Authorization'] = 'QB-TEMP-TOKEN {token}'\n *\n * @see https://developer.quickbase.com/operation/getTempTokenDBID\n */\n getTempTokenDBID(params: GetTempTokenDBIDParams): Promise<GetTempTokenDBIDResponse> {\n return request<GetTempTokenDBIDResponse>({\n method: 'GET',\n path: `/auth/temporary/${params.dbid}`,\n });\n },\n\n /**\n * Exchange an SSO token\n *\n * Use this endpoint to exchange a SAML assertion for a Quickbase token following [RFC 8693](https://www.rfc-editor.org/rfc/rfc8693.html). Callers can choose to return a token compatible with SCIM, XML, or RESTful APIs. The token duration is determined by the [SAML timeout session time](https://helpv2.quickbase.com/hc/en-us/articles/4570410646420-SAML-assertion-example#:~:text=Setting%20SAML%20timeout%20session%20time). You must be able to create a SAML assertion in your code to use this endpoint. The SAML assertion is verified against the configuration on the realm. Learn more about about [SAML assertions](https://helpv2.quickbase.com/hc/en-us/articles/4570410646420-SAML-assertion-example).\n *\n * @param body - Request body\n * @param body.grant_type - The value `urn:ietf:params:oauth:grant-type:token-exchange` indicates that a token exchange is being performed.\n * @param body.requested_token_type - An identifier for the type of the requested security token. For the RESTful API, use `urn:quickbase:params:oauth:token-type:temp_token`. For the XML or SCIM APIs use `urn:quickbase:params:oauth:token-type:temp_ticket`.\n * @param body.subject_token - A security token that represents the identity of the party on behalf of whom the request is being made. For SAML 2.0, the value should be a base64url-encoded SAML 2.0 assertion.\n * @param body.subject_token_type - An identifier that indicates the type of the security token in the `subject_token` parameter.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/exchangeSsoToken\n */\n exchangeSsoToken(body: ExchangeSsoTokenRequest): Promise<ExchangeSsoTokenResponse> {\n return request<ExchangeSsoTokenResponse>({\n method: 'POST',\n path: '/auth/oauth/token',\n body,\n });\n },\n\n /**\n * Clone a user token\n *\n * Clones the authenticated user token. All applications associated with that token are automatically associated with the new token.\n *\n * @param body - Request body\n * @param body.name - The new name for the cloned user token. (optional)\n * @param body.description - The description for the cloned user token. (optional)\n *\n * @returns Response\n *\n * @see https://developer.quickbase.com/operation/cloneUserToken\n */\n cloneUserToken(body: CloneUserTokenRequest): Promise<CloneUserTokenResponse> {\n return request<CloneUserTokenResponse>({\n method: 'POST',\n path: '/usertoken/clone',\n body,\n });\n },\n\n /**\n * Transfer a user token\n *\n * Transfers the specified user token. Application associations will remain intact. For security, permissions must manually be reconciled.\n *\n * @param body - Request body\n * @param body.id - The id of the user token to transfer (optional)\n * @param body.from - The id of the user to transfer the user token from (optional)\n * @param body.to - The id of the user to transfer the user token to (optional)\n *\n * @returns Response\n *\n * @see https://developer.quickbase.com/operation/transferUserToken\n */\n transferUserToken(body: TransferUserTokenRequest): Promise<TransferUserTokenResponse> {\n return request<TransferUserTokenResponse>({\n method: 'POST',\n path: '/usertoken/transfer',\n body,\n });\n },\n\n /**\n * Deactivate a user token\n *\n * Deactivates the authenticated user token. Once this is done, the user token must be reactivated in the user interface.\n *\n * @returns Response\n *\n * @see https://developer.quickbase.com/operation/deactivateUserToken\n */\n deactivateUserToken(): Promise<DeactivateUserTokenResponse> {\n return request<DeactivateUserTokenResponse>({\n method: 'POST',\n path: '/usertoken/deactivate',\n });\n },\n\n /**\n * Delete a user token\n *\n * Deletes the authenticated user token. This is not reversible.\n *\n * @returns Response\n *\n * @see https://developer.quickbase.com/operation/deleteUserToken\n */\n deleteUserToken(): Promise<DeleteUserTokenResponse> {\n return request<DeleteUserTokenResponse>({\n method: 'DELETE',\n path: '/usertoken',\n });\n },\n\n /**\n * Download file\n *\n * Downloads the file attachment, with the file attachment content encoded in base64 format. The API response returns the file name in the `Content-Disposition` header. Meta-data about files can be retrieved from the /records and /reports endpoints, where applicable. Use those endpoints to get the necessary information to fetch files.\n *\n * @param params.tableId - The unique identifier of the table.\n * @param params.recordId - The unique identifier of the record.\n * @param params.fieldId - The unique identifier of the field.\n * @param params.versionNumber - The file attachment version number.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/downloadFile\n */\n downloadFile(params: DownloadFileParams): Promise<DownloadFileResponse> {\n return request<DownloadFileResponse>({\n method: 'GET',\n path: `/files/${params.tableId}/${params.recordId}/${params.fieldId}/${params.versionNumber}`,\n });\n },\n\n /**\n * Delete file\n *\n * Deletes one file attachment version. Meta-data about files can be retrieved from the /records and /reports endpoints, where applicable. Use those endpoints to get the necessary information to delete file versions.\n *\n * @param params.tableId - The unique identifier of the table.\n * @param params.recordId - The unique identifier of the record.\n * @param params.fieldId - The unique identifier of the field.\n * @param params.versionNumber - The file attachment version number.\n *\n * @returns Successfully Deleted the File Attachment\n *\n * @see https://developer.quickbase.com/operation/deleteFile\n */\n deleteFile(params: DeleteFileParams): Promise<DeleteFileResponse> {\n return request<DeleteFileResponse>({\n method: 'DELETE',\n path: `/files/${params.tableId}/${params.recordId}/${params.fieldId}/${params.versionNumber}`,\n });\n },\n\n /**\n * Get users\n *\n * Get all users in an account or narrowed down list of users filtered by email(s). The returned users may be paginated depending on the user count. The count of the returned users may vary. When `nextPageToken` value in the response is not empty, that indicates that there are more results to be returned, you can use this value to get the next result set ('page').\n *\n * @param params.accountId - The account id being used to get users. If no value is specified, the first account associated with the requesting user token is chosen. (optional)\n *\n * @param body - Request body (optional)\n * @param body.emails - When provided, the returned users will be narrowed down only to the users included in this list. (optional)\n * @param body.appIds - When provided, the returned users will be narrowed down only to the users assigned to the app id's provided in this list. The provided app id's should belong to the same account. (optional)\n * @param body.nextPageToken - Next page token used to get the next 'page' of results when available. When this field is empty, the first page is returned. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/getUsers\n */\n getUsers(params: GetUsersParams, body?: GetUsersRequest): PaginatedRequest<GetUsersResponse> {\n const executor = () => {\n return request<GetUsersResponse>({\n method: 'POST',\n path: '/users',\n query: { accountId: params.accountId },\n body,\n });\n };\n const paginatedExecutor = (paginationParams: { skip?: number; nextPageToken?: string; nextToken?: string }) => {\n const bodyRecord = body as unknown as Record<string, unknown> | undefined;\n const paginatedBody = paginationParams.skip !== undefined || paginationParams.nextPageToken || paginationParams.nextToken\n ? {\n ...(bodyRecord || {}),\n options: {\n ...(bodyRecord?.options as Record<string, unknown> || {}),\n ...(paginationParams.skip !== undefined ? { skip: paginationParams.skip } : {}),\n },\n ...(paginationParams.nextPageToken ? { nextPageToken: paginationParams.nextPageToken } : {}),\n ...(paginationParams.nextToken ? { nextToken: paginationParams.nextToken } : {}),\n }\n : body;\n return request<GetUsersResponse>({\n method: 'POST',\n path: '/users',\n query: { accountId: params.accountId },\n body: paginatedBody,\n });\n };\n return createPaginatedRequest(executor, { paginatedExecutor, autoPaginate });\n },\n\n /**\n * Deny users\n *\n * Denies users access to the realm but leaves them listed in groups they have been added to.\n *\n * @param params.accountId - The account id being used to deny users. If no value is specified, the first account associated with the requesting user token is chosen. (optional)\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/denyUsers\n */\n denyUsers(params: DenyUsersParams, body: DenyUsersRequest): Promise<DenyUsersResponse> {\n return request<DenyUsersResponse>({\n method: 'PUT',\n path: '/users/deny',\n query: { accountId: params.accountId },\n body,\n });\n },\n\n /**\n * Deny and remove users from groups\n *\n * Denies users access to the realm and allows you to remove them from groups.\n *\n * @param params.accountId - The account id being used to deny users. If no value is specified, the first account associated with the requesting user token is chosen. (optional)\n * @param params.shouldDeleteFromGroups - Specifies if the users should also be removed from all groups.\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/denyUsersAndGroups\n */\n denyUsersAndGroups(params: DenyUsersAndGroupsParams, body: DenyUsersAndGroupsRequest): Promise<DenyUsersAndGroupsResponse> {\n return request<DenyUsersAndGroupsResponse>({\n method: 'PUT',\n path: `/users/deny/${params.shouldDeleteFromGroups}`,\n query: { accountId: params.accountId },\n body,\n });\n },\n\n /**\n * Undeny users\n *\n * Grants users that have previously been denied access to the realm.\n *\n * @param params.accountId - The account id being used to undeny users. If no value is specified, the first account associated with the requesting user token is chosen. (optional)\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/undenyUsers\n */\n undenyUsers(params: UndenyUsersParams, body: UndenyUsersRequest): Promise<UndenyUsersResponse> {\n return request<UndenyUsersResponse>({\n method: 'PUT',\n path: '/users/undeny',\n query: { accountId: params.accountId },\n body,\n });\n },\n\n /**\n * Add members\n *\n * Adds a list of users to a given group as members.\n *\n * @param params.gid - This is the ID of the group being modified.\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/addMembersToGroup\n */\n addMembersToGroup(params: AddMembersToGroupParams, body: AddMembersToGroupRequest): Promise<AddMembersToGroupResponse> {\n return request<AddMembersToGroupResponse>({\n method: 'POST',\n path: `/groups/${params.gid}/members`,\n body,\n });\n },\n\n /**\n * Remove members\n *\n * Removes a list of members from a given group.\n *\n * @param params.gid - This is the ID of the group being modified.\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/removeMembersFromGroup\n */\n removeMembersFromGroup(params: RemoveMembersFromGroupParams, body: RemoveMembersFromGroupRequest): Promise<RemoveMembersFromGroupResponse> {\n return request<RemoveMembersFromGroupResponse>({\n method: 'DELETE',\n path: `/groups/${params.gid}/members`,\n body,\n });\n },\n\n /**\n * Add managers\n *\n * Adds a list of users to a given group as managers.\n *\n * @param params.gid - This is the ID of the group being modified.\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/addManagersToGroup\n */\n addManagersToGroup(params: AddManagersToGroupParams, body: AddManagersToGroupRequest): Promise<AddManagersToGroupResponse> {\n return request<AddManagersToGroupResponse>({\n method: 'POST',\n path: `/groups/${params.gid}/managers`,\n body,\n });\n },\n\n /**\n * Remove managers\n *\n * Removes a list of managers from a given group.\n *\n * @param params.gid - This is the ID of the group being modified.\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/removeManagersFromGroup\n */\n removeManagersFromGroup(params: RemoveManagersFromGroupParams, body: RemoveManagersFromGroupRequest): Promise<RemoveManagersFromGroupResponse> {\n return request<RemoveManagersFromGroupResponse>({\n method: 'DELETE',\n path: `/groups/${params.gid}/managers`,\n body,\n });\n },\n\n /**\n * Add child groups\n *\n * Adds a list of groups to a given group.\n *\n * @param params.gid - This is the ID of the group being modified.\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/addSubgroupsToGroup\n */\n addSubgroupsToGroup(params: AddSubgroupsToGroupParams, body: AddSubgroupsToGroupRequest): Promise<AddSubgroupsToGroupResponse> {\n return request<AddSubgroupsToGroupResponse>({\n method: 'POST',\n path: `/groups/${params.gid}/subgroups`,\n body,\n });\n },\n\n /**\n * Remove child groups\n *\n * Removes a list of groups from a given group.\n *\n * @param params.gid - This is the ID of the group being modified.\n *\n * @param body - Request body\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/removeSubgroupsFromGroup\n */\n removeSubgroupsFromGroup(params: RemoveSubgroupsFromGroupParams, body: RemoveSubgroupsFromGroupRequest): Promise<RemoveSubgroupsFromGroupResponse> {\n return request<RemoveSubgroupsFromGroupResponse>({\n method: 'DELETE',\n path: `/groups/${params.gid}/subgroups`,\n body,\n });\n },\n\n /**\n * Get audit logs\n *\n * Gathers the audit logs for a single day from a realm. By default, this API returns 10,000 entries. This can be changed with the numRows parameter. Integrators can iterate through batches to get an entire day's worth of logs. Each realm has a maximum entitlement of querying 1,000 days per year (allowing lookbacks for up to two years). Requests for paginated data do not count towards the annual limit. Transactional rate limits are 10 per 10 seconds. \n **Note:** This API is available for enterprise users only.\n *\n * @param body - Request body\n * @param body.nextToken - Token specifying start of page. For first page don't supply this. (optional)\n * @param body.numRows - Number of logs to return per page, default is 10000, minimum is 1000, max is 50000. (optional)\n * @param body.queryId - The query id of an audit log request. This id is needed to fetch subsequent paged results of a single query. (optional)\n * @param body.date - The date for which audit logs need to be fetched. This must be date-time only, as YYYY-MM-DD, and a valid date in the past. (optional)\n * @param body.topics - An array that may contain up to 20 [topics](https://resources.quickbase.com/nav/app/budurkasx/action/showpage/2b2941e4-f34d-4d41-9b0e-db790d20e9ab?pageIdV2=quickbase.com-DashboardGroup-15760d74-2243-4ce9-9495-7cc8790f12e7) to filter by. If empty, all topics are returned. (optional)\n *\n * @returns Query ran successfully and has returned the events for the given time period.\n *\n * @see https://developer.quickbase.com/operation/audit\n */\n audit(body: AuditRequest): Promise<AuditResponse> {\n return request<AuditResponse>({\n method: 'POST',\n path: '/audit',\n body,\n });\n },\n\n /**\n * Get read summaries\n *\n * Get user read and integration read summaries for any day in the past. \n **Note:** This API is available for enterprise users only.\n *\n * @param params.day - The date for which read summaries need to be fetched. This must be date-time only, as YYYY-MM-DD, and a valid date in the past. (optional)\n *\n * @returns Summaries returned succesfully\n *\n * @see https://developer.quickbase.com/operation/platformAnalyticReads\n */\n platformAnalyticReads(params: PlatformAnalyticReadsParams): Promise<PlatformAnalyticReadsResponse> {\n return request<PlatformAnalyticReadsResponse>({\n method: 'GET',\n path: '/analytics/reads',\n query: { day: params.day },\n });\n },\n\n /**\n * Get event summaries\n *\n * Get event summaries for any span of days up to one year and excluding future dates. \n **Note:** This API is available for enterprise users only. Data is updated hourly; to ensure accuracy, query dates should be at least one hour in the past. Transactional rate limits are 100 per hour.\n *\n * @param params.accountId - The ID of the account to query. If no value is specified, the first account matching the provided domain is chosen. (optional)\n *\n * @param body - Request body (optional)\n * @param body.start - The start date and time of the requested summaries in ISO 8601 time format.\n * @param body.end - The end date and time of the requested summaries in ISO 8601 time format.\n * @param body.groupBy - How the events should be grouped.\n * @param body.nextToken - A pagination token from a previous response. Used to fetch the next page. (optional)\n * @param body.where - A list of items to filter events by. Only events which match ALL criteria will be included in the results. (optional)\n *\n * @returns Event summaries returned succesfully\n *\n * @see https://developer.quickbase.com/operation/platformAnalyticEventSummaries\n */\n platformAnalyticEventSummaries(params: PlatformAnalyticEventSummariesParams, body?: PlatformAnalyticEventSummariesRequest): PaginatedRequest<PlatformAnalyticEventSummariesResponse> {\n const executor = () => {\n return request<PlatformAnalyticEventSummariesResponse>({\n method: 'POST',\n path: '/analytics/events/summaries',\n query: { accountId: params.accountId },\n body,\n });\n };\n const paginatedExecutor = (paginationParams: { skip?: number; nextPageToken?: string; nextToken?: string }) => {\n const bodyRecord = body as unknown as Record<string, unknown> | undefined;\n const paginatedBody = paginationParams.skip !== undefined || paginationParams.nextPageToken || paginationParams.nextToken\n ? {\n ...(bodyRecord || {}),\n options: {\n ...(bodyRecord?.options as Record<string, unknown> || {}),\n ...(paginationParams.skip !== undefined ? { skip: paginationParams.skip } : {}),\n },\n ...(paginationParams.nextPageToken ? { nextPageToken: paginationParams.nextPageToken } : {}),\n ...(paginationParams.nextToken ? { nextToken: paginationParams.nextToken } : {}),\n }\n : body;\n return request<PlatformAnalyticEventSummariesResponse>({\n method: 'POST',\n path: '/analytics/events/summaries',\n query: { accountId: params.accountId },\n body: paginatedBody,\n });\n };\n return createPaginatedRequest(executor, { paginatedExecutor, autoPaginate });\n },\n\n /**\n * Export a solution\n *\n * Returns the QBL for the specified solution. Learn more about [QBL syntax](https://help.quickbase.com/hc/en-us/articles/24845511223828-What-is-QBL). \n We are releasing schema coverage for QBL in stages. See [what's supported today](https://helpv2.quickbase.com/hc/en-us/articles/30119680754068-QBL-version-0-4-overview) in our QBL documentation.\n *\n * @param params.solutionId - The unique identifier of a solution\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/exportSolution\n */\n exportSolution(params: ExportSolutionParams): Promise<ExportSolutionResponse> {\n return request<ExportSolutionResponse>({\n method: 'GET',\n path: `/solutions/${params.solutionId}`,\n });\n },\n\n /**\n * Update a solution\n *\n * Updates the solution using the provided QBL. Learn more about [QBL syntax](https://help.quickbase.com/hc/en-us/articles/24845511223828-What-is-QBL). \n We are releasing schema coverage for QBL in stages. See [what's supported today](https://helpv2.quickbase.com/hc/en-us/articles/30119680754068-QBL-version-0-4-overview) in our QBL documentation.\n *\n * @param params.solutionId - The unique identifier of a solution\n *\n * @param body - The QBL to be used for the update. (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/updateSolution\n */\n updateSolution(params: UpdateSolutionParams, body?: UpdateSolutionRequest): Promise<UpdateSolutionResponse> {\n return request<UpdateSolutionResponse>({\n method: 'PUT',\n path: `/solutions/${params.solutionId}`,\n body,\n });\n },\n\n /**\n * Create a solution\n *\n * Creates a solution using the provided QBL. Learn more about [QBL syntax](https://help.quickbase.com/hc/en-us/articles/24845511223828-What-is-QBL). \n We are releasing schema coverage for QBL in stages. See [what's supported today](https://helpv2.quickbase.com/hc/en-us/articles/30119680754068-QBL-version-0-4-overview) in our QBL documentation.\n *\n * @param body - The QBL to be used for the create.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/createSolution\n */\n createSolution(body: CreateSolutionRequest): Promise<CreateSolutionResponse> {\n return request<CreateSolutionResponse>({\n method: 'POST',\n path: '/solutions',\n body,\n });\n },\n\n /**\n * Export solution to record\n *\n * Exports the solution and outputs the resulting QBL in a new record in the specified table. The QBL will be saved to a file in the file attachment field that is specified. The table cannot have any required fields besides the file attachment field. \n We are releasing schema coverage for QBL in stages. See [what's supported today](https://helpv2.quickbase.com/hc/en-us/articles/30119680754068-QBL-version-0-4-overview) in our QBL documentation.\n *\n * @param params.solutionId - The unique identifier of the solution.\n * @param params.tableId - The unique identifier (dbid) of the table.\n * @param params.fieldId - The unique identifier (fid) of the field. It needs to be a file attachment field.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/exportSolutionToRecord\n */\n exportSolutionToRecord(params: ExportSolutionToRecordParams): Promise<ExportSolutionToRecordResponse> {\n return request<ExportSolutionToRecordResponse>({\n method: 'GET',\n path: `/solutions/${params.solutionId}/torecord`,\n query: { tableId: params.tableId, fieldId: params.fieldId },\n });\n },\n\n /**\n * Create solution from record\n *\n * Creates a solution using the QBL from the specified record. \n We are releasing schema coverage for QBL in stages. See [what's supported today](https://helpv2.quickbase.com/hc/en-us/articles/30119680754068-QBL-version-0-4-overview) in our QBL documentation.\n *\n * @param params.tableId - The unique identifier (dbid) of the table.\n * @param params.fieldId - The unique identifier (fid) of the field. It needs to be a file attachment field.\n * @param params.recordId - The unique identifier of the record.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/createSolutionFromRecord\n */\n createSolutionFromRecord(params: CreateSolutionFromRecordParams): Promise<CreateSolutionFromRecordResponse> {\n return request<CreateSolutionFromRecordResponse>({\n method: 'GET',\n path: '/solutions/fromrecord',\n query: { tableId: params.tableId, fieldId: params.fieldId, recordId: params.recordId },\n });\n },\n\n /**\n * Update solution from record\n *\n * Updates a solution using the QBL from the specified record. \n We are releasing schema coverage for QBL in stages. See [what's supported today](https://helpv2.quickbase.com/hc/en-us/articles/30119680754068-QBL-version-0-4-overview) in our QBL documentation.\n *\n * @param params.solutionId - The unique identifier of the solution.\n * @param params.tableId - The unique identifier (dbid) of the table.\n * @param params.fieldId - The unique identifier (fid) of the field. It needs to be a file attachment field.\n * @param params.recordId - The unique identifier of the record.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/updateSolutionToRecord\n */\n updateSolutionToRecord(params: UpdateSolutionToRecordParams): Promise<UpdateSolutionToRecordResponse> {\n return request<UpdateSolutionToRecordResponse>({\n method: 'GET',\n path: `/solutions/${params.solutionId}/fromrecord`,\n query: { tableId: params.tableId, fieldId: params.fieldId, recordId: params.recordId },\n });\n },\n\n /**\n * List solution changes\n *\n * Returns a list of changes that would occur if the provided QBL were to be applied. Learn more about [QBL syntax](https://help.quickbase.com/hc/en-us/articles/24845511223828-What-is-QBL). \n We are releasing schema coverage for QBL in stages. See [what's supported today](https://helpv2.quickbase.com/hc/en-us/articles/30119680754068-QBL-version-0-4-overview) in our QBL documentation.\n *\n * @param params.solutionId - The unique identifier of the solution.\n *\n * @param body - The QBL to be used for the changeset.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/changesetSolution\n */\n changesetSolution(params: ChangesetSolutionParams, body: ChangesetSolutionRequest): Promise<ChangesetSolutionResponse> {\n return request<ChangesetSolutionResponse>({\n method: 'PUT',\n path: `/solutions/${params.solutionId}/changeset`,\n body,\n });\n },\n\n /**\n * List solution changes from record\n *\n * Returns a list of changes that would occur if the QBL from the provided record were to be applied. \n We are releasing schema coverage for QBL in stages. See [what's supported today](https://helpv2.quickbase.com/hc/en-us/articles/30119680754068-QBL-version-0-4-overview) in our QBL documentation.\n *\n * @param params.solutionId - The unique identifier of the solution.\n * @param params.tableId - The unique identifier (dbid) of the table.\n * @param params.fieldId - The unique identifier (fid) of the field. It needs to be a file attachment field.\n * @param params.recordId - The unique identifier of the record.\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/changesetSolutionFromRecord\n */\n changesetSolutionFromRecord(params: ChangesetSolutionFromRecordParams): Promise<ChangesetSolutionFromRecordResponse> {\n return request<ChangesetSolutionFromRecordResponse>({\n method: 'GET',\n path: `/solutions/${params.solutionId}/changeset/fromrecord`,\n query: { tableId: params.tableId, fieldId: params.fieldId, recordId: params.recordId },\n });\n },\n\n /**\n * Generate a document\n *\n * Generates a document from a template. This feature is only available on business or enterprise plans.\n *\n * @param params.templateId - This is the ID of document template.\n * @param params.tableId - The unique identifier of the table.\n * @param params.recordId - The ID of the record (optional)\n * @param params.filename - File name for the downloaded file\n * @param params.format - The format of the file that is returned. Default is \"pdf\". (optional)\n * @param params.margin - Margin formatted as top right bottom left, separated by spaces. Add to override the value set in the template builder. (optional)\n * @param params.unit - Unit of measurement for the margin. Default is \"in\". Add to override the value set in the template builder. (optional)\n * @param params.pageSize - Page size. Default is \"A4\". Add to override the value set in the template builder. (optional)\n * @param params.orientation - Page orientation. Default is \"portrait\". Add to override the value set in the template builder. (optional)\n * @param params.realm - Your Quickbase domain, for example demo.quickbase.com (optional)\n *\n * @returns Success\n *\n * @see https://developer.quickbase.com/operation/generateDocument\n */\n generateDocument(params: GenerateDocumentParams): Promise<GenerateDocumentResponse> {\n return request<GenerateDocumentResponse>({\n method: 'GET',\n path: `/docTemplates/${params.templateId}/generate`,\n query: { tableId: params.tableId, recordId: params.recordId, filename: params.filename, format: params.format, margin: params.margin, unit: params.unit, pageSize: params.pageSize, orientation: params.orientation, realm: params.realm },\n });\n },\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;ilBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,yBAAAE,EAAA,uBAAAC,EAAA,iBAAAC,EAAA,kBAAAC,EAAA,mBAAAC,EAAA,mBAAAC,EAAA,gBAAAC,EAAA,0BAAAC,EAAA,qBAAAC,EAAA,sBAAAC,EAAA,iBAAAC,EAAA,sBAAAC,EAAA,oBAAAC,EAAA,qBAAAC,EAAA,uBAAAC,EAAA,iBAAAC,GAAA,YAAAC,KCkLO,IAAMC,EAAiB,CAC5B,QAAS,+BACT,QAAS,IACT,MAAO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,GAAaC,EAA0C,CACrE,IAAMC,EAAiBC,EAAcF,CAAM,EACrCG,EAASC,EAAaH,EAAe,KAAK,EAE1CI,EAAc,CAClB,MAAOJ,EAAe,MACtB,QAASA,EAAe,QACxB,SAAUA,EAAe,SACzB,OAAAE,CACF,EAEMG,EAAOC,EAAmBN,EAAe,KAAMI,CAAW,EAC1DG,EAAWC,EAAeR,EAAe,iBAAiB,EAE1DS,EAAWC,EAAsB,CACrC,OAAQV,EACR,KAAAK,EACA,SAAAE,EACA,OAAAL,CACF,CAAC,EAKD,MAAO,CACL,GAHiBS,EAAiBF,EAAS,QAAST,EAAe,YAAY,EAI/E,QAASS,EAAS,QAClB,UAAW,IAAMT,CACnB,CACF,CAGA,IAAOY,GAAQd",
|
|
6
6
|
"names": ["index_exports", "__export", "AuthenticationError", "AuthorizationError", "NoOpThrottle", "NotFoundError", "QuickbaseError", "RateLimitError", "ServerError", "SlidingWindowThrottle", "SsoTokenStrategy", "TempTokenStrategy", "TimeoutError", "UserTokenStrategy", "ValidationError", "createApiMethods", "createAuthStrategy", "createClient", "index_default", "DEFAULT_CONFIG", "QuickbaseError", "_QuickbaseError", "message", "statusCode", "options", "__publicField", "RateLimitError", "rateLimitInfo", "AuthenticationError", "AuthorizationError", "NotFoundError", "ValidationError", "TimeoutError", "timeoutMs", "ServerError", "parseErrorResponse", "response", "requestUrl", "rayId", "body", "description", "retryAfter", "isRetryableError", "error", "Logger", "enabled", "prefix", "__publicField", "level", "message", "data", "error", "info", "method", "url", "durationMs", "attempt", "maxAttempts", "delayMs", "reason", "operation", "dbid", "target", "createLogger", "resolveConfig", "config", "validateConfig", "retry", "DEFAULT_CONFIG", "proactiveThrottle", "validateAuthConfig", "validateRetryConfig", "validateThrottleConfig", "auth", "throttle", "getRealmHostname", "realm", "ISO_DATE_PATTERN", "isIsoDateString", "value", "transformDates", "obj", "enabled", "item", "result", "key", "UserTokenStrategy", "userToken", "context", "__publicField", "_dbid", "token", "TokenCache", "defaultLifespanMs", "__publicField", "dbid", "entry", "token", "lifespanMs", "expiresAt", "ttl", "now", "TempTokenStrategy", "userToken", "context", "options", "__publicField", "TokenCache", "DEFAULT_CONFIG", "dbid", "cachedToken", "pendingFetch", "fetchPromise", "url", "headers", "response", "errorText", "AuthenticationError", "token", "error", "SsoTokenStrategy", "samlToken", "context", "options", "__publicField", "TokenCache", "DEFAULT_CONFIG", "_dbid", "cachedToken", "exchangePromise", "url", "body", "response", "errorText", "AuthenticationError", "token", "error", "createAuthStrategy", "authConfig", "context", "UserTokenStrategy", "TempTokenStrategy", "SsoTokenStrategy", "extractRateLimitInfo", "response", "requestUrl", "attempt", "retryAfter", "sleep", "ms", "resolve", "extractDbid", "options", "tableIdMatch", "appIdMatch", "body", "buildUrl", "baseUrl", "path", "query", "normalizedBase", "normalizedPath", "url", "key", "value", "buildHeaders", "auth", "realmHostname", "dbid", "customHeaders", "token", "authHeader", "executeSingleRequest", "executor", "context", "config", "throttle", "logger", "getRealmHostname", "headers", "fetchOptions", "controller", "timeoutId", "startTime", "response", "duration", "error", "TimeoutError", "handleResponse", "requestUrl", "rateLimitInfo", "extractRateLimitInfo", "RateLimitError", "parseErrorResponse", "executeRequest", "maxAttempts", "lastError", "attempt", "data", "transformDates", "isRetryableError", "QuickbaseError", "delayMs", "reason", "calculateBackoff", "sleep", "delay", "jitter", "createRequestExecutor", "requestOptions", "SlidingWindowThrottle", "requestsPer10Seconds", "__publicField", "now", "windowStart", "waitTime", "t", "ms", "resolve", "NoOpThrottle", "createThrottle", "config", "detectPaginationType", "metadata", "hasMorePages", "response", "paginationType", "currentCount", "nextToken", "findDataKey", "key", "isPaginatedResponse", "obj", "PaginatedRequest", "executor", "options", "__publicField", "onfulfilled", "onrejected", "limit", "initialSkip", "allRecords", "lastResponse", "currentSkip", "firstResponse", "dataKey", "firstPageData", "nextResponse", "tokenKey", "pageData", "remainingCapacity", "finalResponse", "createPaginatedRequest", "createApiMethods", "request", "autoPaginate", "body", "params", "createPaginatedRequest", "paginationParams", "bodyRecord", "paginatedBody", "createClient", "config", "resolvedConfig", "resolveConfig", "logger", "createLogger", "authContext", "auth", "createAuthStrategy", "throttle", "createThrottle", "executor", "createRequestExecutor", "createApiMethods", "index_default"]
|
|
7
7
|
}
|