@oystehr/sdk 3.0.8 → 3.0.10

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 (78) hide show
  1. package/dist/cjs/config.d.ts +1 -0
  2. package/dist/cjs/index.cjs +79 -5
  3. package/dist/cjs/index.cjs.map +1 -1
  4. package/dist/cjs/index.min.cjs +1 -1
  5. package/dist/cjs/index.min.cjs.map +1 -1
  6. package/dist/cjs/resources/classes/developer.d.ts +1 -1
  7. package/dist/cjs/resources/classes/index.d.ts +2 -0
  8. package/dist/cjs/resources/classes/lab.d.ts +63 -0
  9. package/dist/cjs/resources/classes/m2m.d.ts +1 -1
  10. package/dist/cjs/resources/classes/project.d.ts +1 -1
  11. package/dist/cjs/resources/classes/user.d.ts +1 -1
  12. package/dist/cjs/resources/classes/z3.d.ts +1 -1
  13. package/dist/cjs/resources/types/ApplicationCreateParams.d.ts +0 -5
  14. package/dist/cjs/resources/types/ApplicationUpdateParams.d.ts +0 -4
  15. package/dist/cjs/resources/types/LabOrderSubmitParams.d.ts +11 -0
  16. package/dist/cjs/resources/types/LabOrderableItemListParams.d.ts +11 -0
  17. package/dist/cjs/resources/types/LabOrderableItemListResponse.d.ts +134 -0
  18. package/dist/cjs/resources/types/LabOrderableItemQuestionnaireGetParams.d.ts +6 -0
  19. package/dist/cjs/resources/types/LabOrderableItemQuestionnaireGetResponse.d.ts +5 -0
  20. package/dist/cjs/resources/types/LabRouteCreateParams.d.ts +41 -0
  21. package/dist/cjs/resources/types/LabRouteDeleteParams.d.ts +4 -0
  22. package/dist/cjs/resources/types/LabRouteListResponse.d.ts +17 -0
  23. package/dist/cjs/resources/types/index.d.ts +8 -0
  24. package/dist/esm/config.d.ts +1 -0
  25. package/dist/esm/index.min.js +1 -1
  26. package/dist/esm/index.min.js.map +1 -1
  27. package/dist/esm/resources/classes/developer.d.ts +1 -1
  28. package/dist/esm/resources/classes/developer.js +1 -1
  29. package/dist/esm/resources/classes/developer.js.map +1 -1
  30. package/dist/esm/resources/classes/index.d.ts +2 -0
  31. package/dist/esm/resources/classes/index.js +2 -0
  32. package/dist/esm/resources/classes/index.js.map +1 -1
  33. package/dist/esm/resources/classes/lab.d.ts +63 -0
  34. package/dist/esm/resources/classes/lab.js +78 -0
  35. package/dist/esm/resources/classes/lab.js.map +1 -0
  36. package/dist/esm/resources/classes/m2m.d.ts +1 -1
  37. package/dist/esm/resources/classes/m2m.js +1 -1
  38. package/dist/esm/resources/classes/m2m.js.map +1 -1
  39. package/dist/esm/resources/classes/project.d.ts +1 -1
  40. package/dist/esm/resources/classes/project.js +1 -1
  41. package/dist/esm/resources/classes/project.js.map +1 -1
  42. package/dist/esm/resources/classes/user.d.ts +1 -1
  43. package/dist/esm/resources/classes/user.js +1 -1
  44. package/dist/esm/resources/classes/user.js.map +1 -1
  45. package/dist/esm/resources/classes/z3.d.ts +1 -1
  46. package/dist/esm/resources/classes/z3.js +1 -1
  47. package/dist/esm/resources/classes/z3.js.map +1 -1
  48. package/dist/esm/resources/types/ApplicationCreateParams.d.ts +0 -5
  49. package/dist/esm/resources/types/ApplicationUpdateParams.d.ts +0 -4
  50. package/dist/esm/resources/types/LabOrderSubmitParams.d.ts +11 -0
  51. package/dist/esm/resources/types/LabOrderableItemListParams.d.ts +11 -0
  52. package/dist/esm/resources/types/LabOrderableItemListResponse.d.ts +134 -0
  53. package/dist/esm/resources/types/LabOrderableItemQuestionnaireGetParams.d.ts +6 -0
  54. package/dist/esm/resources/types/LabOrderableItemQuestionnaireGetResponse.d.ts +5 -0
  55. package/dist/esm/resources/types/LabRouteCreateParams.d.ts +41 -0
  56. package/dist/esm/resources/types/LabRouteDeleteParams.d.ts +4 -0
  57. package/dist/esm/resources/types/LabRouteListResponse.d.ts +17 -0
  58. package/dist/esm/resources/types/index.d.ts +8 -0
  59. package/package.json +2 -2
  60. package/src/config.ts +1 -0
  61. package/src/resources/classes/developer.ts +2 -2
  62. package/src/resources/classes/index.ts +3 -0
  63. package/src/resources/classes/lab.ts +113 -0
  64. package/src/resources/classes/m2m.ts +2 -2
  65. package/src/resources/classes/project.ts +2 -2
  66. package/src/resources/classes/user.ts +2 -2
  67. package/src/resources/classes/z3.ts +1 -1
  68. package/src/resources/types/ApplicationCreateParams.ts +0 -5
  69. package/src/resources/types/ApplicationUpdateParams.ts +0 -4
  70. package/src/resources/types/LabOrderSubmitParams.ts +13 -0
  71. package/src/resources/types/LabOrderableItemListParams.ts +13 -0
  72. package/src/resources/types/LabOrderableItemListResponse.ts +136 -0
  73. package/src/resources/types/LabOrderableItemQuestionnaireGetParams.ts +8 -0
  74. package/src/resources/types/LabOrderableItemQuestionnaireGetResponse.ts +7 -0
  75. package/src/resources/types/LabRouteCreateParams.ts +43 -0
  76. package/src/resources/types/LabRouteDeleteParams.ts +6 -0
  77. package/src/resources/types/LabRouteListResponse.ts +19 -0
  78. package/src/resources/types/index.ts +8 -0
