@tryvital/vital-node 3.1.138 → 3.1.139

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 (162) hide show
  1. package/api/resources/activity/client/Client.d.ts +2 -2
  2. package/api/resources/activity/client/Client.js +4 -4
  3. package/api/resources/aggregate/client/Client.d.ts +3 -3
  4. package/api/resources/aggregate/client/Client.js +11 -6
  5. package/api/resources/aggregate/client/requests/{Query.d.ts → QueryBatch.d.ts} +4 -4
  6. package/api/resources/aggregate/client/requests/index.d.ts +1 -1
  7. package/{dist/api/resources/aggregate/types/QueryTimeframe.d.ts → api/resources/aggregate/types/QueryBatchTimeframe.d.ts} +1 -1
  8. package/api/resources/aggregate/types/index.d.ts +1 -1
  9. package/api/resources/aggregate/types/index.js +1 -1
  10. package/api/resources/body/client/Client.d.ts +2 -2
  11. package/api/resources/body/client/Client.js +4 -4
  12. package/api/resources/devices/client/Client.js +1 -1
  13. package/api/resources/insurance/client/Client.js +2 -2
  14. package/api/resources/introspect/client/Client.js +2 -2
  15. package/api/resources/labTests/client/Client.js +34 -34
  16. package/api/resources/link/client/Client.js +14 -14
  17. package/api/resources/meal/client/Client.js +1 -1
  18. package/api/resources/menstrualCycle/client/Client.js +1 -1
  19. package/api/resources/profile/client/Client.d.ts +2 -2
  20. package/api/resources/profile/client/Client.js +4 -4
  21. package/api/resources/providers/client/Client.js +1 -1
  22. package/api/resources/sleep/client/Client.d.ts +3 -3
  23. package/api/resources/sleep/client/Client.js +7 -7
  24. package/api/resources/sleepCycle/client/Client.d.ts +1 -1
  25. package/api/resources/sleepCycle/client/Client.js +2 -2
  26. package/api/resources/team/client/Client.js +7 -7
  27. package/api/resources/testkit/client/Client.js +2 -2
  28. package/api/resources/user/client/Client.js +16 -16
  29. package/api/resources/vitals/client/Client.js +58 -58
  30. package/api/resources/workouts/client/Client.d.ts +2 -2
  31. package/api/resources/workouts/client/Client.js +5 -5
  32. package/api/types/{QueryInstructionGroupByItem.d.ts → AggregationResponse.d.ts} +3 -1
  33. package/api/types/AggregationResult.d.ts +7 -0
  34. package/api/types/ClientFacingLabLocation.d.ts +1 -0
  35. package/api/types/ClientFacingResource.d.ts +2 -1
  36. package/api/types/ClientFacingResource.js +1 -0
  37. package/api/types/IndexColumnExprIndex.d.ts +2 -1
  38. package/api/types/IndexColumnExprIndex.js +1 -0
  39. package/api/types/{QueryInstruction.d.ts → Query.d.ts} +3 -3
  40. package/{dist/api/types/QueryInstructionGroupByItem.d.ts → api/types/QueryGroupByItem.d.ts} +1 -1
  41. package/api/types/QuerySelectItem.d.ts +5 -0
  42. package/api/types/index.d.ts +5 -3
  43. package/api/types/index.js +5 -3
  44. package/dist/api/resources/activity/client/Client.d.ts +2 -2
  45. package/dist/api/resources/activity/client/Client.js +4 -4
  46. package/dist/api/resources/aggregate/client/Client.d.ts +3 -3
  47. package/dist/api/resources/aggregate/client/Client.js +11 -6
  48. package/dist/api/resources/aggregate/client/requests/{Query.d.ts → QueryBatch.d.ts} +4 -4
  49. package/dist/api/resources/aggregate/client/requests/index.d.ts +1 -1
  50. package/{api/resources/aggregate/types/QueryTimeframe.d.ts → dist/api/resources/aggregate/types/QueryBatchTimeframe.d.ts} +1 -1
  51. package/dist/api/resources/aggregate/types/index.d.ts +1 -1
  52. package/dist/api/resources/aggregate/types/index.js +1 -1
  53. package/dist/api/resources/body/client/Client.d.ts +2 -2
  54. package/dist/api/resources/body/client/Client.js +4 -4
  55. package/dist/api/resources/devices/client/Client.js +1 -1
  56. package/dist/api/resources/insurance/client/Client.js +2 -2
  57. package/dist/api/resources/introspect/client/Client.js +2 -2
  58. package/dist/api/resources/labTests/client/Client.js +34 -34
  59. package/dist/api/resources/link/client/Client.js +14 -14
  60. package/dist/api/resources/meal/client/Client.js +1 -1
  61. package/dist/api/resources/menstrualCycle/client/Client.js +1 -1
  62. package/dist/api/resources/profile/client/Client.d.ts +2 -2
  63. package/dist/api/resources/profile/client/Client.js +4 -4
  64. package/dist/api/resources/providers/client/Client.js +1 -1
  65. package/dist/api/resources/sleep/client/Client.d.ts +3 -3
  66. package/dist/api/resources/sleep/client/Client.js +7 -7
  67. package/dist/api/resources/sleepCycle/client/Client.d.ts +1 -1
  68. package/dist/api/resources/sleepCycle/client/Client.js +2 -2
  69. package/dist/api/resources/team/client/Client.js +7 -7
  70. package/dist/api/resources/testkit/client/Client.js +2 -2
  71. package/dist/api/resources/user/client/Client.js +16 -16
  72. package/dist/api/resources/vitals/client/Client.js +58 -58
  73. package/dist/api/resources/workouts/client/Client.d.ts +2 -2
  74. package/dist/api/resources/workouts/client/Client.js +5 -5
  75. package/dist/api/types/AggregationResponse.d.ts +7 -0
  76. package/dist/api/types/AggregationResult.d.ts +7 -0
  77. package/dist/api/types/AggregationResult.js +5 -0
  78. package/dist/api/types/ClientFacingLabLocation.d.ts +1 -0
  79. package/dist/api/types/ClientFacingResource.d.ts +2 -1
  80. package/dist/api/types/ClientFacingResource.js +1 -0
  81. package/dist/api/types/IndexColumnExprIndex.d.ts +2 -1
  82. package/dist/api/types/IndexColumnExprIndex.js +1 -0
  83. package/dist/api/types/{QueryInstruction.d.ts → Query.d.ts} +3 -3
  84. package/dist/api/types/Query.js +5 -0
  85. package/dist/api/types/QueryGroupByItem.d.ts +5 -0
  86. package/dist/api/types/QueryGroupByItem.js +5 -0
  87. package/dist/api/types/QuerySelectItem.d.ts +5 -0
  88. package/dist/api/types/QuerySelectItem.js +5 -0
  89. package/dist/api/types/index.d.ts +5 -3
  90. package/dist/api/types/index.js +5 -3
  91. package/dist/serialization/resources/aggregate/client/requests/{Query.d.ts → QueryBatch.d.ts} +6 -6
  92. package/dist/serialization/resources/aggregate/client/requests/{Query.js → QueryBatch.js} +6 -6
  93. package/dist/serialization/resources/aggregate/client/requests/index.d.ts +1 -1
  94. package/dist/serialization/resources/aggregate/client/requests/index.js +3 -3
  95. package/{serialization/resources/aggregate/types/QueryTimeframe.d.ts → dist/serialization/resources/aggregate/types/QueryBatchTimeframe.d.ts} +2 -2
  96. package/{serialization/resources/aggregate/types/QueryTimeframe.js → dist/serialization/resources/aggregate/types/QueryBatchTimeframe.js} +2 -2
  97. package/dist/serialization/resources/aggregate/types/index.d.ts +1 -1
  98. package/dist/serialization/resources/aggregate/types/index.js +1 -1
  99. package/dist/serialization/types/AggregationResponse.d.ts +13 -0
  100. package/dist/serialization/types/AggregationResponse.js +34 -0
  101. package/dist/serialization/types/AggregationResult.d.ts +12 -0
  102. package/dist/serialization/types/AggregationResult.js +33 -0
  103. package/dist/serialization/types/ClientFacingLabLocation.d.ts +2 -0
  104. package/dist/serialization/types/ClientFacingLabLocation.js +2 -0
  105. package/dist/serialization/types/ClientFacingResource.d.ts +1 -1
  106. package/dist/serialization/types/ClientFacingResource.js +1 -0
  107. package/dist/serialization/types/IndexColumnExprIndex.d.ts +1 -1
  108. package/dist/serialization/types/IndexColumnExprIndex.js +1 -1
  109. package/dist/serialization/types/Query.d.ts +16 -0
  110. package/dist/serialization/types/{QueryInstruction.js → Query.js} +6 -6
  111. package/{serialization/types/QueryInstructionGroupByItem.d.ts → dist/serialization/types/QueryGroupByItem.d.ts} +2 -2
  112. package/{serialization/types/QueryInstructionGroupByItem.js → dist/serialization/types/QueryGroupByItem.js} +2 -2
  113. package/dist/serialization/types/{QueryInstructionSelectItem.d.ts → QuerySelectItem.d.ts} +2 -2
  114. package/dist/serialization/types/{QueryInstructionSelectItem.js → QuerySelectItem.js} +2 -2
  115. package/dist/serialization/types/index.d.ts +5 -3
  116. package/dist/serialization/types/index.js +5 -3
  117. package/dist/version.d.ts +1 -1
  118. package/dist/version.js +1 -1
  119. package/package.json +1 -1
  120. package/reference.md +15 -15
  121. package/serialization/resources/aggregate/client/requests/{Query.d.ts → QueryBatch.d.ts} +6 -6
  122. package/serialization/resources/aggregate/client/requests/{Query.js → QueryBatch.js} +6 -6
  123. package/serialization/resources/aggregate/client/requests/index.d.ts +1 -1
  124. package/serialization/resources/aggregate/client/requests/index.js +3 -3
  125. package/{dist/serialization/resources/aggregate/types/QueryTimeframe.d.ts → serialization/resources/aggregate/types/QueryBatchTimeframe.d.ts} +2 -2
  126. package/{dist/serialization/resources/aggregate/types/QueryTimeframe.js → serialization/resources/aggregate/types/QueryBatchTimeframe.js} +2 -2
  127. package/serialization/resources/aggregate/types/index.d.ts +1 -1
  128. package/serialization/resources/aggregate/types/index.js +1 -1
  129. package/serialization/types/AggregationResponse.d.ts +13 -0
  130. package/serialization/types/AggregationResponse.js +34 -0
  131. package/serialization/types/AggregationResult.d.ts +12 -0
  132. package/serialization/types/AggregationResult.js +33 -0
  133. package/serialization/types/ClientFacingLabLocation.d.ts +2 -0
  134. package/serialization/types/ClientFacingLabLocation.js +2 -0
  135. package/serialization/types/ClientFacingResource.d.ts +1 -1
  136. package/serialization/types/ClientFacingResource.js +1 -0
  137. package/serialization/types/IndexColumnExprIndex.d.ts +1 -1
  138. package/serialization/types/IndexColumnExprIndex.js +1 -1
  139. package/serialization/types/Query.d.ts +16 -0
  140. package/serialization/types/{QueryInstruction.js → Query.js} +6 -6
  141. package/{dist/serialization/types/QueryInstructionGroupByItem.d.ts → serialization/types/QueryGroupByItem.d.ts} +2 -2
  142. package/{dist/serialization/types/QueryInstructionGroupByItem.js → serialization/types/QueryGroupByItem.js} +2 -2
  143. package/serialization/types/{QueryInstructionSelectItem.d.ts → QuerySelectItem.d.ts} +2 -2
  144. package/serialization/types/{QueryInstructionSelectItem.js → QuerySelectItem.js} +2 -2
  145. package/serialization/types/index.d.ts +5 -3
  146. package/serialization/types/index.js +5 -3
  147. package/version.d.ts +1 -1
  148. package/version.js +1 -1
  149. package/api/types/QueryInstructionSelectItem.d.ts +0 -5
  150. package/dist/api/types/QueryInstructionSelectItem.d.ts +0 -5
  151. package/dist/serialization/types/QueryInstruction.d.ts +0 -16
  152. package/serialization/types/QueryInstruction.d.ts +0 -16
  153. /package/api/resources/aggregate/client/requests/{Query.js → QueryBatch.js} +0 -0
  154. /package/api/resources/aggregate/types/{QueryTimeframe.js → QueryBatchTimeframe.js} +0 -0
  155. /package/api/types/{QueryInstruction.js → AggregationResponse.js} +0 -0
  156. /package/api/types/{QueryInstructionGroupByItem.js → AggregationResult.js} +0 -0
  157. /package/{dist/api/resources/aggregate/client/requests → api/types}/Query.js +0 -0
  158. /package/api/types/{QueryInstructionSelectItem.js → QueryGroupByItem.js} +0 -0
  159. /package/{dist/api/resources/aggregate/types/QueryTimeframe.js → api/types/QuerySelectItem.js} +0 -0
  160. /package/dist/api/{types/QueryInstruction.js → resources/aggregate/client/requests/QueryBatch.js} +0 -0
  161. /package/dist/api/{types/QueryInstructionGroupByItem.js → resources/aggregate/types/QueryBatchTimeframe.js} +0 -0
  162. /package/dist/api/types/{QueryInstructionSelectItem.js → AggregationResponse.js} +0 -0
