@tryvital/vital-node 3.0.3 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/resources/activity/client/Client.js +2 -2
- package/api/resources/body/client/Client.js +2 -2
- package/api/resources/devices/client/Client.js +1 -1
- package/api/resources/insurance/client/Client.js +2 -2
- package/api/resources/introspect/client/Client.js +1 -1
- package/api/resources/labTests/client/Client.js +31 -24
- package/api/resources/labTests/client/requests/LabTestsGetMarkersRequest.d.ts +1 -1
- package/api/resources/link/client/Client.d.ts +5 -10
- package/api/resources/link/client/Client.js +85 -85
- package/api/resources/link/client/requests/EmailAuthLink.d.ts +1 -0
- package/api/resources/link/client/requests/EmailProviderAuthLink.d.ts +1 -0
- package/api/resources/link/client/requests/IndividualProviderData.d.ts +1 -0
- package/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.d.ts +6 -0
- package/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +6 -0
- package/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +6 -0
- package/api/resources/link/client/requests/LinkTokenStateRequest.js +5 -0
- package/api/resources/link/client/requests/PasswordAuthLink.d.ts +1 -0
- package/api/resources/link/client/requests/index.d.ts +3 -1
- package/api/resources/meal/client/Client.js +1 -1
- package/api/resources/profile/client/Client.js +2 -2
- package/api/resources/providers/client/Client.js +1 -1
- package/api/resources/sleep/client/Client.js +4 -4
- package/api/resources/team/client/Client.d.ts +2 -1
- package/api/resources/team/client/Client.js +30 -13
- package/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +6 -0
- package/api/resources/team/client/requests/TeamGetLinkConfigRequest.js +5 -0
- package/api/resources/team/client/requests/index.d.ts +1 -0
- package/api/resources/testkit/client/Client.js +2 -2
- package/api/resources/user/client/Client.js +11 -11
- package/api/resources/vitals/client/Client.js +23 -23
- package/api/resources/workouts/client/Client.js +3 -3
- package/api/types/EventDestinationPreferences.d.ts +8 -0
- package/api/types/EventDestinationPreferences.js +5 -0
- package/api/types/EventDestinationPreferencesEnabledItem.d.ts +9 -0
- package/api/types/EventDestinationPreferencesEnabledItem.js +11 -0
- package/api/types/EventDestinationPreferencesPreferred.d.ts +9 -0
- package/api/types/EventDestinationPreferencesPreferred.js +11 -0
- package/api/types/PatientAddressCompatible.d.ts +2 -2
- package/api/types/TeamConfig.d.ts +3 -0
- package/api/types/index.d.ts +3 -0
- package/api/types/index.js +3 -0
- package/dist/api/resources/activity/client/Client.js +2 -2
- package/dist/api/resources/body/client/Client.js +2 -2
- package/dist/api/resources/devices/client/Client.js +1 -1
- package/dist/api/resources/insurance/client/Client.js +2 -2
- package/dist/api/resources/introspect/client/Client.js +1 -1
- package/dist/api/resources/labTests/client/Client.js +31 -24
- package/dist/api/resources/labTests/client/requests/LabTestsGetMarkersRequest.d.ts +1 -1
- package/dist/api/resources/link/client/Client.d.ts +5 -10
- package/dist/api/resources/link/client/Client.js +85 -85
- package/dist/api/resources/link/client/requests/EmailAuthLink.d.ts +1 -0
- package/dist/api/resources/link/client/requests/EmailProviderAuthLink.d.ts +1 -0
- package/dist/api/resources/link/client/requests/IndividualProviderData.d.ts +1 -0
- package/dist/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.d.ts +6 -0
- package/dist/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.js +5 -0
- package/dist/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +6 -0
- package/dist/api/resources/link/client/requests/LinkGetAllProvidersRequest.js +5 -0
- package/dist/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +6 -0
- package/dist/api/resources/link/client/requests/LinkTokenStateRequest.js +5 -0
- package/dist/api/resources/link/client/requests/PasswordAuthLink.d.ts +1 -0
- package/dist/api/resources/link/client/requests/index.d.ts +3 -1
- package/dist/api/resources/meal/client/Client.js +1 -1
- package/dist/api/resources/profile/client/Client.js +2 -2
- package/dist/api/resources/providers/client/Client.js +1 -1
- package/dist/api/resources/sleep/client/Client.js +4 -4
- package/dist/api/resources/team/client/Client.d.ts +2 -1
- package/dist/api/resources/team/client/Client.js +30 -13
- package/dist/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +6 -0
- package/dist/api/resources/team/client/requests/TeamGetLinkConfigRequest.js +5 -0
- package/dist/api/resources/team/client/requests/index.d.ts +1 -0
- package/dist/api/resources/testkit/client/Client.js +2 -2
- package/dist/api/resources/user/client/Client.js +11 -11
- package/dist/api/resources/vitals/client/Client.js +23 -23
- package/dist/api/resources/workouts/client/Client.js +3 -3
- package/dist/api/types/EventDestinationPreferences.d.ts +8 -0
- package/dist/api/types/EventDestinationPreferences.js +5 -0
- package/dist/api/types/EventDestinationPreferencesEnabledItem.d.ts +9 -0
- package/dist/api/types/EventDestinationPreferencesEnabledItem.js +11 -0
- package/dist/api/types/EventDestinationPreferencesPreferred.d.ts +9 -0
- package/dist/api/types/EventDestinationPreferencesPreferred.js +11 -0
- package/dist/api/types/PatientAddressCompatible.d.ts +2 -2
- package/dist/api/types/TeamConfig.d.ts +3 -0
- package/dist/api/types/index.d.ts +3 -0
- package/dist/api/types/index.js +3 -0
- package/dist/serialization/resources/link/client/index.d.ts +0 -1
- package/dist/serialization/resources/link/client/index.js +1 -2
- package/dist/serialization/resources/link/client/requests/EmailAuthLink.d.ts +1 -1
- package/dist/serialization/resources/link/client/requests/EmailProviderAuthLink.d.ts +1 -1
- package/dist/serialization/resources/link/client/requests/IndividualProviderData.d.ts +1 -1
- package/dist/serialization/resources/link/client/requests/PasswordAuthLink.d.ts +1 -1
- package/dist/serialization/types/EventDestinationPreferences.d.ts +13 -0
- package/dist/serialization/types/EventDestinationPreferences.js +43 -0
- package/dist/serialization/types/EventDestinationPreferencesEnabledItem.d.ts +10 -0
- package/dist/serialization/types/EventDestinationPreferencesEnabledItem.js +31 -0
- package/dist/serialization/types/EventDestinationPreferencesPreferred.d.ts +10 -0
- package/dist/serialization/{resources/link/client/connectOauthProvider.js → types/EventDestinationPreferencesPreferred.js} +3 -3
- package/dist/serialization/types/PatientAddressCompatible.d.ts +2 -2
- package/dist/serialization/types/PatientAddressCompatible.js +2 -2
- package/dist/serialization/types/TeamConfig.d.ts +3 -0
- package/dist/serialization/types/TeamConfig.js +3 -0
- package/dist/serialization/types/index.d.ts +3 -0
- package/dist/serialization/types/index.js +3 -0
- package/package.json +1 -1
- package/serialization/resources/link/client/index.d.ts +0 -1
- package/serialization/resources/link/client/index.js +1 -2
- package/serialization/resources/link/client/requests/EmailAuthLink.d.ts +1 -1
- package/serialization/resources/link/client/requests/EmailProviderAuthLink.d.ts +1 -1
- package/serialization/resources/link/client/requests/IndividualProviderData.d.ts +1 -1
- package/serialization/resources/link/client/requests/PasswordAuthLink.d.ts +1 -1
- package/serialization/types/EventDestinationPreferences.d.ts +13 -0
- package/serialization/types/EventDestinationPreferences.js +43 -0
- package/serialization/types/EventDestinationPreferencesEnabledItem.d.ts +10 -0
- package/serialization/types/EventDestinationPreferencesEnabledItem.js +31 -0
- package/serialization/types/EventDestinationPreferencesPreferred.d.ts +10 -0
- package/serialization/{resources/link/client/connectOauthProvider.js → types/EventDestinationPreferencesPreferred.js} +3 -3
- package/serialization/types/PatientAddressCompatible.d.ts +2 -2
- package/serialization/types/PatientAddressCompatible.js +2 -2
- package/serialization/types/TeamConfig.d.ts +3 -0
- package/serialization/types/TeamConfig.js +3 -0
- package/serialization/types/index.d.ts +3 -0
- package/serialization/types/index.js +3 -0
- package/api/resources/link/client/requests/LinkConnectOauthProviderRequest.d.ts +0 -6
- package/dist/api/resources/link/client/requests/LinkConnectOauthProviderRequest.d.ts +0 -6
- package/dist/serialization/resources/link/client/connectOauthProvider.d.ts +0 -9
- package/serialization/resources/link/client/connectOauthProvider.d.ts +0 -9
- /package/api/resources/link/client/requests/{LinkConnectOauthProviderRequest.js → LinkGenerateOauthLinkRequest.js} +0 -0
- /package/{dist/api/resources/link/client/requests/LinkConnectOauthProviderRequest.js → api/resources/link/client/requests/LinkGetAllProvidersRequest.js} +0 -0
@@ -63,7 +63,7 @@ class LabTests {
|
|
63
63
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
64
64
|
"X-Fern-Language": "JavaScript",
|
65
65
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
66
|
-
"X-Fern-SDK-Version": "3.0.
|
66
|
+
"X-Fern-SDK-Version": "3.0.5",
|
67
67
|
},
|
68
68
|
contentType: "application/json",
|
69
69
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -110,7 +110,7 @@ class LabTests {
|
|
110
110
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
111
111
|
"X-Fern-Language": "JavaScript",
|
112
112
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
113
|
-
"X-Fern-SDK-Version": "3.0.
|
113
|
+
"X-Fern-SDK-Version": "3.0.5",
|
114
114
|
},
|
115
115
|
contentType: "application/json",
|
116
116
|
body: yield serializers.CreateLabTestRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -165,7 +165,14 @@ class LabTests {
|
|
165
165
|
const { labId, name, page, size } = request;
|
166
166
|
const _queryParams = new url_search_params_1.default();
|
167
167
|
if (labId != null) {
|
168
|
-
|
168
|
+
if (Array.isArray(labId)) {
|
169
|
+
for (const _item of labId) {
|
170
|
+
_queryParams.append("lab_id", _item.toString());
|
171
|
+
}
|
172
|
+
}
|
173
|
+
else {
|
174
|
+
_queryParams.append("lab_id", labId.toString());
|
175
|
+
}
|
169
176
|
}
|
170
177
|
if (name != null) {
|
171
178
|
_queryParams.append("name", name);
|
@@ -183,7 +190,7 @@ class LabTests {
|
|
183
190
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
184
191
|
"X-Fern-Language": "JavaScript",
|
185
192
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
186
|
-
"X-Fern-SDK-Version": "3.0.
|
193
|
+
"X-Fern-SDK-Version": "3.0.5",
|
187
194
|
},
|
188
195
|
contentType: "application/json",
|
189
196
|
queryParameters: _queryParams,
|
@@ -249,7 +256,7 @@ class LabTests {
|
|
249
256
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
250
257
|
"X-Fern-Language": "JavaScript",
|
251
258
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
252
|
-
"X-Fern-SDK-Version": "3.0.
|
259
|
+
"X-Fern-SDK-Version": "3.0.5",
|
253
260
|
},
|
254
261
|
contentType: "application/json",
|
255
262
|
queryParameters: _queryParams,
|
@@ -308,7 +315,7 @@ class LabTests {
|
|
308
315
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
309
316
|
"X-Fern-Language": "JavaScript",
|
310
317
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
311
|
-
"X-Fern-SDK-Version": "3.0.
|
318
|
+
"X-Fern-SDK-Version": "3.0.5",
|
312
319
|
},
|
313
320
|
contentType: "application/json",
|
314
321
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -365,7 +372,7 @@ class LabTests {
|
|
365
372
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
366
373
|
"X-Fern-Language": "JavaScript",
|
367
374
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
368
|
-
"X-Fern-SDK-Version": "3.0.
|
375
|
+
"X-Fern-SDK-Version": "3.0.5",
|
369
376
|
},
|
370
377
|
contentType: "application/json",
|
371
378
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -413,7 +420,7 @@ class LabTests {
|
|
413
420
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
414
421
|
"X-Fern-Language": "JavaScript",
|
415
422
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
416
|
-
"X-Fern-SDK-Version": "3.0.
|
423
|
+
"X-Fern-SDK-Version": "3.0.5",
|
417
424
|
},
|
418
425
|
contentType: "application/json",
|
419
426
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -472,7 +479,7 @@ class LabTests {
|
|
472
479
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
473
480
|
"X-Fern-Language": "JavaScript",
|
474
481
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
475
|
-
"X-Fern-SDK-Version": "3.0.
|
482
|
+
"X-Fern-SDK-Version": "3.0.5",
|
476
483
|
},
|
477
484
|
contentType: "application/json",
|
478
485
|
body: yield serializers.UsAddress.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -531,7 +538,7 @@ class LabTests {
|
|
531
538
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
532
539
|
"X-Fern-Language": "JavaScript",
|
533
540
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
534
|
-
"X-Fern-SDK-Version": "3.0.
|
541
|
+
"X-Fern-SDK-Version": "3.0.5",
|
535
542
|
},
|
536
543
|
contentType: "application/json",
|
537
544
|
body: yield serializers.AppointmentBookingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -590,7 +597,7 @@ class LabTests {
|
|
590
597
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
591
598
|
"X-Fern-Language": "JavaScript",
|
592
599
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
593
|
-
"X-Fern-SDK-Version": "3.0.
|
600
|
+
"X-Fern-SDK-Version": "3.0.5",
|
594
601
|
},
|
595
602
|
contentType: "application/json",
|
596
603
|
body: yield serializers.AppointmentRescheduleRequest.jsonOrThrow(request, {
|
@@ -651,7 +658,7 @@ class LabTests {
|
|
651
658
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
652
659
|
"X-Fern-Language": "JavaScript",
|
653
660
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
654
|
-
"X-Fern-SDK-Version": "3.0.
|
661
|
+
"X-Fern-SDK-Version": "3.0.5",
|
655
662
|
},
|
656
663
|
contentType: "application/json",
|
657
664
|
body: yield serializers.AppointmentCancelRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -709,7 +716,7 @@ class LabTests {
|
|
709
716
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
710
717
|
"X-Fern-Language": "JavaScript",
|
711
718
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
712
|
-
"X-Fern-SDK-Version": "3.0.
|
719
|
+
"X-Fern-SDK-Version": "3.0.5",
|
713
720
|
},
|
714
721
|
contentType: "application/json",
|
715
722
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -757,7 +764,7 @@ class LabTests {
|
|
757
764
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
758
765
|
"X-Fern-Language": "JavaScript",
|
759
766
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
760
|
-
"X-Fern-SDK-Version": "3.0.
|
767
|
+
"X-Fern-SDK-Version": "3.0.5",
|
761
768
|
},
|
762
769
|
contentType: "application/json",
|
763
770
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -821,7 +828,7 @@ class LabTests {
|
|
821
828
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
822
829
|
"X-Fern-Language": "JavaScript",
|
823
830
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
824
|
-
"X-Fern-SDK-Version": "3.0.
|
831
|
+
"X-Fern-SDK-Version": "3.0.5",
|
825
832
|
},
|
826
833
|
contentType: "application/json",
|
827
834
|
queryParameters: _queryParams,
|
@@ -880,7 +887,7 @@ class LabTests {
|
|
880
887
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
881
888
|
"X-Fern-Language": "JavaScript",
|
882
889
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
883
|
-
"X-Fern-SDK-Version": "3.0.
|
890
|
+
"X-Fern-SDK-Version": "3.0.5",
|
884
891
|
},
|
885
892
|
contentType: "application/json",
|
886
893
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -934,7 +941,7 @@ class LabTests {
|
|
934
941
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
935
942
|
"X-Fern-Language": "JavaScript",
|
936
943
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
937
|
-
"X-Fern-SDK-Version": "3.0.
|
944
|
+
"X-Fern-SDK-Version": "3.0.5",
|
938
945
|
},
|
939
946
|
contentType: "application/json",
|
940
947
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -992,7 +999,7 @@ class LabTests {
|
|
992
999
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
993
1000
|
"X-Fern-Language": "JavaScript",
|
994
1001
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
995
|
-
"X-Fern-SDK-Version": "3.0.
|
1002
|
+
"X-Fern-SDK-Version": "3.0.5",
|
996
1003
|
},
|
997
1004
|
contentType: "application/json",
|
998
1005
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1050,7 +1057,7 @@ class LabTests {
|
|
1050
1057
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
1051
1058
|
"X-Fern-Language": "JavaScript",
|
1052
1059
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
1053
|
-
"X-Fern-SDK-Version": "3.0.
|
1060
|
+
"X-Fern-SDK-Version": "3.0.5",
|
1054
1061
|
},
|
1055
1062
|
contentType: "application/json",
|
1056
1063
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1103,7 +1110,7 @@ class LabTests {
|
|
1103
1110
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
1104
1111
|
"X-Fern-Language": "JavaScript",
|
1105
1112
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
1106
|
-
"X-Fern-SDK-Version": "3.0.
|
1113
|
+
"X-Fern-SDK-Version": "3.0.5",
|
1107
1114
|
},
|
1108
1115
|
contentType: "application/json",
|
1109
1116
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1161,7 +1168,7 @@ class LabTests {
|
|
1161
1168
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
1162
1169
|
"X-Fern-Language": "JavaScript",
|
1163
1170
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
1164
|
-
"X-Fern-SDK-Version": "3.0.
|
1171
|
+
"X-Fern-SDK-Version": "3.0.5",
|
1165
1172
|
},
|
1166
1173
|
contentType: "application/json",
|
1167
1174
|
body: yield serializers.CreateOrderRequestCompatible.jsonOrThrow(request, {
|
@@ -1222,7 +1229,7 @@ class LabTests {
|
|
1222
1229
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
1223
1230
|
"X-Fern-Language": "JavaScript",
|
1224
1231
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
1225
|
-
"X-Fern-SDK-Version": "3.0.
|
1232
|
+
"X-Fern-SDK-Version": "3.0.5",
|
1226
1233
|
},
|
1227
1234
|
contentType: "application/json",
|
1228
1235
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1288,7 +1295,7 @@ class LabTests {
|
|
1288
1295
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
1289
1296
|
"X-Fern-Language": "JavaScript",
|
1290
1297
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
1291
|
-
"X-Fern-SDK-Version": "3.0.
|
1298
|
+
"X-Fern-SDK-Version": "3.0.5",
|
1292
1299
|
},
|
1293
1300
|
contentType: "application/json",
|
1294
1301
|
queryParameters: _queryParams,
|
@@ -1372,7 +1379,7 @@ class LabTests {
|
|
1372
1379
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
1373
1380
|
"X-Fern-Language": "JavaScript",
|
1374
1381
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
1375
|
-
"X-Fern-SDK-Version": "3.0.
|
1382
|
+
"X-Fern-SDK-Version": "3.0.5",
|
1376
1383
|
},
|
1377
1384
|
contentType: "application/json",
|
1378
1385
|
queryParameters: _queryParams,
|
@@ -5,7 +5,7 @@ export interface LabTestsGetMarkersRequest {
|
|
5
5
|
/**
|
6
6
|
* The identifier Vital assigned to a lab partner.
|
7
7
|
*/
|
8
|
-
labId?: number;
|
8
|
+
labId?: number | number[];
|
9
9
|
/**
|
10
10
|
* The name of an individual biomarker or a panel. Used as a fuzzy filter when searching markers.
|
11
11
|
*/
|
@@ -35,13 +35,6 @@ export declare class Link {
|
|
35
35
|
* @throws {@link Vital.UnprocessableEntityError}
|
36
36
|
*/
|
37
37
|
codeCreate(request: Vital.LinkCodeCreateRequest, requestOptions?: Link.RequestOptions): Promise<Vital.VitalTokenCreatedResponse>;
|
38
|
-
/**
|
39
|
-
* REQUEST_SOURCE: VITAL-LINK
|
40
|
-
* PROVIDER_TYPE: OAUTH
|
41
|
-
* Connect oauth providers
|
42
|
-
* @throws {@link Vital.UnprocessableEntityError}
|
43
|
-
*/
|
44
|
-
connectOauthProvider(provider: string, request?: Vital.LinkConnectOauthProviderRequest, requestOptions?: Link.RequestOptions): Promise<Record<string, unknown>>;
|
45
38
|
/**
|
46
39
|
* REQUEST_SOURCE: VITAL-LINK
|
47
40
|
* Start link token process
|
@@ -51,8 +44,9 @@ export declare class Link {
|
|
51
44
|
/**
|
52
45
|
* REQUEST_SOURCE: VITAL-LINK
|
53
46
|
* Check link token state - can be hit continuously used as heartbeat
|
47
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
54
48
|
*/
|
55
|
-
tokenState(requestOptions?: Link.RequestOptions): Promise<Record<string, unknown>>;
|
49
|
+
tokenState(request: Vital.LinkTokenStateRequest, requestOptions?: Link.RequestOptions): Promise<Record<string, unknown>>;
|
56
50
|
/**
|
57
51
|
* REQUEST_SOURCE: VITAL-LINK
|
58
52
|
* PROVIDER_TYPE: EMAIL-AUTH
|
@@ -71,7 +65,7 @@ export declare class Link {
|
|
71
65
|
* This endpoint generates an OAuth link for oauth provider
|
72
66
|
* @throws {@link Vital.UnprocessableEntityError}
|
73
67
|
*/
|
74
|
-
generateOauthLink(oauthProvider: Vital.OAuthProviders, requestOptions?: Link.RequestOptions): Promise<Vital.Source>;
|
68
|
+
generateOauthLink(oauthProvider: Vital.OAuthProviders, request: Vital.LinkGenerateOauthLinkRequest, requestOptions?: Link.RequestOptions): Promise<Vital.Source>;
|
75
69
|
/**
|
76
70
|
* This connects auth providers that are password based.
|
77
71
|
* @throws {@link Vital.UnprocessableEntityError}
|
@@ -84,8 +78,9 @@ export declare class Link {
|
|
84
78
|
connectEmailAuthProvider(provider: Vital.EmailProviders, request: Vital.EmailProviderAuthLink, requestOptions?: Link.RequestOptions): Promise<Vital.ConnectionStatus>;
|
85
79
|
/**
|
86
80
|
* GET List of all available providers given the generated link token.
|
81
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
87
82
|
*/
|
88
|
-
getAllProviders(requestOptions?: Link.RequestOptions): Promise<Vital.SourceLink[]>;
|
83
|
+
getAllProviders(request: Vital.LinkGetAllProvidersRequest, requestOptions?: Link.RequestOptions): Promise<Vital.SourceLink[]>;
|
89
84
|
/**
|
90
85
|
* REQUEST_SOURCE: CUSTOMER
|
91
86
|
* PROVIDER_TYPE: MANUAL-PROVIDER
|
@@ -80,7 +80,7 @@ class Link {
|
|
80
80
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
81
81
|
"X-Fern-Language": "JavaScript",
|
82
82
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
83
|
-
"X-Fern-SDK-Version": "3.0.
|
83
|
+
"X-Fern-SDK-Version": "3.0.5",
|
84
84
|
},
|
85
85
|
contentType: "application/json",
|
86
86
|
body: yield serializers.LinkTokenExchange.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -138,7 +138,7 @@ class Link {
|
|
138
138
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
139
139
|
"X-Fern-Language": "JavaScript",
|
140
140
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
141
|
-
"X-Fern-SDK-Version": "3.0.
|
141
|
+
"X-Fern-SDK-Version": "3.0.5",
|
142
142
|
},
|
143
143
|
contentType: "application/json",
|
144
144
|
body: yield serializers.LinkTokenBase.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -203,7 +203,7 @@ class Link {
|
|
203
203
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
204
204
|
"X-Fern-Language": "JavaScript",
|
205
205
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
206
|
-
"X-Fern-SDK-Version": "3.0.
|
206
|
+
"X-Fern-SDK-Version": "3.0.5",
|
207
207
|
},
|
208
208
|
contentType: "application/json",
|
209
209
|
queryParameters: _queryParams,
|
@@ -250,29 +250,27 @@ class Link {
|
|
250
250
|
}
|
251
251
|
/**
|
252
252
|
* REQUEST_SOURCE: VITAL-LINK
|
253
|
-
*
|
254
|
-
* Connect oauth providers
|
253
|
+
* Start link token process
|
255
254
|
* @throws {@link Vital.UnprocessableEntityError}
|
256
255
|
*/
|
257
|
-
|
256
|
+
startConnect(request, requestOptions) {
|
258
257
|
var _a;
|
259
258
|
return __awaiter(this, void 0, void 0, function* () {
|
260
|
-
const { vitalSdkNoRedirect } = request;
|
261
259
|
const _response = yield core.fetcher({
|
262
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production,
|
263
|
-
method: "
|
260
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/start"),
|
261
|
+
method: "POST",
|
264
262
|
headers: {
|
265
263
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
266
264
|
"X-Fern-Language": "JavaScript",
|
267
265
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
268
|
-
"X-Fern-SDK-Version": "3.0.
|
269
|
-
"x-vital-sdk-no-redirect": vitalSdkNoRedirect != null ? vitalSdkNoRedirect : undefined,
|
266
|
+
"X-Fern-SDK-Version": "3.0.5",
|
270
267
|
},
|
271
268
|
contentType: "application/json",
|
269
|
+
body: yield serializers.BeginLinkTokenRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
272
270
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
273
271
|
});
|
274
272
|
if (_response.ok) {
|
275
|
-
return yield serializers.link.
|
273
|
+
return yield serializers.link.startConnect.Response.parseOrThrow(_response.body, {
|
276
274
|
unrecognizedObjectKeys: "passthrough",
|
277
275
|
allowUnrecognizedUnionMembers: true,
|
278
276
|
allowUnrecognizedEnumValues: true,
|
@@ -312,27 +310,32 @@ class Link {
|
|
312
310
|
}
|
313
311
|
/**
|
314
312
|
* REQUEST_SOURCE: VITAL-LINK
|
315
|
-
*
|
313
|
+
* Check link token state - can be hit continuously used as heartbeat
|
316
314
|
* @throws {@link Vital.UnprocessableEntityError}
|
317
315
|
*/
|
318
|
-
|
316
|
+
tokenState(request, requestOptions) {
|
319
317
|
var _a;
|
320
318
|
return __awaiter(this, void 0, void 0, function* () {
|
319
|
+
const { vitalLinkToken } = request;
|
321
320
|
const _response = yield core.fetcher({
|
322
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/
|
323
|
-
method: "
|
321
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/state"),
|
322
|
+
method: "GET",
|
324
323
|
headers: {
|
325
324
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
326
325
|
"X-Fern-Language": "JavaScript",
|
327
326
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
328
|
-
"X-Fern-SDK-Version": "3.0.
|
327
|
+
"X-Fern-SDK-Version": "3.0.5",
|
328
|
+
"x-vital-link-token": vitalLinkToken != null
|
329
|
+
? typeof vitalLinkToken === "string"
|
330
|
+
? vitalLinkToken
|
331
|
+
: JSON.stringify(vitalLinkToken)
|
332
|
+
: undefined,
|
329
333
|
},
|
330
334
|
contentType: "application/json",
|
331
|
-
body: yield serializers.BeginLinkTokenRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
332
335
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
333
336
|
});
|
334
337
|
if (_response.ok) {
|
335
|
-
return yield serializers.link.
|
338
|
+
return yield serializers.link.tokenState.Response.parseOrThrow(_response.body, {
|
336
339
|
unrecognizedObjectKeys: "passthrough",
|
337
340
|
allowUnrecognizedUnionMembers: true,
|
338
341
|
allowUnrecognizedEnumValues: true,
|
@@ -370,54 +373,6 @@ class Link {
|
|
370
373
|
}
|
371
374
|
});
|
372
375
|
}
|
373
|
-
/**
|
374
|
-
* REQUEST_SOURCE: VITAL-LINK
|
375
|
-
* Check link token state - can be hit continuously used as heartbeat
|
376
|
-
*/
|
377
|
-
tokenState(requestOptions) {
|
378
|
-
var _a;
|
379
|
-
return __awaiter(this, void 0, void 0, function* () {
|
380
|
-
const _response = yield core.fetcher({
|
381
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/state"),
|
382
|
-
method: "GET",
|
383
|
-
headers: {
|
384
|
-
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
385
|
-
"X-Fern-Language": "JavaScript",
|
386
|
-
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
387
|
-
"X-Fern-SDK-Version": "3.0.3",
|
388
|
-
},
|
389
|
-
contentType: "application/json",
|
390
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
391
|
-
});
|
392
|
-
if (_response.ok) {
|
393
|
-
return yield serializers.link.tokenState.Response.parseOrThrow(_response.body, {
|
394
|
-
unrecognizedObjectKeys: "passthrough",
|
395
|
-
allowUnrecognizedUnionMembers: true,
|
396
|
-
allowUnrecognizedEnumValues: true,
|
397
|
-
breadcrumbsPrefix: ["response"],
|
398
|
-
});
|
399
|
-
}
|
400
|
-
if (_response.error.reason === "status-code") {
|
401
|
-
throw new errors.VitalError({
|
402
|
-
statusCode: _response.error.statusCode,
|
403
|
-
body: _response.error.body,
|
404
|
-
});
|
405
|
-
}
|
406
|
-
switch (_response.error.reason) {
|
407
|
-
case "non-json":
|
408
|
-
throw new errors.VitalError({
|
409
|
-
statusCode: _response.error.statusCode,
|
410
|
-
body: _response.error.rawBody,
|
411
|
-
});
|
412
|
-
case "timeout":
|
413
|
-
throw new errors.VitalTimeoutError();
|
414
|
-
case "unknown":
|
415
|
-
throw new errors.VitalError({
|
416
|
-
message: _response.error.errorMessage,
|
417
|
-
});
|
418
|
-
}
|
419
|
-
});
|
420
|
-
}
|
421
376
|
/**
|
422
377
|
* REQUEST_SOURCE: VITAL-LINK
|
423
378
|
* PROVIDER_TYPE: EMAIL-AUTH
|
@@ -427,6 +382,7 @@ class Link {
|
|
427
382
|
emailAuth(request, requestOptions) {
|
428
383
|
var _a;
|
429
384
|
return __awaiter(this, void 0, void 0, function* () {
|
385
|
+
const { vitalLinkToken } = request, _body = __rest(request, ["vitalLinkToken"]);
|
430
386
|
const _response = yield core.fetcher({
|
431
387
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/auth/email"),
|
432
388
|
method: "POST",
|
@@ -434,10 +390,15 @@ class Link {
|
|
434
390
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
435
391
|
"X-Fern-Language": "JavaScript",
|
436
392
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
437
|
-
"X-Fern-SDK-Version": "3.0.
|
393
|
+
"X-Fern-SDK-Version": "3.0.5",
|
394
|
+
"x-vital-link-token": vitalLinkToken != null
|
395
|
+
? typeof vitalLinkToken === "string"
|
396
|
+
? vitalLinkToken
|
397
|
+
: JSON.stringify(vitalLinkToken)
|
398
|
+
: undefined,
|
438
399
|
},
|
439
400
|
contentType: "application/json",
|
440
|
-
body: yield serializers.EmailAuthLink.jsonOrThrow(
|
401
|
+
body: yield serializers.EmailAuthLink.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
441
402
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
442
403
|
});
|
443
404
|
if (_response.ok) {
|
@@ -488,7 +449,7 @@ class Link {
|
|
488
449
|
passwordAuth(request, requestOptions) {
|
489
450
|
var _a;
|
490
451
|
return __awaiter(this, void 0, void 0, function* () {
|
491
|
-
const { vitalLinkClientRegion } = request, _body = __rest(request, ["vitalLinkClientRegion"]);
|
452
|
+
const { vitalLinkClientRegion, vitalLinkToken } = request, _body = __rest(request, ["vitalLinkClientRegion", "vitalLinkToken"]);
|
492
453
|
const _response = yield core.fetcher({
|
493
454
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/auth"),
|
494
455
|
method: "POST",
|
@@ -496,8 +457,13 @@ class Link {
|
|
496
457
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
497
458
|
"X-Fern-Language": "JavaScript",
|
498
459
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
499
|
-
"X-Fern-SDK-Version": "3.0.
|
460
|
+
"X-Fern-SDK-Version": "3.0.5",
|
500
461
|
"x-vital-link-client-region": vitalLinkClientRegion != null ? vitalLinkClientRegion : undefined,
|
462
|
+
"x-vital-link-token": vitalLinkToken != null
|
463
|
+
? typeof vitalLinkToken === "string"
|
464
|
+
? vitalLinkToken
|
465
|
+
: JSON.stringify(vitalLinkToken)
|
466
|
+
: undefined,
|
501
467
|
},
|
502
468
|
contentType: "application/json",
|
503
469
|
body: yield serializers.PasswordAuthLink.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
@@ -546,9 +512,10 @@ class Link {
|
|
546
512
|
* This endpoint generates an OAuth link for oauth provider
|
547
513
|
* @throws {@link Vital.UnprocessableEntityError}
|
548
514
|
*/
|
549
|
-
generateOauthLink(oauthProvider, requestOptions) {
|
515
|
+
generateOauthLink(oauthProvider, request, requestOptions) {
|
550
516
|
var _a;
|
551
517
|
return __awaiter(this, void 0, void 0, function* () {
|
518
|
+
const { vitalLinkToken } = request;
|
552
519
|
const _response = yield core.fetcher({
|
553
520
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/oauth/${yield serializers.OAuthProviders.jsonOrThrow(oauthProvider)}`),
|
554
521
|
method: "GET",
|
@@ -556,7 +523,12 @@ class Link {
|
|
556
523
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
557
524
|
"X-Fern-Language": "JavaScript",
|
558
525
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
559
|
-
"X-Fern-SDK-Version": "3.0.
|
526
|
+
"X-Fern-SDK-Version": "3.0.5",
|
527
|
+
"x-vital-link-token": vitalLinkToken != null
|
528
|
+
? typeof vitalLinkToken === "string"
|
529
|
+
? vitalLinkToken
|
530
|
+
: JSON.stringify(vitalLinkToken)
|
531
|
+
: undefined,
|
560
532
|
},
|
561
533
|
contentType: "application/json",
|
562
534
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -607,7 +579,7 @@ class Link {
|
|
607
579
|
connectPasswordProvider(provider, request, requestOptions) {
|
608
580
|
var _a;
|
609
581
|
return __awaiter(this, void 0, void 0, function* () {
|
610
|
-
const { vitalLinkClientRegion } = request, _body = __rest(request, ["vitalLinkClientRegion"]);
|
582
|
+
const { vitalLinkClientRegion, vitalLinkToken } = request, _body = __rest(request, ["vitalLinkClientRegion", "vitalLinkToken"]);
|
611
583
|
const _response = yield core.fetcher({
|
612
584
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/password/${yield serializers.PasswordProviders.jsonOrThrow(provider)}`),
|
613
585
|
method: "POST",
|
@@ -615,8 +587,13 @@ class Link {
|
|
615
587
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
616
588
|
"X-Fern-Language": "JavaScript",
|
617
589
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
618
|
-
"X-Fern-SDK-Version": "3.0.
|
590
|
+
"X-Fern-SDK-Version": "3.0.5",
|
619
591
|
"x-vital-link-client-region": vitalLinkClientRegion != null ? vitalLinkClientRegion : undefined,
|
592
|
+
"x-vital-link-token": vitalLinkToken != null
|
593
|
+
? typeof vitalLinkToken === "string"
|
594
|
+
? vitalLinkToken
|
595
|
+
: JSON.stringify(vitalLinkToken)
|
596
|
+
: undefined,
|
620
597
|
},
|
621
598
|
contentType: "application/json",
|
622
599
|
body: yield serializers.IndividualProviderData.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
@@ -668,6 +645,7 @@ class Link {
|
|
668
645
|
connectEmailAuthProvider(provider, request, requestOptions) {
|
669
646
|
var _a;
|
670
647
|
return __awaiter(this, void 0, void 0, function* () {
|
648
|
+
const { vitalLinkToken } = request, _body = __rest(request, ["vitalLinkToken"]);
|
671
649
|
const _response = yield core.fetcher({
|
672
650
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/email/${yield serializers.EmailProviders.jsonOrThrow(provider)}`),
|
673
651
|
method: "POST",
|
@@ -675,10 +653,15 @@ class Link {
|
|
675
653
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
676
654
|
"X-Fern-Language": "JavaScript",
|
677
655
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
678
|
-
"X-Fern-SDK-Version": "3.0.
|
656
|
+
"X-Fern-SDK-Version": "3.0.5",
|
657
|
+
"x-vital-link-token": vitalLinkToken != null
|
658
|
+
? typeof vitalLinkToken === "string"
|
659
|
+
? vitalLinkToken
|
660
|
+
: JSON.stringify(vitalLinkToken)
|
661
|
+
: undefined,
|
679
662
|
},
|
680
663
|
contentType: "application/json",
|
681
|
-
body: yield serializers.EmailProviderAuthLink.jsonOrThrow(
|
664
|
+
body: yield serializers.EmailProviderAuthLink.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
682
665
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
683
666
|
});
|
684
667
|
if (_response.ok) {
|
@@ -722,10 +705,12 @@ class Link {
|
|
722
705
|
}
|
723
706
|
/**
|
724
707
|
* GET List of all available providers given the generated link token.
|
708
|
+
* @throws {@link Vital.UnprocessableEntityError}
|
725
709
|
*/
|
726
|
-
getAllProviders(requestOptions) {
|
710
|
+
getAllProviders(request, requestOptions) {
|
727
711
|
var _a;
|
728
712
|
return __awaiter(this, void 0, void 0, function* () {
|
713
|
+
const { vitalLinkToken } = request;
|
729
714
|
const _response = yield core.fetcher({
|
730
715
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/providers"),
|
731
716
|
method: "GET",
|
@@ -733,7 +718,12 @@ class Link {
|
|
733
718
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
734
719
|
"X-Fern-Language": "JavaScript",
|
735
720
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
736
|
-
"X-Fern-SDK-Version": "3.0.
|
721
|
+
"X-Fern-SDK-Version": "3.0.5",
|
722
|
+
"x-vital-link-token": vitalLinkToken != null
|
723
|
+
? typeof vitalLinkToken === "string"
|
724
|
+
? vitalLinkToken
|
725
|
+
: JSON.stringify(vitalLinkToken)
|
726
|
+
: undefined,
|
737
727
|
},
|
738
728
|
contentType: "application/json",
|
739
729
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -747,10 +737,20 @@ class Link {
|
|
747
737
|
});
|
748
738
|
}
|
749
739
|
if (_response.error.reason === "status-code") {
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
740
|
+
switch (_response.error.statusCode) {
|
741
|
+
case 422:
|
742
|
+
throw new Vital.UnprocessableEntityError(yield serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
743
|
+
unrecognizedObjectKeys: "passthrough",
|
744
|
+
allowUnrecognizedUnionMembers: true,
|
745
|
+
allowUnrecognizedEnumValues: true,
|
746
|
+
breadcrumbsPrefix: ["response"],
|
747
|
+
}));
|
748
|
+
default:
|
749
|
+
throw new errors.VitalError({
|
750
|
+
statusCode: _response.error.statusCode,
|
751
|
+
body: _response.error.body,
|
752
|
+
});
|
753
|
+
}
|
754
754
|
}
|
755
755
|
switch (_response.error.reason) {
|
756
756
|
case "non-json":
|
@@ -783,7 +783,7 @@ class Link {
|
|
783
783
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
784
784
|
"X-Fern-Language": "JavaScript",
|
785
785
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
786
|
-
"X-Fern-SDK-Version": "3.0.
|
786
|
+
"X-Fern-SDK-Version": "3.0.5",
|
787
787
|
},
|
788
788
|
contentType: "application/json",
|
789
789
|
body: yield serializers.ManualConnectionData.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -842,7 +842,7 @@ class Link {
|
|
842
842
|
"x-vital-api-key": yield core.Supplier.get(this._options.apiKey),
|
843
843
|
"X-Fern-Language": "JavaScript",
|
844
844
|
"X-Fern-SDK-Name": "@tryvital/vital-node",
|
845
|
-
"X-Fern-SDK-Version": "3.0.
|
845
|
+
"X-Fern-SDK-Version": "3.0.5",
|
846
846
|
},
|
847
847
|
contentType: "application/json",
|
848
848
|
body: yield serializers.DemoConnectionCreationPayload.jsonOrThrow(request, {
|