@@ -16,6 +16,7 @@ export interface OystehrConfig {
16
16
  faxApiUrl?: string;
17
17
  fhirApiUrl?: string;
18
18
  projectApiUrl?: string;
19
+ labApiUrl?: string;
19
20
  };
20
21
  /**
21
22
  * Optionally provide a custom fetch implementation. This must conform to the
@@ -627,7 +627,7 @@ class Developer extends SDKResource {
627
627
  return this.request('/developer', 'get', __classPrivateFieldGet(this, _Developer_instances, "m", _Developer_baseUrlThunk).bind(this))(request);
628
628
  }
629
629
  /**
630
- * Get Developers in the Project with pagination, sort, sort Order and filtering. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
630
+ * Get Developers in the Project with pagination, sort, sort Order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
631
631
  *
632
632
  * Access Policy Action: `Project:ListAllUsers`
633
633
  * Access Policy Resource: `Project:Settings`
@@ -934,6 +934,79 @@ class Fhir extends SDKResource {
934
934
  }
935
935
  _Fhir_instances = new WeakSet();
936
936
 
937
+ // AUTOGENERATED -- DO NOT EDIT
938
+ var _Lab_instances, _Lab_baseUrlThunk;
939
+ class Lab extends SDKResource {
940
+ constructor(config) {
941
+ super(config);
942
+ _Lab_instances.add(this);
943
+ }
944
+ /**
945
+ * Gets a list of Routes associated with the project. Returns an empty list if no Routes are found.
946
+ *
947
+ * Access Policy Requirements:
948
+ * Action: `Lab:GetRoutes`
949
+ * Access Policy Resource: `Lab:Route`
950
+ */
951
+ routeList(request) {
952
+ return this.request('/route', 'get', __classPrivateFieldGet(this, _Lab_instances, "m", _Lab_baseUrlThunk).bind(this))(request);
953
+ }
954
+ /**
955
+ * Create a route. A Route represents that a lab and particular customer have a relationship, and a Route is necessary to submit an order to a lab. See [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) for more details.
956
+ *
957
+ * Access Policy Requirements:
958
+ * Action: `Lab:CreateRoute`
959
+ * Access Policy Resource: `Lab:Route`
960
+ */
961
+ routeCreate(params, request) {
962
+ return this.request('/route', 'post', __classPrivateFieldGet(this, _Lab_instances, "m", _Lab_baseUrlThunk).bind(this))(params, request);
963
+ }
964
+ /**
965
+ * Delete a route. Deleting a Route will permanently remove the `routeGuid`. Orders can no longer be submitted to this lab until a new Route is created. See [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#delete-route) for more details.
966
+ *
967
+ * Access Policy Requirements:
968
+ * Action: `Lab:DeleteRoute`
969
+ * Access Policy Resource: `Lab:Route`
970
+ */
971
+ routeDelete(params, request) {
972
+ return this.request('/route/{routeGuid}', 'delete', __classPrivateFieldGet(this, _Lab_instances, "m", _Lab_baseUrlThunk).bind(this))(params, request);
973
+ }
974
+ /**
975
+ * Returns list of active orderable items for the latest compendium version. Page size is default 25 and max 100 items. See [orderable item Search](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#orderable-item-search) for more details.
976
+ *
977
+ * Access Policy Requirements:
978
+ * Action: `Lab:SearchOrderableItems`
979
+ * Access Policy Resource: `Lab:OrderableItem`
980
+ */
981
+ orderableItemList(params, request) {
982
+ return this.request('/orderableItem', 'get', __classPrivateFieldGet(this, _Lab_instances, "m", _Lab_baseUrlThunk).bind(this))(params, request);
983
+ }
984
+ /**
985
+ * Retrieve the AOE (Answer on Entry) Questionnaire for the given orderable item. The orderable item is defined by its labGuid, compendiumVersion, and itemCode. See [AOE](https://docs.oystehr.com/oystehr/services/lab/explore-the-compendium/#AOE) for more details.
986
+ *
987
+ * Access Policy Requirements:
988
+ * Action: `Lab:SearchOrderableItems`
989
+ * Access Policy Resource: `Lab:OrderableItem`
990
+ */
991
+ orderableItemQuestionnaireGet(params, request) {
992
+ return this.request('/canonical-questionnaire/lab/{labGuid}/compendium/{compendiumVersion}/item/{itemCode}/questionnaire', 'get', __classPrivateFieldGet(this, _Lab_instances, "m", _Lab_baseUrlThunk).bind(this))(params, request);
993
+ }
994
+ /**
995
+ * Submit a lab order. Oystehr's [Submit Lab](https://docs.oystehr.com/oystehr/services/lab/submit-an-order/) feature allows users to submit a well configured ServiceRequest to an external lab. In order to successfully submit an order, a [Route](https://docs.oystehr.com/oystehr/services/lab/onboarding-a-lab/#create-route) to and Organization representing that lab must exist.
996
+ *
997
+ * Access Policy Requirements:
998
+ * Action: `Lab:SubmitOrder`
999
+ * Access Policy Resource: `Lab:Order`
1000
+ */
1001
+ orderSubmit(params, request) {
1002
+ return this.request('/submit', 'post', __classPrivateFieldGet(this, _Lab_instances, "m", _Lab_baseUrlThunk).bind(this))(params, request);
1003
+ }
1004
+ }
1005
+ _Lab_instances = new WeakSet(), _Lab_baseUrlThunk = function _Lab_baseUrlThunk() {
1006
+ var _a, _b;
1007
+ return (_b = (_a = this.config.services) === null || _a === void 0 ? void 0 : _a['labApiUrl']) !== null && _b !== void 0 ? _b : 'https://labs-api.zapehr.com/v1';
1008
+ };
1009
+
937
1010
  // AUTOGENERATED -- DO NOT EDIT
