@bikefinder/api-client 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +118 -2
- package/dist/errors.d.ts +4 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +7 -0
- package/dist/errors.js.map +1 -0
- package/dist/generated/client/client.gen.d.ts +3 -0
- package/dist/generated/client/client.gen.d.ts.map +1 -0
- package/dist/generated/client/client.gen.js +218 -0
- package/dist/generated/client/client.gen.js.map +1 -0
- package/dist/generated/client/index.d.ts +11 -0
- package/dist/generated/client/index.d.ts.map +1 -0
- package/dist/generated/client/index.js +7 -0
- package/dist/generated/client/index.js.map +1 -0
- package/dist/generated/client/types.gen.d.ts +121 -0
- package/dist/generated/client/types.gen.d.ts.map +1 -0
- package/dist/generated/client/types.gen.js +3 -0
- package/dist/generated/client/types.gen.js.map +1 -0
- package/dist/generated/client/utils.gen.d.ts +38 -0
- package/dist/generated/client/utils.gen.d.ts.map +1 -0
- package/dist/generated/client/utils.gen.js +232 -0
- package/dist/generated/client/utils.gen.js.map +1 -0
- package/dist/generated/client.gen.d.ts +13 -0
- package/dist/generated/client.gen.d.ts.map +1 -0
- package/dist/generated/client.gen.js +4 -0
- package/dist/generated/client.gen.js.map +1 -0
- package/dist/generated/core/auth.gen.d.ts +26 -0
- package/dist/generated/core/auth.gen.d.ts.map +1 -0
- package/dist/generated/core/auth.gen.js +15 -0
- package/dist/generated/core/auth.gen.js.map +1 -0
- package/dist/generated/core/bodySerializer.gen.d.ts +26 -0
- package/dist/generated/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/generated/core/bodySerializer.gen.js +58 -0
- package/dist/generated/core/bodySerializer.gen.js.map +1 -0
- package/dist/generated/core/params.gen.d.ts +44 -0
- package/dist/generated/core/params.gen.d.ts.map +1 -0
- package/dist/generated/core/params.gen.js +113 -0
- package/dist/generated/core/params.gen.js.map +1 -0
- package/dist/generated/core/pathSerializer.gen.d.ts +34 -0
- package/dist/generated/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/generated/core/pathSerializer.gen.js +115 -0
- package/dist/generated/core/pathSerializer.gen.js.map +1 -0
- package/dist/generated/core/queryKeySerializer.gen.d.ts +19 -0
- package/dist/generated/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/generated/core/queryKeySerializer.gen.js +100 -0
- package/dist/generated/core/queryKeySerializer.gen.js.map +1 -0
- package/dist/generated/core/serverSentEvents.gen.d.ts +72 -0
- package/dist/generated/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/generated/core/serverSentEvents.gen.js +137 -0
- package/dist/generated/core/serverSentEvents.gen.js.map +1 -0
- package/dist/generated/core/types.gen.d.ts +84 -0
- package/dist/generated/core/types.gen.d.ts.map +1 -0
- package/dist/generated/core/types.gen.js +3 -0
- package/dist/generated/core/types.gen.js.map +1 -0
- package/dist/generated/core/utils.gen.d.ts +20 -0
- package/dist/generated/core/utils.gen.d.ts.map +1 -0
- package/dist/generated/core/utils.gen.js +88 -0
- package/dist/generated/core/utils.gen.js.map +1 -0
- package/dist/generated/index.d.ts +3 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +3 -0
- package/dist/generated/index.js.map +1 -0
- package/dist/generated/sdk.gen.d.ts +177 -0
- package/dist/generated/sdk.gen.d.ts.map +1 -0
- package/dist/generated/sdk.gen.js +536 -0
- package/dist/generated/sdk.gen.js.map +1 -0
- package/dist/generated/types.gen.d.ts +2019 -0
- package/dist/generated/types.gen.d.ts.map +1 -0
- package/dist/generated/types.gen.js +3 -0
- package/dist/generated/types.gen.js.map +1 -0
- package/dist/generated/zod.gen.d.ts +1165 -0
- package/dist/generated/zod.gen.d.ts.map +1 -0
- package/dist/generated/zod.gen.js +874 -0
- package/dist/generated/zod.gen.js.map +1 -0
- package/dist/http-client.d.ts +3 -0
- package/dist/http-client.d.ts.map +1 -0
- package/dist/http-client.js +29 -0
- package/dist/http-client.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/options.d.ts +13 -0
- package/dist/options.d.ts.map +1 -0
- package/dist/options.js +40 -0
- package/dist/options.js.map +1 -0
- package/dist/realtime/api-stream-error.d.ts +8 -0
- package/dist/realtime/api-stream-error.d.ts.map +1 -0
- package/dist/realtime/api-stream-error.js +16 -0
- package/dist/realtime/api-stream-error.js.map +1 -0
- package/dist/realtime/watch.d.ts +21 -0
- package/dist/realtime/watch.d.ts.map +1 -0
- package/dist/realtime/watch.js +95 -0
- package/dist/realtime/watch.js.map +1 -0
- package/dist/transport.d.ts +4 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +84 -0
- package/dist/transport.js.map +1 -0
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +58 -4
- package/src/errors.ts +6 -0
- package/src/generated/client/client.gen.ts +300 -0
- package/src/generated/client/index.ts +27 -0
- package/src/generated/client/types.gen.ts +238 -0
- package/src/generated/client/utils.gen.ts +337 -0
- package/src/generated/client.gen.ts +24 -0
- package/src/generated/core/auth.gen.ts +49 -0
- package/src/generated/core/bodySerializer.gen.ts +96 -0
- package/src/generated/core/params.gen.ts +188 -0
- package/src/generated/core/pathSerializer.gen.ts +186 -0
- package/src/generated/core/queryKeySerializer.gen.ts +134 -0
- package/src/generated/core/serverSentEvents.gen.ts +265 -0
- package/src/generated/core/types.gen.ts +126 -0
- package/src/generated/core/utils.gen.ts +146 -0
- package/src/generated/index.ts +261 -0
- package/src/generated/sdk.gen.ts +1226 -0
- package/src/generated/types.gen.ts +2352 -0
- package/src/generated/zod.gen.ts +1039 -0
- package/src/http-client.ts +31 -0
- package/src/index.ts +30 -0
- package/src/options.ts +61 -0
- package/src/realtime/api-stream-error.ts +20 -0
- package/src/realtime/watch.ts +151 -0
- package/src/transport.ts +99 -0
- package/src/types.ts +5 -0
|
@@ -0,0 +1,1226 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
|
|
3
|
+
import { client } from "./client.gen.js";
|
|
4
|
+
import {
|
|
5
|
+
type Client,
|
|
6
|
+
type ClientMeta,
|
|
7
|
+
formDataBodySerializer,
|
|
8
|
+
type Options as Options2,
|
|
9
|
+
type RequestResult,
|
|
10
|
+
type ServerSentEventsResult,
|
|
11
|
+
type TDataShape,
|
|
12
|
+
} from "./client/index.js";
|
|
13
|
+
import type {
|
|
14
|
+
CheckTrackerClaimabilityData,
|
|
15
|
+
CheckTrackerClaimabilityErrors,
|
|
16
|
+
CheckTrackerClaimabilityResponses,
|
|
17
|
+
ClaimTrackerGuestAccessData,
|
|
18
|
+
ClaimTrackerGuestAccessErrors,
|
|
19
|
+
ClaimTrackerGuestAccessResponses,
|
|
20
|
+
ClaimTrackerOwnershipData,
|
|
21
|
+
ClaimTrackerOwnershipErrors,
|
|
22
|
+
ClaimTrackerOwnershipResponses,
|
|
23
|
+
CompleteTrackerFirmwareUpdateData,
|
|
24
|
+
CompleteTrackerFirmwareUpdateErrors,
|
|
25
|
+
CompleteTrackerFirmwareUpdateResponses,
|
|
26
|
+
CreateTrackerInvitationData,
|
|
27
|
+
CreateTrackerInvitationErrors,
|
|
28
|
+
CreateTrackerInvitationResponses,
|
|
29
|
+
DeleteTrackerPhotoData,
|
|
30
|
+
DeleteTrackerPhotoErrors,
|
|
31
|
+
DeleteTrackerPhotoResponses,
|
|
32
|
+
GetAccountPreferencesData,
|
|
33
|
+
GetAccountPreferencesErrors,
|
|
34
|
+
GetAccountPreferencesResponses,
|
|
35
|
+
GetBluetoothReportingPolicyData,
|
|
36
|
+
GetBluetoothReportingPolicyErrors,
|
|
37
|
+
GetBluetoothReportingPolicyResponses,
|
|
38
|
+
GetHealthData,
|
|
39
|
+
GetHealthResponses,
|
|
40
|
+
GetTrackerBluetoothCredentialsData,
|
|
41
|
+
GetTrackerBluetoothCredentialsErrors,
|
|
42
|
+
GetTrackerBluetoothCredentialsResponses,
|
|
43
|
+
GetTrackerData,
|
|
44
|
+
GetTrackerErrors,
|
|
45
|
+
GetTrackerFirmwarePlanData,
|
|
46
|
+
GetTrackerFirmwarePlanErrors,
|
|
47
|
+
GetTrackerFirmwarePlanResponses,
|
|
48
|
+
GetTrackerPositionsData,
|
|
49
|
+
GetTrackerPositionsErrors,
|
|
50
|
+
GetTrackerPositionsResponses,
|
|
51
|
+
GetTrackerResponses,
|
|
52
|
+
LinkTrackerSubscriptionData,
|
|
53
|
+
LinkTrackerSubscriptionErrors,
|
|
54
|
+
LinkTrackerSubscriptionResponses,
|
|
55
|
+
ListNotificationsData,
|
|
56
|
+
ListNotificationsErrors,
|
|
57
|
+
ListNotificationsResponses,
|
|
58
|
+
ListSubscriptionsData,
|
|
59
|
+
ListSubscriptionsErrors,
|
|
60
|
+
ListSubscriptionsResponses,
|
|
61
|
+
ListTrackerHistoryData,
|
|
62
|
+
ListTrackerHistoryErrors,
|
|
63
|
+
ListTrackerHistoryResponses,
|
|
64
|
+
ListTrackerPhotosData,
|
|
65
|
+
ListTrackerPhotosErrors,
|
|
66
|
+
ListTrackerPhotosResponses,
|
|
67
|
+
ListTrackersData,
|
|
68
|
+
ListTrackersErrors,
|
|
69
|
+
ListTrackersResponses,
|
|
70
|
+
RecordTrackerFirmwareAttemptData,
|
|
71
|
+
RecordTrackerFirmwareAttemptErrors,
|
|
72
|
+
RecordTrackerFirmwareAttemptResponses,
|
|
73
|
+
RegisterPushRegistrationData,
|
|
74
|
+
RegisterPushRegistrationErrors,
|
|
75
|
+
RegisterPushRegistrationResponses,
|
|
76
|
+
RemovePushRegistrationData,
|
|
77
|
+
RemovePushRegistrationErrors,
|
|
78
|
+
RemovePushRegistrationResponses,
|
|
79
|
+
RemoveTrackerMembershipData,
|
|
80
|
+
RemoveTrackerMembershipErrors,
|
|
81
|
+
RemoveTrackerMembershipResponses,
|
|
82
|
+
ReportTrackerBluetoothBatteryData,
|
|
83
|
+
ReportTrackerBluetoothBatteryErrors,
|
|
84
|
+
ReportTrackerBluetoothBatteryResponses,
|
|
85
|
+
ReportTrackerBluetoothCommandData,
|
|
86
|
+
ReportTrackerBluetoothCommandErrors,
|
|
87
|
+
ReportTrackerBluetoothCommandResponses,
|
|
88
|
+
ReportTrackerFactoryResetData,
|
|
89
|
+
ReportTrackerFactoryResetErrors,
|
|
90
|
+
ReportTrackerFactoryResetResponses,
|
|
91
|
+
RequestAccountDeletionData,
|
|
92
|
+
RequestAccountDeletionErrors,
|
|
93
|
+
RequestAccountDeletionResponses,
|
|
94
|
+
RequestTrackerModeData,
|
|
95
|
+
RequestTrackerModeErrors,
|
|
96
|
+
RequestTrackerModeResponses,
|
|
97
|
+
RevokeTrackerInvitationData,
|
|
98
|
+
RevokeTrackerInvitationErrors,
|
|
99
|
+
RevokeTrackerInvitationResponses,
|
|
100
|
+
SubmitTrackerTheftReportData,
|
|
101
|
+
SubmitTrackerTheftReportErrors,
|
|
102
|
+
SubmitTrackerTheftReportResponses,
|
|
103
|
+
SubscribeAccountPreferencesData,
|
|
104
|
+
SubscribeAccountPreferencesErrors,
|
|
105
|
+
SubscribeAccountPreferencesResponse,
|
|
106
|
+
SubscribeAccountPreferencesResponses,
|
|
107
|
+
SubscribeSubscriptionsData,
|
|
108
|
+
SubscribeSubscriptionsErrors,
|
|
109
|
+
SubscribeSubscriptionsResponse,
|
|
110
|
+
SubscribeSubscriptionsResponses,
|
|
111
|
+
SubscribeTrackerPhotosData,
|
|
112
|
+
SubscribeTrackerPhotosErrors,
|
|
113
|
+
SubscribeTrackerPhotosResponse,
|
|
114
|
+
SubscribeTrackerPhotosResponses,
|
|
115
|
+
SubscribeTrackerPositionsData,
|
|
116
|
+
SubscribeTrackerPositionsErrors,
|
|
117
|
+
SubscribeTrackerPositionsResponse,
|
|
118
|
+
SubscribeTrackerPositionsResponses,
|
|
119
|
+
SubscribeTrackersData,
|
|
120
|
+
SubscribeTrackersErrors,
|
|
121
|
+
SubscribeTrackersResponse,
|
|
122
|
+
SubscribeTrackersResponses,
|
|
123
|
+
UnlinkTrackerSubscriptionData,
|
|
124
|
+
UnlinkTrackerSubscriptionErrors,
|
|
125
|
+
UnlinkTrackerSubscriptionResponses,
|
|
126
|
+
UpdateAccountPreferencesData,
|
|
127
|
+
UpdateAccountPreferencesErrors,
|
|
128
|
+
UpdateAccountPreferencesResponses,
|
|
129
|
+
UpdateTrackerBikeData,
|
|
130
|
+
UpdateTrackerBikeErrors,
|
|
131
|
+
UpdateTrackerBikeResponses,
|
|
132
|
+
UpdateTrackerBluetoothPinData,
|
|
133
|
+
UpdateTrackerBluetoothPinErrors,
|
|
134
|
+
UpdateTrackerBluetoothPinResponses,
|
|
135
|
+
UploadTrackerBluetoothObservationData,
|
|
136
|
+
UploadTrackerBluetoothObservationErrors,
|
|
137
|
+
UploadTrackerBluetoothObservationResponses,
|
|
138
|
+
UploadTrackerPhotoData,
|
|
139
|
+
UploadTrackerPhotoErrors,
|
|
140
|
+
UploadTrackerPhotoResponses,
|
|
141
|
+
} from "./types.gen.js";
|
|
142
|
+
import {
|
|
143
|
+
zCheckTrackerClaimabilityResponse,
|
|
144
|
+
zClaimTrackerGuestAccessResponse,
|
|
145
|
+
zClaimTrackerOwnershipResponse,
|
|
146
|
+
zCompleteTrackerFirmwareUpdateResponse,
|
|
147
|
+
zCreateTrackerInvitationResponse,
|
|
148
|
+
zDeleteTrackerPhotoResponse,
|
|
149
|
+
zGetAccountPreferencesResponse,
|
|
150
|
+
zGetBluetoothReportingPolicyResponse,
|
|
151
|
+
zGetHealthResponse,
|
|
152
|
+
zGetTrackerBluetoothCredentialsResponse,
|
|
153
|
+
zGetTrackerFirmwarePlanResponse,
|
|
154
|
+
zGetTrackerPositionsResponse,
|
|
155
|
+
zGetTrackerResponse,
|
|
156
|
+
zLinkTrackerSubscriptionResponse,
|
|
157
|
+
zListNotificationsResponse,
|
|
158
|
+
zListSubscriptionsResponse,
|
|
159
|
+
zListTrackerHistoryResponse,
|
|
160
|
+
zListTrackerPhotosResponse,
|
|
161
|
+
zListTrackersResponse,
|
|
162
|
+
zRecordTrackerFirmwareAttemptResponse,
|
|
163
|
+
zRegisterPushRegistrationResponse,
|
|
164
|
+
zRemovePushRegistrationResponse,
|
|
165
|
+
zRemoveTrackerMembershipResponse,
|
|
166
|
+
zReportTrackerBluetoothBatteryResponse,
|
|
167
|
+
zReportTrackerBluetoothCommandResponse,
|
|
168
|
+
zReportTrackerFactoryResetResponse,
|
|
169
|
+
zRequestAccountDeletionResponse,
|
|
170
|
+
zRequestTrackerModeResponse,
|
|
171
|
+
zRevokeTrackerInvitationResponse,
|
|
172
|
+
zSubmitTrackerTheftReportResponse,
|
|
173
|
+
zSubscribeAccountPreferencesResponse,
|
|
174
|
+
zSubscribeSubscriptionsResponse,
|
|
175
|
+
zSubscribeTrackerPhotosResponse,
|
|
176
|
+
zSubscribeTrackerPositionsResponse,
|
|
177
|
+
zSubscribeTrackersResponse,
|
|
178
|
+
zUnlinkTrackerSubscriptionResponse,
|
|
179
|
+
zUpdateAccountPreferencesResponse,
|
|
180
|
+
zUpdateTrackerBikeResponse,
|
|
181
|
+
zUpdateTrackerBluetoothPinResponse,
|
|
182
|
+
zUploadTrackerBluetoothObservationResponse,
|
|
183
|
+
zUploadTrackerPhotoResponse,
|
|
184
|
+
} from "./zod.gen.js";
|
|
185
|
+
|
|
186
|
+
export type Options<
|
|
187
|
+
TData extends TDataShape = TDataShape,
|
|
188
|
+
ThrowOnError extends boolean = boolean,
|
|
189
|
+
TResponse = unknown,
|
|
190
|
+
> = Options2<TData, ThrowOnError, TResponse> & {
|
|
191
|
+
/**
|
|
192
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
193
|
+
* individual options. This might be also useful if you want to implement a
|
|
194
|
+
* custom client.
|
|
195
|
+
*/
|
|
196
|
+
client?: Client;
|
|
197
|
+
/**
|
|
198
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
199
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
200
|
+
*/
|
|
201
|
+
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
class HeyApiClient {
|
|
205
|
+
protected client: Client;
|
|
206
|
+
|
|
207
|
+
constructor(args?: { client?: Client }) {
|
|
208
|
+
this.client = args?.client ?? client;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
class HeyApiRegistry<T> {
|
|
213
|
+
private readonly defaultKey = "default";
|
|
214
|
+
|
|
215
|
+
private readonly instances: Map<string, T> = new Map();
|
|
216
|
+
|
|
217
|
+
get(key?: string): T {
|
|
218
|
+
const instance = this.instances.get(key ?? this.defaultKey);
|
|
219
|
+
if (!instance) {
|
|
220
|
+
throw new Error(
|
|
221
|
+
`No SDK client found. Create one with "new BikeFinderSdk()" to fix this error.`,
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
return instance;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
set(value: T, key?: string): void {
|
|
228
|
+
this.instances.set(key ?? this.defaultKey, value);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export class BikeFinderSdk extends HeyApiClient {
|
|
233
|
+
public static readonly __registry: HeyApiRegistry<BikeFinderSdk> =
|
|
234
|
+
new HeyApiRegistry<BikeFinderSdk>();
|
|
235
|
+
|
|
236
|
+
constructor(args?: { client?: Client; key?: string }) {
|
|
237
|
+
super(args);
|
|
238
|
+
BikeFinderSdk.__registry.set(this, args?.key);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
public getHealth<ThrowOnError extends boolean = false>(
|
|
242
|
+
options?: Options<GetHealthData, ThrowOnError>,
|
|
243
|
+
): RequestResult<GetHealthResponses, unknown, ThrowOnError> {
|
|
244
|
+
return (options?.client ?? this.client).get<
|
|
245
|
+
GetHealthResponses,
|
|
246
|
+
unknown,
|
|
247
|
+
ThrowOnError
|
|
248
|
+
>({
|
|
249
|
+
responseTransformer: async (data) =>
|
|
250
|
+
await zGetHealthResponse.parseAsync(data),
|
|
251
|
+
url: "/health",
|
|
252
|
+
...options,
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Get Bluetooth observation reporting policy
|
|
258
|
+
*/
|
|
259
|
+
public getBluetoothReportingPolicy<ThrowOnError extends boolean = false>(
|
|
260
|
+
options?: Options<GetBluetoothReportingPolicyData, ThrowOnError>,
|
|
261
|
+
): RequestResult<
|
|
262
|
+
GetBluetoothReportingPolicyResponses,
|
|
263
|
+
GetBluetoothReportingPolicyErrors,
|
|
264
|
+
ThrowOnError
|
|
265
|
+
> {
|
|
266
|
+
return (options?.client ?? this.client).get<
|
|
267
|
+
GetBluetoothReportingPolicyResponses,
|
|
268
|
+
GetBluetoothReportingPolicyErrors,
|
|
269
|
+
ThrowOnError
|
|
270
|
+
>({
|
|
271
|
+
responseTransformer: async (data) =>
|
|
272
|
+
await zGetBluetoothReportingPolicyResponse.parseAsync(data),
|
|
273
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
274
|
+
url: "/v1/bluetooth/reporting-policy",
|
|
275
|
+
...options,
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
public unlinkTrackerSubscription<ThrowOnError extends boolean = false>(
|
|
280
|
+
options: Options<UnlinkTrackerSubscriptionData, ThrowOnError>,
|
|
281
|
+
): RequestResult<
|
|
282
|
+
UnlinkTrackerSubscriptionResponses,
|
|
283
|
+
UnlinkTrackerSubscriptionErrors,
|
|
284
|
+
ThrowOnError
|
|
285
|
+
> {
|
|
286
|
+
return (options.client ?? this.client).delete<
|
|
287
|
+
UnlinkTrackerSubscriptionResponses,
|
|
288
|
+
UnlinkTrackerSubscriptionErrors,
|
|
289
|
+
ThrowOnError
|
|
290
|
+
>({
|
|
291
|
+
responseTransformer: async (data) =>
|
|
292
|
+
await zUnlinkTrackerSubscriptionResponse.parseAsync(data),
|
|
293
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
294
|
+
url: "/v1/trackers/{trackerId}/subscription",
|
|
295
|
+
...options,
|
|
296
|
+
headers: {
|
|
297
|
+
"Content-Type": "application/json",
|
|
298
|
+
...options.headers,
|
|
299
|
+
},
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
public linkTrackerSubscription<ThrowOnError extends boolean = false>(
|
|
304
|
+
options: Options<LinkTrackerSubscriptionData, ThrowOnError>,
|
|
305
|
+
): RequestResult<
|
|
306
|
+
LinkTrackerSubscriptionResponses,
|
|
307
|
+
LinkTrackerSubscriptionErrors,
|
|
308
|
+
ThrowOnError
|
|
309
|
+
> {
|
|
310
|
+
return (options.client ?? this.client).put<
|
|
311
|
+
LinkTrackerSubscriptionResponses,
|
|
312
|
+
LinkTrackerSubscriptionErrors,
|
|
313
|
+
ThrowOnError
|
|
314
|
+
>({
|
|
315
|
+
responseTransformer: async (data) =>
|
|
316
|
+
await zLinkTrackerSubscriptionResponse.parseAsync(data),
|
|
317
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
318
|
+
url: "/v1/trackers/{trackerId}/subscription",
|
|
319
|
+
...options,
|
|
320
|
+
headers: {
|
|
321
|
+
"Content-Type": "application/json",
|
|
322
|
+
...options.headers,
|
|
323
|
+
},
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
public listTrackerPhotos<ThrowOnError extends boolean = false>(
|
|
328
|
+
options: Options<ListTrackerPhotosData, ThrowOnError>,
|
|
329
|
+
): RequestResult<
|
|
330
|
+
ListTrackerPhotosResponses,
|
|
331
|
+
ListTrackerPhotosErrors,
|
|
332
|
+
ThrowOnError
|
|
333
|
+
> {
|
|
334
|
+
return (options.client ?? this.client).get<
|
|
335
|
+
ListTrackerPhotosResponses,
|
|
336
|
+
ListTrackerPhotosErrors,
|
|
337
|
+
ThrowOnError
|
|
338
|
+
>({
|
|
339
|
+
responseTransformer: async (data) =>
|
|
340
|
+
await zListTrackerPhotosResponse.parseAsync(data),
|
|
341
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
342
|
+
url: "/v1/trackers/{trackerId}/photos",
|
|
343
|
+
...options,
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
public uploadTrackerPhoto<ThrowOnError extends boolean = false>(
|
|
348
|
+
options: Options<UploadTrackerPhotoData, ThrowOnError>,
|
|
349
|
+
): RequestResult<
|
|
350
|
+
UploadTrackerPhotoResponses,
|
|
351
|
+
UploadTrackerPhotoErrors,
|
|
352
|
+
ThrowOnError
|
|
353
|
+
> {
|
|
354
|
+
return (options.client ?? this.client).post<
|
|
355
|
+
UploadTrackerPhotoResponses,
|
|
356
|
+
UploadTrackerPhotoErrors,
|
|
357
|
+
ThrowOnError
|
|
358
|
+
>({
|
|
359
|
+
...formDataBodySerializer,
|
|
360
|
+
responseTransformer: async (data) =>
|
|
361
|
+
await zUploadTrackerPhotoResponse.parseAsync(data),
|
|
362
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
363
|
+
url: "/v1/trackers/{trackerId}/photos",
|
|
364
|
+
...options,
|
|
365
|
+
headers: {
|
|
366
|
+
"Content-Type": null,
|
|
367
|
+
...options.headers,
|
|
368
|
+
},
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
public deleteTrackerPhoto<ThrowOnError extends boolean = false>(
|
|
373
|
+
options: Options<DeleteTrackerPhotoData, ThrowOnError>,
|
|
374
|
+
): RequestResult<
|
|
375
|
+
DeleteTrackerPhotoResponses,
|
|
376
|
+
DeleteTrackerPhotoErrors,
|
|
377
|
+
ThrowOnError
|
|
378
|
+
> {
|
|
379
|
+
return (options.client ?? this.client).delete<
|
|
380
|
+
DeleteTrackerPhotoResponses,
|
|
381
|
+
DeleteTrackerPhotoErrors,
|
|
382
|
+
ThrowOnError
|
|
383
|
+
>({
|
|
384
|
+
responseTransformer: async (data) =>
|
|
385
|
+
await zDeleteTrackerPhotoResponse.parseAsync(data),
|
|
386
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
387
|
+
url: "/v1/trackers/{trackerId}/photos/{photoId}",
|
|
388
|
+
...options,
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* List the caller's active trackers
|
|
394
|
+
*/
|
|
395
|
+
public listTrackers<ThrowOnError extends boolean = false>(
|
|
396
|
+
options?: Options<ListTrackersData, ThrowOnError>,
|
|
397
|
+
): RequestResult<ListTrackersResponses, ListTrackersErrors, ThrowOnError> {
|
|
398
|
+
return (options?.client ?? this.client).get<
|
|
399
|
+
ListTrackersResponses,
|
|
400
|
+
ListTrackersErrors,
|
|
401
|
+
ThrowOnError
|
|
402
|
+
>({
|
|
403
|
+
responseTransformer: async (data) =>
|
|
404
|
+
await zListTrackersResponse.parseAsync(data),
|
|
405
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
406
|
+
url: "/v1/trackers",
|
|
407
|
+
...options,
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Subscribe to the caller's tracker page
|
|
413
|
+
*
|
|
414
|
+
* SSE. snapshot events contain a TrackerPage JSON payload; keepalive events contain null. Reconnect with a fresh bearer token after closure. Each connection lasts at most 15 minutes and never beyond token expiry. Every reconnect starts with a complete snapshot; Last-Event-ID is not used.
|
|
415
|
+
*/
|
|
416
|
+
public subscribeTrackers<ThrowOnError extends boolean = false>(
|
|
417
|
+
options?: Options<
|
|
418
|
+
SubscribeTrackersData,
|
|
419
|
+
ThrowOnError,
|
|
420
|
+
SubscribeTrackersResponse
|
|
421
|
+
>,
|
|
422
|
+
): Promise<ServerSentEventsResult<SubscribeTrackersResponses>> {
|
|
423
|
+
return (options?.client ?? this.client).sse.get<
|
|
424
|
+
SubscribeTrackersResponses,
|
|
425
|
+
SubscribeTrackersErrors,
|
|
426
|
+
ThrowOnError
|
|
427
|
+
>({
|
|
428
|
+
responseTransformer: async (data) =>
|
|
429
|
+
await zSubscribeTrackersResponse.parseAsync(data),
|
|
430
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
431
|
+
url: "/v1/trackers/stream",
|
|
432
|
+
...options,
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Get an actively shared tracker
|
|
438
|
+
*/
|
|
439
|
+
public getTracker<ThrowOnError extends boolean = false>(
|
|
440
|
+
options: Options<GetTrackerData, ThrowOnError>,
|
|
441
|
+
): RequestResult<GetTrackerResponses, GetTrackerErrors, ThrowOnError> {
|
|
442
|
+
return (options.client ?? this.client).get<
|
|
443
|
+
GetTrackerResponses,
|
|
444
|
+
GetTrackerErrors,
|
|
445
|
+
ThrowOnError
|
|
446
|
+
>({
|
|
447
|
+
responseTransformer: async (data) =>
|
|
448
|
+
await zGetTrackerResponse.parseAsync(data),
|
|
449
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
450
|
+
url: "/v1/trackers/{trackerId}",
|
|
451
|
+
...options,
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
public getTrackerPositions<ThrowOnError extends boolean = false>(
|
|
456
|
+
options: Options<GetTrackerPositionsData, ThrowOnError>,
|
|
457
|
+
): RequestResult<
|
|
458
|
+
GetTrackerPositionsResponses,
|
|
459
|
+
GetTrackerPositionsErrors,
|
|
460
|
+
ThrowOnError
|
|
461
|
+
> {
|
|
462
|
+
return (options.client ?? this.client).get<
|
|
463
|
+
GetTrackerPositionsResponses,
|
|
464
|
+
GetTrackerPositionsErrors,
|
|
465
|
+
ThrowOnError
|
|
466
|
+
>({
|
|
467
|
+
responseTransformer: async (data) =>
|
|
468
|
+
await zGetTrackerPositionsResponse.parseAsync(data),
|
|
469
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
470
|
+
url: "/v1/trackers/{trackerId}/positions",
|
|
471
|
+
...options,
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
public subscribeTrackerPositions<ThrowOnError extends boolean = false>(
|
|
476
|
+
options: Options<
|
|
477
|
+
SubscribeTrackerPositionsData,
|
|
478
|
+
ThrowOnError,
|
|
479
|
+
SubscribeTrackerPositionsResponse
|
|
480
|
+
>,
|
|
481
|
+
): Promise<ServerSentEventsResult<SubscribeTrackerPositionsResponses>> {
|
|
482
|
+
return (options.client ?? this.client).sse.get<
|
|
483
|
+
SubscribeTrackerPositionsResponses,
|
|
484
|
+
SubscribeTrackerPositionsErrors,
|
|
485
|
+
ThrowOnError
|
|
486
|
+
>({
|
|
487
|
+
responseTransformer: async (data) =>
|
|
488
|
+
await zSubscribeTrackerPositionsResponse.parseAsync(data),
|
|
489
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
490
|
+
url: "/v1/trackers/{trackerId}/positions/stream",
|
|
491
|
+
...options,
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
public subscribeTrackerPhotos<ThrowOnError extends boolean = false>(
|
|
496
|
+
options: Options<
|
|
497
|
+
SubscribeTrackerPhotosData,
|
|
498
|
+
ThrowOnError,
|
|
499
|
+
SubscribeTrackerPhotosResponse
|
|
500
|
+
>,
|
|
501
|
+
): Promise<ServerSentEventsResult<SubscribeTrackerPhotosResponses>> {
|
|
502
|
+
return (options.client ?? this.client).sse.get<
|
|
503
|
+
SubscribeTrackerPhotosResponses,
|
|
504
|
+
SubscribeTrackerPhotosErrors,
|
|
505
|
+
ThrowOnError
|
|
506
|
+
>({
|
|
507
|
+
responseTransformer: async (data) =>
|
|
508
|
+
await zSubscribeTrackerPhotosResponse.parseAsync(data),
|
|
509
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
510
|
+
url: "/v1/trackers/{trackerId}/photos/stream",
|
|
511
|
+
...options,
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Request Tracker Mode
|
|
517
|
+
*/
|
|
518
|
+
public requestTrackerMode<ThrowOnError extends boolean = false>(
|
|
519
|
+
options: Options<RequestTrackerModeData, ThrowOnError>,
|
|
520
|
+
): RequestResult<
|
|
521
|
+
RequestTrackerModeResponses,
|
|
522
|
+
RequestTrackerModeErrors,
|
|
523
|
+
ThrowOnError
|
|
524
|
+
> {
|
|
525
|
+
return (options.client ?? this.client).post<
|
|
526
|
+
RequestTrackerModeResponses,
|
|
527
|
+
RequestTrackerModeErrors,
|
|
528
|
+
ThrowOnError
|
|
529
|
+
>({
|
|
530
|
+
responseTransformer: async (data) =>
|
|
531
|
+
await zRequestTrackerModeResponse.parseAsync(data),
|
|
532
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
533
|
+
url: "/v1/trackers/{trackerId}/mode-requests",
|
|
534
|
+
...options,
|
|
535
|
+
headers: {
|
|
536
|
+
"Content-Type": "application/json",
|
|
537
|
+
...options.headers,
|
|
538
|
+
},
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Check Tracker Claimability
|
|
544
|
+
*/
|
|
545
|
+
public checkTrackerClaimability<ThrowOnError extends boolean = false>(
|
|
546
|
+
options: Options<CheckTrackerClaimabilityData, ThrowOnError>,
|
|
547
|
+
): RequestResult<
|
|
548
|
+
CheckTrackerClaimabilityResponses,
|
|
549
|
+
CheckTrackerClaimabilityErrors,
|
|
550
|
+
ThrowOnError
|
|
551
|
+
> {
|
|
552
|
+
return (options.client ?? this.client).post<
|
|
553
|
+
CheckTrackerClaimabilityResponses,
|
|
554
|
+
CheckTrackerClaimabilityErrors,
|
|
555
|
+
ThrowOnError
|
|
556
|
+
>({
|
|
557
|
+
responseTransformer: async (data) =>
|
|
558
|
+
await zCheckTrackerClaimabilityResponse.parseAsync(data),
|
|
559
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
560
|
+
url: "/v1/trackers/claimability",
|
|
561
|
+
...options,
|
|
562
|
+
headers: {
|
|
563
|
+
"Content-Type": "application/json",
|
|
564
|
+
...options.headers,
|
|
565
|
+
},
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Claim Tracker Ownership
|
|
571
|
+
*/
|
|
572
|
+
public claimTrackerOwnership<ThrowOnError extends boolean = false>(
|
|
573
|
+
options: Options<ClaimTrackerOwnershipData, ThrowOnError>,
|
|
574
|
+
): RequestResult<
|
|
575
|
+
ClaimTrackerOwnershipResponses,
|
|
576
|
+
ClaimTrackerOwnershipErrors,
|
|
577
|
+
ThrowOnError
|
|
578
|
+
> {
|
|
579
|
+
return (options.client ?? this.client).post<
|
|
580
|
+
ClaimTrackerOwnershipResponses,
|
|
581
|
+
ClaimTrackerOwnershipErrors,
|
|
582
|
+
ThrowOnError
|
|
583
|
+
>({
|
|
584
|
+
responseTransformer: async (data) =>
|
|
585
|
+
await zClaimTrackerOwnershipResponse.parseAsync(data),
|
|
586
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
587
|
+
url: "/v1/trackers/{trackerId}/ownership-claims",
|
|
588
|
+
...options,
|
|
589
|
+
headers: {
|
|
590
|
+
"Content-Type": "application/json",
|
|
591
|
+
...options.headers,
|
|
592
|
+
},
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Claim Tracker Guest Access
|
|
598
|
+
*/
|
|
599
|
+
public claimTrackerGuestAccess<ThrowOnError extends boolean = false>(
|
|
600
|
+
options: Options<ClaimTrackerGuestAccessData, ThrowOnError>,
|
|
601
|
+
): RequestResult<
|
|
602
|
+
ClaimTrackerGuestAccessResponses,
|
|
603
|
+
ClaimTrackerGuestAccessErrors,
|
|
604
|
+
ThrowOnError
|
|
605
|
+
> {
|
|
606
|
+
return (options.client ?? this.client).post<
|
|
607
|
+
ClaimTrackerGuestAccessResponses,
|
|
608
|
+
ClaimTrackerGuestAccessErrors,
|
|
609
|
+
ThrowOnError
|
|
610
|
+
>({
|
|
611
|
+
responseTransformer: async (data) =>
|
|
612
|
+
await zClaimTrackerGuestAccessResponse.parseAsync(data),
|
|
613
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
614
|
+
url: "/v1/trackers/{trackerId}/guest-claims",
|
|
615
|
+
...options,
|
|
616
|
+
headers: {
|
|
617
|
+
"Content-Type": "application/json",
|
|
618
|
+
...options.headers,
|
|
619
|
+
},
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Create Tracker Invitation
|
|
625
|
+
*/
|
|
626
|
+
public createTrackerInvitation<ThrowOnError extends boolean = false>(
|
|
627
|
+
options: Options<CreateTrackerInvitationData, ThrowOnError>,
|
|
628
|
+
): RequestResult<
|
|
629
|
+
CreateTrackerInvitationResponses,
|
|
630
|
+
CreateTrackerInvitationErrors,
|
|
631
|
+
ThrowOnError
|
|
632
|
+
> {
|
|
633
|
+
return (options.client ?? this.client).post<
|
|
634
|
+
CreateTrackerInvitationResponses,
|
|
635
|
+
CreateTrackerInvitationErrors,
|
|
636
|
+
ThrowOnError
|
|
637
|
+
>({
|
|
638
|
+
responseTransformer: async (data) =>
|
|
639
|
+
await zCreateTrackerInvitationResponse.parseAsync(data),
|
|
640
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
641
|
+
url: "/v1/trackers/{trackerId}/invitations",
|
|
642
|
+
...options,
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* Revoke Tracker Invitation
|
|
648
|
+
*/
|
|
649
|
+
public revokeTrackerInvitation<ThrowOnError extends boolean = false>(
|
|
650
|
+
options: Options<RevokeTrackerInvitationData, ThrowOnError>,
|
|
651
|
+
): RequestResult<
|
|
652
|
+
RevokeTrackerInvitationResponses,
|
|
653
|
+
RevokeTrackerInvitationErrors,
|
|
654
|
+
ThrowOnError
|
|
655
|
+
> {
|
|
656
|
+
return (options.client ?? this.client).delete<
|
|
657
|
+
RevokeTrackerInvitationResponses,
|
|
658
|
+
RevokeTrackerInvitationErrors,
|
|
659
|
+
ThrowOnError
|
|
660
|
+
>({
|
|
661
|
+
responseTransformer: async (data) =>
|
|
662
|
+
await zRevokeTrackerInvitationResponse.parseAsync(data),
|
|
663
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
664
|
+
url: "/v1/trackers/{trackerId}/invitations/{accessCode}",
|
|
665
|
+
...options,
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* Remove Tracker Membership
|
|
671
|
+
*/
|
|
672
|
+
public removeTrackerMembership<ThrowOnError extends boolean = false>(
|
|
673
|
+
options: Options<RemoveTrackerMembershipData, ThrowOnError>,
|
|
674
|
+
): RequestResult<
|
|
675
|
+
RemoveTrackerMembershipResponses,
|
|
676
|
+
RemoveTrackerMembershipErrors,
|
|
677
|
+
ThrowOnError
|
|
678
|
+
> {
|
|
679
|
+
return (options.client ?? this.client).post<
|
|
680
|
+
RemoveTrackerMembershipResponses,
|
|
681
|
+
RemoveTrackerMembershipErrors,
|
|
682
|
+
ThrowOnError
|
|
683
|
+
>({
|
|
684
|
+
responseTransformer: async (data) =>
|
|
685
|
+
await zRemoveTrackerMembershipResponse.parseAsync(data),
|
|
686
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
687
|
+
url: "/v1/trackers/{trackerId}/membership-removals",
|
|
688
|
+
...options,
|
|
689
|
+
headers: {
|
|
690
|
+
"Content-Type": "application/json",
|
|
691
|
+
...options.headers,
|
|
692
|
+
},
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* Update Tracker Bike
|
|
698
|
+
*/
|
|
699
|
+
public updateTrackerBike<ThrowOnError extends boolean = false>(
|
|
700
|
+
options: Options<UpdateTrackerBikeData, ThrowOnError>,
|
|
701
|
+
): RequestResult<
|
|
702
|
+
UpdateTrackerBikeResponses,
|
|
703
|
+
UpdateTrackerBikeErrors,
|
|
704
|
+
ThrowOnError
|
|
705
|
+
> {
|
|
706
|
+
return (options.client ?? this.client).patch<
|
|
707
|
+
UpdateTrackerBikeResponses,
|
|
708
|
+
UpdateTrackerBikeErrors,
|
|
709
|
+
ThrowOnError
|
|
710
|
+
>({
|
|
711
|
+
responseTransformer: async (data) =>
|
|
712
|
+
await zUpdateTrackerBikeResponse.parseAsync(data),
|
|
713
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
714
|
+
url: "/v1/trackers/{trackerId}/bike",
|
|
715
|
+
...options,
|
|
716
|
+
headers: {
|
|
717
|
+
"Content-Type": "application/json",
|
|
718
|
+
...options.headers,
|
|
719
|
+
},
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* Submit Tracker Theft Report
|
|
725
|
+
*/
|
|
726
|
+
public submitTrackerTheftReport<ThrowOnError extends boolean = false>(
|
|
727
|
+
options: Options<SubmitTrackerTheftReportData, ThrowOnError>,
|
|
728
|
+
): RequestResult<
|
|
729
|
+
SubmitTrackerTheftReportResponses,
|
|
730
|
+
SubmitTrackerTheftReportErrors,
|
|
731
|
+
ThrowOnError
|
|
732
|
+
> {
|
|
733
|
+
return (options.client ?? this.client).post<
|
|
734
|
+
SubmitTrackerTheftReportResponses,
|
|
735
|
+
SubmitTrackerTheftReportErrors,
|
|
736
|
+
ThrowOnError
|
|
737
|
+
>({
|
|
738
|
+
responseTransformer: async (data) =>
|
|
739
|
+
await zSubmitTrackerTheftReportResponse.parseAsync(data),
|
|
740
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
741
|
+
url: "/v1/trackers/{trackerId}/theft-reports",
|
|
742
|
+
...options,
|
|
743
|
+
headers: {
|
|
744
|
+
"Content-Type": "application/json",
|
|
745
|
+
...options.headers,
|
|
746
|
+
},
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* Get Tracker Bluetooth Credentials
|
|
752
|
+
*/
|
|
753
|
+
public getTrackerBluetoothCredentials<ThrowOnError extends boolean = false>(
|
|
754
|
+
options: Options<GetTrackerBluetoothCredentialsData, ThrowOnError>,
|
|
755
|
+
): RequestResult<
|
|
756
|
+
GetTrackerBluetoothCredentialsResponses,
|
|
757
|
+
GetTrackerBluetoothCredentialsErrors,
|
|
758
|
+
ThrowOnError
|
|
759
|
+
> {
|
|
760
|
+
return (options.client ?? this.client).get<
|
|
761
|
+
GetTrackerBluetoothCredentialsResponses,
|
|
762
|
+
GetTrackerBluetoothCredentialsErrors,
|
|
763
|
+
ThrowOnError
|
|
764
|
+
>({
|
|
765
|
+
responseTransformer: async (data) =>
|
|
766
|
+
await zGetTrackerBluetoothCredentialsResponse.parseAsync(data),
|
|
767
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
768
|
+
url: "/v1/trackers/{trackerId}/bluetooth/credentials",
|
|
769
|
+
...options,
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Update Tracker Bluetooth Pin
|
|
775
|
+
*/
|
|
776
|
+
public updateTrackerBluetoothPin<ThrowOnError extends boolean = false>(
|
|
777
|
+
options: Options<UpdateTrackerBluetoothPinData, ThrowOnError>,
|
|
778
|
+
): RequestResult<
|
|
779
|
+
UpdateTrackerBluetoothPinResponses,
|
|
780
|
+
UpdateTrackerBluetoothPinErrors,
|
|
781
|
+
ThrowOnError
|
|
782
|
+
> {
|
|
783
|
+
return (options.client ?? this.client).put<
|
|
784
|
+
UpdateTrackerBluetoothPinResponses,
|
|
785
|
+
UpdateTrackerBluetoothPinErrors,
|
|
786
|
+
ThrowOnError
|
|
787
|
+
>({
|
|
788
|
+
responseTransformer: async (data) =>
|
|
789
|
+
await zUpdateTrackerBluetoothPinResponse.parseAsync(data),
|
|
790
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
791
|
+
url: "/v1/trackers/{trackerId}/bluetooth/pin",
|
|
792
|
+
...options,
|
|
793
|
+
headers: {
|
|
794
|
+
"Content-Type": "application/json",
|
|
795
|
+
...options.headers,
|
|
796
|
+
},
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* Report Tracker Bluetooth Battery
|
|
802
|
+
*/
|
|
803
|
+
public reportTrackerBluetoothBattery<ThrowOnError extends boolean = false>(
|
|
804
|
+
options: Options<ReportTrackerBluetoothBatteryData, ThrowOnError>,
|
|
805
|
+
): RequestResult<
|
|
806
|
+
ReportTrackerBluetoothBatteryResponses,
|
|
807
|
+
ReportTrackerBluetoothBatteryErrors,
|
|
808
|
+
ThrowOnError
|
|
809
|
+
> {
|
|
810
|
+
return (options.client ?? this.client).post<
|
|
811
|
+
ReportTrackerBluetoothBatteryResponses,
|
|
812
|
+
ReportTrackerBluetoothBatteryErrors,
|
|
813
|
+
ThrowOnError
|
|
814
|
+
>({
|
|
815
|
+
responseTransformer: async (data) =>
|
|
816
|
+
await zReportTrackerBluetoothBatteryResponse.parseAsync(data),
|
|
817
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
818
|
+
url: "/v1/trackers/{trackerId}/bluetooth/battery-observations",
|
|
819
|
+
...options,
|
|
820
|
+
headers: {
|
|
821
|
+
"Content-Type": "application/json",
|
|
822
|
+
...options.headers,
|
|
823
|
+
},
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* Report Tracker Bluetooth Command
|
|
829
|
+
*/
|
|
830
|
+
public reportTrackerBluetoothCommand<ThrowOnError extends boolean = false>(
|
|
831
|
+
options: Options<ReportTrackerBluetoothCommandData, ThrowOnError>,
|
|
832
|
+
): RequestResult<
|
|
833
|
+
ReportTrackerBluetoothCommandResponses,
|
|
834
|
+
ReportTrackerBluetoothCommandErrors,
|
|
835
|
+
ThrowOnError
|
|
836
|
+
> {
|
|
837
|
+
return (options.client ?? this.client).post<
|
|
838
|
+
ReportTrackerBluetoothCommandResponses,
|
|
839
|
+
ReportTrackerBluetoothCommandErrors,
|
|
840
|
+
ThrowOnError
|
|
841
|
+
>({
|
|
842
|
+
responseTransformer: async (data) =>
|
|
843
|
+
await zReportTrackerBluetoothCommandResponse.parseAsync(data),
|
|
844
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
845
|
+
url: "/v1/trackers/{trackerId}/bluetooth/command-results",
|
|
846
|
+
...options,
|
|
847
|
+
headers: {
|
|
848
|
+
"Content-Type": "application/json",
|
|
849
|
+
...options.headers,
|
|
850
|
+
},
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
/**
|
|
855
|
+
* Upload Tracker Bluetooth Observation
|
|
856
|
+
*/
|
|
857
|
+
public uploadTrackerBluetoothObservation<
|
|
858
|
+
ThrowOnError extends boolean = false,
|
|
859
|
+
>(
|
|
860
|
+
options: Options<UploadTrackerBluetoothObservationData, ThrowOnError>,
|
|
861
|
+
): RequestResult<
|
|
862
|
+
UploadTrackerBluetoothObservationResponses,
|
|
863
|
+
UploadTrackerBluetoothObservationErrors,
|
|
864
|
+
ThrowOnError
|
|
865
|
+
> {
|
|
866
|
+
return (options.client ?? this.client).post<
|
|
867
|
+
UploadTrackerBluetoothObservationResponses,
|
|
868
|
+
UploadTrackerBluetoothObservationErrors,
|
|
869
|
+
ThrowOnError
|
|
870
|
+
>({
|
|
871
|
+
responseTransformer: async (data) =>
|
|
872
|
+
await zUploadTrackerBluetoothObservationResponse.parseAsync(data),
|
|
873
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
874
|
+
url: "/v1/trackers/{trackerId}/bluetooth/observations",
|
|
875
|
+
...options,
|
|
876
|
+
headers: {
|
|
877
|
+
"Content-Type": "application/json",
|
|
878
|
+
...options.headers,
|
|
879
|
+
},
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* Report Tracker Factory Reset
|
|
885
|
+
*/
|
|
886
|
+
public reportTrackerFactoryReset<ThrowOnError extends boolean = false>(
|
|
887
|
+
options: Options<ReportTrackerFactoryResetData, ThrowOnError>,
|
|
888
|
+
): RequestResult<
|
|
889
|
+
ReportTrackerFactoryResetResponses,
|
|
890
|
+
ReportTrackerFactoryResetErrors,
|
|
891
|
+
ThrowOnError
|
|
892
|
+
> {
|
|
893
|
+
return (options.client ?? this.client).post<
|
|
894
|
+
ReportTrackerFactoryResetResponses,
|
|
895
|
+
ReportTrackerFactoryResetErrors,
|
|
896
|
+
ThrowOnError
|
|
897
|
+
>({
|
|
898
|
+
responseTransformer: async (data) =>
|
|
899
|
+
await zReportTrackerFactoryResetResponse.parseAsync(data),
|
|
900
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
901
|
+
url: "/v1/trackers/{trackerId}/bluetooth/factory-reset-reports",
|
|
902
|
+
...options,
|
|
903
|
+
});
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* Get Tracker Firmware Plan
|
|
908
|
+
*/
|
|
909
|
+
public getTrackerFirmwarePlan<ThrowOnError extends boolean = false>(
|
|
910
|
+
options: Options<GetTrackerFirmwarePlanData, ThrowOnError>,
|
|
911
|
+
): RequestResult<
|
|
912
|
+
GetTrackerFirmwarePlanResponses,
|
|
913
|
+
GetTrackerFirmwarePlanErrors,
|
|
914
|
+
ThrowOnError
|
|
915
|
+
> {
|
|
916
|
+
return (options.client ?? this.client).get<
|
|
917
|
+
GetTrackerFirmwarePlanResponses,
|
|
918
|
+
GetTrackerFirmwarePlanErrors,
|
|
919
|
+
ThrowOnError
|
|
920
|
+
>({
|
|
921
|
+
responseTransformer: async (data) =>
|
|
922
|
+
await zGetTrackerFirmwarePlanResponse.parseAsync(data),
|
|
923
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
924
|
+
url: "/v1/trackers/{trackerId}/firmware-plan",
|
|
925
|
+
...options,
|
|
926
|
+
});
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* Complete Tracker Firmware Update
|
|
931
|
+
*/
|
|
932
|
+
public completeTrackerFirmwareUpdate<ThrowOnError extends boolean = false>(
|
|
933
|
+
options: Options<CompleteTrackerFirmwareUpdateData, ThrowOnError>,
|
|
934
|
+
): RequestResult<
|
|
935
|
+
CompleteTrackerFirmwareUpdateResponses,
|
|
936
|
+
CompleteTrackerFirmwareUpdateErrors,
|
|
937
|
+
ThrowOnError
|
|
938
|
+
> {
|
|
939
|
+
return (options.client ?? this.client).post<
|
|
940
|
+
CompleteTrackerFirmwareUpdateResponses,
|
|
941
|
+
CompleteTrackerFirmwareUpdateErrors,
|
|
942
|
+
ThrowOnError
|
|
943
|
+
>({
|
|
944
|
+
responseTransformer: async (data) =>
|
|
945
|
+
await zCompleteTrackerFirmwareUpdateResponse.parseAsync(data),
|
|
946
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
947
|
+
url: "/v1/trackers/{trackerId}/firmware-completions",
|
|
948
|
+
...options,
|
|
949
|
+
headers: {
|
|
950
|
+
"Content-Type": "application/json",
|
|
951
|
+
...options.headers,
|
|
952
|
+
},
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* Record Tracker Firmware Attempt
|
|
958
|
+
*/
|
|
959
|
+
public recordTrackerFirmwareAttempt<ThrowOnError extends boolean = false>(
|
|
960
|
+
options: Options<RecordTrackerFirmwareAttemptData, ThrowOnError>,
|
|
961
|
+
): RequestResult<
|
|
962
|
+
RecordTrackerFirmwareAttemptResponses,
|
|
963
|
+
RecordTrackerFirmwareAttemptErrors,
|
|
964
|
+
ThrowOnError
|
|
965
|
+
> {
|
|
966
|
+
return (options.client ?? this.client).post<
|
|
967
|
+
RecordTrackerFirmwareAttemptResponses,
|
|
968
|
+
RecordTrackerFirmwareAttemptErrors,
|
|
969
|
+
ThrowOnError
|
|
970
|
+
>({
|
|
971
|
+
responseTransformer: async (data) =>
|
|
972
|
+
await zRecordTrackerFirmwareAttemptResponse.parseAsync(data),
|
|
973
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
974
|
+
url: "/v1/trackers/{trackerId}/firmware-attempts",
|
|
975
|
+
...options,
|
|
976
|
+
headers: {
|
|
977
|
+
"Content-Type": "application/json",
|
|
978
|
+
...options.headers,
|
|
979
|
+
},
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* Read the signed-in account's preferences
|
|
985
|
+
*/
|
|
986
|
+
public getAccountPreferences<ThrowOnError extends boolean = false>(
|
|
987
|
+
options?: Options<GetAccountPreferencesData, ThrowOnError>,
|
|
988
|
+
): RequestResult<
|
|
989
|
+
GetAccountPreferencesResponses,
|
|
990
|
+
GetAccountPreferencesErrors,
|
|
991
|
+
ThrowOnError
|
|
992
|
+
> {
|
|
993
|
+
return (options?.client ?? this.client).get<
|
|
994
|
+
GetAccountPreferencesResponses,
|
|
995
|
+
GetAccountPreferencesErrors,
|
|
996
|
+
ThrowOnError
|
|
997
|
+
>({
|
|
998
|
+
responseTransformer: async (data) =>
|
|
999
|
+
await zGetAccountPreferencesResponse.parseAsync(data),
|
|
1000
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1001
|
+
url: "/v1/me/preferences",
|
|
1002
|
+
...options,
|
|
1003
|
+
});
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* Update account language and notification preferences
|
|
1008
|
+
*/
|
|
1009
|
+
public updateAccountPreferences<ThrowOnError extends boolean = false>(
|
|
1010
|
+
options: Options<UpdateAccountPreferencesData, ThrowOnError>,
|
|
1011
|
+
): RequestResult<
|
|
1012
|
+
UpdateAccountPreferencesResponses,
|
|
1013
|
+
UpdateAccountPreferencesErrors,
|
|
1014
|
+
ThrowOnError
|
|
1015
|
+
> {
|
|
1016
|
+
return (options.client ?? this.client).patch<
|
|
1017
|
+
UpdateAccountPreferencesResponses,
|
|
1018
|
+
UpdateAccountPreferencesErrors,
|
|
1019
|
+
ThrowOnError
|
|
1020
|
+
>({
|
|
1021
|
+
responseTransformer: async (data) =>
|
|
1022
|
+
await zUpdateAccountPreferencesResponse.parseAsync(data),
|
|
1023
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1024
|
+
url: "/v1/me/preferences",
|
|
1025
|
+
...options,
|
|
1026
|
+
headers: {
|
|
1027
|
+
"Content-Type": "application/json",
|
|
1028
|
+
...options.headers,
|
|
1029
|
+
},
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* Subscribe to the signed-in account's preferences
|
|
1035
|
+
*
|
|
1036
|
+
* Snapshot events contain account preferences; keepalive events contain null. Reconnect with a refreshed bearer token after closure.
|
|
1037
|
+
*/
|
|
1038
|
+
public subscribeAccountPreferences<ThrowOnError extends boolean = false>(
|
|
1039
|
+
options?: Options<
|
|
1040
|
+
SubscribeAccountPreferencesData,
|
|
1041
|
+
ThrowOnError,
|
|
1042
|
+
SubscribeAccountPreferencesResponse
|
|
1043
|
+
>,
|
|
1044
|
+
): Promise<ServerSentEventsResult<SubscribeAccountPreferencesResponses>> {
|
|
1045
|
+
return (options?.client ?? this.client).sse.get<
|
|
1046
|
+
SubscribeAccountPreferencesResponses,
|
|
1047
|
+
SubscribeAccountPreferencesErrors,
|
|
1048
|
+
ThrowOnError
|
|
1049
|
+
>({
|
|
1050
|
+
responseTransformer: async (data) =>
|
|
1051
|
+
await zSubscribeAccountPreferencesResponse.parseAsync(data),
|
|
1052
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1053
|
+
url: "/v1/me/preferences/stream",
|
|
1054
|
+
...options,
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
/**
|
|
1059
|
+
* Remove this phone's push registrations
|
|
1060
|
+
*/
|
|
1061
|
+
public removePushRegistration<ThrowOnError extends boolean = false>(
|
|
1062
|
+
options: Options<RemovePushRegistrationData, ThrowOnError>,
|
|
1063
|
+
): RequestResult<
|
|
1064
|
+
RemovePushRegistrationResponses,
|
|
1065
|
+
RemovePushRegistrationErrors,
|
|
1066
|
+
ThrowOnError
|
|
1067
|
+
> {
|
|
1068
|
+
return (options.client ?? this.client).delete<
|
|
1069
|
+
RemovePushRegistrationResponses,
|
|
1070
|
+
RemovePushRegistrationErrors,
|
|
1071
|
+
ThrowOnError
|
|
1072
|
+
>({
|
|
1073
|
+
responseTransformer: async (data) =>
|
|
1074
|
+
await zRemovePushRegistrationResponse.parseAsync(data),
|
|
1075
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1076
|
+
url: "/v1/me/push-registration",
|
|
1077
|
+
...options,
|
|
1078
|
+
headers: {
|
|
1079
|
+
"Content-Type": "application/json",
|
|
1080
|
+
...options.headers,
|
|
1081
|
+
},
|
|
1082
|
+
});
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* Register this phone for push notifications
|
|
1087
|
+
*/
|
|
1088
|
+
public registerPushRegistration<ThrowOnError extends boolean = false>(
|
|
1089
|
+
options: Options<RegisterPushRegistrationData, ThrowOnError>,
|
|
1090
|
+
): RequestResult<
|
|
1091
|
+
RegisterPushRegistrationResponses,
|
|
1092
|
+
RegisterPushRegistrationErrors,
|
|
1093
|
+
ThrowOnError
|
|
1094
|
+
> {
|
|
1095
|
+
return (options.client ?? this.client).put<
|
|
1096
|
+
RegisterPushRegistrationResponses,
|
|
1097
|
+
RegisterPushRegistrationErrors,
|
|
1098
|
+
ThrowOnError
|
|
1099
|
+
>({
|
|
1100
|
+
responseTransformer: async (data) =>
|
|
1101
|
+
await zRegisterPushRegistrationResponse.parseAsync(data),
|
|
1102
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1103
|
+
url: "/v1/me/push-registration",
|
|
1104
|
+
...options,
|
|
1105
|
+
headers: {
|
|
1106
|
+
"Content-Type": "application/json",
|
|
1107
|
+
...options.headers,
|
|
1108
|
+
},
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* Submit an account deletion request
|
|
1114
|
+
*
|
|
1115
|
+
* Records a request for review. Acceptance does not immediately delete the account.
|
|
1116
|
+
*/
|
|
1117
|
+
public requestAccountDeletion<ThrowOnError extends boolean = false>(
|
|
1118
|
+
options?: Options<RequestAccountDeletionData, ThrowOnError>,
|
|
1119
|
+
): RequestResult<
|
|
1120
|
+
RequestAccountDeletionResponses,
|
|
1121
|
+
RequestAccountDeletionErrors,
|
|
1122
|
+
ThrowOnError
|
|
1123
|
+
> {
|
|
1124
|
+
return (options?.client ?? this.client).post<
|
|
1125
|
+
RequestAccountDeletionResponses,
|
|
1126
|
+
RequestAccountDeletionErrors,
|
|
1127
|
+
ThrowOnError
|
|
1128
|
+
>({
|
|
1129
|
+
responseTransformer: async (data) =>
|
|
1130
|
+
await zRequestAccountDeletionResponse.parseAsync(data),
|
|
1131
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1132
|
+
url: "/v1/me/deletion-requests",
|
|
1133
|
+
...options,
|
|
1134
|
+
});
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
/**
|
|
1138
|
+
* Read one page of tracker position history
|
|
1139
|
+
*
|
|
1140
|
+
* Returns up to 100 raw records per page, filtering unavailable fixes. startMs is inclusive and endMs exclusive, both Unix milliseconds. Advance using nextCursor even when a page has no usable positions.
|
|
1141
|
+
*/
|
|
1142
|
+
public listTrackerHistory<ThrowOnError extends boolean = false>(
|
|
1143
|
+
options: Options<ListTrackerHistoryData, ThrowOnError>,
|
|
1144
|
+
): RequestResult<
|
|
1145
|
+
ListTrackerHistoryResponses,
|
|
1146
|
+
ListTrackerHistoryErrors,
|
|
1147
|
+
ThrowOnError
|
|
1148
|
+
> {
|
|
1149
|
+
return (options.client ?? this.client).get<
|
|
1150
|
+
ListTrackerHistoryResponses,
|
|
1151
|
+
ListTrackerHistoryErrors,
|
|
1152
|
+
ThrowOnError
|
|
1153
|
+
>({
|
|
1154
|
+
responseTransformer: async (data) =>
|
|
1155
|
+
await zListTrackerHistoryResponse.parseAsync(data),
|
|
1156
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1157
|
+
url: "/v1/trackers/{trackerId}/history",
|
|
1158
|
+
...options,
|
|
1159
|
+
});
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* Read account and owned subscription notification history
|
|
1164
|
+
*
|
|
1165
|
+
* Sources are selected by the server from account ownership. Empty or failed notifications are hidden, but nextCursor still advances through them.
|
|
1166
|
+
*/
|
|
1167
|
+
public listNotifications<ThrowOnError extends boolean = false>(
|
|
1168
|
+
options?: Options<ListNotificationsData, ThrowOnError>,
|
|
1169
|
+
): RequestResult<
|
|
1170
|
+
ListNotificationsResponses,
|
|
1171
|
+
ListNotificationsErrors,
|
|
1172
|
+
ThrowOnError
|
|
1173
|
+
> {
|
|
1174
|
+
return (options?.client ?? this.client).get<
|
|
1175
|
+
ListNotificationsResponses,
|
|
1176
|
+
ListNotificationsErrors,
|
|
1177
|
+
ThrowOnError
|
|
1178
|
+
>({
|
|
1179
|
+
responseTransformer: async (data) =>
|
|
1180
|
+
await zListNotificationsResponse.parseAsync(data),
|
|
1181
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1182
|
+
url: "/v1/me/notifications",
|
|
1183
|
+
...options,
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
public listSubscriptions<ThrowOnError extends boolean = false>(
|
|
1188
|
+
options?: Options<ListSubscriptionsData, ThrowOnError>,
|
|
1189
|
+
): RequestResult<
|
|
1190
|
+
ListSubscriptionsResponses,
|
|
1191
|
+
ListSubscriptionsErrors,
|
|
1192
|
+
ThrowOnError
|
|
1193
|
+
> {
|
|
1194
|
+
return (options?.client ?? this.client).get<
|
|
1195
|
+
ListSubscriptionsResponses,
|
|
1196
|
+
ListSubscriptionsErrors,
|
|
1197
|
+
ThrowOnError
|
|
1198
|
+
>({
|
|
1199
|
+
responseTransformer: async (data) =>
|
|
1200
|
+
await zListSubscriptionsResponse.parseAsync(data),
|
|
1201
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1202
|
+
url: "/v1/me/subscriptions",
|
|
1203
|
+
...options,
|
|
1204
|
+
});
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
public subscribeSubscriptions<ThrowOnError extends boolean = false>(
|
|
1208
|
+
options?: Options<
|
|
1209
|
+
SubscribeSubscriptionsData,
|
|
1210
|
+
ThrowOnError,
|
|
1211
|
+
SubscribeSubscriptionsResponse
|
|
1212
|
+
>,
|
|
1213
|
+
): Promise<ServerSentEventsResult<SubscribeSubscriptionsResponses>> {
|
|
1214
|
+
return (options?.client ?? this.client).sse.get<
|
|
1215
|
+
SubscribeSubscriptionsResponses,
|
|
1216
|
+
SubscribeSubscriptionsErrors,
|
|
1217
|
+
ThrowOnError
|
|
1218
|
+
>({
|
|
1219
|
+
responseTransformer: async (data) =>
|
|
1220
|
+
await zSubscribeSubscriptionsResponse.parseAsync(data),
|
|
1221
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1222
|
+
url: "/v1/me/subscriptions/stream",
|
|
1223
|
+
...options,
|
|
1224
|
+
});
|
|
1225
|
+
}
|
|
1226
|
+
}
|