@rinse-dental/open-dental 2.4.17 → 2.5.1

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.
@@ -0,0 +1,13 @@
1
+ import HttpClient from "../utils/httpClient";
2
+ import { AppointmentType } from "../types/appoinmentTypesType";
3
+ export default class AppointmentTypes {
4
+ private httpClient;
5
+ constructor(httpClient: HttpClient);
6
+ /**
7
+ * Fetch all AppointmentTypes.
8
+ * @returns {Promise<AppointmentType[]>} - A list of appointment types.
9
+ * @throws {Error} - If the API returns an error.
10
+ */
11
+ getAppointmentTypes(): Promise<AppointmentType[]>;
12
+ }
13
+ //# sourceMappingURL=appointmentTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appointmentTypes.d.ts","sourceRoot":"","sources":["../../src/api/appointmentTypes.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,eAAe,EAChB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACnC,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC;;;;OAIG;IACU,mBAAmB,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;CAG/D"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class AppointmentTypes {
4
+ httpClient;
5
+ constructor(httpClient) {
6
+ this.httpClient = httpClient;
7
+ }
8
+ /**
9
+ * Fetch all AppointmentTypes.
10
+ * @returns {Promise<AppointmentType[]>} - A list of appointment types.
11
+ * @throws {Error} - If the API returns an error.
12
+ */
13
+ async getAppointmentTypes() {
14
+ return await this.httpClient.get("/appointmenttypes");
15
+ }
16
+ }
17
+ exports.default = AppointmentTypes;
@@ -35,6 +35,7 @@ import ProcTPs from "./api/procTPs";
35
35
  import ProcNotes from "./api/procNotes";
36
36
  import Queries from "./api/queries";
37
37
  import SecurityLogs from "./api/securityLogs";
38
+ import AppointmentTypes from "./api/appointmentTypes";
38
39
  import * as Transformers from './transformers';
39
40
  declare class OpenDental {
40
41
  private static httpClient;
@@ -190,6 +191,10 @@ declare class OpenDental {
190
191
  * Create a new instance of the SecurityLogs API.
191
192
  */
192
193
  static SecurityLogs(): SecurityLogs;
194
+ /**
195
+ * Create a new instance of the SecurityLogs API.
196
+ */
197
+ static AppointmentTypes(): AppointmentTypes;
193
198
  /**
194
199
  * Access stateless Transformers (no initialization needed)
195
200
  */
@@ -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,CAAC;AACtD,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,QAAQ,MAAM,gBAAgB,CAA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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;;KAEC;WACa,SAAS;IAOvB;;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;;KAEC;WACa,gBAAgB;IAO9B;;OAEG;WACW,YAAY;CAI3B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -75,6 +75,7 @@ const procTPs_1 = __importDefault(require("./api/procTPs"));
75
75
  const procNotes_1 = __importDefault(require("./api/procNotes"));
76
76
  const queries_1 = __importDefault(require("./api/queries"));
77
77
  const securityLogs_1 = __importDefault(require("./api/securityLogs"));
78
+ const appointmentTypes_1 = __importDefault(require("./api/appointmentTypes"));
78
79
  const Transformers = __importStar(require("./transformers"));
79
80
  class OpenDental {
80
81
  static httpClient;
@@ -422,6 +423,15 @@ class OpenDental {
422
423
  }
423
424
  return new securityLogs_1.default(this.httpClient);
424
425
  }
426
+ /**
427
+ * Create a new instance of the SecurityLogs API.
428
+ */
429
+ static AppointmentTypes() {
430
+ if (!this.httpClient) {
431
+ throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
432
+ }
433
+ return new appointmentTypes_1.default(this.httpClient);
434
+ }
425
435
  /**
426
436
  * Access stateless Transformers (no initialization needed)
427
437
  */
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Represents an AppointmentType that is assigned to an Appointment in the Open Dental system.
3
+ * @see https://www.opendental.com/site/apiappointmenttypes.html
4
+ */
5
+ export interface AppointmentType {
6
+ AppointmentTypeNum?: number;
7
+ AppointmentTypeName?: string;
8
+ appointmentTypeColor?: string;
9
+ IsHidden?: 'true' | 'false';
10
+ Pattern?: string;
11
+ CodeStr?: string;
12
+ CodeStrRequired?: string;
13
+ RequiredProcCodesNeeded?: string;
14
+ BlockoutTypes?: string;
15
+ }
16
+ //# sourceMappingURL=appoinmentTypesType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appoinmentTypesType.d.ts","sourceRoot":"","sources":["../../src/types/appoinmentTypesType.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rinse-dental/open-dental",
3
- "version": "2.4.17",
3
+ "version": "2.5.1",
4
4
  "description": "A TypeScript library for easily accessing Open Dental APIs.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,21 @@
1
+ import HttpClient from "../utils/httpClient";
2
+ import {
3
+ AppointmentType,
4
+ } from "../types/appoinmentTypesType";
5
+
6
+ export default class AppointmentTypes {
7
+ private httpClient: HttpClient;
8
+
9
+ constructor(httpClient: HttpClient) {
10
+ this.httpClient = httpClient;
11
+ }
12
+
13
+ /**
14
+ * Fetch all AppointmentTypes.
15
+ * @returns {Promise<AppointmentType[]>} - A list of appointment types.
16
+ * @throws {Error} - If the API returns an error.
17
+ */
18
+ public async getAppointmentTypes(): Promise<AppointmentType[]> {
19
+ return await this.httpClient.get<AppointmentType[]>("/appointmenttypes");
20
+ }
21
+ }
package/src/openDental.ts CHANGED
@@ -36,10 +36,11 @@ import ProcTPs from "./api/procTPs";
36
36
  import ProcNotes from "./api/procNotes";
37
37
  import Queries from "./api/queries";
38
38
  import SecurityLogs from "./api/securityLogs";
39
-
39
+ import AppointmentTypes from "./api/appointmentTypes";
40
40
 
41
41
  import * as Transformers from './transformers';
42
42
 
43
+
43
44
  class OpenDental {
44
45
  private static httpClient: HttpClient;
45
46
 
@@ -428,6 +429,16 @@ class OpenDental {
428
429
  return new SecurityLogs(this.httpClient);
429
430
  }
430
431
 
432
+ /**
433
+ * Create a new instance of the SecurityLogs API.
434
+ */
435
+ public static AppointmentTypes() {
436
+ if (!this.httpClient) {
437
+ throw new Error("OpenDental not initialized. Call OpenDental.initialize() first.");
438
+ }
439
+ return new AppointmentTypes(this.httpClient);
440
+ }
441
+
431
442
  /**
432
443
  * Access stateless Transformers (no initialization needed)
433
444
  */
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Represents an AppointmentType that is assigned to an Appointment in the Open Dental system.
3
+ * @see https://www.opendental.com/site/apiappointmenttypes.html
4
+ */
5
+ export interface AppointmentType {
6
+ AppointmentTypeNum?: number; //PK
7
+ AppointmentTypeName?: string;
8
+ appointmentTypeColor?: string;
9
+ IsHidden?: 'true' | 'false'; // Either "true" or "false".
10
+ Pattern?: string; //
11
+ CodeStr?: string; //
12
+ CodeStrRequired?: string; //
13
+ RequiredProcCodesNeeded?: string; //
14
+ BlockoutTypes?: string; //
15
+ }
16
+