Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 1.43.2 - 2025-11-02
- Command and QueryRequestOptions: add auditDetails parameter

### 1.43.1 - 2025-10-31
- Issue 53449: resolve lineage items from container path

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@labkey/api",
"version": "1.43.1",
"version": "1.43.2",
"description": "JavaScript client API for LabKey Server",
"scripts": {
"build": "npm run build:dist && npm run build:docs",
Expand Down
4 changes: 4 additions & 0 deletions src/labkey/dom/Assay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export interface ImportRunOptions extends RequestCallbackOptions {
allowLookupByAlternateKey?: boolean;
assayId?: number | string;
auditUserComment?: string;
auditDetails?: Record<string, any>;
batchId?: number | string;
batchProperties?: Record<string, any>;
comment?: string;
Expand Down Expand Up @@ -136,6 +137,9 @@ export function importRun(options: ImportRunOptions): XMLHttpRequest {
if (options.auditUserComment !== undefined) {
formData.append('auditUserComment', options.auditUserComment);
}
if (options.auditDetails !== undefined) {
formData.append('auditDetails', JSON.stringify(options.auditDetails));
}

appendProperties('batchProperties', formData, options.batchProperties);
appendProperties('properties', formData, options.properties);
Expand Down
4 changes: 4 additions & 0 deletions src/labkey/dom/Query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export function exportTables(options: IExportTablesOptions): void {
}

export interface IImportDataOptions {
auditDetails?: Record<string, any>;
auditUserComment?: string;
containerPath?: string;
failure?: Function;
Expand Down Expand Up @@ -161,6 +162,9 @@ export function importData(options: IImportDataOptions): XMLHttpRequest {
if (options.auditUserComment !== undefined) {
form.append('auditUserComment', options.auditUserComment);
}
if (options.auditDetails !== undefined) {
form.append('auditDetails', JSON.stringify(options.auditDetails));
}

if (options.file) {
if (options.file instanceof File) {
Expand Down
14 changes: 14 additions & 0 deletions src/labkey/query/Rows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export interface QueryRequestOptions extends RequestCallbackOptions {
apiVersion?: number | string;
/** Can be used to override the audit behavior for the table the query is acting on. See {@link AuditBehaviorTypes}. */
auditBehavior?: AuditBehaviorTypes;
/** Optional audit details to record in the transaction audit log for this command. */
auditDetails?: Record<string, any>;
/** Can be used to provide a comment from the user that will be attached to certain detailed audit log records. */
auditUserComment?: string;
/**
Expand Down Expand Up @@ -213,6 +215,10 @@ export interface ModifyRowsResults {
export interface Command {
/** Can be used to override the audit behavior for the table the Command is acting on. See{@link AuditBehaviorTypes}. */
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space between 'See' and '{@link' in JSDoc comment.

Suggested change
/** Can be used to override the audit behavior for the table the Command is acting on. See{@link AuditBehaviorTypes}. */
/** Can be used to override the audit behavior for the table the Command is acting on. See {@link AuditBehaviorTypes}. */

Copilot uses AI. Check for mistakes.
auditBehavior?: AuditBehaviorTypes;

/** Optional audit details to record in the transaction audit log for this command. */
auditDetails?: Record<string, any>;

/** Can be used to provide a comment from the user that will be attached to certain detailed audit log records. */
auditUserComment?: string;
/** Name of the command to be performed. Must be one of "insert", "update", or "delete". */
Expand Down Expand Up @@ -267,6 +273,11 @@ export interface SaveRowsResponse {
}

export interface SaveRowsOptions extends RequestCallbackOptions<SaveRowsResponse> {

/**
* Optional audit details to record in the transaction audit log for this command.
*/
auditDetails?: Record<string, any>;
/**
* Version of the API. If this is 13.2 or higher, a request that fails
* validation will be returned as a successful response. Use the 'errorCount' and 'committed' properties in the
Expand Down Expand Up @@ -364,6 +375,7 @@ export function saveRows(options: SaveRowsOptions): XMLHttpRequest {
// options = queryArguments(arguments);
// }
const jsonData = {
auditDetails: options.auditDetails,
apiVersion: options.apiVersion,
commands: options.commands,
containerPath: options.containerPath,
Expand Down Expand Up @@ -449,6 +461,7 @@ function sendRequest(options: SendRequestOptions, supportsFiles?: boolean): XMLH
transacted: options.transacted,
extraContext: options.extraContext,
auditBehavior: options.auditBehavior,
auditDetails: options.auditDetails,
auditUserComment: options.auditUserComment,
skipReselectRows: options.skipReselectRows,
};
Expand Down Expand Up @@ -517,6 +530,7 @@ export function moveRows(options: MoveRowsOptions): XMLHttpRequest {
queryName: options.queryName,
rows: options.rows,
auditBehavior: options.auditBehavior,
auditDetails: options.auditDetails,
auditUserComment: options.auditUserComment,
dataRegionSelectionKey: options.dataRegionSelectionKey,
useSnapshotSelection: options.useSnapshotSelection,
Expand Down