@metriport/commonwell-sdk 5.9.16 → 6.0.1-alpha.0

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.
Files changed (135) hide show
  1. package/README.md +36 -12
  2. package/dist/client/common.d.ts +34 -0
  3. package/dist/client/common.d.ts.map +1 -0
  4. package/dist/client/common.js +15 -0
  5. package/dist/client/common.js.map +1 -0
  6. package/dist/client/commonwell-api.d.ts +87 -45
  7. package/dist/client/commonwell-api.d.ts.map +1 -1
  8. package/dist/client/commonwell-member-api.d.ts +21 -0
  9. package/dist/client/commonwell-member-api.d.ts.map +1 -0
  10. package/dist/client/commonwell-member-api.js +3 -0
  11. package/dist/client/commonwell-member-api.js.map +1 -0
  12. package/dist/client/commonwell-member.d.ts +166 -0
  13. package/dist/client/commonwell-member.d.ts.map +1 -0
  14. package/dist/client/commonwell-member.js +301 -0
  15. package/dist/client/commonwell-member.js.map +1 -0
  16. package/dist/client/commonwell.d.ts +167 -356
  17. package/dist/client/commonwell.d.ts.map +1 -1
  18. package/dist/client/commonwell.js +325 -622
  19. package/dist/client/commonwell.js.map +1 -1
  20. package/dist/common/__tests__/util.test.d.ts +2 -0
  21. package/dist/common/__tests__/util.test.d.ts.map +1 -0
  22. package/dist/common/__tests__/util.test.js +51 -0
  23. package/dist/common/__tests__/util.test.js.map +1 -0
  24. package/dist/common/certificate.d.ts +3 -0
  25. package/dist/common/certificate.d.ts.map +1 -0
  26. package/dist/common/certificate.js +11 -0
  27. package/dist/common/certificate.js.map +1 -0
  28. package/dist/common/fileDownload.d.ts +26 -1
  29. package/dist/common/fileDownload.d.ts.map +1 -1
  30. package/dist/common/fileDownload.js +12 -3
  31. package/dist/common/fileDownload.js.map +1 -1
  32. package/dist/common/make-jwt.d.ts +53 -18
  33. package/dist/common/make-jwt.d.ts.map +1 -1
  34. package/dist/common/make-jwt.js +77 -44
  35. package/dist/common/make-jwt.js.map +1 -1
  36. package/dist/common/util.d.ts +28 -30
  37. package/dist/common/util.d.ts.map +1 -1
  38. package/dist/common/util.js +47 -75
  39. package/dist/common/util.js.map +1 -1
  40. package/dist/common/zod.d.ts +9 -0
  41. package/dist/common/zod.d.ts.map +1 -0
  42. package/dist/common/zod.js +23 -0
  43. package/dist/common/zod.js.map +1 -0
  44. package/dist/index.d.ts +14 -16
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +16 -35
  47. package/dist/index.js.map +1 -1
  48. package/dist/models/__tests__/demographics.test.d.ts +2 -0
  49. package/dist/models/__tests__/demographics.test.d.ts.map +1 -0
  50. package/dist/models/__tests__/demographics.test.js +96 -0
  51. package/dist/models/__tests__/demographics.test.js.map +1 -0
  52. package/dist/models/address.d.ts +37 -27
  53. package/dist/models/address.d.ts.map +1 -1
  54. package/dist/models/address.js +23 -15
  55. package/dist/models/address.js.map +1 -1
  56. package/dist/models/certificates.d.ts +17 -98
  57. package/dist/models/certificates.d.ts.map +1 -1
  58. package/dist/models/certificates.js +8 -9
  59. package/dist/models/certificates.js.map +1 -1
  60. package/dist/models/contact.d.ts +33 -24
  61. package/dist/models/contact.d.ts.map +1 -1
  62. package/dist/models/contact.js +45 -14
  63. package/dist/models/contact.js.map +1 -1
  64. package/dist/models/date.d.ts +4 -0
  65. package/dist/models/date.d.ts.map +1 -0
  66. package/dist/models/date.js +10 -0
  67. package/dist/models/date.js.map +1 -0
  68. package/dist/models/demographics.d.ts +181 -204
  69. package/dist/models/demographics.d.ts.map +1 -1
  70. package/dist/models/demographics.js +62 -24
  71. package/dist/models/demographics.js.map +1 -1
  72. package/dist/models/document.d.ts +6439 -3418
  73. package/dist/models/document.d.ts.map +1 -1
  74. package/dist/models/document.js +59 -107
  75. package/dist/models/document.js.map +1 -1
  76. package/dist/models/facility.d.ts +36 -31
  77. package/dist/models/facility.d.ts.map +1 -1
  78. package/dist/models/facility.js.map +1 -1
  79. package/dist/models/human-name.d.ts +32 -29
  80. package/dist/models/human-name.d.ts.map +1 -1
  81. package/dist/models/human-name.js +13 -11
  82. package/dist/models/human-name.js.map +1 -1
  83. package/dist/models/identifier.d.ts +140 -60
  84. package/dist/models/identifier.d.ts.map +1 -1
  85. package/dist/models/identifier.js +65 -24
  86. package/dist/models/identifier.js.map +1 -1
  87. package/dist/models/organization.d.ts +1571 -450
  88. package/dist/models/organization.d.ts.map +1 -1
  89. package/dist/models/organization.js +67 -40
  90. package/dist/models/organization.js.map +1 -1
  91. package/dist/models/patient-organization.d.ts +31 -10
  92. package/dist/models/patient-organization.d.ts.map +1 -1
  93. package/dist/models/patient-organization.js +5 -5
  94. package/dist/models/patient-organization.js.map +1 -1
  95. package/dist/models/patient.d.ts +3150 -3416
  96. package/dist/models/patient.d.ts.map +1 -1
  97. package/dist/models/patient.js +47 -34
  98. package/dist/models/patient.js.map +1 -1
  99. package/dist/models/period.d.ts +6 -6
  100. package/dist/models/period.d.ts.map +1 -1
  101. package/dist/models/period.js +4 -4
  102. package/dist/models/period.js.map +1 -1
  103. package/dist/models/reference.d.ts +109 -0
  104. package/dist/models/reference.d.ts.map +1 -0
  105. package/dist/models/reference.js +12 -0
  106. package/dist/models/reference.js.map +1 -0
  107. package/package.json +3 -3
  108. package/dist/client/document.d.ts +0 -8
  109. package/dist/client/document.d.ts.map +0 -1
  110. package/dist/client/document.js +0 -60
  111. package/dist/client/document.js.map +0 -1
  112. package/dist/models/__tests__/document.d.ts +0 -29
  113. package/dist/models/__tests__/document.d.ts.map +0 -1
  114. package/dist/models/__tests__/document.js +0 -131
  115. package/dist/models/__tests__/document.js.map +0 -1
  116. package/dist/models/enrollment-summary.d.ts +0 -19
  117. package/dist/models/enrollment-summary.d.ts.map +0 -1
  118. package/dist/models/enrollment-summary.js +0 -15
  119. package/dist/models/enrollment-summary.js.map +0 -1
  120. package/dist/models/iso-date.d.ts +0 -4
  121. package/dist/models/iso-date.d.ts.map +0 -1
  122. package/dist/models/iso-date.js +0 -7
  123. package/dist/models/iso-date.js.map +0 -1
  124. package/dist/models/iso-datetime.d.ts +0 -4
  125. package/dist/models/iso-datetime.d.ts.map +0 -1
  126. package/dist/models/iso-datetime.js +0 -9
  127. package/dist/models/iso-datetime.js.map +0 -1
  128. package/dist/models/link.d.ts +0 -1219
  129. package/dist/models/link.d.ts.map +0 -1
  130. package/dist/models/link.js +0 -53
  131. package/dist/models/link.js.map +0 -1
  132. package/dist/models/person.d.ts +0 -2443
  133. package/dist/models/person.d.ts.map +0 -1
  134. package/dist/models/person.js +0 -44
  135. package/dist/models/person.js.map +0 -1
