@putdotio/sdk 10.3.0 → 10.4.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 +88 -0
- package/dist/{forms-SpjrUB4N.js → forms-69GUrpXE.js} +3 -2
- package/dist/forms-69GUrpXE.js.map +1 -0
- package/dist/{index-FAgKSXHO.d.ts → index-GDSHjcgG.d.ts} +267 -21
- package/dist/index.d.ts +2 -2
- package/dist/index.js +578 -197
- package/dist/index.js.map +1 -1
- package/dist/utilities.d.ts +1 -1
- package/dist/utilities.js +1 -1
- package/package.json +4 -2
- package/dist/forms-SpjrUB4N.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as definePutioOperationErrorSpec, B as mapTransportError, C as PutioConfigurationError, D as PutioTransportError, E as PutioRateLimitError, F as isPutioOperationError, H as responseRateLimitHeaders, I as isPutioRateLimitError, L as makeResponseError, M as isPutioApiError, N as isPutioAuthError, O as PutioValidationError, P as isPutioErrorEnvelope, R as mapConfigurationError, S as PutioAuthError, T as PutioOperationError, U as withOperationErrors, V as parseErrorBody, _ as selectJsonFields, a as PutioSdkConfig, b as DEFAULT_PUTIO_WEB_APP_URL, c as makePutioFetchClient, d as makePutioSdkLayer, f as makePutioSdkLiveLayer, g as selectJsonField, h as requestVoid, i as PutioHttpClient, j as fallbackPutioErrorEnvelope, k as decodePutioErrorEnvelope, l as makePutioFetchLayer, m as requestJson, n as toCursorSelectionForm, o as buildPutioUrl, p as requestArrayBuffer, r as OkResponseSchema, s as encodePathSegment, t as joinCsv, u as makePutioSdkConfig, v as DEFAULT_PUTIO_API_BASE_URL, w as PutioErrorEnvelopeSchema, x as PutioApiError, y as DEFAULT_PUTIO_UPLOAD_BASE_URL, z as mapDecodeErrorToValidationError } from "./forms-
|
|
1
|
+
import { A as definePutioOperationErrorSpec, B as mapTransportError, C as PutioConfigurationError, D as PutioTransportError, E as PutioRateLimitError, F as isPutioOperationError, H as responseRateLimitHeaders, I as isPutioRateLimitError, L as makeResponseError, M as isPutioApiError, N as isPutioAuthError, O as PutioValidationError, P as isPutioErrorEnvelope, R as mapConfigurationError, S as PutioAuthError, T as PutioOperationError, U as withOperationErrors, V as parseErrorBody, _ as selectJsonFields, a as PutioSdkConfig, b as DEFAULT_PUTIO_WEB_APP_URL, c as makePutioFetchClient, d as makePutioSdkLayer, f as makePutioSdkLiveLayer, g as selectJsonField, h as requestVoid, i as PutioHttpClient, j as fallbackPutioErrorEnvelope, k as decodePutioErrorEnvelope, l as makePutioFetchLayer, m as requestJson, n as toCursorSelectionForm, o as buildPutioUrl, p as requestArrayBuffer, r as OkResponseSchema, s as encodePathSegment, t as joinCsv, u as makePutioSdkConfig, v as DEFAULT_PUTIO_API_BASE_URL, w as PutioErrorEnvelopeSchema, x as PutioApiError, y as DEFAULT_PUTIO_UPLOAD_BASE_URL, z as mapDecodeErrorToValidationError } from "./forms-69GUrpXE.js";
|
|
2
2
|
import { Cause, Context, Effect, Exit, Layer, ManagedRuntime, Option, Schema, SchemaIssue, SchemaParser } from "effect";
|
|
3
3
|
//#region src/domains/account.ts
|
|
4
4
|
const RequestedFlag$1 = Schema.Literal(1);
|
|
@@ -474,21 +474,24 @@ const OAuthRegeneratedTokenEnvelopeSchema = Schema.Struct({
|
|
|
474
474
|
access_token: Schema.String,
|
|
475
475
|
status: Schema.Literal("OK")
|
|
476
476
|
});
|
|
477
|
+
const OAuthAppIdSchema = Schema.Int.check(Schema.isGreaterThan(0));
|
|
478
|
+
const OAuthAppDescriptionSchema = Schema.String.check(Schema.isMinLength(10));
|
|
479
|
+
const OAuthAppUrlSchema = Schema.String.check(Schema.isMaxLength(255));
|
|
477
480
|
const OAuthAppCreateInputSchema = Schema.Struct({
|
|
478
|
-
callback:
|
|
479
|
-
description:
|
|
481
|
+
callback: OAuthAppUrlSchema,
|
|
482
|
+
description: OAuthAppDescriptionSchema,
|
|
480
483
|
hidden: Schema.optional(Schema.Boolean),
|
|
481
484
|
icon: Schema.optional(Schema.instanceOf(Blob)),
|
|
482
|
-
name: Schema.String,
|
|
483
|
-
website:
|
|
485
|
+
name: Schema.String.check(Schema.isMinLength(5)),
|
|
486
|
+
website: OAuthAppUrlSchema
|
|
484
487
|
});
|
|
485
488
|
const OAuthAppUpdateInputSchema = Schema.Struct({
|
|
486
|
-
callback:
|
|
487
|
-
description:
|
|
489
|
+
callback: OAuthAppUrlSchema,
|
|
490
|
+
description: OAuthAppDescriptionSchema,
|
|
488
491
|
hidden: Schema.optional(Schema.Boolean),
|
|
489
492
|
icon: Schema.optional(Schema.instanceOf(Blob)),
|
|
490
|
-
id:
|
|
491
|
-
website:
|
|
493
|
+
id: OAuthAppIdSchema,
|
|
494
|
+
website: OAuthAppUrlSchema
|
|
492
495
|
});
|
|
493
496
|
const OAuthSetIconInputSchema = Schema.Struct({ icon: Schema.instanceOf(Blob) });
|
|
494
497
|
const QueryOAuthAppsErrorSpec = definePutioOperationErrorSpec({
|
|
@@ -573,46 +576,60 @@ const queryOAuthApps = () => requestJson(OAuthAppsEnvelopeSchema, {
|
|
|
573
576
|
method: "GET",
|
|
574
577
|
path: "/v2/oauth/apps"
|
|
575
578
|
}).pipe(selectJsonField("apps"), withOperationErrors(QueryOAuthAppsErrorSpec));
|
|
576
|
-
const getOAuthApp = (id, options) =>
|
|
579
|
+
const getOAuthApp = (id, options) => Schema.decodeUnknownEffect(Schema.Struct({
|
|
580
|
+
edit: Schema.optional(Schema.Boolean),
|
|
581
|
+
id: OAuthAppIdSchema
|
|
582
|
+
}))({
|
|
583
|
+
edit: options?.edit,
|
|
584
|
+
id
|
|
585
|
+
}).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(OAuthAppWithTokenSchema, {
|
|
577
586
|
method: "GET",
|
|
578
|
-
path:
|
|
579
|
-
})
|
|
587
|
+
path: decodedInput.edit ? `/v2/oauth/apps/${encodePathSegment(decodedInput.id)}/edit` : `/v2/oauth/apps/${encodePathSegment(decodedInput.id)}`
|
|
588
|
+
})), withOperationErrors(GetOAuthAppErrorSpec));
|
|
580
589
|
const setOAuthAppIcon = (id, input) => {
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
590
|
+
return Schema.decodeUnknownEffect(Schema.Struct({
|
|
591
|
+
id: OAuthAppIdSchema,
|
|
592
|
+
input: OAuthSetIconInputSchema
|
|
593
|
+
}))({
|
|
594
|
+
id,
|
|
595
|
+
input
|
|
596
|
+
}).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => {
|
|
597
|
+
const formData = new FormData();
|
|
598
|
+
formData.append("icon", decodedInput.input.icon);
|
|
599
|
+
return requestJson(OkResponseSchema, {
|
|
600
|
+
body: {
|
|
601
|
+
type: "form-data",
|
|
602
|
+
value: formData
|
|
603
|
+
},
|
|
604
|
+
method: "POST",
|
|
605
|
+
path: `/v2/oauth/apps/${encodePathSegment(decodedInput.id)}/icon`
|
|
606
|
+
});
|
|
607
|
+
}));
|
|
591
608
|
};
|
|
592
|
-
const createOAuthApp = (input) => requestJson(OAuthAppEnvelopeSchema, {
|
|
609
|
+
const createOAuthApp = (input) => Schema.decodeUnknownEffect(OAuthAppCreateInputSchema)(input).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(OAuthAppEnvelopeSchema, {
|
|
593
610
|
body: {
|
|
594
611
|
type: "form-data",
|
|
595
|
-
value: makeCreateOAuthAppFormData(
|
|
612
|
+
value: makeCreateOAuthAppFormData(decodedInput)
|
|
596
613
|
},
|
|
597
614
|
method: "POST",
|
|
598
615
|
path: "/v2/oauth/apps/register"
|
|
599
|
-
})
|
|
600
|
-
const updateOAuthApp = (input) => requestJson(OAuthAppWithTokenSchema, {
|
|
616
|
+
})), withOperationErrors(CreateOAuthAppErrorSpec));
|
|
617
|
+
const updateOAuthApp = (input) => Schema.decodeUnknownEffect(OAuthAppUpdateInputSchema)(input).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(OAuthAppWithTokenSchema, {
|
|
601
618
|
body: {
|
|
602
619
|
type: "form-data",
|
|
603
|
-
value: makeUpdateOAuthAppFormData(
|
|
620
|
+
value: makeUpdateOAuthAppFormData(decodedInput)
|
|
604
621
|
},
|
|
605
622
|
method: "POST",
|
|
606
|
-
path: `/v2/oauth/apps/${encodePathSegment(
|
|
607
|
-
})
|
|
608
|
-
const deleteOAuthApp = (id) => requestJson(OkResponseSchema, {
|
|
623
|
+
path: `/v2/oauth/apps/${encodePathSegment(decodedInput.id)}`
|
|
624
|
+
})), withOperationErrors(UpdateOAuthAppErrorSpec));
|
|
625
|
+
const deleteOAuthApp = (id) => Schema.decodeUnknownEffect(OAuthAppIdSchema)(id).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedId) => requestJson(OkResponseSchema, {
|
|
609
626
|
method: "POST",
|
|
610
|
-
path: `/v2/oauth/apps/${encodePathSegment(
|
|
611
|
-
})
|
|
612
|
-
const regenerateOAuthAppToken = (id) => requestJson(OAuthRegeneratedTokenEnvelopeSchema, {
|
|
627
|
+
path: `/v2/oauth/apps/${encodePathSegment(decodedId)}/delete`
|
|
628
|
+
})), withOperationErrors(DeleteOAuthAppErrorSpec));
|
|
629
|
+
const regenerateOAuthAppToken = (id) => Schema.decodeUnknownEffect(OAuthAppIdSchema)(id).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedId) => requestJson(OAuthRegeneratedTokenEnvelopeSchema, {
|
|
613
630
|
method: "POST",
|
|
614
|
-
path: `/v2/oauth/apps/${encodePathSegment(
|
|
615
|
-
})
|
|
631
|
+
path: `/v2/oauth/apps/${encodePathSegment(decodedId)}/regenerate_token`
|
|
632
|
+
})), selectJsonField("access_token"), withOperationErrors(RegenerateOAuthAppTokenErrorSpec));
|
|
616
633
|
const getPopularOAuthApps = () => requestJson(PopularOAuthAppsEnvelopeSchema, {
|
|
617
634
|
method: "GET",
|
|
618
635
|
path: "/v2/oauth/apps/popular"
|
|
@@ -623,6 +640,16 @@ const LoginResponseSchema = Schema.Struct({
|
|
|
623
640
|
access_token: Schema.String,
|
|
624
641
|
user_id: Schema.Int
|
|
625
642
|
});
|
|
643
|
+
const OAuthAuthorizationCodeResponseSchema = Schema.Struct({ access_token: Schema.String });
|
|
644
|
+
const OAuthAuthorizationCodeExchangeErrorCodeSchema = Schema.Literals([
|
|
645
|
+
"access_denied",
|
|
646
|
+
"invalid_request",
|
|
647
|
+
"unauthorized_client"
|
|
648
|
+
]);
|
|
649
|
+
var OAuthAuthorizationCodeExchangeError = class extends Schema.TaggedErrorClass()("OAuthAuthorizationCodeExchangeError", {
|
|
650
|
+
code: OAuthAuthorizationCodeExchangeErrorCodeSchema,
|
|
651
|
+
status: Schema.Literal(400)
|
|
652
|
+
}) {};
|
|
626
653
|
const TokenScopeSchema = Schema.NullOr(Schema.Literals([
|
|
627
654
|
"default",
|
|
628
655
|
"two_factor",
|
|
@@ -744,6 +771,12 @@ const RegisterInputSchema = Schema.Struct({
|
|
|
744
771
|
username: Schema.String,
|
|
745
772
|
voucher_code: Schema.optional(Schema.String)
|
|
746
773
|
});
|
|
774
|
+
const OAuthAuthorizationCodeExchangeInputSchema = Schema.Struct({
|
|
775
|
+
clientId: Schema.Union([Schema.String.check(Schema.isMinLength(1)), Schema.Int.check(Schema.isGreaterThan(0))]),
|
|
776
|
+
clientSecret: Schema.String.check(Schema.isMinLength(1)),
|
|
777
|
+
code: Schema.String.check(Schema.isMinLength(1)),
|
|
778
|
+
redirectUri: Schema.optional(Schema.String.check(Schema.isMinLength(1)))
|
|
779
|
+
});
|
|
747
780
|
const LoginErrorSpec = definePutioOperationErrorSpec({
|
|
748
781
|
domain: "auth",
|
|
749
782
|
operation: "login",
|
|
@@ -985,6 +1018,30 @@ const buildAuthLoginUrl = (options) => buildPutioUrl(options.webAppUrl ?? "https
|
|
|
985
1018
|
response_type: options.responseType ?? "token",
|
|
986
1019
|
state: options.state
|
|
987
1020
|
});
|
|
1021
|
+
const isOAuthAuthorizationCodeExchangeErrorCode = Schema.is(OAuthAuthorizationCodeExchangeErrorCodeSchema);
|
|
1022
|
+
const mapOAuthAuthorizationCodeExchangeError = (error) => error instanceof PutioApiError && error.status === 400 && isOAuthAuthorizationCodeExchangeErrorCode(error.body.error) ? new OAuthAuthorizationCodeExchangeError({
|
|
1023
|
+
code: error.body.error,
|
|
1024
|
+
status: 400
|
|
1025
|
+
}) : error;
|
|
1026
|
+
const exchangeOAuthAuthorizationCode = (input) => Schema.decodeUnknownEffect(OAuthAuthorizationCodeExchangeInputSchema)(input).pipe(Effect.mapError(() => new PutioValidationError({ cause: {
|
|
1027
|
+
domain: "auth",
|
|
1028
|
+
operation: "exchangeAuthorizationCode",
|
|
1029
|
+
reason: "Invalid request input"
|
|
1030
|
+
} })), Effect.flatMap((decodedInput) => requestJson(OAuthAuthorizationCodeResponseSchema, {
|
|
1031
|
+
auth: { type: "none" },
|
|
1032
|
+
body: {
|
|
1033
|
+
type: "form",
|
|
1034
|
+
value: {
|
|
1035
|
+
client_id: decodedInput.clientId,
|
|
1036
|
+
client_secret: decodedInput.clientSecret,
|
|
1037
|
+
code: decodedInput.code,
|
|
1038
|
+
grant_type: "authorization_code",
|
|
1039
|
+
redirect_uri: decodedInput.redirectUri
|
|
1040
|
+
}
|
|
1041
|
+
},
|
|
1042
|
+
method: "POST",
|
|
1043
|
+
path: "/v2/oauth2/access_token"
|
|
1044
|
+
}).pipe(selectJsonField("access_token"), Effect.mapError(mapOAuthAuthorizationCodeExchangeError))));
|
|
988
1045
|
const login = (input) => requestJson(LoginResponseSchema, {
|
|
989
1046
|
auth: {
|
|
990
1047
|
type: "basic",
|
|
@@ -1326,6 +1383,16 @@ const deleteConfigKey = (key) => Schema.decodeUnknownEffect(ConfigKeySchema)(key
|
|
|
1326
1383
|
path: `/v2/config/${encodePathSegment(decodedKey)}`
|
|
1327
1384
|
})));
|
|
1328
1385
|
//#endregion
|
|
1386
|
+
//#region src/core/validation.ts
|
|
1387
|
+
const PositiveIntegerSchema = Schema.Int.check(Schema.isGreaterThan(0));
|
|
1388
|
+
const NonEmptyStringSchema = Schema.String.check(Schema.isMinLength(1));
|
|
1389
|
+
const decodeAndRun = (schema, input, run) => Schema.decodeUnknownEffect(schema)(input).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap(run));
|
|
1390
|
+
const makeCursorSelectionSchema = (idsField, excludeIdsField) => Schema.Struct({
|
|
1391
|
+
cursor: Schema.optional(NonEmptyStringSchema),
|
|
1392
|
+
[excludeIdsField]: Schema.optional(Schema.Array(PositiveIntegerSchema)),
|
|
1393
|
+
[idsField]: Schema.optional(Schema.Array(PositiveIntegerSchema).check(Schema.isMinLength(1)))
|
|
1394
|
+
}).check(Schema.makeFilter((input) => input.cursor !== void 0 || input[idsField] !== void 0, { expected: "a non-empty cursor or file ID selection" }));
|
|
1395
|
+
//#endregion
|
|
1329
1396
|
//#region src/domains/download-links.ts
|
|
1330
1397
|
const DownloadLinksStatusSchema = Schema.Literals([
|
|
1331
1398
|
"NEW",
|
|
@@ -1333,11 +1400,7 @@ const DownloadLinksStatusSchema = Schema.Literals([
|
|
|
1333
1400
|
"DONE",
|
|
1334
1401
|
"ERROR"
|
|
1335
1402
|
]);
|
|
1336
|
-
const DownloadLinksCreateInputSchema =
|
|
1337
|
-
cursor: Schema.optional(Schema.String),
|
|
1338
|
-
excludeIds: Schema.optional(Schema.Array(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)))),
|
|
1339
|
-
ids: Schema.optional(Schema.Array(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))))
|
|
1340
|
-
});
|
|
1403
|
+
const DownloadLinksCreateInputSchema = makeCursorSelectionSchema("ids", "excludeIds");
|
|
1341
1404
|
const DownloadLinksPayloadSchema = Schema.Struct({
|
|
1342
1405
|
download_links: Schema.Array(Schema.String),
|
|
1343
1406
|
media_links: Schema.Array(Schema.String),
|
|
@@ -1412,18 +1475,18 @@ const GetDownloadLinksErrorSpec = definePutioOperationErrorSpec({
|
|
|
1412
1475
|
{ statusCode: 404 }
|
|
1413
1476
|
]
|
|
1414
1477
|
});
|
|
1415
|
-
const createDownloadLinks = (input = {}) => requestJson(DownloadLinksCreateEnvelopeSchema, {
|
|
1478
|
+
const createDownloadLinks = (input = {}) => Schema.decodeUnknownEffect(DownloadLinksCreateInputSchema)(input).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(DownloadLinksCreateEnvelopeSchema, {
|
|
1416
1479
|
body: {
|
|
1417
1480
|
type: "form",
|
|
1418
|
-
value: toCursorSelectionForm(
|
|
1481
|
+
value: toCursorSelectionForm(decodedInput)
|
|
1419
1482
|
},
|
|
1420
1483
|
method: "POST",
|
|
1421
1484
|
path: "/v2/download_links/create"
|
|
1422
|
-
})
|
|
1423
|
-
const getDownloadLinks = (id) => requestJson(DownloadLinksInfoSchema, {
|
|
1485
|
+
})), selectJsonFields("id"), withOperationErrors(CreateDownloadLinksErrorSpec));
|
|
1486
|
+
const getDownloadLinks = (id) => Schema.decodeUnknownEffect(PositiveIntegerSchema)(id).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedId) => requestJson(DownloadLinksInfoSchema, {
|
|
1424
1487
|
method: "GET",
|
|
1425
|
-
path: `/v2/download_links/${encodePathSegment(
|
|
1426
|
-
})
|
|
1488
|
+
path: `/v2/download_links/${encodePathSegment(decodedId)}`
|
|
1489
|
+
})), withOperationErrors(GetDownloadLinksErrorSpec));
|
|
1427
1490
|
//#endregion
|
|
1428
1491
|
//#region src/domains/events.ts
|
|
1429
1492
|
const HistoryEventBaseSchema = Schema.Struct({
|
|
@@ -1572,23 +1635,23 @@ const GetEventTorrentErrorSpec = definePutioOperationErrorSpec({
|
|
|
1572
1635
|
{ statusCode: 500 }
|
|
1573
1636
|
]
|
|
1574
1637
|
});
|
|
1575
|
-
const listEvents = (query = {}) => requestJson(EventsListEnvelopeSchema, {
|
|
1638
|
+
const listEvents = (query = {}) => Schema.decodeUnknownEffect(EventsListQuerySchema)(query).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedQuery) => requestJson(EventsListEnvelopeSchema, {
|
|
1576
1639
|
method: "GET",
|
|
1577
1640
|
path: "/v2/events/list",
|
|
1578
|
-
query
|
|
1579
|
-
})
|
|
1580
|
-
const deleteEvent = (id) => requestJson(OkResponseSchema, {
|
|
1641
|
+
query: decodedQuery
|
|
1642
|
+
})), withOperationErrors(ListEventsErrorSpec));
|
|
1643
|
+
const deleteEvent = (id) => Schema.decodeUnknownEffect(PositiveIntegerSchema)(id).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedId) => requestJson(OkResponseSchema, {
|
|
1581
1644
|
method: "POST",
|
|
1582
|
-
path: `/v2/events/delete/${encodePathSegment(
|
|
1583
|
-
})
|
|
1645
|
+
path: `/v2/events/delete/${encodePathSegment(decodedId)}`
|
|
1646
|
+
})), withOperationErrors(DeleteEventErrorSpec));
|
|
1584
1647
|
const clearEvents = () => requestJson(OkResponseSchema, {
|
|
1585
1648
|
method: "POST",
|
|
1586
1649
|
path: "/v2/events/delete"
|
|
1587
1650
|
}).pipe(withOperationErrors(ClearEventsErrorSpec));
|
|
1588
|
-
const getEventTorrent = (id) => requestArrayBuffer({
|
|
1651
|
+
const getEventTorrent = (id) => Schema.decodeUnknownEffect(PositiveIntegerSchema)(id).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedId) => requestArrayBuffer({
|
|
1589
1652
|
method: "GET",
|
|
1590
|
-
path: `/v2/events/${encodePathSegment(
|
|
1591
|
-
})
|
|
1653
|
+
path: `/v2/events/${encodePathSegment(decodedId)}/torrent`
|
|
1654
|
+
})), withOperationErrors(GetEventTorrentErrorSpec));
|
|
1592
1655
|
//#endregion
|
|
1593
1656
|
//#region src/domains/family.ts
|
|
1594
1657
|
const NonNegativeIntegerSchema = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0));
|
|
@@ -1707,14 +1770,14 @@ const createFamilyInvite = () => requestJson(FamilyCreateInviteEnvelopeSchema, {
|
|
|
1707
1770
|
method: "POST",
|
|
1708
1771
|
path: "/v2/family/sub_account"
|
|
1709
1772
|
}).pipe(selectJsonFields("code"), withOperationErrors(CreateFamilyInviteErrorSpec));
|
|
1710
|
-
const removeFamilyMember = (username) => requestJson(OkResponseSchema, {
|
|
1773
|
+
const removeFamilyMember = (username) => Schema.decodeUnknownEffect(NonEmptyStringSchema)(username).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedUsername) => requestJson(OkResponseSchema, {
|
|
1711
1774
|
method: "DELETE",
|
|
1712
|
-
path: `/v2/family/sub_account/${encodePathSegment(
|
|
1713
|
-
})
|
|
1714
|
-
const joinFamily = (inviteCode) => requestJson(OkResponseSchema, {
|
|
1775
|
+
path: `/v2/family/sub_account/${encodePathSegment(decodedUsername)}`
|
|
1776
|
+
})), Effect.asVoid, withOperationErrors(RemoveFamilyMemberErrorSpec));
|
|
1777
|
+
const joinFamily = (inviteCode) => Schema.decodeUnknownEffect(NonEmptyStringSchema)(inviteCode).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInviteCode) => requestJson(OkResponseSchema, {
|
|
1715
1778
|
method: "POST",
|
|
1716
|
-
path: `/v2/family/join/${encodePathSegment(
|
|
1717
|
-
})
|
|
1779
|
+
path: `/v2/family/join/${encodePathSegment(decodedInviteCode)}`
|
|
1780
|
+
})), Effect.asVoid, withOperationErrors(JoinFamilyErrorSpec));
|
|
1718
1781
|
//#endregion
|
|
1719
1782
|
//#region src/domains/ifttt.ts
|
|
1720
1783
|
const IFTTTStatusEnvelopeSchema = Schema.Struct({
|
|
@@ -1765,6 +1828,8 @@ const sendIftttEvent = (input) => requestJson(OkResponseSchema, {
|
|
|
1765
1828
|
//#endregion
|
|
1766
1829
|
//#region src/domains/files.ts
|
|
1767
1830
|
const RequestedFlag = Schema.Literal(1);
|
|
1831
|
+
const NonNegativeFileIdSchema = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0));
|
|
1832
|
+
const PositiveFileIdSchema = Schema.Int.check(Schema.isGreaterThan(0));
|
|
1768
1833
|
const FileTypeSchema = Schema.Literals([
|
|
1769
1834
|
"FOLDER",
|
|
1770
1835
|
"FILE",
|
|
@@ -1795,6 +1860,19 @@ const FileSortSchema = Schema.Literals([
|
|
|
1795
1860
|
"WATCH_ASC",
|
|
1796
1861
|
"WATCH_DESC"
|
|
1797
1862
|
]);
|
|
1863
|
+
const FileSetSortInputSchema = Schema.Struct({
|
|
1864
|
+
fileId: NonNegativeFileIdSchema,
|
|
1865
|
+
sortBy: FileSortSchema
|
|
1866
|
+
});
|
|
1867
|
+
const FileCopyInputSchema = Schema.Struct({
|
|
1868
|
+
fileId: PositiveFileIdSchema,
|
|
1869
|
+
name: Schema.optional(Schema.String.check(Schema.isMinLength(1))),
|
|
1870
|
+
parentId: NonNegativeFileIdSchema
|
|
1871
|
+
});
|
|
1872
|
+
const FileTouchInputSchema = Schema.Struct({
|
|
1873
|
+
fileIds: Schema.Array(NonNegativeFileIdSchema).check(Schema.isMinLength(1)),
|
|
1874
|
+
updatedAt: Schema.optional(Schema.DateValid)
|
|
1875
|
+
});
|
|
1798
1876
|
const FileMediaMetadataSchema = Schema.Struct({
|
|
1799
1877
|
aspect_ratio: Schema.optional(Schema.NullOr(Schema.Number.check(Schema.isGreaterThanOrEqualTo(0)))),
|
|
1800
1878
|
codec: Schema.optional(Schema.NullOr(Schema.String)),
|
|
@@ -1865,6 +1943,11 @@ const FileQuerySchema = Schema.Struct({
|
|
|
1865
1943
|
stream_url: Schema.optional(RequestedFlag),
|
|
1866
1944
|
video_metadata: Schema.optional(RequestedFlag)
|
|
1867
1945
|
});
|
|
1946
|
+
const FileGetChildInputSchema = Schema.Struct({
|
|
1947
|
+
name: Schema.String.check(Schema.isMinLength(1)),
|
|
1948
|
+
parentId: NonNegativeFileIdSchema,
|
|
1949
|
+
query: Schema.optional(FileQuerySchema)
|
|
1950
|
+
});
|
|
1868
1951
|
const FilesListQuerySchema = FileQuerySchema.mapFields(({ codecs: _codecs, media_info: _mediaInfo, ...fields }) => fields).pipe(Schema.fieldsAssign({
|
|
1869
1952
|
breadcrumbs: Schema.optional(RequestedFlag),
|
|
1870
1953
|
codecs_parent: Schema.optional(RequestedFlag),
|
|
@@ -1936,6 +2019,10 @@ const FileDownloadUrlEnvelopeSchema = Schema.Struct({
|
|
|
1936
2019
|
status: Schema.Literal("OK"),
|
|
1937
2020
|
url: Schema.String
|
|
1938
2021
|
});
|
|
2022
|
+
const FileCanWriteEnvelopeSchema = Schema.Struct({
|
|
2023
|
+
status: Schema.Literal("OK"),
|
|
2024
|
+
user_id: Schema.Int
|
|
2025
|
+
});
|
|
1939
2026
|
const FileUploadTransferSchema = Schema.Struct({
|
|
1940
2027
|
id: Schema.Int,
|
|
1941
2028
|
name: Schema.String
|
|
@@ -2084,6 +2171,61 @@ const GetFileErrorSpec = definePutioOperationErrorSpec({
|
|
|
2084
2171
|
statusCode: 401
|
|
2085
2172
|
}]
|
|
2086
2173
|
});
|
|
2174
|
+
const GetFileChildErrorSpec = definePutioOperationErrorSpec({
|
|
2175
|
+
domain: "files",
|
|
2176
|
+
operation: "getChild",
|
|
2177
|
+
knownErrors: [
|
|
2178
|
+
{ statusCode: 400 },
|
|
2179
|
+
{
|
|
2180
|
+
errorType: "invalid_scope",
|
|
2181
|
+
statusCode: 401
|
|
2182
|
+
},
|
|
2183
|
+
{ statusCode: 403 },
|
|
2184
|
+
{ statusCode: 404 }
|
|
2185
|
+
]
|
|
2186
|
+
});
|
|
2187
|
+
const CopyFileErrorSpec = definePutioOperationErrorSpec({
|
|
2188
|
+
domain: "files",
|
|
2189
|
+
operation: "copy",
|
|
2190
|
+
knownErrors: [
|
|
2191
|
+
{
|
|
2192
|
+
errorType: "NAME_ALREADY_EXIST",
|
|
2193
|
+
statusCode: 400
|
|
2194
|
+
},
|
|
2195
|
+
{
|
|
2196
|
+
errorType: "invalid_scope",
|
|
2197
|
+
statusCode: 401
|
|
2198
|
+
},
|
|
2199
|
+
{ statusCode: 400 },
|
|
2200
|
+
{ statusCode: 403 },
|
|
2201
|
+
{ statusCode: 404 }
|
|
2202
|
+
]
|
|
2203
|
+
});
|
|
2204
|
+
const TouchFilesErrorSpec = definePutioOperationErrorSpec({
|
|
2205
|
+
domain: "files",
|
|
2206
|
+
operation: "touch",
|
|
2207
|
+
knownErrors: [
|
|
2208
|
+
{
|
|
2209
|
+
errorType: "invalid_scope",
|
|
2210
|
+
statusCode: 401
|
|
2211
|
+
},
|
|
2212
|
+
{ statusCode: 400 },
|
|
2213
|
+
{ statusCode: 403 }
|
|
2214
|
+
]
|
|
2215
|
+
});
|
|
2216
|
+
const CanWriteFileErrorSpec = definePutioOperationErrorSpec({
|
|
2217
|
+
domain: "files",
|
|
2218
|
+
operation: "canWrite",
|
|
2219
|
+
knownErrors: [
|
|
2220
|
+
{
|
|
2221
|
+
errorType: "invalid_scope",
|
|
2222
|
+
statusCode: 401
|
|
2223
|
+
},
|
|
2224
|
+
{ statusCode: 402 },
|
|
2225
|
+
{ statusCode: 403 },
|
|
2226
|
+
{ statusCode: 404 }
|
|
2227
|
+
]
|
|
2228
|
+
});
|
|
2087
2229
|
const SearchFilesErrorSpec = definePutioOperationErrorSpec({
|
|
2088
2230
|
domain: "files",
|
|
2089
2231
|
operation: "search",
|
|
@@ -2382,6 +2524,46 @@ function getFile(input) {
|
|
|
2382
2524
|
if (input.query === void 0) return effect;
|
|
2383
2525
|
return ensureFileQueryFields(effect, input.query);
|
|
2384
2526
|
}
|
|
2527
|
+
function getFileChild(input) {
|
|
2528
|
+
return Schema.decodeUnknownEffect(FileGetChildInputSchema)(input).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => {
|
|
2529
|
+
const effect = requestJson(FileEnvelopeSchema, {
|
|
2530
|
+
method: "GET",
|
|
2531
|
+
path: `/v2/files/${encodePathSegment(decodedInput.parentId)}/child`,
|
|
2532
|
+
query: {
|
|
2533
|
+
...decodedInput.query,
|
|
2534
|
+
name: decodedInput.name
|
|
2535
|
+
}
|
|
2536
|
+
}).pipe(selectJsonField("file"), withOperationErrors(GetFileChildErrorSpec));
|
|
2537
|
+
return decodedInput.query === void 0 ? effect : ensureFileQueryFields(effect, decodedInput.query);
|
|
2538
|
+
}));
|
|
2539
|
+
}
|
|
2540
|
+
const copyFile = (input) => Schema.decodeUnknownEffect(FileCopyInputSchema)(input).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(FileEnvelopeSchema, {
|
|
2541
|
+
body: {
|
|
2542
|
+
type: "form",
|
|
2543
|
+
value: {
|
|
2544
|
+
file_id: decodedInput.fileId,
|
|
2545
|
+
name: decodedInput.name,
|
|
2546
|
+
parent_id: decodedInput.parentId
|
|
2547
|
+
}
|
|
2548
|
+
},
|
|
2549
|
+
method: "POST",
|
|
2550
|
+
path: "/v2/files/copy"
|
|
2551
|
+
})), selectJsonField("file"), withOperationErrors(CopyFileErrorSpec));
|
|
2552
|
+
const touchFiles = (input) => Schema.decodeUnknownEffect(FileTouchInputSchema)(input).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(OkResponseSchema, {
|
|
2553
|
+
body: {
|
|
2554
|
+
type: "form",
|
|
2555
|
+
value: {
|
|
2556
|
+
file_ids: joinCsv(decodedInput.fileIds),
|
|
2557
|
+
updated_at: decodedInput.updatedAt?.toISOString()
|
|
2558
|
+
}
|
|
2559
|
+
},
|
|
2560
|
+
method: "POST",
|
|
2561
|
+
path: "/v2/files/touch"
|
|
2562
|
+
})), Effect.asVoid, withOperationErrors(TouchFilesErrorSpec));
|
|
2563
|
+
const canWriteFile = (fileId) => Schema.decodeUnknownEffect(PositiveFileIdSchema)(fileId).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedFileId) => requestJson(FileCanWriteEnvelopeSchema, {
|
|
2564
|
+
method: "GET",
|
|
2565
|
+
path: `/v2/files/${encodePathSegment(decodedFileId)}/can-write`
|
|
2566
|
+
})), selectJsonField("user_id"), withOperationErrors(CanWriteFileErrorSpec));
|
|
2385
2567
|
const searchFiles = (query) => requestJson(FilesSearchEnvelopeSchema, {
|
|
2386
2568
|
method: "GET",
|
|
2387
2569
|
path: "/v2/files/search",
|
|
@@ -2396,6 +2578,21 @@ const continueSearch = (cursor, query = {}) => requestJson(FilesSearchEnvelopeSc
|
|
|
2396
2578
|
path: "/v2/files/search/continue",
|
|
2397
2579
|
query
|
|
2398
2580
|
}).pipe(withOperationErrors(SearchFilesErrorSpec));
|
|
2581
|
+
const setFileSort = (input) => Schema.decodeUnknownEffect(FileSetSortInputSchema)(input).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(OkResponseSchema, {
|
|
2582
|
+
body: {
|
|
2583
|
+
type: "form",
|
|
2584
|
+
value: {
|
|
2585
|
+
file_id: decodedInput.fileId,
|
|
2586
|
+
sort_by: decodedInput.sortBy
|
|
2587
|
+
}
|
|
2588
|
+
},
|
|
2589
|
+
method: "POST",
|
|
2590
|
+
path: "/v2/files/set-sort-by"
|
|
2591
|
+
})), Effect.asVoid);
|
|
2592
|
+
const resetFileSortSettings = () => requestJson(OkResponseSchema, {
|
|
2593
|
+
method: "POST",
|
|
2594
|
+
path: "/v2/files/remove-sort-by-settings"
|
|
2595
|
+
}).pipe(Effect.asVoid);
|
|
2399
2596
|
const createFolder = (input) => requestJson(FileEnvelopeSchema, {
|
|
2400
2597
|
body: {
|
|
2401
2598
|
type: "form",
|
|
@@ -2806,14 +3003,15 @@ const FriendSharedFolderErrorSpec = definePutioOperationErrorSpec({
|
|
|
2806
3003
|
{ statusCode: 404 }
|
|
2807
3004
|
]
|
|
2808
3005
|
});
|
|
3006
|
+
const decodeUsername = (username) => Schema.decodeUnknownEffect(NonEmptyStringSchema)(username).pipe(Effect.mapError(mapDecodeErrorToValidationError));
|
|
2809
3007
|
const listFriends = () => requestJson(FriendsListEnvelopeSchema, {
|
|
2810
3008
|
method: "GET",
|
|
2811
3009
|
path: "/v2/friends/list"
|
|
2812
3010
|
}).pipe(selectJsonFields("friends", "total"), withOperationErrors(ListFriendsErrorSpec));
|
|
2813
|
-
const searchFriends = (username) => requestJson(FriendSearchEnvelopeSchema, {
|
|
3011
|
+
const searchFriends = (username) => decodeUsername(username).pipe(Effect.flatMap((decodedUsername) => requestJson(FriendSearchEnvelopeSchema, {
|
|
2814
3012
|
method: "GET",
|
|
2815
|
-
path: `/v2/friends/user-search/${encodePathSegment(
|
|
2816
|
-
})
|
|
3013
|
+
path: `/v2/friends/user-search/${encodePathSegment(decodedUsername)}`
|
|
3014
|
+
})), selectJsonField("users"), withOperationErrors(SearchFriendsErrorSpec));
|
|
2817
3015
|
const listWaitingRequests = () => requestJson(FriendRequestsEnvelopeSchema, {
|
|
2818
3016
|
method: "GET",
|
|
2819
3017
|
path: "/v2/friends/waiting-requests"
|
|
@@ -2826,26 +3024,26 @@ const listSentRequests = () => requestJson(FriendRequestsEnvelopeSchema, {
|
|
|
2826
3024
|
method: "GET",
|
|
2827
3025
|
path: "/v2/friends/sent-requests"
|
|
2828
3026
|
}).pipe(selectJsonField("friends"), withOperationErrors(ListSentRequestsErrorSpec));
|
|
2829
|
-
const sendFriendRequest = (username) => requestJson(OkResponseSchema, {
|
|
3027
|
+
const sendFriendRequest = (username) => decodeUsername(username).pipe(Effect.flatMap((decodedUsername) => requestJson(OkResponseSchema, {
|
|
2830
3028
|
method: "POST",
|
|
2831
|
-
path: `/v2/friends/${encodePathSegment(
|
|
2832
|
-
})
|
|
2833
|
-
const removeFriend = (username) => requestJson(OkResponseSchema, {
|
|
3029
|
+
path: `/v2/friends/${encodePathSegment(decodedUsername)}/request`
|
|
3030
|
+
})), withOperationErrors(SendFriendRequestErrorSpec));
|
|
3031
|
+
const removeFriend = (username) => decodeUsername(username).pipe(Effect.flatMap((decodedUsername) => requestJson(OkResponseSchema, {
|
|
2834
3032
|
method: "POST",
|
|
2835
|
-
path: `/v2/friends/${encodePathSegment(
|
|
2836
|
-
})
|
|
2837
|
-
const approveFriendRequest = (username) => requestJson(OkResponseSchema, {
|
|
3033
|
+
path: `/v2/friends/${encodePathSegment(decodedUsername)}/unfriend`
|
|
3034
|
+
})), withOperationErrors(RemoveFriendErrorSpec));
|
|
3035
|
+
const approveFriendRequest = (username) => decodeUsername(username).pipe(Effect.flatMap((decodedUsername) => requestJson(OkResponseSchema, {
|
|
2838
3036
|
method: "POST",
|
|
2839
|
-
path: `/v2/friends/${encodePathSegment(
|
|
2840
|
-
})
|
|
2841
|
-
const denyFriendRequest = (username) => requestJson(OkResponseSchema, {
|
|
3037
|
+
path: `/v2/friends/${encodePathSegment(decodedUsername)}/approve`
|
|
3038
|
+
})), withOperationErrors(ApproveFriendRequestErrorSpec));
|
|
3039
|
+
const denyFriendRequest = (username) => decodeUsername(username).pipe(Effect.flatMap((decodedUsername) => requestJson(OkResponseSchema, {
|
|
2842
3040
|
method: "POST",
|
|
2843
|
-
path: `/v2/friends/${encodePathSegment(
|
|
2844
|
-
})
|
|
2845
|
-
const getFriendSharedFolder = (username) => requestJson(FriendSharedFolderEnvelopeSchema, {
|
|
3041
|
+
path: `/v2/friends/${encodePathSegment(decodedUsername)}/deny`
|
|
3042
|
+
})), withOperationErrors(DenyFriendRequestErrorSpec));
|
|
3043
|
+
const getFriendSharedFolder = (username) => decodeUsername(username).pipe(Effect.flatMap((decodedUsername) => requestJson(FriendSharedFolderEnvelopeSchema, {
|
|
2846
3044
|
method: "GET",
|
|
2847
|
-
path: `/v2/friends/${encodePathSegment(
|
|
2848
|
-
})
|
|
3045
|
+
path: `/v2/friends/${encodePathSegment(decodedUsername)}/files`
|
|
3046
|
+
})), selectJsonField("file"), withOperationErrors(FriendSharedFolderErrorSpec));
|
|
2849
3047
|
//#endregion
|
|
2850
3048
|
//#region src/domains/payment.ts
|
|
2851
3049
|
const PaymentPlanTypeSchema = Schema.Literals(["onetime", "subscription"]);
|
|
@@ -3516,6 +3714,37 @@ const createOpenNodeCharge = (planPath) => requestJson(PaymentOpenNodeChargeEnve
|
|
|
3516
3714
|
path: "/v2/payment/methods/opennode/charge"
|
|
3517
3715
|
}).pipe(selectJsonField("opennode"), Effect.map(({ checkout_url }) => checkout_url), withOperationErrors(CreateOpenNodeChargeErrorSpec));
|
|
3518
3716
|
//#endregion
|
|
3717
|
+
//#region src/domains/podcast.ts
|
|
3718
|
+
const PodcastLinkTypeSchema = Schema.Literals([
|
|
3719
|
+
"all",
|
|
3720
|
+
"audio",
|
|
3721
|
+
"video",
|
|
3722
|
+
"mp4"
|
|
3723
|
+
]);
|
|
3724
|
+
const PodcastGetLinksInputSchema = Schema.Struct({
|
|
3725
|
+
parentId: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)),
|
|
3726
|
+
types: Schema.optional(Schema.Array(PodcastLinkTypeSchema).check(Schema.isMinLength(1)))
|
|
3727
|
+
});
|
|
3728
|
+
const PodcastLinksSchema = Schema.Struct({
|
|
3729
|
+
all: Schema.optional(Schema.String),
|
|
3730
|
+
audio: Schema.optional(Schema.String),
|
|
3731
|
+
video: Schema.optional(Schema.String),
|
|
3732
|
+
mp4: Schema.optional(Schema.String)
|
|
3733
|
+
});
|
|
3734
|
+
const PodcastLinksEnvelopeSchema = Schema.Struct({
|
|
3735
|
+
links: PodcastLinksSchema,
|
|
3736
|
+
status: Schema.Literal("OK"),
|
|
3737
|
+
token: Schema.String
|
|
3738
|
+
});
|
|
3739
|
+
const getPodcastLinks = (input) => Schema.decodeUnknownEffect(PodcastGetLinksInputSchema)(input).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(PodcastLinksEnvelopeSchema, {
|
|
3740
|
+
method: "GET",
|
|
3741
|
+
path: "/v2/podcast/links",
|
|
3742
|
+
query: {
|
|
3743
|
+
parent_id: decodedInput.parentId,
|
|
3744
|
+
type: decodedInput.types ? joinCsv(decodedInput.types) : void 0
|
|
3745
|
+
}
|
|
3746
|
+
})), selectJsonFields("links", "token"));
|
|
3747
|
+
//#endregion
|
|
3519
3748
|
//#region src/domains/rss.ts
|
|
3520
3749
|
const RssFeedSchema = Schema.Struct({
|
|
3521
3750
|
created_at: Schema.String,
|
|
@@ -3541,10 +3770,18 @@ const RssFeedParamsSchema = Schema.Struct({
|
|
|
3541
3770
|
dont_process_whole_feed: Schema.optional(Schema.Boolean),
|
|
3542
3771
|
keyword: Schema.optional(Schema.NullOr(Schema.String)),
|
|
3543
3772
|
parent_dir_id: Schema.optional(Schema.Union([Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)), Schema.Literal("newf")])),
|
|
3544
|
-
rss_source_url:
|
|
3545
|
-
title:
|
|
3773
|
+
rss_source_url: NonEmptyStringSchema,
|
|
3774
|
+
title: NonEmptyStringSchema,
|
|
3546
3775
|
unwanted_keywords: Schema.optional(Schema.String)
|
|
3547
3776
|
});
|
|
3777
|
+
const RssFeedUpdateInputSchema = Schema.Struct({
|
|
3778
|
+
id: PositiveIntegerSchema,
|
|
3779
|
+
params: RssFeedParamsSchema
|
|
3780
|
+
});
|
|
3781
|
+
const RssFeedItemRetryInputSchema = Schema.Struct({
|
|
3782
|
+
feedId: PositiveIntegerSchema,
|
|
3783
|
+
itemId: PositiveIntegerSchema
|
|
3784
|
+
});
|
|
3548
3785
|
const RssFeedItemBaseSchema = Schema.Struct({
|
|
3549
3786
|
detected_date: Schema.String,
|
|
3550
3787
|
id: Schema.Int.check(Schema.isGreaterThan(0)),
|
|
@@ -3794,54 +4031,60 @@ const listRssFeeds = () => requestJson(RssFeedsEnvelopeSchema, {
|
|
|
3794
4031
|
method: "GET",
|
|
3795
4032
|
path: "/v2/rss/list"
|
|
3796
4033
|
}).pipe(selectJsonField("feeds"), withOperationErrors(ListRssFeedsErrorSpec));
|
|
3797
|
-
const getRssFeed = (id) => requestJson(RssFeedEnvelopeSchema, {
|
|
4034
|
+
const getRssFeed = (id) => Schema.decodeUnknownEffect(PositiveIntegerSchema)(id).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedId) => requestJson(RssFeedEnvelopeSchema, {
|
|
3798
4035
|
method: "GET",
|
|
3799
|
-
path: `/v2/rss/${encodePathSegment(
|
|
3800
|
-
})
|
|
3801
|
-
const createRssFeed = (params) => requestJson(RssFeedEnvelopeSchema, {
|
|
4036
|
+
path: `/v2/rss/${encodePathSegment(decodedId)}`
|
|
4037
|
+
})), selectJsonField("feed"), withOperationErrors(GetRssFeedErrorSpec));
|
|
4038
|
+
const createRssFeed = (params) => Schema.decodeUnknownEffect(RssFeedParamsSchema)(params).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedParams) => requestJson(RssFeedEnvelopeSchema, {
|
|
3802
4039
|
body: {
|
|
3803
4040
|
type: "form",
|
|
3804
|
-
value: toCreateBody(
|
|
4041
|
+
value: toCreateBody(decodedParams)
|
|
3805
4042
|
},
|
|
3806
4043
|
method: "POST",
|
|
3807
4044
|
path: "/v2/rss/create"
|
|
3808
|
-
})
|
|
3809
|
-
const updateRssFeed = (id, params) =>
|
|
4045
|
+
})), selectJsonField("feed"), withOperationErrors(CreateRssFeedErrorSpec));
|
|
4046
|
+
const updateRssFeed = (id, params) => Schema.decodeUnknownEffect(RssFeedUpdateInputSchema)({
|
|
4047
|
+
id,
|
|
4048
|
+
params
|
|
4049
|
+
}).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(OkResponseSchema, {
|
|
3810
4050
|
body: {
|
|
3811
4051
|
type: "form",
|
|
3812
|
-
value: toUpdateBody(params)
|
|
4052
|
+
value: toUpdateBody(decodedInput.params)
|
|
3813
4053
|
},
|
|
3814
4054
|
method: "POST",
|
|
3815
|
-
path: `/v2/rss/${encodePathSegment(id)}`
|
|
3816
|
-
})
|
|
3817
|
-
const pauseRssFeed = (id) => requestJson(OkResponseSchema, {
|
|
4055
|
+
path: `/v2/rss/${encodePathSegment(decodedInput.id)}`
|
|
4056
|
+
})), withOperationErrors(UpdateRssFeedErrorSpec));
|
|
4057
|
+
const pauseRssFeed = (id) => Schema.decodeUnknownEffect(PositiveIntegerSchema)(id).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedId) => requestJson(OkResponseSchema, {
|
|
3818
4058
|
method: "POST",
|
|
3819
|
-
path: `/v2/rss/${encodePathSegment(
|
|
3820
|
-
})
|
|
3821
|
-
const resumeRssFeed = (id) => requestJson(OkResponseSchema, {
|
|
4059
|
+
path: `/v2/rss/${encodePathSegment(decodedId)}/pause`
|
|
4060
|
+
})), withOperationErrors(PauseRssFeedErrorSpec));
|
|
4061
|
+
const resumeRssFeed = (id) => Schema.decodeUnknownEffect(PositiveIntegerSchema)(id).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedId) => requestJson(OkResponseSchema, {
|
|
3822
4062
|
method: "POST",
|
|
3823
|
-
path: `/v2/rss/${encodePathSegment(
|
|
3824
|
-
})
|
|
3825
|
-
const deleteRssFeed = (id) => requestJson(OkResponseSchema, {
|
|
4063
|
+
path: `/v2/rss/${encodePathSegment(decodedId)}/resume`
|
|
4064
|
+
})), withOperationErrors(ResumeRssFeedErrorSpec));
|
|
4065
|
+
const deleteRssFeed = (id) => Schema.decodeUnknownEffect(PositiveIntegerSchema)(id).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedId) => requestJson(OkResponseSchema, {
|
|
3826
4066
|
method: "POST",
|
|
3827
|
-
path: `/v2/rss/${encodePathSegment(
|
|
3828
|
-
})
|
|
3829
|
-
const listRssFeedItems = (id) => requestJson(RssFeedItemsEnvelopeSchema, {
|
|
4067
|
+
path: `/v2/rss/${encodePathSegment(decodedId)}/delete`
|
|
4068
|
+
})), withOperationErrors(DeleteRssFeedErrorSpec));
|
|
4069
|
+
const listRssFeedItems = (id) => Schema.decodeUnknownEffect(PositiveIntegerSchema)(id).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedId) => requestJson(RssFeedItemsEnvelopeSchema, {
|
|
3830
4070
|
method: "GET",
|
|
3831
|
-
path: `/v2/rss/${encodePathSegment(
|
|
3832
|
-
})
|
|
3833
|
-
const clearRssFeedLogs = (id) => requestJson(OkResponseSchema, {
|
|
4071
|
+
path: `/v2/rss/${encodePathSegment(decodedId)}/items`
|
|
4072
|
+
})), selectJsonFields("feed", "items"), withOperationErrors(ListRssFeedItemsErrorSpec));
|
|
4073
|
+
const clearRssFeedLogs = (id) => Schema.decodeUnknownEffect(PositiveIntegerSchema)(id).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedId) => requestJson(OkResponseSchema, {
|
|
3834
4074
|
method: "POST",
|
|
3835
|
-
path: `/v2/rss/${encodePathSegment(
|
|
3836
|
-
})
|
|
3837
|
-
const retryRssFeedItem = (feedId, itemId) =>
|
|
4075
|
+
path: `/v2/rss/${encodePathSegment(decodedId)}/clear-log`
|
|
4076
|
+
})), withOperationErrors(ClearRssFeedLogsErrorSpec));
|
|
4077
|
+
const retryRssFeedItem = (feedId, itemId) => Schema.decodeUnknownEffect(RssFeedItemRetryInputSchema)({
|
|
4078
|
+
feedId,
|
|
4079
|
+
itemId
|
|
4080
|
+
}).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(OkResponseSchema, {
|
|
3838
4081
|
method: "POST",
|
|
3839
|
-
path: `/v2/rss/${encodePathSegment(feedId)}/items/${encodePathSegment(itemId)}/retry`
|
|
3840
|
-
})
|
|
3841
|
-
const retryAllRssFeedItems = (feedId) => requestJson(OkResponseSchema, {
|
|
4082
|
+
path: `/v2/rss/${encodePathSegment(decodedInput.feedId)}/items/${encodePathSegment(decodedInput.itemId)}/retry`
|
|
4083
|
+
})), withOperationErrors(RetryRssFeedItemErrorSpec));
|
|
4084
|
+
const retryAllRssFeedItems = (feedId) => Schema.decodeUnknownEffect(PositiveIntegerSchema)(feedId).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedFeedId) => requestJson(OkResponseSchema, {
|
|
3842
4085
|
method: "POST",
|
|
3843
|
-
path: `/v2/rss/${encodePathSegment(
|
|
3844
|
-
})
|
|
4086
|
+
path: `/v2/rss/${encodePathSegment(decodedFeedId)}/retry-all`
|
|
4087
|
+
})), withOperationErrors(RetryAllRssFeedItemsErrorSpec));
|
|
3845
4088
|
//#endregion
|
|
3846
4089
|
//#region src/domains/sharing.ts
|
|
3847
4090
|
const SharingCloneStatusSchema = Schema.Literals([
|
|
@@ -3851,10 +4094,10 @@ const SharingCloneStatusSchema = Schema.Literals([
|
|
|
3851
4094
|
"ERROR"
|
|
3852
4095
|
]);
|
|
3853
4096
|
const SharingCloneInputSchema = Schema.Struct({
|
|
3854
|
-
cursor: Schema.optional(
|
|
3855
|
-
excludeIds: Schema.optional(Schema.Array(
|
|
3856
|
-
ids: Schema.optional(Schema.Array(
|
|
3857
|
-
parentId: Schema.optional(Schema.Int)
|
|
4097
|
+
cursor: Schema.optional(NonEmptyStringSchema),
|
|
4098
|
+
excludeIds: Schema.optional(Schema.Array(PositiveIntegerSchema)),
|
|
4099
|
+
ids: Schema.optional(Schema.Array(PositiveIntegerSchema)),
|
|
4100
|
+
parentId: Schema.optional(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)))
|
|
3858
4101
|
});
|
|
3859
4102
|
const SharingCloneEnvelopeSchema = Schema.Struct({
|
|
3860
4103
|
id: Schema.Int.check(Schema.isGreaterThan(0)),
|
|
@@ -3874,11 +4117,11 @@ const SharingCloneInfoSchema = Schema.Union([Schema.Struct({
|
|
|
3874
4117
|
})]);
|
|
3875
4118
|
const SharedFileSchema = FileBroadSchema.pipe(Schema.fieldsAssign({ shared_with: Schema.Union([Schema.Literal("everyone"), Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))]) }));
|
|
3876
4119
|
const SharingShareInputSchema = Schema.Struct({
|
|
3877
|
-
cursor: Schema.optional(
|
|
3878
|
-
excludeIds: Schema.optional(Schema.Array(
|
|
3879
|
-
ids: Schema.optional(Schema.Array(
|
|
4120
|
+
cursor: Schema.optional(NonEmptyStringSchema),
|
|
4121
|
+
excludeIds: Schema.optional(Schema.Array(PositiveIntegerSchema)),
|
|
4122
|
+
ids: Schema.optional(Schema.Array(PositiveIntegerSchema)),
|
|
3880
4123
|
target: Schema.Union([Schema.Struct({ type: Schema.Literal("everyone") }), Schema.Struct({
|
|
3881
|
-
friendNames: Schema.Array(
|
|
4124
|
+
friendNames: Schema.Array(NonEmptyStringSchema).check(Schema.isMinLength(1)),
|
|
3882
4125
|
type: Schema.Literal("friends")
|
|
3883
4126
|
})])
|
|
3884
4127
|
});
|
|
@@ -3900,8 +4143,8 @@ const SharedFileSharedWithSchema = Schema.Union([Schema.Struct({
|
|
|
3900
4143
|
status: Schema.optional(Schema.Literal("OK"))
|
|
3901
4144
|
})]);
|
|
3902
4145
|
const SharingUnshareInputSchema = Schema.Struct({
|
|
3903
|
-
fileId:
|
|
3904
|
-
shares: Schema.optional(Schema.Array(Schema.Union([
|
|
4146
|
+
fileId: PositiveIntegerSchema,
|
|
4147
|
+
shares: Schema.optional(Schema.Array(Schema.Union([PositiveIntegerSchema, NonEmptyStringSchema])))
|
|
3905
4148
|
});
|
|
3906
4149
|
const PublicShareSchema = Schema.Struct({
|
|
3907
4150
|
created_at: Schema.String,
|
|
@@ -3951,7 +4194,7 @@ const PublicShareListQuerySchema = Schema.Struct({
|
|
|
3951
4194
|
hidden: Schema.optional(Schema.Literal(1)),
|
|
3952
4195
|
media_info_parent: Schema.optional(Schema.Literal(1)),
|
|
3953
4196
|
mp4_status_parent: Schema.optional(Schema.Literal(1)),
|
|
3954
|
-
parent_id: Schema.optional(Schema.Int),
|
|
4197
|
+
parent_id: Schema.optional(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))),
|
|
3955
4198
|
per_page: Schema.optional(Schema.Int.check(Schema.isGreaterThan(0))),
|
|
3956
4199
|
sort: Schema.optional(Schema.String),
|
|
3957
4200
|
sort_by: Schema.optional(Schema.String),
|
|
@@ -3959,6 +4202,10 @@ const PublicShareListQuerySchema = Schema.Struct({
|
|
|
3959
4202
|
total: Schema.optional(Schema.Literal(1)),
|
|
3960
4203
|
video_metadata_parent: Schema.optional(Schema.Literal(1))
|
|
3961
4204
|
});
|
|
4205
|
+
const PublicShareContinueInputSchema = Schema.Struct({
|
|
4206
|
+
cursor: NonEmptyStringSchema,
|
|
4207
|
+
query: Schema.Struct({ per_page: Schema.optional(Schema.Int.check(Schema.isGreaterThan(0))) })
|
|
4208
|
+
});
|
|
3962
4209
|
const CreateSharingCloneErrorSpec = definePutioOperationErrorSpec({
|
|
3963
4210
|
domain: "sharing",
|
|
3964
4211
|
operation: "clone",
|
|
@@ -4152,90 +4399,86 @@ const GetPublicShareFileUrlErrorSpec = definePutioOperationErrorSpec({
|
|
|
4152
4399
|
{ statusCode: 404 }
|
|
4153
4400
|
]
|
|
4154
4401
|
});
|
|
4155
|
-
const toShareTarget = (target) =>
|
|
4156
|
-
|
|
4157
|
-
if (target.friendNames.length === 0) return Effect.fail(new PutioValidationError({ cause: "shareFiles target.friendNames must include at least one friend" }));
|
|
4158
|
-
return Effect.succeed(target.friendNames.join(","));
|
|
4159
|
-
};
|
|
4160
|
-
const cloneSharedFiles = (input = {}) => requestJson(SharingCloneEnvelopeSchema, {
|
|
4402
|
+
const toShareTarget = (target) => target.type === "everyone" ? "everyone" : target.friendNames.join(",");
|
|
4403
|
+
const cloneSharedFiles = (input = {}) => Schema.decodeUnknownEffect(SharingCloneInputSchema)(input).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(SharingCloneEnvelopeSchema, {
|
|
4161
4404
|
body: {
|
|
4162
4405
|
type: "form",
|
|
4163
4406
|
value: {
|
|
4164
|
-
...toCursorSelectionForm(
|
|
4165
|
-
parent_id:
|
|
4407
|
+
...toCursorSelectionForm(decodedInput),
|
|
4408
|
+
parent_id: decodedInput.parentId ?? 0
|
|
4166
4409
|
}
|
|
4167
4410
|
},
|
|
4168
4411
|
method: "POST",
|
|
4169
4412
|
path: "/v2/sharing/clone"
|
|
4170
|
-
})
|
|
4171
|
-
const getSharingCloneInfo = (id) => requestJson(SharingCloneInfoSchema, {
|
|
4413
|
+
})), selectJsonFields("id"), withOperationErrors(CreateSharingCloneErrorSpec));
|
|
4414
|
+
const getSharingCloneInfo = (id) => Schema.decodeUnknownEffect(PositiveIntegerSchema)(id).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedId) => requestJson(SharingCloneInfoSchema, {
|
|
4172
4415
|
method: "GET",
|
|
4173
|
-
path: `/v2/sharing/clone/${encodePathSegment(
|
|
4174
|
-
})
|
|
4175
|
-
const shareFiles = (input) => Effect.
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
path: "/v2/files/share"
|
|
4187
|
-
});
|
|
4188
|
-
}).pipe(withOperationErrors(ShareFilesErrorSpec));
|
|
4416
|
+
path: `/v2/sharing/clone/${encodePathSegment(decodedId)}`
|
|
4417
|
+
})), withOperationErrors(GetSharingCloneInfoErrorSpec));
|
|
4418
|
+
const shareFiles = (input) => Schema.decodeUnknownEffect(SharingShareInputSchema)(input).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(OkResponseSchema, {
|
|
4419
|
+
body: {
|
|
4420
|
+
type: "form",
|
|
4421
|
+
value: {
|
|
4422
|
+
...toCursorSelectionForm(decodedInput),
|
|
4423
|
+
friends: toShareTarget(decodedInput.target)
|
|
4424
|
+
}
|
|
4425
|
+
},
|
|
4426
|
+
method: "POST",
|
|
4427
|
+
path: "/v2/files/share"
|
|
4428
|
+
})), withOperationErrors(ShareFilesErrorSpec));
|
|
4189
4429
|
const listSharedFiles = () => requestJson(SharedFilesEnvelopeSchema, {
|
|
4190
4430
|
method: "GET",
|
|
4191
4431
|
path: "/v2/files/shared"
|
|
4192
4432
|
}).pipe(selectJsonField("shared"), withOperationErrors(ListSharedFilesErrorSpec));
|
|
4193
|
-
const getSharedWith = (fileId) => requestJson(SharedFileSharedWithSchema, {
|
|
4433
|
+
const getSharedWith = (fileId) => Schema.decodeUnknownEffect(PositiveIntegerSchema)(fileId).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedFileId) => requestJson(SharedFileSharedWithSchema, {
|
|
4194
4434
|
method: "GET",
|
|
4195
|
-
path: `/v2/files/${encodePathSegment(
|
|
4196
|
-
})
|
|
4197
|
-
const unshareFile = (input) => requestJson(OkResponseSchema, {
|
|
4435
|
+
path: `/v2/files/${encodePathSegment(decodedFileId)}/shared-with-v2`
|
|
4436
|
+
})), withOperationErrors(GetSharedWithErrorSpec));
|
|
4437
|
+
const unshareFile = (input) => Schema.decodeUnknownEffect(SharingUnshareInputSchema)(input).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(OkResponseSchema, {
|
|
4198
4438
|
body: {
|
|
4199
4439
|
type: "form",
|
|
4200
|
-
value: { shares: joinCsv(
|
|
4440
|
+
value: { shares: joinCsv(decodedInput.shares) ?? "everyone" }
|
|
4201
4441
|
},
|
|
4202
4442
|
method: "POST",
|
|
4203
|
-
path: `/v2/files/${encodePathSegment(
|
|
4204
|
-
})
|
|
4205
|
-
const createPublicShare = (fileId) => requestJson(PublicShareEnvelopeSchema, {
|
|
4443
|
+
path: `/v2/files/${encodePathSegment(decodedInput.fileId)}/unshare`
|
|
4444
|
+
})), withOperationErrors(UnshareFileErrorSpec));
|
|
4445
|
+
const createPublicShare = (fileId) => Schema.decodeUnknownEffect(PositiveIntegerSchema)(fileId).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedFileId) => requestJson(PublicShareEnvelopeSchema, {
|
|
4206
4446
|
method: "POST",
|
|
4207
|
-
path: `/v2/public_share/${encodePathSegment(
|
|
4208
|
-
})
|
|
4447
|
+
path: `/v2/public_share/${encodePathSegment(decodedFileId)}`
|
|
4448
|
+
})), selectJsonField("public_share"), withOperationErrors(CreatePublicShareErrorSpec));
|
|
4209
4449
|
const listPublicShares = () => requestJson(PublicSharesEnvelopeSchema, {
|
|
4210
4450
|
method: "GET",
|
|
4211
4451
|
path: "/v2/public_share/list"
|
|
4212
4452
|
}).pipe(selectJsonField("public_shares"), withOperationErrors(ListPublicSharesErrorSpec));
|
|
4213
|
-
const deletePublicShare = (id) => requestJson(OkResponseSchema, {
|
|
4453
|
+
const deletePublicShare = (id) => Schema.decodeUnknownEffect(PositiveIntegerSchema)(id).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedId) => requestJson(OkResponseSchema, {
|
|
4214
4454
|
method: "DELETE",
|
|
4215
|
-
path: `/v2/public_share/${encodePathSegment(
|
|
4216
|
-
})
|
|
4455
|
+
path: `/v2/public_share/${encodePathSegment(decodedId)}`
|
|
4456
|
+
})), withOperationErrors(DeletePublicShareErrorSpec));
|
|
4217
4457
|
const getPublicShare = () => requestJson(PublicShareEnvelopeSchema, {
|
|
4218
4458
|
method: "GET",
|
|
4219
4459
|
path: "/v2/public_share"
|
|
4220
4460
|
}).pipe(selectJsonField("public_share"), withOperationErrors(GetPublicShareErrorSpec));
|
|
4221
|
-
const listPublicShareFiles = (query = {}) => requestJson(PublicShareFileListEnvelopeSchema, {
|
|
4461
|
+
const listPublicShareFiles = (query = {}) => Schema.decodeUnknownEffect(PublicShareListQuerySchema)(query).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedQuery) => requestJson(PublicShareFileListEnvelopeSchema, {
|
|
4222
4462
|
method: "GET",
|
|
4223
4463
|
path: "/v2/public_share/files/list",
|
|
4464
|
+
query: decodedQuery
|
|
4465
|
+
})), withOperationErrors(ListPublicShareFilesErrorSpec));
|
|
4466
|
+
const continuePublicShareFiles = (cursor, query = {}) => Schema.decodeUnknownEffect(PublicShareContinueInputSchema)({
|
|
4467
|
+
cursor,
|
|
4224
4468
|
query
|
|
4225
|
-
}).pipe(
|
|
4226
|
-
const continuePublicShareFiles = (cursor, query = {}) => requestJson(PublicShareFileListContinueEnvelopeSchema, {
|
|
4469
|
+
}).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(PublicShareFileListContinueEnvelopeSchema, {
|
|
4227
4470
|
body: {
|
|
4228
4471
|
type: "form",
|
|
4229
|
-
value: { cursor }
|
|
4472
|
+
value: { cursor: decodedInput.cursor }
|
|
4230
4473
|
},
|
|
4231
4474
|
method: "POST",
|
|
4232
4475
|
path: "/v2/public_share/files/list/continue",
|
|
4233
|
-
query
|
|
4234
|
-
})
|
|
4235
|
-
const getPublicShareFileUrl = (fileId) => requestJson(PublicShareFileUrlEnvelopeSchema, {
|
|
4476
|
+
query: decodedInput.query
|
|
4477
|
+
})), withOperationErrors(ContinuePublicShareFilesErrorSpec));
|
|
4478
|
+
const getPublicShareFileUrl = (fileId) => Schema.decodeUnknownEffect(PositiveIntegerSchema)(fileId).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedFileId) => requestJson(PublicShareFileUrlEnvelopeSchema, {
|
|
4236
4479
|
method: "GET",
|
|
4237
|
-
path: `/v2/public_share/files/${encodePathSegment(
|
|
4238
|
-
})
|
|
4480
|
+
path: `/v2/public_share/files/${encodePathSegment(decodedFileId)}/url`
|
|
4481
|
+
})), selectJsonField("url"), withOperationErrors(GetPublicShareFileUrlErrorSpec));
|
|
4239
4482
|
//#endregion
|
|
4240
4483
|
//#region src/domains/trash.ts
|
|
4241
4484
|
const TrashFileSchema = Schema.Struct({
|
|
@@ -4266,6 +4509,22 @@ const TrashContinueEnvelopeSchema = Schema.Struct({
|
|
|
4266
4509
|
files: Schema.Array(TrashFileSchema),
|
|
4267
4510
|
status: Schema.Literal("OK")
|
|
4268
4511
|
});
|
|
4512
|
+
const TrashListQuerySchema = Schema.Struct({ per_page: Schema.optional(PositiveIntegerSchema) });
|
|
4513
|
+
const TrashCursorBulkInputSchema = Schema.Struct({
|
|
4514
|
+
cursor: NonEmptyStringSchema,
|
|
4515
|
+
file_ids: Schema.optional(Schema.Never),
|
|
4516
|
+
useCursor: Schema.Literal(true)
|
|
4517
|
+
});
|
|
4518
|
+
const TrashIdsBulkInputSchema = Schema.Struct({
|
|
4519
|
+
cursor: Schema.optional(Schema.Never),
|
|
4520
|
+
file_ids: Schema.Array(PositiveIntegerSchema).check(Schema.isMinLength(1)),
|
|
4521
|
+
useCursor: Schema.optional(Schema.Literal(false))
|
|
4522
|
+
});
|
|
4523
|
+
const TrashBulkInputSchema = Schema.Union([TrashCursorBulkInputSchema, TrashIdsBulkInputSchema]);
|
|
4524
|
+
const TrashContinueInputSchema = Schema.Struct({
|
|
4525
|
+
cursor: NonEmptyStringSchema,
|
|
4526
|
+
query: TrashListQuerySchema
|
|
4527
|
+
});
|
|
4269
4528
|
const RestrictedReadError = {
|
|
4270
4529
|
errorType: "invalid_scope",
|
|
4271
4530
|
statusCode: 401
|
|
@@ -4335,52 +4594,56 @@ const EmptyTrashErrorSpec = definePutioOperationErrorSpec({
|
|
|
4335
4594
|
}, RestrictedWriteError]
|
|
4336
4595
|
});
|
|
4337
4596
|
const toBulkTrashBody = (input) => {
|
|
4338
|
-
if (input.useCursor) return {
|
|
4597
|
+
if (input.useCursor === true) return {
|
|
4339
4598
|
cursor: input.cursor,
|
|
4340
4599
|
file_ids: void 0
|
|
4341
4600
|
};
|
|
4342
|
-
if (!input.file_ids) throw new Error("trash bulk file_ids are required when useCursor is not set");
|
|
4343
4601
|
return {
|
|
4344
4602
|
cursor: void 0,
|
|
4345
4603
|
file_ids: joinCsv(input.file_ids)
|
|
4346
4604
|
};
|
|
4347
4605
|
};
|
|
4348
|
-
const listTrash = (query) => requestJson(TrashListEnvelopeSchema, {
|
|
4606
|
+
const listTrash = (query = {}) => decodeAndRun(TrashListQuerySchema, query, (decodedQuery) => requestJson(TrashListEnvelopeSchema, {
|
|
4349
4607
|
method: "GET",
|
|
4350
4608
|
path: "/v2/trash/list",
|
|
4609
|
+
query: decodedQuery
|
|
4610
|
+
})).pipe(withOperationErrors(ListTrashErrorSpec));
|
|
4611
|
+
const continueTrash = (cursor, query = {}) => decodeAndRun(TrashContinueInputSchema, {
|
|
4612
|
+
cursor,
|
|
4351
4613
|
query
|
|
4352
|
-
})
|
|
4353
|
-
const continueTrash = (cursor, query) => requestJson(TrashContinueEnvelopeSchema, {
|
|
4614
|
+
}, (decodedInput) => requestJson(TrashContinueEnvelopeSchema, {
|
|
4354
4615
|
body: {
|
|
4355
4616
|
type: "form",
|
|
4356
|
-
value: { cursor }
|
|
4617
|
+
value: { cursor: decodedInput.cursor }
|
|
4357
4618
|
},
|
|
4358
4619
|
method: "POST",
|
|
4359
4620
|
path: "/v2/trash/list/continue",
|
|
4360
|
-
query
|
|
4361
|
-
}).pipe(withOperationErrors(ContinueTrashErrorSpec));
|
|
4362
|
-
const restoreTrash = (input) => requestJson(OkResponseSchema, {
|
|
4621
|
+
query: decodedInput.query
|
|
4622
|
+
})).pipe(withOperationErrors(ContinueTrashErrorSpec));
|
|
4623
|
+
const restoreTrash = (input) => decodeAndRun(TrashBulkInputSchema, input, (decodedInput) => requestJson(OkResponseSchema, {
|
|
4363
4624
|
body: {
|
|
4364
4625
|
type: "form",
|
|
4365
|
-
value: toBulkTrashBody(
|
|
4626
|
+
value: toBulkTrashBody(decodedInput)
|
|
4366
4627
|
},
|
|
4367
4628
|
method: "POST",
|
|
4368
4629
|
path: "/v2/trash/restore"
|
|
4369
|
-
}).pipe(Effect.asVoid, withOperationErrors(RestoreTrashErrorSpec));
|
|
4370
|
-
const deleteTrash = (input) => requestJson(OkResponseSchema, {
|
|
4630
|
+
})).pipe(Effect.asVoid, withOperationErrors(RestoreTrashErrorSpec));
|
|
4631
|
+
const deleteTrash = (input) => decodeAndRun(TrashBulkInputSchema, input, (decodedInput) => requestJson(OkResponseSchema, {
|
|
4371
4632
|
body: {
|
|
4372
4633
|
type: "form",
|
|
4373
|
-
value: toBulkTrashBody(
|
|
4634
|
+
value: toBulkTrashBody(decodedInput)
|
|
4374
4635
|
},
|
|
4375
4636
|
method: "POST",
|
|
4376
4637
|
path: "/v2/trash/delete"
|
|
4377
|
-
}).pipe(Effect.asVoid, withOperationErrors(DeleteTrashErrorSpec));
|
|
4638
|
+
})).pipe(Effect.asVoid, withOperationErrors(DeleteTrashErrorSpec));
|
|
4378
4639
|
const emptyTrash = () => requestJson(OkResponseSchema, {
|
|
4379
4640
|
method: "POST",
|
|
4380
4641
|
path: "/v2/trash/empty"
|
|
4381
4642
|
}).pipe(Effect.asVoid, withOperationErrors(EmptyTrashErrorSpec));
|
|
4382
4643
|
//#endregion
|
|
4383
4644
|
//#region src/domains/transfers.ts
|
|
4645
|
+
const TransferIdSchema = Schema.Int.check(Schema.isGreaterThan(0));
|
|
4646
|
+
const TransferIdsSchema = Schema.Array(TransferIdSchema).check(Schema.isMinLength(1));
|
|
4384
4647
|
const TransferTypeSchema = Schema.Literals([
|
|
4385
4648
|
"URL",
|
|
4386
4649
|
"TORRENT",
|
|
@@ -4481,6 +4744,20 @@ const TransferAddInputSchema = Schema.Struct({
|
|
|
4481
4744
|
save_parent_id: Schema.optional(Schema.Int),
|
|
4482
4745
|
url: Schema.String
|
|
4483
4746
|
});
|
|
4747
|
+
const TrackerSchema = Schema.String.check(Schema.isPattern(/^[^,\s]+$/));
|
|
4748
|
+
const TransferAddTrackersInputSchema = Schema.Struct({
|
|
4749
|
+
trackers: Schema.Array(TrackerSchema).check(Schema.isMinLength(1)),
|
|
4750
|
+
transferId: TransferIdSchema
|
|
4751
|
+
});
|
|
4752
|
+
const TransferRemoveIdsInputSchema = Schema.Struct({
|
|
4753
|
+
filter: Schema.optional(Schema.Never),
|
|
4754
|
+
ids: TransferIdsSchema
|
|
4755
|
+
});
|
|
4756
|
+
const TransferRemoveFilterInputSchema = Schema.Struct({
|
|
4757
|
+
filter: Schema.Literals(["all", "completed"]),
|
|
4758
|
+
ids: Schema.optional(Schema.Never)
|
|
4759
|
+
});
|
|
4760
|
+
const TransferRemoveInputSchema = Schema.Union([TransferRemoveIdsInputSchema, TransferRemoveFilterInputSchema]);
|
|
4484
4761
|
const TransferInfoItemSchema = Schema.Struct({
|
|
4485
4762
|
error: Schema.optional(Schema.String),
|
|
4486
4763
|
error_message: Schema.optional(Schema.String),
|
|
@@ -4544,6 +4821,64 @@ const GetTransferErrorSpec = definePutioOperationErrorSpec({
|
|
|
4544
4821
|
statusCode: 401
|
|
4545
4822
|
}, { statusCode: 404 }]
|
|
4546
4823
|
});
|
|
4824
|
+
const GetTransferTorrentErrorSpec = definePutioOperationErrorSpec({
|
|
4825
|
+
domain: "transfers",
|
|
4826
|
+
operation: "getTorrent",
|
|
4827
|
+
knownErrors: [
|
|
4828
|
+
{
|
|
4829
|
+
errorType: "NOT_TORRENT",
|
|
4830
|
+
statusCode: 400
|
|
4831
|
+
},
|
|
4832
|
+
{
|
|
4833
|
+
errorType: "IS_MAGNET",
|
|
4834
|
+
statusCode: 400
|
|
4835
|
+
},
|
|
4836
|
+
{
|
|
4837
|
+
errorType: "invalid_scope",
|
|
4838
|
+
statusCode: 401
|
|
4839
|
+
},
|
|
4840
|
+
{ statusCode: 404 }
|
|
4841
|
+
]
|
|
4842
|
+
});
|
|
4843
|
+
const AddTransferTrackersErrorSpec = definePutioOperationErrorSpec({
|
|
4844
|
+
domain: "transfers",
|
|
4845
|
+
operation: "addTrackers",
|
|
4846
|
+
knownErrors: [
|
|
4847
|
+
{
|
|
4848
|
+
errorType: "NO_TRACKERS",
|
|
4849
|
+
statusCode: 400
|
|
4850
|
+
},
|
|
4851
|
+
{
|
|
4852
|
+
errorType: "TORRENT_NOT_ACTIVE",
|
|
4853
|
+
statusCode: 400
|
|
4854
|
+
},
|
|
4855
|
+
{
|
|
4856
|
+
errorType: "invalid_scope",
|
|
4857
|
+
statusCode: 401
|
|
4858
|
+
},
|
|
4859
|
+
{ statusCode: 402 },
|
|
4860
|
+
{
|
|
4861
|
+
errorType: "TRANSFER_NOT_FOUND",
|
|
4862
|
+
statusCode: 404
|
|
4863
|
+
},
|
|
4864
|
+
{
|
|
4865
|
+
errorType: "TRANSFER_INVALID",
|
|
4866
|
+
statusCode: 500
|
|
4867
|
+
},
|
|
4868
|
+
{
|
|
4869
|
+
errorType: "TORRENT_NOT_READY",
|
|
4870
|
+
statusCode: 500
|
|
4871
|
+
}
|
|
4872
|
+
]
|
|
4873
|
+
});
|
|
4874
|
+
const RemoveTransfersErrorSpec = definePutioOperationErrorSpec({
|
|
4875
|
+
domain: "transfers",
|
|
4876
|
+
operation: "remove",
|
|
4877
|
+
knownErrors: [{ statusCode: 400 }, {
|
|
4878
|
+
errorType: "invalid_scope",
|
|
4879
|
+
statusCode: 401
|
|
4880
|
+
}]
|
|
4881
|
+
});
|
|
4547
4882
|
const AddTransferErrorSpec = definePutioOperationErrorSpec({
|
|
4548
4883
|
domain: "transfers",
|
|
4549
4884
|
operation: "add",
|
|
@@ -4647,6 +4982,10 @@ const getTransfer = (id) => requestJson(TransferEnvelopeSchema, {
|
|
|
4647
4982
|
method: "GET",
|
|
4648
4983
|
path: `/v2/transfers/${encodePathSegment(id)}`
|
|
4649
4984
|
}).pipe(selectJsonField("transfer"), withOperationErrors(GetTransferErrorSpec));
|
|
4985
|
+
const getTransferTorrent = (id) => Schema.decodeUnknownEffect(TransferIdSchema)(id).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedId) => requestArrayBuffer({
|
|
4986
|
+
method: "GET",
|
|
4987
|
+
path: `/v2/transfers/${encodePathSegment(decodedId)}/torrent`
|
|
4988
|
+
})), withOperationErrors(GetTransferTorrentErrorSpec));
|
|
4650
4989
|
const countTransfers = () => requestJson(TransferCountEnvelopeSchema, {
|
|
4651
4990
|
method: "GET",
|
|
4652
4991
|
path: "/v2/transfers/count"
|
|
@@ -4675,6 +5014,14 @@ const addManyTransfers = (inputs) => requestJson(TransfersAddMultiEnvelopeSchema
|
|
|
4675
5014
|
method: "POST",
|
|
4676
5015
|
path: "/v2/transfers/add-multi"
|
|
4677
5016
|
}).pipe(selectJsonFields("errors", "transfers"), withOperationErrors(AddManyTransfersErrorSpec));
|
|
5017
|
+
const addTransferTrackers = (input) => Schema.decodeUnknownEffect(TransferAddTrackersInputSchema)(input).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(OkResponseSchema, {
|
|
5018
|
+
body: {
|
|
5019
|
+
type: "form",
|
|
5020
|
+
value: { trackers: joinCsv(decodedInput.trackers) }
|
|
5021
|
+
},
|
|
5022
|
+
method: "POST",
|
|
5023
|
+
path: `/v2/transfers/add-trackers/${encodePathSegment(decodedInput.transferId)}`
|
|
5024
|
+
})), Effect.asVoid, withOperationErrors(AddTransferTrackersErrorSpec));
|
|
4678
5025
|
const cancelTransfers = (ids) => requestJson(OkResponseSchema, {
|
|
4679
5026
|
body: {
|
|
4680
5027
|
type: "form",
|
|
@@ -4691,6 +5038,14 @@ const cleanTransfers = (ids = []) => requestJson(TransfersCleanEnvelopeSchema, {
|
|
|
4691
5038
|
method: "POST",
|
|
4692
5039
|
path: "/v2/transfers/clean"
|
|
4693
5040
|
}).pipe(selectJsonFields("deleted_ids"));
|
|
5041
|
+
const removeTransfers = (input) => Schema.decodeUnknownEffect(TransferRemoveInputSchema)(input).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(OkResponseSchema, {
|
|
5042
|
+
body: {
|
|
5043
|
+
type: "form",
|
|
5044
|
+
value: decodedInput.ids !== void 0 ? { transfer_ids: joinCsv(decodedInput.ids) } : { remove_filter: decodedInput.filter }
|
|
5045
|
+
},
|
|
5046
|
+
method: "POST",
|
|
5047
|
+
path: "/v2/transfers/remove"
|
|
5048
|
+
})), Effect.asVoid, withOperationErrors(RemoveTransfersErrorSpec));
|
|
4694
5049
|
const retryTransfer = (id) => requestJson(TransferEnvelopeSchema, {
|
|
4695
5050
|
body: {
|
|
4696
5051
|
type: "form",
|
|
@@ -4787,6 +5142,7 @@ const ZipInfoSchema = Schema.Union([
|
|
|
4787
5142
|
ZipInfoErrorSchema,
|
|
4788
5143
|
ZipInfoDoneSchema
|
|
4789
5144
|
]);
|
|
5145
|
+
const CreateZipInputSchema = makeCursorSelectionSchema("file_ids", "exclude_ids");
|
|
4790
5146
|
const FilesReadScopeError = {
|
|
4791
5147
|
errorType: "invalid_scope",
|
|
4792
5148
|
statusCode: 401
|
|
@@ -4848,26 +5204,26 @@ const listZips = () => requestJson(ZipsListEnvelopeSchema, {
|
|
|
4848
5204
|
method: "GET",
|
|
4849
5205
|
path: "/v2/zips/list"
|
|
4850
5206
|
}).pipe(selectJsonField("zips"), withOperationErrors(ListZipsErrorSpec));
|
|
4851
|
-
const createZip = (input) => requestJson(ZipCreateEnvelopeSchema, {
|
|
5207
|
+
const createZip = (input) => decodeAndRun(CreateZipInputSchema, input, (decodedInput) => requestJson(ZipCreateEnvelopeSchema, {
|
|
4852
5208
|
body: {
|
|
4853
5209
|
type: "form",
|
|
4854
5210
|
value: { ...toCursorSelectionForm({
|
|
4855
|
-
cursor:
|
|
4856
|
-
excludeIds:
|
|
4857
|
-
ids:
|
|
5211
|
+
cursor: decodedInput.cursor,
|
|
5212
|
+
excludeIds: decodedInput.exclude_ids,
|
|
5213
|
+
ids: decodedInput.file_ids
|
|
4858
5214
|
}) }
|
|
4859
5215
|
},
|
|
4860
5216
|
method: "POST",
|
|
4861
5217
|
path: "/v2/zips/create"
|
|
4862
|
-
}).pipe(selectJsonField("zip_id"), withOperationErrors(CreateZipErrorSpec));
|
|
4863
|
-
const getZip = (id) => requestJson(ZipInfoSchema, {
|
|
5218
|
+
})).pipe(selectJsonField("zip_id"), withOperationErrors(CreateZipErrorSpec));
|
|
5219
|
+
const getZip = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson(ZipInfoSchema, {
|
|
4864
5220
|
method: "GET",
|
|
4865
|
-
path: `/v2/zips/${encodePathSegment(
|
|
4866
|
-
}).pipe(withOperationErrors(GetZipErrorSpec));
|
|
4867
|
-
const cancelZip = (id) => requestJson(OkResponseSchema, {
|
|
5221
|
+
path: `/v2/zips/${encodePathSegment(decodedId)}`
|
|
5222
|
+
})).pipe(withOperationErrors(GetZipErrorSpec));
|
|
5223
|
+
const cancelZip = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson(OkResponseSchema, {
|
|
4868
5224
|
method: "GET",
|
|
4869
|
-
path: `/v2/zips/${encodePathSegment(
|
|
4870
|
-
}).pipe(Effect.asVoid, withOperationErrors(CancelZipErrorSpec));
|
|
5225
|
+
path: `/v2/zips/${encodePathSegment(decodedId)}/cancel`
|
|
5226
|
+
})).pipe(Effect.asVoid, withOperationErrors(CancelZipErrorSpec));
|
|
4871
5227
|
//#endregion
|
|
4872
5228
|
//#region src/core/client.ts
|
|
4873
5229
|
const promiseClientRuntimeCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -4924,6 +5280,7 @@ const createPutioSdkEffectClient = () => ({
|
|
|
4924
5280
|
buildLoginUrl: buildAuthLoginUrl,
|
|
4925
5281
|
checkCodeMatch,
|
|
4926
5282
|
clients,
|
|
5283
|
+
exchangeAuthorizationCode: exchangeOAuthAuthorizationCode,
|
|
4927
5284
|
exists,
|
|
4928
5285
|
forgotPassword,
|
|
4929
5286
|
getCode,
|
|
@@ -4978,9 +5335,12 @@ const createPutioSdkEffectClient = () => ({
|
|
|
4978
5335
|
getStatus: getIftttStatus,
|
|
4979
5336
|
sendEvent: sendIftttEvent
|
|
4980
5337
|
},
|
|
5338
|
+
podcast: { getLinks: getPodcastLinks },
|
|
4981
5339
|
files: {
|
|
5340
|
+
canWrite: canWriteFile,
|
|
4982
5341
|
continue: continueFiles,
|
|
4983
5342
|
continueSearch,
|
|
5343
|
+
copy: copyFile,
|
|
4984
5344
|
convertToMp4: convertFileToMp4,
|
|
4985
5345
|
convertManyToMp4: convertFilesToMp4,
|
|
4986
5346
|
convertSelectionToMp4: convertFileSelectionToMp4,
|
|
@@ -4997,6 +5357,7 @@ const createPutioSdkEffectClient = () => ({
|
|
|
4997
5357
|
getApiDownloadUrl,
|
|
4998
5358
|
getApiMp4DownloadUrl,
|
|
4999
5359
|
get: getFile,
|
|
5360
|
+
getChild: getFileChild,
|
|
5000
5361
|
getDownloadUrl,
|
|
5001
5362
|
getHlsStreamUrl,
|
|
5002
5363
|
getMp4Status,
|
|
@@ -5009,10 +5370,13 @@ const createPutioSdkEffectClient = () => ({
|
|
|
5009
5370
|
moveSelection: moveFileSelection,
|
|
5010
5371
|
putMp4ToMyFiles,
|
|
5011
5372
|
rename: renameFile,
|
|
5373
|
+
resetSortSettings: resetFileSortSettings,
|
|
5012
5374
|
resetStartFrom,
|
|
5013
5375
|
search: searchFiles,
|
|
5376
|
+
setSort: setFileSort,
|
|
5014
5377
|
setWatchStatus: setFilesWatchStatus,
|
|
5015
5378
|
setStartFrom,
|
|
5379
|
+
touch: touchFiles,
|
|
5016
5380
|
upload: uploadFile
|
|
5017
5381
|
},
|
|
5018
5382
|
friendInvites: {
|
|
@@ -5112,14 +5476,17 @@ const createPutioSdkEffectClient = () => ({
|
|
|
5112
5476
|
transfers: {
|
|
5113
5477
|
add: addTransfer,
|
|
5114
5478
|
addMany: addManyTransfers,
|
|
5479
|
+
addTrackers: addTransferTrackers,
|
|
5115
5480
|
cancel: cancelTransfers,
|
|
5116
5481
|
clean: cleanTransfers,
|
|
5117
5482
|
continue: continueTransfers,
|
|
5118
5483
|
count: countTransfers,
|
|
5119
5484
|
get: getTransfer,
|
|
5485
|
+
getTorrent: getTransferTorrent,
|
|
5120
5486
|
info: getTransferInfo,
|
|
5121
5487
|
list: listTransfers,
|
|
5122
5488
|
reannounce: reannounceTransfer,
|
|
5489
|
+
remove: removeTransfers,
|
|
5123
5490
|
retry: retryTransfer,
|
|
5124
5491
|
stopRecording: stopTransferRecording
|
|
5125
5492
|
},
|
|
@@ -5155,6 +5522,9 @@ const createPutioSdkPromiseClient = (initialConfig = {}) => {
|
|
|
5155
5522
|
function getFileById(input) {
|
|
5156
5523
|
return provideSdk(config, getFile(input));
|
|
5157
5524
|
}
|
|
5525
|
+
function getChildByName(input) {
|
|
5526
|
+
return provideSdk(config, getFileChild(input));
|
|
5527
|
+
}
|
|
5158
5528
|
return {
|
|
5159
5529
|
dispose: () => disposePromiseClientRuntime(config),
|
|
5160
5530
|
setAccessToken: (accessToken) => {
|
|
@@ -5182,6 +5552,7 @@ const createPutioSdkPromiseClient = (initialConfig = {}) => {
|
|
|
5182
5552
|
}),
|
|
5183
5553
|
checkCodeMatch: (code) => provideSdk(config, checkCodeMatch(code)),
|
|
5184
5554
|
clients: () => provideSdk(config, clients()),
|
|
5555
|
+
exchangeAuthorizationCode: (input) => provideSdk(config, exchangeOAuthAuthorizationCode(input)),
|
|
5185
5556
|
exists: (key, value) => provideSdk(config, exists(key, value)),
|
|
5186
5557
|
forgotPassword: (mail) => provideSdk(config, forgotPassword(mail)),
|
|
5187
5558
|
getCode: (input) => provideSdk(config, getCode(input)),
|
|
@@ -5236,9 +5607,12 @@ const createPutioSdkPromiseClient = (initialConfig = {}) => {
|
|
|
5236
5607
|
getStatus: () => provideSdk(config, getIftttStatus()),
|
|
5237
5608
|
sendEvent: (input) => provideSdk(config, sendIftttEvent(input))
|
|
5238
5609
|
},
|
|
5610
|
+
podcast: { getLinks: (input) => provideSdk(config, getPodcastLinks(input)) },
|
|
5239
5611
|
files: {
|
|
5612
|
+
canWrite: (fileId) => provideSdk(config, canWriteFile(fileId)),
|
|
5240
5613
|
continue: (cursor, query) => provideSdk(config, continueFiles(cursor, query)),
|
|
5241
5614
|
continueSearch: (cursor, query) => provideSdk(config, continueSearch(cursor, query)),
|
|
5615
|
+
copy: (input) => provideSdk(config, copyFile(input)),
|
|
5242
5616
|
convertManyToMp4: (ids) => provideSdk(config, convertFilesToMp4(ids)),
|
|
5243
5617
|
convertSelectionToMp4: (selection) => provideSdk(config, convertFileSelectionToMp4(selection)),
|
|
5244
5618
|
createUploadFormData: createFileUploadFormData,
|
|
@@ -5256,6 +5630,7 @@ const createPutioSdkPromiseClient = (initialConfig = {}) => {
|
|
|
5256
5630
|
getApiDownloadUrl: (fileId, options) => provideSdk(config, getApiDownloadUrl(fileId, options)),
|
|
5257
5631
|
getApiMp4DownloadUrl: (fileId, options) => provideSdk(config, getApiMp4DownloadUrl(fileId, options)),
|
|
5258
5632
|
get: getFileById,
|
|
5633
|
+
getChild: getChildByName,
|
|
5259
5634
|
getDownloadUrl: (fileId) => provideSdk(config, getDownloadUrl(fileId)),
|
|
5260
5635
|
getHlsStreamUrl: (fileId, options) => provideSdk(config, getHlsStreamUrl(fileId, options)),
|
|
5261
5636
|
getMp4Status: (fileId) => provideSdk(config, getMp4Status(fileId)),
|
|
@@ -5268,10 +5643,13 @@ const createPutioSdkPromiseClient = (initialConfig = {}) => {
|
|
|
5268
5643
|
moveSelection: (selection, parentId) => provideSdk(config, moveFileSelection(selection, parentId)),
|
|
5269
5644
|
putMp4ToMyFiles: (fileId) => provideSdk(config, putMp4ToMyFiles(fileId)),
|
|
5270
5645
|
rename: (input) => provideSdk(config, renameFile(input)),
|
|
5646
|
+
resetSortSettings: () => provideSdk(config, resetFileSortSettings()),
|
|
5271
5647
|
resetStartFrom: (fileId) => provideSdk(config, resetStartFrom(fileId)),
|
|
5272
5648
|
search: (query) => provideSdk(config, searchFiles(query)),
|
|
5649
|
+
setSort: (input) => provideSdk(config, setFileSort(input)),
|
|
5273
5650
|
setWatchStatus: (selection) => provideSdk(config, setFilesWatchStatus(selection)),
|
|
5274
5651
|
setStartFrom: (input) => provideSdk(config, setStartFrom(input)),
|
|
5652
|
+
touch: (input) => provideSdk(config, touchFiles(input)),
|
|
5275
5653
|
upload: (input) => provideSdk(config, uploadFile(input))
|
|
5276
5654
|
},
|
|
5277
5655
|
friendInvites: {
|
|
@@ -5371,14 +5749,17 @@ const createPutioSdkPromiseClient = (initialConfig = {}) => {
|
|
|
5371
5749
|
transfers: {
|
|
5372
5750
|
add: (input) => provideSdk(config, addTransfer(input)),
|
|
5373
5751
|
addMany: (inputs) => provideSdk(config, addManyTransfers(inputs)),
|
|
5752
|
+
addTrackers: (input) => provideSdk(config, addTransferTrackers(input)),
|
|
5374
5753
|
cancel: (ids) => provideSdk(config, cancelTransfers(ids)),
|
|
5375
5754
|
clean: (ids) => provideSdk(config, cleanTransfers(ids)),
|
|
5376
5755
|
continue: (cursor, query) => provideSdk(config, continueTransfers(cursor, query)),
|
|
5377
5756
|
count: () => provideSdk(config, countTransfers()),
|
|
5378
5757
|
get: (id) => provideSdk(config, getTransfer(id)),
|
|
5758
|
+
getTorrent: (id) => provideSdk(config, getTransferTorrent(id)),
|
|
5379
5759
|
info: (urls) => provideSdk(config, getTransferInfo(urls)),
|
|
5380
5760
|
list: (query) => provideSdk(config, listTransfers(query)),
|
|
5381
5761
|
reannounce: (id) => provideSdk(config, reannounceTransfer(id)),
|
|
5762
|
+
remove: (input) => provideSdk(config, removeTransfers(input)),
|
|
5382
5763
|
retry: (id) => provideSdk(config, retryTransfer(id)),
|
|
5383
5764
|
stopRecording: (id) => provideSdk(config, stopTransferRecording(id))
|
|
5384
5765
|
},
|
|
@@ -5391,6 +5772,6 @@ const createPutioSdkPromiseClient = (initialConfig = {}) => {
|
|
|
5391
5772
|
};
|
|
5392
5773
|
};
|
|
5393
5774
|
//#endregion
|
|
5394
|
-
export { AccountClearOptionsSchema, AccountConfirmationSchema, AccountConfirmationsErrorSpec, AccountDiskSchema, AccountInfoBaseSchema, AccountInfoBroadSchema, AccountInfoQuerySchema, AccountSettingsSchema, AccountSubtitleLanguageSchema, AccountTwoFactorSettingsSchema, AccountWarningsSchema, AddManyTransfersErrorSpec, AddTransferErrorSpec, AppSpecificPasswordSchema, ApproveFriendRequestErrorSpec, AuthorizationCodeSchema, CancelZipErrorSpec, ClearEventsErrorSpec, ClearRssFeedLogsErrorSpec, ClientsErrorSpec, ConfirmFastspringOrderErrorSpec, ContinueFilesErrorSpec, ContinuePublicShareFilesErrorSpec, ContinueTrashErrorSpec, CountWaitingRequestsErrorSpec, CreateAppSpecificPasswordErrorSpec, CreateAppSpecificPasswordInputSchema, CreateCoinbaseChargeErrorSpec, 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, FileExtractionSchema, FileExtractionStatusSchema, FileExtractionsErrorSpec, FileMediaInfoFormatSchema, FileMediaInfoSchema, FileMediaInfoStreamSchema, FileMediaMetadataSchema, FileMp4ErrorSpec, FileMp4MutationErrorSpec, FileQuerySchema, FileSortSchema, FileSubtitleSchema, FileSubtitlesErrorSpec, FileTypeSchema, FileUploadErrorSpec, FileWatchStatusErrorSpec, FilesListEnvelopeSchema, FilesListQuerySchema, FilesMoveErrorSchema, FilesSearchQuerySchema, FolderTypeSchema, ForgotPasswordErrorSpec, FriendBaseSchema, FriendInviteJoinedUserSchema, FriendInviteJoinedUserStatusSchema, FriendInviteLookupErrorSpec, FriendInviteSchema, FriendSchema, FriendSharedFolderErrorSpec, GenerateTOTPErrorSpec, GenerateTOTPResponseSchema, GetDownloadLinksErrorSpec, GetEventTorrentErrorSpec, GetFileErrorSpec, GetIftttStatusErrorSpec, GetOAuthAppErrorSpec, GetPaddleBillingInvoiceUrlErrorSpec, GetPaymentInfoErrorSpec, GetPaymentVoucherInfoErrorSpec, GetPublicShareErrorSpec, GetPublicShareFileUrlErrorSpec, GetRssFeedErrorSpec, GetSharedWithErrorSpec, GetSharingCloneInfoErrorSpec, GetTransferErrorSpec, 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, OAuthSetIconInputSchema, OkResponseSchema, OwnedOAuthAppSchema, PasInfoSchema, PauseRssFeedErrorSpec, PaymentChangePlanPreviewSchema, PaymentChangePlanSubmitSchema, PaymentHistoryItemSchema, PaymentInfoPlanSchema, PaymentInfoSchema, PaymentInviteSchema, PaymentOptionPlanTypeSchema, PaymentOptionSchema, PaymentPlanGroupSchema, PaymentPlanTypeSchema, PaymentProviderNameSchema, PaymentProviderSchema, PaymentSubscriptionInfoSchema, PaymentTypeSchema, PaymentVoucherInfoSchema, 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, RenameFileErrorSpec, ReportPaymentsErrorSpec, ResetPasswordErrorSpec, RestoreTrashErrorSpec, ResumeRssFeedErrorSpec, RetryAllRssFeedItemsErrorSpec, RetryRssFeedItemErrorSpec, RetryTransferErrorSpec, RevokeAllOAuthClientsErrorSpec, RevokeOAuthClientErrorSpec, RevokeOAuthGrantErrorSpec, RssFeedItemFailedSchema, RssFeedItemSchema, RssFeedItemSucceededSchema, RssFeedParamsSchema, RssFeedSchema, SaveAccountSettingsErrorSpec, SaveAccountSettingsPayloadSchema, SearchFilesErrorSpec, SearchFriendsErrorSpec, SendFriendRequestErrorSpec, SendIftttEventErrorSpec, ShareFilesErrorSpec, SharedFileSchema, SharedFileShareSchema, SharedFileSharedWithSchema, SharingCloneInfoSchema, SharingCloneInputSchema, SharingCloneStatusSchema, SharingShareInputSchema, SharingUnshareInputSchema, StartFromErrorSpec, StopRecordingTransferErrorSpec, StopSubscriptionErrorSpec, SubmitPaymentChangePlanErrorSpec, TransferAddInputSchema, TransferBaseSchema, TransferSchema, TransferStatusSchema, TransferTypeSchema, TransfersListQuerySchema, TrashFileSchema, TunnelRouteSchema, TwoFactorRecoveryCodesSchema, UnshareFileErrorSpec, UpdateOAuthAppErrorSpec, UpdateRssFeedErrorSpec, UserSearchResultSchema, UserSubscriptionStatusSchema, ValidateTokenResponseSchema, VerifyTOTPErrorSpec, VerifyTOTPResponseSchema, VoucherLookupErrorSpec, ZipStatusSchema, addManyTransfers, addTransfer, approveFriendRequest, buildAuthLoginUrl, buildFileApiContentUrl, buildFileApiDownloadUrl, buildFileApiMp4DownloadUrl, buildFileHlsStreamUrl, buildOAuthAppIconUrl, buildOAuthAuthorizeUrl, buildPutioUrl, cancelTransfers, cancelZip, checkCodeMatch, classifyPaymentChangePlanResponse, cleanTransfers, clearAccount, clearEvents, clearRssFeedLogs, clients, cloneSharedFiles, confirmFastspringOrder, continueFiles, continuePublicShareFiles, continueSearch, continueTransfers, continueTrash, convertFileSelectionToMp4, convertFileToMp4, convertFilesToMp4, countTransfers, countWaitingRequests, createAppSpecificPassword, createCoinbaseCharge, 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, exists, extractFiles, fallbackPutioErrorEnvelope, findNextFile, findNextVideo, forgotPassword, generateTOTP, getAccountInfo, getAccountSettings, getApiContentUrl, getApiDownloadUrl, getApiMp4DownloadUrl, getCode, getConfigKey, getConfigKeyWith, getDownloadLinks, getDownloadUrl, getEventTorrent, getFamilyInvite, getFile, getFriendInvite, getFriendSharedFolder, getGiftCard, getHlsStreamUrl, getIftttStatus, getMp4Status, getOAuthApp, getPaddleBillingInvoiceUrl, getPaymentInfo, getPaymentVoucherInfo, getPopularOAuthApps, getPublicShare, getPublicShareFileUrl, getRecoveryCodes, getRssFeed, getSharedWith, getSharingCloneInfo, getStartFrom, getTransfer, getTransferInfo, getVoucher, 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, makePutioSdkConfig, makePutioSdkEffectClientLayer, makePutioSdkLayer, makePutioSdkLiveClientLayer, makePutioSdkLiveLayer, makeResponseError, mapConfigurationError, mapDecodeErrorToValidationError, mapTransportError, moveFileSelection, moveFiles, parseErrorBody, pauseRssFeed, previewPaymentChangePlan, putMp4ToMyFiles, queryFiles, queryOAuthApps, readConfig, readConfigWith, reannounceTransfer, redeemPaymentVoucher, regenerateOAuthAppToken, regenerateRecoveryCodes, register, removeFamilyMember, removeFriend, renameFile, reportPayments, requestArrayBuffer, requestJson, requestVoid, resetPassword, resetStartFrom, responseRateLimitHeaders, restoreTrash, resumeRssFeed, retryAllRssFeedItems, retryRssFeedItem, retryTransfer, revokeAllClients, revokeApp, revokeClient, saveAccountSettings, searchFiles, searchFriends, selectJsonField, selectJsonFields, sendFriendRequest, sendIftttEvent, setConfigKey, setFilesWatchStatus, setOAuthAppIcon, setStartFrom, shareFiles, stopPaymentSubscription, stopTransferRecording, submitPaymentChangePlan, unshareFile, updateOAuthApp, updateRssFeed, uploadFile, validateToken, verifyTOTP, withOperationErrors, writeConfig };
|
|
5775
|
+
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, CreateCoinbaseChargeErrorSpec, 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, 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, RemoveTransfersErrorSpec, RenameFileErrorSpec, ReportPaymentsErrorSpec, ResetPasswordErrorSpec, RestoreTrashErrorSpec, ResumeRssFeedErrorSpec, RetryAllRssFeedItemsErrorSpec, RetryRssFeedItemErrorSpec, RetryTransferErrorSpec, RevokeAllOAuthClientsErrorSpec, RevokeOAuthClientErrorSpec, RevokeOAuthGrantErrorSpec, RssFeedItemFailedSchema, RssFeedItemSchema, RssFeedItemSucceededSchema, RssFeedParamsSchema, RssFeedSchema, 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, 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, createCoinbaseCharge, 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, getHlsStreamUrl, getIftttStatus, getMp4Status, getOAuthApp, getPaddleBillingInvoiceUrl, getPaymentInfo, getPaymentVoucherInfo, getPodcastLinks, getPopularOAuthApps, getPublicShare, getPublicShareFileUrl, getRecoveryCodes, getRssFeed, getSharedWith, getSharingCloneInfo, getStartFrom, getTransfer, getTransferInfo, getTransferTorrent, getVoucher, 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, makePutioSdkConfig, makePutioSdkEffectClientLayer, makePutioSdkLayer, makePutioSdkLiveClientLayer, makePutioSdkLiveLayer, makeResponseError, mapConfigurationError, mapDecodeErrorToValidationError, mapTransportError, moveFileSelection, moveFiles, parseErrorBody, pauseRssFeed, previewPaymentChangePlan, putMp4ToMyFiles, queryFiles, queryOAuthApps, readConfig, readConfigWith, reannounceTransfer, redeemPaymentVoucher, regenerateOAuthAppToken, regenerateRecoveryCodes, register, removeFamilyMember, removeFriend, removeTransfers, renameFile, reportPayments, requestArrayBuffer, requestJson, 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, touchFiles, unshareFile, updateOAuthApp, updateRssFeed, uploadFile, validateToken, verifyTOTP, withOperationErrors, writeConfig };
|
|
5395
5776
|
|
|
5396
5777
|
//# sourceMappingURL=index.js.map
|