@putdotio/sdk 15.1.0 → 16.0.1
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 +40 -4
- package/dist/{forms-CbYS70jk.js → forms-DQ34jmDg.js} +92 -56
- package/dist/forms-DQ34jmDg.js.map +1 -0
- package/dist/{index-BOD2bQhk.d.ts → index-Bsp5xXc1.d.ts} +12935 -8052
- package/dist/index.d.ts +2 -2
- package/dist/index.js +166 -160
- package/dist/index.js.map +1 -1
- package/dist/utilities.d.ts +3 -3
- package/dist/utilities.js +3 -3
- package/dist/utilities.js.map +1 -1
- package/package.json +5 -3
- package/dist/forms-CbYS70jk.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { Cause, Context, Effect, Exit, Layer, ManagedRuntime, Predicate, Schema, SchemaIssue, SchemaParser
|
|
1
|
+
import { $ as mapContractError, A as requireRequestedBreadcrumbs, B as decodePutioErrorEnvelope, C as NonEmptyStringSchema, D as decodeAndRun, E as cursorSelectionSchema, F as PutioErrorEnvelopeSchema, G as isPutioConfigurationError, H as fallbackPutioErrorEnvelope, I as PutioOperationError, J as isPutioOperationError, K as isPutioContractError, L as PutioRateLimitError, M as PutioAuthError, N as PutioConfigurationError, O as decodeAndRunRedacted, P as PutioContractError, Q as mapConfigurationError, R as PutioTransportError, S as DEFAULT_PUTIO_WEB_APP_URL, T as PositiveIntegerSchema, U as isPutioApiError, V as definePutioOperationErrorSpec, W as isPutioAuthError, X as isPutioTransportError, Y as isPutioRateLimitError, Z as isPutioValidationError, _ as selectJsonField, a as PutioSdkConfig, at as withOperationErrors, b as DEFAULT_PUTIO_API_BASE_URL, c as makePutioFetchClient, d as putioSdkLayer, et as mapTransportError, f as putioSdkLiveLayer, g as requestVoid, h as requestText, i as PutioHttpClient, it as toPutioResponseError, j as PutioApiError, k as failMissingField, l as makePutioFetchLayer, m as requestJson, n as toCursorSelectionForm, nt as parseErrorBody, o as buildPutioUrl, p as requestArrayBuffer, q as isPutioErrorEnvelope, r as OkResponseSchema, rt as responseRateLimitHeaders, s as encodePathSegment, t as joinCsv, tt as mapValidationError, u as normalizePutioSdkOptions, v as selectJsonFields, w as NonNegativeNumberSchema, x as DEFAULT_PUTIO_UPLOAD_BASE_URL, y as revealAccessToken, z as PutioValidationError } from "./forms-DQ34jmDg.js";
|
|
2
|
+
import { Cause, Context, Effect, Exit, Layer, ManagedRuntime, Predicate, Schema, SchemaIssue, SchemaParser } from "effect";
|
|
3
3
|
// src/domains/account.ts
|
|
4
4
|
const RequestedFlag$1 = Schema.Literal(1);
|
|
5
5
|
const AccountDiskSchema = Schema.Struct({
|
|
6
|
-
avail:
|
|
7
|
-
size:
|
|
8
|
-
used:
|
|
6
|
+
avail: NonNegativeNumberSchema,
|
|
7
|
+
size: NonNegativeNumberSchema,
|
|
8
|
+
used: NonNegativeNumberSchema
|
|
9
9
|
});
|
|
10
10
|
const AccountWarningsSchema = Schema.Struct({
|
|
11
11
|
callback_url_has_failed: Schema.optional(Schema.Boolean),
|
|
@@ -64,11 +64,11 @@ const AccountInfoBaseSchema = Schema.Struct({
|
|
|
64
64
|
is_eligible_for_friend_invitation: Schema.Boolean,
|
|
65
65
|
is_sub_account: Schema.Boolean,
|
|
66
66
|
mail: Schema.String,
|
|
67
|
-
monthly_bandwidth_usage:
|
|
67
|
+
monthly_bandwidth_usage: NonNegativeNumberSchema,
|
|
68
68
|
password_last_changed_at: Schema.NullOr(Schema.String),
|
|
69
69
|
private_download_host_ip: Schema.NullOr(Schema.String),
|
|
70
70
|
settings: AccountSettingsSchema,
|
|
71
|
-
trash_size:
|
|
71
|
+
trash_size: NonNegativeNumberSchema,
|
|
72
72
|
user_id: Schema.Int,
|
|
73
73
|
username: Schema.String,
|
|
74
74
|
warnings: AccountWarningsSchema
|
|
@@ -180,14 +180,13 @@ const AccountConfirmationsEnvelopeSchema = Schema.Struct({
|
|
|
180
180
|
confirmations: Schema.Array(AccountConfirmationSchema),
|
|
181
181
|
status: Schema.Literal("OK")
|
|
182
182
|
});
|
|
183
|
-
const failMissingField$1 = (field) => Effect.fail(new PutioValidationError({ cause: `Expected put.io to include "${field}" because it was requested` }));
|
|
184
183
|
const ensureAccountInfoFields = (effect, query) => Effect.gen(function* () {
|
|
185
184
|
const info = yield* effect;
|
|
186
|
-
if (query.download_token === 1 && info.download_token === void 0) return yield* failMissingField
|
|
187
|
-
if (query.features === 1 && info.features === void 0) return yield* failMissingField
|
|
188
|
-
if (query.pas === 1 && info.pas === void 0) return yield* failMissingField
|
|
189
|
-
if (query.profitwell === 1 && !("paddle_user_id" in info)) return yield* failMissingField
|
|
190
|
-
if (query.push_token === 1 && info.push_token === void 0) return yield* failMissingField
|
|
185
|
+
if (query.download_token === 1 && info.download_token === void 0) return yield* failMissingField("download_token");
|
|
186
|
+
if (query.features === 1 && info.features === void 0) return yield* failMissingField("features");
|
|
187
|
+
if (query.pas === 1 && info.pas === void 0) return yield* failMissingField("pas");
|
|
188
|
+
if (query.profitwell === 1 && !("paddle_user_id" in info)) return yield* failMissingField("paddle_user_id");
|
|
189
|
+
if (query.push_token === 1 && info.push_token === void 0) return yield* failMissingField("push_token");
|
|
191
190
|
return info;
|
|
192
191
|
});
|
|
193
192
|
const SaveAccountSettingsErrorSpec = definePutioOperationErrorSpec({
|
|
@@ -1301,14 +1300,12 @@ const makeConfigValueEnvelopeSchema = (schema) => Schema.declareConstructor()([s
|
|
|
1301
1300
|
}))));
|
|
1302
1301
|
const ConfigEnvelopeSchema = makeConfigEnvelopeSchema(JsonObjectResponseSchema);
|
|
1303
1302
|
const ConfigValueEnvelopeSchema = makeConfigValueEnvelopeSchema(JsonValueResponseSchema);
|
|
1303
|
+
const decodeWithCallerSchema = (schema) => (value) => Schema.decodeEffect(schema)(value).pipe(Effect.mapError(mapValidationError));
|
|
1304
1304
|
const readConfig = () => requestJson(ConfigEnvelopeSchema, {
|
|
1305
1305
|
method: "GET",
|
|
1306
1306
|
path: "/v2/config"
|
|
1307
1307
|
}).pipe(selectJsonField("config"));
|
|
1308
|
-
const readConfigWith = (schema) =>
|
|
1309
|
-
method: "GET",
|
|
1310
|
-
path: "/v2/config"
|
|
1311
|
-
}).pipe(Effect.map((envelope) => envelope["config"]));
|
|
1308
|
+
const readConfigWith = (schema) => readConfig().pipe(Effect.flatMap(decodeWithCallerSchema(schema)));
|
|
1312
1309
|
const writeConfig = (config) => decodeAndRun(JsonObjectSchema, config, (decodedConfig) => requestJson(OkResponseSchema, {
|
|
1313
1310
|
body: {
|
|
1314
1311
|
type: "json",
|
|
@@ -1321,10 +1318,7 @@ const getConfigKey = (key) => decodeAndRun(ConfigKeySchema, key, (decodedKey) =>
|
|
|
1321
1318
|
method: "GET",
|
|
1322
1319
|
path: `/v2/config/${encodePathSegment(decodedKey)}`
|
|
1323
1320
|
})).pipe(selectJsonField("value"));
|
|
1324
|
-
const getConfigKeyWith = (key, schema) =>
|
|
1325
|
-
method: "GET",
|
|
1326
|
-
path: `/v2/config/${encodePathSegment(decodedKey)}`
|
|
1327
|
-
})).pipe(Effect.map((envelope) => envelope["value"]));
|
|
1321
|
+
const getConfigKeyWith = (key, schema) => getConfigKey(key).pipe(Effect.flatMap(decodeWithCallerSchema(schema)));
|
|
1328
1322
|
const setConfigKey = (key, value) => decodeAndRun(ConfigSetKeyInputSchema, {
|
|
1329
1323
|
key,
|
|
1330
1324
|
value
|
|
@@ -1422,7 +1416,7 @@ const GetDownloadLinksErrorSpec = definePutioOperationErrorSpec({
|
|
|
1422
1416
|
{ statusCode: 404 }
|
|
1423
1417
|
]
|
|
1424
1418
|
});
|
|
1425
|
-
const createDownloadLinks = (input
|
|
1419
|
+
const createDownloadLinks = (input) => decodeAndRun(DownloadLinksCreateInputSchema, input, (decodedInput) => requestJson(DownloadLinksCreateEnvelopeSchema, {
|
|
1426
1420
|
body: {
|
|
1427
1421
|
type: "form",
|
|
1428
1422
|
value: toCursorSelectionForm(decodedInput)
|
|
@@ -1444,7 +1438,7 @@ const HistoryEventBaseSchema = Schema.Struct({
|
|
|
1444
1438
|
const HistoryFileEventSchema = HistoryEventBaseSchema.pipe(Schema.fieldsAssign({
|
|
1445
1439
|
file_id: Schema.Int,
|
|
1446
1440
|
file_name: Schema.String,
|
|
1447
|
-
file_size:
|
|
1441
|
+
file_size: NonNegativeNumberSchema
|
|
1448
1442
|
}));
|
|
1449
1443
|
const HistoryTransferEventSchema = HistoryEventBaseSchema.pipe(Schema.fieldsAssign({
|
|
1450
1444
|
source: Schema.String,
|
|
@@ -1461,7 +1455,7 @@ const HistoryFileFromRssDeletedEventSchema = HistoryFileEventSchema.mapFields(({
|
|
|
1461
1455
|
}));
|
|
1462
1456
|
const HistoryTransferCompletedEventSchema = HistoryTransferEventSchema.mapFields(({ type: _type, ...fields }) => fields).pipe(Schema.fieldsAssign({
|
|
1463
1457
|
file_id: Schema.Int,
|
|
1464
|
-
transfer_size:
|
|
1458
|
+
transfer_size: NonNegativeNumberSchema,
|
|
1465
1459
|
type: Schema.Literal("transfer_completed")
|
|
1466
1460
|
}));
|
|
1467
1461
|
const HistoryTransferErrorEventSchema = HistoryTransferEventSchema.mapFields(({ type: _type, ...fields }) => fields).pipe(Schema.fieldsAssign({ type: Schema.Literal("transfer_error") }));
|
|
@@ -1496,7 +1490,7 @@ const HistoryVoucherEventSchema = HistoryEventBaseSchema.mapFields(({ type: _typ
|
|
|
1496
1490
|
const HistoryZipCreatedEventSchema = HistoryEventBaseSchema.mapFields(({ type: _type, ...fields }) => fields).pipe(Schema.fieldsAssign({
|
|
1497
1491
|
type: Schema.Literal("zip_created"),
|
|
1498
1492
|
zip_id: Schema.Int,
|
|
1499
|
-
zip_size:
|
|
1493
|
+
zip_size: NonNegativeNumberSchema
|
|
1500
1494
|
}));
|
|
1501
1495
|
const HistoryKnownEventTypeSchema = Schema.Literals([
|
|
1502
1496
|
"file_shared",
|
|
@@ -1830,15 +1824,15 @@ const FileTouchInputSchema = Schema.Struct({
|
|
|
1830
1824
|
updatedAt: Schema.optional(Schema.Date)
|
|
1831
1825
|
});
|
|
1832
1826
|
const FileMediaMetadataSchema = Schema.Struct({
|
|
1833
|
-
aspect_ratio: Schema.optional(Schema.NullOr(
|
|
1827
|
+
aspect_ratio: Schema.optional(Schema.NullOr(NonNegativeNumberSchema)),
|
|
1834
1828
|
codec: Schema.optional(Schema.NullOr(Schema.String)),
|
|
1835
|
-
duration: Schema.optional(Schema.NullOr(
|
|
1829
|
+
duration: Schema.optional(Schema.NullOr(NonNegativeNumberSchema)),
|
|
1836
1830
|
height: Schema.optional(Schema.NullOr(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)))),
|
|
1837
1831
|
width: Schema.optional(Schema.NullOr(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))))
|
|
1838
1832
|
});
|
|
1839
1833
|
const FileMediaInfoFormatSchema = Schema.Struct({
|
|
1840
|
-
bit_rate: Schema.optional(
|
|
1841
|
-
duration: Schema.optional(
|
|
1834
|
+
bit_rate: Schema.optional(NonNegativeNumberSchema),
|
|
1835
|
+
duration: Schema.optional(NonNegativeNumberSchema),
|
|
1842
1836
|
name: Schema.optional(Schema.String)
|
|
1843
1837
|
});
|
|
1844
1838
|
const FileMediaInfoStreamSchema = Schema.Struct({
|
|
@@ -1875,15 +1869,15 @@ const FileBaseSchema = Schema.Struct({
|
|
|
1875
1869
|
parent_id: Schema.NullOr(Schema.Int),
|
|
1876
1870
|
screenshot: Schema.NullOr(Schema.String),
|
|
1877
1871
|
sha1: Schema.optional(Schema.NullOr(Schema.String)),
|
|
1878
|
-
size:
|
|
1879
|
-
start_from: Schema.optional(
|
|
1872
|
+
size: NonNegativeNumberSchema,
|
|
1873
|
+
start_from: Schema.optional(NonNegativeNumberSchema),
|
|
1880
1874
|
updated_at: Schema.String
|
|
1881
1875
|
});
|
|
1882
1876
|
const FileBroadSchema = FileBaseSchema.pipe(Schema.fieldsAssign({
|
|
1883
1877
|
content_type_and_codecs: Schema.optional(Schema.NullOr(Schema.String)),
|
|
1884
1878
|
media_info: Schema.optional(Schema.NullOr(FileMediaInfoSchema)),
|
|
1885
1879
|
media_metadata: Schema.optional(Schema.NullOr(FileMediaMetadataSchema)),
|
|
1886
|
-
mp4_size: Schema.optional(Schema.NullOr(
|
|
1880
|
+
mp4_size: Schema.optional(Schema.NullOr(NonNegativeNumberSchema)),
|
|
1887
1881
|
mp4_stream_url: Schema.optional(Schema.NullOr(Schema.String)),
|
|
1888
1882
|
need_convert: Schema.optional(Schema.Boolean),
|
|
1889
1883
|
sender_name: Schema.optional(Schema.String),
|
|
@@ -1978,10 +1972,10 @@ const FileRenameInputSchema = Schema.Struct({
|
|
|
1978
1972
|
});
|
|
1979
1973
|
const FileStartFromSetInputSchema = Schema.Struct({
|
|
1980
1974
|
file_id: PositiveFileIdSchema,
|
|
1981
|
-
time:
|
|
1975
|
+
time: NonNegativeNumberSchema
|
|
1982
1976
|
});
|
|
1983
1977
|
const FileStartFromEnvelopeSchema = Schema.Struct({
|
|
1984
|
-
start_from:
|
|
1978
|
+
start_from: NonNegativeNumberSchema,
|
|
1985
1979
|
status: Schema.Literal("OK")
|
|
1986
1980
|
});
|
|
1987
1981
|
const FileDownloadUrlEnvelopeSchema = Schema.Struct({
|
|
@@ -2007,18 +2001,18 @@ const FileConversionNotAvailableSchema = Schema.Struct({
|
|
|
2007
2001
|
});
|
|
2008
2002
|
const FileConversionInQueueSchema = Schema.Struct({
|
|
2009
2003
|
id: Schema.Int,
|
|
2010
|
-
percent_done: Schema.optional(
|
|
2004
|
+
percent_done: Schema.optional(NonNegativeNumberSchema),
|
|
2011
2005
|
status: Schema.Literal("IN_QUEUE")
|
|
2012
2006
|
});
|
|
2013
2007
|
const FileConversionConvertingSchema = Schema.Struct({
|
|
2014
2008
|
id: Schema.Int,
|
|
2015
|
-
percent_done:
|
|
2009
|
+
percent_done: NonNegativeNumberSchema,
|
|
2016
2010
|
status: Schema.Literal("CONVERTING")
|
|
2017
2011
|
});
|
|
2018
2012
|
const FileConversionCompletedSchema = Schema.Struct({
|
|
2019
2013
|
id: Schema.Int,
|
|
2020
|
-
percent_done:
|
|
2021
|
-
size:
|
|
2014
|
+
percent_done: NonNegativeNumberSchema,
|
|
2015
|
+
size: NonNegativeNumberSchema,
|
|
2022
2016
|
status: Schema.Literal("COMPLETED")
|
|
2023
2017
|
});
|
|
2024
2018
|
const FileConversionErrorSchema = Schema.Struct({
|
|
@@ -2098,11 +2092,7 @@ const FileExtractionsEnvelopeSchema = Schema.Struct({
|
|
|
2098
2092
|
extractions: Schema.Array(FileExtractionSchema),
|
|
2099
2093
|
status: Schema.optional(Schema.Literal("OK"))
|
|
2100
2094
|
});
|
|
2101
|
-
const FilesBulkSelectionSchema =
|
|
2102
|
-
cursor: Schema.optional(NonEmptyStringSchema),
|
|
2103
|
-
excludeIds: Schema.optional(Schema.Array(PositiveIntegerSchema)),
|
|
2104
|
-
ids: Schema.optional(Schema.Array(PositiveIntegerSchema).check(Schema.isMinLength(1)))
|
|
2105
|
-
}).check(Schema.makeFilter((input) => input.cursor !== void 0 || input.ids !== void 0, { expected: "a non-empty cursor or file ID selection" }));
|
|
2095
|
+
const FilesBulkSelectionSchema = cursorSelectionSchema({});
|
|
2106
2096
|
const FilesDeleteOptionsSchema = Schema.Struct({
|
|
2107
2097
|
ignoreFileOwner: Schema.optional(Schema.Boolean),
|
|
2108
2098
|
partialDelete: Schema.optional(Schema.Boolean),
|
|
@@ -2282,6 +2272,14 @@ const SearchFilesErrorSpec = definePutioOperationErrorSpec({
|
|
|
2282
2272
|
{ statusCode: 400 }
|
|
2283
2273
|
]
|
|
2284
2274
|
});
|
|
2275
|
+
const ContinueSearchErrorSpec = definePutioOperationErrorSpec({
|
|
2276
|
+
domain: "files",
|
|
2277
|
+
operation: "continueSearch",
|
|
2278
|
+
knownErrors: [{
|
|
2279
|
+
errorType: "invalid_scope",
|
|
2280
|
+
statusCode: 401
|
|
2281
|
+
}, { statusCode: 400 }]
|
|
2282
|
+
});
|
|
2285
2283
|
const CreateFolderErrorSpec = definePutioOperationErrorSpec({
|
|
2286
2284
|
domain: "files",
|
|
2287
2285
|
operation: "createFolder",
|
|
@@ -2460,7 +2458,6 @@ const FileUploadErrorSpec = definePutioOperationErrorSpec({
|
|
|
2460
2458
|
{ statusCode: 429 }
|
|
2461
2459
|
]
|
|
2462
2460
|
});
|
|
2463
|
-
const failMissingField = (field) => Effect.fail(new PutioValidationError({ cause: `Expected put.io to include "${field}" because it was requested` }));
|
|
2464
2461
|
const hasStreamUrl = (value) => "stream_url" in value;
|
|
2465
2462
|
const hasMp4StreamUrl = (value) => "mp4_stream_url" in value;
|
|
2466
2463
|
const hasMp4StreamUrlWhenAvailable = (value) => !value.is_mp4_available || hasMp4StreamUrl(value);
|
|
@@ -2472,15 +2469,15 @@ const hasMediaInfo = (value) => "media_info" in value;
|
|
|
2472
2469
|
const useTunnelToQuery = (useTunnel) => useTunnel === false ? { notunnel: 1 } : {};
|
|
2473
2470
|
const resolveRouteContext = (token) => Effect.gen(function* () {
|
|
2474
2471
|
const config = yield* PutioSdkConfig;
|
|
2475
|
-
const resolvedToken = token ?? config.accessToken;
|
|
2476
|
-
if (resolvedToken) return
|
|
2472
|
+
const resolvedToken = token ?? (yield* revealAccessToken(config.accessToken));
|
|
2473
|
+
if (resolvedToken === void 0) return yield* mapConfigurationError("This helper requires a token, but neither an override nor PutioSdkConfig.accessToken was provided");
|
|
2474
|
+
return {
|
|
2477
2475
|
config,
|
|
2478
2476
|
token: resolvedToken
|
|
2479
2477
|
};
|
|
2480
|
-
return yield* Effect.fail(mapConfigurationError("This helper requires a token, but neither an override nor PutioSdkConfig.accessToken was provided"));
|
|
2481
2478
|
});
|
|
2482
2479
|
const resolveApiBaseUrl = Effect.gen(function* () {
|
|
2483
|
-
return (yield* PutioSdkConfig).baseUrl
|
|
2480
|
+
return (yield* PutioSdkConfig).baseUrl;
|
|
2484
2481
|
});
|
|
2485
2482
|
const toOriginalFlag = (playOriginal) => playOriginal === void 0 ? void 0 : playOriginal ? 1 : 0;
|
|
2486
2483
|
const toUploadResult = (value) => {
|
|
@@ -2492,7 +2489,7 @@ const toUploadResult = (value) => {
|
|
|
2492
2489
|
transfer: value.transfer,
|
|
2493
2490
|
type: "transfer"
|
|
2494
2491
|
});
|
|
2495
|
-
return Effect.fail(new
|
|
2492
|
+
return Effect.fail(new PutioContractError({ cause: "Expected put.io upload response to contain either \"file\" or \"transfer\"" }));
|
|
2496
2493
|
};
|
|
2497
2494
|
const buildFileApiDownloadUrl = (baseUrl, fileId, options) => buildPutioUrl(baseUrl, options.name ? `/v2/files/${encodePathSegment(fileId)}/download/${encodePathSegment(options.name)}` : `/v2/files/${encodePathSegment(fileId)}/download`, {
|
|
2498
2495
|
...useTunnelToQuery(options.useTunnel),
|
|
@@ -2524,7 +2521,7 @@ const createFileUploadFormData = (input) => {
|
|
|
2524
2521
|
const ensureFileQueryFields = (effect, query) => Effect.gen(function* () {
|
|
2525
2522
|
const file = yield* effect;
|
|
2526
2523
|
if (query.stream_url === 1 && !hasStreamUrl(file)) return yield* failMissingField("stream_url");
|
|
2527
|
-
if ((query.mp4_status === 1 || query.mp4_stream_url === 1) && !hasMp4StatusFields(file)) return yield* failMissingField(
|
|
2524
|
+
if ((query.mp4_status === 1 || query.mp4_stream_url === 1) && !hasMp4StatusFields(file)) return yield* failMissingField("mp4_size" in file ? "need_convert" : "mp4_size");
|
|
2528
2525
|
if (query.mp4_stream_url === 1 && !hasMp4StreamUrlWhenAvailable(file)) return yield* failMissingField("mp4_stream_url");
|
|
2529
2526
|
if (query.video_metadata === 1 && query.media_metadata !== 1 && !hasVideoMetadata(file)) return yield* failMissingField("video_metadata");
|
|
2530
2527
|
if (query.media_metadata === 1 && !hasMediaMetadata(file)) return yield* failMissingField("media_metadata");
|
|
@@ -2532,17 +2529,19 @@ const ensureFileQueryFields = (effect, query) => Effect.gen(function* () {
|
|
|
2532
2529
|
if (query.media_info === 1 && !hasMediaInfo(file)) return yield* failMissingField("media_info");
|
|
2533
2530
|
return file;
|
|
2534
2531
|
});
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
}
|
|
2532
|
+
function queryFiles(parent, query = {}) {
|
|
2533
|
+
return decodeAndRun(FilesListInputSchema, {
|
|
2534
|
+
parent,
|
|
2535
|
+
query
|
|
2536
|
+
}, (decodedInput) => requestJson(FilesListEnvelopeSchema, {
|
|
2537
|
+
method: "GET",
|
|
2538
|
+
path: decodedInput.parent === "friends" ? "/v2/files/list/items-shared-with-you" : "/v2/files/list",
|
|
2539
|
+
query: decodedInput.parent === "friends" ? decodedInput.query : {
|
|
2540
|
+
...decodedInput.query,
|
|
2541
|
+
parent_id: decodedInput.parent
|
|
2542
|
+
}
|
|
2543
|
+
}).pipe(requireRequestedBreadcrumbs(decodedInput.query))).pipe(withOperationErrors(QueryFilesErrorSpec));
|
|
2544
|
+
}
|
|
2546
2545
|
const continueFiles = (cursor, query = {}) => decodeAndRun(FilesContinueInputSchema, {
|
|
2547
2546
|
cursor,
|
|
2548
2547
|
query
|
|
@@ -2621,7 +2620,7 @@ const continueSearch = (cursor, query = {}) => decodeAndRun(FilesContinueInputSc
|
|
|
2621
2620
|
method: "POST",
|
|
2622
2621
|
path: "/v2/files/search/continue",
|
|
2623
2622
|
query: decodedInput.query
|
|
2624
|
-
})).pipe(withOperationErrors(
|
|
2623
|
+
})).pipe(withOperationErrors(ContinueSearchErrorSpec));
|
|
2625
2624
|
const setFileSort = (input) => decodeAndRun(FileSetSortInputSchema, input, (decodedInput) => requestJson(OkResponseSchema, {
|
|
2626
2625
|
body: {
|
|
2627
2626
|
type: "form",
|
|
@@ -2901,14 +2900,14 @@ const createFileUploadRequest = (input, options = {}) => decodeAndRun(FileUpload
|
|
|
2901
2900
|
}, (decoded) => resolveRouteContext(decoded.options.oauthToken).pipe(Effect.map(({ config, token }) => ({
|
|
2902
2901
|
body: createFileUploadFormData(decoded.input),
|
|
2903
2902
|
method: "POST",
|
|
2904
|
-
url: buildPutioUrl(config.uploadBaseUrl
|
|
2903
|
+
url: buildPutioUrl(config.uploadBaseUrl, "/v2/files/upload", { oauth_token: token })
|
|
2905
2904
|
}))));
|
|
2906
2905
|
const uploadFile = (input, options = {}) => decodeAndRun(FileUploadCallInputSchema, {
|
|
2907
2906
|
input,
|
|
2908
2907
|
options
|
|
2909
2908
|
}, (decoded) => resolveRouteContext(decoded.options.oauthToken).pipe(Effect.flatMap(({ config, token }) => requestJson(FileUploadEnvelopeSchema, {
|
|
2910
2909
|
auth: { type: "none" },
|
|
2911
|
-
baseUrl: config.uploadBaseUrl
|
|
2910
|
+
baseUrl: config.uploadBaseUrl,
|
|
2912
2911
|
body: {
|
|
2913
2912
|
type: "form-data",
|
|
2914
2913
|
value: createFileUploadFormData(decoded.input)
|
|
@@ -2928,7 +2927,7 @@ const FriendInviteJoinedUserStatusSchema = Schema.Literals([
|
|
|
2928
2927
|
const FriendInviteJoinedUserSchema = Schema.Struct({
|
|
2929
2928
|
avatar_url: Schema.String,
|
|
2930
2929
|
created_at: Schema.String,
|
|
2931
|
-
earned_amount: Schema.NullOr(
|
|
2930
|
+
earned_amount: Schema.NullOr(NonNegativeNumberSchema),
|
|
2932
2931
|
name: Schema.String,
|
|
2933
2932
|
status: FriendInviteJoinedUserStatusSchema
|
|
2934
2933
|
});
|
|
@@ -3200,7 +3199,7 @@ const PaymentInfoPlanSchema = Schema.Struct({
|
|
|
3200
3199
|
code: Schema.optional(Schema.String),
|
|
3201
3200
|
group_code: Schema.optional(Schema.String),
|
|
3202
3201
|
period_days: Schema.optional(Schema.NullOr(Schema.Int.check(Schema.isGreaterThan(0)))),
|
|
3203
|
-
storage_space: Schema.optional(
|
|
3202
|
+
storage_space: Schema.optional(NonNegativeNumberSchema),
|
|
3204
3203
|
subscription: Schema.optional(PaymentSubscriptionInfoSchema),
|
|
3205
3204
|
type: Schema.optional(Schema.NullOr(PaymentPlanTypeSchema))
|
|
3206
3205
|
});
|
|
@@ -3220,9 +3219,9 @@ const PaymentInfoSchema = Schema.Struct({
|
|
|
3220
3219
|
});
|
|
3221
3220
|
const PaymentPlanCommonPropertiesSchema = Schema.Struct({
|
|
3222
3221
|
family_invites: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)),
|
|
3223
|
-
seed_ratio:
|
|
3224
|
-
seed_time:
|
|
3225
|
-
storage_space:
|
|
3222
|
+
seed_ratio: NonNegativeNumberSchema,
|
|
3223
|
+
seed_time: NonNegativeNumberSchema,
|
|
3224
|
+
storage_space: NonNegativeNumberSchema,
|
|
3226
3225
|
torrent_slot: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))
|
|
3227
3226
|
});
|
|
3228
3227
|
const PaymentSubPlanSchema = Schema.Struct({
|
|
@@ -3245,7 +3244,7 @@ const PaymentPlansEnvelopeSchema = Schema.Struct({
|
|
|
3245
3244
|
status: Schema.Literal("OK")
|
|
3246
3245
|
});
|
|
3247
3246
|
const PaymentOptionSchema = Schema.Struct({
|
|
3248
|
-
discount_percent:
|
|
3247
|
+
discount_percent: NonNegativeNumberSchema,
|
|
3249
3248
|
name: PaymentTypeSchema,
|
|
3250
3249
|
suitable_plan_types: Schema.Array(PaymentOptionPlanTypeSchema)
|
|
3251
3250
|
});
|
|
@@ -3293,7 +3292,7 @@ const PaymentChangePlanCurrentPlanSchema = Schema.Struct({
|
|
|
3293
3292
|
subscription_payment_provider: Schema.NullOr(PaymentProviderNameSchema)
|
|
3294
3293
|
});
|
|
3295
3294
|
const PaymentChangePlanTargetPlanSchema = Schema.Struct({
|
|
3296
|
-
hd_avail:
|
|
3295
|
+
hd_avail: NonNegativeNumberSchema,
|
|
3297
3296
|
is_trial_subscription: Schema.Boolean,
|
|
3298
3297
|
new_code: Schema.String,
|
|
3299
3298
|
period_days: Schema.NullOr(Schema.Int.check(Schema.isGreaterThan(0))),
|
|
@@ -3317,7 +3316,7 @@ const PaymentChangePlanProviderFastspringPreviewSchema = Schema.Struct({
|
|
|
3317
3316
|
refund_amount: Schema.NullOr(Schema.String)
|
|
3318
3317
|
});
|
|
3319
3318
|
const PaymentChangePlanDiscountSchema = Schema.Struct({
|
|
3320
|
-
discount:
|
|
3319
|
+
discount: NonNegativeNumberSchema,
|
|
3321
3320
|
type: Schema.Literals(["percentage", "amount"])
|
|
3322
3321
|
});
|
|
3323
3322
|
const PaymentChangePlanPreviewSchema = Schema.Struct({
|
|
@@ -3353,7 +3352,7 @@ const FastspringPaymentProviderSchema = Schema.Struct({
|
|
|
3353
3352
|
url: Schema.String
|
|
3354
3353
|
});
|
|
3355
3354
|
const OpenNodePaymentProviderSchema = Schema.Struct({
|
|
3356
|
-
discount_percent:
|
|
3355
|
+
discount_percent: NonNegativeNumberSchema,
|
|
3357
3356
|
provider: Schema.Literal("OpenNode"),
|
|
3358
3357
|
type: Schema.Literal("cryptocurrency")
|
|
3359
3358
|
});
|
|
@@ -3408,7 +3407,7 @@ const PaymentVoucherPlanSchema = Schema.Struct({
|
|
|
3408
3407
|
const PaymentVoucherTargetPlanSchema = Schema.Struct({
|
|
3409
3408
|
code: Schema.String,
|
|
3410
3409
|
group_code: Schema.String,
|
|
3411
|
-
hd_avail:
|
|
3410
|
+
hd_avail: NonNegativeNumberSchema,
|
|
3412
3411
|
name: Schema.String,
|
|
3413
3412
|
simulated_expiration: Schema.optional(Schema.NullOr(Schema.String)),
|
|
3414
3413
|
type: PaymentPlanTypeSchema
|
|
@@ -4201,12 +4200,7 @@ const SharingCloneStatusSchema = Schema.Literals([
|
|
|
4201
4200
|
"DONE",
|
|
4202
4201
|
"ERROR"
|
|
4203
4202
|
]);
|
|
4204
|
-
const SharingCloneInputSchema = Schema.
|
|
4205
|
-
cursor: Schema.optional(NonEmptyStringSchema),
|
|
4206
|
-
excludeIds: Schema.optional(Schema.Array(PositiveIntegerSchema)),
|
|
4207
|
-
ids: Schema.optional(Schema.Array(PositiveIntegerSchema)),
|
|
4208
|
-
parentId: Schema.optional(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)))
|
|
4209
|
-
});
|
|
4203
|
+
const SharingCloneInputSchema = cursorSelectionSchema({ parentId: Schema.optional(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))) });
|
|
4210
4204
|
const SharingCloneEnvelopeSchema = Schema.Struct({
|
|
4211
4205
|
id: Schema.Int.check(Schema.isGreaterThan(0)),
|
|
4212
4206
|
status: Schema.Literal("OK")
|
|
@@ -4224,15 +4218,10 @@ const SharingCloneInfoSchema = Schema.Union([Schema.Struct({
|
|
|
4224
4218
|
status: Schema.Literal("OK")
|
|
4225
4219
|
})]);
|
|
4226
4220
|
const SharedFileSchema = FileBroadSchema.pipe(Schema.fieldsAssign({ shared_with: Schema.Union([Schema.Literal("everyone"), Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))]) }));
|
|
4227
|
-
const SharingShareInputSchema = Schema.Struct({
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
target: Schema.Union([Schema.Struct({ type: Schema.Literal("everyone") }), Schema.Struct({
|
|
4232
|
-
friendNames: Schema.Array(NonEmptyStringSchema).check(Schema.isMinLength(1)),
|
|
4233
|
-
type: Schema.Literal("friends")
|
|
4234
|
-
})])
|
|
4235
|
-
});
|
|
4221
|
+
const SharingShareInputSchema = cursorSelectionSchema({ target: Schema.Union([Schema.Struct({ type: Schema.Literal("everyone") }), Schema.Struct({
|
|
4222
|
+
friendNames: Schema.Array(NonEmptyStringSchema).check(Schema.isMinLength(1)),
|
|
4223
|
+
type: Schema.Literal("friends")
|
|
4224
|
+
})]) });
|
|
4236
4225
|
const SharedFilesEnvelopeSchema = Schema.Struct({
|
|
4237
4226
|
shared: Schema.Array(SharedFileSchema),
|
|
4238
4227
|
status: Schema.Literal("OK")
|
|
@@ -4262,7 +4251,7 @@ const PublicShareSchema = Schema.Struct({
|
|
|
4262
4251
|
push_token: Schema.String,
|
|
4263
4252
|
token: Schema.String,
|
|
4264
4253
|
user_file: Schema.Struct({
|
|
4265
|
-
file_type:
|
|
4254
|
+
file_type: FileTypeSchema,
|
|
4266
4255
|
id: Schema.Int,
|
|
4267
4256
|
name: Schema.String
|
|
4268
4257
|
})
|
|
@@ -4289,8 +4278,8 @@ const PublicShareListQuerySchema = Schema.Struct({
|
|
|
4289
4278
|
mp4_status_parent: Schema.optional(Schema.Literal(1)),
|
|
4290
4279
|
parent_id: Schema.optional(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))),
|
|
4291
4280
|
per_page: Schema.optional(Schema.Int.check(Schema.isGreaterThan(0))),
|
|
4292
|
-
sort: Schema.optional(
|
|
4293
|
-
sort_by: Schema.optional(
|
|
4281
|
+
sort: Schema.optional(FileSortSchema),
|
|
4282
|
+
sort_by: Schema.optional(FileSortSchema),
|
|
4294
4283
|
stream_url_parent: Schema.optional(Schema.Literal(1)),
|
|
4295
4284
|
total: Schema.optional(Schema.Literal(1)),
|
|
4296
4285
|
video_metadata_parent: Schema.optional(Schema.Literal(1))
|
|
@@ -4493,7 +4482,7 @@ const GetPublicShareFileUrlErrorSpec = definePutioOperationErrorSpec({
|
|
|
4493
4482
|
]
|
|
4494
4483
|
});
|
|
4495
4484
|
const toShareTarget = (target) => target.type === "everyone" ? "everyone" : target.friendNames.join(",");
|
|
4496
|
-
const cloneSharedFiles = (input
|
|
4485
|
+
const cloneSharedFiles = (input) => decodeAndRun(SharingCloneInputSchema, input, (decodedInput) => requestJson(SharingCloneEnvelopeSchema, {
|
|
4497
4486
|
body: {
|
|
4498
4487
|
type: "form",
|
|
4499
4488
|
value: {
|
|
@@ -4551,11 +4540,13 @@ const getPublicShare = () => requestJson(PublicShareEnvelopeSchema, {
|
|
|
4551
4540
|
method: "GET",
|
|
4552
4541
|
path: "/v2/public_share"
|
|
4553
4542
|
}).pipe(selectJsonField("public_share"), withOperationErrors(GetPublicShareErrorSpec));
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4543
|
+
function listPublicShareFiles(query = {}) {
|
|
4544
|
+
return decodeAndRun(PublicShareListQuerySchema, query, (decodedQuery) => requestJson(FilesListEnvelopeSchema, {
|
|
4545
|
+
method: "GET",
|
|
4546
|
+
path: "/v2/public_share/files/list",
|
|
4547
|
+
query: decodedQuery
|
|
4548
|
+
}).pipe(requireRequestedBreadcrumbs(decodedQuery))).pipe(withOperationErrors(ListPublicShareFilesErrorSpec));
|
|
4549
|
+
}
|
|
4559
4550
|
const continuePublicShareFiles = (cursor, query = {}) => decodeAndRun(PublicShareContinueInputSchema, {
|
|
4560
4551
|
cursor,
|
|
4561
4552
|
query
|
|
@@ -4586,15 +4577,15 @@ const TrashFileSchema = Schema.Struct({
|
|
|
4586
4577
|
id: Schema.Int,
|
|
4587
4578
|
name: Schema.String,
|
|
4588
4579
|
parent_id: Schema.NullOr(Schema.Int),
|
|
4589
|
-
screenshot: Schema.
|
|
4590
|
-
size:
|
|
4580
|
+
screenshot: Schema.Union([Schema.NullOr(Schema.String), Schema.Tuple([Schema.NullOr(Schema.String)])]),
|
|
4581
|
+
size: NonNegativeNumberSchema
|
|
4591
4582
|
});
|
|
4592
4583
|
const TrashListEnvelopeSchema = Schema.Struct({
|
|
4593
4584
|
cursor: Schema.NullOr(Schema.String),
|
|
4594
4585
|
files: Schema.Array(TrashFileSchema),
|
|
4595
4586
|
status: Schema.Literal("OK"),
|
|
4596
4587
|
total: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)),
|
|
4597
|
-
trash_size:
|
|
4588
|
+
trash_size: NonNegativeNumberSchema
|
|
4598
4589
|
});
|
|
4599
4590
|
const TrashContinueEnvelopeSchema = Schema.Struct({
|
|
4600
4591
|
cursor: Schema.NullOr(Schema.String),
|
|
@@ -4757,7 +4748,7 @@ const TransferLinkSchema = Schema.Struct({
|
|
|
4757
4748
|
url: Schema.NullOr(Schema.String)
|
|
4758
4749
|
});
|
|
4759
4750
|
const NullableInt = Schema.NullOr(Schema.Int);
|
|
4760
|
-
const NullableNonNegativeNumber = Schema.NullOr(
|
|
4751
|
+
const NullableNonNegativeNumber = Schema.NullOr(NonNegativeNumberSchema);
|
|
4761
4752
|
const TransferBaseSchema = Schema.Struct({
|
|
4762
4753
|
availability: NullableNonNegativeNumber,
|
|
4763
4754
|
callback_url: Schema.NullOr(Schema.String),
|
|
@@ -4805,12 +4796,12 @@ const TransferErrorSchema = TransferBaseSchema.mapFields(({ error_message: _erro
|
|
|
4805
4796
|
}));
|
|
4806
4797
|
const TransferCompletedSchema = TransferBaseSchema.mapFields(({ status: _status, ...fields }) => fields).pipe(Schema.fieldsAssign({ status: Schema.Literal("COMPLETED") }));
|
|
4807
4798
|
const TransferLiveSchema = TransferBaseSchema.mapFields(({ recorded_seconds: _recordedSeconds, type: _type, ...fields }) => fields).pipe(Schema.fieldsAssign({
|
|
4808
|
-
recorded_seconds:
|
|
4799
|
+
recorded_seconds: NonNegativeNumberSchema,
|
|
4809
4800
|
type: Schema.Literal("LIVE_STREAM")
|
|
4810
4801
|
}));
|
|
4811
4802
|
const TransferTorrentSeedingSchema = TransferBaseSchema.mapFields(({ current_ratio: _currentRatio, seconds_seeding: _secondsSeeding, status: _status, type: _type, ...fields }) => fields).pipe(Schema.fieldsAssign({
|
|
4812
|
-
current_ratio:
|
|
4813
|
-
seconds_seeding:
|
|
4803
|
+
current_ratio: NonNegativeNumberSchema,
|
|
4804
|
+
seconds_seeding: NonNegativeNumberSchema,
|
|
4814
4805
|
status: Schema.Literals([
|
|
4815
4806
|
"SEEDING",
|
|
4816
4807
|
"COMPLETED",
|
|
@@ -4856,7 +4847,7 @@ const TransferRemoveInputSchema = Schema.Union([TransferRemoveIdsInputSchema, Tr
|
|
|
4856
4847
|
const TransferInfoItemSchema = Schema.Struct({
|
|
4857
4848
|
error: Schema.optional(Schema.String),
|
|
4858
4849
|
error_message: Schema.optional(Schema.String),
|
|
4859
|
-
file_size:
|
|
4850
|
+
file_size: NonNegativeNumberSchema,
|
|
4860
4851
|
human_size: Schema.String,
|
|
4861
4852
|
name: Schema.String,
|
|
4862
4853
|
type_name: Schema.String,
|
|
@@ -4882,7 +4873,7 @@ const TransferCountEnvelopeSchema = Schema.Struct({
|
|
|
4882
4873
|
status: Schema.Literal("OK")
|
|
4883
4874
|
});
|
|
4884
4875
|
const TransferInfoEnvelopeSchema = Schema.Struct({
|
|
4885
|
-
disk_avail:
|
|
4876
|
+
disk_avail: NonNegativeNumberSchema,
|
|
4886
4877
|
ret: Schema.Array(TransferInfoItemSchema),
|
|
4887
4878
|
status: Schema.Literal("OK")
|
|
4888
4879
|
});
|
|
@@ -4908,6 +4899,14 @@ const ListTransfersErrorSpec = definePutioOperationErrorSpec({
|
|
|
4908
4899
|
statusCode: 401
|
|
4909
4900
|
}, { statusCode: 400 }]
|
|
4910
4901
|
});
|
|
4902
|
+
const ContinueTransfersErrorSpec = definePutioOperationErrorSpec({
|
|
4903
|
+
domain: "transfers",
|
|
4904
|
+
operation: "continue",
|
|
4905
|
+
knownErrors: [{
|
|
4906
|
+
errorType: "invalid_scope",
|
|
4907
|
+
statusCode: 401
|
|
4908
|
+
}, { statusCode: 400 }]
|
|
4909
|
+
});
|
|
4911
4910
|
const GetTransferErrorSpec = definePutioOperationErrorSpec({
|
|
4912
4911
|
domain: "transfers",
|
|
4913
4912
|
operation: "get",
|
|
@@ -5072,11 +5071,21 @@ const StopRecordingTransferErrorSpec = definePutioOperationErrorSpec({
|
|
|
5072
5071
|
{ statusCode: 404 }
|
|
5073
5072
|
]
|
|
5074
5073
|
});
|
|
5075
|
-
const
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
}
|
|
5074
|
+
const ensurePagedTransferFields = (response) => {
|
|
5075
|
+
if (response.cursor === void 0) return failMissingField("cursor");
|
|
5076
|
+
if (response.total === void 0) return failMissingField("total");
|
|
5077
|
+
return Effect.succeed(response);
|
|
5078
|
+
};
|
|
5079
|
+
function listTransfers(query = {}) {
|
|
5080
|
+
return decodeAndRun(TransfersListQuerySchema, query, (decodedQuery) => {
|
|
5081
|
+
const effect = requestJson(TransfersListEnvelopeSchema, {
|
|
5082
|
+
method: "GET",
|
|
5083
|
+
path: "/v2/transfers/list",
|
|
5084
|
+
query: decodedQuery
|
|
5085
|
+
});
|
|
5086
|
+
return decodedQuery.per_page === void 0 ? effect : Effect.flatMap(effect, ensurePagedTransferFields);
|
|
5087
|
+
}).pipe(withOperationErrors(ListTransfersErrorSpec));
|
|
5088
|
+
}
|
|
5080
5089
|
const continueTransfers = (cursor, query = {}) => decodeAndRun(TransferContinueInputSchema, {
|
|
5081
5090
|
cursor,
|
|
5082
5091
|
query
|
|
@@ -5088,7 +5097,7 @@ const continueTransfers = (cursor, query = {}) => decodeAndRun(TransferContinueI
|
|
|
5088
5097
|
method: "POST",
|
|
5089
5098
|
path: "/v2/transfers/list/continue",
|
|
5090
5099
|
query: decodedInput.query
|
|
5091
|
-
})).pipe(withOperationErrors(
|
|
5100
|
+
})).pipe(withOperationErrors(ContinueTransfersErrorSpec));
|
|
5092
5101
|
const getTransfer = (id) => decodeAndRun(TransferIdSchema, id, (decodedId) => requestJson(TransferEnvelopeSchema, {
|
|
5093
5102
|
method: "GET",
|
|
5094
5103
|
path: `/v2/transfers/${encodePathSegment(decodedId)}`
|
|
@@ -5276,7 +5285,7 @@ const ZipMissingFileSchema = Schema.Struct({
|
|
|
5276
5285
|
const ZipInfoDoneSchema = Schema.Struct({
|
|
5277
5286
|
id: Schema.optional(Schema.Int.check(Schema.isGreaterThan(0))),
|
|
5278
5287
|
missing_files: Schema.Array(Schema.Union([Schema.String, ZipMissingFileSchema])),
|
|
5279
|
-
size:
|
|
5288
|
+
size: NonNegativeNumberSchema,
|
|
5280
5289
|
status: Schema.Literal("OK"),
|
|
5281
5290
|
url: Schema.String,
|
|
5282
5291
|
zip_status: Schema.Literal("DONE")
|
|
@@ -5371,7 +5380,10 @@ const cancelZip = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) =>
|
|
|
5371
5380
|
// src/core/client.ts
|
|
5372
5381
|
const getPromiseClientRuntime = (state) => {
|
|
5373
5382
|
if (state.disposed) throw mapConfigurationError("This Promise client has been disposed and can no longer execute SDK effects");
|
|
5374
|
-
state.runtime ??= ManagedRuntime.make(putioSdkLiveLayer(
|
|
5383
|
+
state.runtime ??= ManagedRuntime.make(putioSdkLiveLayer({
|
|
5384
|
+
...state.config,
|
|
5385
|
+
accessToken: void 0
|
|
5386
|
+
}));
|
|
5375
5387
|
return state.runtime;
|
|
5376
5388
|
};
|
|
5377
5389
|
const disposePromiseClientRuntime = async (state) => {
|
|
@@ -5382,10 +5394,7 @@ const disposePromiseClientRuntime = async (state) => {
|
|
|
5382
5394
|
};
|
|
5383
5395
|
const provideSdk = async ({ signal, state }, effect) => {
|
|
5384
5396
|
const runtime = getPromiseClientRuntime(state);
|
|
5385
|
-
const configured = Effect.provideService(effect, PutioSdkConfig,
|
|
5386
|
-
...state.runtimeConfig,
|
|
5387
|
-
accessToken: state.accessToken
|
|
5388
|
-
});
|
|
5397
|
+
const configured = Effect.provideService(effect, PutioSdkConfig, state.config);
|
|
5389
5398
|
if (signal === void 0) return runtime.runPromise(configured);
|
|
5390
5399
|
if (signal.aborted) throw signal.reason;
|
|
5391
5400
|
const exit = await runtime.runPromiseExit(configured, { signal });
|
|
@@ -5396,13 +5405,13 @@ const snapshotUrl = (value) => Predicate.isString(value) || value === void 0 ? v
|
|
|
5396
5405
|
const snapshotHeaders = (value) => value === void 0 ? void 0 : [...new Headers(value)];
|
|
5397
5406
|
var OperationEntry = class {
|
|
5398
5407
|
run;
|
|
5399
|
-
|
|
5400
|
-
constructor(run,
|
|
5408
|
+
bind;
|
|
5409
|
+
constructor(run, bind) {
|
|
5401
5410
|
this.run = run;
|
|
5402
|
-
this.
|
|
5411
|
+
this.bind = bind;
|
|
5403
5412
|
}
|
|
5404
5413
|
};
|
|
5405
|
-
const effect = (operation) => new OperationEntry(operation, (
|
|
5414
|
+
const effect = (operation) => new OperationEntry(operation, (provide) => (...args) => provide(operation(...args)));
|
|
5406
5415
|
const pure = (operation) => new OperationEntry(operation, () => operation);
|
|
5407
5416
|
const mapOperationTree = (tree, toOperation) => Object.fromEntries(Object.entries(tree).map(([key, value]) => [key, value instanceof OperationEntry ? toOperation(value) : mapOperationTree(value, toOperation)]));
|
|
5408
5417
|
const sharedOperationTree = {
|
|
@@ -5644,73 +5653,70 @@ const sharedOperationTree = {
|
|
|
5644
5653
|
list: effect(listZips)
|
|
5645
5654
|
}
|
|
5646
5655
|
};
|
|
5656
|
+
const bindOperationTree = (provide) => mapOperationTree(sharedOperationTree, (entry) => entry.bind(provide));
|
|
5657
|
+
const buildLoginUrlFrom = (webAppUrl) => (options) => buildAuthLoginUrl({
|
|
5658
|
+
...options,
|
|
5659
|
+
webAppUrl: options.webAppUrl ?? webAppUrl
|
|
5660
|
+
});
|
|
5647
5661
|
const createPutioSdkEffectClient = () => mapOperationTree(sharedOperationTree, (entry) => entry.run);
|
|
5648
|
-
|
|
5649
|
-
const
|
|
5650
|
-
const
|
|
5662
|
+
const makePutioSdkService = (config, httpClient) => {
|
|
5663
|
+
const context = Context.make(PutioSdkConfig, config).pipe(Context.add(PutioHttpClient, httpClient));
|
|
5664
|
+
const operations = bindOperationTree((operation) => Effect.provideContext(operation, context));
|
|
5665
|
+
return {
|
|
5666
|
+
...operations,
|
|
5667
|
+
auth: {
|
|
5668
|
+
...operations.auth,
|
|
5669
|
+
buildLoginUrl: buildLoginUrlFrom(config.webAppUrl)
|
|
5670
|
+
}
|
|
5671
|
+
};
|
|
5672
|
+
};
|
|
5673
|
+
var PutioSdk = class extends Context.Service()("@putdotio/sdk/PutioSdk") {};
|
|
5674
|
+
const makePutioSdkEffectClientLayer = () => Layer.effect(PutioSdk)(Effect.gen(function* () {
|
|
5675
|
+
return makePutioSdkService(yield* PutioSdkConfig, yield* PutioHttpClient);
|
|
5676
|
+
}));
|
|
5677
|
+
const makePutioSdkLiveClientLayer = (config) => Layer.provideMerge(makePutioSdkEffectClientLayer(), putioSdkLiveLayer(config));
|
|
5651
5678
|
const createPromiseOperations = (state, signal) => {
|
|
5652
|
-
const
|
|
5679
|
+
const runner = {
|
|
5653
5680
|
signal,
|
|
5654
5681
|
state
|
|
5655
5682
|
};
|
|
5656
|
-
|
|
5657
|
-
return provideSdk(config, getAccountInfo(query));
|
|
5658
|
-
}
|
|
5659
|
-
function getFileById(input) {
|
|
5660
|
-
return provideSdk(config, getFile(input));
|
|
5661
|
-
}
|
|
5662
|
-
function getChildByName(input) {
|
|
5663
|
-
return provideSdk(config, getFileChild(input));
|
|
5664
|
-
}
|
|
5665
|
-
const operations = mapOperationTree(sharedOperationTree, (entry) => entry.toPromise(config));
|
|
5683
|
+
const operations = bindOperationTree((operation) => provideSdk(runner, operation));
|
|
5666
5684
|
return {
|
|
5667
5685
|
...operations,
|
|
5668
|
-
account: {
|
|
5669
|
-
...operations.account,
|
|
5670
|
-
getInfo
|
|
5671
|
-
},
|
|
5672
5686
|
auth: {
|
|
5673
5687
|
...operations.auth,
|
|
5674
|
-
buildLoginUrl: (
|
|
5675
|
-
...options,
|
|
5676
|
-
webAppUrl: options.webAppUrl ?? state.runtimeConfig.webAppUrl
|
|
5677
|
-
})
|
|
5678
|
-
},
|
|
5679
|
-
config: {
|
|
5680
|
-
...operations.config,
|
|
5681
|
-
getKeyWith: (key, schema) => provideSdk(config, getConfigKeyWith(key, schema)),
|
|
5682
|
-
readWith: (schema) => provideSdk(config, readConfigWith(schema))
|
|
5688
|
+
buildLoginUrl: buildLoginUrlFrom(state.config.webAppUrl)
|
|
5683
5689
|
},
|
|
5684
5690
|
files: {
|
|
5685
5691
|
...operations.files,
|
|
5686
|
-
createUploadFormData: createFileUploadFormData
|
|
5687
|
-
get: getFileById,
|
|
5688
|
-
getChild: getChildByName
|
|
5692
|
+
createUploadFormData: createFileUploadFormData
|
|
5689
5693
|
}
|
|
5690
5694
|
};
|
|
5691
5695
|
};
|
|
5692
5696
|
const createPutioSdkPromiseClient = (initialConfig = {}) => {
|
|
5693
5697
|
const state = {
|
|
5694
|
-
|
|
5695
|
-
disposed: false,
|
|
5696
|
-
runtime: void 0,
|
|
5697
|
-
runtimeConfig: Struct.omit(normalizePutioSdkOptions({
|
|
5698
|
+
config: normalizePutioSdkOptions({
|
|
5698
5699
|
...initialConfig,
|
|
5699
5700
|
baseUrl: snapshotUrl(initialConfig.baseUrl),
|
|
5700
5701
|
headers: snapshotHeaders(initialConfig.headers),
|
|
5701
5702
|
uploadBaseUrl: snapshotUrl(initialConfig.uploadBaseUrl),
|
|
5702
5703
|
webAppUrl: snapshotUrl(initialConfig.webAppUrl)
|
|
5703
|
-
}),
|
|
5704
|
+
}),
|
|
5705
|
+
disposed: false,
|
|
5706
|
+
runtime: void 0
|
|
5704
5707
|
};
|
|
5705
5708
|
return {
|
|
5706
5709
|
dispose: () => disposePromiseClientRuntime(state),
|
|
5707
5710
|
setAccessToken: (accessToken) => {
|
|
5708
|
-
state.
|
|
5711
|
+
state.config = normalizePutioSdkOptions({
|
|
5712
|
+
...state.config,
|
|
5713
|
+
accessToken
|
|
5714
|
+
});
|
|
5709
5715
|
},
|
|
5710
5716
|
withSignal: (signal) => createPromiseOperations(state, signal),
|
|
5711
5717
|
...createPromiseOperations(state, void 0)
|
|
5712
5718
|
};
|
|
5713
5719
|
};
|
|
5714
|
-
export { AccountClearOptionsSchema, AccountConfirmationSchema, AccountConfirmationsErrorSpec, AccountDiskSchema, AccountInfoBaseSchema, AccountInfoBroadSchema, AccountInfoQuerySchema, AccountSettingsSchema, AccountSubtitleLanguageSchema, AccountTwoFactorSettingsSchema, AccountWarningsSchema, AddManyTransfersErrorSpec, AddTransferErrorSpec, AddTransferTrackersErrorSpec, AppSpecificPasswordSchema, ApproveFriendRequestErrorSpec, AuthorizationCodeSchema, CanWriteFileErrorSpec, CancelZipErrorSpec, ClearEventsErrorSpec, ClearRssFeedLogsErrorSpec, ClientsErrorSpec, ConfirmFastspringOrderErrorSpec, ContinueFilesErrorSpec, ContinuePublicShareFilesErrorSpec, ContinueTrashErrorSpec, CopyFileErrorSpec, CountWaitingRequestsErrorSpec, CreateAppSpecificPasswordErrorSpec, CreateAppSpecificPasswordInputSchema, CreateDownloadLinksErrorSpec, CreateFamilyInviteErrorSpec, CreateFolderErrorSpec, CreateFriendInviteErrorSpec, CreateOAuthAppErrorSpec, CreateOpenNodeChargeErrorSpec, CreatePaddleBillingUpdatePaymentMethodTransactionErrorSpec, CreatePaddleWaitingPaymentErrorSpec, CreatePublicShareErrorSpec, CreateRssFeedErrorSpec, CreateSharingCloneErrorSpec, CreateZipErrorSpec, DEFAULT_PUTIO_API_BASE_URL, DEFAULT_PUTIO_UPLOAD_BASE_URL, DEFAULT_PUTIO_WEB_APP_URL, DeleteAllAppSpecificPasswordsErrorSpec, DeleteAppSpecificPasswordErrorSpec, DeleteEventErrorSpec, DeleteOAuthAppErrorSpec, DeletePublicShareErrorSpec, DeleteRssFeedErrorSpec, DeleteTrashErrorSpec, DenyFriendRequestErrorSpec, DownloadLinksCreateInputSchema, DownloadLinksInfoSchema, DownloadLinksPayloadSchema, DownloadLinksStatusSchema, DownloadUrlErrorSpec, EmptyTrashErrorSpec, EventsListQuerySchema, FamilyInviteLookupErrorSpec, FamilyInviteSchema, FamilyMemberSchema, FileActiveConversionSchema, FileActiveConversionsErrorSpec, FileBaseSchema, FileBreadcrumbSchema, FileBroadSchema, FileConversionStatusSchema, FileCopyInputSchema, FileExtractionSchema, FileExtractionStatusSchema, FileExtractionsErrorSpec, FileGetChildInputSchema, FileMediaInfoFormatSchema, FileMediaInfoSchema, FileMediaInfoStreamSchema, FileMediaMetadataSchema, FileMp4ErrorSpec, FileMp4MutationErrorSpec, FileQuerySchema, FileSetSortInputSchema, FileSortSchema, FileSubtitleSchema, FileSubtitlesErrorSpec, FileTouchInputSchema, FileTypeSchema, FileUploadErrorSpec, FileWatchStatusErrorSpec, FilesListEnvelopeSchema, FilesListQuerySchema, FilesMoveErrorSchema, FilesSearchQuerySchema, FolderTypeSchema, ForgotPasswordErrorSpec, FriendBaseSchema, FriendInviteJoinedUserSchema, FriendInviteJoinedUserStatusSchema, FriendInviteLookupErrorSpec, FriendInviteSchema, FriendSchema, FriendSharedFolderErrorSpec, GenerateTOTPErrorSpec, GenerateTOTPResponseSchema, GetDownloadLinksErrorSpec, GetEventTorrentErrorSpec, GetFileChildErrorSpec, GetFileErrorSpec, GetHlsMasterPlaylistErrorSpec, GetIftttStatusErrorSpec, GetOAuthAppErrorSpec, GetPaddleBillingInvoiceUrlErrorSpec, GetPaymentInfoErrorSpec, GetPaymentVoucherInfoErrorSpec, GetPublicShareErrorSpec, GetPublicShareFileUrlErrorSpec, GetRssFeedErrorSpec, GetSharedWithErrorSpec, GetSharingCloneInfoErrorSpec, GetTransferErrorSpec, GetTransferTorrentErrorSpec, GetZipErrorSpec, GiftCardLookupErrorSpec, GrantsErrorSpec, HistoryEventSchema, HistoryFileFromRssDeletedEventSchema, HistoryFileSharedEventSchema, HistoryKnownEventTypeSchema, HistoryPrivateTorrentPinEventSchema, HistoryRssFilterPausedEventSchema, HistoryTransferCallbackErrorEventSchema, HistoryTransferCompletedEventSchema, HistoryTransferErrorEventSchema, HistoryTransferFromRssErrorEventSchema, HistoryUploadEventSchema, HistoryVoucherEventSchema, HistoryZipCreatedEventSchema, JoinFamilyErrorSpec, JsonObjectSchema, JsonValueSchema, LinkDeviceErrorSpec, ListAppSpecificPasswordsErrorSpec, ListEventsErrorSpec, ListFamilyInvitesErrorSpec, ListFamilyMembersErrorSpec, ListFriendInvitesErrorSpec, ListFriendsErrorSpec, ListPaymentHistoryErrorSpec, ListPaymentInvitesErrorSpec, ListPaymentOptionsErrorSpec, ListPaymentPlansErrorSpec, ListPublicShareFilesErrorSpec, ListPublicSharesErrorSpec, ListRssFeedItemsErrorSpec, ListRssFeedsErrorSpec, ListSentRequestsErrorSpec, ListSharedFilesErrorSpec, ListTransfersErrorSpec, ListTrashErrorSpec, ListTunnelRoutesErrorSpec, ListWaitingRequestsErrorSpec, ListZipsErrorSpec, LoginErrorSpec, LoginResponseSchema, MyOAuthAppSchema, OAuthAppCreateInputSchema, OAuthAppSchema, OAuthAppSessionSchema, OAuthAppUpdateInputSchema, OAuthAppWithTokenSchema, OAuthAuthorizationCodeExchangeError, OAuthAuthorizationCodeExchangeErrorCodeSchema, OAuthAuthorizationCodeExchangeInputSchema, OAuthSetIconInputSchema, OkResponseSchema, OwnedOAuthAppSchema, PasInfoSchema, PauseRssFeedErrorSpec, PaymentChangePlanPreviewSchema, PaymentChangePlanSubmitSchema, PaymentHistoryItemSchema, PaymentInfoPlanSchema, PaymentInfoSchema, PaymentInviteSchema, PaymentOptionPlanTypeSchema, PaymentOptionSchema, PaymentPlanGroupSchema, PaymentPlanTypeSchema, PaymentProviderNameSchema, PaymentProviderSchema, PaymentSubscriptionInfoSchema, PaymentTypeSchema, PaymentVoucherInfoSchema, PodcastGetLinksInputSchema, PodcastLinkTypeSchema, PodcastLinksSchema, PopularOAuthAppSchema, PreviewPaymentChangePlanErrorSpec, PublicShareListQuerySchema, PublicShareSchema, PutioApiError, PutioAuthError, PutioConfigurationError, PutioErrorEnvelopeSchema, PutioHttpClient, PutioOperationError, PutioRateLimitError, PutioSdk, PutioSdkConfig, PutioTransportError, PutioValidationError, QueryFilesErrorSpec, QueryOAuthAppsErrorSpec, ReannounceTransferErrorSpec, RecoveryCodesErrorSpec, RedeemPaymentVoucherErrorSpec, RegenerateOAuthAppTokenErrorSpec, RegenerateRecoveryCodesErrorSpec, RegisterErrorSpec, RegisterInputSchema, RemoveFamilyMemberErrorSpec, RemoveFriendErrorSpec, RemoveRateLimitBanErrorSpec, RemoveTransfersErrorSpec, RenameFileErrorSpec, ReportPaymentsErrorSpec, ResetPasswordErrorSpec, RestoreTrashErrorSpec, ResumeRssFeedErrorSpec, RetryAllRssFeedItemsErrorSpec, RetryRssFeedItemErrorSpec, RetryTransferErrorSpec, RevokeAllOAuthClientsErrorSpec, RevokeOAuthClientErrorSpec, RevokeOAuthGrantErrorSpec, RssFeedItemFailedSchema, RssFeedItemSchema, RssFeedItemSucceededSchema, RssFeedParamsSchema, RssFeedSchema, SHARED_WITH_YOU_ROOT_ID, SaveAccountSettingsErrorSpec, SaveAccountSettingsPayloadSchema, SearchFilesErrorSpec, SearchFriendsErrorSpec, SendFriendRequestErrorSpec, SendIftttEventErrorSpec, ShareFilesErrorSpec, SharedFileSchema, SharedFileShareSchema, SharedFileSharedWithSchema, SharingCloneInfoSchema, SharingCloneInputSchema, SharingCloneStatusSchema, SharingShareInputSchema, SharingUnshareInputSchema, StartFromErrorSpec, StopRecordingTransferErrorSpec, StopSubscriptionErrorSpec, SubmitPaymentChangePlanErrorSpec, TouchFilesErrorSpec, TransferAddInputSchema, TransferAddTrackersInputSchema, TransferBaseSchema, TransferRemoveInputSchema, TransferSchema, TransferStatusSchema, TransferTypeSchema, TransfersListQuerySchema, TrashFileSchema, TunnelRouteSchema, TwoFactorRecoveryCodesSchema, UnshareFileErrorSpec, UpdateOAuthAppErrorSpec, UpdateRssFeedErrorSpec, UserSearchResultSchema, UserSubscriptionStatusSchema, ValidateTokenResponseSchema, VerifyTOTPErrorSpec, VerifyTOTPResponseSchema, VoucherLookupErrorSpec, ZipStatusSchema, addManyTransfers, addTransfer, addTransferTrackers, approveFriendRequest, buildAuthLoginUrl, buildFileApiContentUrl, buildFileApiDownloadUrl, buildFileApiMp4DownloadUrl, buildFileHlsStreamUrl, buildFileXspfPlaylistUrl, buildOAuthAppIconUrl, buildOAuthAuthorizeUrl, buildPutioUrl, canWriteFile, cancelTransfers, cancelZip, checkCodeMatch, classifyPaymentChangePlanResponse, cleanTransfers, clearAccount, clearEvents, clearRssFeedLogs, clients, cloneSharedFiles, confirmFastspringOrder, continueFiles, continuePublicShareFiles, continueSearch, continueTransfers, continueTrash, convertFileSelectionToMp4, convertFileToMp4, convertFilesToMp4, copyFile, countTransfers, countWaitingRequests, createAppSpecificPassword, createDownloadLinks, createFamilyInvite, createFileUploadFormData, createFileUploadRequest, createFolder, createFriendInvite, createOAuthApp, createOpenNodeCharge, createPaddleBillingUpdatePaymentMethodTransaction, createPaddleWaitingPayment, createPublicShare, createPutioSdkEffectClient, createPutioSdkPromiseClient, createRssFeed, createZip, decodePutioErrorEnvelope, definePutioOperationErrorSpec, deleteAllAppSpecificPasswords, deleteAppSpecificPassword, deleteConfigKey, deleteEvent, deleteFileExtraction, deleteFileMp4, deleteFileSelection, deleteFiles, deleteOAuthApp, deletePublicShare, deleteRssFeed, deleteTrash, denyFriendRequest, destroyAccount, emptyTrash, encodePathSegment, exchangeOAuthAuthorizationCode, exists, extractFiles, fallbackPutioErrorEnvelope, findNextFile, findNextVideo, forgotPassword, generateTOTP, getAccountInfo, getAccountSettings, getApiContentUrl, getApiDownloadUrl, getApiMp4DownloadUrl, getCode, getConfigKey, getConfigKeyWith, getDownloadLinks, getDownloadUrl, getEventTorrent, getFamilyInvite, getFile, getFileChild, getFriendInvite, getFriendSharedFolder, getGiftCard, getHlsMasterPlaylist, getHlsStreamUrl, getIftttStatus, getMp4Status, getOAuthApp, getPaddleBillingInvoiceUrl, getPaymentInfo, getPaymentVoucherInfo, getPodcastLinks, getPopularOAuthApps, getPublicShare, getPublicShareFileUrl, getRecoveryCodes, getRssFeed, getSharedWith, getSharingCloneInfo, getStartFrom, getTransfer, getTransferInfo, getTransferTorrent, getVoucher, getXspfPlaylistUrl, getZip, grants, isPutioApiError, isPutioAuthError, isPutioErrorEnvelope, isPutioOperationError, isPutioRateLimitError, joinFamily, linkDevice, listAccountConfirmations, listAccountSubtitleLanguages, listActiveMp4Conversions, listAppSpecificPasswords, listEvents, listFamilyInvites, listFamilyMembers, listFileExtractions, listFileSubtitles, listFriendInvites, listFriends, listPaymentHistory, listPaymentInvites, listPaymentOptions, listPaymentPlans, listPublicShareFiles, listPublicShares, listRssFeedItems, listRssFeeds, listSentRequests, listSharedFiles, listTransfers, listTrash, listTunnelRoutes, listWaitingRequests, listZips, login, logout, makePutioFetchClient, makePutioFetchLayer, makePutioSdkEffectClientLayer, makePutioSdkLiveClientLayer, mapConfigurationError, mapDecodeErrorToValidationError, mapTransportError, moveFileSelection, moveFiles, normalizePutioSdkOptions, parseErrorBody, pauseRssFeed, previewPaymentChangePlan, putMp4ToMyFiles, putioSdkLayer, putioSdkLiveLayer, queryFiles, queryOAuthApps, readConfig, readConfigWith, reannounceTransfer, redeemPaymentVoucher, regenerateOAuthAppToken, regenerateRecoveryCodes, register, removeFamilyMember, removeFriend, removeRateLimitBan, removeTransfers, renameFile, reportPayments, requestArrayBuffer, requestJson, requestText, requestVoid, resetFileSortSettings, resetPassword, resetStartFrom, responseRateLimitHeaders, restoreTrash, resumeRssFeed, retryAllRssFeedItems, retryRssFeedItem, retryTransfer, revokeAllClients, revokeApp, revokeClient, saveAccountSettings, searchFiles, searchFriends, selectJsonField, selectJsonFields, sendFriendRequest, sendIftttEvent, setConfigKey, setFileSort, setFilesWatchStatus, setOAuthAppIcon, setStartFrom, shareFiles, stopPaymentSubscription, stopTransferRecording, submitPaymentChangePlan, toPutioResponseError, touchFiles, unshareFile, updateOAuthApp, updateRssFeed, uploadFile, validateToken, verifyTOTP, withOperationErrors, writeConfig };
|
|
5720
|
+
export { AccountClearOptionsSchema, AccountConfirmationSchema, AccountConfirmationsErrorSpec, AccountDiskSchema, AccountInfoBaseSchema, AccountInfoBroadSchema, AccountInfoQuerySchema, AccountSettingsSchema, AccountSubtitleLanguageSchema, AccountTwoFactorSettingsSchema, AccountWarningsSchema, AddManyTransfersErrorSpec, AddTransferErrorSpec, AddTransferTrackersErrorSpec, AppSpecificPasswordSchema, ApproveFriendRequestErrorSpec, AuthorizationCodeSchema, CanWriteFileErrorSpec, CancelZipErrorSpec, ClearEventsErrorSpec, ClearRssFeedLogsErrorSpec, ClientsErrorSpec, ConfirmFastspringOrderErrorSpec, ContinueFilesErrorSpec, ContinuePublicShareFilesErrorSpec, ContinueSearchErrorSpec, ContinueTransfersErrorSpec, ContinueTrashErrorSpec, CopyFileErrorSpec, CountWaitingRequestsErrorSpec, CreateAppSpecificPasswordErrorSpec, CreateAppSpecificPasswordInputSchema, CreateDownloadLinksErrorSpec, CreateFamilyInviteErrorSpec, CreateFolderErrorSpec, CreateFriendInviteErrorSpec, CreateOAuthAppErrorSpec, CreateOpenNodeChargeErrorSpec, CreatePaddleBillingUpdatePaymentMethodTransactionErrorSpec, CreatePaddleWaitingPaymentErrorSpec, CreatePublicShareErrorSpec, CreateRssFeedErrorSpec, CreateSharingCloneErrorSpec, CreateZipErrorSpec, DEFAULT_PUTIO_API_BASE_URL, DEFAULT_PUTIO_UPLOAD_BASE_URL, DEFAULT_PUTIO_WEB_APP_URL, DeleteAllAppSpecificPasswordsErrorSpec, DeleteAppSpecificPasswordErrorSpec, DeleteEventErrorSpec, DeleteOAuthAppErrorSpec, DeletePublicShareErrorSpec, DeleteRssFeedErrorSpec, DeleteTrashErrorSpec, DenyFriendRequestErrorSpec, DownloadLinksCreateInputSchema, DownloadLinksInfoSchema, DownloadLinksPayloadSchema, DownloadLinksStatusSchema, DownloadUrlErrorSpec, EmptyTrashErrorSpec, EventsListQuerySchema, FamilyInviteLookupErrorSpec, FamilyInviteSchema, FamilyMemberSchema, FileActiveConversionSchema, FileActiveConversionsErrorSpec, FileBaseSchema, FileBreadcrumbSchema, FileBroadSchema, FileConversionStatusSchema, FileCopyInputSchema, FileExtractionSchema, FileExtractionStatusSchema, FileExtractionsErrorSpec, FileGetChildInputSchema, FileMediaInfoFormatSchema, FileMediaInfoSchema, FileMediaInfoStreamSchema, FileMediaMetadataSchema, FileMp4ErrorSpec, FileMp4MutationErrorSpec, FileQuerySchema, FileSetSortInputSchema, FileSortSchema, FileSubtitleSchema, FileSubtitlesErrorSpec, FileTouchInputSchema, FileTypeSchema, FileUploadErrorSpec, FileWatchStatusErrorSpec, FilesListEnvelopeSchema, FilesListQuerySchema, FilesMoveErrorSchema, FilesSearchQuerySchema, FolderTypeSchema, ForgotPasswordErrorSpec, FriendBaseSchema, FriendInviteJoinedUserSchema, FriendInviteJoinedUserStatusSchema, FriendInviteLookupErrorSpec, FriendInviteSchema, FriendSchema, FriendSharedFolderErrorSpec, GenerateTOTPErrorSpec, GenerateTOTPResponseSchema, GetDownloadLinksErrorSpec, GetEventTorrentErrorSpec, GetFileChildErrorSpec, GetFileErrorSpec, GetHlsMasterPlaylistErrorSpec, GetIftttStatusErrorSpec, GetOAuthAppErrorSpec, GetPaddleBillingInvoiceUrlErrorSpec, GetPaymentInfoErrorSpec, GetPaymentVoucherInfoErrorSpec, GetPublicShareErrorSpec, GetPublicShareFileUrlErrorSpec, GetRssFeedErrorSpec, GetSharedWithErrorSpec, GetSharingCloneInfoErrorSpec, GetTransferErrorSpec, GetTransferTorrentErrorSpec, GetZipErrorSpec, GiftCardLookupErrorSpec, GrantsErrorSpec, HistoryEventSchema, HistoryFileFromRssDeletedEventSchema, HistoryFileSharedEventSchema, HistoryKnownEventTypeSchema, HistoryPrivateTorrentPinEventSchema, HistoryRssFilterPausedEventSchema, HistoryTransferCallbackErrorEventSchema, HistoryTransferCompletedEventSchema, HistoryTransferErrorEventSchema, HistoryTransferFromRssErrorEventSchema, HistoryUploadEventSchema, HistoryVoucherEventSchema, HistoryZipCreatedEventSchema, JoinFamilyErrorSpec, JsonObjectSchema, JsonValueSchema, LinkDeviceErrorSpec, ListAppSpecificPasswordsErrorSpec, ListEventsErrorSpec, ListFamilyInvitesErrorSpec, ListFamilyMembersErrorSpec, ListFriendInvitesErrorSpec, ListFriendsErrorSpec, ListPaymentHistoryErrorSpec, ListPaymentInvitesErrorSpec, ListPaymentOptionsErrorSpec, ListPaymentPlansErrorSpec, ListPublicShareFilesErrorSpec, ListPublicSharesErrorSpec, ListRssFeedItemsErrorSpec, ListRssFeedsErrorSpec, ListSentRequestsErrorSpec, ListSharedFilesErrorSpec, ListTransfersErrorSpec, ListTrashErrorSpec, ListTunnelRoutesErrorSpec, ListWaitingRequestsErrorSpec, ListZipsErrorSpec, LoginErrorSpec, LoginResponseSchema, MyOAuthAppSchema, OAuthAppCreateInputSchema, OAuthAppSchema, OAuthAppSessionSchema, OAuthAppUpdateInputSchema, OAuthAppWithTokenSchema, OAuthAuthorizationCodeExchangeError, OAuthAuthorizationCodeExchangeErrorCodeSchema, OAuthAuthorizationCodeExchangeInputSchema, OAuthSetIconInputSchema, OkResponseSchema, OwnedOAuthAppSchema, PasInfoSchema, PauseRssFeedErrorSpec, PaymentChangePlanPreviewSchema, PaymentChangePlanSubmitSchema, PaymentHistoryItemSchema, PaymentInfoPlanSchema, PaymentInfoSchema, PaymentInviteSchema, PaymentOptionPlanTypeSchema, PaymentOptionSchema, PaymentPlanGroupSchema, PaymentPlanTypeSchema, PaymentProviderNameSchema, PaymentProviderSchema, PaymentSubscriptionInfoSchema, PaymentTypeSchema, PaymentVoucherInfoSchema, PodcastGetLinksInputSchema, PodcastLinkTypeSchema, PodcastLinksSchema, PopularOAuthAppSchema, PreviewPaymentChangePlanErrorSpec, PublicShareListQuerySchema, PublicShareSchema, PutioApiError, PutioAuthError, PutioConfigurationError, PutioContractError, PutioErrorEnvelopeSchema, PutioHttpClient, PutioOperationError, PutioRateLimitError, PutioSdk, PutioSdkConfig, PutioTransportError, PutioValidationError, QueryFilesErrorSpec, QueryOAuthAppsErrorSpec, ReannounceTransferErrorSpec, RecoveryCodesErrorSpec, RedeemPaymentVoucherErrorSpec, RegenerateOAuthAppTokenErrorSpec, RegenerateRecoveryCodesErrorSpec, RegisterErrorSpec, RegisterInputSchema, RemoveFamilyMemberErrorSpec, RemoveFriendErrorSpec, RemoveRateLimitBanErrorSpec, RemoveTransfersErrorSpec, RenameFileErrorSpec, ReportPaymentsErrorSpec, ResetPasswordErrorSpec, RestoreTrashErrorSpec, ResumeRssFeedErrorSpec, RetryAllRssFeedItemsErrorSpec, RetryRssFeedItemErrorSpec, RetryTransferErrorSpec, RevokeAllOAuthClientsErrorSpec, RevokeOAuthClientErrorSpec, RevokeOAuthGrantErrorSpec, RssFeedItemFailedSchema, RssFeedItemSchema, RssFeedItemSucceededSchema, RssFeedParamsSchema, RssFeedSchema, SHARED_WITH_YOU_ROOT_ID, SaveAccountSettingsErrorSpec, SaveAccountSettingsPayloadSchema, SearchFilesErrorSpec, SearchFriendsErrorSpec, SendFriendRequestErrorSpec, SendIftttEventErrorSpec, ShareFilesErrorSpec, SharedFileSchema, SharedFileShareSchema, SharedFileSharedWithSchema, SharingCloneInfoSchema, SharingCloneInputSchema, SharingCloneStatusSchema, SharingShareInputSchema, SharingUnshareInputSchema, StartFromErrorSpec, StopRecordingTransferErrorSpec, StopSubscriptionErrorSpec, SubmitPaymentChangePlanErrorSpec, TouchFilesErrorSpec, TransferAddInputSchema, TransferAddTrackersInputSchema, TransferBaseSchema, TransferRemoveInputSchema, TransferSchema, TransferStatusSchema, TransferTypeSchema, TransfersListQuerySchema, TrashFileSchema, TunnelRouteSchema, TwoFactorRecoveryCodesSchema, UnshareFileErrorSpec, UpdateOAuthAppErrorSpec, UpdateRssFeedErrorSpec, UserSearchResultSchema, UserSubscriptionStatusSchema, ValidateTokenResponseSchema, VerifyTOTPErrorSpec, VerifyTOTPResponseSchema, VoucherLookupErrorSpec, ZipStatusSchema, addManyTransfers, addTransfer, addTransferTrackers, approveFriendRequest, buildAuthLoginUrl, buildFileApiContentUrl, buildFileApiDownloadUrl, buildFileApiMp4DownloadUrl, buildFileHlsStreamUrl, buildFileXspfPlaylistUrl, buildOAuthAppIconUrl, buildOAuthAuthorizeUrl, buildPutioUrl, canWriteFile, cancelTransfers, cancelZip, checkCodeMatch, classifyPaymentChangePlanResponse, cleanTransfers, clearAccount, clearEvents, clearRssFeedLogs, clients, cloneSharedFiles, confirmFastspringOrder, continueFiles, continuePublicShareFiles, continueSearch, continueTransfers, continueTrash, convertFileSelectionToMp4, convertFileToMp4, convertFilesToMp4, copyFile, countTransfers, countWaitingRequests, createAppSpecificPassword, createDownloadLinks, createFamilyInvite, createFileUploadFormData, createFileUploadRequest, createFolder, createFriendInvite, createOAuthApp, createOpenNodeCharge, createPaddleBillingUpdatePaymentMethodTransaction, createPaddleWaitingPayment, createPublicShare, createPutioSdkEffectClient, createPutioSdkPromiseClient, createRssFeed, createZip, decodePutioErrorEnvelope, definePutioOperationErrorSpec, deleteAllAppSpecificPasswords, deleteAppSpecificPassword, deleteConfigKey, deleteEvent, deleteFileExtraction, deleteFileMp4, deleteFileSelection, deleteFiles, deleteOAuthApp, deletePublicShare, deleteRssFeed, deleteTrash, denyFriendRequest, destroyAccount, emptyTrash, encodePathSegment, exchangeOAuthAuthorizationCode, exists, extractFiles, fallbackPutioErrorEnvelope, findNextFile, findNextVideo, forgotPassword, generateTOTP, getAccountInfo, getAccountSettings, getApiContentUrl, getApiDownloadUrl, getApiMp4DownloadUrl, getCode, getConfigKey, getConfigKeyWith, getDownloadLinks, getDownloadUrl, getEventTorrent, getFamilyInvite, getFile, getFileChild, getFriendInvite, getFriendSharedFolder, getGiftCard, getHlsMasterPlaylist, getHlsStreamUrl, getIftttStatus, getMp4Status, getOAuthApp, getPaddleBillingInvoiceUrl, getPaymentInfo, getPaymentVoucherInfo, getPodcastLinks, getPopularOAuthApps, getPublicShare, getPublicShareFileUrl, getRecoveryCodes, getRssFeed, getSharedWith, getSharingCloneInfo, getStartFrom, getTransfer, getTransferInfo, getTransferTorrent, getVoucher, getXspfPlaylistUrl, getZip, grants, isPutioApiError, isPutioAuthError, isPutioConfigurationError, isPutioContractError, isPutioErrorEnvelope, isPutioOperationError, isPutioRateLimitError, isPutioTransportError, isPutioValidationError, joinFamily, linkDevice, listAccountConfirmations, listAccountSubtitleLanguages, listActiveMp4Conversions, listAppSpecificPasswords, listEvents, listFamilyInvites, listFamilyMembers, listFileExtractions, listFileSubtitles, listFriendInvites, listFriends, listPaymentHistory, listPaymentInvites, listPaymentOptions, listPaymentPlans, listPublicShareFiles, listPublicShares, listRssFeedItems, listRssFeeds, listSentRequests, listSharedFiles, listTransfers, listTrash, listTunnelRoutes, listWaitingRequests, listZips, login, logout, makePutioFetchClient, makePutioFetchLayer, makePutioSdkEffectClientLayer, makePutioSdkLiveClientLayer, mapConfigurationError, mapContractError, mapTransportError, mapValidationError, moveFileSelection, moveFiles, normalizePutioSdkOptions, parseErrorBody, pauseRssFeed, previewPaymentChangePlan, putMp4ToMyFiles, putioSdkLayer, putioSdkLiveLayer, queryFiles, queryOAuthApps, readConfig, readConfigWith, reannounceTransfer, redeemPaymentVoucher, regenerateOAuthAppToken, regenerateRecoveryCodes, register, removeFamilyMember, removeFriend, removeRateLimitBan, removeTransfers, renameFile, reportPayments, requestArrayBuffer, requestJson, requestText, requestVoid, resetFileSortSettings, resetPassword, resetStartFrom, responseRateLimitHeaders, restoreTrash, resumeRssFeed, retryAllRssFeedItems, retryRssFeedItem, retryTransfer, revokeAllClients, revokeApp, revokeClient, saveAccountSettings, searchFiles, searchFriends, selectJsonField, selectJsonFields, sendFriendRequest, sendIftttEvent, setConfigKey, setFileSort, setFilesWatchStatus, setOAuthAppIcon, setStartFrom, shareFiles, stopPaymentSubscription, stopTransferRecording, submitPaymentChangePlan, toPutioResponseError, touchFiles, unshareFile, updateOAuthApp, updateRssFeed, uploadFile, validateToken, verifyTOTP, withOperationErrors, writeConfig };
|
|
5715
5721
|
|
|
5716
5722
|
//# sourceMappingURL=index.js.map
|