From 5d61bfa1f86311998e23c4e61c65d0a0ea81bb7f Mon Sep 17 00:00:00 2001 From: alanv Date: Wed, 11 Dec 2024 13:24:07 -0600 Subject: [PATCH 1/5] Export RequestOptions, Command, CommandType --- src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.ts b/src/index.ts index 89151fdf..22cda703 100644 --- a/src/index.ts +++ b/src/index.ts @@ -32,6 +32,7 @@ import { PermissionRoles, PermissionTypes } from './labkey/security/constants'; // modules import * as ActionURL from './labkey/ActionURL'; import * as Ajax from './labkey/Ajax'; +import { RequestOptions } from './labkey/Ajax'; import * as App from './labkey/App'; import * as Assay from './labkey/Assay'; import * as Domain from './labkey/Domain'; @@ -45,6 +46,7 @@ import * as Message from './labkey/Message'; import * as ParticipantGroup from './labkey/ParticipantGroup'; import * as Pipeline from './labkey/Pipeline'; import * as Query from './labkey/Query'; +import { Command, CommandType } from './labkey/Query'; import { QueryKey } from './labkey/QueryKey'; import * as Report from './labkey/Report'; import { SchemaKey } from './labkey/SchemaKey'; @@ -73,6 +75,9 @@ export { Container, ExperimentalFlags, Project, + RequestOptions, + Command, + CommandType, /* modules */ ActionURL, Ajax, From df8ee6f166d9fcedda07f838b7ab6fd4a4bcf3a0 Mon Sep 17 00:00:00 2001 From: alanv Date: Wed, 18 Dec 2024 10:27:31 -0600 Subject: [PATCH 2/5] Don't export Command, CommandType, RequestOptions from top level package. --- src/index.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index 22cda703..89151fdf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -32,7 +32,6 @@ import { PermissionRoles, PermissionTypes } from './labkey/security/constants'; // modules import * as ActionURL from './labkey/ActionURL'; import * as Ajax from './labkey/Ajax'; -import { RequestOptions } from './labkey/Ajax'; import * as App from './labkey/App'; import * as Assay from './labkey/Assay'; import * as Domain from './labkey/Domain'; @@ -46,7 +45,6 @@ import * as Message from './labkey/Message'; import * as ParticipantGroup from './labkey/ParticipantGroup'; import * as Pipeline from './labkey/Pipeline'; import * as Query from './labkey/Query'; -import { Command, CommandType } from './labkey/Query'; import { QueryKey } from './labkey/QueryKey'; import * as Report from './labkey/Report'; import { SchemaKey } from './labkey/SchemaKey'; @@ -75,9 +73,6 @@ export { Container, ExperimentalFlags, Project, - RequestOptions, - Command, - CommandType, /* modules */ ActionURL, Ajax, From 842a7c59d3ec64cf652759e257ac02cdf92d8ed3 Mon Sep 17 00:00:00 2001 From: alanv Date: Wed, 18 Dec 2024 10:38:31 -0600 Subject: [PATCH 3/5] Command: add auditBehavior, auditUserComment, skipReselectRows --- src/labkey/constants.ts | 2 +- src/labkey/query/Rows.ts | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/labkey/constants.ts b/src/labkey/constants.ts index 08f09e75..0a4fe81f 100644 --- a/src/labkey/constants.ts +++ b/src/labkey/constants.ts @@ -80,7 +80,7 @@ export enum ExperimentalFeatures { javascriptMothership = 'javascriptMothership', } -/** THe different types of audit behaviors for query requests. May be used to override behavior for a specific requests. */ +/** The different types of audit behaviors for query requests. May be used to override behavior for a specific requests. */ export enum AuditBehaviorTypes { DETAILED = 'DETAILED', NONE = 'NONE', diff --git a/src/labkey/query/Rows.ts b/src/labkey/query/Rows.ts index 60a161e1..404b08bd 100644 --- a/src/labkey/query/Rows.ts +++ b/src/labkey/query/Rows.ts @@ -211,6 +211,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}. */ + auditBehavior?: AuditBehaviorTypes; + /** 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". */ command: CommandType; /** **Experimental:** Optional extra context object passed into the transformation/validation script environment. */ @@ -230,6 +234,11 @@ export interface Command { * See also: [How To Find schemaName, queryName & viewName](https://www.labkey.org/Documentation/wiki-page.view?name=findNames). */ schemaName: string; + /** + * Whether the full detailed response for the update/insert rows can be skipped. + * Defaults to false. + */ + skipReselectRows?: boolean; } export interface MoveRowsResponse extends ModifyRowsResults { @@ -260,7 +269,7 @@ export interface SaveRowsOptions extends RequestCallbackOptions Date: Wed, 18 Dec 2024 10:41:18 -0600 Subject: [PATCH 4/5] CHANGELOG - add change notes --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92e92c73..1def251e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 1.37.0 - 2024-12-?? +- Command: add auditBehavior, auditUserComment, skipReselectRows + ### 1.36.0 - 2024-11-05 - Package updates From fa97662edfe47b9ef59b1b40605b1e2edfded05b Mon Sep 17 00:00:00 2001 From: alanv Date: Thu, 19 Dec 2024 14:48:56 -0600 Subject: [PATCH 5/5] Prep for release --- CHANGELOG.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1def251e..a8b21a02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.37.0 - 2024-12-?? +### 1.37.0 - 2024-12-19 - Command: add auditBehavior, auditUserComment, skipReselectRows ### 1.36.0 - 2024-11-05 diff --git a/package-lock.json b/package-lock.json index 951e1cad..63228bc3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@labkey/api", - "version": "1.36.0", + "version": "1.37.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@labkey/api", - "version": "1.36.0", + "version": "1.37.0", "license": "Apache-2.0", "devDependencies": { "@babel/core": "7.26.0", diff --git a/package.json b/package.json index b05ff521..54b83388 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@labkey/api", - "version": "1.36.0", + "version": "1.37.0", "description": "JavaScript client API for LabKey Server", "scripts": { "build": "npm run build:dist && npm run build:docs",