package/README.md CHANGED
@@ -4,19 +4,43 @@ SDK to simplify CommonWell API integration - by Metriport Inc.
4
4
 
5
5
  ## Usage
6
6
 
7
+ To connect to the CommonWell API, you can use the one of the options below:
8
+
9
+ - `CommonWellMember` class:
10
+ - This class is used to connect to the CommonWell API as a member organization.
11
+ - It is used to create, update, and delete organizations, certificates, and other resources.
12
+ - `CommonWell` class:
13
+ - This class is used to connect to the CommonWell API as a contributor organization.
14
+ - It is used to create, update, link, and delete patients, query documents, and other resources.
15
+
16
+ ### CommonWellMember
17
+
18
+ ```typescript
19
+ import { APIMode, CommonWellMember } from "@metriport/commonwell-sdk";
20
+
21
+ const commonWellMember = new CommonWellMember({
22
+ orgCert: "<member-certificate-string>",
23
+ rsaPrivateKey: "<member-private-key-string>",
24
+ memberName: "<member-name>",
25
+ memberId: "<member-id>",
26
+ apiMode: APIMode.integration, // or APIMode.production
27
+ });
7
28
  ```
8
- import {
9
- APIMode,
10
- CommonWell
11
- } from "@metriport/commonwell-sdk";
12
-
13
- const commonWell = new CommonWell(
14
- "CERTIFICATE",
15
- "PRIVATE_KEY",
16
- "Leopard Medical",
17
- "2.16.840.1.113883.3.666.7.777",
18
- APIMode.production
19
- );
29
+
30
+ ### CommonWell
31
+
32
+ ```typescript
33
+ import { APIMode, CommonWell } from "@metriport/commonwell-sdk";
34
+
35
+ const commonWell = new CommonWell({
36
+ orgCert: "<contributor-certificate-string>",
37
+ rsaPrivateKey: "<contributor-private-key-string>",
38
+ orgName: "<contributor-name>",
39
+ oid: "<contributor-id>",
40
+ homeCommunityId: "<contributor-home-community-id>",
41
+ npi: "<contributor-npi>",
42
+ apiMode: APIMode.integration, // or APIMode.production
43
+ });
20
44
  ```