938
1011
  var _M2m_instances, _M2m_baseUrlThunk;
939
1012
  class M2m extends SDKResource {
@@ -998,7 +1071,7 @@ class M2m extends SDKResource {
998
1071
  return this.request('/m2m/{id}/rotate-secret', 'post', __classPrivateFieldGet(this, _M2m_instances, "m", _M2m_baseUrlThunk).bind(this))(params, request);
999
1072
  }
1000
1073
  /**
1001
- * Get M2M clients in the Project with pagination, sort, sort Order and filtering. [M2M Clients](https://docs.oystehr.com/services/iam/m2m-clients) are used to access Oystehr APIs from scripts and server-side code like [Zambda Functions](https://docs.oystehr.com/services/zambda).
1074
+ * Get M2M clients in the Project with pagination, sort, sort Order and filtering. [M2M Clients](https://docs.oystehr.com/oystehr/services/iam/m2m-clients) are used to access Oystehr APIs from scripts and server-side code like [Zambda Functions](https://docs.oystehr.com/oystehr/services/zambda).
1002
1075
  *
1003
1076
  * Access Policy Action: `App:ListAllM2MClients`
1004
1077
  * Access Policy Resource: `IAM:M2MClient`
@@ -1133,7 +1206,7 @@ class Project extends SDKResource {
1133
1206
  return this.request('/project', 'get', __classPrivateFieldGet(this, _Project_instances, "m", _Project_baseUrlThunk).bind(this))(request);
1134
1207
  }
1135
1208
  /**
1136
- * Update the Project settings for the Project that corresponds to the project-id in the request header. A [Project](https://docs.oystehr.com/services/project/) is the logically-isolated instance of Oystehr that segments your data from other Projects. Projects are completely independent from each other, having their own separate [FHIR store](https://docs.oystehr.com/services/fhir/basics/), [Applications](https://docs.oystehr.com/services/app/applications/), [Users](https://docs.oystehr.com/services/app/users/), etc .
1209
+ * Update the Project settings for the Project that corresponds to the project-id in the request header. A [Project](https://docs.oystehr.com/oystehr/services/project/) is the logically-isolated instance of Oystehr that segments your data from other Projects. Projects are completely independent from each other, having their own separate [FHIR store](https://docs.oystehr.com/oystehr/services/fhir/basics/), [Applications](https://docs.oystehr.com/oystehr/services/app/applications/), [Users](https://docs.oystehr.com/oystehr/services/app/users/), etc .
1137
1210
  *
1138
1211
  * Access Policy Action: `Project:UpdateProjectInfo`
1139
1212
  * Access Policy Resource: `Project:Settings`
@@ -1441,7 +1514,7 @@ class User extends SDKResource {
1441
1514
  return this.request('/user', 'get', __classPrivateFieldGet(this, _User_instances, "m", _User_baseUrlThunk).bind(this))(request);
1442
1515
  }
1443
1516
  /**
1444
- * Get Users in the Project with pagination, sort, sort Order and filtering. [Users](https://docs.oystehr.com/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
1517
+ * Get Users in the Project with pagination, sort, sort Order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
1445
1518
  *
1446
1519
  * Access Policy Action: `Project:ListAllUsers`
1447
1520
  * Access Policy Resource: `Project:Settings`
@@ -1591,7 +1664,7 @@ class Z3 extends SDKResource {
1591
1664
  * Create a Z3 Bucket with the provided name. [Z3](https://docs.oystehr.com/oystehr/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
1592
1665
  *
1593
1666
  * Access Policy Action: `Z3:CreateBucket`
1594
- * Access Policy Resource: `Z3:BucketName`
1667
+ * Access Policy Resource: `Z3:*`
1595
1668
  */
1596
1669
  createBucket(params, request) {
1597
1670
  return this.request('/z3/{bucketName}', 'put', __classPrivateFieldGet(this, _Z3_instances, "m", _Z3_baseUrlThunk).bind(this))(params, request);
@@ -1806,6 +1879,7 @@ let Oystehr$1 = class Oystehr {
1806
1879
  this.zambda = new Zambda(config);
1807
1880
  this.zambdaLogStream = new ZambdaLogStream(config);
1808
1881
  this.fax = new Fax(config);
1882
+ this.lab = new Lab(config);
1809
1883
  this.fhir = new Fhir(config);
1810
1884
  }
1811
1885
  };