@putdotio/sdk 11.5.0 → 12.0.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 +42 -51
- package/dist/{forms-Ch5rwD58.js → forms-Bd1tWyx0.js} +13 -2
- package/dist/forms-Bd1tWyx0.js.map +1 -0
- package/dist/{index-BTZhke9H.d.ts → index-BdlCuqLB.d.ts} +22 -25
- package/dist/index.d.ts +1 -1
- package/dist/index.js +35 -55
- package/dist/index.js.map +1 -1
- package/dist/utilities.d.ts +53 -47
- package/dist/utilities.js +38 -27
- package/dist/utilities.js.map +1 -1
- package/package.json +3 -3
- package/dist/forms-Ch5rwD58.js.map +0 -1
package/README.md
CHANGED
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
## Installation
|
|
23
23
|
|
|
24
|
-
Install with npm:
|
|
25
|
-
|
|
26
24
|
```bash
|
|
27
25
|
npm install @putdotio/sdk
|
|
28
26
|
```
|
|
@@ -30,7 +28,6 @@ npm install @putdotio/sdk
|
|
|
30
28
|
## Quick Start
|
|
31
29
|
|
|
32
30
|
`userAccessToken` in these examples is an already-issued user token from your app or auth flow.
|
|
33
|
-
The SDK itself can be constructed without a token.
|
|
34
31
|
|
|
35
32
|
```ts
|
|
36
33
|
import { createPutioSdkPromiseClient } from "@putdotio/sdk";
|
|
@@ -44,7 +41,9 @@ const account = await sdk.account.getInfo({
|
|
|
44
41
|
});
|
|
45
42
|
```
|
|
46
43
|
|
|
47
|
-
|
|
44
|
+
## Authentication
|
|
45
|
+
|
|
46
|
+
The client can be created without a token, for flows that obtain or check one:
|
|
48
47
|
|
|
49
48
|
```ts
|
|
50
49
|
const sdk = createPutioSdkPromiseClient();
|
|
@@ -59,24 +58,6 @@ const login = await sdk.auth.login({
|
|
|
59
58
|
});
|
|
60
59
|
```
|
|
61
60
|
|
|
62
|
-
## App-Specific Passwords
|
|
63
|
-
|
|
64
|
-
Create and manage passwords for apps that use put.io basic authentication:
|
|
65
|
-
|
|
66
|
-
```ts
|
|
67
|
-
const created = await sdk.account.appSpecificPasswords.create({
|
|
68
|
-
note: "Media server",
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
savePasswordSecurely(created.password);
|
|
72
|
-
|
|
73
|
-
const passwords = await sdk.account.appSpecificPasswords.list();
|
|
74
|
-
await sdk.account.appSpecificPasswords.delete(created.id);
|
|
75
|
-
await sdk.account.appSpecificPasswords.deleteAll();
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
The plaintext `password` is returned only by `create`. List results contain metadata instead, including a nullable `last_used_at` timestamp and a null or masked `ip_address`. The Effect client exposes the same namespace with typed errors in its Effect channel.
|
|
79
|
-
|
|
80
61
|
Long-lived Promise clients can replace or clear their token without recreating the client:
|
|
81
62
|
|
|
82
63
|
```ts
|
|
@@ -105,19 +86,38 @@ The exchange uses a form-encoded `POST` and never sends a configured bearer toke
|
|
|
105
86
|
failures are exposed as `OAuthAuthorizationCodeExchangeError`; client secrets and codes are not
|
|
106
87
|
included in validation errors.
|
|
107
88
|
|
|
89
|
+
## App-Specific Passwords
|
|
90
|
+
|
|
91
|
+
Create and manage passwords for apps that use put.io basic authentication:
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
const created = await sdk.account.appSpecificPasswords.create({
|
|
95
|
+
note: "Media server",
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
savePasswordSecurely(created.password);
|
|
99
|
+
|
|
100
|
+
const passwords = await sdk.account.appSpecificPasswords.list();
|
|
101
|
+
await sdk.account.appSpecificPasswords.delete(created.id);
|
|
102
|
+
await sdk.account.appSpecificPasswords.deleteAll();
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The plaintext `password` is returned only by `create`. List results contain metadata instead, including a nullable `last_used_at` timestamp and a null or masked `ip_address`.
|
|
106
|
+
|
|
108
107
|
## Utilities
|
|
109
108
|
|
|
110
109
|
Shared formatting, URL, and error-localization helpers are available from the utilities subpath:
|
|
111
110
|
|
|
112
111
|
```ts
|
|
113
112
|
import {
|
|
114
|
-
|
|
113
|
+
FileUrlProvider,
|
|
115
114
|
secondsToReadableDuration,
|
|
116
115
|
toHumanFileSize,
|
|
117
116
|
} from "@putdotio/sdk/utilities";
|
|
118
117
|
```
|
|
119
118
|
|
|
120
119
|
```ts
|
|
120
|
+
const urls = new FileUrlProvider({ baseUrl: "https://api.put.io", downloadToken });
|
|
121
121
|
const size = toHumanFileSize(1_572_864);
|
|
122
122
|
const duration = secondsToReadableDuration(444);
|
|
123
123
|
```
|
|
@@ -158,25 +158,15 @@ const serviceProgram = Effect.gen(function* () {
|
|
|
158
158
|
`makePutioSdkLiveLayer(...)` provides both the SDK config and the default fetch-backed transport.
|
|
159
159
|
Use `makePutioSdkLayer(...)` with `makePutioFetchLayer(...)` or your own `PutioHttpClient` service when you want to supply custom transport.
|
|
160
160
|
|
|
161
|
-
##
|
|
161
|
+
## Client Shapes
|
|
162
162
|
|
|
163
|
-
Both client styles expose the same domain surface
|
|
164
|
-
`setAccessToken(...)` for token rotation, `dispose()` for runtime teardown, and
|
|
165
|
-
`files.createUploadFormData(...)` for pure FormData construction.
|
|
163
|
+
Both client styles expose the same domain surface:
|
|
166
164
|
|
|
167
165
|
```ts
|
|
168
166
|
promiseClient.files.list(0, { per_page: 20 });
|
|
169
167
|
effectClient.files.list(0, { per_page: 20 });
|
|
170
|
-
|
|
171
|
-
promiseClient.setAccessToken(refreshedAccessToken);
|
|
172
|
-
promiseClient.setAccessToken(undefined);
|
|
173
168
|
```
|
|
174
169
|
|
|
175
|
-
Choose the Promise client when you want standard async functions.
|
|
176
|
-
Choose the Effect client when you want the canonical typed error channel and Effect-native composition.
|
|
177
|
-
|
|
178
|
-
## Client Shapes
|
|
179
|
-
|
|
180
170
|
| Client | Use it for |
|
|
181
171
|
| ------------------------------------- | ------------------------------------------------- |
|
|
182
172
|
| `createPutioSdkPromiseClient(config)` | React apps, scripts, server handlers, React Query |
|
|
@@ -184,19 +174,15 @@ Choose the Effect client when you want the canonical typed error channel and Eff
|
|
|
184
174
|
|
|
185
175
|
Effect is the canonical typed surface. The Promise client is an adapter for environments that want standard async functions.
|
|
186
176
|
|
|
187
|
-
- SDK creation does not require an access token
|
|
188
|
-
- Authenticated endpoints need a token through client config or the Effect layer config
|
|
189
177
|
- Effect client: keeps errors in the Effect error channel with operation-specific typing
|
|
190
178
|
- Promise client: throws tagged SDK error objects such as `PutioOperationError`, `PutioApiError`, and `PutioRateLimitError`
|
|
191
|
-
- Promise client:
|
|
192
|
-
- Promise client:
|
|
179
|
+
- Promise client: owns a managed Effect runtime; call `await sdk.dispose()` when tearing down a long-lived client in a script, test harness, or server
|
|
180
|
+
- Promise client: `files.createUploadFormData(...)` builds upload FormData without a request
|
|
193
181
|
|
|
194
182
|
Interrupting an Effect during fetch or response-body consumption aborts the underlying
|
|
195
183
|
fetch request, including JSON and binary reads. Successful reads do not abort the
|
|
196
184
|
request.
|
|
197
185
|
|
|
198
|
-
If you create a long-lived Promise client in a script, test harness, or server integration, call `await sdk.dispose()` during teardown.
|
|
199
|
-
|
|
200
186
|
## Namespace Surface
|
|
201
187
|
|
|
202
188
|
| Namespace | Purpose |
|
|
@@ -245,12 +231,10 @@ For upload flows, the host should also provide file-compatible inputs such as `F
|
|
|
245
231
|
|
|
246
232
|
If a target runtime is missing these APIs, provide them with host-level polyfills or adapters instead of patching the SDK surface.
|
|
247
233
|
|
|
248
|
-
|
|
234
|
+
CI installs the packed package into external Node, Bun, and bundled Chromium, Firefox, and WebKit consumers on every change.
|
|
249
235
|
|
|
250
236
|
## Error Handling
|
|
251
237
|
|
|
252
|
-
Promise consumers receive tagged SDK error objects:
|
|
253
|
-
|
|
254
238
|
The fetch transport retains HTTP status and rate-limit headers when an error
|
|
255
239
|
response contains empty or invalid JSON. These errors include a sanitized parsing
|
|
256
240
|
`cause`; response contents are not included in that cause. Failures while reading
|
|
@@ -261,6 +245,8 @@ Backend error bodies preserve `status`, `status_code`, `error_type`, `error_mess
|
|
|
261
245
|
`details` field remains available for compatibility, but current backend errors use
|
|
262
246
|
`extra`; `details` is planned for removal in the next major release.
|
|
263
247
|
|
|
248
|
+
Promise consumers receive tagged SDK error objects:
|
|
249
|
+
|
|
264
250
|
```ts
|
|
265
251
|
import {
|
|
266
252
|
createPutioSdkPromiseClient,
|
|
@@ -316,14 +302,20 @@ const handled = Effect.gen(function* () {
|
|
|
316
302
|
|
|
317
303
|
## Direct File Access
|
|
318
304
|
|
|
319
|
-
`files` exposes both JSON contracts and direct route helpers
|
|
305
|
+
`files` exposes both JSON contracts and direct route helpers. Media URLs leave your app (players,
|
|
306
|
+
casting receivers, shared links, logs), so sign them with the account download token, which only
|
|
307
|
+
grants file access, instead of the OAuth token. `downloadToken` is required; the helpers never
|
|
308
|
+
fall back to the client's `accessToken`.
|
|
320
309
|
|
|
321
310
|
```ts
|
|
311
|
+
const { download_token: downloadToken } = await sdk.account.getInfo({ download_token: 1 });
|
|
312
|
+
|
|
322
313
|
const playlistUrl = await sdk.files.getHlsStreamUrl(fileId, {
|
|
314
|
+
downloadToken,
|
|
323
315
|
maxSubtitleCount: 1,
|
|
324
316
|
});
|
|
325
317
|
|
|
326
|
-
const vlcPlaylistUrl = await sdk.files.getXspfPlaylistUrl(fileId);
|
|
318
|
+
const vlcPlaylistUrl = await sdk.files.getXspfPlaylistUrl(fileId, { downloadToken });
|
|
327
319
|
|
|
328
320
|
// The master playlist put.io would serve, for inspecting the selected
|
|
329
321
|
// variant's CODECS and VIDEO-RANGE. `playOriginal` picks the original
|
|
@@ -342,10 +334,8 @@ Upload targets `upload.put.io` internally because `api.put.io/v2/files/upload` i
|
|
|
342
334
|
|
|
343
335
|
## Endpoint Coverage
|
|
344
336
|
|
|
345
|
-
The TypeScript SDK mirrors the supported public put.io API surface.
|
|
346
|
-
|
|
347
|
-
The portable route matrix is public evidence for selected decisions, not a published backend
|
|
348
|
-
inventory.
|
|
337
|
+
The TypeScript SDK mirrors the supported public put.io API surface. Scope, exclusions, and the
|
|
338
|
+
latest audit are in [API Coverage](docs/API-COVERAGE.md).
|
|
349
339
|
|
|
350
340
|
## File Lookup and Mutations
|
|
351
341
|
|
|
@@ -467,11 +457,12 @@ export const useFiles = (parentId: number) =>
|
|
|
467
457
|
|
|
468
458
|
## Docs
|
|
469
459
|
|
|
460
|
+
- [Migrating to v12](./docs/MIGRATING_V12.md) for required `downloadToken` media URLs and the `FileUrlProvider` renames
|
|
470
461
|
- [Migrating to v11](./docs/MIGRATING_V11.md) for the removed Coinbase and file-search contracts
|
|
471
462
|
- [Architecture](./docs/ARCHITECTURE.md) for package shape and boundaries
|
|
472
463
|
- [Testing](./docs/TESTING.md) for local and live verification
|
|
473
464
|
- [Distribution](./docs/DISTRIBUTION.md) for release automation
|
|
474
|
-
- [Security](
|
|
465
|
+
- [Security policy](https://github.com/putdotio/.github/blob/main/SECURITY.md) for private vulnerability reports; fixes target the latest published release and `main`
|
|
475
466
|
|
|
476
467
|
## Contributing
|
|
477
468
|
|
|
@@ -249,6 +249,17 @@ const requestArrayBuffer = (options) => executeRequest(options).pipe(Effect.flat
|
|
|
249
249
|
const requestText = (options) => requestArrayBuffer(options).pipe(Effect.map((bytes) => new TextDecoder().decode(bytes)));
|
|
250
250
|
const requestVoid = (options) => executeRequest(options).pipe(Effect.flatMap((response) => isSuccessStatus(response.status) ? Effect.void : decodeFailure(response, response.headers).pipe(Effect.flatMap(Effect.fail))));
|
|
251
251
|
//#endregion
|
|
252
|
+
//#region src/core/validation.ts
|
|
253
|
+
const PositiveIntegerSchema = Schema.Int.check(Schema.isGreaterThan(0));
|
|
254
|
+
const NonEmptyStringSchema = Schema.String.check(Schema.isMinLength(1));
|
|
255
|
+
const decodeAndRun = (schema, input, run) => Schema.decodeUnknownEffect(schema, { onExcessProperty: "error" })(input).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap(run));
|
|
256
|
+
const makeCursorSelectionSchema = (idsField, excludeIdsField, fields) => Schema.Struct({
|
|
257
|
+
cursor: Schema.optional(NonEmptyStringSchema),
|
|
258
|
+
[excludeIdsField]: Schema.optional(Schema.Array(PositiveIntegerSchema)),
|
|
259
|
+
[idsField]: Schema.optional(Schema.Array(PositiveIntegerSchema).check(Schema.isMinLength(1))),
|
|
260
|
+
...fields
|
|
261
|
+
}).check(Schema.makeFilter((input) => input.cursor !== void 0 || input[idsField] !== void 0, { expected: "a non-empty cursor or file ID selection" }));
|
|
262
|
+
//#endregion
|
|
252
263
|
//#region src/core/forms.ts
|
|
253
264
|
const joinCsv = (values) => values && values.length > 0 ? values.join(",") : void 0;
|
|
254
265
|
const toCursorSelectionForm = (selection, idsFieldName) => {
|
|
@@ -260,6 +271,6 @@ const toCursorSelectionForm = (selection, idsFieldName) => {
|
|
|
260
271
|
};
|
|
261
272
|
};
|
|
262
273
|
//#endregion
|
|
263
|
-
export {
|
|
274
|
+
export { PutioOperationError as A, isPutioOperationError as B, DEFAULT_PUTIO_API_BASE_URL as C, PutioAuthError as D, PutioApiError as E, definePutioOperationErrorSpec as F, mapTransportError as G, makeResponseError as H, fallbackPutioErrorEnvelope as I, withOperationErrors as J, parseErrorBody as K, isPutioApiError as L, PutioTransportError as M, PutioValidationError as N, PutioConfigurationError as O, decodePutioErrorEnvelope as P, isPutioAuthError as R, selectJsonFields as S, DEFAULT_PUTIO_WEB_APP_URL as T, mapConfigurationError as U, isPutioRateLimitError as V, mapDecodeErrorToValidationError as W, requestArrayBuffer as _, decodeAndRun as a, requestVoid as b, PutioHttpClient as c, encodePathSegment as d, makePutioFetchClient as f, makePutioSdkLiveLayer as g, makePutioSdkLayer as h, PositiveIntegerSchema as i, PutioRateLimitError as j, PutioErrorEnvelopeSchema as k, PutioSdkConfig as l, makePutioSdkConfig as m, toCursorSelectionForm as n, makeCursorSelectionSchema as o, makePutioFetchLayer as p, responseRateLimitHeaders as q, NonEmptyStringSchema as r, OkResponseSchema as s, joinCsv as t, buildPutioUrl as u, requestJson as v, DEFAULT_PUTIO_UPLOAD_BASE_URL as w, selectJsonField as x, requestText as y, isPutioErrorEnvelope as z };
|
|
264
275
|
|
|
265
|
-
//# sourceMappingURL=forms-
|
|
276
|
+
//# sourceMappingURL=forms-Bd1tWyx0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forms-Bd1tWyx0.js","names":[],"sources":["../src/core/errors.ts","../src/core/defaults.ts","../src/core/http.ts","../src/core/validation.ts","../src/core/forms.ts"],"sourcesContent":["import { Data, Effect, Predicate, Schema } from \"effect\";\n\nexport const PutioErrorEnvelopeSchema = Schema.Struct({\n status: Schema.optional(Schema.String),\n error: Schema.optional(Schema.String),\n error_message: Schema.optional(Schema.String),\n error_type: Schema.optional(Schema.String),\n error_uri: Schema.optional(Schema.String),\n error_id: Schema.optional(Schema.NullOr(Schema.String)),\n extra: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),\n status_code: Schema.optional(Schema.Int),\n details: Schema.optional(Schema.Unknown),\n});\n\nexport type PutioErrorEnvelope = Schema.Schema.Type<typeof PutioErrorEnvelopeSchema>;\n\nexport interface PutioKnownErrorContract<\n TType extends string = string,\n TStatus extends number = number,\n TBody extends PutioErrorEnvelope = PutioErrorEnvelope,\n> {\n readonly bodySchema?: Schema.Schema<TBody> | undefined;\n readonly errorType?: TType | undefined;\n readonly statusCode?: TStatus | undefined;\n}\n\ntype ContractErrorType<TContract extends PutioKnownErrorContract> =\n TContract extends PutioKnownErrorContract<infer TType, number> ? TType : never;\n\ntype ContractStatusCode<TContract extends PutioKnownErrorContract> =\n TContract extends PutioKnownErrorContract<string, infer TStatus> ? TStatus : never;\n\ntype ContractBody<TContract extends PutioKnownErrorContract> = TContract extends {\n readonly bodySchema: Schema.Schema<infer TBody extends PutioErrorEnvelope>;\n}\n ? TBody\n : PutioErrorEnvelope;\n\nexport type PutioTypedErrorEnvelope<TContract extends PutioKnownErrorContract> =\n TContract extends PutioKnownErrorContract\n ? Omit<ContractBody<TContract>, \"error_message\" | \"error_type\" | \"status_code\"> & {\n readonly error_message?: string;\n readonly error_type?: [ContractErrorType<TContract>] extends [never]\n ? string\n : ContractErrorType<TContract>;\n readonly status_code?: [ContractStatusCode<TContract>] extends [never]\n ? number\n : ContractStatusCode<TContract>;\n }\n : never;\n\nexport interface PutioOperationErrorSpec<\n TDomain extends string = string,\n TOperation extends string = string,\n TContracts extends ReadonlyArray<PutioKnownErrorContract> =\n ReadonlyArray<PutioKnownErrorContract>,\n> {\n readonly domain: TDomain;\n readonly operation: TOperation;\n readonly knownErrors: TContracts;\n}\n\ntype OperationContractOf<TSpec extends PutioOperationErrorSpec> = Extract<\n TSpec[\"knownErrors\"][number],\n PutioKnownOperationErrorContract\n>;\n\ntype OperationContractOfParts<\n TDomain extends string,\n TOperation extends string,\n TContracts extends ReadonlyArray<PutioKnownErrorContract>,\n> = OperationContractOf<PutioOperationErrorSpec<TDomain, TOperation, TContracts>>;\n\ntype PutioOperationErrorReason<TContract extends PutioKnownErrorContract> = TContract extends {\n readonly errorType: infer TType extends string;\n}\n ? {\n readonly kind: \"error_type\";\n readonly errorType: TType;\n }\n : TContract extends { readonly statusCode: infer TStatus extends number }\n ? {\n readonly kind: \"status_code\";\n readonly statusCode: TStatus;\n }\n : never;\n\nexport type PutioKnownOperationErrorContract =\n | {\n readonly errorType: string;\n readonly statusCode?: number;\n }\n | {\n readonly errorType?: undefined;\n readonly statusCode: number;\n };\n\nconst isKnownContractMatch = <TContract extends PutioKnownErrorContract>(\n contract: TContract,\n error: PutioApiError | PutioAuthError,\n): contract is Extract<TContract, PutioKnownOperationErrorContract> => {\n if (contract.bodySchema !== undefined && !Schema.is(contract.bodySchema)(error.body)) {\n return false;\n }\n\n if (contract.errorType !== undefined) {\n if (error.body.error_type !== contract.errorType) {\n return false;\n }\n\n return contract.statusCode === undefined || error.status === contract.statusCode;\n }\n\n if (contract.statusCode !== undefined) {\n return error.status === contract.statusCode;\n }\n\n return false;\n};\n\nconst isMatchableApiError = (error: PutioSdkError): error is PutioApiError | PutioAuthError =>\n error._tag === \"PutioApiError\" || error._tag === \"PutioAuthError\";\n\nconst hasOptionalString = (record: Readonly<Record<string, unknown>>, key: string): boolean =>\n !(key in record) || record[key] === undefined || typeof record[key] === \"string\";\n\nconst hasOptionalInteger = (record: Readonly<Record<string, unknown>>, key: string): boolean =>\n !(key in record) ||\n record[key] === undefined ||\n (typeof record[key] === \"number\" && Number.isInteger(record[key]));\n\nconst hasOptionalNullableString = (\n record: Readonly<Record<string, unknown>>,\n key: string,\n): boolean =>\n !(key in record) ||\n record[key] === undefined ||\n record[key] === null ||\n typeof record[key] === \"string\";\n\nconst hasOptionalRecord = (record: Readonly<Record<string, unknown>>, key: string): boolean =>\n !(key in record) || record[key] === undefined || Predicate.isObject(record[key]);\n\nconst isKnownOperationErrorContract = (value: unknown): value is PutioKnownOperationErrorContract =>\n Predicate.isObject(value) &&\n (typeof value.errorType === \"string\" || typeof value.statusCode === \"number\") &&\n hasOptionalString(value, \"errorType\") &&\n hasOptionalInteger(value, \"statusCode\");\n\nconst isOperationReason = (\n value: unknown,\n): value is PutioOperationErrorReason<PutioKnownOperationErrorContract> => {\n if (!Predicate.isObject(value)) {\n return false;\n }\n\n if (value.kind === \"error_type\") {\n return typeof value.errorType === \"string\";\n }\n\n if (value.kind === \"status_code\") {\n return typeof value.statusCode === \"number\";\n }\n\n return false;\n};\n\nfunction toOperationReason<TContract extends { readonly errorType: string }>(\n contract: TContract,\n): PutioOperationErrorReason<TContract>;\nfunction toOperationReason<TContract extends { readonly statusCode: number }>(\n contract: TContract,\n): PutioOperationErrorReason<TContract>;\nfunction toOperationReason(\n contract: PutioKnownOperationErrorContract,\n): PutioOperationErrorReason<PutioKnownOperationErrorContract> {\n if (contract.errorType !== undefined) {\n return {\n kind: \"error_type\",\n errorType: contract.errorType,\n };\n }\n\n return {\n kind: \"status_code\",\n statusCode: contract.statusCode,\n };\n}\n\nexport class PutioTransportError extends Data.TaggedError(\"PutioTransportError\")<{\n readonly cause: unknown;\n}> {}\n\nexport class PutioConfigurationError extends Data.TaggedError(\"PutioConfigurationError\")<{\n readonly cause: unknown;\n}> {}\n\nexport class PutioValidationError extends Data.TaggedError(\"PutioValidationError\")<{\n readonly cause: unknown;\n}> {}\n\nconst PutioResponseErrorFields = {\n status: Schema.Int,\n body: PutioErrorEnvelopeSchema,\n cause: Schema.optional(Schema.Defect()),\n};\n\nexport class PutioApiError extends Schema.TaggedError<PutioApiError>()(\"PutioApiError\", {\n ...PutioResponseErrorFields,\n}) {}\n\nexport class PutioAuthError extends Schema.TaggedError<PutioAuthError>()(\"PutioAuthError\", {\n ...PutioResponseErrorFields,\n}) {}\n\nexport class PutioRateLimitError extends Schema.TaggedError<PutioRateLimitError>()(\n \"PutioRateLimitError\",\n {\n ...PutioResponseErrorFields,\n action: Schema.optional(Schema.String),\n id: Schema.optional(Schema.String),\n limit: Schema.optional(Schema.String),\n remaining: Schema.optional(Schema.String),\n retryAfter: Schema.optional(Schema.String),\n reset: Schema.optional(Schema.String),\n },\n) {}\n\nexport class PutioOperationError<\n TDomain extends string,\n TOperation extends string,\n TContract extends PutioKnownOperationErrorContract,\n> extends Data.TaggedError(\"PutioOperationError\")<{\n readonly body: PutioTypedErrorEnvelope<TContract>;\n readonly contract: TContract;\n readonly domain: TDomain;\n readonly operation: TOperation;\n readonly reason: PutioOperationErrorReason<TContract>;\n readonly status: number;\n}> {}\n\nexport type PutioSdkError =\n | PutioConfigurationError\n | PutioTransportError\n | PutioValidationError\n | PutioApiError\n | PutioAuthError\n | PutioRateLimitError;\n\nexport type PutioUnhandledSdkError =\n | PutioConfigurationError\n | PutioTransportError\n | PutioValidationError\n | PutioApiError\n | PutioAuthError\n | PutioRateLimitError;\n\nexport type PutioOperationErrorFromSpec<TSpec extends PutioOperationErrorSpec> =\n PutioOperationError<TSpec[\"domain\"], TSpec[\"operation\"], OperationContractOf<TSpec>>;\n\nexport type PutioOperationFailure<TSpec extends PutioOperationErrorSpec> =\n | PutioUnhandledSdkError\n | PutioOperationErrorFromSpec<TSpec>;\n\nexport type AnyPutioOperationError = PutioOperationError<\n string,\n string,\n PutioKnownOperationErrorContract\n>;\n\nexport const definePutioOperationErrorSpec = <\n const TDomain extends string,\n const TOperation extends string,\n const TContracts extends ReadonlyArray<PutioKnownErrorContract>,\n>(\n spec: PutioOperationErrorSpec<TDomain, TOperation, TContracts>,\n) => spec;\n\nexport const decodePutioErrorEnvelope = Schema.decodeUnknownEffect(PutioErrorEnvelopeSchema);\n\nexport const isPutioErrorEnvelope = (value: unknown): value is PutioErrorEnvelope =>\n Predicate.isObject(value) &&\n hasOptionalString(value, \"status\") &&\n hasOptionalString(value, \"error\") &&\n hasOptionalString(value, \"error_message\") &&\n hasOptionalString(value, \"error_type\") &&\n hasOptionalString(value, \"error_uri\") &&\n hasOptionalNullableString(value, \"error_id\") &&\n hasOptionalRecord(value, \"extra\") &&\n hasOptionalInteger(value, \"status_code\");\n\nconst hasStatusAndBody = <TTag extends string>(\n value: unknown,\n tag: TTag,\n): value is {\n readonly _tag: TTag;\n readonly body: PutioErrorEnvelope;\n readonly status: number;\n} =>\n Predicate.isObject(value) &&\n value._tag === tag &&\n typeof value.status === \"number\" &&\n isPutioErrorEnvelope(value.body);\n\nexport const isPutioApiError = (value: unknown): value is PutioApiError =>\n hasStatusAndBody(value, \"PutioApiError\");\n\nexport const isPutioAuthError = (value: unknown): value is PutioAuthError =>\n hasStatusAndBody(value, \"PutioAuthError\");\n\nexport const isPutioRateLimitError = (value: unknown): value is PutioRateLimitError =>\n hasStatusAndBody(value, \"PutioRateLimitError\") &&\n Predicate.isObject(value) &&\n hasOptionalString(value, \"action\") &&\n hasOptionalString(value, \"id\") &&\n hasOptionalString(value, \"limit\") &&\n hasOptionalString(value, \"remaining\") &&\n hasOptionalString(value, \"retryAfter\") &&\n hasOptionalString(value, \"reset\");\n\nexport const isPutioOperationError = (value: unknown): value is AnyPutioOperationError =>\n Predicate.isObject(value) &&\n value._tag === \"PutioOperationError\" &&\n isPutioErrorEnvelope(value.body) &&\n isKnownOperationErrorContract(value.contract) &&\n typeof value.domain === \"string\" &&\n typeof value.operation === \"string\" &&\n isOperationReason(value.reason) &&\n typeof value.status === \"number\";\n\nexport const fallbackPutioErrorEnvelope = (status: number): PutioErrorEnvelope => ({\n error_message: `put.io API request failed with status ${status}`,\n status_code: status,\n});\n\nconst getHeader = (headers: Headers, name: string): string | undefined =>\n headers.get(name) ?? undefined;\n\nexport const responseRateLimitHeaders = (headers: Headers) => ({\n action: getHeader(headers, \"x-ratelimit-action\"),\n id: getHeader(headers, \"x-ratelimit-id\"),\n limit: getHeader(headers, \"x-ratelimit-limit\"),\n remaining: getHeader(headers, \"x-ratelimit-remaining\"),\n retryAfter: getHeader(headers, \"retry-after\"),\n reset: getHeader(headers, \"x-ratelimit-reset\"),\n});\n\nexport const mapDecodeErrorToValidationError = (cause: unknown) =>\n new PutioValidationError({ cause });\n\nexport const mapConfigurationError = (cause: unknown) => new PutioConfigurationError({ cause });\n\nexport const mapTransportError = (cause: unknown) => new PutioTransportError({ cause });\n\nexport const makeResponseError = (\n status: number,\n headers: Headers,\n body: PutioErrorEnvelope,\n cause?: unknown,\n): PutioSdkError => {\n if (status === 429) {\n return new PutioRateLimitError({\n status,\n body,\n ...responseRateLimitHeaders(headers),\n cause,\n });\n }\n\n if (status === 401 || status === 403) {\n return new PutioAuthError({ status, body, cause });\n }\n\n return new PutioApiError({ status, body, cause });\n};\n\nexport const parseErrorBody = (status: number, json: unknown) =>\n decodePutioErrorEnvelope(json).pipe(\n Effect.orElseSucceed(() => fallbackPutioErrorEnvelope(status)),\n );\n\nexport function withOperationErrors<\n A,\n E extends PutioSdkError,\n R,\n const TDomain extends string,\n const TOperation extends string,\n const TContracts extends ReadonlyArray<PutioKnownErrorContract>,\n>(\n effect: Effect.Effect<A, E, R>,\n spec: PutioOperationErrorSpec<TDomain, TOperation, TContracts>,\n): Effect.Effect<\n A,\n | E\n | PutioOperationError<\n TDomain,\n TOperation,\n OperationContractOfParts<TDomain, TOperation, TContracts>\n >,\n R\n>;\nexport function withOperationErrors<\n const TDomain extends string,\n const TOperation extends string,\n const TContracts extends ReadonlyArray<PutioKnownErrorContract>,\n>(\n spec: PutioOperationErrorSpec<TDomain, TOperation, TContracts>,\n): <A, E extends PutioSdkError, R>(\n effect: Effect.Effect<A, E, R>,\n) => Effect.Effect<\n A,\n | E\n | PutioOperationError<\n TDomain,\n TOperation,\n OperationContractOfParts<TDomain, TOperation, TContracts>\n >,\n R\n>;\nexport function withOperationErrors<\n A,\n E extends PutioSdkError,\n R,\n const TDomain extends string,\n const TOperation extends string,\n const TContracts extends ReadonlyArray<PutioKnownErrorContract>,\n>(\n effectOrSpec: Effect.Effect<A, E, R> | PutioOperationErrorSpec<TDomain, TOperation, TContracts>,\n maybeSpec?: PutioOperationErrorSpec<TDomain, TOperation, TContracts>,\n):\n | Effect.Effect<\n A,\n | E\n | PutioOperationError<\n TDomain,\n TOperation,\n OperationContractOfParts<TDomain, TOperation, TContracts>\n >,\n R\n >\n | (<A2, E2 extends PutioSdkError, R2>(\n effect: Effect.Effect<A2, E2, R2>,\n ) => Effect.Effect<\n A2,\n | E2\n | PutioOperationError<\n TDomain,\n TOperation,\n OperationContractOfParts<TDomain, TOperation, TContracts>\n >,\n R2\n >) {\n if (maybeSpec === undefined) {\n const spec = effectOrSpec as PutioOperationErrorSpec<TDomain, TOperation, TContracts>;\n\n return <A2, E2 extends PutioSdkError, R2>(effect: Effect.Effect<A2, E2, R2>) =>\n withOperationErrors(effect, spec);\n }\n\n const effect = effectOrSpec as Effect.Effect<A, E, R>;\n const spec = maybeSpec;\n\n return effect.pipe(\n Effect.mapError((error) => {\n if (!isMatchableApiError(error)) {\n return error;\n }\n\n const contract = spec.knownErrors.find((candidate) => isKnownContractMatch(candidate, error));\n\n if (!contract) {\n return error;\n }\n\n return new PutioOperationError({\n body: error.body as PutioTypedErrorEnvelope<\n OperationContractOfParts<TDomain, TOperation, TContracts>\n >,\n contract,\n domain: spec.domain,\n operation: spec.operation,\n reason: toOperationReason(contract),\n status: error.status,\n });\n }),\n );\n}\n","export const DEFAULT_PUTIO_API_BASE_URL = \"https://api.put.io\";\nexport const DEFAULT_PUTIO_UPLOAD_BASE_URL = \"https://upload.put.io\";\nexport const DEFAULT_PUTIO_WEB_APP_URL = \"https://app.put.io\";\n","import { Context, Effect, Layer, Schema } from \"effect\";\n\nimport {\n DEFAULT_PUTIO_API_BASE_URL,\n DEFAULT_PUTIO_UPLOAD_BASE_URL,\n DEFAULT_PUTIO_WEB_APP_URL,\n} from \"./defaults.js\";\nimport {\n fallbackPutioErrorEnvelope,\n makeResponseError,\n mapConfigurationError,\n mapDecodeErrorToValidationError,\n mapTransportError,\n parseErrorBody,\n PutioConfigurationError,\n type PutioSdkError,\n} from \"./errors.js\";\n\nexport type PutioQueryValue = string | number | boolean | null | undefined;\n\nexport type PutioQuery = Readonly<Record<string, PutioQueryValue>>;\n\nexport type PutioPathSegment = string | number | boolean;\n\nexport interface PutioSdkConfigShape {\n readonly accessToken?: string;\n readonly baseUrl?: string | URL;\n readonly uploadBaseUrl?: string | URL;\n readonly webAppUrl?: string | URL;\n}\n\nexport class PutioSdkConfig extends Context.Service<PutioSdkConfig, PutioSdkConfigShape>()(\n \"PutioSdkConfig\",\n) {}\n\nexport interface PutioHttpRequest {\n readonly body?: BodyInit;\n readonly headers: Headers;\n readonly method: PutioRequestMethod;\n readonly url: string;\n}\n\nexport interface PutioHttpResponse {\n readonly arrayBuffer: Effect.Effect<ArrayBuffer, PutioSdkError>;\n readonly headers: Headers;\n readonly json: Effect.Effect<unknown, PutioSdkError>;\n readonly status: number;\n}\n\nexport interface PutioHttpClientShape {\n readonly execute: (request: PutioHttpRequest) => Effect.Effect<PutioHttpResponse, PutioSdkError>;\n}\n\nexport class PutioHttpClient extends Context.Service<PutioHttpClient, PutioHttpClientShape>()(\n \"PutioHttpClient\",\n) {}\n\nexport type PutioSdkContext = PutioSdkConfig | PutioHttpClient;\n\nexport const makePutioSdkConfig = (config: PutioSdkConfigShape): PutioSdkConfigShape => ({\n accessToken: config.accessToken,\n baseUrl: config.baseUrl ?? DEFAULT_PUTIO_API_BASE_URL,\n uploadBaseUrl: config.uploadBaseUrl ?? DEFAULT_PUTIO_UPLOAD_BASE_URL,\n webAppUrl: config.webAppUrl ?? DEFAULT_PUTIO_WEB_APP_URL,\n});\n\nexport const makePutioSdkLayer = (config: PutioSdkConfigShape) =>\n Layer.succeed(PutioSdkConfig, makePutioSdkConfig(config));\n\nexport const makePutioSdkLiveLayer = (config: PutioSdkConfigShape) =>\n Layer.mergeAll(makePutioSdkLayer(config), makePutioFetchLayer());\n\nexport const makePutioFetchLayer = (\n fetchImplementation: typeof globalThis.fetch = globalThis.fetch,\n) => Layer.succeed(PutioHttpClient, makePutioFetchClient(fetchImplementation));\n\nexport const makePutioFetchClient = (\n fetchImplementation: typeof globalThis.fetch = globalThis.fetch,\n): PutioHttpClientShape => ({\n execute: (request) =>\n Effect.suspend(() => {\n const controller = new AbortController();\n const read = <A>(body: () => Promise<A>) =>\n Effect.tryPromise({ try: body, catch: mapTransportError }).pipe(\n Effect.onInterrupt(() => Effect.sync(() => controller.abort())),\n );\n\n return read(async () => {\n const response = await fetchImplementation(request.url, {\n body: request.body,\n headers: request.headers,\n method: request.method,\n signal: controller.signal,\n });\n\n return {\n arrayBuffer: read(() => response.arrayBuffer()),\n headers: response.headers,\n json: isSuccessStatus(response.status)\n ? read(() => response.json())\n : read(() => response.text()).pipe(\n Effect.flatMap((text) =>\n Schema.decodeUnknownEffect(Schema.UnknownFromJsonString)(text).pipe(\n Effect.mapError(() =>\n makeResponseError(\n response.status,\n response.headers,\n fallbackPutioErrorEnvelope(response.status),\n // Native JSON errors can quote response contents in their message.\n new SyntaxError(\"The HTTP error response body is not valid JSON\"),\n ),\n ),\n ),\n ),\n ),\n status: response.status,\n };\n });\n }),\n});\n\nexport const encodePathSegment = (value: PutioPathSegment): string =>\n encodeURIComponent(String(value));\n\nconst absoluteUrlPattern = /^(?:[a-z][a-z\\d+.-]*:|\\/\\/)/i;\n\nconst normalizeApiPath = (path: string): string => {\n if (absoluteUrlPattern.test(path)) {\n throw mapConfigurationError(\"SDK API request paths must be relative to the configured baseUrl\");\n }\n\n return path.startsWith(\"/\") ? path : `/${path}`;\n};\n\nexport const buildPutioUrl = (baseUrl: string | URL, path: string, query?: PutioQuery): string => {\n const url = new URL(normalizeApiPath(path), baseUrl);\n\n if (query) {\n for (const [key, value] of Object.entries(query)) {\n if (value !== undefined && value !== null) {\n url.searchParams.set(key, String(value));\n }\n }\n }\n\n return url.toString();\n};\n\nconst mapUrlBuildError = (cause: unknown) =>\n cause instanceof PutioConfigurationError ? cause : mapConfigurationError(cause);\n\nexport const OkResponseSchema = Schema.Struct({\n status: Schema.Literal(\"OK\"),\n});\n\nexport type PutioAuth =\n | { readonly type: \"config-token\" }\n | { readonly type: \"token\"; readonly token: string }\n | { readonly type: \"basic\"; readonly username: string; readonly password: string }\n | { readonly type: \"none\" };\n\ntype PutioRequestMethod = \"GET\" | \"POST\" | \"PUT\" | \"PATCH\" | \"DELETE\";\n\ntype PutioRequestBody =\n | { readonly type: \"none\" }\n | { readonly type: \"json\"; readonly value: unknown }\n | { readonly type: \"form\"; readonly value: Record<string, unknown> }\n | { readonly type: \"form-data\"; readonly value: FormData };\n\ninterface PutioRequestOptions {\n readonly method: PutioRequestMethod;\n readonly path: string;\n readonly baseUrl?: string | URL;\n readonly query?: PutioQuery;\n readonly headers?: HeadersInit;\n readonly auth?: PutioAuth;\n readonly body?: PutioRequestBody;\n}\n\nconst isSuccessStatus = (status: number) => status >= 200 && status < 300;\n\nconst decodeSuccessJson = <S extends Schema.Top>(schema: S, response: PutioHttpResponse) =>\n response.json.pipe(\n Effect.flatMap((json) =>\n Schema.decodeUnknownEffect(schema)(json).pipe(\n Effect.mapError(mapDecodeErrorToValidationError),\n ),\n ),\n );\n\nconst decodeFailure = (response: PutioHttpResponse, headers: Headers) =>\n response.json.pipe(\n Effect.flatMap((json) => parseErrorBody(response.status, json)),\n Effect.map((body) => makeResponseError(response.status, headers, body)),\n );\n\nconst toBasicAuthorization = (username: string, password: string) => {\n if (typeof globalThis.btoa === \"function\") {\n return `Basic ${globalThis.btoa(`${username}:${password}`)}`;\n }\n\n throw mapConfigurationError(\n \"This runtime does not provide btoa(), so Basic auth cannot be encoded safely\",\n );\n};\n\nconst resolveAuthorization = (\n config: PutioSdkConfigShape,\n auth: PutioAuth | undefined,\n): Effect.Effect<string | undefined, PutioSdkError> => {\n const resolvedAuth = auth ?? { type: \"config-token\" as const };\n\n switch (resolvedAuth.type) {\n case \"none\":\n return Effect.succeed(undefined);\n case \"token\":\n return Effect.succeed(`Token ${resolvedAuth.token}`);\n case \"basic\":\n return Effect.try({\n try: () => toBasicAuthorization(resolvedAuth.username, resolvedAuth.password),\n catch: mapConfigurationError,\n });\n case \"config-token\":\n if (!config.accessToken) {\n return Effect.fail(\n mapConfigurationError(\n \"This endpoint requires an access token, but PutioSdkConfig.accessToken is missing\",\n ),\n );\n }\n\n return Effect.succeed(`Token ${config.accessToken}`);\n }\n};\n\nconst normalizeFormValue = (value: unknown): string => {\n if (value === null || value === undefined) {\n return \"\";\n }\n\n if (typeof value === \"string\") {\n return value;\n }\n\n if (typeof value === \"number\" || typeof value === \"boolean\") {\n return String(value);\n }\n\n return JSON.stringify(value);\n};\n\nconst withBody = (body: PutioRequestBody): Effect.Effect<BodyInit | undefined, PutioSdkError> => {\n switch (body.type) {\n case \"none\":\n return Effect.succeed(undefined);\n case \"json\":\n return Effect.try({\n try: () => JSON.stringify(body.value),\n catch: mapDecodeErrorToValidationError,\n });\n case \"form\":\n return Effect.succeed(\n new URLSearchParams(\n Object.entries(body.value).flatMap(([key, value]) =>\n value === undefined ? [] : [[key, normalizeFormValue(value)]],\n ),\n ),\n );\n case \"form-data\":\n return Effect.succeed(body.value);\n }\n};\n\nconst makeRequest = (url: string, options: PutioRequestOptions, authorization?: string) =>\n Effect.gen(function* () {\n const headers = new Headers(options.headers);\n\n const body = options.body ?? { type: \"none\" as const };\n if (!headers.has(\"accept\")) {\n headers.set(\"accept\", \"application/json\");\n }\n\n if (authorization) {\n headers.set(\"authorization\", authorization);\n }\n\n if (body.type === \"json\" && !headers.has(\"content-type\")) {\n headers.set(\"content-type\", \"application/json\");\n }\n\n return {\n body: yield* withBody(body),\n headers,\n method: options.method,\n url,\n };\n });\n\nconst executeRequest = (options: PutioRequestOptions) =>\n Effect.gen(function* () {\n const config = yield* PutioSdkConfig;\n const httpClient = yield* PutioHttpClient;\n const authorization = yield* resolveAuthorization(config, options.auth);\n const url = yield* Effect.try({\n try: () =>\n buildPutioUrl(\n options.baseUrl ?? config.baseUrl ?? DEFAULT_PUTIO_API_BASE_URL,\n options.path,\n options.query,\n ),\n catch: mapUrlBuildError,\n });\n const request = yield* makeRequest(url, options, authorization);\n\n return yield* httpClient.execute(request);\n });\n\nexport const requestJson = <S extends Schema.Top>(\n schema: S,\n options: PutioRequestOptions,\n): Effect.Effect<S[\"Type\"], PutioSdkError, PutioSdkContext | S[\"DecodingServices\"]> =>\n executeRequest(options).pipe(\n Effect.flatMap((response) =>\n isSuccessStatus(response.status)\n ? decodeSuccessJson(schema, response)\n : decodeFailure(response, response.headers).pipe(Effect.flatMap(Effect.fail)),\n ),\n );\n\nexport const selectJsonField =\n <K extends string>(field: K) =>\n <A extends { readonly [P in K]: unknown }, E, R>(\n effect: Effect.Effect<A, E, R>,\n ): Effect.Effect<A[K], E, R> =>\n effect.pipe(Effect.map((value) => value[field]));\n\nexport const selectJsonFields =\n <const K extends readonly string[]>(...fields: K) =>\n <A extends { readonly [P in K[number]]: unknown }, E, R>(\n effect: Effect.Effect<A, E, R>,\n ): Effect.Effect<Pick<A, K[number]>, E, R> =>\n effect.pipe(\n Effect.map(\n (value) =>\n Object.fromEntries(fields.map((field) => [field, value[field as K[number]]])) as Pick<\n A,\n K[number]\n >,\n ),\n );\n\nexport const requestArrayBuffer = (\n options: PutioRequestOptions,\n): Effect.Effect<Uint8Array, PutioSdkError, PutioSdkContext> =>\n executeRequest(options).pipe(\n Effect.flatMap((response) =>\n isSuccessStatus(response.status)\n ? response.arrayBuffer.pipe(Effect.map((buffer) => new Uint8Array(buffer)))\n : decodeFailure(response, response.headers).pipe(Effect.flatMap(Effect.fail)),\n ),\n );\n\nexport const requestText = (\n options: PutioRequestOptions,\n): Effect.Effect<string, PutioSdkError, PutioSdkContext> =>\n requestArrayBuffer(options).pipe(Effect.map((bytes) => new TextDecoder().decode(bytes)));\n\nexport const requestVoid = (\n options: PutioRequestOptions,\n): Effect.Effect<void, PutioSdkError, PutioSdkContext> =>\n executeRequest(options).pipe(\n Effect.flatMap((response) =>\n isSuccessStatus(response.status)\n ? Effect.void\n : decodeFailure(response, response.headers).pipe(Effect.flatMap(Effect.fail)),\n ),\n );\n","import { Effect, Schema } from \"effect\";\n\nimport { mapDecodeErrorToValidationError } from \"./errors.js\";\n\nexport const PositiveIntegerSchema = Schema.Int.check(Schema.isGreaterThan(0));\nexport const NonEmptyStringSchema = Schema.String.check(Schema.isMinLength(1));\n\nexport const decodeAndRun = <S extends Schema.Top, A, E, R>(\n schema: S,\n input: unknown,\n run: (decoded: S[\"Type\"]) => Effect.Effect<A, E, R>,\n) =>\n Schema.decodeUnknownEffect(schema, { onExcessProperty: \"error\" })(input).pipe(\n Effect.mapError(mapDecodeErrorToValidationError),\n Effect.flatMap(run),\n );\n\nexport const makeCursorSelectionSchema = <\n const TIdsField extends string,\n const TExcludeIdsField extends string,\n const TFields extends Schema.Struct.Fields,\n>(\n idsField: TIdsField,\n excludeIdsField: TExcludeIdsField,\n fields: TFields,\n) =>\n Schema.Struct({\n cursor: Schema.optional(NonEmptyStringSchema),\n [excludeIdsField]: Schema.optional(Schema.Array(PositiveIntegerSchema)),\n [idsField]: Schema.optional(Schema.Array(PositiveIntegerSchema).check(Schema.isMinLength(1))),\n ...fields,\n }).check(\n Schema.makeFilter((input) => input.cursor !== undefined || input[idsField] !== undefined, {\n expected: \"a non-empty cursor or file ID selection\",\n }),\n );\n","type CsvValue = string | number;\n\nexport interface CursorSelectionInput<TValue extends CsvValue = number> {\n readonly cursor?: string;\n readonly excludeIds?: ReadonlyArray<TValue>;\n readonly ids?: ReadonlyArray<TValue>;\n}\n\nexport const joinCsv = <TValue extends CsvValue>(\n values: ReadonlyArray<TValue> | undefined,\n): string | undefined => (values && values.length > 0 ? values.join(\",\") : undefined);\n\nexport const toCursorSelectionForm = <\n TValue extends CsvValue,\n const TIdsFieldName extends string = \"file_ids\",\n>(\n selection: CursorSelectionInput<TValue>,\n idsFieldName?: TIdsFieldName,\n): {\n readonly cursor?: string;\n readonly exclude_ids?: string;\n} & Record<TIdsFieldName, string | undefined> => {\n const resolvedIdsFieldName = (idsFieldName ?? \"file_ids\") as TIdsFieldName;\n\n return {\n cursor: selection.cursor,\n exclude_ids: joinCsv(selection.excludeIds),\n [resolvedIdsFieldName]: joinCsv(selection.ids),\n } as {\n readonly cursor?: string;\n readonly exclude_ids?: string;\n } & Record<TIdsFieldName, string | undefined>;\n};\n"],"mappings":";;AAEA,MAAa,2BAA2B,OAAO,OAAO;CACpD,QAAQ,OAAO,SAAS,OAAO,MAAM;CACrC,OAAO,OAAO,SAAS,OAAO,MAAM;CACpC,eAAe,OAAO,SAAS,OAAO,MAAM;CAC5C,YAAY,OAAO,SAAS,OAAO,MAAM;CACzC,WAAW,OAAO,SAAS,OAAO,MAAM;CACxC,UAAU,OAAO,SAAS,OAAO,OAAO,OAAO,MAAM,CAAC;CACtD,OAAO,OAAO,SAAS,OAAO,OAAO,OAAO,QAAQ,OAAO,OAAO,CAAC;CACnE,aAAa,OAAO,SAAS,OAAO,GAAG;CACvC,SAAS,OAAO,SAAS,OAAO,OAAO;AACzC,CAAC;AAqFD,MAAM,wBACJ,UACA,UACqE;CACrE,IAAI,SAAS,eAAe,KAAA,KAAa,CAAC,OAAO,GAAG,SAAS,UAAU,CAAC,CAAC,MAAM,IAAI,GACjF,OAAO;CAGT,IAAI,SAAS,cAAc,KAAA,GAAW;EACpC,I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|
};
|
|
2548
2548
|
type FileDirectAccessOptions = {
|
|
2549
|
-
|
|
2549
|
+
/** The account download token from `getAccountInfo({ download_token: 1 })`, not the OAuth token. */
|
|
2550
|
+
readonly downloadToken: string;
|
|
2550
2551
|
readonly useTunnel?: boolean;
|
|
2551
2552
|
};
|
|
2552
2553
|
type FileApiDownloadUrlOptions = FileDirectAccessOptions & {
|
|
@@ -2559,12 +2560,14 @@ type FileApiMp4DownloadUrlOptions = FileDirectAccessOptions & {
|
|
|
2559
2560
|
type FileHlsMasterPlaylistOptions = Schema.Schema.Type<typeof FileHlsMasterPlaylistOptionsSchema>;
|
|
2560
2561
|
type FileHlsStreamUrlOptions = {
|
|
2561
2562
|
readonly maxSubtitleCount?: number;
|
|
2562
|
-
|
|
2563
|
+
/** The account download token from `getAccountInfo({ download_token: 1 })`, not the OAuth token. */
|
|
2564
|
+
readonly downloadToken: string;
|
|
2563
2565
|
readonly playOriginal?: boolean;
|
|
2564
2566
|
readonly subtitleLanguages?: ReadonlyArray<string>;
|
|
2565
2567
|
};
|
|
2566
2568
|
type FileXspfPlaylistUrlOptions = {
|
|
2567
|
-
|
|
2569
|
+
/** The account download token from `getAccountInfo({ download_token: 1 })`, not the OAuth token. */
|
|
2570
|
+
readonly downloadToken: string;
|
|
2568
2571
|
};
|
|
2569
2572
|
type FileUploadInput = {
|
|
2570
2573
|
readonly file: Blob;
|
|
@@ -2832,11 +2835,11 @@ type FileMp4MutationError = PutioOperationFailure<typeof FileMp4MutationErrorSpe
|
|
|
2832
2835
|
type FileExtractionsError = PutioOperationFailure<typeof FileExtractionsErrorSpec>;
|
|
2833
2836
|
type FileWatchStatusError = PutioOperationFailure<typeof FileWatchStatusErrorSpec>;
|
|
2834
2837
|
type FileUploadError = PutioOperationFailure<typeof FileUploadErrorSpec>;
|
|
2835
|
-
declare const buildFileApiDownloadUrl: (baseUrl: string | URL, fileId: number, options
|
|
2836
|
-
declare const buildFileApiContentUrl: (baseUrl: string | URL, fileId: number, options
|
|
2837
|
-
declare const buildFileApiMp4DownloadUrl: (baseUrl: string | URL, fileId: number, options
|
|
2838
|
-
declare const buildFileHlsStreamUrl: (baseUrl: string | URL, fileId: number, options
|
|
2839
|
-
declare const buildFileXspfPlaylistUrl: (baseUrl: string | URL, fileId: number, options
|
|
2838
|
+
declare const buildFileApiDownloadUrl: (baseUrl: string | URL, fileId: number, options: FileApiDownloadUrlOptions) => string;
|
|
2839
|
+
declare const buildFileApiContentUrl: (baseUrl: string | URL, fileId: number, options: FileDirectAccessOptions) => string;
|
|
2840
|
+
declare const buildFileApiMp4DownloadUrl: (baseUrl: string | URL, fileId: number, options: FileApiMp4DownloadUrlOptions) => string;
|
|
2841
|
+
declare const buildFileHlsStreamUrl: (baseUrl: string | URL, fileId: number, options: FileHlsStreamUrlOptions) => string;
|
|
2842
|
+
declare const buildFileXspfPlaylistUrl: (baseUrl: string | URL, fileId: number, options: FileXspfPlaylistUrlOptions) => string;
|
|
2840
2843
|
declare const createFileUploadFormData: (input: FileUploadInput) => FormData;
|
|
2841
2844
|
declare const queryFiles: (parent: number | "friends", query?: FilesListQuery) => Effect.Effect<FileListResponse, QueryFilesError, PutioSdkContext>;
|
|
2842
2845
|
declare const continueFiles: (cursor: string, query?: {
|
|
@@ -2882,10 +2885,10 @@ declare const moveFiles: (ids: ReadonlyArray<number>, parentId: number) => Effec
|
|
|
2882
2885
|
declare const moveFileSelection: (selection: FilesBulkSelection, parentId: number) => Effect.Effect<ReadonlyArray<FilesMoveError>, PutioSdkError, PutioSdkContext>;
|
|
2883
2886
|
declare const getStartFrom: (fileId: number) => Effect.Effect<number, StartFromError, PutioSdkContext>;
|
|
2884
2887
|
declare const getDownloadUrl: (fileId: number) => Effect.Effect<string, DownloadUrlError, PutioSdkContext>;
|
|
2885
|
-
declare const getApiDownloadUrl: (fileId: number, options
|
|
2886
|
-
declare const getApiContentUrl: (fileId: number, options
|
|
2887
|
-
declare const getApiMp4DownloadUrl: (fileId: number, options
|
|
2888
|
-
declare const getHlsStreamUrl: (fileId: number, options
|
|
2888
|
+
declare const getApiDownloadUrl: (fileId: number, options: FileApiDownloadUrlOptions) => Effect.Effect<string, PutioSdkError, PutioSdkConfig>;
|
|
2889
|
+
declare const getApiContentUrl: (fileId: number, options: FileDirectAccessOptions) => Effect.Effect<string, PutioSdkError, PutioSdkConfig>;
|
|
2890
|
+
declare const getApiMp4DownloadUrl: (fileId: number, options: FileApiMp4DownloadUrlOptions) => Effect.Effect<string, PutioSdkError, PutioSdkConfig>;
|
|
2891
|
+
declare const getHlsStreamUrl: (fileId: number, options: FileHlsStreamUrlOptions) => Effect.Effect<string, PutioSdkError, PutioSdkConfig>;
|
|
2889
2892
|
/**
|
|
2890
2893
|
* Fetches the HLS master playlist the player would load, so callers can
|
|
2891
2894
|
* inspect the served variant's CODECS, VIDEO-RANGE, and rendition set without
|
|
@@ -2893,7 +2896,7 @@ declare const getHlsStreamUrl: (fileId: number, options?: FileHlsStreamUrlOption
|
|
|
2893
2896
|
* the MP4 conversion.
|
|
2894
2897
|
*/
|
|
2895
2898
|
declare const getHlsMasterPlaylist: (fileId: number, options?: FileHlsMasterPlaylistOptions) => Effect.Effect<string, GetHlsMasterPlaylistError | PutioValidationError, PutioSdkContext>;
|
|
2896
|
-
declare const getXspfPlaylistUrl: (fileId: number, options
|
|
2899
|
+
declare const getXspfPlaylistUrl: (fileId: number, options: FileXspfPlaylistUrlOptions) => Effect.Effect<string, PutioSdkError, PutioSdkConfig>;
|
|
2897
2900
|
declare const listFileSubtitles: (fileId: number, options?: {
|
|
2898
2901
|
readonly languages?: ReadonlyArray<string>;
|
|
2899
2902
|
}) => Effect.Effect<{
|
|
@@ -9452,17 +9455,17 @@ declare const createPutioSdkPromiseClient: (initialConfig?: PutioSdkConfigShape)
|
|
|
9452
9455
|
readonly name: string;
|
|
9453
9456
|
readonly parent_id: number | null;
|
|
9454
9457
|
}>;
|
|
9455
|
-
getApiContentUrl: (fileId: number, options
|
|
9456
|
-
getApiDownloadUrl: (fileId: number, options
|
|
9457
|
-
getApiMp4DownloadUrl: (fileId: number, options
|
|
9458
|
+
getApiContentUrl: (fileId: number, options: FileDirectAccessOptions) => Promise<string>;
|
|
9459
|
+
getApiDownloadUrl: (fileId: number, options: FileApiDownloadUrlOptions) => Promise<string>;
|
|
9460
|
+
getApiMp4DownloadUrl: (fileId: number, options: FileApiMp4DownloadUrlOptions) => Promise<string>;
|
|
9458
9461
|
getDownloadUrl: (fileId: number) => Promise<string>;
|
|
9459
9462
|
getHlsMasterPlaylist: (fileId: number, options?: {
|
|
9460
9463
|
readonly maxSubtitleCount?: number | undefined;
|
|
9461
9464
|
readonly playOriginal?: boolean | undefined;
|
|
9462
9465
|
readonly subtitleLanguages?: readonly string[] | undefined;
|
|
9463
9466
|
} | undefined) => Promise<string>;
|
|
9464
|
-
getHlsStreamUrl: (fileId: number, options
|
|
9465
|
-
getXspfPlaylistUrl: (fileId: number, options
|
|
9467
|
+
getHlsStreamUrl: (fileId: number, options: FileHlsStreamUrlOptions) => Promise<string>;
|
|
9468
|
+
getXspfPlaylistUrl: (fileId: number, options: FileXspfPlaylistUrlOptions) => Promise<string>;
|
|
9466
9469
|
getMp4Status: (fileId: number) => Promise<{
|
|
9467
9470
|
readonly id: number;
|
|
9468
9471
|
readonly status: "NOT_AVAILABLE";
|
|
@@ -9841,12 +9844,6 @@ declare const DEFAULT_PUTIO_UPLOAD_BASE_URL = "https://upload.put.io";
|
|
|
9841
9844
|
declare const DEFAULT_PUTIO_WEB_APP_URL = "https://app.put.io";
|
|
9842
9845
|
//#endregion
|
|
9843
9846
|
//#region src/index.d.ts
|
|
9844
|
-
declare module "effect/SchemaAST" {
|
|
9845
|
-
interface Sentinel {
|
|
9846
|
-
readonly key: PropertyKey;
|
|
9847
|
-
readonly literal: LiteralValue | symbol;
|
|
9848
|
-
}
|
|
9849
|
-
}
|
|
9850
9847
|
declare global {
|
|
9851
9848
|
interface SymbolConstructor {
|
|
9852
9849
|
readonly asyncDispose: unique symbol;
|
|
@@ -9862,4 +9859,4 @@ declare global {
|
|
|
9862
9859
|
}
|
|
9863
9860
|
//#endregion
|
|
9864
9861
|
export { Transfer as $, denyFriendRequest as $a, listFileSubtitles as $c, generateTOTP as $d, queryOAuthApps as $f, RedeemPaymentVoucherError as $i, HistoryFileSharedEvent as $l, mapConfigurationError as $m, getSharingCloneInfo as $n, FileExtractionsErrorSpec as $o, listAccountSubtitleLanguages as $p, getPodcastLinks as $r, FolderType as $s, listTrash as $t, ForgotPasswordErrorSpec as $u, TunnelRoute as A, DenyFriendRequestErrorSpec as Aa, createFileUploadFormData as Ac, ResetPasswordErrorSpec as Ad, OAuthAppSession as Af, PaymentHistoryItemSchema as Ai, ListFamilyInvitesError as Al, PutioErrorEnvelope as Am, SharedFileSchema as An, FileActiveConversionSchema as Ao, AccountInfoBroad as Ap, RssFeedParams as Ar, FileTouchInput as As, reannounceTransfer as At, GetDownloadLinksError as Au, GetTransferErrorSpec as B, ListSentRequestsErrorSpec as Ba, getApiContentUrl as Bc, ValidateTokenResponseSchema as Bd, PopularOAuthAppSchema as Bf, PaymentPaddleWaitingPaymentInput as Bi, removeFamilyMember as Bl, PutioTransportError as Bm, SharingShareInput as Bn, FileBroadSchema as Bo, AccountWarnings as Bp, listRssFeeds as Br, FileUploadTransfer as Bs, ListTrashError as Bt, getConfigKey as Bu, ZipSummary as C, stopPaymentSubscription as Ca, canWriteFile as Cc, RegenerateRecoveryCodesError as Cd, GetOAuthAppErrorSpec as Cf, PaymentChangePlanPreview as Ci, FamilyInvite as Cl, requestVoid as Cm, PublicShare as Cn, CopyFileError as Co, AccountConfirmationSchema as Cp, RetryRssFeedItemError as Cr, FileSort as Cs, cleanTransfers as Ct, DownloadLinksCreateInputSchema as Cu, listZips as D, CountWaitingRequestsError as Da, convertFileToMp4 as Dc, RegisterInput as Dd, OAuthAppCreateInput as Df, PaymentChangePlanSubmitResponse as Di, FamilyMemberSchema as Dl, PutioApiError as Dm, ShareFilesError as Dn, DownloadUrlError as Do, AccountDiskSchema as Dp, RssFeedItemFailedSchema as Dr, FileSubtitleSchema as Ds, getTransferInfo as Dt, DownloadLinksPayloadSchema as Du, getZip as E, ApproveFriendRequestErrorSpec as Ea, convertFileSelectionToMp4 as Ec, RegisterErrorSpec as Ed, OAuthApp as Ef, PaymentChangePlanSubmitInput as Ei, FamilyMember as El, AnyPutioOperationError as Em, PublicShareSchema as En, CreateFolderErrorSpec as Eo, AccountDisk as Ep, RssFeedItem as Er, FileSubtitle as Es, getTransfer as Et, DownloadLinksPayload as Eu, AddTransferError as F, FriendSharedFolderError as Fa, deleteFileSelection as Fc, RevokeOAuthGrantError as Fd, OAuthSetIconInput as Ff, PaymentInvite as Fi, RemoveFamilyMemberErrorSpec as Fl, PutioOperationErrorFromSpec as Fm, SharingCloneInfo as Fn, FileBase as Fo, AccountSettings as Fp, clearRssFeedLogs as Fr, FileUploadError as Fs, ContinueTrashErrorSpec as Ft, JsonValueSchema as Fu, ReannounceTransferError as G, SearchFriendsError as Ga, getFileChild as Gc, VoucherLookupError as Gd, UpdateOAuthAppError as Gf, PaymentProviderNameSchema as Gi, EventsListQuery as Gl, definePutioOperationErrorSpec as Gm, UnshareFileErrorSpec as Gn, FileCore as Go, SaveAccountSettingsErrorSpec as Gp, updateRssFeed as Gr, FilesBulkSelection as Gs, TrashContinueResponse as Gt, writeConfig as Gu, GetTransferTorrentErrorSpec as H, ListWaitingRequestsErrorSpec as Ha, getApiMp4DownloadUrl as Hc, VerifyTOTPErrorSpec as Hd, QueryOAuthAppsErrorSpec as Hf, PaymentPlanGroupSchema as Hi, ClearEventsErrorSpec as Hl, PutioUnhandledSdkError as Hm, SharingUnshareInput as Hn, FileConversionStatusSchema as Ho, PasInfo as Hp, resumeRssFeed as Hr, FileWatchStatusError as Hs, RestoreTrashError as Ht, readConfig as Hu, AddTransferErrorSpec as I, FriendSharedFolderErrorSpec as Ia, deleteFiles as Ic, RevokeOAuthGrantErrorSpec as Id, OAuthSetIconInputSchema as If, PaymentInviteSchema as Ii, createFamilyInvite as Il, PutioOperationErrorSpec as Im, SharingCloneInfoSchema as In, FileBaseSchema as Io, AccountSettingsSchema as Ip, createRssFeed as Ir, FileUploadErrorSpec as Is, DeleteTrashError as It, PutioJsonObject as Iu, RemoveTransfersErrorSpec as J, SendFriendRequestErrorSpec as Ja, getMp4Status as Jc, checkCodeMatch as Jd, buildOAuthAuthorizeUrl as Jf, PaymentTypeSchema as Ji, GetEventTorrentError as Jl, isPutioAuthError as Jm, createPublicShare as Jn, FileExtraction as Jo, clearAccount as Jp, PodcastLinkType as Jr, FilesListQuerySchema as Js, TrashListQuery as Jt, ClientsError as Ju, ReannounceTransferErrorSpec as K, SearchFriendsErrorSpec as Ka, getHlsMasterPlaylist as Kc, VoucherLookupErrorSpec as Kd, UpdateOAuthAppErrorSpec as Kf, PaymentProviderSchema as Ki, EventsListQuerySchema as Kl, fallbackPutioErrorEnvelope as Km, cloneSharedFiles as Kn, FileCreateFolderInput as Ko, SaveAccountSettingsPayload as Kp, PodcastGetLinksInput as Kr, FilesListEnvelopeSchema as Ks, TrashFile as Kt, AuthGetCodeInput as Ku, AddTransferTrackersError as L, ListFriendsError as La, extractFiles as Lc, TwoFactorRecoveryCodes as Ld, OwnedOAuthApp as Lf, PaymentOption as Li, joinFamily as Ll, PutioOperationFailure as Lm, SharingCloneInput as Ln, FileBreadcrumb as Lo, AccountSubtitleLanguage as Lp, deleteRssFeed as Lr, FileUploadInput as Ls, DeleteTrashErrorSpec as Lt, PutioJsonPrimitive as Lu, listTunnelRoutes as M, FriendBase as Ma, createFolder as Mc, RevokeAllOAuthClientsErrorSpec as Md, OAuthAppUpdateInput as Mf, PaymentInfo as Mi, ListFamilyMembersError as Ml, PutioKnownErrorContract as Mm, SharedFileShareSchema as Mn, FileActiveConversionsErrorSpec as Mo, AccountInfoQuery as Mp, RssFeedSchema as Mr, FileType as Ms, retryTransfer as Mt, createDownloadLinks as Mu, AddManyTransfersError as N, FriendBaseSchema as Na, deleteFileExtraction as Nc, RevokeOAuthClientError as Nd, OAuthAppUpdateInputSchema as Nf, PaymentInfoPlanSchema as Ni, ListFamilyMembersErrorSpec as Nl, PutioKnownOperationErrorContract as Nm, SharedFileSharedWith as Nn, FileApiDownloadUrlOptions as No, AccountInfoQuerySchema as Np, UpdateRssFeedError as Nr, FileTypeSchema as Ns, stopTransferRecording as Nt, getDownloadLinks as Nu, ListTunnelRoutesError as O, CountWaitingRequestsErrorSpec as Oa, convertFilesToMp4 as Oc, RegisterInputSchema as Od, OAuthAppCreateInputSchema as Of, PaymentChangePlanSubmitSchema as Oi, JoinFamilyError as Ol, PutioAuthError as Om, ShareFilesErrorSpec as On, DownloadUrlErrorSpec as Oo, AccountInfoBase as Op, RssFeedItemSchema as Or, FileSubtitlesError as Os, getTransferTorrent as Ot, DownloadLinksStatus as Ou, AddManyTransfersErrorSpec as P, FriendSchema as Pa, deleteFileMp4 as Pc, RevokeOAuthClientErrorSpec as Pd, OAuthAppWithTokenSchema as Pf, PaymentInfoSchema as Pi, RemoveFamilyMemberError as Pl, PutioOperationError as Pm, SharedFileSharedWithSchema as Pn, FileApiMp4DownloadUrlOptions as Po, AccountInfoResponseFor as Pp, UpdateRssFeedErrorSpec as Pr, FileUploadEnvelope as Ps, ContinueTrashError as Pt, JsonObjectSchema as Pu, StopRecordingTransferErrorSpec as Q, countWaitingRequests as Qa, listFileExtractions as Qc, forgotPassword as Qd, getPopularOAuthApps as Qf, PreviewPaymentChangePlanErrorSpec as Qi, HistoryFileFromRssDeletedEventSchema as Ql, makeResponseError as Qm, getSharedWith as Qn, FileExtractionsError as Qo, listAccountConfirmations as Qp, PodcastLinksSchema as Qr, FilesSearchQuerySchema as Qs, emptyTrash as Qt, ForgotPasswordError as Qu, AddTransferTrackersErrorSpec as R, ListFriendsErrorSpec as Ra, findNextFile as Rc, TwoFactorRecoveryCodesSchema as Rd, OwnedOAuthAppSchema as Rf, PaymentOptionPlanTypeSchema as Ri, listFamilyInvites as Rl, PutioRateLimitError as Rm, SharingCloneInputSchema as Rn, FileBreadcrumbSchema as Ro, AccountSubtitleLanguageSchema as Rp, getRssFeed as Rr, FileUploadRequestDescriptor as Rs, EmptyTrashError as Rt, PutioJsonValue as Ru, ZipStatusSchema as S, reportPayments as Sa, buildFileXspfPlaylistUrl as Sc, RecoveryCodesErrorSpec as Sd, GetOAuthAppError as Sf, ListPaymentPlansErrorSpec as Si, CreateFamilyInviteErrorSpec as Sl, requestText as Sm, ListSharedFilesErrorSpec as Sn, ContinueFilesErrorSpec as So, AccountConfirmation as Sp, RetryAllRssFeedItemsErrorSpec as Sr, FileSetSortInputSchema as Ss, cancelTransfers as St, DownloadLinksCreateInput as Su, createZip as T, ApproveFriendRequestError as Ta, continueSearch as Tc, RegisterError as Td, MyOAuthAppSchema as Tf, PaymentChangePlanPreviewSchema as Ti, FamilyInvitesResponse as Tl, selectJsonFields as Tm, PublicShareListQuerySchema as Tn, CreateFolderError as To, AccountConfirmationsErrorSpec as Tp, RssFeed as Tr, FileStartFromSetInput as Ts, countTransfers as Tt, DownloadLinksInfoSchema as Tu, ListTransfersError as U, RemoveFriendError as Ua, getDownloadUrl as Uc, VerifyTOTPResponse as Ud, RegenerateOAuthAppTokenError as Uf, PaymentPlanTypeSchema as Ui, DeleteEventError as Ul, PutioValidationError as Um, SharingUnshareInputSchema as Un, FileCopyInput as Uo, PasInfoSchema as Up, retryAllRssFeedItems as Ur, FileWatchStatusErrorSpec as Us, RestoreTrashErrorSpec as Ut, readConfigWith as Uu, GetTransferTorrentError as V, ListWaitingRequestsError as Va, getApiDownloadUrl as Vc, VerifyTOTPError as Vd, QueryOAuthAppsError as Vf, PaymentPlanGroup as Vi, ClearEventsError as Vl, PutioTypedErrorEnvelope as Vm, SharingShareInputSchema as Vn, FileConversionStatus as Vo, AccountWarningsSchema as Vp, pauseRssFeed as Vr, FileVideoMetadata as Vs, ListTrashErrorSpec as Vt, getConfigKeyWith as Vu, ListTransfersErrorSpec as W, RemoveFriendErrorSpec as Wa, getFile as Wc, VerifyTOTPResponseSchema as Wd, RegenerateOAuthAppTokenErrorSpec as Wf, PaymentProvider as Wi, DeleteEventErrorSpec as Wl, decodePutioErrorEnvelope as Wm, UnshareFileError as Wn, FileCopyInputSchema as Wo, SaveAccountSettingsError as Wp, retryRssFeedItem as Wr, FileXspfPlaylistUrlOptions as Ws, TrashBulkInput as Wt, setConfigKey as Wu, RetryTransferErrorSpec as X, UserSearchResultSchema as Xa, getXspfPlaylistUrl as Xc, exchangeOAuthAuthorizationCode as Xd, deleteOAuthApp as Xf, PaymentVoucherInfoSchema as Xi, HistoryEvent as Xl, isPutioOperationError as Xm, getPublicShare as Xn, FileExtractionStatus as Xo, getAccountInfo as Xp, PodcastLinks as Xr, FilesMoveErrorSchema as Xs, continueTrash as Xt, FamilyInviteLookupError as Xu, RetryTransferError as Y, UserSearchResult as Ya, getStartFrom as Yc, clients as Yd, createOAuthApp as Yf, PaymentVoucherInfo as Yi, GetEventTorrentErrorSpec as Yl, isPutioErrorEnvelope as Ym, deletePublicShare as Yn, FileExtractionSchema as Yo, destroyAccount as Yp, PodcastLinkTypeSchema as Yr, FilesMoveError as Ys, TrashListResponse as Yt, ClientsErrorSpec as Yu, StopRecordingTransferError as Z, approveFriendRequest as Za, listActiveMp4Conversions as Zc, exists as Zd, getOAuthApp as Zf, PreviewPaymentChangePlanError as Zi, HistoryEventSchema as Zl, isPutioRateLimitError as Zm, getPublicShareFileUrl as Zn, FileExtractionStatusSchema as Zo, getAccountSettings as Zp, PodcastLinksResponse as Zr, FilesSearchQuery as Zs, deleteTrash as Zt, FamilyInviteLookupErrorSpec as Zu, GetZipErrorSpec as _, listPaymentInvites as _a, TouchFilesErrorSpec as _c, OAuthAuthorizationCodeExchangeError as _d, verifyTOTP as _f, ListPaymentInvitesError as _i, SendIftttEventError as _l, makePutioSdkConfig as _m, ListPublicShareFilesError as _n, createFriendInvite as _o, deleteAllAppSpecificPasswords as _p, PauseRssFeedError as _r, FileQuerySchema as _s, TransfersListQuerySchema as _t, deleteEvent as _u, PutioSdkEffectClient as a, SubmitPaymentChangePlanError as aa, GetHlsMasterPlaylistError as ac, GenerateTOTPResponseSchema as ad, getVoucher as af, CreatePaddleBillingUpdatePaymentMethodTransactionError as ai, resetFileSortSettings as al, PutioHttpRequest as am, CreateSharingCloneError as an, searchFriends as ao, CreateAppSpecificPasswordError as ap, ClearRssFeedLogsError as ar, FileListResponse as as, TransferInfoItem as at, HistoryTransferCallbackErrorEventSchema as au, ZipCreateResponse as b, previewPaymentChangePlan as ba, buildFileApiMp4DownloadUrl as bc, OAuthAuthorizationCodeExchangeInputSchema as bd, DeleteOAuthAppError as bf, ListPaymentOptionsErrorSpec as bi, sendIftttEvent as bl, requestArrayBuffer as bm, ListPublicSharesErrorSpec as bn, CanWriteFileErrorSpec as bo, AccountClearOptions as bp, ResumeRssFeedErrorSpec as br, FileSearchResponse as bs, addTransfer as bt, CreateDownloadLinksError as bu, createPutioSdkPromiseClient as c, classifyPaymentChangePlanResponse as ca, QueryFilesErrorSpec as cc, GrantsError as cd, login as cf, CreatePaddleWaitingPaymentErrorSpec as ci, setFileSort as cl, PutioQuery as cm, DeletePublicShareErrorSpec as cn, CreateFriendInviteErrorSpec as co, CreateAppSpecificPasswordInputSchema as cp, CreateRssFeedErrorSpec as cr, FileMediaInfoSchema as cs, TransferRemoveInputSchema as ct, HistoryTransferErrorEventSchema as cu, CancelZipError as d, createPaddleBillingUpdatePaymentMethodTransaction as da, SHARED_WITH_YOU_ROOT_ID as dc, LinkDeviceErrorSpec as dd, register as df, GetPaymentInfoError as di, touchFiles as dl, PutioSdkConfigShape as dm, GetPublicShareFileUrlError as dn, FriendInviteJoinedUserSchema as do, DeleteAllAppSpecificPasswordsErrorSpec as dp, GetRssFeedError as dr, FileMediaMetadataSchema as ds, TransferStatusSchema as dt, HistoryVoucherEventSchema as du, RedeemPaymentVoucherErrorSpec as ea, FolderTypeSchema as ec, FriendInviteLookupError as ed, getCode as ef, mapDecodeErrorToValidationError as eh, ClassifiedPaymentChangePlanSubmitResponse as ei, moveFileSelection as el, saveAccountSettings as em, restoreTrash as en, getFriendSharedFolder as eo, regenerateOAuthAppToken as ep, listPublicShareFiles as er, FileGetChildInput as es, TransferAddInput as et, HistoryFileSharedEventSchema as eu, CancelZipErrorSpec as f, createPaddleWaitingPayment as fa, SearchFilesError as fc, LoginError as fd, resetPassword as ff, GetPaymentInfoErrorSpec as fi, uploadFile as fl, PutioSdkContext as fm, GetPublicShareFileUrlErrorSpec as fn, FriendInviteJoinedUserStatus as fo, DeleteAppSpecificPasswordError as fp, GetRssFeedErrorSpec as fr, FileMp4Error as fs, TransferType as ft, HistoryZipCreatedEvent as fu, GetZipError as g, listPaymentHistory as ga, TouchFilesError as gc, LoginResponseSchema as gd, validateToken as gf, ListPaymentHistoryErrorSpec as gi, IftttEventType as gl, makePutioFetchLayer as gm, GetSharingCloneInfoErrorSpec as gn, ListFriendInvitesErrorSpec as go, createAppSpecificPassword as gp, ListRssFeedsErrorSpec as gr, FileQuery as gs, TransfersListQuery as gt, clearEvents as gu, CreateZipInput as h, getPaymentVoucherInfo as ha, StartFromErrorSpec as hc, LoginResponse as hd, revokeClient as hf, ListPaymentHistoryError as hi, IftttEventInput as hl, makePutioFetchClient as hm, GetSharingCloneInfoError as hn, ListFriendInvitesError as ho, ListAppSpecificPasswordsErrorSpec as hp, ListRssFeedsError as hr, FileMp4MutationErrorSpec as hs, TransfersContinueResponse as ht, ListEventsErrorSpec as hu, PutioSdk as i, StopSubscriptionErrorSpec as ia, GetFileErrorSpec as ic, GenerateTOTPResponse as id, getRecoveryCodes as if, withOperationErrors as ih, CreateOpenNodeChargeErrorSpec as ii, renameFile as il, PutioHttpClientShape as im, CreatePublicShareErrorSpec as in, removeFriend as io, AppSpecificPasswordSchema as ip, unshareFile as ir, FileListContinuationResponse as is, TransferBaseSchema as it, HistoryRssFilterPausedEventSchema as iu, TunnelRouteSchema as j, Friend as ja, createFileUploadRequest as jc, RevokeAllOAuthClientsError as jd, OAuthAppSessionSchema as jf, PaymentHistoryQuery as ji, ListFamilyInvitesErrorSpec as jl, PutioErrorEnvelopeSchema as jm, SharedFileShare as jn, FileActiveConversionsError as jo, AccountInfoBroadSchema as jp, RssFeedParamsSchema as jr, FileTouchInputSchema as js, removeTransfers as jt, GetDownloadLinksErrorSpec as ju, ListTunnelRoutesErrorSpec as k, DenyFriendRequestError as ka, copyFile as kc, ResetPasswordError as kd, OAuthAppSchema as kf, PaymentHistoryItem as ki, JoinFamilyErrorSpec as kl, PutioConfigurationError as km, SharedFile as kn, FileActiveConversion as ko, AccountInfoBaseSchema as kp, RssFeedItemSucceededSchema as kr, FileSubtitlesErrorSpec as ks, listTransfers as kt, DownloadLinksStatusSchema as ku, makePutioSdkEffectClientLayer as l, confirmFastspringOrder as la, RenameFileError as lc, GrantsErrorSpec as ld, logout as lf, GetPaddleBillingInvoiceUrlError as li, setFilesWatchStatus as ll, PutioQueryValue as lm, GetPublicShareError as ln, FriendInvite as lo, CreateAppSpecificPasswordResult as lp, DeleteRssFeedError as lr, FileMediaInfoStreamSchema as ls, TransferSchema as lt, HistoryTransferFromRssErrorEventSchema as lu, CreateZipErrorSpec as m, getPaymentInfo as ma, StartFromError as mc, LoginInput as md, revokeApp as mf, GetPaymentVoucherInfoErrorSpec as mi, GetIftttStatusErrorSpec as ml, encodePathSegment as mm, GetSharedWithErrorSpec as mn, FriendInviteSchema as mo, ListAppSpecificPasswordsError as mp, ListRssFeedItemsErrorSpec as mr, FileMp4MutationError as ms, TransfersAddMultiError as mt, ListEventsError as mu, DEFAULT_PUTIO_UPLOAD_BASE_URL as n, ReportPaymentsErrorSpec as na, GetFileChildErrorSpec as nc, GenerateTOTPError as nd, getFriendInvite as nf, parseErrorBody as nh, ConfirmFastspringOrderErrorSpec as ni, putMp4ToMyFiles as nl, PutioAuth as nm, ContinuePublicShareFilesErrorSpec as nn, listSentRequests as no, updateOAuthApp as np, listSharedFiles as nr, FileHlsMasterPlaylistOptions as ns, TransferAddTrackersInput as nt, HistoryKnownEventTypeSchema as nu, PutioSdkPromiseClient as o, SubmitPaymentChangePlanErrorSpec as oa, GetHlsMasterPlaylistErrorSpec as oc, GiftCardLookupError as od, grants as of, CreatePaddleBillingUpdatePaymentMethodTransactionErrorSpec as oi, resetStartFrom as ol, PutioHttpResponse as om, CreateSharingCloneErrorSpec as on, sendFriendRequest as oo, CreateAppSpecificPasswordErrorSpec as op, ClearRssFeedLogsErrorSpec as or, FileMediaInfo as os, TransferLink as ot, HistoryTransferCompletedEvent as ou, CreateZipError as p, getPaddleBillingInvoiceUrl as pa, SearchFilesErrorSpec as pc, LoginErrorSpec as pd, revokeAllClients as pf, GetPaymentVoucherInfoError as pi, GetIftttStatusError as pl, buildPutioUrl as pm, GetSharedWithError as pn, FriendInviteJoinedUserStatusSchema as po, DeleteAppSpecificPasswordErrorSpec as pp, ListRssFeedItemsError as pr, FileMp4ErrorSpec as ps, TransferTypeSchema as pt, HistoryZipCreatedEventSchema as pu, RemoveTransfersError as q, SendFriendRequestError as qa, getHlsStreamUrl as qc, buildAuthLoginUrl as qd, buildOAuthAppIconUrl as qf, PaymentSubscriptionInfoSchema as qi, EventsListResponse as ql, isPutioApiError as qm, continuePublicShareFiles as qn, FileDirectAccessOptions as qo, SaveAccountSettingsPayloadSchema as qp, PodcastGetLinksInputSchema as qr, FilesListQuery as qs, TrashFileSchema as qt, AuthorizationCodeSchema as qu, DEFAULT_PUTIO_WEB_APP_URL as r, StopSubscriptionError as ra, GetFileError as rc, GenerateTOTPErrorSpec as rd, getGiftCard as rf, responseRateLimitHeaders as rh, CreateOpenNodeChargeError as ri, queryFiles as rl, PutioHttpClient as rm, CreatePublicShareError as rn, listWaitingRequests as ro, AppSpecificPassword as rp, shareFiles as rr, FileHlsStreamUrlOptions as rs, TransferAddTrackersInputSchema as rt, HistoryPrivateTorrentPinEventSchema as ru, createPutioSdkEffectClient as s, UserSubscriptionStatusSchema as sa, QueryFilesError as sc, GiftCardLookupErrorSpec as sd, linkDevice as sf, CreatePaddleWaitingPaymentError as si, searchFiles as sl, PutioPathSegment as sm, DeletePublicShareError as sn, CreateFriendInviteError as so, CreateAppSpecificPasswordInput as sp, CreateRssFeedError as sr, FileMediaInfoFormatSchema as ss, TransferRemoveInput as st, HistoryTransferCompletedEventSchema as su, DEFAULT_PUTIO_API_BASE_URL as t, ReportPaymentsError as ta, GetFileChildError as tc, FriendInviteLookupErrorSpec as td, getFamilyInvite as tf, mapTransportError as th, ConfirmFastspringOrderError as ti, moveFiles as tl, OkResponseSchema as tm, ContinuePublicShareFilesError as tn, listFriends as to, setOAuthAppIcon as tp, listPublicShares as tr, FileGetChildInputSchema as ts, TransferAddInputSchema as tt, HistoryKnownEventType as tu, makePutioSdkLiveClientLayer as u, createOpenNodeCharge as ua, RenameFileErrorSpec as uc, LinkDeviceError as ud, regenerateRecoveryCodes as uf, GetPaddleBillingInvoiceUrlErrorSpec as ui, setStartFrom as ul, PutioSdkConfig as um, GetPublicShareErrorSpec as un, FriendInviteJoinedUser as uo, DeleteAllAppSpecificPasswordsError as up, DeleteRssFeedErrorSpec as ur, FileMediaMetadata as us, TransferStatus as ut, HistoryUploadEventSchema as uu, ListZipsError as v, listPaymentOptions as va, buildFileApiContentUrl as vc, OAuthAuthorizationCodeExchangeErrorCodeSchema as vd, CreateOAuthAppError as vf, ListPaymentInvitesErrorSpec as vi, SendIftttEventErrorSpec as vl, makePutioSdkLayer as vm, ListPublicShareFilesErrorSpec as vn, listFriendInvites as vo, deleteAppSpecificPassword as vp, PauseRssFeedErrorSpec as vr, FileRenameInput as vs, TransfersListResponse as vt, getEventTorrent as vu, cancelZip as w, submitPaymentChangePlan as wa, continueFiles as wc, RegenerateRecoveryCodesErrorSpec as wd, MyOAuthApp as wf, PaymentChangePlanPreviewInput as wi, FamilyInviteSchema as wl, selectJsonField as wm, PublicShareListQuery as wn, CopyFileErrorSpec as wo, AccountConfirmationsError as wp, RetryRssFeedItemErrorSpec as wr, FileSortSchema as ws, continueTransfers as wt, DownloadLinksInfo as wu, ZipInfo as x, redeemPaymentVoucher as xa, buildFileHlsStreamUrl as xc, RecoveryCodesError as xd, DeleteOAuthAppErrorSpec as xf, ListPaymentPlansError as xi, CreateFamilyInviteError as xl, requestJson as xm, ListSharedFilesError as xn, ContinueFilesError as xo, AccountClearOptionsSchema as xp, RetryAllRssFeedItemsError as xr, FileSetSortInput as xs, addTransferTrackers as xt, CreateDownloadLinksErrorSpec as xu, ListZipsErrorSpec as y, listPaymentPlans as ya, buildFileApiDownloadUrl as yc, OAuthAuthorizationCodeExchangeInput as yd, CreateOAuthAppErrorSpec as yf, ListPaymentOptionsError as yi, getIftttStatus as yl, makePutioSdkLiveLayer as ym, ListPublicSharesError as yn, CanWriteFileError as yo, listAppSpecificPasswords as yp, ResumeRssFeedError as yr, FileResponseFor as ys, addManyTransfers as yt, listEvents as yu, GetTransferError as z, ListSentRequestsError as za, findNextVideo as zc, ValidateTokenResponse as zd, PopularOAuthApp as zf, PaymentOptionSchema as zi, listFamilyMembers as zl, PutioSdkError as zm, SharingCloneStatusSchema as zn, FileBroad as zo, AccountTwoFactorSettingsSchema as zp, listRssFeedItems as zr, FileUploadResult as zs, EmptyTrashErrorSpec as zt, deleteConfigKey as zu };
|
|
9865
|
-
//# sourceMappingURL=index-
|
|
9862
|
+
//# sourceMappingURL=index-BdlCuqLB.d.ts.map
|