21
45
 
22
46
  ```
@@ -0,0 +1,34 @@
1
+ import { ExecuteWithRetriesOptions, PurposeOfUse } from "@metriport/shared";
2
+ export declare const DEFAULT_AXIOS_TIMEOUT_SECONDS = 120;
3
+ export declare const defaultOnError500: OnError500Options;
4
+ export declare enum APIMode {
5
+ integration = "integration",
6
+ production = "production"
7
+ }
8
+ export type OnError500Options = Omit<ExecuteWithRetriesOptions<unknown>, "shouldRetry"> & {
9
+ retry: boolean;
10
+ };
11
+ export interface CommonWellOptions {
12
+ /** Connection timeout in milliseconds. */
13
+ timeout?: number;
14
+ /** Parameters for handling internal server errors (status code 500). */
15
+ onError500?: OnError500Options;
16
+ }
17
+ /**
18
+ * @see https://www.commonwellalliance.org/specification/
19
+ */
20
+ export type BaseRequestMetadata = {
21
+ /**
22
+ * The practitioner role of the entity making this request.
23
+ * Valid role values: https://hl7.org/fhir/R4/valueset-practitioner-role.html
24
+ */
25
+ role: string;
26
+ /**
27
+ * The name of the user as required by HIPAA Privacy Disclosure Accounting.
28
+ * This is NOT the patient ID.
29
+ */
30
+ subjectId: string;
31
+ /** The purpose of use (POU) for this request - the reason for the request. */
32
+ purposeOfUse: PurposeOfUse;
33
+ };
34
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/client/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE5E,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAEjD,eAAO,MAAM,iBAAiB,EAAE,iBAI/B,CAAC;AAEF,oBAAY,OAAO;IACjB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;CAC1B;AAED,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,GAAG;IACxF,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.APIMode = exports.defaultOnError500 = exports.DEFAULT_AXIOS_TIMEOUT_SECONDS = void 0;
4
+ exports.DEFAULT_AXIOS_TIMEOUT_SECONDS = 120;
5
+ exports.defaultOnError500 = {
6
+ retry: false,
7
+ maxAttempts: 1,
8
+ initialDelay: 0,
9
+ };
10
+ var APIMode;
11
+ (function (APIMode) {
12
+ APIMode["integration"] = "integration";
13
+ APIMode["production"] = "production";
14
+ })(APIMode = exports.APIMode || (exports.APIMode = {}));
15
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/client/common.ts"],"names":[],"mappings":";;;AAEa,QAAA,6BAA6B,GAAG,GAAG,CAAC;AAEpC,QAAA,iBAAiB,GAAsB;IAClD,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,CAAC;IACd,YAAY,EAAE,CAAC;CAChB,CAAC;AAEF,IAAY,OAGX;AAHD,WAAY,OAAO;IACjB,sCAA2B,CAAA;IAC3B,oCAAyB,CAAA;AAC3B,CAAC,EAHW,OAAO,GAAP,eAAO,KAAP,eAAO,QAGlB"}
@@ -1,50 +1,92 @@
1
1
  /// <reference types="node" />
2
+ import { PurposeOfUse } from "@metriport/shared";
2
3
  import * as stream from "stream";
3
- import { RequestMetadata } from "./commonwell";
4
- import { CertificateParam, CertificateResp } from "../models/certificates";
5
- import { DocumentQueryResponse, DocumentQueryFullResponse } from "../models/document";
6
- import { Identifier, StrongId } from "../models/identifier";
7
- import { NetworkLink, PatientLinkProxy } from "../models/link";
8
- import { Organization, OrganizationList } from "../models/organization";
9
- import { Patient, PatientNetworkLinkResp, PatientSearchResp, PatientLinkResp } from "../models/patient";
10
- import { PatientLink, PatientLinkSearchResp, Person, PersonSearchResp } from "../models/person";
4
+ import { DocumentQueryFullResponse, DocumentReference, DocumentStatus } from "../models/document";
5
+ import { Patient, PatientCollection, PatientCollectionItem, StatusResponse } from "../models/patient";
6
+ export type BaseOptions = {
7
+ meta?: OrganizationRequestMetadata;
8
+ };
9
+ export type OrganizationRequestMetadata = {
10
+ role: string;
11
+ subjectId: string;
12
+ purposeOfUse: PurposeOfUse;
13
+ npi: string;
14
+ /**
15
+ * Required for Delegation of Authority (DOA) requests.
16
+ *
17
+ * When sending delegated requests, the delegate organization must include information about the
18
+ * principal organization.
19
+ *
20
+ * The value MUST be the Directory Entry assigned to the Principal for whom the Delegate is
21
+ * initiating the request, formatted using the FHIR (Fast Healthcare Interoperability Resources)
22
+ * Resource (Reference?) format.
23
+ *
24
+ * Example: "Organization/urn:oid:2.16.840.1.113883.3.7204.1"
25
+ *
26
+ * @see https://www.commonwellalliance.org/specification/
27
+ */
28
+ authGrantorReference?: string;
29
+ };
30
+ export type GetPatientParams = {
31
+ id: string;
32
+ assignAuthority: string;
33
+ assignAuthorityType?: string | undefined;
34
+ };
35
+ export type RetrieveDocumentResponse = {
36
+ contentType: string;
37
+ size: number;
38
+ };
39
+ export interface DocumentQueryParams {
40
+ /** ID of who/what is the subject of the document */
41
+ subjectId?: string;
42
+ /** Author information for the document */
43
+ author?: {
44
+ /** Given name of who and/or what authored the document */
45
+ given?: string;
46
+ /** Family name of who and/or what authored the document */
47
+ family?: string;
48
+ };
49
+ /** Status of the document reference */
50
+ status?: DocumentStatus;
51
+ /** Time of service period being documented */
52
+ period?: {
53
+ /** Time of service start that is being documented. Comparators: ge */
54
+ start?: string;
55
+ /** Time of service end that is being documented. Comparators: le */
56
+ end?: string;
57
+ };
58
+ /** When the document reference was created */
59
+ date?: {
60
+ /** When the document reference was created. Comparators: ge */
61
+ start?: string;
62
+ /** When the document reference was created. Comparators: le */
63
+ end?: string;
64
+ };
65
+ }
11
66
  export interface CommonWellAPI {
12
- get lastReferenceHeader(): string | undefined;
13
- createOrg(meta: RequestMetadata, organization: Organization): Promise<Organization>;
14
- updateOrg(meta: RequestMetadata, organization: Organization, id: string): Promise<Organization>;
15
- getAllOrgs(meta: RequestMetadata, summary?: boolean, offset?: number, limit?: number, sort?: string): Promise<OrganizationList>;
16
- getOneOrg(meta: RequestMetadata, id: string): Promise<Organization | undefined>;
17
- addCertificateToOrg(meta: RequestMetadata, certificate: CertificateParam, id: string): Promise<CertificateResp>;
18
- replaceCertificateForOrg(meta: RequestMetadata, certificate: CertificateParam, id: string): Promise<CertificateResp>;
19
- deleteCertificateFromOrg(meta: RequestMetadata, id: string, thumbprint: string, purpose: string): Promise<void>;
20
- getCertificatesFromOrg(meta: RequestMetadata, id: string, thumbprint?: string, purpose?: string): Promise<CertificateResp>;
21
- getCertificatesFromOrgByThumbprint(meta: RequestMetadata, id: string, thumbprint: string, purpose?: string): Promise<CertificateResp>;
22
- getCertificatesFromOrgByThumbprintAndPurpose(meta: RequestMetadata, id: string, thumbprint: string, purpose: string): Promise<CertificateResp>;
23
- enrollPerson(meta: RequestMetadata, person: Person): Promise<Person>;
24
- searchPerson(meta: RequestMetadata, key: string, system: string): Promise<PersonSearchResp>;
25
- searchPersonByPatientDemo(meta: RequestMetadata, patientId: string): Promise<PersonSearchResp>;
26
- getPersonById(meta: RequestMetadata, personId: string): Promise<Person>;
27
- updatePerson(meta: RequestMetadata, person: Person, id: string): Promise<Person>;
28
- patientMatch(meta: RequestMetadata, id: string): Promise<PatientSearchResp>;
29
- addPatientLink(meta: RequestMetadata, personId: string, patientUri: string, patientStrongId?: StrongId): Promise<PatientLink>;
30
- reenrollPerson(meta: RequestMetadata, id: string): Promise<Person>;
31
- unenrollPerson(meta: RequestMetadata, id: string): Promise<Person>;
32
- deletePerson(meta: RequestMetadata, id: string): Promise<void>;
33
- registerPatient(meta: RequestMetadata, patient: Patient): Promise<Patient>;
34
- getPatient(meta: RequestMetadata, id: string): Promise<Patient>;
35
- searchPatient(meta: RequestMetadata, fname: string, lname: string, dob: string, gender?: string, zip?: string): Promise<PatientSearchResp>;
36
- updatePatient(meta: RequestMetadata, patient: Patient, id: string): Promise<Patient>;
37
- mergePatients(meta: RequestMetadata, nonSurvivingPatientId: string, referencePatientLink: string): Promise<void>;
38
- getNetworkLinks(meta: RequestMetadata, patientId: string): Promise<PatientNetworkLinkResp>;
39
- deletePatient(meta: RequestMetadata, id: string): Promise<void>;
40
- queryDocuments(meta: RequestMetadata, patientId: string): Promise<DocumentQueryResponse>;
41
- queryDocumentsFull(meta: RequestMetadata, patientId: string): Promise<DocumentQueryFullResponse>;
42
- retrieveDocument(meta: RequestMetadata, inputUrl: string, outputStream: stream.Writable): Promise<void>;
43
- upgradeOrDowngradeNetworkLink(meta: RequestMetadata, href: string, proxy?: PatientLinkProxy): Promise<NetworkLink>;
44
- updatePatientLink(meta: RequestMetadata, patientLinkUri: string, patientUri?: string, identifier?: Identifier): Promise<PatientLink>;
45
- getPatientLinks(meta: RequestMetadata, personId: string, limitToOrg?: boolean): Promise<PatientLinkSearchResp>;
46
- getPatientLink(meta: RequestMetadata, personId: string, patientId: string): Promise<PatientLinkResp>;
47
- deletePatientLink(meta: RequestMetadata, patientLinkUri: string): Promise<void>;
48
- resetPatientLink(meta: RequestMetadata, personId: string, patientId: string): Promise<void>;
67
+ get lastTransactionId(): string | undefined;
68
+ createOrUpdatePatient(patient: Patient, options?: BaseOptions): Promise<PatientCollection>;
69
+ getPatient(params: GetPatientParams, options?: BaseOptions): Promise<PatientCollectionItem | undefined>;
70
+ getPatient(id: string, options?: BaseOptions): Promise<PatientCollectionItem | undefined>;
71
+ mergePatients({ nonSurvivingPatientId, survivingPatientId, }: {
72
+ nonSurvivingPatientId: string;
73
+ survivingPatientId: string;
74
+ }, options?: BaseOptions): Promise<StatusResponse>;
75
+ deletePatient(id: string, options?: BaseOptions): Promise<void>;
76
+ getPatientLinksByPatientId(patientId: string, options?: BaseOptions): Promise<PatientCollection>;
77
+ getProbableLinksById(patientId: string, options?: BaseOptions): Promise<PatientCollection>;
78
+ getProbableLinksByDemographics(params: {
79
+ firstName: string;
80
+ lastName: string;
81
+ dob: string;
82
+ gender: string;
83
+ zip: string;
84
+ }, options?: BaseOptions): Promise<PatientCollection>;
85
+ linkPatients(urlToLinkPatients: string, options?: BaseOptions): Promise<StatusResponse>;
86
+ unlinkPatients(urlToUnlinkPatients: string, options?: BaseOptions): Promise<StatusResponse>;
87
+ resetPatientLinks(urlToResetPatientLinks: string, options?: BaseOptions): Promise<StatusResponse>;
88
+ queryDocuments(patientId: string, options?: BaseOptions & DocumentQueryParams): Promise<DocumentReference[]>;
89
+ queryDocumentsFull(patientId: string, options?: BaseOptions): Promise<DocumentQueryFullResponse>;
90
+ retrieveDocument(inputUrl: string, outputStream: stream.Writable, options?: BaseOptions): Promise<RetrieveDocumentResponse>;
49
91
  }
50
92
  //# sourceMappingURL=commonwell-api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"commonwell-api.d.ts","sourceRoot":"","sources":["../../src/client/commonwell-api.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACtF,OAAO,EAAE,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AC;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;KACb,EACD,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE9B,YAAY,CAAC,iBAAiB,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IACxF,cAAc,CAAC,mBAAmB,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAC5F,iBAAiB,CAAC,sBAAsB,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAElG,cAAc,CACZ,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,WAAW,GAAG,mBAAmB,GAC1C,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAChC,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAEjG,gBAAgB,CACd,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,CAAC,QAAQ,EAC7B,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACtC"}
@@ -0,0 +1,21 @@
1
+ import { CertificateParam, CertificateResp } from "../models/certificates";
2
+ import { Organization, OrganizationList } from "../models/organization";
3
+ import { BaseRequestMetadata } from "./common";
4
+ export type BaseOptions = {
5
+ meta?: MemberRequestMetadata;
6
+ };
7
+ export type MemberRequestMetadata = BaseRequestMetadata;
8
+ export interface CommonWellMemberAPI {
9
+ get lastTransactionId(): string | undefined;
10
+ createOrg(organization: Organization, options?: BaseOptions): Promise<Organization>;
11
+ updateOrg(organization: Organization, options?: BaseOptions): Promise<Organization>;
12
+ getAllOrgs(summary?: boolean, offset?: number, limit?: number, sort?: string, options?: BaseOptions): Promise<OrganizationList>;
13
+ getOneOrg(id: string, options?: BaseOptions): Promise<Organization | undefined>;
14
+ addCertificateToOrg(certificate: CertificateParam, id: string, options?: BaseOptions): Promise<CertificateResp>;
15
+ replaceCertificateForOrg(certificate: CertificateParam, id: string, options?: BaseOptions): Promise<CertificateResp>;
16
+ deleteCertificateFromOrg(id: string, thumbprint: string, purpose: string, options?: BaseOptions): Promise<string>;
17
+ getCertificatesFromOrg(id: string, thumbprint?: string, purpose?: string, options?: BaseOptions): Promise<CertificateResp>;
18
+ getCertificatesFromOrgByThumbprint(id: string, thumbprint: string, purpose?: string, options?: BaseOptions): Promise<CertificateResp>;
19
+ getCertificatesFromOrgByThumbprintAndPurpose(id: string, thumbprint: string, purpose: string, options?: BaseOptions): Promise<CertificateResp>;
20
+ }
21
+ //# sourceMappingURL=commonwell-member-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commonwell-member-api.d.ts","sourceRoot":"","sources":["../../src/client/commonwell-member-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,qBAAqB,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,mBAAmB,CAAC;AAExD,MAAM,WAAW,mBAAmB;IAClC,IAAI,iBAAiB,IAAI,MAAM,GAAG,SAAS,CAAC;IAC5C,SAAS,CAAC,YAAY,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACpF,SAAS,CAAC,YAAY,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAC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 "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=commonwell-member-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commonwell-member-api.js","sourceRoot":"","sources":["../../src/client/commonwell-member-api.ts"],"names":[],"mappings":""}
@@ -0,0 +1,166 @@
1
+ import { AxiosInstance } from "axios";
2
+ import { CertificateParam, CertificateResp } from "../models/certificates";
3
+ import { Organization, OrganizationList } from "../models/organization";
4
+ import { APIMode, CommonWellOptions } from "./common";
5
+ import { BaseOptions, CommonWellMemberAPI } from "./commonwell-member-api";
6
+ /**
7
+ * Implementation of the CommonWell API, v4.
8
+ * @see https://www.commonwellalliance.org/specification/
9
+ *
10
+ * For the Organization management API (member API):
11
+ * @see https://commonwellalliance.sharepoint.com/sites/CommonWellServicesPlatform/SitePages/Organization-APIs.aspx
12
+ */
13
+ export declare class CommonWellMember implements CommonWellMemberAPI {
14
+ static integrationUrl: string;
15
+ static productionUrl: string;
16
+ static ORG_ENDPOINT: string;
17
+ static MEMBER_ENDPOINT: string;
18
+ readonly api: AxiosInstance;
19
+ private rsaPrivateKey;
20
+ private memberName;
21
+ private _memberId;
22
+ private httpsAgent;
23
+ private _lastTransactionId;
24
+ /**
25
+ * Creates a new instance of the CommonWell API client pertaining to an
26
+ * organization to make requests on behalf of.
27
+ *
28
+ * @param orgCert The certificate (public key) for the organization.
29
+ * @param rsaPrivateKey An RSA key corresponding to the specified orgCert.
30
+ * @param memberName The name of the member.
31
+ * @param memberId The ID of the member (not the OID).
32
+ * @param apiMode The mode the client will be running.
33
+ * @param options Optional parameters
34
+ * @param options.timeout Connection timeout in milliseconds, default 120 seconds.
35
+ */
36
+ constructor({ orgCert, rsaPrivateKey, memberName, memberId, apiMode, options, }: {
37
+ orgCert: string;
38
+ rsaPrivateKey: string;
39
+ memberName: string;
40
+ memberId: string;
41
+ apiMode: APIMode;
42
+ options?: CommonWellOptions;
43
+ });
44
+ get memberId(): string;
45
+ /**
46
+ * Returns the transaction ID from the last request.
47
+ */
48
+ get lastTransactionId(): string | undefined;
49
+ private postRequest;
50
+ private axiosSuccessfulResponse;
51
+ private axiosErrorResponse;
52
+ /**
53
+ * Create an org.
54
+ * See: https://commonwellalliance.sharepoint.com/sites/ServiceAdopter/SitePages/Organization-Management-API---Overview-and-Summary.aspx#post-a-new-organization
55
+ *
56
+ * @param organization The org to create.
57
+ * @param options Optional parameters.
58
+ * @param options.meta Metadata about the request. Defaults to the data used to initialize the client.
59
+ * @returns
60
+ */
61
+ createOrg(organization: Organization, options?: BaseOptions): Promise<Organization>;
62
+ /**
63
+ * Update an organization.
64
+ *
65
+ * @param organization The org to update.
66
+ * @param options Optional parameters.
67
+ * @param options.meta Metadata about the request. Defaults to the data used to initialize the client.
68
+ * @returns
69
+ */
70
+ updateOrg(organization: Organization, options?: BaseOptions): Promise<Organization>;
71
+ /**
72
+ * Get list of orgs.
73
+ * See: https://commonwellalliance.sharepoint.com/sites/ServiceAdopter/SitePages/Organization-Management-API---Overview-and-Summary.aspx#get-a-list-of-all-organizations
74
+ *
75
+ * @param summary Returns only summary data
76
+ * @param offset Sets an offset number from which recorded returns will begin
77
+ * @param limit Limits the number of returned records
78
+ * @param sort Specifies sort order
79
+ * @param options Optional parameters.
80
+ * @param options.meta Metadata about the request. Defaults to the data used to initialize the client.
81
+ * @returns
82
+ */
83
+ getAllOrgs(summary?: boolean, offset?: number, limit?: number, sort?: string, options?: BaseOptions): Promise<OrganizationList>;
84
+ /**
85
+ * Get one org.
86
+ * See: https://commonwellalliance.sharepoint.com/sites/ServiceAdopter/SitePages/Organization-Management-API---Overview-and-Summary.aspx#get-a-single-organization
87
+ *
88
+ * @param id The ID of the organization to be returned.
89
+ * @param options Optional parameters.
90
+ * @param options.meta Metadata about the request. Defaults to the data used to initialize the client.
91
+ * @returns
92
+ */
93
+ getOneOrg(id: string, options?: BaseOptions): Promise<Organization | undefined>;
94
+ /**
95
+ * Add certificate to org.
96
+ * See: https://commonwellalliance.sharepoint.com/sites/ServiceAdopter/SitePages/Organization-Management-API---Overview-and-Summary.aspx#post-new-certificates-to-organizations
97
+ *
98
+ * @param certificate The certificate to add to the org
99
+ * @param id The org to add a certificate to.
100
+ * @param options Optional parameters.
101
+ * @param options.meta Metadata about the request. Defaults to the data used to initialize the client.
102
+ * @returns
103
+ */
104
+ addCertificateToOrg(certificate: CertificateParam, id: string, options?: BaseOptions): Promise<CertificateResp>;
105
+ /**
106
+ * Replace certificate for org.
107
+ * See: https://commonwellalliance.sharepoint.com/sites/ServiceAdopter/SitePages/Organization-Management-API---Overview-and-Summary.aspx#put-a-list-of-certificates-into-an-organization
108
+ *
109
+ * @param certificate The certificate to replace for the org
110
+ * @param id The org to replace a certificate for.
111
+ * @param options Optional parameters.
112
+ * @param options.meta Metadata about the request. Defaults to the data used to initialize the client.
113
+ * @returns
114
+ */
115
+ replaceCertificateForOrg(certificate: CertificateParam, id: string, options?: BaseOptions): Promise<CertificateResp>;
116
+ /**
117
+ * Delete certificate from org.
118
+ * See: https://commonwellalliance.sharepoint.com/sites/ServiceAdopter/SitePages/Organization-Management-API---Overview-and-Summary.aspx#delete-certificates-by-thumbprint
119
+ *
120
+ * @param id The org to delete a certificate from.
121
+ * @param thumbprint The thumbprint from the certificate.
122
+ * @param purpose The purpose from the certificate.
123
+ * @param options Optional parameters.
124
+ * @param options.meta Metadata about the request. Defaults to the data used to initialize the client.
125
+ * @returns a string with the message resulting from the deletion
126
+ */
127
+ deleteCertificateFromOrg(id: string, thumbprint: string, purpose: string, options?: BaseOptions): Promise<string>;
128
+ /**
129
+ * Get certificate from org.
130
+ * See: https://commonwellalliance.sharepoint.com/sites/ServiceAdopter/SitePages/Organization-Management-API---Overview-and-Summary.aspx#get-certificates-for-an-organization
131
+ *
132
+ * @param id The org to get a certificate from
133
+ * @param thumbprint The thumbprint from the certificate
134
+ * @param purpose The purpose from the certificate
135
+ * @param options Optional parameters.
136
+ * @param options.meta Metadata about the request. Defaults to the data used to initialize the client.
137
+ * @returns
138
+ */
139
+ getCertificatesFromOrg(id: string, thumbprint?: string, purpose?: string, options?: BaseOptions): Promise<CertificateResp>;
140
+ /**
141
+ * Get certificate from org (by thumbprint).
142
+ * See: https://commonwellalliance.sharepoint.com/sites/ServiceAdopter/SitePages/Organization-Management-API---Overview-and-Summary.aspx#get-certificates-by-thumbprint
143
+ *
144
+ * @param id The org to get a certificate from
145
+ * @param thumbprint The thumbprint from the certificate
146
+ * @param purpose The purpose from the certificate
147
+ * @param options Optional parameters.
148
+ * @param options.meta Metadata about the request. Defaults to the data used to initialize the client.
149
+ * @returns
150
+ */
151
+ getCertificatesFromOrgByThumbprint(id: string, thumbprint: string, purpose?: string, options?: BaseOptions): Promise<CertificateResp>;
152
+ /**
153
+ * Get certificate from org (by thumbprint & purpose).
154
+ * See: https://commonwellalliance.sharepoint.com/sites/ServiceAdopter/SitePages/Organization-Management-API---Overview-and-Summary.aspx#get-certificates-by-thumbprint-and-purpose
155
+ *
156
+ * @param id The org to get a certificate from
157
+ * @param thumbprint The thumbprint from the certificate
158
+ * @param purpose The purpose from the certificate
159
+ * @param options Optional parameters.
160
+ * @param options.meta Metadata about the request. Defaults to the data used to initialize the client.
161
+ * @returns
162
+ */
163
+ getCertificatesFromOrgByThumbprintAndPurpose(id: string, thumbprint: string, purpose: string, options?: BaseOptions): Promise<CertificateResp>;
164
+ private buildQueryHeaders;
165
+ }
166
+ //# sourceMappingURL=commonwell-member.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commonwell-member.d.ts","sourceRoot":"","sources":["../../src/client/commonwell-member.ts"],"names":[],"mappings":"AACA,OAAc,EAAE,aAAa,EAAiB,MAAM,OAAO,CAAC;AAK5D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAyB,MAAM,wBAAwB,CAAC;AAClG,OAAO,EACL,YAAY,EACZ,gBAAgB,EAGjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAiC,MAAM,UAAU,CAAC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