@@ -50,7 +50,7 @@ class Workouts {
50
50
  this._options = _options;
51
51
  }
52
52
  /**
53
- * Get Daily workout for user_id
53
+ * Get workout summary for user_id
54
54
  *
55
55
  * @param {string} userId
56
56
  * @param {Vital.WorkoutsGetRequest} request
@@ -78,7 +78,7 @@ class Workouts {
78
78
  const _response = yield core.fetcher({
79
79
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/workouts/${encodeURIComponent(userId)}`),
80
80
  method: "GET",
81
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.138", "User-Agent": "@tryvital/vital-node/3.1.138", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
81
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.139", "User-Agent": "@tryvital/vital-node/3.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
82
82
  contentType: "application/json",
83
83
  queryParameters: _queryParams,
84
84
  requestType: "json",
@@ -126,7 +126,7 @@ class Workouts {
126
126
  });
127
127
  }
128
128
  /**
129
- * Get Daily workout for user_id
129
+ * Get raw workout summary for user_id
130
130
  *
131
131
  * @param {string} userId
132
132
  * @param {Vital.WorkoutsGetRawRequest} request
@@ -154,7 +154,7 @@ class Workouts {
154
154
  const _response = yield core.fetcher({
155
155
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/workouts/${encodeURIComponent(userId)}/raw`),
156
156
  method: "GET",
157
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.138", "User-Agent": "@tryvital/vital-node/3.1.138", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
157
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.139", "User-Agent": "@tryvital/vital-node/3.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
158
158
  contentType: "application/json",
159
159
  queryParameters: _queryParams,
160
160
  requestType: "json",
@@ -216,7 +216,7 @@ class Workouts {
216
216
  const _response = yield core.fetcher({
217
217
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/workouts/${encodeURIComponent(workoutId)}/stream`),
218
218
  method: "GET",
219
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.138", "User-Agent": "@tryvital/vital-node/3.1.138", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
219
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.139", "User-Agent": "@tryvital/vital-node/3.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
220
220
  contentType: "application/json",
221
221
  requestType: "json",
222
222
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -2,4 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Vital from "../index";
5
- export declare type QueryInstructionGroupByItem = Vital.DateTruncExpr | Vital.DatePartExpr;
5
+ export interface AggregationResponse {
6
+ results: Vital.AggregationResult[];
7
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface AggregationResult {
5
+ /** The result table of the query, organized in a column oriented format. */
6
+ table: Record<string, unknown[]>;
7
+ }
@@ -6,4 +6,5 @@ export interface ClientFacingLabLocation {
6
6
  metadata: Vital.LabLocationMetadata;
7
7
  distance: number;
8
8
  siteCode: string;
9
+ supportedBillTypes: Vital.Billing[];
9
10
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export declare type ClientFacingResource = "profile" | "activity" | "sleep" | "body" | "workouts" | "workout_stream" | "connection" | "order" | "result" | "appointment" | "glucose" | "heartrate" | "hrv" | "hypnogram" | "ige" | "igg" | "blood_oxygen" | "blood_pressure" | "cholesterol" | "device" | "weight" | "fat" | "body_temperature" | "body_temperature_delta" | "meal" | "water" | "caffeine" | "mindfulness_minutes" | "steps" | "calories_active" | "distance" | "floors_climbed" | "respiratory_rate" | "vo2_max" | "calories_basal" | "stress_level" | "menstrual_cycle" | "sleep_cycle" | "electrocardiogram_voltage" | "afib_burden" | "heart_rate_alert" | "workout_duration" | "insulin_injection" | "carbohydrates" | "note" | "sleep_stream";
4
+ export declare type ClientFacingResource = "profile" | "activity" | "sleep" | "body" | "workouts" | "workout_stream" | "connection" | "order" | "result" | "appointment" | "glucose" | "heartrate" | "hrv" | "hypnogram" | "ige" | "igg" | "blood_oxygen" | "blood_pressure" | "cholesterol" | "device" | "weight" | "fat" | "body_temperature" | "body_temperature_delta" | "meal" | "water" | "caffeine" | "mindfulness_minutes" | "steps" | "calories_active" | "distance" | "floors_climbed" | "respiratory_rate" | "vo2_max" | "calories_basal" | "stress_level" | "menstrual_cycle" | "sleep_cycle" | "electrocardiogram" | "electrocardiogram_voltage" | "afib_burden" | "heart_rate_alert" | "workout_duration" | "insulin_injection" | "carbohydrates" | "note" | "sleep_stream";
5
5
  export declare const ClientFacingResource: {
6
6
  readonly Profile: "profile";
7
7
  readonly Activity: "activity";
@@ -41,6 +41,7 @@ export declare const ClientFacingResource: {
41
41
  readonly StressLevel: "stress_level";
42
42
  readonly MenstrualCycle: "menstrual_cycle";
43
43
  readonly SleepCycle: "sleep_cycle";
44
+ readonly Electrocardiogram: "electrocardiogram";
44
45
  readonly ElectrocardiogramVoltage: "electrocardiogram_voltage";
45
46
  readonly AfibBurden: "afib_burden";
46
47
  readonly HeartRateAlert: "heart_rate_alert";
@@ -43,6 +43,7 @@ exports.ClientFacingResource = {
43
43
  StressLevel: "stress_level",
44
44
  MenstrualCycle: "menstrual_cycle",
45
45
  SleepCycle: "sleep_cycle",
46
+ Electrocardiogram: "electrocardiogram",
46
47
  ElectrocardiogramVoltage: "electrocardiogram_voltage",
47
48
  AfibBurden: "afib_burden",
48
49
  HeartRateAlert: "heart_rate_alert",
@@ -1,10 +1,11 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export declare type IndexColumnExprIndex = "sleep" | "activity" | "workout" | "body";
4
+ export declare type IndexColumnExprIndex = "sleep" | "activity" | "workout" | "body" | "meal";
5
5
  export declare const IndexColumnExprIndex: {
6
6
  readonly Sleep: "sleep";
7
7
  readonly Activity: "activity";
8
8
  readonly Workout: "workout";
9
9
  readonly Body: "body";
10
+ readonly Meal: "meal";
10
11
  };
@@ -9,4 +9,5 @@ exports.IndexColumnExprIndex = {
9
9
  Activity: "activity",
10
10
  Workout: "workout",
11
11
  Body: "body",
12
+ Meal: "meal",
12
13
  };
@@ -2,8 +2,8 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Vital from "../index";
5
- export interface QueryInstruction {
6
- select: Vital.QueryInstructionSelectItem[];
7
- groupBy?: Vital.QueryInstructionGroupByItem[];
5
+ export interface Query {
6
+ select: Vital.QuerySelectItem[];
7
+ groupBy?: Vital.QueryGroupByItem[];
8
8
  splitBySource?: boolean;
9
9
  }
@@ -2,4 +2,4 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Vital from "../index";
5
- export declare type QueryInstructionGroupByItem = Vital.DateTruncExpr | Vital.DatePartExpr;
5
+ export declare type QueryGroupByItem = Vital.DateTruncExpr | Vital.DatePartExpr;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vital from "../index";
5
+ export declare type QuerySelectItem = Vital.AggregateExpr | Vital.SleepColumnExpr | Vital.ActivityColumnExpr | Vital.WorkoutColumnExpr | Vital.BodyColumnExpr | Vital.IndexColumnExpr | Vital.GroupKeyColumnExpr | Vital.SleepScoreValueMacroExpr | Vital.ChronotypeValueMacroExpr | Vital.UnrecognizedValueMacroExpr;
@@ -6,6 +6,8 @@ export * from "./Address";
6
6
  export * from "./AggregateExprArg";
7
7
  export * from "./AggregateExprFunc";
8
8
  export * from "./AggregateExpr";
9
+ export * from "./AggregationResponse";
10
+ export * from "./AggregationResult";
9
11
  export * from "./AllowedRadius";
10
12
  export * from "./Answer";
11
13
  export * from "./AoE";
@@ -256,12 +258,12 @@ export * from "./ProviderLinkResponse";
256
258
  export * from "./ProviderMfaRequestMethod";
257
259
  export * from "./ProviderMfaRequest";
258
260
  export * from "./Providers";
261
+ export * from "./QuerySelectItem";
262
+ export * from "./QueryGroupByItem";
263
+ export * from "./Query";
259
264
  export * from "./QueryConfigWeekStartsOn";
260
265
  export * from "./QueryConfigProviderPriorityOverridesItem";
261
266
  export * from "./QueryConfig";
262
- export * from "./QueryInstructionSelectItem";
263
- export * from "./QueryInstructionGroupByItem";
264
- export * from "./QueryInstruction";
265
267
  export * from "./Question";
266
268
  export * from "./QuestionType";
267
269
  export * from "./RawActivity";
@@ -22,6 +22,8 @@ __exportStar(require("./Address"), exports);
22
22
  __exportStar(require("./AggregateExprArg"), exports);
23
23
  __exportStar(require("./AggregateExprFunc"), exports);
24
24
  __exportStar(require("./AggregateExpr"), exports);
25
+ __exportStar(require("./AggregationResponse"), exports);
26
+ __exportStar(require("./AggregationResult"), exports);
25
27
  __exportStar(require("./AllowedRadius"), exports);
26
28
  __exportStar(require("./Answer"), exports);
27
29
  __exportStar(require("./AoE"), exports);
@@ -272,12 +274,12 @@ __exportStar(require("./ProviderLinkResponse"), exports);
272
274
  __exportStar(require("./ProviderMfaRequestMethod"), exports);
273
275
  __exportStar(require("./ProviderMfaRequest"), exports);
274
276
  __exportStar(require("./Providers"), exports);
277
+ __exportStar(require("./QuerySelectItem"), exports);
278
+ __exportStar(require("./QueryGroupByItem"), exports);
279
+ __exportStar(require("./Query"), exports);
275
280
  __exportStar(require("./QueryConfigWeekStartsOn"), exports);
276
281
  __exportStar(require("./QueryConfigProviderPriorityOverridesItem"), exports);
277
282
  __exportStar(require("./QueryConfig"), exports);
278
- __exportStar(require("./QueryInstructionSelectItem"), exports);
279
- __exportStar(require("./QueryInstructionGroupByItem"), exports);
280
- __exportStar(require("./QueryInstruction"), exports);
281
283
  __exportStar(require("./Question"), exports);
282
284
  __exportStar(require("./QuestionType"), exports);
283
285
  __exportStar(require("./RawActivity"), exports);
@@ -22,7 +22,7 @@ export declare class Activity {
22
22
  protected readonly _options: Activity.Options;
23
23
  constructor(_options?: Activity.Options);
24
24
  /**
25
- * Get Daily Activity for user_id
25
+ * Get activity summary for user_id
26
26
  *
27
27
  * @param {string} userId
28
28
  * @param {Vital.ActivityGetRequest} request
@@ -37,7 +37,7 @@ export declare class Activity {
37
37
  */
38
38
  get(userId: string, request: Vital.ActivityGetRequest, requestOptions?: Activity.RequestOptions): Promise<Vital.ClientActivityResponse>;
39
39
  /**
40
- * Get Daily Activity for user_id
40
+ * Get raw activity summary for user_id
41
41
  *
42
42
  * @param {string} userId
43
43
  * @param {Vital.ActivityGetRawRequest} request
@@ -50,7 +50,7 @@ class Activity {
50
50
  this._options = _options;
51
51
  }
52
52
  /**
53
- * Get Daily Activity for user_id
53
+ * Get activity summary for user_id
54
54
  *
55
55
  * @param {string} userId
56
56
  * @param {Vital.ActivityGetRequest} request
@@ -78,7 +78,7 @@ class Activity {
78
78
  const _response = yield core.fetcher({
79
79
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/activity/${encodeURIComponent(userId)}`),
80
80
  method: "GET",
81
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.138", "User-Agent": "@tryvital/vital-node/3.1.138", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
81
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.139", "User-Agent": "@tryvital/vital-node/3.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
82
82
  contentType: "application/json",
83
83
  queryParameters: _queryParams,
84
84
  requestType: "json",
@@ -126,7 +126,7 @@ class Activity {
126
126
  });
127
127
  }
128
128
  /**
129
- * Get Daily Activity for user_id
129
+ * Get raw activity summary for user_id
130
130
  *
131
131
  * @param {string} userId
132
132
  * @param {Vital.ActivityGetRawRequest} request
@@ -154,7 +154,7 @@ class Activity {
154
154
  const _response = yield core.fetcher({
155
155
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/activity/${encodeURIComponent(userId)}/raw`),
156
156
  method: "GET",
157
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.138", "User-Agent": "@tryvital/vital-node/3.1.138", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
157
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.139", "User-Agent": "@tryvital/vital-node/3.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
158
158
  contentType: "application/json",
159
159
  queryParameters: _queryParams,
160
160
  requestType: "json",
@@ -23,7 +23,7 @@ export declare class Aggregate {
23
23
  constructor(_options?: Aggregate.Options);
24
24
  /**
25
25
  * @param {string} userId
26
- * @param {Vital.Query} request
26
+ * @param {Vital.QueryBatch} request
27
27
  * @param {Aggregate.RequestOptions} requestOptions - Request-specific configuration.
28
28
  *
29
29
  * @throws {@link Vital.UnprocessableEntityError}
@@ -37,7 +37,7 @@ export declare class Aggregate {
37
37
  * unit: "minute"
38
38
  * }
39
39
  * },
40
- * instructions: [{
40
+ * queries: [{
41
41
  * select: [{
42
42
  * arg: {
43
43
  * sleep: "session_start"
@@ -47,7 +47,7 @@ export declare class Aggregate {
47
47
  * }]
48
48
  * })
49
49
  */
50
- queryOne(userId: string, request: Vital.Query, requestOptions?: Aggregate.RequestOptions): Promise<unknown>;
50
+ queryOne(userId: string, request: Vital.QueryBatch, requestOptions?: Aggregate.RequestOptions): Promise<Vital.AggregationResponse>;
51
51
  protected _getCustomAuthorizationHeaders(): Promise<{
52
52
  "x-vital-api-key": string | undefined;
53
53
  }>;
@@ -51,7 +51,7 @@ class Aggregate {
51
51
  }
52
52
  /**
53
53
  * @param {string} userId
54
- * @param {Vital.Query} request
54
+ * @param {Vital.QueryBatch} request
55
55
  * @param {Aggregate.RequestOptions} requestOptions - Request-specific configuration.
56
56
  *
57
57
  * @throws {@link Vital.UnprocessableEntityError}
@@ -65,7 +65,7 @@ class Aggregate {
65
65
  * unit: "minute"
66
66
  * }
67
67
  * },
68
- * instructions: [{
68
+ * queries: [{
69
69
  * select: [{
70
70
  * arg: {
71
71
  * sleep: "session_start"
@@ -79,18 +79,23 @@ class Aggregate {
79
79
  var _a;
80
80
  return __awaiter(this, void 0, void 0, function* () {
81
81
  const _response = yield core.fetcher({
82
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `aggregate/v1/query_one/${encodeURIComponent(userId)}`),
82
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `aggregate/v1/user/${encodeURIComponent(userId)}/query`),
83
83
  method: "POST",
84
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.138", "User-Agent": "@tryvital/vital-node/3.1.138", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, accept: "*/*" }, (yield this._getCustomAuthorizationHeaders())),
84
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.139", "User-Agent": "@tryvital/vital-node/3.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, accept: "*/*" }, (yield this._getCustomAuthorizationHeaders())),
85
85
  contentType: "application/json",
86
86
  requestType: "json",
87
- body: serializers.Query.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
87
+ body: serializers.QueryBatch.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
88
88
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
89
89
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
90
90
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
91
91
  });
92
92
  if (_response.ok) {
93
- return _response.body;
93
+ return serializers.AggregationResponse.parseOrThrow(_response.body, {
94
+ unrecognizedObjectKeys: "passthrough",
95
+ allowUnrecognizedUnionMembers: true,
96
+ allowUnrecognizedEnumValues: true,
97
+ breadcrumbsPrefix: ["response"],
98
+ });
94
99
  }
95
100
  if (_response.error.reason === "status-code") {
96
101
  switch (_response.error.statusCode) {
@@ -12,7 +12,7 @@ import * as Vital from "../../../../index";
12
12
  * unit: "minute"
13
13
  * }
14
14
  * },
15
- * instructions: [{
15
+ * queries: [{
16
16
  * select: [{
17
17
  * arg: {
18
18
  * sleep: "session_start"
@@ -22,8 +22,8 @@ import * as Vital from "../../../../index";
22
22
  * }]
23
23
  * }
24
24
  */
25
- export interface Query {
26
- timeframe: Vital.QueryTimeframe;
27
- instructions: Vital.QueryInstruction[];
25
+ export interface QueryBatch {
26
+ timeframe: Vital.QueryBatchTimeframe;
27
+ queries: Vital.Query[];
28
28
  config?: Vital.QueryConfig;
29
29
  }
@@ -1 +1 @@
1
- export { type Query } from "./Query";
1
+ export { type QueryBatch } from "./QueryBatch";
@@ -2,4 +2,4 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Vital from "../../../index";
5
- export declare type QueryTimeframe = Vital.RelativeTimeframe | Vital.Placeholder;
5
+ export declare type QueryBatchTimeframe = Vital.RelativeTimeframe | Vital.Placeholder;
@@ -1 +1 @@
1
- export * from "./QueryTimeframe";
1
+ export * from "./QueryBatchTimeframe";
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./QueryTimeframe"), exports);
17
+ __exportStar(require("./QueryBatchTimeframe"), exports);
@@ -22,7 +22,7 @@ export declare class Body {
22
22
  protected readonly _options: Body.Options;
23
23
  constructor(_options?: Body.Options);
24
24
  /**
25
- * Get Daily Body data for user_id
25
+ * Get Body summary for user_id
26
26
  *
27
27
  * @param {string} userId
28
28
  * @param {Vital.BodyGetRequest} request
@@ -37,7 +37,7 @@ export declare class Body {
37
37
  */
38
38
  get(userId: string, request: Vital.BodyGetRequest, requestOptions?: Body.RequestOptions): Promise<Vital.ClientBodyResponse>;
39
39
  /**
40
- * Get Daily Body data for user_id
40
+ * Get raw Body summary for user_id
41
41
  *
42
42
  * @param {string} userId
43
43
  * @param {Vital.BodyGetRawRequest} request
@@ -50,7 +50,7 @@ class Body {
50
50
  this._options = _options;
51
51
  }
52
52
  /**
53
- * Get Daily Body data for user_id
53
+ * Get Body summary for user_id
54
54
  *
55
55
  * @param {string} userId
56
56
  * @param {Vital.BodyGetRequest} request
@@ -78,7 +78,7 @@ class Body {
78
78
  const _response = yield core.fetcher({
79
79
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/body/${encodeURIComponent(userId)}`),
80
80
  method: "GET",
81
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.138", "User-Agent": "@tryvital/vital-node/3.1.138", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
81
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.139", "User-Agent": "@tryvital/vital-node/3.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
82
82
  contentType: "application/json",
83
83
  queryParameters: _queryParams,
84
84
  requestType: "json",
@@ -126,7 +126,7 @@ class Body {
126
126
  });
127
127
  }
128
128
  /**
129
- * Get Daily Body data for user_id
129
+ * Get raw Body summary for user_id
130
130
  *
131
131
  * @param {string} userId
132
132
  * @param {Vital.BodyGetRawRequest} request
@@ -154,7 +154,7 @@ class Body {
154
154
  const _response = yield core.fetcher({
155
155
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/body/${encodeURIComponent(userId)}/raw`),
156
156
  method: "GET",
157
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.138", "User-Agent": "@tryvital/vital-node/3.1.138", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
157
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.139", "User-Agent": "@tryvital/vital-node/3.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
158
158
  contentType: "application/json",
159
159
  queryParameters: _queryParams,
160
160
  requestType: "json",
@@ -72,7 +72,7 @@ class Devices {
72
72
  const _response = yield core.fetcher({
73
73
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/devices/${encodeURIComponent(userId)}/raw`),
74
74
  method: "GET",
75
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.138", "User-Agent": "@tryvital/vital-node/3.1.138", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
75
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.139", "User-Agent": "@tryvital/vital-node/3.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
76
76
  contentType: "application/json",
77
77
  queryParameters: _queryParams,
78
78
  requestType: "json",
@@ -66,7 +66,7 @@ class Insurance {
66
66
  const _response = yield core.fetcher({
67
67
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/insurance/search/payor"),
68
68
  method: "POST",
69
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.138", "User-Agent": "@tryvital/vital-node/3.1.138", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
69
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.139", "User-Agent": "@tryvital/vital-node/3.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
70
70
  contentType: "application/json",
71
71
  requestType: "json",
72
72
  body: serializers.PayorSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -133,7 +133,7 @@ class Insurance {
133
133
  const _response = yield core.fetcher({
134
134
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/insurance/search/diagnosis"),
135
135
  method: "GET",
136
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.138", "User-Agent": "@tryvital/vital-node/3.1.138", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
136
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.139", "User-Agent": "@tryvital/vital-node/3.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
137
137
  contentType: "application/json",
138
138
  queryParameters: _queryParams,
139
139
  requestType: "json",
@@ -81,7 +81,7 @@ class Introspect {
81
81
  const _response = yield core.fetcher({
82
82
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/introspect/resources"),
83
83
  method: "GET",
84
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.138", "User-Agent": "@tryvital/vital-node/3.1.138", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
84
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.139", "User-Agent": "@tryvital/vital-node/3.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
85
85
  contentType: "application/json",
86
86
  queryParameters: _queryParams,
87
87
  requestType: "json",
@@ -160,7 +160,7 @@ class Introspect {
160
160
  const _response = yield core.fetcher({
161
161
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/introspect/historical_pull"),
162
162
  method: "GET",
163
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.138", "User-Agent": "@tryvital/vital-node/3.1.138", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
163
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.139", "User-Agent": "@tryvital/vital-node/3.1.139", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
164
164
  contentType: "application/json",
165
165
  queryParameters: _queryParams,
166
166
  requestType: "json",