@nivaro/sdk 0.1.16 → 0.1.17
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/bin/lib/ext-scaffold.mjs +220 -0
- package/bin/lib/graphql-codegen.mjs +737 -0
- package/bin/nivaro.mjs +150 -29
- package/dist/index.d.ts +33 -1
- package/dist/index.js +28 -0
- package/package.json +4 -2
package/bin/nivaro.mjs
CHANGED
|
@@ -2,20 +2,34 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* nivaro — the @nivaro/sdk command line.
|
|
4
4
|
*
|
|
5
|
-
* nivaro types [--url <api origin>] [--token <
|
|
5
|
+
* nivaro types [--url <api origin>] [--token <token>] [--out <file>] [--typed-client | --graphql]
|
|
6
|
+
* nivaro ext init <id> [--dir <extensions dir>]
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
-
* instance
|
|
8
|
+
* `types` writes TypeScript generated from the LIVE schema of a Nivaro
|
|
9
|
+
* instance: one interface per collection + a `Collections` name map, or with
|
|
9
10
|
* --typed-client the same file plus a thin typed wrapper over createNivaro().
|
|
11
|
+
* Those two read admin-only dev-tools endpoints (an admin static token, or an
|
|
12
|
+
* API key with the dev-tools scope).
|
|
10
13
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
+
* `types --graphql` introspects the GraphQL schema AS THE TOKEN'S USER and
|
|
15
|
+
* writes a standalone typed GraphQL client: list / byId / create / update /
|
|
16
|
+
* delete / aggregated / metadata per collection the user may see, with filter
|
|
17
|
+
* and selection types, plus a graphql(doc, variables) escape hatch.
|
|
18
|
+
*
|
|
19
|
+
* `ext init` scaffolds an extension written against @nivaro/extension-kit.
|
|
20
|
+
*
|
|
21
|
+
* The URL and token also come from NIVARO_URL / NIVARO_TOKEN.
|
|
14
22
|
*
|
|
15
23
|
* Exit codes: 0 written · 1 usage · 2 request failed.
|
|
16
24
|
*/
|
|
17
25
|
import { mkdirSync, writeFileSync } from 'node:fs'
|
|
18
|
-
import { dirname, resolve } from 'node:path'
|
|
26
|
+
import { dirname, relative, resolve } from 'node:path'
|
|
27
|
+
import { defaultExtensionsDir, validateExtensionId, writeScaffold } from './lib/ext-scaffold.mjs'
|
|
28
|
+
import {
|
|
29
|
+
accessFromPermissions,
|
|
30
|
+
generateGraphQLClient,
|
|
31
|
+
INTROSPECTION_QUERY
|
|
32
|
+
} from './lib/graphql-codegen.mjs'
|
|
19
33
|
|
|
20
34
|
const argv = process.argv.slice(2)
|
|
21
35
|
const cmd = argv[0]
|
|
@@ -30,19 +44,66 @@ const has = (name) => argv.includes(`--${name}`)
|
|
|
30
44
|
function usage(code = 1) {
|
|
31
45
|
process.stderr.write(
|
|
32
46
|
[
|
|
33
|
-
'Usage:
|
|
47
|
+
'Usage:',
|
|
48
|
+
' nivaro types [--url <api origin>] [--token <token>] [--out <file>] [--typed-client | --graphql]',
|
|
49
|
+
' nivaro ext init <id> [--dir <extensions dir>]',
|
|
34
50
|
'',
|
|
35
51
|
' --url API origin, e.g. https://cms.example.com (or NIVARO_URL)',
|
|
36
|
-
' --token
|
|
52
|
+
' --token Static token or API key (or NIVARO_TOKEN); admin / dev-tools scope',
|
|
53
|
+
' for the REST types, any user for --graphql',
|
|
37
54
|
' --out File to write; stdout when omitted',
|
|
38
55
|
' --typed-client Emit the typed createTypedNivaro() wrapper too',
|
|
56
|
+
" --graphql Emit a typed GraphQL client for the token's user",
|
|
57
|
+
' --dir Where `ext init` creates <id>/ (default api/extensions)',
|
|
39
58
|
''
|
|
40
59
|
].join('\n')
|
|
41
60
|
)
|
|
42
61
|
process.exit(code)
|
|
43
62
|
}
|
|
44
63
|
|
|
64
|
+
function fail(msg, code) {
|
|
65
|
+
process.stderr.write(`${msg}\n`)
|
|
66
|
+
process.exit(code)
|
|
67
|
+
}
|
|
68
|
+
|
|
45
69
|
if (!cmd || cmd === '--help' || cmd === '-h') usage(cmd ? 0 : 1)
|
|
70
|
+
|
|
71
|
+
if (cmd === 'ext') {
|
|
72
|
+
const sub = argv[1]
|
|
73
|
+
const id = argv[2]
|
|
74
|
+
if (sub !== 'init') {
|
|
75
|
+
process.stderr.write(sub ? `Unknown ext command "${sub}"\n\n` : '')
|
|
76
|
+
usage(1)
|
|
77
|
+
}
|
|
78
|
+
const bad = validateExtensionId(id)
|
|
79
|
+
if (bad) fail(bad, 1)
|
|
80
|
+
if (has('dir') && (!flag('dir') || flag('dir').startsWith('--')))
|
|
81
|
+
fail('--dir needs a directory path', 1)
|
|
82
|
+
const dir = has('dir') ? resolve(flag('dir')) : defaultExtensionsDir()
|
|
83
|
+
let result
|
|
84
|
+
try {
|
|
85
|
+
result = writeScaffold(id, dir)
|
|
86
|
+
} catch (err) {
|
|
87
|
+
fail(err instanceof Error ? err.message : String(err), 1)
|
|
88
|
+
}
|
|
89
|
+
const rel = (p) => relative(process.cwd(), p) || '.'
|
|
90
|
+
process.stderr.write(
|
|
91
|
+
[
|
|
92
|
+
`Created ${rel(result.target)}/`,
|
|
93
|
+
...result.written.map((f) => ` ${rel(f)}`),
|
|
94
|
+
result.hasTsconfig
|
|
95
|
+
? ''
|
|
96
|
+
: `\nNo tsconfig.json in ${rel(dir)} — type-check it from a project that includes the folder (api/extensions/tsconfig.json does).`,
|
|
97
|
+
'Next: restart the API so the loader picks it up, then run its test:',
|
|
98
|
+
` (cd api && npx vitest run extensions/${id})`,
|
|
99
|
+
''
|
|
100
|
+
]
|
|
101
|
+
.filter((l) => l !== '')
|
|
102
|
+
.join('\n') + '\n'
|
|
103
|
+
)
|
|
104
|
+
process.exit(0)
|
|
105
|
+
}
|
|
106
|
+
|
|
46
107
|
if (cmd !== 'types') {
|
|
47
108
|
process.stderr.write(`Unknown command "${cmd}"\n\n`)
|
|
48
109
|
usage(1)
|
|
@@ -59,17 +120,87 @@ if (!token) {
|
|
|
59
120
|
process.stderr.write('Missing --token (or NIVARO_TOKEN)\n')
|
|
60
121
|
usage(1)
|
|
61
122
|
}
|
|
123
|
+
if (has('graphql') && has('typed-client')) {
|
|
124
|
+
process.stderr.write('--graphql and --typed-client are separate outputs — pick one\n')
|
|
125
|
+
usage(1)
|
|
126
|
+
}
|
|
62
127
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
128
|
+
function write(text, summary) {
|
|
129
|
+
if (out) {
|
|
130
|
+
const file = resolve(out)
|
|
131
|
+
mkdirSync(dirname(file), { recursive: true })
|
|
132
|
+
writeFileSync(file, text, 'utf8')
|
|
133
|
+
process.stderr.write(`Wrote ${file} — ${summary}\n`)
|
|
134
|
+
} else {
|
|
135
|
+
process.stdout.write(text)
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
async function request(path, init) {
|
|
140
|
+
try {
|
|
141
|
+
return await fetch(`${url}${path}`, init)
|
|
142
|
+
} catch (err) {
|
|
143
|
+
fail(`Request failed: ${err instanceof Error ? err.message : String(err)}`, 2)
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (has('graphql')) {
|
|
148
|
+
// The schema is the same for everyone and introspection needs no sign-in, so
|
|
149
|
+
// the token is checked here: a refused token fails the command, and the
|
|
150
|
+
// caller's role decides which helpers are written.
|
|
151
|
+
const permsRes = await request('/api/security/my/permissions', {
|
|
152
|
+
headers: { authorization: `Bearer ${token}`, accept: 'application/json' }
|
|
68
153
|
})
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
154
|
+
const permsText = await permsRes.text()
|
|
155
|
+
let access = null
|
|
156
|
+
if (permsRes.status === 401 || permsRes.status === 403) {
|
|
157
|
+
let msg = permsText
|
|
158
|
+
try {
|
|
159
|
+
msg = JSON.parse(permsText)?.error ?? permsText
|
|
160
|
+
} catch {
|
|
161
|
+
/* plain body */
|
|
162
|
+
}
|
|
163
|
+
fail(`Token refused (HTTP ${permsRes.status}): ${String(msg).slice(0, 300)}`, 2)
|
|
164
|
+
} else if (permsRes.ok) {
|
|
165
|
+
try {
|
|
166
|
+
access = accessFromPermissions(JSON.parse(permsText)?.data ?? null)
|
|
167
|
+
} catch {
|
|
168
|
+
access = null
|
|
169
|
+
}
|
|
170
|
+
} else {
|
|
171
|
+
process.stderr.write(
|
|
172
|
+
`Could not read the token's permissions (HTTP ${permsRes.status}) — writing helpers for every collection\n`
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
const res = await request('/api/graphql', {
|
|
176
|
+
method: 'POST',
|
|
177
|
+
headers: {
|
|
178
|
+
authorization: `Bearer ${token}`,
|
|
179
|
+
'content-type': 'application/json',
|
|
180
|
+
accept: 'application/json'
|
|
181
|
+
},
|
|
182
|
+
body: JSON.stringify({ query: INTROSPECTION_QUERY, operationName: 'NivaroIntrospection' })
|
|
183
|
+
})
|
|
184
|
+
const text = await res.text()
|
|
185
|
+
let json = null
|
|
186
|
+
try {
|
|
187
|
+
json = JSON.parse(text)
|
|
188
|
+
} catch {
|
|
189
|
+
json = null
|
|
190
|
+
}
|
|
191
|
+
if (json?.errors?.length) fail(`GraphQL error: ${String(json.errors[0].message).slice(0, 300)}`, 2)
|
|
192
|
+
if (!res.ok || !json?.data?.__schema)
|
|
193
|
+
fail(`HTTP ${res.status}: ${String(json?.error ?? text).slice(0, 300)}`, 2)
|
|
194
|
+
const src = generateGraphQLClient(json.data.__schema, { source: url, access })
|
|
195
|
+
const collections = (src.match(/^ {4}[A-Za-z_$][\w$]*: \{$/gm) ?? []).length
|
|
196
|
+
write(src, `${collections} collection(s)`)
|
|
197
|
+
process.exit(0)
|
|
72
198
|
}
|
|
199
|
+
|
|
200
|
+
const path = has('typed-client') ? '/api/dev-tools/typed-client.ts' : '/api/dev-tools/types.ts'
|
|
201
|
+
const res = await request(path, {
|
|
202
|
+
headers: { authorization: `Bearer ${token}`, accept: 'text/plain' }
|
|
203
|
+
})
|
|
73
204
|
const text = await res.text()
|
|
74
205
|
if (!res.ok) {
|
|
75
206
|
let msg = text
|
|
@@ -78,16 +209,6 @@ if (!res.ok) {
|
|
|
78
209
|
} catch {
|
|
79
210
|
/* plain body */
|
|
80
211
|
}
|
|
81
|
-
|
|
82
|
-
process.exit(2)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (out) {
|
|
86
|
-
const file = resolve(out)
|
|
87
|
-
mkdirSync(dirname(file), { recursive: true })
|
|
88
|
-
writeFileSync(file, text, 'utf8')
|
|
89
|
-
const interfaces = (text.match(/^export interface /gm) ?? []).length
|
|
90
|
-
process.stderr.write(`Wrote ${file} — ${interfaces} interface(s)\n`)
|
|
91
|
-
} else {
|
|
92
|
-
process.stdout.write(text)
|
|
212
|
+
fail(`HTTP ${res.status}: ${String(msg).slice(0, 300)}`, 2)
|
|
93
213
|
}
|
|
214
|
+
write(text, `${(text.match(/^export interface /gm) ?? []).length} interface(s)`)
|
package/dist/index.d.ts
CHANGED
|
@@ -5909,6 +5909,38 @@ declare function aggregateItems(collection: string, query: AggregateQuery): Comm
|
|
|
5909
5909
|
declare function readItem<T = Record<string, unknown>>(collection: string, id: string | number): Command<{
|
|
5910
5910
|
data: T;
|
|
5911
5911
|
}>;
|
|
5912
|
+
/** One read inside {@link readMany}. Without `id` it is a list read. */
|
|
5913
|
+
interface BatchRead<T = Record<string, unknown>> {
|
|
5914
|
+
/** Echoed on the result so a caller can match answers to reads; defaults to the index. */
|
|
5915
|
+
key?: string;
|
|
5916
|
+
collection: string;
|
|
5917
|
+
id?: string | number;
|
|
5918
|
+
/** The list read's query (ignored on a single-record read except `fields`). */
|
|
5919
|
+
query?: Query<T> & {
|
|
5920
|
+
conditions?: unknown[];
|
|
5921
|
+
};
|
|
5922
|
+
}
|
|
5923
|
+
/** The answer to one read: its own status, never the whole batch's. */
|
|
5924
|
+
interface BatchReadResult<T = Record<string, unknown>> {
|
|
5925
|
+
key: string;
|
|
5926
|
+
status: number;
|
|
5927
|
+
/** A record (single read) or the page of records (list read). */
|
|
5928
|
+
data?: T | T[];
|
|
5929
|
+
/** A list read's paging facts (`total`, `limit`, `offset`, `next_cursor`, …). */
|
|
5930
|
+
meta?: Record<string, unknown>;
|
|
5931
|
+
error?: string;
|
|
5932
|
+
code?: string;
|
|
5933
|
+
}
|
|
5934
|
+
/** The most reads one {@link readMany} call carries. */
|
|
5935
|
+
declare const READ_MANY_MAX = 20;
|
|
5936
|
+
/**
|
|
5937
|
+
* Several reads in one round trip (`POST /items/batch-read`, at most 20). Each
|
|
5938
|
+
* runs as the caller exactly as its own GET would, and answers its own status —
|
|
5939
|
+
* a forbidden or missing record never fails the others. Writes never batch.
|
|
5940
|
+
*/
|
|
5941
|
+
declare function readMany<T = Record<string, unknown>>(reads: BatchRead<T>[]): Command<{
|
|
5942
|
+
results: BatchReadResult<T>[];
|
|
5943
|
+
}>;
|
|
5912
5944
|
declare function createItem<T = Record<string, unknown>>(collection: string, data: Partial<T>): Command<{
|
|
5913
5945
|
data: T;
|
|
5914
5946
|
}>;
|
|
@@ -7160,4 +7192,4 @@ declare function submitFormItem(collection: string, values: Record<string, unkno
|
|
|
7160
7192
|
data: Record<string, unknown>;
|
|
7161
7193
|
}>;
|
|
7162
7194
|
|
|
7163
|
-
export { type AccessAudit, type AccessAuditFinding, type AccessAuditRun, type AccessAuditSubject, type AccessReason, type ActivityEntry, type ActivityQuery, type ActivityReportQuery, type ActivityReportRow, type ActivityReportSummary, type Addendum, type AddendumStatus, type AggregateQuery, type AggregateRow, type AiChatTraceEntry, type AiCollectionSettings, type AiColumnMapping, type AiDuplicateMatch, type AiQueryFilter, type AiQueryResult, type AiReviewFinding, type AiViolation, type AlertDefinition, type AlertLogEntry, type AlertSubscription, type AnomalyDefinition, type AnomalyRule, type ApiAnalyticsBucket, type ApiAnalyticsCollection, type ApiAnalyticsPath, type ApiAnalyticsSummary, type ApiErrorLog, type ApiKey, type ApiKeyScope, type ApprovalBrief, type ApprovalChain, type ApprovalChainStep, type ApprovalDecision, type ApprovalInstance, type ApprovalInstanceDetail, type ApprovalStatus, type ApprovalStepInput, type AtRiskCondition, type AtRiskOp, type AtRiskResult, type AtRiskRule, type AtRiskSummaryEntry, type AttributeDefinition, type AttributeValue, type BlackoutDate, type BoolFilterOps, type CMSCollection, type CascadeFilterRule, type ChangeOrder, type ChatChannel, type ChatChannelMember, type ChatDirectoryChannel, type ChatMessage, type ChatPin, type ChatReaction, type ChatRoomKind, type ChatRoomSummary, type ChatRoomType, type ChatSearchHit, type CollectionLayout, type CollectionPresetSummary, type Command, type Comment, type ConfigSnapshot, type ConfigTableClassification, type ContentBundle, type ContentExportFormat, type ContentExportOptions, type CoverageGapItem, type CoverageGapOwner, type CoverageGapReport, type CronJob, type CustomQuery, type DataQualityRule, type DataQualityRuleResult, type DataQualityRuleType, type DataQualityRun, type DataQualitySeverity, type DeadLetter, type DraftPublishConfig, type DraftStatus, type DryRunReport, type ErpSubmission, type ErpSubmissionStatus, type ExtensionManifest, type ExternalApi, type ExternalApiEndpoint, type ExternalApiSchema, type ExternalApiSlotContext, type ExternalApiSpecImportResult, type ExternalApiTestResult, type FieldChangeEntry, type FieldCondition, type FieldConfig, type FieldDependencyConfig, type FieldFilter, type FieldGroup, type FieldTranslations, type FieldVisibilityRules, type FieldWatch, type FileRecord, type FileUploadResult, type FileUsageEntry, type Filter, type FlowReplayResult, type FlowRun, type FlowTestStep, type FormFieldDescriptor, type FormFieldRelation, type FormGroupDescriptor, type FormLockCondition, type FormSchema, type FormValidationRule, type FormVisibilityRule, type GlobalSearchRecord, type GlobalSearchResults, type GraphQLResponse, type HierarchyConfigDef, type HierarchyFlatNode, type HierarchyLevelDef, type HierarchyNestedNode, type IDFilterOps, type ISODate, type ImportDefinition, type ImportJob, type ImportParseResponse, type ImportPreview, type ImportPreviewDiff, type ImportTemplateSummary, type InstanceOwner, type IntegrationApiHealth, type InternalWidget, type Issue, type IssueSeverity, type IssueStatus, type IssueSummary, type ItemLock, type LastTouch, type LayoutAssignment, type LayoutGroup, type LayoutVersion, type ListResponse, type ManagedUser, type MetricAlertRule, type MetricAlertSubscription, type MetricDefinition, type MyTask, type MyWorkOwnedEntry, type MyWorkSla, type MyWorkSummary, type NivaroClient, type NivaroClientOptions, type NivaroExtensionPlugin, type NivaroRealtime, type NivaroRuntime, type NotificationItem, type NotificationPage, type NotificationSubscription, type NumberFilterOps, type OmniSearchHit, type OnlinePresenceConfig, type OnlinePresenceUser, type Page, type PageLayout, type PageSlotKey, type PageWidget, type PdfTemplate, type PermissionSimulation, type PersistedQuery, type PickerExclusionStatus, type PipelineFlowEdge, type PipelineFlowState, type PipelineImpactResult, type PipelineOwnerGroup, type PipelineOwnerGroupUser, type PipelineSimulation, type PipelineState, type PipelineVersionEntry, type PluginSlots, type Policy, type PreflightCheck, type PreflightReport, type PreflightSeverity, type PresenceClient, type PresenceOptions, type PresenceSession, type PresenceSessionInfo, type PresenceViewer, type PromotionApplyResult, type PromotionPreview, type Query, type Queue, type QueueColumnPrefs, type QueueCondition, type QueueDetail, type QueueDisplayConfig, type QueueItem, type QueueItemsResult, type QueueOwner, type QueueRowClickMode, type QueueScope, type QueueSource, type QueueSourceType, type QueueStats, type QueueTrendPoint, type QueueView, type QueueViewKind, type QueueWorkloadRow, type RealtimeEvent, type RecordGraphEdge, type RecordGraphNode, type RecordLink, type RecordLinkType, type RecordTemplate, type RecordViewRecap, type RegisteredAction, type RelatedCommentEntry, type RelationFilter, type RelationOption, type ReportAlert, type ReportAlertCondition, type ReportAlertLogEntry, type ReportAnnotation, type ReportColumnFormat, type ReportDateRange, type ReportDef, type ReportEntityFilter, type ReportFilterPreset, type ReportQueryColumn, type ReportQueryWidgetConfig, type ReportSnapshotEntry, type ReportSubscription, type ReportTemplateEntry, type ReportVersionEntry, type ReportWidget, type ReportWidgetConfig, type ReportWidgetData, type ReportWidgetPreset, type ReportWidgetType, type RequestTrace, type ResolvedOwner, type RetentionPolicy, type RetentionRun, type RetentionRunResult, type Revision, type Role, type Rule, type SavedView, type ScheduledChange, type ScheduledReport, type ScopeDimension, type ScopeDimensionInfo, type SemanticSearchMatch, type SessionRecording, type ShareLink, type SlaBatchStatus, type SlaRule, type SlaStatus, type StagedImportRun, type StagedImportStats, type StringFilterOps, type SubRow, type SubRowTemplate, type SyncJob, type Task, type TaskDoneWhenRule, type TaskPriority, type TaskStatus, type TimelineEvent, type TraceSpan, type TreeFlatNode, type TreeNestedNode, type TreeNodeConfig, type TreePermission, type TreePermissionAction, type UUID, type UserActivityEntry, type UserActivitySummary, type UserScopesInfo, type ViewSubscription, type VirtualCollection, type Webhook, type WebhookDelivery, type WidgetFeed, type WorkflowBinding, type WorkflowHistoryEntry, type WorkflowInstance, type WorkflowInstanceData, type WorkflowState, type WorkflowTransition, type Workspace, type WorkspaceQuotas, type WorkspaceTemplate, type WorkspaceUsage, _and, _contains, _ends_with, _eq, _gt, _gte, _in, _lt, _lte, _ncontains, _neq, _nin, _nnull, _none, _null, _or, _some, _starts_with, acquireItemLock, activateLayout, addChatChannelMember, addInstanceOwner, addSubRow, aggregateItems, aiBrief, aiBuildReport, aiChat, aiCheckDuplicates, aiGenerate, aiMapColumns, aiQuery, aiReportFilters, aiReview, aiSummarize, aiValidate, appendSessionRecordingEvents, applyContentBundle, applyRecordTemplate, applySubRowTemplate, approveAddendum, approveAiProposal, asc, backupExportPath, batchPickerExclusionStatus, bulkPickerExclusion, callExternalApi, callExternalApiEndpoint, cancelScheduledChange, cancelStagedImport, cascadeFieldDependencies, checkBlackoutDate, claimQueueItem, claimTask, clearTraces, cloneItem, cloneLayout, cloneReport, compareConfigSnapshot, completeTask, copyReportWidget, createAccessAudit, createAddendum, createAlertDefinition, createAlertSubscription, createAnomalyRule, createApiKey, createApprovalChain, createAtRiskRule, createAttributeDefinition, createBlackoutDate, createChatChannel, createChatRoomType, createCollectionLayout, createComment, createDataQualityRule, createExternalApi, createExternalApiEndpoint, createFieldGroup, createFieldWatch, createGroupDm, createHierarchyConfig, createImportDefinition, createImportJob, createImportJobFromUrl, createInternalWidget, createIssue, createItem, createMetricAlertRule, createNivaro, createNotification, createNotificationSubscription, createPage, createPdfTemplate, createPersistedQuery, createPresence, createQueue, createQueueView, createRealtime, createRecordLink, createRecordTemplate, createReport, createReportAlert, createReportAnnotation, createReportFromTemplate, createReportSnapshot, createReportWidgetPreset, createRetentionPolicy, createRole, createRolePolicy, createRule, createSavedView, createScheduledChange, createScheduledReport, createShareLink, createSlaRule, createSubRowTemplate, createSyncJob, createTask, createTreePermission, createUser, createViewSubscription, createVirtualCollection, createWebhook, createWidgetFeed, createWorkspace, createWorkspaceTemplate, decideApproval, deleteAccessAudit, deleteAddendum, deleteAlertDefinition, deleteAlertSubscription, deleteAnomalyRule, deleteApiKey, deleteApprovalChain, deleteAtRiskRule, deleteAttributeDefinition, deleteBlackoutDate, deleteChatMessage, deleteCollectionLayout, deleteComment, deleteDataQualityRule, deleteExternalApi, deleteExternalApiEndpoint, deleteExternalApiSchema, deleteFieldGroup, deleteFieldTranslations, deleteFieldWatch, deleteFile, deleteHierarchyConfig, deleteImportJob, deleteInternalWidget, deleteIssue, deleteItem, deleteMetricAlertRule, deleteNotification, deleteNotificationSubscription, deletePage, deletePdfTemplate, deletePersistedQuery, deleteQueue, deleteQueueView, deleteRecordLink, deleteRecordTemplate, deleteReport, deleteReportAlert, deleteReportAnnotation, deleteReportFilterPreset, deleteReportSnapshot, deleteReportTemplate, deleteReportWidgetPreset, deleteRetentionPolicy, deleteRole, deleteRolePolicy, deleteRule, deleteSavedView, deleteScheduledReport, deleteSessionRecording, deleteSlaRule, deleteSubRow, deleteSubRowTemplate, deleteSyncJob, deleteTask, deleteTreePermission, deleteUser, deleteViewSubscription, deleteVirtualCollection, deleteWebhook, deleteWidgetFeed, deleteWorkspace, deleteWorkspaceTemplate, deployImportProcedure, desc, disableTwoFactor, drillReportRow, editChatMessage, endSessionRecording, evaluateAlerts, evaluateAtRisk, evaluateFieldDefaults, evaluateFieldLock, evaluateFieldRules, evaluateFieldVisibility, excludeFromPicker, executeBulkAction, executeCustomQuery, executeImportTemplate, executeItemAction, executeScheduledChange, explainRecordAccess, explainReportTrend, exportBlueprint, exportConfigSnapshot, exportContent, exportContentBundle, exportSchemaSnapshot, fetchFormSchema, fileDownloadPath, fileTransformPath, generateToken, generateUserToken, getAlertDefinition, getAttributeValues, getBrunoCollection, getExternalApi, getExternalApiEndpoint, getFieldTranslations, getFlowRun, getLocales, getOpenApi, getPickerExclusionStatus, getPostmanCollection, getPresence, getRetentionPolicy, getSlaRule, getSlaStatus, getTranslations, getTypes, getWebhook, globalSearch, heartbeatItemLock, importExternalApiSpec, importSchemaSnapshot, includeInPicker, installBlueprint, installCollectionPreset, invokeInternalWidgetAction, isPageSlot, joinChatRoom, leaveChatRoom, listAccessAuditRuns, listAccessAudits, listActiveAtRiskRules, listActivePresence, listAddendums, listAlertDefinitions, listAlertSubscriptions, listAllNotificationSubscriptions, listAnomalyDefinitions, listAnomalyRules, listApiKeys, listApprovalChains, listApprovalInstances, listAtRiskRules, listAttributeDefinitions, listBlackoutDates, listBulkActions, listChangeOrders, listChatChannelMembers, listChatMessages, listChatPins, listChatRoles, listChatRoomTypes, listChatRooms, listCollectionPresets, listCollectionRecordTemplates, listComments, listCronJobs, listCustomQueries, listDataQualityRules, listDataQualityRuns, listDeadLetters, listExternalApiEndpoints, listExternalApiSchemas, listExternalApis, listFieldGroups, listFieldWatches, listFiles, listFlowRuns, listHierarchyConfigs, listImportDefinitionVersions, listImportDefinitions, listImportJobs, listImportTemplates, listInternalWidgets, listIssues, listItemActions, listItemScheduledChanges, listLayoutVersions, listMetricAlertRules, listMetricAlertSubscriptions, listMetricDefinitions, listMyTasks, listNotificationSubscriptions, listNotifications, listOrphanFiles, listPages, listPdfTemplates, listPersistedQueries, listPinnedItems, listPipelineVersions, listQueueViews, listQueues, listRecordLinks, listRecordTemplates, listRegisteredExtensions, listRegisteredFlowOperations, listRegisteredFlowTriggers, listRelatedComments, listReportAlerts, listReportAnnotations, listReportFilterPresets, listReportSnapshots, listReportTemplates, listReportVersions, listReportWidgetPresets, listReports, listRequestedTasks, listRetentionPolicies, listRetentionRuns, listRolePolicies, listRoleUsers, listRoles, listRules, listSavedViews, listScheduledChanges, listScheduledReports, listScopeDimensions, listSessionRecordings, listShareLinks, listSlaRules, listStagedImports, listSubRowTemplates, listSubRows, listSyncJobs, listTasks, listTeamTasks, listThroughputCollections, listTraces, listTreePermissions, listViewSubscriptions, listVirtualCollections, listWebhookDeliveries, listWebhooks, listWidgetFeeds, listWorkspaceTemplates, listWorkspaces, markAllNotificationsRead, markChatRoomRead, markNotificationRead, markNotificationsRead, moveTreeNode, nudgeTask, omniSearch, presignFileUpload, previewContentBundle, previewImportJob, previewReportWidget, publishItem, queryVirtualCollection, readAccessAuditFindings, readActiveLayout, readActivity, readActivityReportSummary, readAddendum, readAiSettings, readAlertLog, readAllStateOwners, readAnomalyLog, readApiAnalyticsErrors, readApiAnalyticsSummary, readApiAnalyticsTimeseries, readApiAnalyticsTopCollections, readApiAnalyticsTopPaths, readApiKey, readApprovalBrief, readApprovalChain, readAtRiskSummary, readBackupManifest, readChatConfig, readChatDirectory, readChatPeerRead, readCollection, readCollectionLayout, readCollectionLayouts, readCollections, readConfigInventory, readCoverageGaps, readDataQualityRun, readDetailLayout, readDistinctValues, readDraftPublishConfig, readErpSubmissionHistory, readFieldChangeHistory, readFieldConfig, readFieldImpact, readFieldWatch, readFileMeta, readFileUsage, readHierarchyConfig, readHierarchyNodeAncestors, readHierarchyNodeChildren, readHierarchyNodes, readHierarchyTree, readImportJob, readImportProcedure, readInstanceOwners, readIntegrationHealth, readInternalWidget, readIssue, readIssueSummary, readItem, readItemLock, readItemLockConfig, readItems, readLastTouch, readLayoutAssignments, readLayoutGroups, readMe, readMetricAlertLog, readMyScopes, readMyWork, readNotificationCount, readNotificationSubscriptionStats, readOnlinePresence, readOwnerGroups, readPage, readPageWidgetData, readPdfTemplate, readPersistedQuery, readPipelineFlowMap, readPipelineReplay, readPipelineTemplate, readPipelineTemplates, readPipelineVersion, readPreflight, readQueue, readQueueCollectionStates, readQueueColumnPrefs, readQueueItems, readQueueTrends, readQueueWorkload, readRecordGraph, readRelationOptions, readReport, readReportAlertLog, readReportAlertsLog, readReportFilterOptions, readReportFiring, readReportSnapshot, readReportSubscription, readReportUsage, readReportWidgetData, readRevision, readRevisions, readRole, readScopeDimensionCoverage, readSessionRecordingEvents, readSettings, readSingleton, readSlaStatusBatch, readStagedImport, readStagedImportStats, readStateOwnerGroups, readStateOwners, readStateOwnersBatch, readSyncJob, readTask, readTaskCounts, readTaskHistory, readThroughputReport, readTimeline, readTrace, readTreeAncestors, readTreeChildren, readTreeConfig, readTreeDescendants, readTreeNested, readTreeNodes, readTwoFactorStatus, readUnreadNotificationCount, readUser, readUserActivity, readUserActivitySummary, readUserCard, readUserScopes, readUsers, readWorkflowBindings, readWorkflowInstance, readWorkflowInstances, readWorkspace, readWorkspaceUsage, rebuildTreePaths, rehearseCreateItem, reindexSemanticSearch, rejectAddendum, rejectAiProposal, releaseItemLock, releaseQueueItem, rematerializeQueue, removeChatChannelMember, removeInstanceOwner, renderInternalWidget, renderPdfTemplate, reorderFieldGroups, reorderSubRows, reorderTreeSiblings, replaceSubRows, replayActivityEvent, replayFlow, reportClientError, requestRecordAccess, requeueStagedImport, resetReportCache, resolveReportAlert, restoreImportDefinitionVersion, restoreLayoutVersion, restorePipelineVersion, restoreReportVersion, retryDeadLetter, retryErpSubmission, retryWebhookDelivery, revokeApiKey, revokeShareLink, revokeToken, revokeUserToken, rollbackRevision, rotateWidgetFeedToken, runAccessAudit, runActivityReport, runActivityReportCsv, runCronJob, runDataQuality, runRetentionPolicy, runScheduledReport, runSyncJob, saveMyScopeDefaults, saveReportFilterPreset, saveReportTemplate, saveReportWidgets, saveUserScope, searchChatMessages, semanticSearch, sendBulkNotification, sendChatMessage, sendTestMail, sessionRecordingEnabled, setMyDelegate, setQueueDefaultView, setReportSubscription, setTranslations, setupTwoFactor, simulatePermissions, simulatePipeline, simulatePipelineImpact, startApproval, startMasquerade, startSessionRecording, startWorkflow, stopMasquerade, submitAddendum, submitFormItem, submitItemForReview, submitToErp, subscribeFieldWatch, subscribeMetricAlert, suggestImportValidation, suggestQueueLabels, switchWorkspace, testExternalApi, testFlow, testWebhook, toggleChatPin, toggleChatReaction, togglePinnedItem, toggleReportAlert, touchRecordView, transitionWorkflow, unpublishItem, unsubscribeFieldWatch, unsubscribeMetricAlert, updateAccessAudit, updateAddendum, updateAiSettings, updateAlertDefinition, updateAnomalyLogEntry, updateAnomalyRule, updateApiKey, updateApprovalChain, updateAtRiskRule, updateAttributeDefinition, updateAttributeValues, updateChatChannel, updateChatRoom, updateChatRoomType, updateCollectionLayout, updateComment, updateDataQualityRule, updateDraftPublishConfig, updateErpSubmissionStatus, updateExternalApi, updateExternalApiEndpoint, updateFieldConfig, updateFieldGroup, updateFieldWatch, updateFileMeta, updateHierarchyConfig, updateImportDefinition, updateInternalWidget, updateIssue, updateItem, updateItemLockConfig, updateLayoutAssignments, updateLayoutUngroupedSort, updateMe, updateMetricAlertRule, updateMetricAlertSubscription, updateNotificationSubscription, updatePage, updatePdfTemplate, updatePersistedQuery, updateQueue, updateQueueSources, updateQueueView, updateRecordTemplate, updateReport, updateReportAlert, updateReportWidgetPreset, updateRetentionPolicy, updateRole, updateRolePolicy, updateRoleUiPermissions, updateRule, updateSavedView, updateScheduledReport, updateSettings, updateSingleton, updateSlaRule, updateSyncJob, updateTask, updateTreePermission, updateUser, updateVirtualCollection, updateWebhook, updateWidgetFeed, updateWorkflowBinding, updateWorkspace, validateVirtualCollectionSql, verifyTwoFactor };
|
|
7195
|
+
export { type AccessAudit, type AccessAuditFinding, type AccessAuditRun, type AccessAuditSubject, type AccessReason, type ActivityEntry, type ActivityQuery, type ActivityReportQuery, type ActivityReportRow, type ActivityReportSummary, type Addendum, type AddendumStatus, type AggregateQuery, type AggregateRow, type AiChatTraceEntry, type AiCollectionSettings, type AiColumnMapping, type AiDuplicateMatch, type AiQueryFilter, type AiQueryResult, type AiReviewFinding, type AiViolation, type AlertDefinition, type AlertLogEntry, type AlertSubscription, type AnomalyDefinition, type AnomalyRule, type ApiAnalyticsBucket, type ApiAnalyticsCollection, type ApiAnalyticsPath, type ApiAnalyticsSummary, type ApiErrorLog, type ApiKey, type ApiKeyScope, type ApprovalBrief, type ApprovalChain, type ApprovalChainStep, type ApprovalDecision, type ApprovalInstance, type ApprovalInstanceDetail, type ApprovalStatus, type ApprovalStepInput, type AtRiskCondition, type AtRiskOp, type AtRiskResult, type AtRiskRule, type AtRiskSummaryEntry, type AttributeDefinition, type AttributeValue, type BatchRead, type BatchReadResult, type BlackoutDate, type BoolFilterOps, type CMSCollection, type CascadeFilterRule, type ChangeOrder, type ChatChannel, type ChatChannelMember, type ChatDirectoryChannel, type ChatMessage, type ChatPin, type ChatReaction, type ChatRoomKind, type ChatRoomSummary, type ChatRoomType, type ChatSearchHit, type CollectionLayout, type CollectionPresetSummary, type Command, type Comment, type ConfigSnapshot, type ConfigTableClassification, type ContentBundle, type ContentExportFormat, type ContentExportOptions, type CoverageGapItem, type CoverageGapOwner, type CoverageGapReport, type CronJob, type CustomQuery, type DataQualityRule, type DataQualityRuleResult, type DataQualityRuleType, type DataQualityRun, type DataQualitySeverity, type DeadLetter, type DraftPublishConfig, type DraftStatus, type DryRunReport, type ErpSubmission, type ErpSubmissionStatus, type ExtensionManifest, type ExternalApi, type ExternalApiEndpoint, type ExternalApiSchema, type ExternalApiSlotContext, type ExternalApiSpecImportResult, type ExternalApiTestResult, type FieldChangeEntry, type FieldCondition, type FieldConfig, type FieldDependencyConfig, type FieldFilter, type FieldGroup, type FieldTranslations, type FieldVisibilityRules, type FieldWatch, type FileRecord, type FileUploadResult, type FileUsageEntry, type Filter, type FlowReplayResult, type FlowRun, type FlowTestStep, type FormFieldDescriptor, type FormFieldRelation, type FormGroupDescriptor, type FormLockCondition, type FormSchema, type FormValidationRule, type FormVisibilityRule, type GlobalSearchRecord, type GlobalSearchResults, type GraphQLResponse, type HierarchyConfigDef, type HierarchyFlatNode, type HierarchyLevelDef, type HierarchyNestedNode, type IDFilterOps, type ISODate, type ImportDefinition, type ImportJob, type ImportParseResponse, type ImportPreview, type ImportPreviewDiff, type ImportTemplateSummary, type InstanceOwner, type IntegrationApiHealth, type InternalWidget, type Issue, type IssueSeverity, type IssueStatus, type IssueSummary, type ItemLock, type LastTouch, type LayoutAssignment, type LayoutGroup, type LayoutVersion, type ListResponse, type ManagedUser, type MetricAlertRule, type MetricAlertSubscription, type MetricDefinition, type MyTask, type MyWorkOwnedEntry, type MyWorkSla, type MyWorkSummary, type NivaroClient, type NivaroClientOptions, type NivaroExtensionPlugin, type NivaroRealtime, type NivaroRuntime, type NotificationItem, type NotificationPage, type NotificationSubscription, type NumberFilterOps, type OmniSearchHit, type OnlinePresenceConfig, type OnlinePresenceUser, type Page, type PageLayout, type PageSlotKey, type PageWidget, type PdfTemplate, type PermissionSimulation, type PersistedQuery, type PickerExclusionStatus, type PipelineFlowEdge, type PipelineFlowState, type PipelineImpactResult, type PipelineOwnerGroup, type PipelineOwnerGroupUser, type PipelineSimulation, type PipelineState, type PipelineVersionEntry, type PluginSlots, type Policy, type PreflightCheck, type PreflightReport, type PreflightSeverity, type PresenceClient, type PresenceOptions, type PresenceSession, type PresenceSessionInfo, type PresenceViewer, type PromotionApplyResult, type PromotionPreview, type Query, type Queue, type QueueColumnPrefs, type QueueCondition, type QueueDetail, type QueueDisplayConfig, type QueueItem, type QueueItemsResult, type QueueOwner, type QueueRowClickMode, type QueueScope, type QueueSource, type QueueSourceType, type QueueStats, type QueueTrendPoint, type QueueView, type QueueViewKind, type QueueWorkloadRow, READ_MANY_MAX, type RealtimeEvent, type RecordGraphEdge, type RecordGraphNode, type RecordLink, type RecordLinkType, type RecordTemplate, type RecordViewRecap, type RegisteredAction, type RelatedCommentEntry, type RelationFilter, type RelationOption, type ReportAlert, type ReportAlertCondition, type ReportAlertLogEntry, type ReportAnnotation, type ReportColumnFormat, type ReportDateRange, type ReportDef, type ReportEntityFilter, type ReportFilterPreset, type ReportQueryColumn, type ReportQueryWidgetConfig, type ReportSnapshotEntry, type ReportSubscription, type ReportTemplateEntry, type ReportVersionEntry, type ReportWidget, type ReportWidgetConfig, type ReportWidgetData, type ReportWidgetPreset, type ReportWidgetType, type RequestTrace, type ResolvedOwner, type RetentionPolicy, type RetentionRun, type RetentionRunResult, type Revision, type Role, type Rule, type SavedView, type ScheduledChange, type ScheduledReport, type ScopeDimension, type ScopeDimensionInfo, type SemanticSearchMatch, type SessionRecording, type ShareLink, type SlaBatchStatus, type SlaRule, type SlaStatus, type StagedImportRun, type StagedImportStats, type StringFilterOps, type SubRow, type SubRowTemplate, type SyncJob, type Task, type TaskDoneWhenRule, type TaskPriority, type TaskStatus, type TimelineEvent, type TraceSpan, type TreeFlatNode, type TreeNestedNode, type TreeNodeConfig, type TreePermission, type TreePermissionAction, type UUID, type UserActivityEntry, type UserActivitySummary, type UserScopesInfo, type ViewSubscription, type VirtualCollection, type Webhook, type WebhookDelivery, type WidgetFeed, type WorkflowBinding, type WorkflowHistoryEntry, type WorkflowInstance, type WorkflowInstanceData, type WorkflowState, type WorkflowTransition, type Workspace, type WorkspaceQuotas, type WorkspaceTemplate, type WorkspaceUsage, _and, _contains, _ends_with, _eq, _gt, _gte, _in, _lt, _lte, _ncontains, _neq, _nin, _nnull, _none, _null, _or, _some, _starts_with, acquireItemLock, activateLayout, addChatChannelMember, addInstanceOwner, addSubRow, aggregateItems, aiBrief, aiBuildReport, aiChat, aiCheckDuplicates, aiGenerate, aiMapColumns, aiQuery, aiReportFilters, aiReview, aiSummarize, aiValidate, appendSessionRecordingEvents, applyContentBundle, applyRecordTemplate, applySubRowTemplate, approveAddendum, approveAiProposal, asc, backupExportPath, batchPickerExclusionStatus, bulkPickerExclusion, callExternalApi, callExternalApiEndpoint, cancelScheduledChange, cancelStagedImport, cascadeFieldDependencies, checkBlackoutDate, claimQueueItem, claimTask, clearTraces, cloneItem, cloneLayout, cloneReport, compareConfigSnapshot, completeTask, copyReportWidget, createAccessAudit, createAddendum, createAlertDefinition, createAlertSubscription, createAnomalyRule, createApiKey, createApprovalChain, createAtRiskRule, createAttributeDefinition, createBlackoutDate, createChatChannel, createChatRoomType, createCollectionLayout, createComment, createDataQualityRule, createExternalApi, createExternalApiEndpoint, createFieldGroup, createFieldWatch, createGroupDm, createHierarchyConfig, createImportDefinition, createImportJob, createImportJobFromUrl, createInternalWidget, createIssue, createItem, createMetricAlertRule, createNivaro, createNotification, createNotificationSubscription, createPage, createPdfTemplate, createPersistedQuery, createPresence, createQueue, createQueueView, createRealtime, createRecordLink, createRecordTemplate, createReport, createReportAlert, createReportAnnotation, createReportFromTemplate, createReportSnapshot, createReportWidgetPreset, createRetentionPolicy, createRole, createRolePolicy, createRule, createSavedView, createScheduledChange, createScheduledReport, createShareLink, createSlaRule, createSubRowTemplate, createSyncJob, createTask, createTreePermission, createUser, createViewSubscription, createVirtualCollection, createWebhook, createWidgetFeed, createWorkspace, createWorkspaceTemplate, decideApproval, deleteAccessAudit, deleteAddendum, deleteAlertDefinition, deleteAlertSubscription, deleteAnomalyRule, deleteApiKey, deleteApprovalChain, deleteAtRiskRule, deleteAttributeDefinition, deleteBlackoutDate, deleteChatMessage, deleteCollectionLayout, deleteComment, deleteDataQualityRule, deleteExternalApi, deleteExternalApiEndpoint, deleteExternalApiSchema, deleteFieldGroup, deleteFieldTranslations, deleteFieldWatch, deleteFile, deleteHierarchyConfig, deleteImportJob, deleteInternalWidget, deleteIssue, deleteItem, deleteMetricAlertRule, deleteNotification, deleteNotificationSubscription, deletePage, deletePdfTemplate, deletePersistedQuery, deleteQueue, deleteQueueView, deleteRecordLink, deleteRecordTemplate, deleteReport, deleteReportAlert, deleteReportAnnotation, deleteReportFilterPreset, deleteReportSnapshot, deleteReportTemplate, deleteReportWidgetPreset, deleteRetentionPolicy, deleteRole, deleteRolePolicy, deleteRule, deleteSavedView, deleteScheduledReport, deleteSessionRecording, deleteSlaRule, deleteSubRow, deleteSubRowTemplate, deleteSyncJob, deleteTask, deleteTreePermission, deleteUser, deleteViewSubscription, deleteVirtualCollection, deleteWebhook, deleteWidgetFeed, deleteWorkspace, deleteWorkspaceTemplate, deployImportProcedure, desc, disableTwoFactor, drillReportRow, editChatMessage, endSessionRecording, evaluateAlerts, evaluateAtRisk, evaluateFieldDefaults, evaluateFieldLock, evaluateFieldRules, evaluateFieldVisibility, excludeFromPicker, executeBulkAction, executeCustomQuery, executeImportTemplate, executeItemAction, executeScheduledChange, explainRecordAccess, explainReportTrend, exportBlueprint, exportConfigSnapshot, exportContent, exportContentBundle, exportSchemaSnapshot, fetchFormSchema, fileDownloadPath, fileTransformPath, generateToken, generateUserToken, getAlertDefinition, getAttributeValues, getBrunoCollection, getExternalApi, getExternalApiEndpoint, getFieldTranslations, getFlowRun, getLocales, getOpenApi, getPickerExclusionStatus, getPostmanCollection, getPresence, getRetentionPolicy, getSlaRule, getSlaStatus, getTranslations, getTypes, getWebhook, globalSearch, heartbeatItemLock, importExternalApiSpec, importSchemaSnapshot, includeInPicker, installBlueprint, installCollectionPreset, invokeInternalWidgetAction, isPageSlot, joinChatRoom, leaveChatRoom, listAccessAuditRuns, listAccessAudits, listActiveAtRiskRules, listActivePresence, listAddendums, listAlertDefinitions, listAlertSubscriptions, listAllNotificationSubscriptions, listAnomalyDefinitions, listAnomalyRules, listApiKeys, listApprovalChains, listApprovalInstances, listAtRiskRules, listAttributeDefinitions, listBlackoutDates, listBulkActions, listChangeOrders, listChatChannelMembers, listChatMessages, listChatPins, listChatRoles, listChatRoomTypes, listChatRooms, listCollectionPresets, listCollectionRecordTemplates, listComments, listCronJobs, listCustomQueries, listDataQualityRules, listDataQualityRuns, listDeadLetters, listExternalApiEndpoints, listExternalApiSchemas, listExternalApis, listFieldGroups, listFieldWatches, listFiles, listFlowRuns, listHierarchyConfigs, listImportDefinitionVersions, listImportDefinitions, listImportJobs, listImportTemplates, listInternalWidgets, listIssues, listItemActions, listItemScheduledChanges, listLayoutVersions, listMetricAlertRules, listMetricAlertSubscriptions, listMetricDefinitions, listMyTasks, listNotificationSubscriptions, listNotifications, listOrphanFiles, listPages, listPdfTemplates, listPersistedQueries, listPinnedItems, listPipelineVersions, listQueueViews, listQueues, listRecordLinks, listRecordTemplates, listRegisteredExtensions, listRegisteredFlowOperations, listRegisteredFlowTriggers, listRelatedComments, listReportAlerts, listReportAnnotations, listReportFilterPresets, listReportSnapshots, listReportTemplates, listReportVersions, listReportWidgetPresets, listReports, listRequestedTasks, listRetentionPolicies, listRetentionRuns, listRolePolicies, listRoleUsers, listRoles, listRules, listSavedViews, listScheduledChanges, listScheduledReports, listScopeDimensions, listSessionRecordings, listShareLinks, listSlaRules, listStagedImports, listSubRowTemplates, listSubRows, listSyncJobs, listTasks, listTeamTasks, listThroughputCollections, listTraces, listTreePermissions, listViewSubscriptions, listVirtualCollections, listWebhookDeliveries, listWebhooks, listWidgetFeeds, listWorkspaceTemplates, listWorkspaces, markAllNotificationsRead, markChatRoomRead, markNotificationRead, markNotificationsRead, moveTreeNode, nudgeTask, omniSearch, presignFileUpload, previewContentBundle, previewImportJob, previewReportWidget, publishItem, queryVirtualCollection, readAccessAuditFindings, readActiveLayout, readActivity, readActivityReportSummary, readAddendum, readAiSettings, readAlertLog, readAllStateOwners, readAnomalyLog, readApiAnalyticsErrors, readApiAnalyticsSummary, readApiAnalyticsTimeseries, readApiAnalyticsTopCollections, readApiAnalyticsTopPaths, readApiKey, readApprovalBrief, readApprovalChain, readAtRiskSummary, readBackupManifest, readChatConfig, readChatDirectory, readChatPeerRead, readCollection, readCollectionLayout, readCollectionLayouts, readCollections, readConfigInventory, readCoverageGaps, readDataQualityRun, readDetailLayout, readDistinctValues, readDraftPublishConfig, readErpSubmissionHistory, readFieldChangeHistory, readFieldConfig, readFieldImpact, readFieldWatch, readFileMeta, readFileUsage, readHierarchyConfig, readHierarchyNodeAncestors, readHierarchyNodeChildren, readHierarchyNodes, readHierarchyTree, readImportJob, readImportProcedure, readInstanceOwners, readIntegrationHealth, readInternalWidget, readIssue, readIssueSummary, readItem, readItemLock, readItemLockConfig, readItems, readLastTouch, readLayoutAssignments, readLayoutGroups, readMany, readMe, readMetricAlertLog, readMyScopes, readMyWork, readNotificationCount, readNotificationSubscriptionStats, readOnlinePresence, readOwnerGroups, readPage, readPageWidgetData, readPdfTemplate, readPersistedQuery, readPipelineFlowMap, readPipelineReplay, readPipelineTemplate, readPipelineTemplates, readPipelineVersion, readPreflight, readQueue, readQueueCollectionStates, readQueueColumnPrefs, readQueueItems, readQueueTrends, readQueueWorkload, readRecordGraph, readRelationOptions, readReport, readReportAlertLog, readReportAlertsLog, readReportFilterOptions, readReportFiring, readReportSnapshot, readReportSubscription, readReportUsage, readReportWidgetData, readRevision, readRevisions, readRole, readScopeDimensionCoverage, readSessionRecordingEvents, readSettings, readSingleton, readSlaStatusBatch, readStagedImport, readStagedImportStats, readStateOwnerGroups, readStateOwners, readStateOwnersBatch, readSyncJob, readTask, readTaskCounts, readTaskHistory, readThroughputReport, readTimeline, readTrace, readTreeAncestors, readTreeChildren, readTreeConfig, readTreeDescendants, readTreeNested, readTreeNodes, readTwoFactorStatus, readUnreadNotificationCount, readUser, readUserActivity, readUserActivitySummary, readUserCard, readUserScopes, readUsers, readWorkflowBindings, readWorkflowInstance, readWorkflowInstances, readWorkspace, readWorkspaceUsage, rebuildTreePaths, rehearseCreateItem, reindexSemanticSearch, rejectAddendum, rejectAiProposal, releaseItemLock, releaseQueueItem, rematerializeQueue, removeChatChannelMember, removeInstanceOwner, renderInternalWidget, renderPdfTemplate, reorderFieldGroups, reorderSubRows, reorderTreeSiblings, replaceSubRows, replayActivityEvent, replayFlow, reportClientError, requestRecordAccess, requeueStagedImport, resetReportCache, resolveReportAlert, restoreImportDefinitionVersion, restoreLayoutVersion, restorePipelineVersion, restoreReportVersion, retryDeadLetter, retryErpSubmission, retryWebhookDelivery, revokeApiKey, revokeShareLink, revokeToken, revokeUserToken, rollbackRevision, rotateWidgetFeedToken, runAccessAudit, runActivityReport, runActivityReportCsv, runCronJob, runDataQuality, runRetentionPolicy, runScheduledReport, runSyncJob, saveMyScopeDefaults, saveReportFilterPreset, saveReportTemplate, saveReportWidgets, saveUserScope, searchChatMessages, semanticSearch, sendBulkNotification, sendChatMessage, sendTestMail, sessionRecordingEnabled, setMyDelegate, setQueueDefaultView, setReportSubscription, setTranslations, setupTwoFactor, simulatePermissions, simulatePipeline, simulatePipelineImpact, startApproval, startMasquerade, startSessionRecording, startWorkflow, stopMasquerade, submitAddendum, submitFormItem, submitItemForReview, submitToErp, subscribeFieldWatch, subscribeMetricAlert, suggestImportValidation, suggestQueueLabels, switchWorkspace, testExternalApi, testFlow, testWebhook, toggleChatPin, toggleChatReaction, togglePinnedItem, toggleReportAlert, touchRecordView, transitionWorkflow, unpublishItem, unsubscribeFieldWatch, unsubscribeMetricAlert, updateAccessAudit, updateAddendum, updateAiSettings, updateAlertDefinition, updateAnomalyLogEntry, updateAnomalyRule, updateApiKey, updateApprovalChain, updateAtRiskRule, updateAttributeDefinition, updateAttributeValues, updateChatChannel, updateChatRoom, updateChatRoomType, updateCollectionLayout, updateComment, updateDataQualityRule, updateDraftPublishConfig, updateErpSubmissionStatus, updateExternalApi, updateExternalApiEndpoint, updateFieldConfig, updateFieldGroup, updateFieldWatch, updateFileMeta, updateHierarchyConfig, updateImportDefinition, updateInternalWidget, updateIssue, updateItem, updateItemLockConfig, updateLayoutAssignments, updateLayoutUngroupedSort, updateMe, updateMetricAlertRule, updateMetricAlertSubscription, updateNotificationSubscription, updatePage, updatePdfTemplate, updatePersistedQuery, updateQueue, updateQueueSources, updateQueueView, updateRecordTemplate, updateReport, updateReportAlert, updateReportWidgetPreset, updateRetentionPolicy, updateRole, updateRolePolicy, updateRoleUiPermissions, updateRule, updateSavedView, updateScheduledReport, updateSettings, updateSingleton, updateSlaRule, updateSyncJob, updateTask, updateTreePermission, updateUser, updateVirtualCollection, updateWebhook, updateWidgetFeed, updateWorkflowBinding, updateWorkspace, validateVirtualCollectionSql, verifyTwoFactor };
|
package/dist/index.js
CHANGED
|
@@ -1820,6 +1820,32 @@ function aggregateItems(collection, query) {
|
|
|
1820
1820
|
function readItem(collection, id) {
|
|
1821
1821
|
return cmd("GET", `/items/${collection}/${id}`);
|
|
1822
1822
|
}
|
|
1823
|
+
var READ_MANY_MAX = 20;
|
|
1824
|
+
function readMany(reads) {
|
|
1825
|
+
return cmd("POST", "/items/batch-read", void 0, {
|
|
1826
|
+
reads: reads.map((r) => ({
|
|
1827
|
+
...r.key != null ? { key: r.key } : {},
|
|
1828
|
+
collection: r.collection,
|
|
1829
|
+
...r.id != null ? { id: r.id } : {},
|
|
1830
|
+
...r.query ? { query: batchReadQuery(r.query, r.id == null) } : {}
|
|
1831
|
+
}))
|
|
1832
|
+
});
|
|
1833
|
+
}
|
|
1834
|
+
function batchReadQuery(query, list) {
|
|
1835
|
+
const q = {};
|
|
1836
|
+
if (query.fields?.length) q.fields = query.fields.join(",");
|
|
1837
|
+
if (!list) return q;
|
|
1838
|
+
if (query.filter) q.filter = query.filter;
|
|
1839
|
+
if (query.sort?.length) q.sort = query.sort.join(",");
|
|
1840
|
+
if (query.limit != null) q.limit = query.limit;
|
|
1841
|
+
if (query.offset != null) q.offset = query.offset;
|
|
1842
|
+
if (query.page != null) q.page = query.page;
|
|
1843
|
+
if (query.search) q.search = query.search;
|
|
1844
|
+
if (query.after != null) q.after = query.after;
|
|
1845
|
+
if (query.count === false) q.count = 0;
|
|
1846
|
+
if (query.conditions?.length) q.conditions = query.conditions;
|
|
1847
|
+
return q;
|
|
1848
|
+
}
|
|
1823
1849
|
function createItem(collection, data) {
|
|
1824
1850
|
return cmd("POST", `/items/${collection}`, void 0, data);
|
|
1825
1851
|
}
|
|
@@ -2528,6 +2554,7 @@ function submitFormItem(collection, values, options) {
|
|
|
2528
2554
|
return cmd("POST", `/items/${collection}`, void 0, values);
|
|
2529
2555
|
}
|
|
2530
2556
|
export {
|
|
2557
|
+
READ_MANY_MAX,
|
|
2531
2558
|
_and,
|
|
2532
2559
|
_contains,
|
|
2533
2560
|
_ends_with,
|
|
@@ -2955,6 +2982,7 @@ export {
|
|
|
2955
2982
|
readLastTouch,
|
|
2956
2983
|
readLayoutAssignments,
|
|
2957
2984
|
readLayoutGroups,
|
|
2985
|
+
readMany,
|
|
2958
2986
|
readMe,
|
|
2959
2987
|
readMetricAlertLog,
|
|
2960
2988
|
readMyScopes,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nivaro/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "TypeScript SDK for Nivaro CMS — typed REST client, GraphQL, realtime subscriptions, and presence.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"files": [
|
|
19
19
|
"dist",
|
|
20
20
|
"bin",
|
|
21
|
+
"!bin/**/*.test.mjs",
|
|
21
22
|
"README.md"
|
|
22
23
|
],
|
|
23
24
|
"keywords": [
|
|
@@ -48,7 +49,8 @@
|
|
|
48
49
|
},
|
|
49
50
|
"scripts": {
|
|
50
51
|
"build": "tsup src/index.ts --format esm --dts --out-dir dist",
|
|
51
|
-
"dev": "tsup src/index.ts --format esm --dts --out-dir dist --watch"
|
|
52
|
+
"dev": "tsup src/index.ts --format esm --dts --out-dir dist --watch",
|
|
53
|
+
"test": "node --test bin/lib/*.test.mjs"
|
|
52
54
|
},
|
|
53
55
|
"dependencies": {
|
|
54
56
|
"socket.io-client": "^4.8.1"
|