Skip to main content

API Samples changelog

v.next

  • GROK-20753: Added misc/utils/uuid4.js (DG.Utils.uuid4 — a v4 uuid outside a secure context)

  • GROK-20753: Added dapi/domains/captions.js (captions: ['<ref>'] projecting ~caption_<ref> — the target's display name, why it is not an expand, null for a target the caller cannot View, and the no-oracle refusals), dapi/domains/import-validate.js (batch({validateOnly: true}) previewing an import — per-row predicted verdicts, no id, nothing written — then committing the same payload) and dapi/domains/live-version.js (version() as a live list's poll: one bump per write transaction, re-read only when seq moves); access.js gained the support block (what the TABLE can do, gated instead of guessed)

  • GROK-20753: Added dapi/domains/bulk-edit.js (updateWhere over a selection and over a filter, the hasMore loop, a refused value leaving nothing written) and dapi/domains/hierarchy.js (pathTo as a breadcrumb of ancestors, the under subtree term through the tree's id and through a ref column into it); trash.js shows get(id, {deleted: 'only'}) addressing a trashed row

  • GROK-20753: Added dapi/domains/trash.js — the soft-delete round trip: query({deleted: 'only'}) as the table's trash (rows carrying ~is_deleted), a deleted: 'include' frame whose csv drops the service column, and restore(id) with its 'undelete' audit entry

  • GROK-20753: Removed the dapi/domains/facade-*.js and app-view.js samples with the @datagrok-libraries/domain-ui library they demonstrated — app UI over domain tables is the u2 domain stack (see the Stockroom and Grit packages), which a sample script cannot import

  • Grid: Fixed grid/advanced/pinned-columns.js — uses the core GridColumn.pin() instead of the PowerGrid:addPinnedColumn shim, so the sample no longer depends on PowerGrid being published

  • Tests: Skipped the five samples that await a user-dismissed modal (projects-save-dialog, facade-form-dialog, facade-list-view, row-editor, pick-table)

  • GROK-20849: Added data-frame/bitset/bit-array.jsDG.BitArray built in JS and applied to a DataFrame filter

  • GROK-20799: Added dapi/entity-properties.js — grok.meta.propertiesOf/coreLocationOf discovery, from a type's catalog to a related-entity filter over its Core table

  • GROK-20799: Added dapi/domains/access.js — DomainTableClient.access() (server-composed {can, fields}, incl. travelableRelations/securingTable) gating a create form on can.insert / editable fields, plus get(id, {withAccess: true}) for the per-row ~can_* flags; handler.js and registry-reflection.js read the same shape

  • GROK-20753: Added functions/eval-param-validators.js — named parameter validators run via FuncCall.evalParamValidators against the call's current value

  • GROK-20753: Added misc/utils/string-distances.js — DG.StringUtils.levenshteinDistance/jaroWinklerDistance

  • GROK-20753: Added ui/dialogs/pick-table.js — ui.pickTableFromFiles/ui.pickTableFromQuery with the null-on-cancel contract

  • Functions: Added functions/script-sync-variables.js — scriptSync with a variables map evaluated over a fresh context

  • Functions: Added functions/eval-param-choices.js — evalParamChoices/evalParamDefault over a client-registered choices provider

  • Functions: Added functions/property-options.js — Property.options as the tags-and-options union with FuncParam write-through

  • ProgressIndicator: Added functions/progress-log-updated.js — onLogUpdated during a debug-mode call, where each event is a plain {level, message, flag, params, time} object

  • Fixed statistics/pearson-correlation.js reading c1 twice, so it correlated a column with itself and always returned 1

  • Fixed functions/caching-results.js referencing an undefined result (and dropped an unused counts)

  • Fixed ui/widgets/widgets-tree.js throwing on a widget with no children, and on the base Widget, which has no getFunctions/getProperties (only domain widgets do)

  • Fixed dapi/projects.js saving an unnamed project ("Project name cannot be empty")

  • Gave the s input of PythonDup and RDup a default so they run without arguments

  • GROK-20298: Added dapi/domains/platform-grid.js — the editable domain grid with NO package installed: DG.DomainGrid.create, the frame's service columns, and the grid's machine surface

  • GROK-20298: Added dapi/domains/relations.js — many-to-many relations end to end: insert with a link set, expand, the d42 chips + id companion, relation filter paths and facet counts, set-replace update, and the create-and-link transaction

  • GROK-20298: Added dapi/domains/extend-schema.js — extending a plugin's domain schema: the Extend grant, the extend apply, and using the new column by its logical name

  • GROK-20298: Added ui/handlers/render-input.js — ObjectHandler.renderInput: the meta-provided user selector for a User

  • GROK-20298: ui/handlers/handlers.js — added renderListItem to the manual-rendering table

  • GROK-20298: Added dapi/domains/facade-form.js — the domain form plain: issues.form({values}) mounted in a view with a Save button, everything else from the registry

  • GROK-20298: Moved the domain samples into their own dapi/domains/ folder and dropped the domains- prefix (dapi/domains-typed-client.js → dapi/domains/typed-client.js, dapi/domains.js → dapi/domains/crud.js, and so on)

  • GROK-20298: Added the rest of the domains facade catalog — dapi/domains/facade-app.js (the whole CRUD app in one body line), dapi/domains/facade-list-view.js (a query-scoped list page + the reference picker), dapi/domains/facade-grid.js (an editable grid over a filtered subset, plus a grid's machine surface) and dapi/domains/facade-composed.js (a master-detail page with one dirty state and one gate, then a domain grid live next to a bar chart)

  • GROK-20298: Added the domains facade samples — dapi/domains/facade-form-dialog.js (an insert/edit form in a dialog, 2 lines), dapi/domains/facade-form-view.js (a routed form page through grok.shell.preview, 2 lines), dapi/domains/facade-customization.js (replace one input, add one validator) and dapi/domains/facade-machine-surface.js (what an AI agent sees: DG.Widget.getAll()getWidgetStatus()propsgetFunctions())

  • GROK-20298: Added dapi/domains/app-view.js — the domain app framework in two views: a one-expression DomainAppView list page and the DomainEntityAppView page of one row (rowFrom wrapping a row the query already returned)

  • GROK-20298: Added dapi/domains/query-state.js — DomainQuery as the one serializable view state: deep-link URL parameters (one key per filter element) round-tripped back, the silent REST spec, the recorded run, and the query behind a live Domain View

  • GROK-20298: Added dapi/domains/embedded-view.js and dapi/domains/row-editor.js — DG.DomainView created programmatically and embedded with a permanent filter, and the platform row dialogs as one-line openers (create/edit/picker/conflict/audit/grants); dapi/domains/async-form.js now opens the REAL lookup picker instead of routing to /domains

  • GROK-20298: Added dapi/domains/handler.js — DomainObjectHandler: a per-table handler that overrides only renderCard, plus the reflective members every domain table gets for free (properties, capabilities, row permissions, detail tabs, capability-gated actions, editor)

  • GROK-20298: Added dapi/domains/registry-reflection.js — registry reflection (rowProperties/tableInfo/resolveNames) and permission-driven table capabilities

  • GROK-20298: Added dapi/domains/render-grid.js — customizing every grid over a domain table's rows (the built-in Domain View grid included) via ObjectHandler.renderGrid

  • GROK-20298: Added dapi/domains/async-form.js — the "New Grit issue" async form: FK lookup via ui.typeAhead's callback source, server-provided choices, debounced server-side uniqueness validation, and per-field mapping of server rejections

  • GROK-20605: Rewrote the domains samples to the typed patterns — fluent builder + bound-condition helpers (apostrophe teaching), getByKey/first/count/exists, aggregateDf, typed tuple transactions with opIndex, typed conflict errors + updateWithRetry, schema grants with the no-fan-out truth; NEW dapi/domains/typed-client.js (upsert, save/updateWithRetry, typed errors, bounded deleteWhere cleanup); every remaining per-row delete loop is gone

  • GROK-20601: Replaced dapi/domains-dapi2.js (the generated dapi2 domains client is removed at typed-surface parity) with dapi/domains/schema.js — schema lifecycle handle: manifest export + whole-schema audit

  • GROK-20600: dapi/domains/batch.js cleanup now uses one deleteWhere filtered bulk delete instead of the query + per-row delete loop

  • GROK-20591: Added dapi/domains/filters.js — batched facets (filter-panel counts) and shareable saved filter presets on a domain table

  • GROK-20572: Added data-access/db/query_builder_domain.js — TableQueryBuilder over a domain schema's virtual connection

  • GROK-20316: Added dapi/domains-dapi2.js — querying domain-table rows via the generated grok.dapi2 REST client

  • GROK-20315: Added dapi/domains/batch.js, domains/transaction.js, domains/aggregate.js, domains/dataframe.js, domains/idempotency.js — batch upsert, multi-entity transactions, aggregation, queryDf → grid, idempotent retries + optimistic concurrency

  • GROK-20307: Added dapi/domains/crud.js — domain-table row CRUD via grok.dapi.domains

1.2.2 (2025-12-18)

  • ApiSamples: Statistics: Added Pearson correlation sample

1.2.1 (2-24-11-24)

  • New samples, version bump

1.0.12 (2024-10-17)

  • Add samples before for scripts
  • Sample fixes

1.0.11 (2024-07-09)

  • Add samples for HelmInput

1.0.7 (2023-07-27)

  • Dependency: datagarok-api >= 1.16.0*

Features

  • All examples now have auto tests