@rinse-dental/open-dental 2.4.11 → 2.4.13
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/api/index.d.ts +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +3 -1
- package/dist/api/queries.d.ts +7 -6
- package/dist/api/queries.d.ts.map +1 -1
- package/dist/api/queries.js +10 -10
- package/dist/api/securityLogs.d.ts +15 -0
- package/dist/api/securityLogs.d.ts.map +1 -0
- package/dist/api/securityLogs.js +23 -0
- package/dist/openDental.d.ts +6 -1
- package/dist/openDental.d.ts.map +1 -1
- package/dist/openDental.js +11 -1
- package/dist/types/queryTypes.d.ts +5 -4
- package/dist/types/queryTypes.d.ts.map +1 -1
- package/dist/types/securityLogTypes.d.ts +24 -0
- package/dist/types/securityLogTypes.d.ts.map +1 -0
- package/dist/types/securityLogTypes.js +2 -0
- package/package.json +1 -1
- package/src/api/index.ts +1 -0
- package/src/api/queries.ts +10 -10
- package/src/api/securityLogs.ts +32 -0
- package/src/openDental.ts +12 -1
- package/src/types/queryTypes.ts +7 -6
- package/src/types/securityLogTypes.ts +24 -0
package/dist/api/index.d.ts
CHANGED
|
@@ -21,4 +21,5 @@ export { default as MedicationPats } from "./medicationPats";
|
|
|
21
21
|
export { default as ProcTPs } from "./procTPs";
|
|
22
22
|
export { default as ProcNotes } from "./procNotes";
|
|
23
23
|
export { default as Queries } from "./queries";
|
|
24
|
+
export { default as SecurityLogs } from "./securityLogs";
|
|
24
25
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,O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AAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/api/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Queries = exports.ProcNotes = exports.ProcTPs = exports.MedicationPats = exports.Allergies = exports.Diseases = exports.Fees = exports.DiscountPlans = exports.DiscountPlanSubs = exports.Definitions = exports.Payments = exports.Operatories = exports.Providers = exports.Schedules = exports.TreatmentPlanAttaches = exports.TreatmentPlans = exports.Recalls = exports.ProcedureLogs = exports.Patients = exports.PatFields = exports.CommLogs = exports.ChartModules = exports.Appointments = void 0;
|
|
6
|
+
exports.SecurityLogs = exports.Queries = exports.ProcNotes = exports.ProcTPs = exports.MedicationPats = exports.Allergies = exports.Diseases = exports.Fees = exports.DiscountPlans = exports.DiscountPlanSubs = exports.Definitions = exports.Payments = exports.Operatories = exports.Providers = exports.Schedules = exports.TreatmentPlanAttaches = exports.TreatmentPlans = exports.Recalls = exports.ProcedureLogs = exports.Patients = exports.PatFields = exports.CommLogs = exports.ChartModules = exports.Appointments = void 0;
|
|
7
7
|
var appointments_1 = require("./appointments");
|
|
8
8
|
Object.defineProperty(exports, "Appointments", { enumerable: true, get: function () { return __importDefault(appointments_1).default; } });
|
|
9
9
|
var chartModules_1 = require("./chartModules");
|
|
@@ -50,4 +50,6 @@ var procNotes_1 = require("./procNotes");
|
|
|
50
50
|
Object.defineProperty(exports, "ProcNotes", { enumerable: true, get: function () { return __importDefault(procNotes_1).default; } });
|
|
51
51
|
var queries_1 = require("./queries");
|
|
52
52
|
Object.defineProperty(exports, "Queries", { enumerable: true, get: function () { return __importDefault(queries_1).default; } });
|
|
53
|
+
var securityLogs_1 = require("./securityLogs");
|
|
54
|
+
Object.defineProperty(exports, "SecurityLogs", { enumerable: true, get: function () { return __importDefault(securityLogs_1).default; } });
|
|
53
55
|
// Add other APIs as needed
|
package/dist/api/queries.d.ts
CHANGED
|
@@ -4,14 +4,15 @@ export default class Queries {
|
|
|
4
4
|
private httpClient;
|
|
5
5
|
constructor(httpClient: HttpClient);
|
|
6
6
|
/**
|
|
7
|
-
* Execute a ShortQuery (arbitrary SQL).
|
|
7
|
+
* Execute a ShortQuery (arbitrary read-only SQL).
|
|
8
|
+
* Open Dental: PUT /queries/ShortQuery?Offset=#
|
|
9
|
+
* Body: { SqlCommand }
|
|
10
|
+
* Returns at most 100 rows (use Queries POST for longer results).
|
|
11
|
+
*
|
|
8
12
|
* Example:
|
|
9
|
-
* shortQuery<{
|
|
10
|
-
* SqlCommand: "SELECT
|
|
13
|
+
* queries.shortQuery<{ PayPeriodNum: number; DateStart: string; DateStop: string; DatePaycheck: string }>({
|
|
14
|
+
* SqlCommand: "SELECT * FROM payperiod"
|
|
11
15
|
* })
|
|
12
|
-
*
|
|
13
|
-
* Open Dental: PUT /queries/short/{SqlCommand}?Offset=#
|
|
14
|
-
* @see https://www.opendental.com/site/apiqueries.html
|
|
15
16
|
*/
|
|
16
17
|
shortQuery<Row = unknown>({ SqlCommand, Offset }: ShortQueryParams, opts?: {
|
|
17
18
|
parse?: RowParser<Row>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/api/queries.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,OAAO,OAAO,OAAO;IAC1B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/api/queries.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,OAAO,OAAO,OAAO;IAC1B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;;;;;;;OAUG;IACU,UAAU,CAAC,GAAG,GAAG,OAAO,EACnC,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,gBAAgB,EACxC,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAA;KAAE,GAChC,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;CAclC"}
|
package/dist/api/queries.js
CHANGED
|
@@ -6,23 +6,23 @@ class Queries {
|
|
|
6
6
|
this.httpClient = httpClient;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* Execute a ShortQuery (arbitrary SQL).
|
|
9
|
+
* Execute a ShortQuery (arbitrary read-only SQL).
|
|
10
|
+
* Open Dental: PUT /queries/ShortQuery?Offset=#
|
|
11
|
+
* Body: { SqlCommand }
|
|
12
|
+
* Returns at most 100 rows (use Queries POST for longer results).
|
|
13
|
+
*
|
|
10
14
|
* Example:
|
|
11
|
-
* shortQuery<{
|
|
12
|
-
* SqlCommand: "SELECT
|
|
15
|
+
* queries.shortQuery<{ PayPeriodNum: number; DateStart: string; DateStop: string; DatePaycheck: string }>({
|
|
16
|
+
* SqlCommand: "SELECT * FROM payperiod"
|
|
13
17
|
* })
|
|
14
|
-
*
|
|
15
|
-
* Open Dental: PUT /queries/short/{SqlCommand}?Offset=#
|
|
16
|
-
* @see https://www.opendental.com/site/apiqueries.html
|
|
17
18
|
*/
|
|
18
19
|
async shortQuery({ SqlCommand, Offset }, opts) {
|
|
19
|
-
|
|
20
|
-
let path = `/queries/short/${encodeURIComponent(SqlCommand)}`;
|
|
20
|
+
let path = "/queries/ShortQuery";
|
|
21
21
|
if (typeof Offset === "number") {
|
|
22
22
|
path += `?Offset=${encodeURIComponent(String(Offset))}`;
|
|
23
23
|
}
|
|
24
|
-
//
|
|
25
|
-
const data = await this.httpClient.put(path, {});
|
|
24
|
+
// HttpClient.put(url, data) per your implementation
|
|
25
|
+
const data = await this.httpClient.put(path, { SqlCommand });
|
|
26
26
|
if (opts?.parse) {
|
|
27
27
|
return data.map(opts.parse);
|
|
28
28
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import { SecurityLog, GetSecurityLogsParams } from "../types/securityLogTypes";
|
|
3
|
+
export default class SecurityLogs {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(httpClient: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* Fetch multiple SecurityLogs with optional filtering and pagination.
|
|
8
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
9
|
+
* @param {number} [params.PermType] - Optional. Filter by permission type (see Audit Trail Permissions doc).
|
|
10
|
+
* @param {number} [params.Offset] - Optional. Pagination offset for results.
|
|
11
|
+
* @returns {Promise<Fee[]>} - A list of securitylogs.
|
|
12
|
+
*/
|
|
13
|
+
getSecurityLogs({ PermType, Offset, }?: GetSecurityLogsParams): Promise<SecurityLog[]>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=securityLogs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"securityLogs.d.ts","sourceRoot":"","sources":["../../src/api/securityLogs.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,WAAW,EACX,qBAAqB,EACtB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIpC;;;;;;OAMG;IACU,eAAe,CAAC,EACzB,QAAQ,EACR,MAAM,GACP,GAAE,qBAA0B,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;CAQvD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class SecurityLogs {
|
|
4
|
+
httpClient;
|
|
5
|
+
constructor(httpClient) {
|
|
6
|
+
this.httpClient = httpClient;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Fetch multiple SecurityLogs with optional filtering and pagination.
|
|
10
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
11
|
+
* @param {number} [params.PermType] - Optional. Filter by permission type (see Audit Trail Permissions doc).
|
|
12
|
+
* @param {number} [params.Offset] - Optional. Pagination offset for results.
|
|
13
|
+
* @returns {Promise<Fee[]>} - A list of securitylogs.
|
|
14
|
+
*/
|
|
15
|
+
async getSecurityLogs({ PermType, Offset, } = {}) {
|
|
16
|
+
const params = {
|
|
17
|
+
PermType,
|
|
18
|
+
Offset,
|
|
19
|
+
};
|
|
20
|
+
return this.httpClient.get("/securitylogs", params);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.default = SecurityLogs;
|
package/dist/openDental.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ import MedicationPats from "./api/medicationPats";
|
|
|
33
33
|
import ProcTPs from "./api/procTPs";
|
|
34
34
|
import ProcNotes from "./api/procNotes";
|
|
35
35
|
import Queries from "./api/queries";
|
|
36
|
+
import SecurityLogs from "./api/securityLogs";
|
|
36
37
|
import * as Transformers from './transformers';
|
|
37
38
|
declare class OpenDental {
|
|
38
39
|
private static httpClient;
|
|
@@ -177,9 +178,13 @@ declare class OpenDental {
|
|
|
177
178
|
*/
|
|
178
179
|
static ProcNotes(): ProcNotes;
|
|
179
180
|
/**
|
|
180
|
-
* Create a new instance of the
|
|
181
|
+
* Create a new instance of the Queries API.
|
|
181
182
|
*/
|
|
182
183
|
static Queries(): Queries;
|
|
184
|
+
/**
|
|
185
|
+
* Create a new instance of the SecurityLogs API.
|
|
186
|
+
*/
|
|
187
|
+
static SecurityLogs(): SecurityLogs;
|
|
183
188
|
/**
|
|
184
189
|
* Access stateless Transformers (no initialization needed)
|
|
185
190
|
*/
|
package/dist/openDental.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openDental.d.ts","sourceRoot":"","sources":["../src/openDental.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,gBAAgB,MAAM,wBAAwB,CAA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SAAS;IAOvB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,aAAa;IAO3B;;OAEG;WACW,OAAO;IAOrB;;OAEG;WACW,cAAc;IAO5B;;OAEG;WACW,qBAAqB;IAOnC;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,WAAW;IAOzB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,WAAW;IAOzB;;OAEG;WACW,aAAa;IAO3B;;OAEG;WACW,gBAAgB;IAO9B;;OAEG;WACW,aAAa;IAO3B;;OAEG;WACW,OAAO;IAOrB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,WAAW;IAOzB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,UAAU;IAOxB;;OAEG;WACW,WAAW;IAOzB;;OAEG;WACW,cAAc;IAO5B;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,IAAI;IAOlB;;OAEG;WACW,QAAQ;IAOtB;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,cAAc;IAO5B;;OAEG;WACW,OAAO;IAOrB;;OAEG;WACW,SAAS;IAOvB;;OAEG;WACW,OAAO;IAOrB;;OAEG;WACW,YAAY;IAO1B;;OAEG;WACW,YAAY;CAI3B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/openDental.js
CHANGED
|
@@ -73,6 +73,7 @@ const medicationPats_1 = __importDefault(require("./api/medicationPats"));
|
|
|
73
73
|
const procTPs_1 = __importDefault(require("./api/procTPs"));
|
|
74
74
|
const procNotes_1 = __importDefault(require("./api/procNotes"));
|
|
75
75
|
const queries_1 = __importDefault(require("./api/queries"));
|
|
76
|
+
const securityLogs_1 = __importDefault(require("./api/securityLogs"));
|
|
76
77
|
const Transformers = __importStar(require("./transformers"));
|
|
77
78
|
class OpenDental {
|
|
78
79
|
static httpClient;
|
|
@@ -394,7 +395,7 @@ class OpenDental {
|
|
|
394
395
|
return new procNotes_1.default(this.httpClient);
|
|
395
396
|
}
|
|
396
397
|
/**
|
|
397
|
-
* Create a new instance of the
|
|
398
|
+
* Create a new instance of the Queries API.
|
|
398
399
|
*/
|
|
399
400
|
static Queries() {
|
|
400
401
|
if (!this.httpClient) {
|
|
@@ -402,6 +403,15 @@ class OpenDental {
|
|
|
402
403
|
}
|
|
403
404
|
return new queries_1.default(this.httpClient);
|
|
404
405
|
}
|
|
406
|
+
/**
|
|
407
|
+
* Create a new instance of the SecurityLogs API.
|
|
408
|
+
*/
|
|
409
|
+
static SecurityLogs() {
|
|
410
|
+
if (!this.httpClient) {
|
|
411
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
412
|
+
}
|
|
413
|
+
return new securityLogs_1.default(this.httpClient);
|
|
414
|
+
}
|
|
405
415
|
/**
|
|
406
416
|
* Access stateless Transformers (no initialization needed)
|
|
407
417
|
*/
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parameters for
|
|
2
|
+
* Parameters for Queries PUT ShortQuery
|
|
3
|
+
* Endpoint: PUT /queries/ShortQuery?Offset=#
|
|
4
|
+
* Body: { SqlCommand: string }
|
|
5
|
+
* Returns: up to 100 rows; use Queries POST for longer results.
|
|
3
6
|
* @see https://www.opendental.com/site/apiqueries.html
|
|
4
7
|
*/
|
|
5
8
|
export interface ShortQueryParams {
|
|
6
|
-
/** Required in the URL path (will be URL-encoded) */
|
|
7
9
|
SqlCommand: string;
|
|
8
|
-
/** Optional pagination offset (goes in query string) */
|
|
9
10
|
Offset?: number;
|
|
10
11
|
}
|
|
11
12
|
/** Generic result rows for ShortQuery; supply Row when you know the shape */
|
|
12
13
|
export type ShortQueryResult<Row = unknown> = Row[];
|
|
13
|
-
/** Optional runtime
|
|
14
|
+
/** Optional runtime validator for rows (e.g., Zod) */
|
|
14
15
|
export type RowParser<Row> = (value: unknown) => Row;
|
|
15
16
|
//# sourceMappingURL=queryTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryTypes.d.ts","sourceRoot":"","sources":["../../src/types/queryTypes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"queryTypes.d.ts","sourceRoot":"","sources":["../../src/types/queryTypes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,6EAA6E;AAC7E,MAAM,MAAM,gBAAgB,CAAC,GAAG,GAAG,OAAO,IAAI,GAAG,EAAE,CAAC;AAEpD,sDAAsD;AACtD,MAAM,MAAM,SAAS,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,OAAO,KAAK,GAAG,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a securityLogs in Open Dental
|
|
3
|
+
* @see https://www.opendental.com/site/apisecuritylogs.html
|
|
4
|
+
*/
|
|
5
|
+
export interface SecurityLog {
|
|
6
|
+
SecurityLogNum: number;
|
|
7
|
+
PermType: string;
|
|
8
|
+
UserNum: number;
|
|
9
|
+
LogDateTime: string;
|
|
10
|
+
LogText: string;
|
|
11
|
+
PatNum?: number;
|
|
12
|
+
CompName?: string;
|
|
13
|
+
LogSource?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Parameters for GET /securitylogs
|
|
17
|
+
* Filters logs for the requesting API developer.
|
|
18
|
+
* @see https://www.opendental.com/site/apisecuritylogs.html
|
|
19
|
+
*/
|
|
20
|
+
export interface GetSecurityLogsParams {
|
|
21
|
+
PermType?: string;
|
|
22
|
+
Offset?: number;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=securityLogTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"securityLogTypes.d.ts","sourceRoot":"","sources":["../../src/types/securityLogTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
package/package.json
CHANGED
package/src/api/index.ts
CHANGED
|
@@ -21,4 +21,5 @@ export { default as MedicationPats } from "./medicationPats";
|
|
|
21
21
|
export { default as ProcTPs } from "./procTPs";
|
|
22
22
|
export { default as ProcNotes } from "./procNotes";
|
|
23
23
|
export { default as Queries } from "./queries";
|
|
24
|
+
export { default as SecurityLogs } from "./securityLogs";
|
|
24
25
|
// Add other APIs as needed
|
package/src/api/queries.ts
CHANGED
|
@@ -13,27 +13,27 @@ export default class Queries {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* Execute a ShortQuery (arbitrary SQL).
|
|
16
|
+
* Execute a ShortQuery (arbitrary read-only SQL).
|
|
17
|
+
* Open Dental: PUT /queries/ShortQuery?Offset=#
|
|
18
|
+
* Body: { SqlCommand }
|
|
19
|
+
* Returns at most 100 rows (use Queries POST for longer results).
|
|
20
|
+
*
|
|
17
21
|
* Example:
|
|
18
|
-
* shortQuery<{
|
|
19
|
-
* SqlCommand: "SELECT
|
|
22
|
+
* queries.shortQuery<{ PayPeriodNum: number; DateStart: string; DateStop: string; DatePaycheck: string }>({
|
|
23
|
+
* SqlCommand: "SELECT * FROM payperiod"
|
|
20
24
|
* })
|
|
21
|
-
*
|
|
22
|
-
* Open Dental: PUT /queries/short/{SqlCommand}?Offset=#
|
|
23
|
-
* @see https://www.opendental.com/site/apiqueries.html
|
|
24
25
|
*/
|
|
25
26
|
public async shortQuery<Row = unknown>(
|
|
26
27
|
{ SqlCommand, Offset }: ShortQueryParams,
|
|
27
28
|
opts?: { parse?: RowParser<Row> }
|
|
28
29
|
): Promise<ShortQueryResult<Row>> {
|
|
29
|
-
|
|
30
|
-
let path = `/queries/short/${encodeURIComponent(SqlCommand)}`;
|
|
30
|
+
let path = "/queries/ShortQuery";
|
|
31
31
|
if (typeof Offset === "number") {
|
|
32
32
|
path += `?Offset=${encodeURIComponent(String(Offset))}`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
//
|
|
36
|
-
const data = await this.httpClient.put<unknown[]>(path, {});
|
|
35
|
+
// HttpClient.put(url, data) per your implementation
|
|
36
|
+
const data = await this.httpClient.put<unknown[]>(path, { SqlCommand });
|
|
37
37
|
|
|
38
38
|
if (opts?.parse) {
|
|
39
39
|
return (data as unknown[]).map(opts.parse);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import HttpClient from "../utils/httpClient";
|
|
2
|
+
import {
|
|
3
|
+
SecurityLog,
|
|
4
|
+
GetSecurityLogsParams,
|
|
5
|
+
} from "../types/securityLogTypes";
|
|
6
|
+
|
|
7
|
+
export default class SecurityLogs {
|
|
8
|
+
private httpClient: HttpClient;
|
|
9
|
+
|
|
10
|
+
constructor(httpClient: HttpClient) {
|
|
11
|
+
this.httpClient = httpClient;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Fetch multiple SecurityLogs with optional filtering and pagination.
|
|
16
|
+
* @param {Object} params - The parameters for filtering and pagination.
|
|
17
|
+
* @param {number} [params.PermType] - Optional. Filter by permission type (see Audit Trail Permissions doc).
|
|
18
|
+
* @param {number} [params.Offset] - Optional. Pagination offset for results.
|
|
19
|
+
* @returns {Promise<Fee[]>} - A list of securitylogs.
|
|
20
|
+
*/
|
|
21
|
+
public async getSecurityLogs({
|
|
22
|
+
PermType,
|
|
23
|
+
Offset,
|
|
24
|
+
}: GetSecurityLogsParams = {}): Promise<SecurityLog[]> {
|
|
25
|
+
const params = {
|
|
26
|
+
PermType,
|
|
27
|
+
Offset,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return this.httpClient.get<SecurityLog[]>("/securitylogs", params);
|
|
31
|
+
}
|
|
32
|
+
}
|
package/src/openDental.ts
CHANGED
|
@@ -34,6 +34,7 @@ import MedicationPats from "./api/medicationPats";
|
|
|
34
34
|
import ProcTPs from "./api/procTPs";
|
|
35
35
|
import ProcNotes from "./api/procNotes";
|
|
36
36
|
import Queries from "./api/queries";
|
|
37
|
+
import SecurityLogs from "./api/securityLogs";
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
import * as Transformers from './transformers';
|
|
@@ -397,7 +398,7 @@ class OpenDental {
|
|
|
397
398
|
}
|
|
398
399
|
|
|
399
400
|
/**
|
|
400
|
-
* Create a new instance of the
|
|
401
|
+
* Create a new instance of the Queries API.
|
|
401
402
|
*/
|
|
402
403
|
public static Queries() {
|
|
403
404
|
if (!this.httpClient) {
|
|
@@ -406,6 +407,16 @@ class OpenDental {
|
|
|
406
407
|
return new Queries(this.httpClient);
|
|
407
408
|
}
|
|
408
409
|
|
|
410
|
+
/**
|
|
411
|
+
* Create a new instance of the SecurityLogs API.
|
|
412
|
+
*/
|
|
413
|
+
public static SecurityLogs() {
|
|
414
|
+
if (!this.httpClient) {
|
|
415
|
+
throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
|
|
416
|
+
}
|
|
417
|
+
return new SecurityLogs(this.httpClient);
|
|
418
|
+
}
|
|
419
|
+
|
|
409
420
|
/**
|
|
410
421
|
* Access stateless Transformers (no initialization needed)
|
|
411
422
|
*/
|
package/src/types/queryTypes.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parameters for
|
|
2
|
+
* Parameters for Queries PUT ShortQuery
|
|
3
|
+
* Endpoint: PUT /queries/ShortQuery?Offset=#
|
|
4
|
+
* Body: { SqlCommand: string }
|
|
5
|
+
* Returns: up to 100 rows; use Queries POST for longer results.
|
|
3
6
|
* @see https://www.opendental.com/site/apiqueries.html
|
|
4
7
|
*/
|
|
5
8
|
export interface ShortQueryParams {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/** Optional pagination offset (goes in query string) */
|
|
9
|
-
Offset?: number;
|
|
9
|
+
SqlCommand: string; // Required (in request body)
|
|
10
|
+
Offset?: number; // Optional (in query string)
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
/** Generic result rows for ShortQuery; supply Row when you know the shape */
|
|
13
14
|
export type ShortQueryResult<Row = unknown> = Row[];
|
|
14
15
|
|
|
15
|
-
/** Optional runtime
|
|
16
|
+
/** Optional runtime validator for rows (e.g., Zod) */
|
|
16
17
|
export type RowParser<Row> = (value: unknown) => Row;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a securityLogs in Open Dental
|
|
3
|
+
* @see https://www.opendental.com/site/apisecuritylogs.html
|
|
4
|
+
*/
|
|
5
|
+
export interface SecurityLog {
|
|
6
|
+
SecurityLogNum: number; // Primary key.
|
|
7
|
+
PermType: string; // Audit trail permission name (e.g., "PatientCreate", "PatientEdit").
|
|
8
|
+
UserNum: number; // FK to userod.UserNum (often 0 for API actions).
|
|
9
|
+
LogDateTime: string; // Date/time string of the log entry (server local).
|
|
10
|
+
LogText: string; // Description (e.g., "Created by API ...").
|
|
11
|
+
PatNum?: number; // Optional. FK to patient.PatNum when applicable.
|
|
12
|
+
CompName?: string; // Optional. Workstation/computer name (e.g., "JUSTINE").
|
|
13
|
+
LogSource?: string; // Optional. Source of the entry (e.g., "API").
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Parameters for GET /securitylogs
|
|
18
|
+
* Filters logs for the requesting API developer.
|
|
19
|
+
* @see https://www.opendental.com/site/apisecuritylogs.html
|
|
20
|
+
*/
|
|
21
|
+
export interface GetSecurityLogsParams {
|
|
22
|
+
PermType?: string; // Optional. Filter by permission type (see Audit Trail Permissions doc).
|
|
23
|
+
Offset?: number; // Optional. For pagination.
|
|
24
|
+
}
|