@putdotio/sdk 18.1.0 → 19.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{forms-BBMvLadC.js → forms-fF5yj0vj.js} +25 -21
- package/dist/forms-fF5yj0vj.js.map +1 -0
- package/dist/{index-B4Vt5XNs.d.ts → index-yZHKCBOi.d.ts} +94 -43
- package/dist/index.d.ts +2 -2
- package/dist/index.js +471 -433
- package/dist/index.js.map +1 -1
- package/dist/utilities.d.ts +1 -1
- package/dist/utilities.js +1 -1
- package/package.json +12 -11
- package/dist/forms-BBMvLadC.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as mapConfigurationError$1, A as DEFAULT_PUTIO_UPLOAD_BASE_URL, B as PutioValidationError, C as requestJson$1, D as selectJsonFields$1, E as selectJsonField$1, F as PutioContractError, G as isPutioAuthError, H as definePutioOperationErrorSpec, I as PutioErrorEnvelopeSchema$1, J as isPutioErrorEnvelope, K as isPutioConfigurationError, L as PutioOperationError, M as PutioApiError, N as PutioAuthError, O as revealAccessToken, P as PutioConfigurationError, Q as isPutioValidationError, R as PutioRateLimitError, S as requestArrayBuffer$1, T as requestVoid$1, U as fallbackPutioErrorEnvelope$1, V as decodePutioErrorEnvelope$1, W as isPutioApiError, X as isPutioRateLimitError, Y as isPutioOperationError, Z as isPutioTransportError, _ as makePutioFetchLayer, a as PositiveIntegerSchema, at as toPutioResponseError$1, b as putioSdkLayer, c as decodeAndRunRedacted, d as OkResponseSchema, et as mapContractError$1, f as PutioHttpClient, g as makePutioFetchClient, h as encodePathSegment$1, i as NonNegativeNumberSchema, it as responseRateLimitHeaders$1, j as DEFAULT_PUTIO_WEB_APP_URL, k as DEFAULT_PUTIO_API_BASE_URL, l as failMissingField, m as buildPutioUrl$1, n as toCursorSelectionForm, nt as mapValidationError$1, o as cursorSelectionSchema, ot as withOperationErrors$1, p as PutioSdkConfig, q as isPutioContractError, r as NonEmptyStringSchema, rt as parseErrorBody$1, s as decodeAndRun, t as joinCsv, tt as mapTransportError$1, u as requireRequestedBreadcrumbs, v as normalizePutioSdkOptions$1, w as requestText$1, x as putioSdkLiveLayer, y as putioFetchLayer, z as PutioTransportError } from "./forms-fF5yj0vj.js";
|
|
2
2
|
import { Cause, Context, Effect, Exit, Layer, ManagedRuntime, Predicate, Schema, SchemaIssue, SchemaParser } from "effect";
|
|
3
3
|
// src/domains/account.ts
|
|
4
4
|
const RequestedFlag$1 = Schema.Literal(1);
|
|
@@ -282,32 +282,32 @@ const AccountConfirmationsErrorSpec = definePutioOperationErrorSpec({
|
|
|
282
282
|
});
|
|
283
283
|
function getAccountInfo(query = {}) {
|
|
284
284
|
return decodeAndRun(AccountInfoQuerySchema, query, (decodedQuery) => {
|
|
285
|
-
const effect = requestJson(AccountInfoEnvelopeSchema, {
|
|
285
|
+
const effect = requestJson$1(AccountInfoEnvelopeSchema, {
|
|
286
286
|
method: "GET",
|
|
287
287
|
path: "/v2/account/info",
|
|
288
288
|
query: decodedQuery
|
|
289
|
-
}).pipe(selectJsonField("info"));
|
|
289
|
+
}).pipe(selectJsonField$1("info"));
|
|
290
290
|
return ensureAccountInfoFields(effect, decodedQuery);
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
|
-
const getAccountSettings = () => requestJson(AccountSettingsEnvelopeSchema, {
|
|
293
|
+
const getAccountSettings = () => requestJson$1(AccountSettingsEnvelopeSchema, {
|
|
294
294
|
method: "GET",
|
|
295
295
|
path: "/v2/account/settings"
|
|
296
|
-
}).pipe(selectJsonField("settings"));
|
|
297
|
-
const listAccountSubtitleLanguages = () => requestJson(AccountSubtitleLanguagesEnvelopeSchema, {
|
|
296
|
+
}).pipe(selectJsonField$1("settings"));
|
|
297
|
+
const listAccountSubtitleLanguages = () => requestJson$1(AccountSubtitleLanguagesEnvelopeSchema, {
|
|
298
298
|
method: "GET",
|
|
299
299
|
path: "/v2/account/subtitle_languages"
|
|
300
|
-
}).pipe(selectJsonField("languages"));
|
|
301
|
-
const saveAccountSettings = (payload) => decodeAndRunRedacted("account", "saveSettings")(SaveAccountSettingsPayloadSchema, payload, (decodedPayload) => requestJson(OkResponseSchema, {
|
|
300
|
+
}).pipe(selectJsonField$1("languages"));
|
|
301
|
+
const saveAccountSettings = (payload) => decodeAndRunRedacted("account", "saveSettings")(SaveAccountSettingsPayloadSchema, payload, (decodedPayload) => requestJson$1(OkResponseSchema, {
|
|
302
302
|
body: {
|
|
303
303
|
type: "json",
|
|
304
304
|
value: decodedPayload
|
|
305
305
|
},
|
|
306
306
|
method: "POST",
|
|
307
307
|
path: "/v2/account/settings"
|
|
308
|
-
})).pipe(withOperationErrors(SaveAccountSettingsErrorSpec));
|
|
308
|
+
})).pipe(withOperationErrors$1(SaveAccountSettingsErrorSpec));
|
|
309
309
|
const toBooleanFormValue = (value) => value ? "true" : "false";
|
|
310
|
-
const clearAccount = (options) => decodeAndRun(AccountClearOptionsSchema, options, (decodedOptions) => requestJson(OkResponseSchema, {
|
|
310
|
+
const clearAccount = (options) => decodeAndRun(AccountClearOptionsSchema, options, (decodedOptions) => requestJson$1(OkResponseSchema, {
|
|
311
311
|
body: {
|
|
312
312
|
type: "form",
|
|
313
313
|
value: {
|
|
@@ -324,7 +324,7 @@ const clearAccount = (options) => decodeAndRun(AccountClearOptionsSchema, option
|
|
|
324
324
|
method: "POST",
|
|
325
325
|
path: "/v2/account/clear"
|
|
326
326
|
}));
|
|
327
|
-
const destroyAccount = (currentPassword) => decodeAndRunRedacted("account", "destroy")(NonEmptyStringSchema, currentPassword, (decodedPassword) => requestJson(OkResponseSchema, {
|
|
327
|
+
const destroyAccount = (currentPassword) => decodeAndRunRedacted("account", "destroy")(NonEmptyStringSchema, currentPassword, (decodedPassword) => requestJson$1(OkResponseSchema, {
|
|
328
328
|
body: {
|
|
329
329
|
type: "form",
|
|
330
330
|
value: { current_password: decodedPassword }
|
|
@@ -333,11 +333,11 @@ const destroyAccount = (currentPassword) => decodeAndRunRedacted("account", "des
|
|
|
333
333
|
path: "/v2/account/destroy"
|
|
334
334
|
}));
|
|
335
335
|
const OptionalAccountConfirmationSubjectSchema = Schema.UndefinedOr(AccountConfirmationSubjectSchema);
|
|
336
|
-
const listAccountConfirmations = (subject) => decodeAndRun(OptionalAccountConfirmationSubjectSchema, subject, (decodedSubject) => requestJson(AccountConfirmationsEnvelopeSchema, {
|
|
336
|
+
const listAccountConfirmations = (subject) => decodeAndRun(OptionalAccountConfirmationSubjectSchema, subject, (decodedSubject) => requestJson$1(AccountConfirmationsEnvelopeSchema, {
|
|
337
337
|
method: "GET",
|
|
338
338
|
path: "/v2/account/confirmation/list",
|
|
339
339
|
query: decodedSubject ? { type: decodedSubject } : void 0
|
|
340
|
-
})).pipe(selectJsonField("confirmations"), withOperationErrors(AccountConfirmationsErrorSpec));
|
|
340
|
+
})).pipe(selectJsonField$1("confirmations"), withOperationErrors$1(AccountConfirmationsErrorSpec));
|
|
341
341
|
// src/domains/app-specific-passwords.ts
|
|
342
342
|
const AppSpecificPasswordIdSchema = Schema.Int.check(Schema.isGreaterThan(0));
|
|
343
343
|
const AppSpecificPasswordNoteSchema = Schema.Trim.check(Schema.isMinLength(1), Schema.isMaxLength(255));
|
|
@@ -371,7 +371,7 @@ const RestrictedAppSpecificPasswordError = {
|
|
|
371
371
|
errorType: "invalid_scope",
|
|
372
372
|
statusCode: 401
|
|
373
373
|
};
|
|
374
|
-
const TooManyAppSpecificPasswordsErrorBodySchema = PutioErrorEnvelopeSchema.pipe(Schema.fieldsAssign({ extra: Schema.Struct({ limit: Schema.Int }) }));
|
|
374
|
+
const TooManyAppSpecificPasswordsErrorBodySchema = PutioErrorEnvelopeSchema$1.pipe(Schema.fieldsAssign({ extra: Schema.Struct({ limit: Schema.Int }) }));
|
|
375
375
|
const CreateAppSpecificPasswordErrorSpec = definePutioOperationErrorSpec({
|
|
376
376
|
domain: "account",
|
|
377
377
|
operation: "appSpecificPasswords.create",
|
|
@@ -407,26 +407,26 @@ const DeleteAllAppSpecificPasswordsErrorSpec = definePutioOperationErrorSpec({
|
|
|
407
407
|
operation: "appSpecificPasswords.deleteAll",
|
|
408
408
|
knownErrors: [RestrictedAppSpecificPasswordError]
|
|
409
409
|
});
|
|
410
|
-
const createAppSpecificPassword = (input) => decodeAndRun(CreateAppSpecificPasswordInputSchema, input, (decodedInput) => requestJson(CreateAppSpecificPasswordEnvelopeSchema, {
|
|
410
|
+
const createAppSpecificPassword = (input) => decodeAndRun(CreateAppSpecificPasswordInputSchema, input, (decodedInput) => requestJson$1(CreateAppSpecificPasswordEnvelopeSchema, {
|
|
411
411
|
body: {
|
|
412
412
|
type: "form",
|
|
413
413
|
value: decodedInput
|
|
414
414
|
},
|
|
415
415
|
method: "POST",
|
|
416
416
|
path: "/v2/app_specific_password/create"
|
|
417
|
-
})).pipe(selectJsonFields("created_at", "id", "ip_address", "last_used_at", "note", "password"), withOperationErrors(CreateAppSpecificPasswordErrorSpec));
|
|
418
|
-
const listAppSpecificPasswords = () => requestJson(ListAppSpecificPasswordsEnvelopeSchema, {
|
|
417
|
+
})).pipe(selectJsonFields$1("created_at", "id", "ip_address", "last_used_at", "note", "password"), withOperationErrors$1(CreateAppSpecificPasswordErrorSpec));
|
|
418
|
+
const listAppSpecificPasswords = () => requestJson$1(ListAppSpecificPasswordsEnvelopeSchema, {
|
|
419
419
|
method: "GET",
|
|
420
420
|
path: "/v2/app_specific_password/list"
|
|
421
|
-
}).pipe(selectJsonField("passwords"), withOperationErrors(ListAppSpecificPasswordsErrorSpec));
|
|
422
|
-
const deleteAppSpecificPassword = (id) => decodeAndRun(AppSpecificPasswordIdSchema, id, (decodedId) => requestJson(OkResponseSchema, {
|
|
421
|
+
}).pipe(selectJsonField$1("passwords"), withOperationErrors$1(ListAppSpecificPasswordsErrorSpec));
|
|
422
|
+
const deleteAppSpecificPassword = (id) => decodeAndRun(AppSpecificPasswordIdSchema, id, (decodedId) => requestJson$1(OkResponseSchema, {
|
|
423
423
|
method: "POST",
|
|
424
|
-
path: `/v2/app_specific_password/${encodePathSegment(decodedId)}/delete`
|
|
425
|
-
})).pipe(Effect.asVoid, withOperationErrors(DeleteAppSpecificPasswordErrorSpec));
|
|
426
|
-
const deleteAllAppSpecificPasswords = () => requestJson(OkResponseSchema, {
|
|
424
|
+
path: `/v2/app_specific_password/${encodePathSegment$1(decodedId)}/delete`
|
|
425
|
+
})).pipe(Effect.asVoid, withOperationErrors$1(DeleteAppSpecificPasswordErrorSpec));
|
|
426
|
+
const deleteAllAppSpecificPasswords = () => requestJson$1(OkResponseSchema, {
|
|
427
427
|
method: "POST",
|
|
428
428
|
path: "/v2/app_specific_password/delete_all"
|
|
429
|
-
}).pipe(Effect.asVoid, withOperationErrors(DeleteAllAppSpecificPasswordsErrorSpec));
|
|
429
|
+
}).pipe(Effect.asVoid, withOperationErrors$1(DeleteAllAppSpecificPasswordsErrorSpec));
|
|
430
430
|
// src/domains/oauth.ts
|
|
431
431
|
const OAuthAppSchema = Schema.Struct({
|
|
432
432
|
description: Schema.String,
|
|
@@ -572,19 +572,19 @@ const makeUpdateOAuthAppFormData = (input) => {
|
|
|
572
572
|
appendOptionalBlob(formData, "icon", input.icon);
|
|
573
573
|
return formData;
|
|
574
574
|
};
|
|
575
|
-
const buildOAuthAuthorizeUrl = (options) => buildPutioUrl(options.baseUrl ?? "https://api.put.io", "/v2/oauth2/authorize", {
|
|
575
|
+
const buildOAuthAuthorizeUrl = (options) => buildPutioUrl$1(options.baseUrl ?? "https://api.put.io", "/v2/oauth2/authorize", {
|
|
576
576
|
...options.query,
|
|
577
577
|
oauth_token: options.oauthToken
|
|
578
578
|
});
|
|
579
579
|
const buildOAuthAppIconRequest = (options) => ({
|
|
580
580
|
headers: { Authorization: `Token ${options.oauthToken}` },
|
|
581
581
|
method: "GET",
|
|
582
|
-
url: buildPutioUrl(options.baseUrl ?? "https://api.put.io", `/v2/oauth/apps/${encodePathSegment(options.id)}/icon`)
|
|
582
|
+
url: buildPutioUrl$1(options.baseUrl ?? "https://api.put.io", `/v2/oauth/apps/${encodePathSegment$1(options.id)}/icon`)
|
|
583
583
|
});
|
|
584
|
-
const queryOAuthApps = () => requestJson(OAuthAppsEnvelopeSchema, {
|
|
584
|
+
const queryOAuthApps = () => requestJson$1(OAuthAppsEnvelopeSchema, {
|
|
585
585
|
method: "GET",
|
|
586
586
|
path: "/v2/oauth/apps"
|
|
587
|
-
}).pipe(selectJsonField("apps"), withOperationErrors(QueryOAuthAppsErrorSpec));
|
|
587
|
+
}).pipe(selectJsonField$1("apps"), withOperationErrors$1(QueryOAuthAppsErrorSpec));
|
|
588
588
|
const OAuthAppGetInputSchema = Schema.Struct({
|
|
589
589
|
id: OAuthAppIdSchema,
|
|
590
590
|
options: Schema.optional(Schema.Struct({ edit: Schema.optional(Schema.Boolean) }))
|
|
@@ -592,10 +592,10 @@ const OAuthAppGetInputSchema = Schema.Struct({
|
|
|
592
592
|
const getOAuthApp = (id, options) => decodeAndRun(OAuthAppGetInputSchema, {
|
|
593
593
|
id,
|
|
594
594
|
options
|
|
595
|
-
}, (decodedInput) => requestJson(OAuthAppWithTokenSchema, {
|
|
595
|
+
}, (decodedInput) => requestJson$1(OAuthAppWithTokenSchema, {
|
|
596
596
|
method: "GET",
|
|
597
|
-
path: decodedInput.options?.edit ? `/v2/oauth/apps/${encodePathSegment(decodedInput.id)}/edit` : `/v2/oauth/apps/${encodePathSegment(decodedInput.id)}`
|
|
598
|
-
})).pipe(withOperationErrors(GetOAuthAppErrorSpec));
|
|
597
|
+
path: decodedInput.options?.edit ? `/v2/oauth/apps/${encodePathSegment$1(decodedInput.id)}/edit` : `/v2/oauth/apps/${encodePathSegment$1(decodedInput.id)}`
|
|
598
|
+
})).pipe(withOperationErrors$1(GetOAuthAppErrorSpec));
|
|
599
599
|
const OAuthAppSetIconInputSchema = Schema.Struct({
|
|
600
600
|
id: OAuthAppIdSchema,
|
|
601
601
|
input: OAuthSetIconInputSchema
|
|
@@ -606,43 +606,43 @@ const setOAuthAppIcon = (id, input) => decodeAndRun(OAuthAppSetIconInputSchema,
|
|
|
606
606
|
}, (decodedInput) => {
|
|
607
607
|
const formData = new FormData();
|
|
608
608
|
formData.append("icon", decodedInput.input.icon);
|
|
609
|
-
return requestJson(OkResponseSchema, {
|
|
609
|
+
return requestJson$1(OkResponseSchema, {
|
|
610
610
|
body: {
|
|
611
611
|
type: "form-data",
|
|
612
612
|
value: formData
|
|
613
613
|
},
|
|
614
614
|
method: "POST",
|
|
615
|
-
path: `/v2/oauth/apps/${encodePathSegment(decodedInput.id)}/icon`
|
|
615
|
+
path: `/v2/oauth/apps/${encodePathSegment$1(decodedInput.id)}/icon`
|
|
616
616
|
});
|
|
617
617
|
});
|
|
618
|
-
const createOAuthApp = (input) => decodeAndRun(OAuthAppCreateInputSchema, input, (decodedInput) => requestJson(OAuthAppEnvelopeSchema, {
|
|
618
|
+
const createOAuthApp = (input) => decodeAndRun(OAuthAppCreateInputSchema, input, (decodedInput) => requestJson$1(OAuthAppEnvelopeSchema, {
|
|
619
619
|
body: {
|
|
620
620
|
type: "form-data",
|
|
621
621
|
value: makeCreateOAuthAppFormData(decodedInput)
|
|
622
622
|
},
|
|
623
623
|
method: "POST",
|
|
624
624
|
path: "/v2/oauth/apps/register"
|
|
625
|
-
})).pipe(withOperationErrors(CreateOAuthAppErrorSpec));
|
|
626
|
-
const updateOAuthApp = (input) => decodeAndRun(OAuthAppUpdateInputSchema, input, (decodedInput) => requestJson(OAuthAppWithTokenSchema, {
|
|
625
|
+
})).pipe(withOperationErrors$1(CreateOAuthAppErrorSpec));
|
|
626
|
+
const updateOAuthApp = (input) => decodeAndRun(OAuthAppUpdateInputSchema, input, (decodedInput) => requestJson$1(OAuthAppWithTokenSchema, {
|
|
627
627
|
body: {
|
|
628
628
|
type: "form-data",
|
|
629
629
|
value: makeUpdateOAuthAppFormData(decodedInput)
|
|
630
630
|
},
|
|
631
631
|
method: "POST",
|
|
632
|
-
path: `/v2/oauth/apps/${encodePathSegment(decodedInput.id)}`
|
|
633
|
-
})).pipe(withOperationErrors(UpdateOAuthAppErrorSpec));
|
|
634
|
-
const deleteOAuthApp = (id) => decodeAndRun(OAuthAppIdSchema, id, (decodedId) => requestJson(OkResponseSchema, {
|
|
632
|
+
path: `/v2/oauth/apps/${encodePathSegment$1(decodedInput.id)}`
|
|
633
|
+
})).pipe(withOperationErrors$1(UpdateOAuthAppErrorSpec));
|
|
634
|
+
const deleteOAuthApp = (id) => decodeAndRun(OAuthAppIdSchema, id, (decodedId) => requestJson$1(OkResponseSchema, {
|
|
635
635
|
method: "POST",
|
|
636
|
-
path: `/v2/oauth/apps/${encodePathSegment(decodedId)}/delete`
|
|
637
|
-
})).pipe(withOperationErrors(DeleteOAuthAppErrorSpec));
|
|
638
|
-
const regenerateOAuthAppToken = (id) => decodeAndRun(OAuthAppIdSchema, id, (decodedId) => requestJson(OAuthRegeneratedTokenEnvelopeSchema, {
|
|
636
|
+
path: `/v2/oauth/apps/${encodePathSegment$1(decodedId)}/delete`
|
|
637
|
+
})).pipe(withOperationErrors$1(DeleteOAuthAppErrorSpec));
|
|
638
|
+
const regenerateOAuthAppToken = (id) => decodeAndRun(OAuthAppIdSchema, id, (decodedId) => requestJson$1(OAuthRegeneratedTokenEnvelopeSchema, {
|
|
639
639
|
method: "POST",
|
|
640
|
-
path: `/v2/oauth/apps/${encodePathSegment(decodedId)}/regenerate_token`
|
|
641
|
-
})).pipe(selectJsonField("access_token"), withOperationErrors(RegenerateOAuthAppTokenErrorSpec));
|
|
642
|
-
const getPopularOAuthApps = () => requestJson(PopularOAuthAppsEnvelopeSchema, {
|
|
640
|
+
path: `/v2/oauth/apps/${encodePathSegment$1(decodedId)}/regenerate_token`
|
|
641
|
+
})).pipe(selectJsonField$1("access_token"), withOperationErrors$1(RegenerateOAuthAppTokenErrorSpec));
|
|
642
|
+
const getPopularOAuthApps = () => requestJson$1(PopularOAuthAppsEnvelopeSchema, {
|
|
643
643
|
method: "GET",
|
|
644
644
|
path: "/v2/oauth/apps/popular"
|
|
645
|
-
}).pipe(selectJsonField("apps"));
|
|
645
|
+
}).pipe(selectJsonField$1("apps"));
|
|
646
646
|
// src/domains/auth.ts
|
|
647
647
|
const LoginResponseSchema = Schema.Struct({
|
|
648
648
|
access_token: Schema.String,
|
|
@@ -1036,7 +1036,7 @@ const RegenerateRecoveryCodesErrorSpec = definePutioOperationErrorSpec({
|
|
|
1036
1036
|
statusCode: 401
|
|
1037
1037
|
}]
|
|
1038
1038
|
});
|
|
1039
|
-
const buildAuthLoginUrl = (options) => buildPutioUrl(options.webAppUrl ?? "https://app.put.io", "/authenticate", {
|
|
1039
|
+
const buildAuthLoginUrl = (options) => buildPutioUrl$1(options.webAppUrl ?? "https://app.put.io", "/authenticate", {
|
|
1040
1040
|
client_id: options.clientId,
|
|
1041
1041
|
client_name: options.clientName,
|
|
1042
1042
|
isolated: 1,
|
|
@@ -1049,7 +1049,7 @@ const mapOAuthAuthorizationCodeExchangeError = (error) => error instanceof Putio
|
|
|
1049
1049
|
code: error.body.error,
|
|
1050
1050
|
status: 400
|
|
1051
1051
|
}) : error;
|
|
1052
|
-
const exchangeOAuthAuthorizationCode = (input) => decodeAndRunRedacted("auth", "exchangeAuthorizationCode")(OAuthAuthorizationCodeExchangeInputSchema, input, (decodedInput) => requestJson(OAuthAuthorizationCodeResponseSchema, {
|
|
1052
|
+
const exchangeOAuthAuthorizationCode = (input) => decodeAndRunRedacted("auth", "exchangeAuthorizationCode")(OAuthAuthorizationCodeExchangeInputSchema, input, (decodedInput) => requestJson$1(OAuthAuthorizationCodeResponseSchema, {
|
|
1053
1053
|
auth: { type: "none" },
|
|
1054
1054
|
body: {
|
|
1055
1055
|
type: "form",
|
|
@@ -1063,26 +1063,26 @@ const exchangeOAuthAuthorizationCode = (input) => decodeAndRunRedacted("auth", "
|
|
|
1063
1063
|
},
|
|
1064
1064
|
method: "POST",
|
|
1065
1065
|
path: "/v2/oauth2/access_token"
|
|
1066
|
-
}).pipe(selectJsonField("access_token"), Effect.mapError(mapOAuthAuthorizationCodeExchangeError)));
|
|
1067
|
-
const login = (input) => decodeAndRunRedacted("auth", "login")(LoginInputSchema, input, (decodedInput) => requestJson(LoginResponseSchema, {
|
|
1066
|
+
}).pipe(selectJsonField$1("access_token"), Effect.mapError(mapOAuthAuthorizationCodeExchangeError)));
|
|
1067
|
+
const login = (input) => decodeAndRunRedacted("auth", "login")(LoginInputSchema, input, (decodedInput) => requestJson$1(LoginResponseSchema, {
|
|
1068
1068
|
auth: {
|
|
1069
1069
|
type: "basic",
|
|
1070
1070
|
password: decodedInput.password,
|
|
1071
1071
|
username: decodedInput.username
|
|
1072
1072
|
},
|
|
1073
1073
|
method: "PUT",
|
|
1074
|
-
path: decodedInput.fingerprint ? `/v2/oauth2/authorizations/clients/${encodePathSegment(decodedInput.clientId)}/${encodePathSegment(decodedInput.fingerprint)}` : `/v2/oauth2/authorizations/clients/${encodePathSegment(decodedInput.clientId)}`,
|
|
1074
|
+
path: decodedInput.fingerprint ? `/v2/oauth2/authorizations/clients/${encodePathSegment$1(decodedInput.clientId)}/${encodePathSegment$1(decodedInput.fingerprint)}` : `/v2/oauth2/authorizations/clients/${encodePathSegment$1(decodedInput.clientId)}`,
|
|
1075
1075
|
query: {
|
|
1076
1076
|
callback_url: decodedInput.callbackUrl,
|
|
1077
1077
|
client_name: decodedInput.clientName,
|
|
1078
1078
|
client_secret: decodedInput.clientSecret
|
|
1079
1079
|
}
|
|
1080
|
-
}).pipe(selectJsonFields("access_token", "user_id"))).pipe(withOperationErrors(LoginErrorSpec));
|
|
1081
|
-
const logout = () => requestJson(OkResponseSchema, {
|
|
1080
|
+
}).pipe(selectJsonFields$1("access_token", "user_id"))).pipe(withOperationErrors$1(LoginErrorSpec));
|
|
1081
|
+
const logout = () => requestJson$1(OkResponseSchema, {
|
|
1082
1082
|
method: "POST",
|
|
1083
1083
|
path: "/v2/oauth/grants/logout"
|
|
1084
1084
|
});
|
|
1085
|
-
const register = (input) => decodeAndRunRedacted("auth", "register")(RegisterInputSchema, input, (decodedInput) => requestJson(AccessTokenEnvelopeSchema, {
|
|
1085
|
+
const register = (input) => decodeAndRunRedacted("auth", "register")(RegisterInputSchema, input, (decodedInput) => requestJson$1(AccessTokenEnvelopeSchema, {
|
|
1086
1086
|
auth: { type: "none" },
|
|
1087
1087
|
body: {
|
|
1088
1088
|
type: "form",
|
|
@@ -1093,37 +1093,37 @@ const register = (input) => decodeAndRunRedacted("auth", "register")(RegisterInp
|
|
|
1093
1093
|
},
|
|
1094
1094
|
method: "POST",
|
|
1095
1095
|
path: "/v2/registration/register"
|
|
1096
|
-
}).pipe(selectJsonFields("access_token"))).pipe(withOperationErrors(RegisterErrorSpec));
|
|
1096
|
+
}).pipe(selectJsonFields$1("access_token"))).pipe(withOperationErrors$1(RegisterErrorSpec));
|
|
1097
1097
|
const exists = (key, value) => decodeAndRunRedacted("auth", "exists")(AuthExistsInputSchema, {
|
|
1098
1098
|
key,
|
|
1099
1099
|
value
|
|
1100
|
-
}, (decodedInput) => requestJson(ExistsEnvelopeSchema, {
|
|
1100
|
+
}, (decodedInput) => requestJson$1(ExistsEnvelopeSchema, {
|
|
1101
1101
|
auth: { type: "none" },
|
|
1102
1102
|
method: "GET",
|
|
1103
|
-
path: `/v2/registration/exists/${encodePathSegment(decodedInput.key)}`,
|
|
1103
|
+
path: `/v2/registration/exists/${encodePathSegment$1(decodedInput.key)}`,
|
|
1104
1104
|
query: { value: decodedInput.value }
|
|
1105
|
-
}).pipe(selectJsonField("exists")));
|
|
1106
|
-
const getVoucher = (code) => decodeAndRunRedacted("auth", "getVoucher")(NonEmptyStringSchema, code, (decodedCode) => requestJson(VoucherEnvelopeSchema, {
|
|
1105
|
+
}).pipe(selectJsonField$1("exists")));
|
|
1106
|
+
const getVoucher = (code) => decodeAndRunRedacted("auth", "getVoucher")(NonEmptyStringSchema, code, (decodedCode) => requestJson$1(VoucherEnvelopeSchema, {
|
|
1107
1107
|
auth: { type: "none" },
|
|
1108
1108
|
method: "GET",
|
|
1109
|
-
path: `/v2/registration/voucher/${encodePathSegment(decodedCode)}`
|
|
1110
|
-
}).pipe(selectJsonField("voucher"))).pipe(withOperationErrors(VoucherLookupErrorSpec));
|
|
1111
|
-
const getGiftCard = (code) => decodeAndRunRedacted("auth", "getGiftCard")(NonEmptyStringSchema, code, (decodedCode) => requestJson(GiftCardEnvelopeSchema, {
|
|
1109
|
+
path: `/v2/registration/voucher/${encodePathSegment$1(decodedCode)}`
|
|
1110
|
+
}).pipe(selectJsonField$1("voucher"))).pipe(withOperationErrors$1(VoucherLookupErrorSpec));
|
|
1111
|
+
const getGiftCard = (code) => decodeAndRunRedacted("auth", "getGiftCard")(NonEmptyStringSchema, code, (decodedCode) => requestJson$1(GiftCardEnvelopeSchema, {
|
|
1112
1112
|
auth: { type: "none" },
|
|
1113
1113
|
method: "GET",
|
|
1114
|
-
path: `/v2/registration/gift_card/${encodePathSegment(decodedCode)}`
|
|
1115
|
-
}).pipe(selectJsonField("gift_card"))).pipe(withOperationErrors(GiftCardLookupErrorSpec));
|
|
1116
|
-
const getFamilyInvite = (code) => decodeAndRunRedacted("auth", "getFamilyInvite")(NonEmptyStringSchema, code, (decodedCode) => requestJson(FamilyInviteEnvelopeSchema, {
|
|
1114
|
+
path: `/v2/registration/gift_card/${encodePathSegment$1(decodedCode)}`
|
|
1115
|
+
}).pipe(selectJsonField$1("gift_card"))).pipe(withOperationErrors$1(GiftCardLookupErrorSpec));
|
|
1116
|
+
const getFamilyInvite = (code) => decodeAndRunRedacted("auth", "getFamilyInvite")(NonEmptyStringSchema, code, (decodedCode) => requestJson$1(FamilyInviteEnvelopeSchema, {
|
|
1117
1117
|
auth: { type: "none" },
|
|
1118
1118
|
method: "GET",
|
|
1119
|
-
path: `/v2/registration/family/${encodePathSegment(decodedCode)}`
|
|
1120
|
-
}).pipe(selectJsonField("invite"))).pipe(withOperationErrors(FamilyInviteLookupErrorSpec));
|
|
1121
|
-
const getFriendInvite = (code) => decodeAndRunRedacted("auth", "getFriendInvite")(NonEmptyStringSchema, code, (decodedCode) => requestJson(FriendInviteEnvelopeSchema, {
|
|
1119
|
+
path: `/v2/registration/family/${encodePathSegment$1(decodedCode)}`
|
|
1120
|
+
}).pipe(selectJsonField$1("invite"))).pipe(withOperationErrors$1(FamilyInviteLookupErrorSpec));
|
|
1121
|
+
const getFriendInvite = (code) => decodeAndRunRedacted("auth", "getFriendInvite")(NonEmptyStringSchema, code, (decodedCode) => requestJson$1(FriendInviteEnvelopeSchema, {
|
|
1122
1122
|
auth: { type: "none" },
|
|
1123
1123
|
method: "GET",
|
|
1124
|
-
path: `/v2/registration/friend/${encodePathSegment(decodedCode)}`
|
|
1125
|
-
}).pipe(selectJsonField("invite"))).pipe(withOperationErrors(FriendInviteLookupErrorSpec));
|
|
1126
|
-
const forgotPassword = (mail) => decodeAndRunRedacted("auth", "forgotPassword")(NonEmptyStringSchema, mail, (decodedMail) => requestJson(OkResponseSchema, {
|
|
1124
|
+
path: `/v2/registration/friend/${encodePathSegment$1(decodedCode)}`
|
|
1125
|
+
}).pipe(selectJsonField$1("invite"))).pipe(withOperationErrors$1(FriendInviteLookupErrorSpec));
|
|
1126
|
+
const forgotPassword = (mail) => decodeAndRunRedacted("auth", "forgotPassword")(NonEmptyStringSchema, mail, (decodedMail) => requestJson$1(OkResponseSchema, {
|
|
1127
1127
|
auth: { type: "none" },
|
|
1128
1128
|
body: {
|
|
1129
1129
|
type: "form",
|
|
@@ -1131,11 +1131,11 @@ const forgotPassword = (mail) => decodeAndRunRedacted("auth", "forgotPassword")(
|
|
|
1131
1131
|
},
|
|
1132
1132
|
method: "POST",
|
|
1133
1133
|
path: "/v2/registration/password/forgot"
|
|
1134
|
-
})).pipe(withOperationErrors(ForgotPasswordErrorSpec));
|
|
1134
|
+
})).pipe(withOperationErrors$1(ForgotPasswordErrorSpec));
|
|
1135
1135
|
const resetPassword = (key, password) => decodeAndRunRedacted("auth", "resetPassword")(AuthResetPasswordInputSchema, {
|
|
1136
1136
|
key,
|
|
1137
1137
|
password
|
|
1138
|
-
}, (decodedInput) => requestJson(AccessTokenEnvelopeSchema, {
|
|
1138
|
+
}, (decodedInput) => requestJson$1(AccessTokenEnvelopeSchema, {
|
|
1139
1139
|
auth: { type: "none" },
|
|
1140
1140
|
body: {
|
|
1141
1141
|
type: "form",
|
|
@@ -1143,8 +1143,8 @@ const resetPassword = (key, password) => decodeAndRunRedacted("auth", "resetPass
|
|
|
1143
1143
|
},
|
|
1144
1144
|
method: "POST",
|
|
1145
1145
|
path: "/v2/registration/password/reset"
|
|
1146
|
-
}).pipe(selectJsonFields("access_token"))).pipe(withOperationErrors(ResetPasswordErrorSpec));
|
|
1147
|
-
const getCode = (input) => decodeAndRunRedacted("auth", "getCode")(AuthGetCodeInputSchema, input, (decodedInput) => requestJson(AuthorizationCodeEnvelopeSchema, {
|
|
1146
|
+
}).pipe(selectJsonFields$1("access_token"))).pipe(withOperationErrors$1(ResetPasswordErrorSpec));
|
|
1147
|
+
const getCode = (input) => decodeAndRunRedacted("auth", "getCode")(AuthGetCodeInputSchema, input, (decodedInput) => requestJson$1(AuthorizationCodeEnvelopeSchema, {
|
|
1148
1148
|
auth: { type: "none" },
|
|
1149
1149
|
method: "GET",
|
|
1150
1150
|
path: "/v2/oauth2/oob/code",
|
|
@@ -1152,54 +1152,54 @@ const getCode = (input) => decodeAndRunRedacted("auth", "getCode")(AuthGetCodeIn
|
|
|
1152
1152
|
app_id: decodedInput.appId,
|
|
1153
1153
|
client_name: decodedInput.clientName
|
|
1154
1154
|
}
|
|
1155
|
-
}).pipe(selectJsonFields("code", "qr_code_url")));
|
|
1156
|
-
const checkCodeMatch = (code) => decodeAndRunRedacted("auth", "checkCodeMatch")(NonEmptyStringSchema, code, (decodedCode) => requestJson(CodeMatchEnvelopeSchema, {
|
|
1155
|
+
}).pipe(selectJsonFields$1("code", "qr_code_url")));
|
|
1156
|
+
const checkCodeMatch = (code) => decodeAndRunRedacted("auth", "checkCodeMatch")(NonEmptyStringSchema, code, (decodedCode) => requestJson$1(CodeMatchEnvelopeSchema, {
|
|
1157
1157
|
auth: { type: "none" },
|
|
1158
1158
|
method: "GET",
|
|
1159
|
-
path: `/v2/oauth2/oob/code/${encodePathSegment(decodedCode)}`
|
|
1160
|
-
}).pipe(selectJsonField("oauth_token")));
|
|
1161
|
-
const linkDevice = (code) => decodeAndRunRedacted("auth", "linkDevice")(NonEmptyStringSchema, code, (decodedCode) => requestJson(LinkDeviceEnvelopeSchema, {
|
|
1159
|
+
path: `/v2/oauth2/oob/code/${encodePathSegment$1(decodedCode)}`
|
|
1160
|
+
}).pipe(selectJsonField$1("oauth_token")));
|
|
1161
|
+
const linkDevice = (code) => decodeAndRunRedacted("auth", "linkDevice")(NonEmptyStringSchema, code, (decodedCode) => requestJson$1(LinkDeviceEnvelopeSchema, {
|
|
1162
1162
|
body: {
|
|
1163
1163
|
type: "form",
|
|
1164
1164
|
value: { code: decodedCode }
|
|
1165
1165
|
},
|
|
1166
1166
|
method: "POST",
|
|
1167
1167
|
path: "/v2/oauth2/oob/code"
|
|
1168
|
-
}).pipe(selectJsonField("app"))).pipe(withOperationErrors(LinkDeviceErrorSpec));
|
|
1169
|
-
const grants = () => requestJson(GrantsEnvelopeSchema, {
|
|
1168
|
+
}).pipe(selectJsonField$1("app"))).pipe(withOperationErrors$1(LinkDeviceErrorSpec));
|
|
1169
|
+
const grants = () => requestJson$1(GrantsEnvelopeSchema, {
|
|
1170
1170
|
method: "GET",
|
|
1171
1171
|
path: "/v2/oauth/grants/"
|
|
1172
|
-
}).pipe(selectJsonField("apps"), withOperationErrors(GrantsErrorSpec));
|
|
1173
|
-
const revokeApp = (id) => decodeAndRunRedacted("auth", "revokeApp")(PositiveIntegerSchema, id, (decodedId) => requestJson(OkResponseSchema, {
|
|
1172
|
+
}).pipe(selectJsonField$1("apps"), withOperationErrors$1(GrantsErrorSpec));
|
|
1173
|
+
const revokeApp = (id) => decodeAndRunRedacted("auth", "revokeApp")(PositiveIntegerSchema, id, (decodedId) => requestJson$1(OkResponseSchema, {
|
|
1174
1174
|
method: "POST",
|
|
1175
|
-
path: `/v2/oauth/grants/${encodePathSegment(decodedId)}/delete`
|
|
1176
|
-
})).pipe(withOperationErrors(RevokeOAuthGrantErrorSpec));
|
|
1177
|
-
const clients = () => requestJson(ClientsEnvelopeSchema, {
|
|
1175
|
+
path: `/v2/oauth/grants/${encodePathSegment$1(decodedId)}/delete`
|
|
1176
|
+
})).pipe(withOperationErrors$1(RevokeOAuthGrantErrorSpec));
|
|
1177
|
+
const clients = () => requestJson$1(ClientsEnvelopeSchema, {
|
|
1178
1178
|
method: "GET",
|
|
1179
1179
|
path: "/v2/oauth/clients/"
|
|
1180
|
-
}).pipe(selectJsonField("clients"), withOperationErrors(ClientsErrorSpec));
|
|
1181
|
-
const revokeClient = (id) => decodeAndRunRedacted("auth", "revokeClient")(PositiveIntegerSchema, id, (decodedId) => requestJson(OkResponseSchema, {
|
|
1180
|
+
}).pipe(selectJsonField$1("clients"), withOperationErrors$1(ClientsErrorSpec));
|
|
1181
|
+
const revokeClient = (id) => decodeAndRunRedacted("auth", "revokeClient")(PositiveIntegerSchema, id, (decodedId) => requestJson$1(OkResponseSchema, {
|
|
1182
1182
|
method: "POST",
|
|
1183
|
-
path: `/v2/oauth/clients/${encodePathSegment(decodedId)}/delete`
|
|
1184
|
-
})).pipe(withOperationErrors(RevokeOAuthClientErrorSpec));
|
|
1185
|
-
const revokeAllClients = () => requestJson(OkResponseSchema, {
|
|
1183
|
+
path: `/v2/oauth/clients/${encodePathSegment$1(decodedId)}/delete`
|
|
1184
|
+
})).pipe(withOperationErrors$1(RevokeOAuthClientErrorSpec));
|
|
1185
|
+
const revokeAllClients = () => requestJson$1(OkResponseSchema, {
|
|
1186
1186
|
method: "POST",
|
|
1187
1187
|
path: "/v2/oauth/clients/delete-all"
|
|
1188
|
-
}).pipe(withOperationErrors(RevokeAllOAuthClientsErrorSpec));
|
|
1189
|
-
const validateToken = (token) => decodeAndRunRedacted("auth", "validateToken")(NonEmptyStringSchema, token, (decodedToken) => requestJson(ValidateTokenResponseSchema, {
|
|
1188
|
+
}).pipe(withOperationErrors$1(RevokeAllOAuthClientsErrorSpec));
|
|
1189
|
+
const validateToken = (token) => decodeAndRunRedacted("auth", "validateToken")(NonEmptyStringSchema, token, (decodedToken) => requestJson$1(ValidateTokenResponseSchema, {
|
|
1190
1190
|
auth: { type: "none" },
|
|
1191
1191
|
method: "GET",
|
|
1192
1192
|
path: "/v2/oauth2/validate",
|
|
1193
1193
|
query: { oauth_token: decodedToken }
|
|
1194
1194
|
}));
|
|
1195
|
-
const generateTOTP = () => requestJson(GenerateTOTPEnvelopeSchema, {
|
|
1195
|
+
const generateTOTP = () => requestJson$1(GenerateTOTPEnvelopeSchema, {
|
|
1196
1196
|
method: "POST",
|
|
1197
1197
|
path: "/v2/two_factor/generate/totp"
|
|
1198
|
-
}).pipe(selectJsonFields("recovery_codes", "secret", "uri"), withOperationErrors(GenerateTOTPErrorSpec));
|
|
1198
|
+
}).pipe(selectJsonFields$1("recovery_codes", "secret", "uri"), withOperationErrors$1(GenerateTOTPErrorSpec));
|
|
1199
1199
|
const verifyTOTP = (twoFactorScopedToken, code) => decodeAndRunRedacted("auth", "verifyTOTP")(AuthVerifyTotpInputSchema, {
|
|
1200
1200
|
code,
|
|
1201
1201
|
twoFactorScopedToken
|
|
1202
|
-
}, (decodedInput) => requestJson(VerifyTOTPEnvelopeSchema, {
|
|
1202
|
+
}, (decodedInput) => requestJson$1(VerifyTOTPEnvelopeSchema, {
|
|
1203
1203
|
auth: {
|
|
1204
1204
|
token: decodedInput.twoFactorScopedToken,
|
|
1205
1205
|
type: "token"
|
|
@@ -1210,15 +1210,15 @@ const verifyTOTP = (twoFactorScopedToken, code) => decodeAndRunRedacted("auth",
|
|
|
1210
1210
|
},
|
|
1211
1211
|
method: "POST",
|
|
1212
1212
|
path: "/v2/two_factor/verify/totp"
|
|
1213
|
-
}).pipe(selectJsonFields("token", "user_id"))).pipe(withOperationErrors(VerifyTOTPErrorSpec));
|
|
1214
|
-
const getRecoveryCodes = () => requestJson(RecoveryCodesEnvelopeSchema, {
|
|
1213
|
+
}).pipe(selectJsonFields$1("token", "user_id"))).pipe(withOperationErrors$1(VerifyTOTPErrorSpec));
|
|
1214
|
+
const getRecoveryCodes = () => requestJson$1(RecoveryCodesEnvelopeSchema, {
|
|
1215
1215
|
method: "GET",
|
|
1216
1216
|
path: "/v2/two_factor/recovery_codes"
|
|
1217
|
-
}).pipe(selectJsonField("recovery_codes"), withOperationErrors(RecoveryCodesErrorSpec));
|
|
1218
|
-
const regenerateRecoveryCodes = () => requestJson(RecoveryCodesEnvelopeSchema, {
|
|
1217
|
+
}).pipe(selectJsonField$1("recovery_codes"), withOperationErrors$1(RecoveryCodesErrorSpec));
|
|
1218
|
+
const regenerateRecoveryCodes = () => requestJson$1(RecoveryCodesEnvelopeSchema, {
|
|
1219
1219
|
method: "POST",
|
|
1220
1220
|
path: "/v2/two_factor/recovery_codes/refresh"
|
|
1221
|
-
}).pipe(selectJsonField("recovery_codes"), withOperationErrors(RegenerateRecoveryCodesErrorSpec));
|
|
1221
|
+
}).pipe(selectJsonField$1("recovery_codes"), withOperationErrors$1(RegenerateRecoveryCodesErrorSpec));
|
|
1222
1222
|
// src/domains/config.ts
|
|
1223
1223
|
const nativeObjectConstructorSource = Function.prototype.toString.call(Object);
|
|
1224
1224
|
const nativeArrayConstructorSource = Function.prototype.toString.call(Array);
|
|
@@ -1324,13 +1324,13 @@ const makeConfigValueEnvelopeSchema = (schema) => Schema.declareConstructor()([s
|
|
|
1324
1324
|
}))));
|
|
1325
1325
|
const ConfigEnvelopeSchema = makeConfigEnvelopeSchema(JsonObjectResponseSchema);
|
|
1326
1326
|
const ConfigValueEnvelopeSchema = makeConfigValueEnvelopeSchema(JsonValueResponseSchema);
|
|
1327
|
-
const decodeWithCallerSchema = (schema) => (value) => Schema.decodeEffect(schema)(value).pipe(Effect.mapError(mapValidationError));
|
|
1328
|
-
const readConfig = () => requestJson(ConfigEnvelopeSchema, {
|
|
1327
|
+
const decodeWithCallerSchema = (schema) => (value) => Schema.decodeEffect(schema)(value).pipe(Effect.mapError(mapValidationError$1));
|
|
1328
|
+
const readConfig = () => requestJson$1(ConfigEnvelopeSchema, {
|
|
1329
1329
|
method: "GET",
|
|
1330
1330
|
path: "/v2/config"
|
|
1331
|
-
}).pipe(selectJsonField("config"));
|
|
1331
|
+
}).pipe(selectJsonField$1("config"));
|
|
1332
1332
|
const readConfigWith = (schema) => readConfig().pipe(Effect.flatMap(decodeWithCallerSchema(schema)));
|
|
1333
|
-
const writeConfig = (config) => decodeAndRun(JsonObjectSchema, config, (decodedConfig) => requestJson(OkResponseSchema, {
|
|
1333
|
+
const writeConfig = (config) => decodeAndRun(JsonObjectSchema, config, (decodedConfig) => requestJson$1(OkResponseSchema, {
|
|
1334
1334
|
body: {
|
|
1335
1335
|
type: "json",
|
|
1336
1336
|
value: { config: decodedConfig }
|
|
@@ -1338,25 +1338,25 @@ const writeConfig = (config) => decodeAndRun(JsonObjectSchema, config, (decodedC
|
|
|
1338
1338
|
method: "PUT",
|
|
1339
1339
|
path: "/v2/config"
|
|
1340
1340
|
}));
|
|
1341
|
-
const getConfigKey = (key) => decodeAndRun(ConfigKeySchema, key, (decodedKey) => requestJson(ConfigValueEnvelopeSchema, {
|
|
1341
|
+
const getConfigKey = (key) => decodeAndRun(ConfigKeySchema, key, (decodedKey) => requestJson$1(ConfigValueEnvelopeSchema, {
|
|
1342
1342
|
method: "GET",
|
|
1343
|
-
path: `/v2/config/${encodePathSegment(decodedKey)}`
|
|
1344
|
-
})).pipe(selectJsonField("value"));
|
|
1343
|
+
path: `/v2/config/${encodePathSegment$1(decodedKey)}`
|
|
1344
|
+
})).pipe(selectJsonField$1("value"));
|
|
1345
1345
|
const getConfigKeyWith = (key, schema) => getConfigKey(key).pipe(Effect.flatMap(decodeWithCallerSchema(schema)));
|
|
1346
1346
|
const setConfigKey = (key, value) => decodeAndRun(ConfigSetKeyInputSchema, {
|
|
1347
1347
|
key,
|
|
1348
1348
|
value
|
|
1349
|
-
}, (decodedInput) => requestJson(OkResponseSchema, {
|
|
1349
|
+
}, (decodedInput) => requestJson$1(OkResponseSchema, {
|
|
1350
1350
|
body: {
|
|
1351
1351
|
type: "json",
|
|
1352
1352
|
value: { value: decodedInput.value }
|
|
1353
1353
|
},
|
|
1354
1354
|
method: "PUT",
|
|
1355
|
-
path: `/v2/config/${encodePathSegment(decodedInput.key)}`
|
|
1355
|
+
path: `/v2/config/${encodePathSegment$1(decodedInput.key)}`
|
|
1356
1356
|
}));
|
|
1357
|
-
const deleteConfigKey = (key) => decodeAndRun(ConfigKeySchema, key, (decodedKey) => requestJson(OkResponseSchema, {
|
|
1357
|
+
const deleteConfigKey = (key) => decodeAndRun(ConfigKeySchema, key, (decodedKey) => requestJson$1(OkResponseSchema, {
|
|
1358
1358
|
method: "DELETE",
|
|
1359
|
-
path: `/v2/config/${encodePathSegment(decodedKey)}`
|
|
1359
|
+
path: `/v2/config/${encodePathSegment$1(decodedKey)}`
|
|
1360
1360
|
}));
|
|
1361
1361
|
// src/domains/download-links.ts
|
|
1362
1362
|
const DownloadLinksStatusSchema = Schema.Literals([
|
|
@@ -1440,18 +1440,18 @@ const GetDownloadLinksErrorSpec = definePutioOperationErrorSpec({
|
|
|
1440
1440
|
{ statusCode: 404 }
|
|
1441
1441
|
]
|
|
1442
1442
|
});
|
|
1443
|
-
const createDownloadLinks = (input) => decodeAndRun(DownloadLinksCreateInputSchema, input, (decodedInput) => requestJson(DownloadLinksCreateEnvelopeSchema, {
|
|
1443
|
+
const createDownloadLinks = (input) => decodeAndRun(DownloadLinksCreateInputSchema, input, (decodedInput) => requestJson$1(DownloadLinksCreateEnvelopeSchema, {
|
|
1444
1444
|
body: {
|
|
1445
1445
|
type: "form",
|
|
1446
1446
|
value: toCursorSelectionForm(decodedInput)
|
|
1447
1447
|
},
|
|
1448
1448
|
method: "POST",
|
|
1449
1449
|
path: "/v2/download_links/create"
|
|
1450
|
-
})).pipe(selectJsonFields("id"), withOperationErrors(CreateDownloadLinksErrorSpec));
|
|
1451
|
-
const getDownloadLinks = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson(DownloadLinksInfoSchema, {
|
|
1450
|
+
})).pipe(selectJsonFields$1("id"), withOperationErrors$1(CreateDownloadLinksErrorSpec));
|
|
1451
|
+
const getDownloadLinks = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson$1(DownloadLinksInfoSchema, {
|
|
1452
1452
|
method: "GET",
|
|
1453
|
-
path: `/v2/download_links/${encodePathSegment(decodedId)}`
|
|
1454
|
-
})).pipe(withOperationErrors(GetDownloadLinksErrorSpec));
|
|
1453
|
+
path: `/v2/download_links/${encodePathSegment$1(decodedId)}`
|
|
1454
|
+
})).pipe(withOperationErrors$1(GetDownloadLinksErrorSpec));
|
|
1455
1455
|
// src/domains/events.ts
|
|
1456
1456
|
const HistoryEventBaseSchema = Schema.Struct({
|
|
1457
1457
|
created_at: Schema.String,
|
|
@@ -1599,23 +1599,23 @@ const GetEventTorrentErrorSpec = definePutioOperationErrorSpec({
|
|
|
1599
1599
|
{ statusCode: 500 }
|
|
1600
1600
|
]
|
|
1601
1601
|
});
|
|
1602
|
-
const listEvents = (query = {}) => decodeAndRun(EventsListQuerySchema, query, (decodedQuery) => requestJson(EventsListEnvelopeSchema, {
|
|
1602
|
+
const listEvents = (query = {}) => decodeAndRun(EventsListQuerySchema, query, (decodedQuery) => requestJson$1(EventsListEnvelopeSchema, {
|
|
1603
1603
|
method: "GET",
|
|
1604
1604
|
path: "/v2/events/list",
|
|
1605
1605
|
query: decodedQuery
|
|
1606
|
-
})).pipe(withOperationErrors(ListEventsErrorSpec));
|
|
1607
|
-
const deleteEvent = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson(OkResponseSchema, {
|
|
1606
|
+
})).pipe(withOperationErrors$1(ListEventsErrorSpec));
|
|
1607
|
+
const deleteEvent = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson$1(OkResponseSchema, {
|
|
1608
1608
|
method: "POST",
|
|
1609
|
-
path: `/v2/events/delete/${encodePathSegment(decodedId)}`
|
|
1610
|
-
})).pipe(withOperationErrors(DeleteEventErrorSpec));
|
|
1611
|
-
const clearEvents = () => requestJson(OkResponseSchema, {
|
|
1609
|
+
path: `/v2/events/delete/${encodePathSegment$1(decodedId)}`
|
|
1610
|
+
})).pipe(withOperationErrors$1(DeleteEventErrorSpec));
|
|
1611
|
+
const clearEvents = () => requestJson$1(OkResponseSchema, {
|
|
1612
1612
|
method: "POST",
|
|
1613
1613
|
path: "/v2/events/delete"
|
|
1614
|
-
}).pipe(withOperationErrors(ClearEventsErrorSpec));
|
|
1615
|
-
const getEventTorrent = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestArrayBuffer({
|
|
1614
|
+
}).pipe(withOperationErrors$1(ClearEventsErrorSpec));
|
|
1615
|
+
const getEventTorrent = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestArrayBuffer$1({
|
|
1616
1616
|
method: "GET",
|
|
1617
|
-
path: `/v2/events/${encodePathSegment(decodedId)}/torrent`
|
|
1618
|
-
})).pipe(withOperationErrors(GetEventTorrentErrorSpec));
|
|
1617
|
+
path: `/v2/events/${encodePathSegment$1(decodedId)}/torrent`
|
|
1618
|
+
})).pipe(withOperationErrors$1(GetEventTorrentErrorSpec));
|
|
1619
1619
|
// src/domains/family.ts
|
|
1620
1620
|
const NonNegativeIntegerSchema = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0));
|
|
1621
1621
|
const NonNegativeIntegerFromStringSchema = Schema.NumberFromString.check(Schema.isInt(), Schema.isGreaterThanOrEqualTo(0));
|
|
@@ -1721,26 +1721,26 @@ const JoinFamilyErrorSpec = definePutioOperationErrorSpec({
|
|
|
1721
1721
|
{ statusCode: 403 }
|
|
1722
1722
|
]
|
|
1723
1723
|
});
|
|
1724
|
-
const listFamilyInvites = () => requestJson(FamilyInvitesEnvelopeSchema, {
|
|
1724
|
+
const listFamilyInvites = () => requestJson$1(FamilyInvitesEnvelopeSchema, {
|
|
1725
1725
|
method: "GET",
|
|
1726
1726
|
path: "/v2/family/invites"
|
|
1727
|
-
}).pipe(selectJsonFields("invites", "limit", "remaining_limit"), withOperationErrors(ListFamilyInvitesErrorSpec));
|
|
1728
|
-
const listFamilyMembers = () => requestJson(FamilyMembersEnvelopeSchema, {
|
|
1727
|
+
}).pipe(selectJsonFields$1("invites", "limit", "remaining_limit"), withOperationErrors$1(ListFamilyInvitesErrorSpec));
|
|
1728
|
+
const listFamilyMembers = () => requestJson$1(FamilyMembersEnvelopeSchema, {
|
|
1729
1729
|
method: "GET",
|
|
1730
1730
|
path: "/v2/family/members"
|
|
1731
|
-
}).pipe(selectJsonField("members"), withOperationErrors(ListFamilyMembersErrorSpec));
|
|
1732
|
-
const createFamilyInvite = () => requestJson(FamilyCreateInviteEnvelopeSchema, {
|
|
1731
|
+
}).pipe(selectJsonField$1("members"), withOperationErrors$1(ListFamilyMembersErrorSpec));
|
|
1732
|
+
const createFamilyInvite = () => requestJson$1(FamilyCreateInviteEnvelopeSchema, {
|
|
1733
1733
|
method: "POST",
|
|
1734
1734
|
path: "/v2/family/sub_account"
|
|
1735
|
-
}).pipe(selectJsonFields("code"), withOperationErrors(CreateFamilyInviteErrorSpec));
|
|
1736
|
-
const removeFamilyMember = (username) => decodeAndRun(NonEmptyStringSchema, username, (decodedUsername) => requestJson(OkResponseSchema, {
|
|
1735
|
+
}).pipe(selectJsonFields$1("code"), withOperationErrors$1(CreateFamilyInviteErrorSpec));
|
|
1736
|
+
const removeFamilyMember = (username) => decodeAndRun(NonEmptyStringSchema, username, (decodedUsername) => requestJson$1(OkResponseSchema, {
|
|
1737
1737
|
method: "DELETE",
|
|
1738
|
-
path: `/v2/family/sub_account/${encodePathSegment(decodedUsername)}`
|
|
1739
|
-
})).pipe(Effect.asVoid, withOperationErrors(RemoveFamilyMemberErrorSpec));
|
|
1740
|
-
const joinFamily = (inviteCode) => decodeAndRun(NonEmptyStringSchema, inviteCode, (decodedInviteCode) => requestJson(OkResponseSchema, {
|
|
1738
|
+
path: `/v2/family/sub_account/${encodePathSegment$1(decodedUsername)}`
|
|
1739
|
+
})).pipe(Effect.asVoid, withOperationErrors$1(RemoveFamilyMemberErrorSpec));
|
|
1740
|
+
const joinFamily = (inviteCode) => decodeAndRun(NonEmptyStringSchema, inviteCode, (decodedInviteCode) => requestJson$1(OkResponseSchema, {
|
|
1741
1741
|
method: "POST",
|
|
1742
|
-
path: `/v2/family/join/${encodePathSegment(decodedInviteCode)}`
|
|
1743
|
-
})).pipe(Effect.asVoid, withOperationErrors(JoinFamilyErrorSpec));
|
|
1742
|
+
path: `/v2/family/join/${encodePathSegment$1(decodedInviteCode)}`
|
|
1743
|
+
})).pipe(Effect.asVoid, withOperationErrors$1(JoinFamilyErrorSpec));
|
|
1744
1744
|
// src/domains/ifttt.ts
|
|
1745
1745
|
const IFTTTStatusEnvelopeSchema = Schema.Struct({
|
|
1746
1746
|
enabled: Schema.Boolean,
|
|
@@ -1782,11 +1782,11 @@ const SendIftttEventErrorSpec = definePutioOperationErrorSpec({
|
|
|
1782
1782
|
{ statusCode: 400 }
|
|
1783
1783
|
]
|
|
1784
1784
|
});
|
|
1785
|
-
const getIftttStatus = () => requestJson(IFTTTStatusEnvelopeSchema, {
|
|
1785
|
+
const getIftttStatus = () => requestJson$1(IFTTTStatusEnvelopeSchema, {
|
|
1786
1786
|
method: "GET",
|
|
1787
1787
|
path: "/v2/ifttt-client/status"
|
|
1788
|
-
}).pipe(selectJsonFields("enabled"), withOperationErrors(GetIftttStatusErrorSpec));
|
|
1789
|
-
const sendIftttEvent = (input) => decodeAndRun(IftttEventInputSchema, input, (decodedInput) => requestJson(OkResponseSchema, {
|
|
1788
|
+
}).pipe(selectJsonFields$1("enabled"), withOperationErrors$1(GetIftttStatusErrorSpec));
|
|
1789
|
+
const sendIftttEvent = (input) => decodeAndRun(IftttEventInputSchema, input, (decodedInput) => requestJson$1(OkResponseSchema, {
|
|
1790
1790
|
body: {
|
|
1791
1791
|
type: "form",
|
|
1792
1792
|
value: {
|
|
@@ -1797,7 +1797,7 @@ const sendIftttEvent = (input) => decodeAndRun(IftttEventInputSchema, input, (de
|
|
|
1797
1797
|
},
|
|
1798
1798
|
method: "POST",
|
|
1799
1799
|
path: "/v2/ifttt-client/event"
|
|
1800
|
-
})).pipe(Effect.asVoid, withOperationErrors(SendIftttEventErrorSpec));
|
|
1800
|
+
})).pipe(Effect.asVoid, withOperationErrors$1(SendIftttEventErrorSpec));
|
|
1801
1801
|
// src/domains/files.ts
|
|
1802
1802
|
const RequestedFlag = Schema.Literal(1);
|
|
1803
1803
|
const NonNegativeFileIdSchema = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0));
|
|
@@ -2495,7 +2495,7 @@ const tunnelQuery = (useTunnel) => useTunnel === false ? { notunnel: 1 } : {};
|
|
|
2495
2495
|
const resolveRouteContext = (token) => Effect.gen(function* () {
|
|
2496
2496
|
const config = yield* PutioSdkConfig;
|
|
2497
2497
|
const resolvedToken = token ?? (yield* revealAccessToken(config.accessToken));
|
|
2498
|
-
if (resolvedToken === void 0) return yield* mapConfigurationError("This helper requires a token, but neither an override nor PutioSdkConfig.accessToken was provided");
|
|
2498
|
+
if (resolvedToken === void 0) return yield* mapConfigurationError$1("This helper requires a token, but neither an override nor PutioSdkConfig.accessToken was provided");
|
|
2499
2499
|
return {
|
|
2500
2500
|
config,
|
|
2501
2501
|
token: resolvedToken
|
|
@@ -2516,26 +2516,26 @@ const toUploadResult = (value) => {
|
|
|
2516
2516
|
});
|
|
2517
2517
|
return Effect.fail(new PutioContractError({ cause: "Expected put.io upload response to contain either \"file\" or \"transfer\"" }));
|
|
2518
2518
|
};
|
|
2519
|
-
const buildFileApiDownloadUrl = (baseUrl, fileId, options) => buildPutioUrl(baseUrl, options.name ? `/v2/files/${encodePathSegment(fileId)}/download/${encodePathSegment(options.name)}` : `/v2/files/${encodePathSegment(fileId)}/download`, {
|
|
2519
|
+
const buildFileApiDownloadUrl = (baseUrl, fileId, options) => buildPutioUrl$1(baseUrl, options.name ? `/v2/files/${encodePathSegment$1(fileId)}/download/${encodePathSegment$1(options.name)}` : `/v2/files/${encodePathSegment$1(fileId)}/download`, {
|
|
2520
2520
|
...tunnelQuery(options.useTunnel),
|
|
2521
2521
|
oauth_token: options.downloadToken
|
|
2522
2522
|
});
|
|
2523
|
-
const buildFileApiContentUrl = (baseUrl, fileId, options) => buildPutioUrl(baseUrl, `/v2/files/${encodePathSegment(fileId)}/stream`, {
|
|
2523
|
+
const buildFileApiContentUrl = (baseUrl, fileId, options) => buildPutioUrl$1(baseUrl, `/v2/files/${encodePathSegment$1(fileId)}/stream`, {
|
|
2524
2524
|
...tunnelQuery(options.useTunnel),
|
|
2525
2525
|
oauth_token: options.downloadToken
|
|
2526
2526
|
});
|
|
2527
|
-
const buildFileApiMp4DownloadUrl = (baseUrl, fileId, options) => buildPutioUrl(baseUrl, options.name ? `/v2/files/${encodePathSegment(fileId)}/mp4/download/${encodePathSegment(options.name)}` : `/v2/files/${encodePathSegment(fileId)}/mp4/download`, {
|
|
2527
|
+
const buildFileApiMp4DownloadUrl = (baseUrl, fileId, options) => buildPutioUrl$1(baseUrl, options.name ? `/v2/files/${encodePathSegment$1(fileId)}/mp4/download/${encodePathSegment$1(options.name)}` : `/v2/files/${encodePathSegment$1(fileId)}/mp4/download`, {
|
|
2528
2528
|
...tunnelQuery(options.useTunnel),
|
|
2529
2529
|
convert: options.convert ? 1 : void 0,
|
|
2530
2530
|
oauth_token: options.downloadToken
|
|
2531
2531
|
});
|
|
2532
|
-
const buildFileHlsStreamUrl = (baseUrl, fileId, options) => buildPutioUrl(baseUrl, `/v2/files/${encodePathSegment(fileId)}/hls/media.m3u8`, {
|
|
2532
|
+
const buildFileHlsStreamUrl = (baseUrl, fileId, options) => buildPutioUrl$1(baseUrl, `/v2/files/${encodePathSegment$1(fileId)}/hls/media.m3u8`, {
|
|
2533
2533
|
max_subtitle_count: options.maxSubtitleCount,
|
|
2534
2534
|
oauth_token: options.downloadToken,
|
|
2535
2535
|
original: toOriginalFlag(options.playOriginal),
|
|
2536
2536
|
subtitle_languages: joinCsv(options.subtitleLanguages)
|
|
2537
2537
|
});
|
|
2538
|
-
const buildFileXspfPlaylistUrl = (baseUrl, fileId, options) => buildPutioUrl(baseUrl, `/v2/files/${encodePathSegment(fileId)}/xspf`, { oauth_token: options.downloadToken });
|
|
2538
|
+
const buildFileXspfPlaylistUrl = (baseUrl, fileId, options) => buildPutioUrl$1(baseUrl, `/v2/files/${encodePathSegment$1(fileId)}/xspf`, { oauth_token: options.downloadToken });
|
|
2539
2539
|
const createFileUploadFormData = (input) => {
|
|
2540
2540
|
const formData = new FormData();
|
|
2541
2541
|
formData.append("file", input.file);
|
|
@@ -2558,19 +2558,19 @@ function queryFiles(parent, query = {}) {
|
|
|
2558
2558
|
return decodeAndRun(FilesListInputSchema, {
|
|
2559
2559
|
parent,
|
|
2560
2560
|
query
|
|
2561
|
-
}, (decodedInput) => requestJson(FilesListEnvelopeSchema, {
|
|
2561
|
+
}, (decodedInput) => requestJson$1(FilesListEnvelopeSchema, {
|
|
2562
2562
|
method: "GET",
|
|
2563
2563
|
path: decodedInput.parent === "friends" ? "/v2/files/list/items-shared-with-you" : "/v2/files/list",
|
|
2564
2564
|
query: decodedInput.parent === "friends" ? decodedInput.query : {
|
|
2565
2565
|
...decodedInput.query,
|
|
2566
2566
|
parent_id: decodedInput.parent
|
|
2567
2567
|
}
|
|
2568
|
-
}).pipe(requireRequestedBreadcrumbs(decodedInput.query))).pipe(withOperationErrors(QueryFilesErrorSpec));
|
|
2568
|
+
}).pipe(requireRequestedBreadcrumbs(decodedInput.query))).pipe(withOperationErrors$1(QueryFilesErrorSpec));
|
|
2569
2569
|
}
|
|
2570
2570
|
const continueFiles = (cursor, query = {}) => decodeAndRun(FilesContinueInputSchema, {
|
|
2571
2571
|
cursor,
|
|
2572
2572
|
query
|
|
2573
|
-
}, (decodedInput) => requestJson(FilesListContinueEnvelopeSchema, {
|
|
2573
|
+
}, (decodedInput) => requestJson$1(FilesListContinueEnvelopeSchema, {
|
|
2574
2574
|
body: {
|
|
2575
2575
|
type: "form",
|
|
2576
2576
|
value: { cursor: decodedInput.cursor }
|
|
@@ -2578,31 +2578,31 @@ const continueFiles = (cursor, query = {}) => decodeAndRun(FilesContinueInputSch
|
|
|
2578
2578
|
method: "POST",
|
|
2579
2579
|
path: "/v2/files/list/continue",
|
|
2580
2580
|
query: decodedInput.query
|
|
2581
|
-
})).pipe(withOperationErrors(ContinueFilesErrorSpec));
|
|
2581
|
+
})).pipe(withOperationErrors$1(ContinueFilesErrorSpec));
|
|
2582
2582
|
function getFile(input) {
|
|
2583
2583
|
return decodeAndRun(FileGetInputSchema, input, (decodedInput) => {
|
|
2584
|
-
const effect = requestJson(FileEnvelopeSchema, {
|
|
2584
|
+
const effect = requestJson$1(FileEnvelopeSchema, {
|
|
2585
2585
|
method: "GET",
|
|
2586
|
-
path: `/v2/files/${encodePathSegment(decodedInput.id)}`,
|
|
2586
|
+
path: `/v2/files/${encodePathSegment$1(decodedInput.id)}`,
|
|
2587
2587
|
query: decodedInput.query
|
|
2588
|
-
}).pipe(selectJsonField("file"), withOperationErrors(GetFileErrorSpec));
|
|
2588
|
+
}).pipe(selectJsonField$1("file"), withOperationErrors$1(GetFileErrorSpec));
|
|
2589
2589
|
return decodedInput.query === void 0 ? effect : ensureFileQueryFields(effect, decodedInput.query);
|
|
2590
2590
|
});
|
|
2591
2591
|
}
|
|
2592
2592
|
function getFileChild(input) {
|
|
2593
2593
|
return decodeAndRun(FileGetChildInputSchema, input, (decodedInput) => {
|
|
2594
|
-
const effect = requestJson(FileEnvelopeSchema, {
|
|
2594
|
+
const effect = requestJson$1(FileEnvelopeSchema, {
|
|
2595
2595
|
method: "GET",
|
|
2596
|
-
path: `/v2/files/${encodePathSegment(decodedInput.parentId)}/child`,
|
|
2596
|
+
path: `/v2/files/${encodePathSegment$1(decodedInput.parentId)}/child`,
|
|
2597
2597
|
query: {
|
|
2598
2598
|
...decodedInput.query,
|
|
2599
2599
|
name: decodedInput.name
|
|
2600
2600
|
}
|
|
2601
|
-
}).pipe(selectJsonField("file"), withOperationErrors(GetFileChildErrorSpec));
|
|
2601
|
+
}).pipe(selectJsonField$1("file"), withOperationErrors$1(GetFileChildErrorSpec));
|
|
2602
2602
|
return decodedInput.query === void 0 ? effect : ensureFileQueryFields(effect, decodedInput.query);
|
|
2603
2603
|
});
|
|
2604
2604
|
}
|
|
2605
|
-
const copyFile = (input) => decodeAndRun(FileCopyInputSchema, input, (decodedInput) => requestJson(FileEnvelopeSchema, {
|
|
2605
|
+
const copyFile = (input) => decodeAndRun(FileCopyInputSchema, input, (decodedInput) => requestJson$1(FileEnvelopeSchema, {
|
|
2606
2606
|
body: {
|
|
2607
2607
|
type: "form",
|
|
2608
2608
|
value: {
|
|
@@ -2613,8 +2613,8 @@ const copyFile = (input) => decodeAndRun(FileCopyInputSchema, input, (decodedInp
|
|
|
2613
2613
|
},
|
|
2614
2614
|
method: "POST",
|
|
2615
2615
|
path: "/v2/files/copy"
|
|
2616
|
-
})).pipe(selectJsonField("file"), withOperationErrors(CopyFileErrorSpec));
|
|
2617
|
-
const touchFiles = (input) => decodeAndRun(FileTouchInputSchema, input, (decodedInput) => requestJson(OkResponseSchema, {
|
|
2616
|
+
})).pipe(selectJsonField$1("file"), withOperationErrors$1(CopyFileErrorSpec));
|
|
2617
|
+
const touchFiles = (input) => decodeAndRun(FileTouchInputSchema, input, (decodedInput) => requestJson$1(OkResponseSchema, {
|
|
2618
2618
|
body: {
|
|
2619
2619
|
type: "form",
|
|
2620
2620
|
value: {
|
|
@@ -2624,20 +2624,20 @@ const touchFiles = (input) => decodeAndRun(FileTouchInputSchema, input, (decoded
|
|
|
2624
2624
|
},
|
|
2625
2625
|
method: "POST",
|
|
2626
2626
|
path: "/v2/files/touch"
|
|
2627
|
-
})).pipe(Effect.asVoid, withOperationErrors(TouchFilesErrorSpec));
|
|
2628
|
-
const canWriteFile = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestJson(FileCanWriteEnvelopeSchema, {
|
|
2627
|
+
})).pipe(Effect.asVoid, withOperationErrors$1(TouchFilesErrorSpec));
|
|
2628
|
+
const canWriteFile = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestJson$1(FileCanWriteEnvelopeSchema, {
|
|
2629
2629
|
method: "GET",
|
|
2630
|
-
path: `/v2/files/${encodePathSegment(decodedFileId)}/can-write`
|
|
2631
|
-
})).pipe(selectJsonField("user_id"), withOperationErrors(CanWriteFileErrorSpec));
|
|
2632
|
-
const searchFiles = (query) => decodeAndRun(FilesSearchQuerySchema, query, (decodedQuery) => requestJson(FilesSearchEnvelopeSchema, {
|
|
2630
|
+
path: `/v2/files/${encodePathSegment$1(decodedFileId)}/can-write`
|
|
2631
|
+
})).pipe(selectJsonField$1("user_id"), withOperationErrors$1(CanWriteFileErrorSpec));
|
|
2632
|
+
const searchFiles = (query) => decodeAndRun(FilesSearchQuerySchema, query, (decodedQuery) => requestJson$1(FilesSearchEnvelopeSchema, {
|
|
2633
2633
|
method: "GET",
|
|
2634
2634
|
path: "/v2/files/search",
|
|
2635
2635
|
query: decodedQuery
|
|
2636
|
-
})).pipe(withOperationErrors(SearchFilesErrorSpec));
|
|
2636
|
+
})).pipe(withOperationErrors$1(SearchFilesErrorSpec));
|
|
2637
2637
|
const continueSearch = (cursor, query = {}) => decodeAndRun(FilesContinueInputSchema, {
|
|
2638
2638
|
cursor,
|
|
2639
2639
|
query
|
|
2640
|
-
}, (decodedInput) => requestJson(FilesSearchEnvelopeSchema, {
|
|
2640
|
+
}, (decodedInput) => requestJson$1(FilesSearchEnvelopeSchema, {
|
|
2641
2641
|
body: {
|
|
2642
2642
|
type: "form",
|
|
2643
2643
|
value: { cursor: decodedInput.cursor }
|
|
@@ -2645,8 +2645,8 @@ const continueSearch = (cursor, query = {}) => decodeAndRun(FilesContinueInputSc
|
|
|
2645
2645
|
method: "POST",
|
|
2646
2646
|
path: "/v2/files/search/continue",
|
|
2647
2647
|
query: decodedInput.query
|
|
2648
|
-
})).pipe(withOperationErrors(ContinueSearchErrorSpec));
|
|
2649
|
-
const setFileSort = (input) => decodeAndRun(FileSetSortInputSchema, input, (decodedInput) => requestJson(OkResponseSchema, {
|
|
2648
|
+
})).pipe(withOperationErrors$1(ContinueSearchErrorSpec));
|
|
2649
|
+
const setFileSort = (input) => decodeAndRun(FileSetSortInputSchema, input, (decodedInput) => requestJson$1(OkResponseSchema, {
|
|
2650
2650
|
body: {
|
|
2651
2651
|
type: "form",
|
|
2652
2652
|
value: {
|
|
@@ -2657,26 +2657,26 @@ const setFileSort = (input) => decodeAndRun(FileSetSortInputSchema, input, (deco
|
|
|
2657
2657
|
method: "POST",
|
|
2658
2658
|
path: "/v2/files/set-sort-by"
|
|
2659
2659
|
})).pipe(Effect.asVoid);
|
|
2660
|
-
const resetFileSortSettings = () => requestJson(OkResponseSchema, {
|
|
2660
|
+
const resetFileSortSettings = () => requestJson$1(OkResponseSchema, {
|
|
2661
2661
|
method: "POST",
|
|
2662
2662
|
path: "/v2/files/remove-sort-by-settings"
|
|
2663
2663
|
}).pipe(Effect.asVoid);
|
|
2664
|
-
const createFolder = (input) => decodeAndRun(FileCreateFolderInputSchema, input, (decodedInput) => requestJson(FileEnvelopeSchema, {
|
|
2664
|
+
const createFolder = (input) => decodeAndRun(FileCreateFolderInputSchema, input, (decodedInput) => requestJson$1(FileEnvelopeSchema, {
|
|
2665
2665
|
body: {
|
|
2666
2666
|
type: "form",
|
|
2667
2667
|
value: decodedInput
|
|
2668
2668
|
},
|
|
2669
2669
|
method: "POST",
|
|
2670
2670
|
path: "/v2/files/create-folder"
|
|
2671
|
-
})).pipe(selectJsonField("file"), withOperationErrors(CreateFolderErrorSpec));
|
|
2672
|
-
const renameFile = (input) => decodeAndRun(FileRenameInputSchema, input, (decodedInput) => requestJson(OkResponseSchema, {
|
|
2671
|
+
})).pipe(selectJsonField$1("file"), withOperationErrors$1(CreateFolderErrorSpec));
|
|
2672
|
+
const renameFile = (input) => decodeAndRun(FileRenameInputSchema, input, (decodedInput) => requestJson$1(OkResponseSchema, {
|
|
2673
2673
|
body: {
|
|
2674
2674
|
type: "form",
|
|
2675
2675
|
value: decodedInput
|
|
2676
2676
|
},
|
|
2677
2677
|
method: "POST",
|
|
2678
2678
|
path: "/v2/files/rename"
|
|
2679
|
-
})).pipe(withOperationErrors(RenameFileErrorSpec));
|
|
2679
|
+
})).pipe(withOperationErrors$1(RenameFileErrorSpec));
|
|
2680
2680
|
const FilesDeleteInputSchema = Schema.Struct({
|
|
2681
2681
|
ids: FilesIdsInputSchema,
|
|
2682
2682
|
options: FilesDeleteOptionsSchema
|
|
@@ -2684,7 +2684,7 @@ const FilesDeleteInputSchema = Schema.Struct({
|
|
|
2684
2684
|
const deleteFiles = (ids, options = {}) => decodeAndRun(FilesDeleteInputSchema, {
|
|
2685
2685
|
ids,
|
|
2686
2686
|
options
|
|
2687
|
-
}, (decodedInput) => requestJson(FileDeleteResultEnvelopeSchema, {
|
|
2687
|
+
}, (decodedInput) => requestJson$1(FileDeleteResultEnvelopeSchema, {
|
|
2688
2688
|
body: {
|
|
2689
2689
|
type: "form",
|
|
2690
2690
|
value: { file_ids: joinCsv(decodedInput.ids) }
|
|
@@ -2705,7 +2705,7 @@ const FilesSelectionDeleteInputSchema = Schema.Struct({
|
|
|
2705
2705
|
const deleteFileSelection = (selection, options = {}) => decodeAndRun(FilesSelectionDeleteInputSchema, {
|
|
2706
2706
|
options,
|
|
2707
2707
|
selection
|
|
2708
|
-
}, (decodedInput) => requestJson(FileDeleteResultEnvelopeSchema, {
|
|
2708
|
+
}, (decodedInput) => requestJson$1(FileDeleteResultEnvelopeSchema, {
|
|
2709
2709
|
body: {
|
|
2710
2710
|
type: "form",
|
|
2711
2711
|
value: toCursorSelectionForm(decodedInput.selection)
|
|
@@ -2721,7 +2721,7 @@ const deleteFileSelection = (selection, options = {}) => decodeAndRun(FilesSelec
|
|
|
2721
2721
|
const moveFiles = (ids, parentId) => decodeAndRun(FilesMoveInputSchema, {
|
|
2722
2722
|
ids,
|
|
2723
2723
|
parentId
|
|
2724
|
-
}, (decodedInput) => requestJson(FilesMoveEnvelopeSchema, {
|
|
2724
|
+
}, (decodedInput) => requestJson$1(FilesMoveEnvelopeSchema, {
|
|
2725
2725
|
body: {
|
|
2726
2726
|
type: "form",
|
|
2727
2727
|
value: {
|
|
@@ -2731,11 +2731,11 @@ const moveFiles = (ids, parentId) => decodeAndRun(FilesMoveInputSchema, {
|
|
|
2731
2731
|
},
|
|
2732
2732
|
method: "POST",
|
|
2733
2733
|
path: "/v2/files/move"
|
|
2734
|
-
})).pipe(selectJsonField("errors"));
|
|
2734
|
+
})).pipe(selectJsonField$1("errors"));
|
|
2735
2735
|
const moveFileSelection = (selection, parentId) => decodeAndRun(FilesMoveSelectionInputSchema, {
|
|
2736
2736
|
parentId,
|
|
2737
2737
|
selection
|
|
2738
|
-
}, (decodedInput) => requestJson(FilesMoveEnvelopeSchema, {
|
|
2738
|
+
}, (decodedInput) => requestJson$1(FilesMoveEnvelopeSchema, {
|
|
2739
2739
|
body: {
|
|
2740
2740
|
type: "form",
|
|
2741
2741
|
value: {
|
|
@@ -2745,15 +2745,15 @@ const moveFileSelection = (selection, parentId) => decodeAndRun(FilesMoveSelecti
|
|
|
2745
2745
|
},
|
|
2746
2746
|
method: "POST",
|
|
2747
2747
|
path: "/v2/files/move"
|
|
2748
|
-
})).pipe(selectJsonField("errors"));
|
|
2749
|
-
const getStartFrom = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestJson(FileStartFromEnvelopeSchema, {
|
|
2748
|
+
})).pipe(selectJsonField$1("errors"));
|
|
2749
|
+
const getStartFrom = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestJson$1(FileStartFromEnvelopeSchema, {
|
|
2750
2750
|
method: "GET",
|
|
2751
|
-
path: `/v2/files/${encodePathSegment(decodedFileId)}/start-from`
|
|
2752
|
-
})).pipe(selectJsonField("start_from"), withOperationErrors(StartFromErrorSpec));
|
|
2753
|
-
const getDownloadUrl = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestJson(FileDownloadUrlEnvelopeSchema, {
|
|
2751
|
+
path: `/v2/files/${encodePathSegment$1(decodedFileId)}/start-from`
|
|
2752
|
+
})).pipe(selectJsonField$1("start_from"), withOperationErrors$1(StartFromErrorSpec));
|
|
2753
|
+
const getDownloadUrl = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestJson$1(FileDownloadUrlEnvelopeSchema, {
|
|
2754
2754
|
method: "GET",
|
|
2755
|
-
path: `/v2/files/${encodePathSegment(decodedFileId)}/url`
|
|
2756
|
-
})).pipe(selectJsonField("url"), withOperationErrors(DownloadUrlErrorSpec));
|
|
2755
|
+
path: `/v2/files/${encodePathSegment$1(decodedFileId)}/url`
|
|
2756
|
+
})).pipe(selectJsonField$1("url"), withOperationErrors$1(DownloadUrlErrorSpec));
|
|
2757
2757
|
const FileApiDownloadUrlInputSchema = Schema.Struct({
|
|
2758
2758
|
fileId: PositiveFileIdSchema,
|
|
2759
2759
|
options: FileApiDownloadUrlOptionsSchema
|
|
@@ -2799,20 +2799,20 @@ const FileHlsMasterPlaylistInputSchema = Schema.Struct({
|
|
|
2799
2799
|
const getHlsMasterPlaylist = (fileId, options) => decodeAndRun(FileHlsMasterPlaylistInputSchema, {
|
|
2800
2800
|
fileId,
|
|
2801
2801
|
options
|
|
2802
|
-
}, (decoded) => requestText({
|
|
2802
|
+
}, (decoded) => requestText$1({
|
|
2803
2803
|
auth: {
|
|
2804
2804
|
token: decoded.options.downloadToken,
|
|
2805
2805
|
type: "token"
|
|
2806
2806
|
},
|
|
2807
2807
|
headers: { accept: "application/vnd.apple.mpegurl, application/x-mpegURL, */*" },
|
|
2808
2808
|
method: "GET",
|
|
2809
|
-
path: `/v2/files/${encodePathSegment(decoded.fileId)}/hls/media.m3u8`,
|
|
2809
|
+
path: `/v2/files/${encodePathSegment$1(decoded.fileId)}/hls/media.m3u8`,
|
|
2810
2810
|
query: {
|
|
2811
2811
|
max_subtitle_count: decoded.options.maxSubtitleCount,
|
|
2812
2812
|
original: toOriginalFlag(decoded.options.playOriginal),
|
|
2813
2813
|
subtitle_languages: joinCsv(decoded.options.subtitleLanguages)
|
|
2814
2814
|
}
|
|
2815
|
-
})).pipe(withOperationErrors(GetHlsMasterPlaylistErrorSpec));
|
|
2815
|
+
})).pipe(withOperationErrors$1(GetHlsMasterPlaylistErrorSpec));
|
|
2816
2816
|
const FileXspfPlaylistUrlInputSchema = Schema.Struct({
|
|
2817
2817
|
fileId: PositiveFileIdSchema,
|
|
2818
2818
|
options: FileXspfPlaylistUrlOptionsSchema
|
|
@@ -2824,60 +2824,60 @@ const getXspfPlaylistUrl = (fileId, options) => decodeAndRun(FileXspfPlaylistUrl
|
|
|
2824
2824
|
const listFileSubtitles = (fileId, options = {}) => decodeAndRun(FileSubtitlesInputSchema, {
|
|
2825
2825
|
fileId,
|
|
2826
2826
|
options
|
|
2827
|
-
}, (decodedInput) => requestJson(FileSubtitlesEnvelopeSchema, {
|
|
2827
|
+
}, (decodedInput) => requestJson$1(FileSubtitlesEnvelopeSchema, {
|
|
2828
2828
|
method: "GET",
|
|
2829
|
-
path: `/v2/files/${encodePathSegment(decodedInput.fileId)}/subtitles`,
|
|
2829
|
+
path: `/v2/files/${encodePathSegment$1(decodedInput.fileId)}/subtitles`,
|
|
2830
2830
|
query: decodedInput.options.languages ? { languages: joinCsv(decodedInput.options.languages) } : void 0
|
|
2831
|
-
})).pipe(withOperationErrors(FileSubtitlesErrorSpec));
|
|
2832
|
-
const setStartFrom = (input) => decodeAndRun(FileStartFromSetInputSchema, input, (decodedInput) => requestJson(OkResponseSchema, {
|
|
2831
|
+
})).pipe(withOperationErrors$1(FileSubtitlesErrorSpec));
|
|
2832
|
+
const setStartFrom = (input) => decodeAndRun(FileStartFromSetInputSchema, input, (decodedInput) => requestJson$1(OkResponseSchema, {
|
|
2833
2833
|
body: {
|
|
2834
2834
|
type: "form",
|
|
2835
2835
|
value: { time: decodedInput.time }
|
|
2836
2836
|
},
|
|
2837
2837
|
method: "POST",
|
|
2838
|
-
path: `/v2/files/${encodePathSegment(decodedInput.file_id)}/start-from`
|
|
2839
|
-
})).pipe(withOperationErrors(StartFromErrorSpec));
|
|
2840
|
-
const resetStartFrom = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestJson(OkResponseSchema, {
|
|
2838
|
+
path: `/v2/files/${encodePathSegment$1(decodedInput.file_id)}/start-from`
|
|
2839
|
+
})).pipe(withOperationErrors$1(StartFromErrorSpec));
|
|
2840
|
+
const resetStartFrom = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestJson$1(OkResponseSchema, {
|
|
2841
2841
|
method: "POST",
|
|
2842
|
-
path: `/v2/files/${encodePathSegment(decodedFileId)}/start-from/delete`
|
|
2843
|
-
})).pipe(withOperationErrors(StartFromErrorSpec));
|
|
2844
|
-
const getMp4Status = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestJson(FileConversionStatusEnvelopeSchema, {
|
|
2842
|
+
path: `/v2/files/${encodePathSegment$1(decodedFileId)}/start-from/delete`
|
|
2843
|
+
})).pipe(withOperationErrors$1(StartFromErrorSpec));
|
|
2844
|
+
const getMp4Status = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestJson$1(FileConversionStatusEnvelopeSchema, {
|
|
2845
2845
|
method: "GET",
|
|
2846
|
-
path: `/v2/files/${encodePathSegment(decodedFileId)}/mp4`
|
|
2847
|
-
})).pipe(selectJsonField("mp4"), withOperationErrors(FileMp4ErrorSpec));
|
|
2848
|
-
const convertFileToMp4 = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestJson(FileConversionStatusEnvelopeSchema, {
|
|
2846
|
+
path: `/v2/files/${encodePathSegment$1(decodedFileId)}/mp4`
|
|
2847
|
+
})).pipe(selectJsonField$1("mp4"), withOperationErrors$1(FileMp4ErrorSpec));
|
|
2848
|
+
const convertFileToMp4 = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestJson$1(FileConversionStatusEnvelopeSchema, {
|
|
2849
2849
|
method: "POST",
|
|
2850
|
-
path: `/v2/files/${encodePathSegment(decodedFileId)}/mp4`
|
|
2851
|
-
})).pipe(selectJsonField("mp4"), withOperationErrors(FileMp4ErrorSpec));
|
|
2852
|
-
const deleteFileMp4 = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestVoid({
|
|
2850
|
+
path: `/v2/files/${encodePathSegment$1(decodedFileId)}/mp4`
|
|
2851
|
+
})).pipe(selectJsonField$1("mp4"), withOperationErrors$1(FileMp4ErrorSpec));
|
|
2852
|
+
const deleteFileMp4 = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestVoid$1({
|
|
2853
2853
|
method: "DELETE",
|
|
2854
|
-
path: `/v2/files/${encodePathSegment(decodedFileId)}/mp4`
|
|
2855
|
-
})).pipe(withOperationErrors(FileMp4MutationErrorSpec));
|
|
2856
|
-
const putMp4ToMyFiles = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestVoid({
|
|
2854
|
+
path: `/v2/files/${encodePathSegment$1(decodedFileId)}/mp4`
|
|
2855
|
+
})).pipe(withOperationErrors$1(FileMp4MutationErrorSpec));
|
|
2856
|
+
const putMp4ToMyFiles = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestVoid$1({
|
|
2857
2857
|
method: "GET",
|
|
2858
|
-
path: `/v2/files/${encodePathSegment(decodedFileId)}/put-mp4-to-my-folders`
|
|
2859
|
-
})).pipe(withOperationErrors(FileMp4MutationErrorSpec));
|
|
2860
|
-
const convertFilesToMp4 = (ids) => decodeAndRun(FilesIdsInputSchema, ids, (decodedIds) => requestJson(FilesBulkConvertEnvelopeSchema, {
|
|
2858
|
+
path: `/v2/files/${encodePathSegment$1(decodedFileId)}/put-mp4-to-my-folders`
|
|
2859
|
+
})).pipe(withOperationErrors$1(FileMp4MutationErrorSpec));
|
|
2860
|
+
const convertFilesToMp4 = (ids) => decodeAndRun(FilesIdsInputSchema, ids, (decodedIds) => requestJson$1(FilesBulkConvertEnvelopeSchema, {
|
|
2861
2861
|
body: {
|
|
2862
2862
|
type: "form",
|
|
2863
2863
|
value: { file_ids: joinCsv(decodedIds) }
|
|
2864
2864
|
},
|
|
2865
2865
|
method: "POST",
|
|
2866
2866
|
path: "/v2/files/convert_mp4"
|
|
2867
|
-
})).pipe(selectJsonField("count"));
|
|
2868
|
-
const convertFileSelectionToMp4 = (selection) => decodeAndRun(FilesBulkSelectionSchema, selection, (decodedSelection) => requestJson(FilesBulkConvertEnvelopeSchema, {
|
|
2867
|
+
})).pipe(selectJsonField$1("count"));
|
|
2868
|
+
const convertFileSelectionToMp4 = (selection) => decodeAndRun(FilesBulkSelectionSchema, selection, (decodedSelection) => requestJson$1(FilesBulkConvertEnvelopeSchema, {
|
|
2869
2869
|
body: {
|
|
2870
2870
|
type: "form",
|
|
2871
2871
|
value: toCursorSelectionForm(decodedSelection)
|
|
2872
2872
|
},
|
|
2873
2873
|
method: "POST",
|
|
2874
2874
|
path: "/v2/files/convert_mp4"
|
|
2875
|
-
})).pipe(selectJsonField("count"));
|
|
2876
|
-
const listActiveMp4Conversions = () => requestJson(FileActiveConversionsEnvelopeSchema, {
|
|
2875
|
+
})).pipe(selectJsonField$1("count"));
|
|
2876
|
+
const listActiveMp4Conversions = () => requestJson$1(FileActiveConversionsEnvelopeSchema, {
|
|
2877
2877
|
method: "GET",
|
|
2878
2878
|
path: "/v2/mp4/queue"
|
|
2879
|
-
}).pipe(selectJsonField("mp4s"), withOperationErrors(FileActiveConversionsErrorSpec));
|
|
2880
|
-
const setFilesWatchStatus = (selection) => decodeAndRun(FilesWatchStatusInputSchema, selection, (decodedSelection) => requestVoid({
|
|
2879
|
+
}).pipe(selectJsonField$1("mp4s"), withOperationErrors$1(FileActiveConversionsErrorSpec));
|
|
2880
|
+
const setFilesWatchStatus = (selection) => decodeAndRun(FilesWatchStatusInputSchema, selection, (decodedSelection) => requestVoid$1({
|
|
2881
2881
|
body: {
|
|
2882
2882
|
type: "form",
|
|
2883
2883
|
value: {
|
|
@@ -2887,8 +2887,8 @@ const setFilesWatchStatus = (selection) => decodeAndRun(FilesWatchStatusInputSch
|
|
|
2887
2887
|
},
|
|
2888
2888
|
method: "POST",
|
|
2889
2889
|
path: "/v2/files/watch-status"
|
|
2890
|
-
})).pipe(withOperationErrors(FileWatchStatusErrorSpec));
|
|
2891
|
-
const extractFiles = (selection) => decodeAndRun(FilesExtractInputSchema, selection, (decodedSelection) => requestJson(FileExtractionsEnvelopeSchema, {
|
|
2890
|
+
})).pipe(withOperationErrors$1(FileWatchStatusErrorSpec));
|
|
2891
|
+
const extractFiles = (selection) => decodeAndRun(FilesExtractInputSchema, selection, (decodedSelection) => requestJson$1(FileExtractionsEnvelopeSchema, {
|
|
2892
2892
|
body: {
|
|
2893
2893
|
type: "form",
|
|
2894
2894
|
value: {
|
|
@@ -2898,27 +2898,27 @@ const extractFiles = (selection) => decodeAndRun(FilesExtractInputSchema, select
|
|
|
2898
2898
|
},
|
|
2899
2899
|
method: "POST",
|
|
2900
2900
|
path: "/v2/files/extract"
|
|
2901
|
-
})).pipe(selectJsonField("extractions"), withOperationErrors(FileExtractionsErrorSpec));
|
|
2902
|
-
const listFileExtractions = () => requestJson(FileExtractionsEnvelopeSchema, {
|
|
2901
|
+
})).pipe(selectJsonField$1("extractions"), withOperationErrors$1(FileExtractionsErrorSpec));
|
|
2902
|
+
const listFileExtractions = () => requestJson$1(FileExtractionsEnvelopeSchema, {
|
|
2903
2903
|
method: "GET",
|
|
2904
2904
|
path: "/v2/files/extract"
|
|
2905
|
-
}).pipe(selectJsonField("extractions"), withOperationErrors(FileExtractionsErrorSpec));
|
|
2906
|
-
const deleteFileExtraction = (extractionId) => decodeAndRun(PositiveIntegerSchema, extractionId, (decodedExtractionId) => requestVoid({
|
|
2905
|
+
}).pipe(selectJsonField$1("extractions"), withOperationErrors$1(FileExtractionsErrorSpec));
|
|
2906
|
+
const deleteFileExtraction = (extractionId) => decodeAndRun(PositiveIntegerSchema, extractionId, (decodedExtractionId) => requestVoid$1({
|
|
2907
2907
|
method: "DELETE",
|
|
2908
|
-
path: `/v2/files/extract/${encodePathSegment(decodedExtractionId)}`
|
|
2908
|
+
path: `/v2/files/extract/${encodePathSegment$1(decodedExtractionId)}`
|
|
2909
2909
|
}));
|
|
2910
2910
|
const findNextFile = (fileId, fileType) => decodeAndRun(FileNextInputSchema, {
|
|
2911
2911
|
fileId,
|
|
2912
2912
|
fileType
|
|
2913
|
-
}, (decodedInput) => requestJson(FilesNextFileEnvelopeSchema, {
|
|
2913
|
+
}, (decodedInput) => requestJson$1(FilesNextFileEnvelopeSchema, {
|
|
2914
2914
|
method: "GET",
|
|
2915
|
-
path: `/v2/files/${encodePathSegment(decodedInput.fileId)}/next-file`,
|
|
2915
|
+
path: `/v2/files/${encodePathSegment$1(decodedInput.fileId)}/next-file`,
|
|
2916
2916
|
query: { file_type: decodedInput.fileType }
|
|
2917
|
-
})).pipe(selectJsonField("next_file"));
|
|
2918
|
-
const findNextVideo = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestJson(FilesNextVideoEnvelopeSchema, {
|
|
2917
|
+
})).pipe(selectJsonField$1("next_file"));
|
|
2918
|
+
const findNextVideo = (fileId) => decodeAndRun(PositiveFileIdSchema, fileId, (decodedFileId) => requestJson$1(FilesNextVideoEnvelopeSchema, {
|
|
2919
2919
|
method: "GET",
|
|
2920
|
-
path: `/v2/files/${encodePathSegment(decodedFileId)}/next-video`
|
|
2921
|
-
})).pipe(selectJsonField("next_video"));
|
|
2920
|
+
path: `/v2/files/${encodePathSegment$1(decodedFileId)}/next-video`
|
|
2921
|
+
})).pipe(selectJsonField$1("next_video"));
|
|
2922
2922
|
const FileUploadCallInputSchema = Schema.Struct({
|
|
2923
2923
|
input: FileUploadInputSchema,
|
|
2924
2924
|
options: FileUploadOptionsSchema
|
|
@@ -2930,12 +2930,12 @@ const createFileUploadRequest = (input, options = {}) => decodeAndRun(FileUpload
|
|
|
2930
2930
|
body: createFileUploadFormData(decoded.input),
|
|
2931
2931
|
headers: { Authorization: `Token ${token}` },
|
|
2932
2932
|
method: "POST",
|
|
2933
|
-
url: buildPutioUrl(config.uploadBaseUrl, "/v2/files/upload")
|
|
2933
|
+
url: buildPutioUrl$1(config.uploadBaseUrl, "/v2/files/upload")
|
|
2934
2934
|
}))));
|
|
2935
2935
|
const uploadFile = (input, options = {}) => decodeAndRun(FileUploadCallInputSchema, {
|
|
2936
2936
|
input,
|
|
2937
2937
|
options
|
|
2938
|
-
}, (decoded) => resolveRouteContext(decoded.options.oauthToken).pipe(Effect.flatMap(({ config, token }) => requestJson(FileUploadEnvelopeSchema, {
|
|
2938
|
+
}, (decoded) => resolveRouteContext(decoded.options.oauthToken).pipe(Effect.flatMap(({ config, token }) => requestJson$1(FileUploadEnvelopeSchema, {
|
|
2939
2939
|
auth: {
|
|
2940
2940
|
token,
|
|
2941
2941
|
type: "token"
|
|
@@ -2947,7 +2947,7 @@ const uploadFile = (input, options = {}) => decodeAndRun(FileUploadCallInputSche
|
|
|
2947
2947
|
},
|
|
2948
2948
|
method: "POST",
|
|
2949
2949
|
path: "/v2/files/upload"
|
|
2950
|
-
})))).pipe(Effect.flatMap(toUploadResult), withOperationErrors(FileUploadErrorSpec));
|
|
2950
|
+
})))).pipe(Effect.flatMap(toUploadResult), withOperationErrors$1(FileUploadErrorSpec));
|
|
2951
2951
|
// src/domains/friend-invites.ts
|
|
2952
2952
|
const FriendInviteJoinedUserStatusSchema = Schema.Literals([
|
|
2953
2953
|
"CONVERTED",
|
|
@@ -3004,14 +3004,14 @@ const CreateFriendInviteErrorSpec = definePutioOperationErrorSpec({
|
|
|
3004
3004
|
{ statusCode: 403 }
|
|
3005
3005
|
]
|
|
3006
3006
|
});
|
|
3007
|
-
const listFriendInvites = () => requestJson(FriendInvitesListEnvelopeSchema, {
|
|
3007
|
+
const listFriendInvites = () => requestJson$1(FriendInvitesListEnvelopeSchema, {
|
|
3008
3008
|
method: "GET",
|
|
3009
3009
|
path: "/v2/account/friend_invites"
|
|
3010
|
-
}).pipe(selectJsonFields("invites", "remaining_limit"), withOperationErrors(ListFriendInvitesErrorSpec));
|
|
3011
|
-
const createFriendInvite = () => requestJson(FriendInviteCreateEnvelopeSchema, {
|
|
3010
|
+
}).pipe(selectJsonFields$1("invites", "remaining_limit"), withOperationErrors$1(ListFriendInvitesErrorSpec));
|
|
3011
|
+
const createFriendInvite = () => requestJson$1(FriendInviteCreateEnvelopeSchema, {
|
|
3012
3012
|
method: "POST",
|
|
3013
3013
|
path: "/v2/account/create_friend_invitation"
|
|
3014
|
-
}).pipe(selectJsonFields("code"), withOperationErrors(CreateFriendInviteErrorSpec));
|
|
3014
|
+
}).pipe(selectJsonFields$1("code"), withOperationErrors$1(CreateFriendInviteErrorSpec));
|
|
3015
3015
|
// src/domains/friends.ts
|
|
3016
3016
|
const FriendBaseSchema = Schema.Struct({
|
|
3017
3017
|
avatar_url: Schema.String,
|
|
@@ -3159,46 +3159,46 @@ const FriendSharedFolderErrorSpec = definePutioOperationErrorSpec({
|
|
|
3159
3159
|
{ statusCode: 404 }
|
|
3160
3160
|
]
|
|
3161
3161
|
});
|
|
3162
|
-
const listFriends = () => requestJson(FriendsListEnvelopeSchema, {
|
|
3162
|
+
const listFriends = () => requestJson$1(FriendsListEnvelopeSchema, {
|
|
3163
3163
|
method: "GET",
|
|
3164
3164
|
path: "/v2/friends/list"
|
|
3165
|
-
}).pipe(selectJsonFields("friends", "total"), withOperationErrors(ListFriendsErrorSpec));
|
|
3166
|
-
const searchFriends = (username) => decodeAndRun(NonEmptyStringSchema, username, (decodedUsername) => requestJson(FriendSearchEnvelopeSchema, {
|
|
3165
|
+
}).pipe(selectJsonFields$1("friends", "total"), withOperationErrors$1(ListFriendsErrorSpec));
|
|
3166
|
+
const searchFriends = (username) => decodeAndRun(NonEmptyStringSchema, username, (decodedUsername) => requestJson$1(FriendSearchEnvelopeSchema, {
|
|
3167
3167
|
method: "GET",
|
|
3168
|
-
path: `/v2/friends/user-search/${encodePathSegment(decodedUsername)}`
|
|
3169
|
-
})).pipe(selectJsonField("users"), withOperationErrors(SearchFriendsErrorSpec));
|
|
3170
|
-
const listWaitingRequests = () => requestJson(FriendRequestsEnvelopeSchema, {
|
|
3168
|
+
path: `/v2/friends/user-search/${encodePathSegment$1(decodedUsername)}`
|
|
3169
|
+
})).pipe(selectJsonField$1("users"), withOperationErrors$1(SearchFriendsErrorSpec));
|
|
3170
|
+
const listWaitingRequests = () => requestJson$1(FriendRequestsEnvelopeSchema, {
|
|
3171
3171
|
method: "GET",
|
|
3172
3172
|
path: "/v2/friends/waiting-requests"
|
|
3173
|
-
}).pipe(selectJsonField("friends"), withOperationErrors(ListWaitingRequestsErrorSpec));
|
|
3174
|
-
const countWaitingRequests = () => requestJson(FriendRequestsCountEnvelopeSchema, {
|
|
3173
|
+
}).pipe(selectJsonField$1("friends"), withOperationErrors$1(ListWaitingRequestsErrorSpec));
|
|
3174
|
+
const countWaitingRequests = () => requestJson$1(FriendRequestsCountEnvelopeSchema, {
|
|
3175
3175
|
method: "GET",
|
|
3176
3176
|
path: "/v2/friends/waiting-requests-count"
|
|
3177
|
-
}).pipe(selectJsonField("count"), withOperationErrors(CountWaitingRequestsErrorSpec));
|
|
3178
|
-
const listSentRequests = () => requestJson(FriendRequestsEnvelopeSchema, {
|
|
3177
|
+
}).pipe(selectJsonField$1("count"), withOperationErrors$1(CountWaitingRequestsErrorSpec));
|
|
3178
|
+
const listSentRequests = () => requestJson$1(FriendRequestsEnvelopeSchema, {
|
|
3179
3179
|
method: "GET",
|
|
3180
3180
|
path: "/v2/friends/sent-requests"
|
|
3181
|
-
}).pipe(selectJsonField("friends"), withOperationErrors(ListSentRequestsErrorSpec));
|
|
3182
|
-
const sendFriendRequest = (username) => decodeAndRun(NonEmptyStringSchema, username, (decodedUsername) => requestJson(OkResponseSchema, {
|
|
3181
|
+
}).pipe(selectJsonField$1("friends"), withOperationErrors$1(ListSentRequestsErrorSpec));
|
|
3182
|
+
const sendFriendRequest = (username) => decodeAndRun(NonEmptyStringSchema, username, (decodedUsername) => requestJson$1(OkResponseSchema, {
|
|
3183
3183
|
method: "POST",
|
|
3184
|
-
path: `/v2/friends/${encodePathSegment(decodedUsername)}/request`
|
|
3185
|
-
})).pipe(withOperationErrors(SendFriendRequestErrorSpec));
|
|
3186
|
-
const removeFriend = (username) => decodeAndRun(NonEmptyStringSchema, username, (decodedUsername) => requestJson(OkResponseSchema, {
|
|
3184
|
+
path: `/v2/friends/${encodePathSegment$1(decodedUsername)}/request`
|
|
3185
|
+
})).pipe(withOperationErrors$1(SendFriendRequestErrorSpec));
|
|
3186
|
+
const removeFriend = (username) => decodeAndRun(NonEmptyStringSchema, username, (decodedUsername) => requestJson$1(OkResponseSchema, {
|
|
3187
3187
|
method: "POST",
|
|
3188
|
-
path: `/v2/friends/${encodePathSegment(decodedUsername)}/unfriend`
|
|
3189
|
-
})).pipe(withOperationErrors(RemoveFriendErrorSpec));
|
|
3190
|
-
const approveFriendRequest = (username) => decodeAndRun(NonEmptyStringSchema, username, (decodedUsername) => requestJson(OkResponseSchema, {
|
|
3188
|
+
path: `/v2/friends/${encodePathSegment$1(decodedUsername)}/unfriend`
|
|
3189
|
+
})).pipe(withOperationErrors$1(RemoveFriendErrorSpec));
|
|
3190
|
+
const approveFriendRequest = (username) => decodeAndRun(NonEmptyStringSchema, username, (decodedUsername) => requestJson$1(OkResponseSchema, {
|
|
3191
3191
|
method: "POST",
|
|
3192
|
-
path: `/v2/friends/${encodePathSegment(decodedUsername)}/approve`
|
|
3193
|
-
})).pipe(withOperationErrors(ApproveFriendRequestErrorSpec));
|
|
3194
|
-
const denyFriendRequest = (username) => decodeAndRun(NonEmptyStringSchema, username, (decodedUsername) => requestJson(OkResponseSchema, {
|
|
3192
|
+
path: `/v2/friends/${encodePathSegment$1(decodedUsername)}/approve`
|
|
3193
|
+
})).pipe(withOperationErrors$1(ApproveFriendRequestErrorSpec));
|
|
3194
|
+
const denyFriendRequest = (username) => decodeAndRun(NonEmptyStringSchema, username, (decodedUsername) => requestJson$1(OkResponseSchema, {
|
|
3195
3195
|
method: "POST",
|
|
3196
|
-
path: `/v2/friends/${encodePathSegment(decodedUsername)}/deny`
|
|
3197
|
-
})).pipe(withOperationErrors(DenyFriendRequestErrorSpec));
|
|
3198
|
-
const getFriendSharedFolder = (username) => decodeAndRun(NonEmptyStringSchema, username, (decodedUsername) => requestJson(FriendSharedFolderEnvelopeSchema, {
|
|
3196
|
+
path: `/v2/friends/${encodePathSegment$1(decodedUsername)}/deny`
|
|
3197
|
+
})).pipe(withOperationErrors$1(DenyFriendRequestErrorSpec));
|
|
3198
|
+
const getFriendSharedFolder = (username) => decodeAndRun(NonEmptyStringSchema, username, (decodedUsername) => requestJson$1(FriendSharedFolderEnvelopeSchema, {
|
|
3199
3199
|
method: "GET",
|
|
3200
|
-
path: `/v2/friends/${encodePathSegment(decodedUsername)}/files`
|
|
3201
|
-
})).pipe(selectJsonField("file"), withOperationErrors(FriendSharedFolderErrorSpec));
|
|
3200
|
+
path: `/v2/friends/${encodePathSegment$1(decodedUsername)}/files`
|
|
3201
|
+
})).pipe(selectJsonField$1("file"), withOperationErrors$1(FriendSharedFolderErrorSpec));
|
|
3202
3202
|
// src/domains/payment.ts
|
|
3203
3203
|
const PaymentPlanTypeSchema = Schema.Literals(["onetime", "subscription"]);
|
|
3204
3204
|
const PaymentOptionPlanTypeSchema = Schema.Literals([
|
|
@@ -3770,37 +3770,37 @@ const classifyPaymentChangePlanResponse = (response) => {
|
|
|
3770
3770
|
type: "success"
|
|
3771
3771
|
};
|
|
3772
3772
|
};
|
|
3773
|
-
const getPaymentInfo = () => requestJson(PaymentInfoSchema, {
|
|
3773
|
+
const getPaymentInfo = () => requestJson$1(PaymentInfoSchema, {
|
|
3774
3774
|
method: "GET",
|
|
3775
3775
|
path: "/v2/payment/info"
|
|
3776
|
-
}).pipe(withOperationErrors(GetPaymentInfoErrorSpec));
|
|
3777
|
-
const listPaymentPlans = () => requestJson(PaymentPlansEnvelopeSchema, {
|
|
3776
|
+
}).pipe(withOperationErrors$1(GetPaymentInfoErrorSpec));
|
|
3777
|
+
const listPaymentPlans = () => requestJson$1(PaymentPlansEnvelopeSchema, {
|
|
3778
3778
|
method: "GET",
|
|
3779
3779
|
path: "/v2/payment/plans"
|
|
3780
|
-
}).pipe(selectJsonField("plans"), withOperationErrors(ListPaymentPlansErrorSpec));
|
|
3781
|
-
const listPaymentOptions = () => requestJson(PaymentOptionsEnvelopeSchema, {
|
|
3780
|
+
}).pipe(selectJsonField$1("plans"), withOperationErrors$1(ListPaymentPlansErrorSpec));
|
|
3781
|
+
const listPaymentOptions = () => requestJson$1(PaymentOptionsEnvelopeSchema, {
|
|
3782
3782
|
auth: { type: "none" },
|
|
3783
3783
|
method: "GET",
|
|
3784
3784
|
path: "/v2/payment/options"
|
|
3785
|
-
}).pipe(selectJsonField("options"), withOperationErrors(ListPaymentOptionsErrorSpec));
|
|
3786
|
-
const listPaymentHistory = (query = {}) => decodeAndRun(PaymentHistoryQuerySchema, query, (decodedQuery) => requestJson(PaymentHistoryEnvelopeSchema, {
|
|
3785
|
+
}).pipe(selectJsonField$1("options"), withOperationErrors$1(ListPaymentOptionsErrorSpec));
|
|
3786
|
+
const listPaymentHistory = (query = {}) => decodeAndRun(PaymentHistoryQuerySchema, query, (decodedQuery) => requestJson$1(PaymentHistoryEnvelopeSchema, {
|
|
3787
3787
|
method: "GET",
|
|
3788
3788
|
path: "/v2/payment/history",
|
|
3789
3789
|
query: decodedQuery
|
|
3790
|
-
}).pipe(selectJsonField("payments"))).pipe(withOperationErrors(ListPaymentHistoryErrorSpec));
|
|
3791
|
-
const listPaymentInvites = () => requestJson(PaymentInvitesEnvelopeSchema, {
|
|
3790
|
+
}).pipe(selectJsonField$1("payments"))).pipe(withOperationErrors$1(ListPaymentHistoryErrorSpec));
|
|
3791
|
+
const listPaymentInvites = () => requestJson$1(PaymentInvitesEnvelopeSchema, {
|
|
3792
3792
|
method: "GET",
|
|
3793
3793
|
path: "/v2/payment/invites"
|
|
3794
|
-
}).pipe(selectJsonField("vouchers"), withOperationErrors(ListPaymentInvitesErrorSpec));
|
|
3795
|
-
const previewPaymentChangePlan = (input) => decodeAndRun(PaymentChangePlanPreviewInputSchema, input, (decodedInput) => requestJson(PaymentChangePlanPreviewSchema, {
|
|
3794
|
+
}).pipe(selectJsonField$1("vouchers"), withOperationErrors$1(ListPaymentInvitesErrorSpec));
|
|
3795
|
+
const previewPaymentChangePlan = (input) => decodeAndRun(PaymentChangePlanPreviewInputSchema, input, (decodedInput) => requestJson$1(PaymentChangePlanPreviewSchema, {
|
|
3796
3796
|
method: "GET",
|
|
3797
|
-
path: `/v2/payment/change_plan/${encodePathSegment(decodedInput.plan_path)}`,
|
|
3797
|
+
path: `/v2/payment/change_plan/${encodePathSegment$1(decodedInput.plan_path)}`,
|
|
3798
3798
|
query: {
|
|
3799
3799
|
coupon_code: decodedInput.coupon_code,
|
|
3800
3800
|
payment_type: decodedInput.payment_type
|
|
3801
3801
|
}
|
|
3802
|
-
})).pipe(withOperationErrors(PreviewPaymentChangePlanErrorSpec));
|
|
3803
|
-
const submitPaymentChangePlan = (input) => decodeAndRun(PaymentChangePlanSubmitInputSchema, input, (decodedInput) => requestJson(PaymentChangePlanSubmitSchema, {
|
|
3802
|
+
})).pipe(withOperationErrors$1(PreviewPaymentChangePlanErrorSpec));
|
|
3803
|
+
const submitPaymentChangePlan = (input) => decodeAndRun(PaymentChangePlanSubmitInputSchema, input, (decodedInput) => requestJson$1(PaymentChangePlanSubmitSchema, {
|
|
3804
3804
|
body: {
|
|
3805
3805
|
type: "form",
|
|
3806
3806
|
value: {
|
|
@@ -3809,57 +3809,57 @@ const submitPaymentChangePlan = (input) => decodeAndRun(PaymentChangePlanSubmitI
|
|
|
3809
3809
|
}
|
|
3810
3810
|
},
|
|
3811
3811
|
method: "POST",
|
|
3812
|
-
path: `/v2/payment/change_plan/${encodePathSegment(decodedInput.plan_path)}`,
|
|
3812
|
+
path: `/v2/payment/change_plan/${encodePathSegment$1(decodedInput.plan_path)}`,
|
|
3813
3813
|
query: { coupon_code: decodedInput.coupon_code }
|
|
3814
|
-
})).pipe(withOperationErrors(SubmitPaymentChangePlanErrorSpec));
|
|
3815
|
-
const confirmFastspringOrder = (reference) => decodeAndRun(NonEmptyStringSchema, reference, (decodedReference) => requestJson(PaymentFastspringConfirmEnvelopeSchema, {
|
|
3814
|
+
})).pipe(withOperationErrors$1(SubmitPaymentChangePlanErrorSpec));
|
|
3815
|
+
const confirmFastspringOrder = (reference) => decodeAndRun(NonEmptyStringSchema, reference, (decodedReference) => requestJson$1(PaymentFastspringConfirmEnvelopeSchema, {
|
|
3816
3816
|
method: "GET",
|
|
3817
|
-
path: `/v2/payment/fs-confirm/${encodePathSegment(decodedReference)}`
|
|
3818
|
-
}).pipe(selectJsonField("confirmed"))).pipe(withOperationErrors(ConfirmFastspringOrderErrorSpec));
|
|
3819
|
-
const stopPaymentSubscription = () => requestJson(OkResponseSchema, {
|
|
3817
|
+
path: `/v2/payment/fs-confirm/${encodePathSegment$1(decodedReference)}`
|
|
3818
|
+
}).pipe(selectJsonField$1("confirmed"))).pipe(withOperationErrors$1(ConfirmFastspringOrderErrorSpec));
|
|
3819
|
+
const stopPaymentSubscription = () => requestJson$1(OkResponseSchema, {
|
|
3820
3820
|
method: "POST",
|
|
3821
3821
|
path: "/v2/payment/stop_subscription"
|
|
3822
|
-
}).pipe(Effect.asVoid, withOperationErrors(StopSubscriptionErrorSpec));
|
|
3823
|
-
const getPaymentVoucherInfo = (code) => decodeAndRun(NonEmptyStringSchema, code, (decodedCode) => requestJson(PaymentVoucherInfoSchema, {
|
|
3822
|
+
}).pipe(Effect.asVoid, withOperationErrors$1(StopSubscriptionErrorSpec));
|
|
3823
|
+
const getPaymentVoucherInfo = (code) => decodeAndRun(NonEmptyStringSchema, code, (decodedCode) => requestJson$1(PaymentVoucherInfoSchema, {
|
|
3824
3824
|
method: "GET",
|
|
3825
|
-
path: `/v2/payment/redeem_voucher/${encodePathSegment(decodedCode)}`
|
|
3826
|
-
})).pipe(withOperationErrors(GetPaymentVoucherInfoErrorSpec));
|
|
3827
|
-
const redeemPaymentVoucher = (code) => decodeAndRun(NonEmptyStringSchema, code, (decodedCode) => requestJson(OkResponseSchema, {
|
|
3825
|
+
path: `/v2/payment/redeem_voucher/${encodePathSegment$1(decodedCode)}`
|
|
3826
|
+
})).pipe(withOperationErrors$1(GetPaymentVoucherInfoErrorSpec));
|
|
3827
|
+
const redeemPaymentVoucher = (code) => decodeAndRun(NonEmptyStringSchema, code, (decodedCode) => requestJson$1(OkResponseSchema, {
|
|
3828
3828
|
method: "POST",
|
|
3829
|
-
path: `/v2/payment/redeem_voucher/${encodePathSegment(decodedCode)}`
|
|
3830
|
-
})).pipe(Effect.asVoid, withOperationErrors(RedeemPaymentVoucherErrorSpec));
|
|
3831
|
-
const reportPayments = (paymentIds) => decodeAndRun(PaymentIdsSchema, paymentIds, (decodedPaymentIds) => requestJson(OkResponseSchema, {
|
|
3829
|
+
path: `/v2/payment/redeem_voucher/${encodePathSegment$1(decodedCode)}`
|
|
3830
|
+
})).pipe(Effect.asVoid, withOperationErrors$1(RedeemPaymentVoucherErrorSpec));
|
|
3831
|
+
const reportPayments = (paymentIds) => decodeAndRun(PaymentIdsSchema, paymentIds, (decodedPaymentIds) => requestJson$1(OkResponseSchema, {
|
|
3832
3832
|
body: {
|
|
3833
3833
|
type: "form",
|
|
3834
3834
|
value: { payment_ids: joinCsv(decodedPaymentIds) }
|
|
3835
3835
|
},
|
|
3836
3836
|
method: "POST",
|
|
3837
3837
|
path: "/v2/payment/report"
|
|
3838
|
-
})).pipe(Effect.asVoid, withOperationErrors(ReportPaymentsErrorSpec));
|
|
3839
|
-
const createPaddleWaitingPayment = (input) => decodeAndRun(PaymentPaddleWaitingPaymentInputSchema, input, (decodedInput) => requestJson(OkResponseSchema, {
|
|
3838
|
+
})).pipe(Effect.asVoid, withOperationErrors$1(ReportPaymentsErrorSpec));
|
|
3839
|
+
const createPaddleWaitingPayment = (input) => decodeAndRun(PaymentPaddleWaitingPaymentInputSchema, input, (decodedInput) => requestJson$1(OkResponseSchema, {
|
|
3840
3840
|
body: {
|
|
3841
3841
|
type: "form",
|
|
3842
3842
|
value: decodedInput
|
|
3843
3843
|
},
|
|
3844
3844
|
method: "POST",
|
|
3845
3845
|
path: "/v2/payment/paddle_waiting_payment"
|
|
3846
|
-
})).pipe(Effect.asVoid, withOperationErrors(CreatePaddleWaitingPaymentErrorSpec));
|
|
3847
|
-
const getPaddleBillingInvoiceUrl = (paymentId) => decodeAndRun(PositiveIntegerSchema, paymentId, (decodedPaymentId) => requestJson(PaymentPaddleBillingInvoiceEnvelopeSchema, {
|
|
3846
|
+
})).pipe(Effect.asVoid, withOperationErrors$1(CreatePaddleWaitingPaymentErrorSpec));
|
|
3847
|
+
const getPaddleBillingInvoiceUrl = (paymentId) => decodeAndRun(PositiveIntegerSchema, paymentId, (decodedPaymentId) => requestJson$1(PaymentPaddleBillingInvoiceEnvelopeSchema, {
|
|
3848
3848
|
method: "GET",
|
|
3849
|
-
path: `/v2/payment/methods/paddle_billing/invoice/${encodePathSegment(decodedPaymentId)}`
|
|
3850
|
-
}).pipe(selectJsonField("url"))).pipe(withOperationErrors(GetPaddleBillingInvoiceUrlErrorSpec));
|
|
3851
|
-
const createPaddleBillingUpdatePaymentMethodTransaction = (userSubscriptionId) => decodeAndRun(PositiveIntegerSchema, userSubscriptionId, (decodedUserSubscriptionId) => requestJson(PaymentPaddleBillingUpdatePaymentMethodEnvelopeSchema, {
|
|
3849
|
+
path: `/v2/payment/methods/paddle_billing/invoice/${encodePathSegment$1(decodedPaymentId)}`
|
|
3850
|
+
}).pipe(selectJsonField$1("url"))).pipe(withOperationErrors$1(GetPaddleBillingInvoiceUrlErrorSpec));
|
|
3851
|
+
const createPaddleBillingUpdatePaymentMethodTransaction = (userSubscriptionId) => decodeAndRun(PositiveIntegerSchema, userSubscriptionId, (decodedUserSubscriptionId) => requestJson$1(PaymentPaddleBillingUpdatePaymentMethodEnvelopeSchema, {
|
|
3852
3852
|
method: "GET",
|
|
3853
|
-
path: `/v2/payment/methods/paddle_billing/update_payment_method/${encodePathSegment(decodedUserSubscriptionId)}`
|
|
3854
|
-
}).pipe(selectJsonField("transaction_id"))).pipe(withOperationErrors(CreatePaddleBillingUpdatePaymentMethodTransactionErrorSpec));
|
|
3855
|
-
const createOpenNodeCharge = (planPath) => decodeAndRun(NonEmptyStringSchema, planPath, (decodedPlanPath) => requestJson(PaymentOpenNodeChargeEnvelopeSchema, {
|
|
3853
|
+
path: `/v2/payment/methods/paddle_billing/update_payment_method/${encodePathSegment$1(decodedUserSubscriptionId)}`
|
|
3854
|
+
}).pipe(selectJsonField$1("transaction_id"))).pipe(withOperationErrors$1(CreatePaddleBillingUpdatePaymentMethodTransactionErrorSpec));
|
|
3855
|
+
const createOpenNodeCharge = (planPath) => decodeAndRun(NonEmptyStringSchema, planPath, (decodedPlanPath) => requestJson$1(PaymentOpenNodeChargeEnvelopeSchema, {
|
|
3856
3856
|
body: {
|
|
3857
3857
|
type: "form",
|
|
3858
3858
|
value: { plan_fs_path: decodedPlanPath }
|
|
3859
3859
|
},
|
|
3860
3860
|
method: "POST",
|
|
3861
3861
|
path: "/v2/payment/methods/opennode/charge"
|
|
3862
|
-
}).pipe(selectJsonField("opennode"), selectJsonField("checkout_url"))).pipe(withOperationErrors(CreateOpenNodeChargeErrorSpec));
|
|
3862
|
+
}).pipe(selectJsonField$1("opennode"), selectJsonField$1("checkout_url"))).pipe(withOperationErrors$1(CreateOpenNodeChargeErrorSpec));
|
|
3863
3863
|
// src/domains/podcast.ts
|
|
3864
3864
|
const PodcastLinkTypeSchema = Schema.Literals([
|
|
3865
3865
|
"all",
|
|
@@ -3882,14 +3882,14 @@ const PodcastLinksEnvelopeSchema = Schema.Struct({
|
|
|
3882
3882
|
status: Schema.Literal("OK"),
|
|
3883
3883
|
token: Schema.String
|
|
3884
3884
|
});
|
|
3885
|
-
const getPodcastLinks = (input) => decodeAndRun(PodcastGetLinksInputSchema, input, (decodedInput) => requestJson(PodcastLinksEnvelopeSchema, {
|
|
3885
|
+
const getPodcastLinks = (input) => decodeAndRun(PodcastGetLinksInputSchema, input, (decodedInput) => requestJson$1(PodcastLinksEnvelopeSchema, {
|
|
3886
3886
|
method: "GET",
|
|
3887
3887
|
path: "/v2/podcast/links",
|
|
3888
3888
|
query: {
|
|
3889
3889
|
parent_id: decodedInput.parentId,
|
|
3890
3890
|
type: decodedInput.types ? joinCsv(decodedInput.types) : void 0
|
|
3891
3891
|
}
|
|
3892
|
-
})).pipe(selectJsonFields("links", "token"));
|
|
3892
|
+
})).pipe(selectJsonFields$1("links", "token"));
|
|
3893
3893
|
// src/domains/rss.ts
|
|
3894
3894
|
const RssFeedSchema = Schema.Struct({
|
|
3895
3895
|
created_at: Schema.String,
|
|
@@ -4168,64 +4168,64 @@ const toUpdateBody = (params) => ({
|
|
|
4168
4168
|
...toCreateBody(params),
|
|
4169
4169
|
delete_old_files: toOptionalBooleanFormValue(params.delete_old_files)
|
|
4170
4170
|
});
|
|
4171
|
-
const listRssFeeds = () => requestJson(RssFeedsEnvelopeSchema, {
|
|
4171
|
+
const listRssFeeds = () => requestJson$1(RssFeedsEnvelopeSchema, {
|
|
4172
4172
|
method: "GET",
|
|
4173
4173
|
path: "/v2/rss/list"
|
|
4174
|
-
}).pipe(selectJsonField("feeds"), withOperationErrors(ListRssFeedsErrorSpec));
|
|
4175
|
-
const getRssFeed = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson(RssFeedEnvelopeSchema, {
|
|
4174
|
+
}).pipe(selectJsonField$1("feeds"), withOperationErrors$1(ListRssFeedsErrorSpec));
|
|
4175
|
+
const getRssFeed = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson$1(RssFeedEnvelopeSchema, {
|
|
4176
4176
|
method: "GET",
|
|
4177
|
-
path: `/v2/rss/${encodePathSegment(decodedId)}`
|
|
4178
|
-
})).pipe(selectJsonField("feed"), withOperationErrors(GetRssFeedErrorSpec));
|
|
4179
|
-
const createRssFeed = (params) => decodeAndRun(RssFeedParamsSchema, params, (decodedParams) => requestJson(RssFeedEnvelopeSchema, {
|
|
4177
|
+
path: `/v2/rss/${encodePathSegment$1(decodedId)}`
|
|
4178
|
+
})).pipe(selectJsonField$1("feed"), withOperationErrors$1(GetRssFeedErrorSpec));
|
|
4179
|
+
const createRssFeed = (params) => decodeAndRun(RssFeedParamsSchema, params, (decodedParams) => requestJson$1(RssFeedEnvelopeSchema, {
|
|
4180
4180
|
body: {
|
|
4181
4181
|
type: "form",
|
|
4182
4182
|
value: toCreateBody(decodedParams)
|
|
4183
4183
|
},
|
|
4184
4184
|
method: "POST",
|
|
4185
4185
|
path: "/v2/rss/create"
|
|
4186
|
-
})).pipe(selectJsonField("feed"), withOperationErrors(CreateRssFeedErrorSpec));
|
|
4186
|
+
})).pipe(selectJsonField$1("feed"), withOperationErrors$1(CreateRssFeedErrorSpec));
|
|
4187
4187
|
const updateRssFeed = (id, params) => decodeAndRun(RssFeedUpdateInputSchema, {
|
|
4188
4188
|
id,
|
|
4189
4189
|
params
|
|
4190
|
-
}, (decodedInput) => requestJson(OkResponseSchema, {
|
|
4190
|
+
}, (decodedInput) => requestJson$1(OkResponseSchema, {
|
|
4191
4191
|
body: {
|
|
4192
4192
|
type: "form",
|
|
4193
4193
|
value: toUpdateBody(decodedInput.params)
|
|
4194
4194
|
},
|
|
4195
4195
|
method: "POST",
|
|
4196
|
-
path: `/v2/rss/${encodePathSegment(decodedInput.id)}`
|
|
4197
|
-
})).pipe(withOperationErrors(UpdateRssFeedErrorSpec));
|
|
4198
|
-
const pauseRssFeed = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson(OkResponseSchema, {
|
|
4196
|
+
path: `/v2/rss/${encodePathSegment$1(decodedInput.id)}`
|
|
4197
|
+
})).pipe(withOperationErrors$1(UpdateRssFeedErrorSpec));
|
|
4198
|
+
const pauseRssFeed = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson$1(OkResponseSchema, {
|
|
4199
4199
|
method: "POST",
|
|
4200
|
-
path: `/v2/rss/${encodePathSegment(decodedId)}/pause`
|
|
4201
|
-
})).pipe(withOperationErrors(PauseRssFeedErrorSpec));
|
|
4202
|
-
const resumeRssFeed = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson(OkResponseSchema, {
|
|
4200
|
+
path: `/v2/rss/${encodePathSegment$1(decodedId)}/pause`
|
|
4201
|
+
})).pipe(withOperationErrors$1(PauseRssFeedErrorSpec));
|
|
4202
|
+
const resumeRssFeed = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson$1(OkResponseSchema, {
|
|
4203
4203
|
method: "POST",
|
|
4204
|
-
path: `/v2/rss/${encodePathSegment(decodedId)}/resume`
|
|
4205
|
-
})).pipe(withOperationErrors(ResumeRssFeedErrorSpec));
|
|
4206
|
-
const deleteRssFeed = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson(OkResponseSchema, {
|
|
4204
|
+
path: `/v2/rss/${encodePathSegment$1(decodedId)}/resume`
|
|
4205
|
+
})).pipe(withOperationErrors$1(ResumeRssFeedErrorSpec));
|
|
4206
|
+
const deleteRssFeed = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson$1(OkResponseSchema, {
|
|
4207
4207
|
method: "POST",
|
|
4208
|
-
path: `/v2/rss/${encodePathSegment(decodedId)}/delete`
|
|
4209
|
-
})).pipe(withOperationErrors(DeleteRssFeedErrorSpec));
|
|
4210
|
-
const listRssFeedItems = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson(RssFeedItemsEnvelopeSchema, {
|
|
4208
|
+
path: `/v2/rss/${encodePathSegment$1(decodedId)}/delete`
|
|
4209
|
+
})).pipe(withOperationErrors$1(DeleteRssFeedErrorSpec));
|
|
4210
|
+
const listRssFeedItems = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson$1(RssFeedItemsEnvelopeSchema, {
|
|
4211
4211
|
method: "GET",
|
|
4212
|
-
path: `/v2/rss/${encodePathSegment(decodedId)}/items`
|
|
4213
|
-
})).pipe(selectJsonFields("feed", "items"), withOperationErrors(ListRssFeedItemsErrorSpec));
|
|
4214
|
-
const clearRssFeedLogs = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson(OkResponseSchema, {
|
|
4212
|
+
path: `/v2/rss/${encodePathSegment$1(decodedId)}/items`
|
|
4213
|
+
})).pipe(selectJsonFields$1("feed", "items"), withOperationErrors$1(ListRssFeedItemsErrorSpec));
|
|
4214
|
+
const clearRssFeedLogs = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson$1(OkResponseSchema, {
|
|
4215
4215
|
method: "POST",
|
|
4216
|
-
path: `/v2/rss/${encodePathSegment(decodedId)}/clear-log`
|
|
4217
|
-
})).pipe(withOperationErrors(ClearRssFeedLogsErrorSpec));
|
|
4216
|
+
path: `/v2/rss/${encodePathSegment$1(decodedId)}/clear-log`
|
|
4217
|
+
})).pipe(withOperationErrors$1(ClearRssFeedLogsErrorSpec));
|
|
4218
4218
|
const retryRssFeedItem = (feedId, itemId) => decodeAndRun(RssFeedItemRetryInputSchema, {
|
|
4219
4219
|
feedId,
|
|
4220
4220
|
itemId
|
|
4221
|
-
}, (decodedInput) => requestJson(OkResponseSchema, {
|
|
4221
|
+
}, (decodedInput) => requestJson$1(OkResponseSchema, {
|
|
4222
4222
|
method: "POST",
|
|
4223
|
-
path: `/v2/rss/${encodePathSegment(decodedInput.feedId)}/items/${encodePathSegment(decodedInput.itemId)}/retry`
|
|
4224
|
-
})).pipe(withOperationErrors(RetryRssFeedItemErrorSpec));
|
|
4225
|
-
const retryAllRssFeedItems = (feedId) => decodeAndRun(PositiveIntegerSchema, feedId, (decodedFeedId) => requestJson(OkResponseSchema, {
|
|
4223
|
+
path: `/v2/rss/${encodePathSegment$1(decodedInput.feedId)}/items/${encodePathSegment$1(decodedInput.itemId)}/retry`
|
|
4224
|
+
})).pipe(withOperationErrors$1(RetryRssFeedItemErrorSpec));
|
|
4225
|
+
const retryAllRssFeedItems = (feedId) => decodeAndRun(PositiveIntegerSchema, feedId, (decodedFeedId) => requestJson$1(OkResponseSchema, {
|
|
4226
4226
|
method: "POST",
|
|
4227
|
-
path: `/v2/rss/${encodePathSegment(decodedFeedId)}/retry-all`
|
|
4228
|
-
})).pipe(withOperationErrors(RetryAllRssFeedItemsErrorSpec));
|
|
4227
|
+
path: `/v2/rss/${encodePathSegment$1(decodedFeedId)}/retry-all`
|
|
4228
|
+
})).pipe(withOperationErrors$1(RetryAllRssFeedItemsErrorSpec));
|
|
4229
4229
|
// src/domains/sharing.ts
|
|
4230
4230
|
const SharingCloneStatusSchema = Schema.Literals([
|
|
4231
4231
|
"NEW",
|
|
@@ -4515,7 +4515,7 @@ const GetPublicShareFileUrlErrorSpec = definePutioOperationErrorSpec({
|
|
|
4515
4515
|
]
|
|
4516
4516
|
});
|
|
4517
4517
|
const toShareTarget = (target) => target.type === "everyone" ? "everyone" : target.friendNames.join(",");
|
|
4518
|
-
const cloneSharedFiles = (input) => decodeAndRun(SharingCloneInputSchema, input, (decodedInput) => requestJson(SharingCloneEnvelopeSchema, {
|
|
4518
|
+
const cloneSharedFiles = (input) => decodeAndRun(SharingCloneInputSchema, input, (decodedInput) => requestJson$1(SharingCloneEnvelopeSchema, {
|
|
4519
4519
|
body: {
|
|
4520
4520
|
type: "form",
|
|
4521
4521
|
value: {
|
|
@@ -4525,12 +4525,12 @@ const cloneSharedFiles = (input) => decodeAndRun(SharingCloneInputSchema, input,
|
|
|
4525
4525
|
},
|
|
4526
4526
|
method: "POST",
|
|
4527
4527
|
path: "/v2/sharing/clone"
|
|
4528
|
-
})).pipe(selectJsonFields("id"), withOperationErrors(CreateSharingCloneErrorSpec));
|
|
4529
|
-
const getSharingCloneInfo = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson(SharingCloneInfoSchema, {
|
|
4528
|
+
})).pipe(selectJsonFields$1("id"), withOperationErrors$1(CreateSharingCloneErrorSpec));
|
|
4529
|
+
const getSharingCloneInfo = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson$1(SharingCloneInfoSchema, {
|
|
4530
4530
|
method: "GET",
|
|
4531
|
-
path: `/v2/sharing/clone/${encodePathSegment(decodedId)}`
|
|
4532
|
-
})).pipe(withOperationErrors(GetSharingCloneInfoErrorSpec));
|
|
4533
|
-
const shareFiles = (input) => decodeAndRun(SharingShareInputSchema, input, (decodedInput) => requestJson(OkResponseSchema, {
|
|
4531
|
+
path: `/v2/sharing/clone/${encodePathSegment$1(decodedId)}`
|
|
4532
|
+
})).pipe(withOperationErrors$1(GetSharingCloneInfoErrorSpec));
|
|
4533
|
+
const shareFiles = (input) => decodeAndRun(SharingShareInputSchema, input, (decodedInput) => requestJson$1(OkResponseSchema, {
|
|
4534
4534
|
body: {
|
|
4535
4535
|
type: "form",
|
|
4536
4536
|
value: {
|
|
@@ -4540,50 +4540,50 @@ const shareFiles = (input) => decodeAndRun(SharingShareInputSchema, input, (deco
|
|
|
4540
4540
|
},
|
|
4541
4541
|
method: "POST",
|
|
4542
4542
|
path: "/v2/files/share"
|
|
4543
|
-
})).pipe(withOperationErrors(ShareFilesErrorSpec));
|
|
4544
|
-
const listSharedFiles = () => requestJson(SharedFilesEnvelopeSchema, {
|
|
4543
|
+
})).pipe(withOperationErrors$1(ShareFilesErrorSpec));
|
|
4544
|
+
const listSharedFiles = () => requestJson$1(SharedFilesEnvelopeSchema, {
|
|
4545
4545
|
method: "GET",
|
|
4546
4546
|
path: "/v2/files/shared"
|
|
4547
|
-
}).pipe(selectJsonField("shared"), withOperationErrors(ListSharedFilesErrorSpec));
|
|
4548
|
-
const getSharedWith = (fileId) => decodeAndRun(PositiveIntegerSchema, fileId, (decodedFileId) => requestJson(SharedFileSharedWithSchema, {
|
|
4547
|
+
}).pipe(selectJsonField$1("shared"), withOperationErrors$1(ListSharedFilesErrorSpec));
|
|
4548
|
+
const getSharedWith = (fileId) => decodeAndRun(PositiveIntegerSchema, fileId, (decodedFileId) => requestJson$1(SharedFileSharedWithSchema, {
|
|
4549
4549
|
method: "GET",
|
|
4550
|
-
path: `/v2/files/${encodePathSegment(decodedFileId)}/shared-with-v2`
|
|
4551
|
-
})).pipe(withOperationErrors(GetSharedWithErrorSpec));
|
|
4552
|
-
const unshareFile = (input) => decodeAndRun(SharingUnshareInputSchema, input, (decodedInput) => requestJson(OkResponseSchema, {
|
|
4550
|
+
path: `/v2/files/${encodePathSegment$1(decodedFileId)}/shared-with-v2`
|
|
4551
|
+
})).pipe(withOperationErrors$1(GetSharedWithErrorSpec));
|
|
4552
|
+
const unshareFile = (input) => decodeAndRun(SharingUnshareInputSchema, input, (decodedInput) => requestJson$1(OkResponseSchema, {
|
|
4553
4553
|
body: {
|
|
4554
4554
|
type: "form",
|
|
4555
4555
|
value: { shares: joinCsv(decodedInput.shares) ?? "everyone" }
|
|
4556
4556
|
},
|
|
4557
4557
|
method: "POST",
|
|
4558
|
-
path: `/v2/files/${encodePathSegment(decodedInput.fileId)}/unshare`
|
|
4559
|
-
})).pipe(withOperationErrors(UnshareFileErrorSpec));
|
|
4560
|
-
const createPublicShare = (fileId) => decodeAndRun(PositiveIntegerSchema, fileId, (decodedFileId) => requestJson(PublicShareEnvelopeSchema, {
|
|
4558
|
+
path: `/v2/files/${encodePathSegment$1(decodedInput.fileId)}/unshare`
|
|
4559
|
+
})).pipe(withOperationErrors$1(UnshareFileErrorSpec));
|
|
4560
|
+
const createPublicShare = (fileId) => decodeAndRun(PositiveIntegerSchema, fileId, (decodedFileId) => requestJson$1(PublicShareEnvelopeSchema, {
|
|
4561
4561
|
method: "POST",
|
|
4562
|
-
path: `/v2/public_share/${encodePathSegment(decodedFileId)}`
|
|
4563
|
-
})).pipe(selectJsonField("public_share"), withOperationErrors(CreatePublicShareErrorSpec));
|
|
4564
|
-
const listPublicShares = () => requestJson(PublicSharesEnvelopeSchema, {
|
|
4562
|
+
path: `/v2/public_share/${encodePathSegment$1(decodedFileId)}`
|
|
4563
|
+
})).pipe(selectJsonField$1("public_share"), withOperationErrors$1(CreatePublicShareErrorSpec));
|
|
4564
|
+
const listPublicShares = () => requestJson$1(PublicSharesEnvelopeSchema, {
|
|
4565
4565
|
method: "GET",
|
|
4566
4566
|
path: "/v2/public_share/list"
|
|
4567
|
-
}).pipe(selectJsonField("public_shares"), withOperationErrors(ListPublicSharesErrorSpec));
|
|
4568
|
-
const deletePublicShare = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson(OkResponseSchema, {
|
|
4567
|
+
}).pipe(selectJsonField$1("public_shares"), withOperationErrors$1(ListPublicSharesErrorSpec));
|
|
4568
|
+
const deletePublicShare = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson$1(OkResponseSchema, {
|
|
4569
4569
|
method: "DELETE",
|
|
4570
|
-
path: `/v2/public_share/${encodePathSegment(decodedId)}`
|
|
4571
|
-
})).pipe(withOperationErrors(DeletePublicShareErrorSpec));
|
|
4572
|
-
const getPublicShare = () => requestJson(PublicShareEnvelopeSchema, {
|
|
4570
|
+
path: `/v2/public_share/${encodePathSegment$1(decodedId)}`
|
|
4571
|
+
})).pipe(withOperationErrors$1(DeletePublicShareErrorSpec));
|
|
4572
|
+
const getPublicShare = () => requestJson$1(PublicShareEnvelopeSchema, {
|
|
4573
4573
|
method: "GET",
|
|
4574
4574
|
path: "/v2/public_share"
|
|
4575
|
-
}).pipe(selectJsonField("public_share"), withOperationErrors(GetPublicShareErrorSpec));
|
|
4575
|
+
}).pipe(selectJsonField$1("public_share"), withOperationErrors$1(GetPublicShareErrorSpec));
|
|
4576
4576
|
function listPublicShareFiles(query = {}) {
|
|
4577
|
-
return decodeAndRun(PublicShareListQuerySchema, query, (decodedQuery) => requestJson(FilesListEnvelopeSchema, {
|
|
4577
|
+
return decodeAndRun(PublicShareListQuerySchema, query, (decodedQuery) => requestJson$1(FilesListEnvelopeSchema, {
|
|
4578
4578
|
method: "GET",
|
|
4579
4579
|
path: "/v2/public_share/files/list",
|
|
4580
4580
|
query: decodedQuery
|
|
4581
|
-
}).pipe(requireRequestedBreadcrumbs(decodedQuery))).pipe(withOperationErrors(ListPublicShareFilesErrorSpec));
|
|
4581
|
+
}).pipe(requireRequestedBreadcrumbs(decodedQuery))).pipe(withOperationErrors$1(ListPublicShareFilesErrorSpec));
|
|
4582
4582
|
}
|
|
4583
4583
|
const continuePublicShareFiles = (cursor, query = {}) => decodeAndRun(PublicShareContinueInputSchema, {
|
|
4584
4584
|
cursor,
|
|
4585
4585
|
query
|
|
4586
|
-
}, (decodedInput) => requestJson(PublicShareFileListContinueEnvelopeSchema, {
|
|
4586
|
+
}, (decodedInput) => requestJson$1(PublicShareFileListContinueEnvelopeSchema, {
|
|
4587
4587
|
body: {
|
|
4588
4588
|
type: "form",
|
|
4589
4589
|
value: { cursor: decodedInput.cursor }
|
|
@@ -4591,11 +4591,11 @@ const continuePublicShareFiles = (cursor, query = {}) => decodeAndRun(PublicShar
|
|
|
4591
4591
|
method: "POST",
|
|
4592
4592
|
path: "/v2/public_share/files/list/continue",
|
|
4593
4593
|
query: decodedInput.query
|
|
4594
|
-
})).pipe(withOperationErrors(ContinuePublicShareFilesErrorSpec));
|
|
4595
|
-
const getPublicShareFileUrl = (fileId) => decodeAndRun(PositiveIntegerSchema, fileId, (decodedFileId) => requestJson(PublicShareFileUrlEnvelopeSchema, {
|
|
4594
|
+
})).pipe(withOperationErrors$1(ContinuePublicShareFilesErrorSpec));
|
|
4595
|
+
const getPublicShareFileUrl = (fileId) => decodeAndRun(PositiveIntegerSchema, fileId, (decodedFileId) => requestJson$1(PublicShareFileUrlEnvelopeSchema, {
|
|
4596
4596
|
method: "GET",
|
|
4597
|
-
path: `/v2/public_share/files/${encodePathSegment(decodedFileId)}/url`
|
|
4598
|
-
})).pipe(selectJsonField("url"), withOperationErrors(GetPublicShareFileUrlErrorSpec));
|
|
4597
|
+
path: `/v2/public_share/files/${encodePathSegment$1(decodedFileId)}/url`
|
|
4598
|
+
})).pipe(selectJsonField$1("url"), withOperationErrors$1(GetPublicShareFileUrlErrorSpec));
|
|
4599
4599
|
// src/domains/trash.ts
|
|
4600
4600
|
const TrashFileSchema = Schema.Struct({
|
|
4601
4601
|
content_type: Schema.NullOr(Schema.String),
|
|
@@ -4715,15 +4715,15 @@ const toBulkTrashBody = (input) => {
|
|
|
4715
4715
|
file_ids: joinCsv(input.file_ids)
|
|
4716
4716
|
};
|
|
4717
4717
|
};
|
|
4718
|
-
const listTrash = (query = {}) => decodeAndRun(TrashListQuerySchema, query, (decodedQuery) => requestJson(TrashListEnvelopeSchema, {
|
|
4718
|
+
const listTrash = (query = {}) => decodeAndRun(TrashListQuerySchema, query, (decodedQuery) => requestJson$1(TrashListEnvelopeSchema, {
|
|
4719
4719
|
method: "GET",
|
|
4720
4720
|
path: "/v2/trash/list",
|
|
4721
4721
|
query: decodedQuery
|
|
4722
|
-
})).pipe(withOperationErrors(ListTrashErrorSpec));
|
|
4722
|
+
})).pipe(withOperationErrors$1(ListTrashErrorSpec));
|
|
4723
4723
|
const continueTrash = (cursor, query = {}) => decodeAndRun(TrashContinueInputSchema, {
|
|
4724
4724
|
cursor,
|
|
4725
4725
|
query
|
|
4726
|
-
}, (decodedInput) => requestJson(TrashContinueEnvelopeSchema, {
|
|
4726
|
+
}, (decodedInput) => requestJson$1(TrashContinueEnvelopeSchema, {
|
|
4727
4727
|
body: {
|
|
4728
4728
|
type: "form",
|
|
4729
4729
|
value: { cursor: decodedInput.cursor }
|
|
@@ -4731,27 +4731,27 @@ const continueTrash = (cursor, query = {}) => decodeAndRun(TrashContinueInputSch
|
|
|
4731
4731
|
method: "POST",
|
|
4732
4732
|
path: "/v2/trash/list/continue",
|
|
4733
4733
|
query: decodedInput.query
|
|
4734
|
-
})).pipe(withOperationErrors(ContinueTrashErrorSpec));
|
|
4735
|
-
const restoreTrash = (input) => decodeAndRun(TrashBulkInputSchema, input, (decodedInput) => requestJson(OkResponseSchema, {
|
|
4734
|
+
})).pipe(withOperationErrors$1(ContinueTrashErrorSpec));
|
|
4735
|
+
const restoreTrash = (input) => decodeAndRun(TrashBulkInputSchema, input, (decodedInput) => requestJson$1(OkResponseSchema, {
|
|
4736
4736
|
body: {
|
|
4737
4737
|
type: "form",
|
|
4738
4738
|
value: toBulkTrashBody(decodedInput)
|
|
4739
4739
|
},
|
|
4740
4740
|
method: "POST",
|
|
4741
4741
|
path: "/v2/trash/restore"
|
|
4742
|
-
})).pipe(Effect.asVoid, withOperationErrors(RestoreTrashErrorSpec));
|
|
4743
|
-
const deleteTrash = (input) => decodeAndRun(TrashBulkInputSchema, input, (decodedInput) => requestJson(OkResponseSchema, {
|
|
4742
|
+
})).pipe(Effect.asVoid, withOperationErrors$1(RestoreTrashErrorSpec));
|
|
4743
|
+
const deleteTrash = (input) => decodeAndRun(TrashBulkInputSchema, input, (decodedInput) => requestJson$1(OkResponseSchema, {
|
|
4744
4744
|
body: {
|
|
4745
4745
|
type: "form",
|
|
4746
4746
|
value: toBulkTrashBody(decodedInput)
|
|
4747
4747
|
},
|
|
4748
4748
|
method: "POST",
|
|
4749
4749
|
path: "/v2/trash/delete"
|
|
4750
|
-
})).pipe(Effect.asVoid, withOperationErrors(DeleteTrashErrorSpec));
|
|
4751
|
-
const emptyTrash = () => requestJson(OkResponseSchema, {
|
|
4750
|
+
})).pipe(Effect.asVoid, withOperationErrors$1(DeleteTrashErrorSpec));
|
|
4751
|
+
const emptyTrash = () => requestJson$1(OkResponseSchema, {
|
|
4752
4752
|
method: "POST",
|
|
4753
4753
|
path: "/v2/trash/empty"
|
|
4754
|
-
}).pipe(Effect.asVoid, withOperationErrors(EmptyTrashErrorSpec));
|
|
4754
|
+
}).pipe(Effect.asVoid, withOperationErrors$1(EmptyTrashErrorSpec));
|
|
4755
4755
|
// src/domains/transfers.ts
|
|
4756
4756
|
const TransferIdSchema = PositiveIntegerSchema;
|
|
4757
4757
|
const TransferIdsSchema = Schema.Array(TransferIdSchema).check(Schema.isMinLength(1));
|
|
@@ -5111,18 +5111,18 @@ const ensurePagedTransferFields = (response) => {
|
|
|
5111
5111
|
};
|
|
5112
5112
|
function listTransfers(query = {}) {
|
|
5113
5113
|
return decodeAndRun(TransfersListQuerySchema, query, (decodedQuery) => {
|
|
5114
|
-
const effect = requestJson(TransfersListEnvelopeSchema, {
|
|
5114
|
+
const effect = requestJson$1(TransfersListEnvelopeSchema, {
|
|
5115
5115
|
method: "GET",
|
|
5116
5116
|
path: "/v2/transfers/list",
|
|
5117
5117
|
query: decodedQuery
|
|
5118
5118
|
});
|
|
5119
5119
|
return decodedQuery.per_page === void 0 ? effect : Effect.flatMap(effect, ensurePagedTransferFields);
|
|
5120
|
-
}).pipe(withOperationErrors(ListTransfersErrorSpec));
|
|
5120
|
+
}).pipe(withOperationErrors$1(ListTransfersErrorSpec));
|
|
5121
5121
|
}
|
|
5122
5122
|
const continueTransfers = (cursor, query = {}) => decodeAndRun(TransferContinueInputSchema, {
|
|
5123
5123
|
cursor,
|
|
5124
5124
|
query
|
|
5125
|
-
}, (decodedInput) => requestJson(TransfersContinueEnvelopeSchema, {
|
|
5125
|
+
}, (decodedInput) => requestJson$1(TransfersContinueEnvelopeSchema, {
|
|
5126
5126
|
body: {
|
|
5127
5127
|
type: "form",
|
|
5128
5128
|
value: { cursor: decodedInput.cursor }
|
|
@@ -5130,52 +5130,52 @@ const continueTransfers = (cursor, query = {}) => decodeAndRun(TransferContinueI
|
|
|
5130
5130
|
method: "POST",
|
|
5131
5131
|
path: "/v2/transfers/list/continue",
|
|
5132
5132
|
query: decodedInput.query
|
|
5133
|
-
})).pipe(withOperationErrors(ContinueTransfersErrorSpec));
|
|
5134
|
-
const getTransfer = (id) => decodeAndRun(TransferIdSchema, id, (decodedId) => requestJson(TransferEnvelopeSchema, {
|
|
5133
|
+
})).pipe(withOperationErrors$1(ContinueTransfersErrorSpec));
|
|
5134
|
+
const getTransfer = (id) => decodeAndRun(TransferIdSchema, id, (decodedId) => requestJson$1(TransferEnvelopeSchema, {
|
|
5135
5135
|
method: "GET",
|
|
5136
|
-
path: `/v2/transfers/${encodePathSegment(decodedId)}`
|
|
5137
|
-
}).pipe(selectJsonField("transfer"))).pipe(withOperationErrors(GetTransferErrorSpec));
|
|
5138
|
-
const getTransferTorrent = (id) => decodeAndRun(TransferIdSchema, id, (decodedId) => requestArrayBuffer({
|
|
5136
|
+
path: `/v2/transfers/${encodePathSegment$1(decodedId)}`
|
|
5137
|
+
}).pipe(selectJsonField$1("transfer"))).pipe(withOperationErrors$1(GetTransferErrorSpec));
|
|
5138
|
+
const getTransferTorrent = (id) => decodeAndRun(TransferIdSchema, id, (decodedId) => requestArrayBuffer$1({
|
|
5139
5139
|
method: "GET",
|
|
5140
|
-
path: `/v2/transfers/${encodePathSegment(decodedId)}/torrent`
|
|
5141
|
-
})).pipe(withOperationErrors(GetTransferTorrentErrorSpec));
|
|
5142
|
-
const countTransfers = () => requestJson(TransferCountEnvelopeSchema, {
|
|
5140
|
+
path: `/v2/transfers/${encodePathSegment$1(decodedId)}/torrent`
|
|
5141
|
+
})).pipe(withOperationErrors$1(GetTransferTorrentErrorSpec));
|
|
5142
|
+
const countTransfers = () => requestJson$1(TransferCountEnvelopeSchema, {
|
|
5143
5143
|
method: "GET",
|
|
5144
5144
|
path: "/v2/transfers/count"
|
|
5145
|
-
}).pipe(selectJsonField("count"));
|
|
5146
|
-
const getTransferInfo = (urls) => decodeAndRun(TransferInfoUrlsSchema, urls, (decodedUrls) => requestJson(TransferInfoEnvelopeSchema, {
|
|
5145
|
+
}).pipe(selectJsonField$1("count"));
|
|
5146
|
+
const getTransferInfo = (urls) => decodeAndRun(TransferInfoUrlsSchema, urls, (decodedUrls) => requestJson$1(TransferInfoEnvelopeSchema, {
|
|
5147
5147
|
body: {
|
|
5148
5148
|
type: "form",
|
|
5149
5149
|
value: { urls: decodedUrls.join("\n") }
|
|
5150
5150
|
},
|
|
5151
5151
|
method: "POST",
|
|
5152
5152
|
path: "/v2/transfers/info"
|
|
5153
|
-
}).pipe(selectJsonFields("disk_avail", "ret")));
|
|
5154
|
-
const addTransfer = (input) => decodeAndRun(TransferAddInputSchema, input, (decodedInput) => requestJson(TransferEnvelopeSchema, {
|
|
5153
|
+
}).pipe(selectJsonFields$1("disk_avail", "ret")));
|
|
5154
|
+
const addTransfer = (input) => decodeAndRun(TransferAddInputSchema, input, (decodedInput) => requestJson$1(TransferEnvelopeSchema, {
|
|
5155
5155
|
body: {
|
|
5156
5156
|
type: "form",
|
|
5157
5157
|
value: decodedInput
|
|
5158
5158
|
},
|
|
5159
5159
|
method: "POST",
|
|
5160
5160
|
path: "/v2/transfers/add"
|
|
5161
|
-
}).pipe(selectJsonField("transfer"))).pipe(withOperationErrors(AddTransferErrorSpec));
|
|
5162
|
-
const addManyTransfers = (inputs) => decodeAndRun(TransferAddManyInputSchema, inputs, (decodedInputs) => requestJson(TransfersAddMultiEnvelopeSchema, {
|
|
5161
|
+
}).pipe(selectJsonField$1("transfer"))).pipe(withOperationErrors$1(AddTransferErrorSpec));
|
|
5162
|
+
const addManyTransfers = (inputs) => decodeAndRun(TransferAddManyInputSchema, inputs, (decodedInputs) => requestJson$1(TransfersAddMultiEnvelopeSchema, {
|
|
5163
5163
|
body: {
|
|
5164
5164
|
type: "form",
|
|
5165
5165
|
value: { urls: JSON.stringify(decodedInputs) }
|
|
5166
5166
|
},
|
|
5167
5167
|
method: "POST",
|
|
5168
5168
|
path: "/v2/transfers/add-multi"
|
|
5169
|
-
}).pipe(selectJsonFields("errors", "transfers"))).pipe(withOperationErrors(AddManyTransfersErrorSpec));
|
|
5170
|
-
const addTransferTrackers = (input) => decodeAndRun(TransferAddTrackersInputSchema, input, (decodedInput) => requestJson(OkResponseSchema, {
|
|
5169
|
+
}).pipe(selectJsonFields$1("errors", "transfers"))).pipe(withOperationErrors$1(AddManyTransfersErrorSpec));
|
|
5170
|
+
const addTransferTrackers = (input) => decodeAndRun(TransferAddTrackersInputSchema, input, (decodedInput) => requestJson$1(OkResponseSchema, {
|
|
5171
5171
|
body: {
|
|
5172
5172
|
type: "form",
|
|
5173
5173
|
value: { trackers: joinCsv(decodedInput.trackers) }
|
|
5174
5174
|
},
|
|
5175
5175
|
method: "POST",
|
|
5176
|
-
path: `/v2/transfers/add-trackers/${encodePathSegment(decodedInput.transferId)}`
|
|
5177
|
-
})).pipe(Effect.asVoid, withOperationErrors(AddTransferTrackersErrorSpec));
|
|
5178
|
-
const cancelTransfers = (ids) => decodeAndRun(TransferIdsSchema, ids, (decodedIds) => requestJson(OkResponseSchema, {
|
|
5176
|
+
path: `/v2/transfers/add-trackers/${encodePathSegment$1(decodedInput.transferId)}`
|
|
5177
|
+
})).pipe(Effect.asVoid, withOperationErrors$1(AddTransferTrackersErrorSpec));
|
|
5178
|
+
const cancelTransfers = (ids) => decodeAndRun(TransferIdsSchema, ids, (decodedIds) => requestJson$1(OkResponseSchema, {
|
|
5179
5179
|
body: {
|
|
5180
5180
|
type: "form",
|
|
5181
5181
|
value: { transfer_ids: joinCsv(decodedIds) }
|
|
@@ -5183,46 +5183,46 @@ const cancelTransfers = (ids) => decodeAndRun(TransferIdsSchema, ids, (decodedId
|
|
|
5183
5183
|
method: "POST",
|
|
5184
5184
|
path: "/v2/transfers/cancel"
|
|
5185
5185
|
}));
|
|
5186
|
-
const cleanTransfers = (ids = []) => decodeAndRun(TransferCleanIdsSchema, ids, (decodedIds) => requestJson(TransfersCleanEnvelopeSchema, {
|
|
5186
|
+
const cleanTransfers = (ids = []) => decodeAndRun(TransferCleanIdsSchema, ids, (decodedIds) => requestJson$1(TransfersCleanEnvelopeSchema, {
|
|
5187
5187
|
body: {
|
|
5188
5188
|
type: "form",
|
|
5189
5189
|
value: decodedIds.length > 0 ? { transfer_ids: joinCsv(decodedIds) } : {}
|
|
5190
5190
|
},
|
|
5191
5191
|
method: "POST",
|
|
5192
5192
|
path: "/v2/transfers/clean"
|
|
5193
|
-
}).pipe(selectJsonFields("deleted_ids")));
|
|
5194
|
-
const removeTransfers = (input) => decodeAndRun(TransferRemoveInputSchema, input, (decodedInput) => requestJson(OkResponseSchema, {
|
|
5193
|
+
}).pipe(selectJsonFields$1("deleted_ids")));
|
|
5194
|
+
const removeTransfers = (input) => decodeAndRun(TransferRemoveInputSchema, input, (decodedInput) => requestJson$1(OkResponseSchema, {
|
|
5195
5195
|
body: {
|
|
5196
5196
|
type: "form",
|
|
5197
5197
|
value: decodedInput.ids !== void 0 ? { transfer_ids: joinCsv(decodedInput.ids) } : { remove_filter: decodedInput.filter }
|
|
5198
5198
|
},
|
|
5199
5199
|
method: "POST",
|
|
5200
5200
|
path: "/v2/transfers/remove"
|
|
5201
|
-
})).pipe(Effect.asVoid, withOperationErrors(RemoveTransfersErrorSpec));
|
|
5202
|
-
const retryTransfer = (id) => decodeAndRun(TransferIdSchema, id, (decodedId) => requestJson(TransferEnvelopeSchema, {
|
|
5201
|
+
})).pipe(Effect.asVoid, withOperationErrors$1(RemoveTransfersErrorSpec));
|
|
5202
|
+
const retryTransfer = (id) => decodeAndRun(TransferIdSchema, id, (decodedId) => requestJson$1(TransferEnvelopeSchema, {
|
|
5203
5203
|
body: {
|
|
5204
5204
|
type: "form",
|
|
5205
5205
|
value: { id: decodedId }
|
|
5206
5206
|
},
|
|
5207
5207
|
method: "POST",
|
|
5208
5208
|
path: "/v2/transfers/retry"
|
|
5209
|
-
}).pipe(selectJsonField("transfer"))).pipe(withOperationErrors(RetryTransferErrorSpec));
|
|
5210
|
-
const reannounceTransfer = (id) => decodeAndRun(TransferIdSchema, id, (decodedId) => requestJson(OkResponseSchema, {
|
|
5209
|
+
}).pipe(selectJsonField$1("transfer"))).pipe(withOperationErrors$1(RetryTransferErrorSpec));
|
|
5210
|
+
const reannounceTransfer = (id) => decodeAndRun(TransferIdSchema, id, (decodedId) => requestJson$1(OkResponseSchema, {
|
|
5211
5211
|
body: {
|
|
5212
5212
|
type: "form",
|
|
5213
5213
|
value: { id: decodedId }
|
|
5214
5214
|
},
|
|
5215
5215
|
method: "POST",
|
|
5216
5216
|
path: "/v2/transfers/reannounce"
|
|
5217
|
-
})).pipe(withOperationErrors(ReannounceTransferErrorSpec));
|
|
5218
|
-
const stopTransferRecording = (id) => decodeAndRun(TransferIdSchema, id, (decodedId) => requestJson(OkResponseSchema, {
|
|
5217
|
+
})).pipe(withOperationErrors$1(ReannounceTransferErrorSpec));
|
|
5218
|
+
const stopTransferRecording = (id) => decodeAndRun(TransferIdSchema, id, (decodedId) => requestJson$1(OkResponseSchema, {
|
|
5219
5219
|
body: {
|
|
5220
5220
|
type: "form",
|
|
5221
5221
|
value: { transfer_id: decodedId }
|
|
5222
5222
|
},
|
|
5223
5223
|
method: "POST",
|
|
5224
5224
|
path: "/v2/transfers/stop-recording"
|
|
5225
|
-
})).pipe(withOperationErrors(StopRecordingTransferErrorSpec));
|
|
5225
|
+
})).pipe(withOperationErrors$1(StopRecordingTransferErrorSpec));
|
|
5226
5226
|
// src/domains/rate-limits.ts
|
|
5227
5227
|
const RemoveRateLimitBanInputSchema = Schema.Struct({
|
|
5228
5228
|
captchaToken: NonEmptyStringSchema,
|
|
@@ -5249,15 +5249,15 @@ const RemoveRateLimitBanErrorSpec = definePutioOperationErrorSpec({
|
|
|
5249
5249
|
* (`PutioRateLimitError.id`) and a solved reCAPTCHA token. The API lifts it
|
|
5250
5250
|
* only for the IP it limited, so call it from the limited visitor's browser.
|
|
5251
5251
|
*/
|
|
5252
|
-
const removeRateLimitBan = (input) => decodeAndRunRedacted("rateLimits", "removeBan")(RemoveRateLimitBanInputSchema, input, ({ captchaToken, id }) => requestJson(OkResponseSchema, {
|
|
5252
|
+
const removeRateLimitBan = (input) => decodeAndRunRedacted("rateLimits", "removeBan")(RemoveRateLimitBanInputSchema, input, ({ captchaToken, id }) => requestJson$1(OkResponseSchema, {
|
|
5253
5253
|
auth: { type: "none" },
|
|
5254
5254
|
body: {
|
|
5255
5255
|
type: "form",
|
|
5256
5256
|
value: { captcha_token: captchaToken }
|
|
5257
5257
|
},
|
|
5258
5258
|
method: "DELETE",
|
|
5259
|
-
path: `/v2/ban/${encodePathSegment(id)}`
|
|
5260
|
-
})).pipe(withOperationErrors(RemoveRateLimitBanErrorSpec));
|
|
5259
|
+
path: `/v2/ban/${encodePathSegment$1(id)}`
|
|
5260
|
+
})).pipe(withOperationErrors$1(RemoveRateLimitBanErrorSpec));
|
|
5261
5261
|
// src/domains/tunnel.ts
|
|
5262
5262
|
const TunnelRouteSchema = Schema.Struct({
|
|
5263
5263
|
description: Schema.String,
|
|
@@ -5276,10 +5276,10 @@ const ListTunnelRoutesErrorSpec = definePutioOperationErrorSpec({
|
|
|
5276
5276
|
statusCode: 401
|
|
5277
5277
|
}]
|
|
5278
5278
|
});
|
|
5279
|
-
const listTunnelRoutes = () => requestJson(TunnelRoutesEnvelopeSchema, {
|
|
5279
|
+
const listTunnelRoutes = () => requestJson$1(TunnelRoutesEnvelopeSchema, {
|
|
5280
5280
|
method: "GET",
|
|
5281
5281
|
path: "/v2/tunnel/routes"
|
|
5282
|
-
}).pipe(selectJsonField("routes"), withOperationErrors(ListTunnelRoutesErrorSpec));
|
|
5282
|
+
}).pipe(selectJsonField$1("routes"), withOperationErrors$1(ListTunnelRoutesErrorSpec));
|
|
5283
5283
|
// src/domains/zips.ts
|
|
5284
5284
|
const ZipStatusSchema = Schema.Literals([
|
|
5285
5285
|
"NEW",
|
|
@@ -5386,11 +5386,11 @@ const CancelZipErrorSpec = definePutioOperationErrorSpec({
|
|
|
5386
5386
|
{ statusCode: 410 }
|
|
5387
5387
|
]
|
|
5388
5388
|
});
|
|
5389
|
-
const listZips = () => requestJson(ZipsListEnvelopeSchema, {
|
|
5389
|
+
const listZips = () => requestJson$1(ZipsListEnvelopeSchema, {
|
|
5390
5390
|
method: "GET",
|
|
5391
5391
|
path: "/v2/zips/list"
|
|
5392
|
-
}).pipe(selectJsonField("zips"), withOperationErrors(ListZipsErrorSpec));
|
|
5393
|
-
const createZip = (input) => decodeAndRun(CreateZipInputSchema, input, (decodedInput) => requestJson(ZipCreateEnvelopeSchema, {
|
|
5392
|
+
}).pipe(selectJsonField$1("zips"), withOperationErrors$1(ListZipsErrorSpec));
|
|
5393
|
+
const createZip = (input) => decodeAndRun(CreateZipInputSchema, input, (decodedInput) => requestJson$1(ZipCreateEnvelopeSchema, {
|
|
5394
5394
|
body: {
|
|
5395
5395
|
type: "form",
|
|
5396
5396
|
value: toCursorSelectionForm({
|
|
@@ -5401,22 +5401,19 @@ const createZip = (input) => decodeAndRun(CreateZipInputSchema, input, (decodedI
|
|
|
5401
5401
|
},
|
|
5402
5402
|
method: "POST",
|
|
5403
5403
|
path: "/v2/zips/create"
|
|
5404
|
-
})).pipe(selectJsonField("zip_id"), withOperationErrors(CreateZipErrorSpec));
|
|
5405
|
-
const getZip = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson(ZipInfoSchema, {
|
|
5404
|
+
})).pipe(selectJsonField$1("zip_id"), withOperationErrors$1(CreateZipErrorSpec));
|
|
5405
|
+
const getZip = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson$1(ZipInfoSchema, {
|
|
5406
5406
|
method: "GET",
|
|
5407
|
-
path: `/v2/zips/${encodePathSegment(decodedId)}`
|
|
5408
|
-
})).pipe(withOperationErrors(GetZipErrorSpec));
|
|
5409
|
-
const cancelZip = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson(OkResponseSchema, {
|
|
5407
|
+
path: `/v2/zips/${encodePathSegment$1(decodedId)}`
|
|
5408
|
+
})).pipe(withOperationErrors$1(GetZipErrorSpec));
|
|
5409
|
+
const cancelZip = (id) => decodeAndRun(PositiveIntegerSchema, id, (decodedId) => requestJson$1(OkResponseSchema, {
|
|
5410
5410
|
method: "GET",
|
|
5411
|
-
path: `/v2/zips/${encodePathSegment(decodedId)}/cancel`
|
|
5412
|
-
})).pipe(Effect.asVoid, withOperationErrors(CancelZipErrorSpec));
|
|
5411
|
+
path: `/v2/zips/${encodePathSegment$1(decodedId)}/cancel`
|
|
5412
|
+
})).pipe(Effect.asVoid, withOperationErrors$1(CancelZipErrorSpec));
|
|
5413
5413
|
// src/core/client.ts
|
|
5414
5414
|
const getPromiseClientRuntime = (state) => {
|
|
5415
|
-
if (state.disposed) throw mapConfigurationError("This Promise client has been disposed and can no longer execute SDK effects");
|
|
5416
|
-
state.runtime ??= ManagedRuntime.make(
|
|
5417
|
-
...state.config,
|
|
5418
|
-
accessToken: void 0
|
|
5419
|
-
}));
|
|
5415
|
+
if (state.disposed) throw mapConfigurationError$1("This Promise client has been disposed and can no longer execute SDK effects");
|
|
5416
|
+
state.runtime ??= ManagedRuntime.make(putioFetchLayer);
|
|
5420
5417
|
return state.runtime;
|
|
5421
5418
|
};
|
|
5422
5419
|
const disposePromiseClientRuntime = async (state) => {
|
|
@@ -5728,7 +5725,7 @@ const createPromiseOperations = (state, signal) => {
|
|
|
5728
5725
|
};
|
|
5729
5726
|
const createPutioSdkPromiseClient = (initialConfig = {}) => {
|
|
5730
5727
|
const state = {
|
|
5731
|
-
config: normalizePutioSdkOptions({
|
|
5728
|
+
config: normalizePutioSdkOptions$1({
|
|
5732
5729
|
...initialConfig,
|
|
5733
5730
|
baseUrl: snapshotUrl(initialConfig.baseUrl),
|
|
5734
5731
|
headers: snapshotHeaders(initialConfig.headers),
|
|
@@ -5741,7 +5738,7 @@ const createPutioSdkPromiseClient = (initialConfig = {}) => {
|
|
|
5741
5738
|
return {
|
|
5742
5739
|
dispose: () => disposePromiseClientRuntime(state),
|
|
5743
5740
|
setAccessToken: (accessToken) => {
|
|
5744
|
-
state.config = normalizePutioSdkOptions({
|
|
5741
|
+
state.config = normalizePutioSdkOptions$1({
|
|
5745
5742
|
...state.config,
|
|
5746
5743
|
accessToken
|
|
5747
5744
|
});
|
|
@@ -5750,6 +5747,47 @@ const createPutioSdkPromiseClient = (initialConfig = {}) => {
|
|
|
5750
5747
|
...createPromiseOperations(state, void 0)
|
|
5751
5748
|
};
|
|
5752
5749
|
};
|
|
5750
|
+
// src/index.ts
|
|
5751
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5752
|
+
const buildPutioUrl = buildPutioUrl$1;
|
|
5753
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5754
|
+
const decodePutioErrorEnvelope = decodePutioErrorEnvelope$1;
|
|
5755
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5756
|
+
const encodePathSegment = encodePathSegment$1;
|
|
5757
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5758
|
+
const fallbackPutioErrorEnvelope = fallbackPutioErrorEnvelope$1;
|
|
5759
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5760
|
+
const mapConfigurationError = mapConfigurationError$1;
|
|
5761
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5762
|
+
const mapContractError = mapContractError$1;
|
|
5763
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5764
|
+
const mapTransportError = mapTransportError$1;
|
|
5765
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5766
|
+
const mapValidationError = mapValidationError$1;
|
|
5767
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5768
|
+
const normalizePutioSdkOptions = normalizePutioSdkOptions$1;
|
|
5769
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5770
|
+
const parseErrorBody = parseErrorBody$1;
|
|
5771
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5772
|
+
const PutioErrorEnvelopeSchema = PutioErrorEnvelopeSchema$1;
|
|
5773
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5774
|
+
const requestArrayBuffer = requestArrayBuffer$1;
|
|
5775
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5776
|
+
const requestJson = requestJson$1;
|
|
5777
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5778
|
+
const requestText = requestText$1;
|
|
5779
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5780
|
+
const requestVoid = requestVoid$1;
|
|
5781
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5782
|
+
const responseRateLimitHeaders = responseRateLimitHeaders$1;
|
|
5783
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5784
|
+
const selectJsonField = selectJsonField$1;
|
|
5785
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5786
|
+
const selectJsonFields = selectJsonFields$1;
|
|
5787
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5788
|
+
const toPutioResponseError = toPutioResponseError$1;
|
|
5789
|
+
/** @deprecated Internal SDK helper. It leaves the public API in the next major release. */
|
|
5790
|
+
const withOperationErrors = withOperationErrors$1;
|
|
5753
5791
|
export { AccountClearOptionsSchema, AccountConfirmationSchema, AccountConfirmationsErrorSpec, AccountDiskSchema, AccountInfoBaseSchema, AccountInfoBroadSchema, AccountInfoQuerySchema, AccountSettingsSchema, AccountSubtitleLanguageSchema, AccountTwoFactorSettingsSchema, AccountWarningsSchema, AddManyTransfersErrorSpec, AddTransferErrorSpec, AddTransferTrackersErrorSpec, AppSpecificPasswordSchema, ApproveFriendRequestErrorSpec, AuthorizationCodeSchema, CanWriteFileErrorSpec, CancelZipErrorSpec, ClearEventsErrorSpec, ClearRssFeedLogsErrorSpec, ClientsErrorSpec, ConfirmFastspringOrderErrorSpec, ContinueFilesErrorSpec, ContinuePublicShareFilesErrorSpec, ContinueSearchErrorSpec, ContinueTransfersErrorSpec, ContinueTrashErrorSpec, CopyFileErrorSpec, CountWaitingRequestsErrorSpec, CreateAppSpecificPasswordErrorSpec, CreateAppSpecificPasswordInputSchema, CreateDownloadLinksErrorSpec, CreateFamilyInviteErrorSpec, CreateFolderErrorSpec, CreateFriendInviteErrorSpec, CreateOAuthAppErrorSpec, CreateOpenNodeChargeErrorSpec, CreatePaddleBillingUpdatePaymentMethodTransactionErrorSpec, CreatePaddleWaitingPaymentErrorSpec, CreatePublicShareErrorSpec, CreateRssFeedErrorSpec, CreateSharingCloneErrorSpec, CreateZipErrorSpec, DEFAULT_PUTIO_API_BASE_URL, DEFAULT_PUTIO_UPLOAD_BASE_URL, DEFAULT_PUTIO_WEB_APP_URL, DeleteAllAppSpecificPasswordsErrorSpec, DeleteAppSpecificPasswordErrorSpec, DeleteEventErrorSpec, DeleteOAuthAppErrorSpec, DeletePublicShareErrorSpec, DeleteRssFeedErrorSpec, DeleteTrashErrorSpec, DenyFriendRequestErrorSpec, DownloadLinksCreateInputSchema, DownloadLinksInfoSchema, DownloadLinksPayloadSchema, DownloadLinksStatusSchema, DownloadUrlErrorSpec, EmptyTrashErrorSpec, EventsListQuerySchema, FamilyInviteLookupErrorSpec, FamilyInviteSchema, FamilyMemberSchema, FileActiveConversionSchema, FileActiveConversionsErrorSpec, FileBaseSchema, FileBreadcrumbSchema, FileBroadSchema, FileConversionStatusSchema, FileCopyInputSchema, FileExtractionSchema, FileExtractionStatusSchema, FileExtractionsErrorSpec, FileGetChildInputSchema, FileMediaInfoFormatSchema, FileMediaInfoSchema, FileMediaInfoStreamSchema, FileMediaMetadataSchema, FileMp4ErrorSpec, FileMp4MutationErrorSpec, FileQuerySchema, FileSetSortInputSchema, FileSortSchema, FileSubtitleSchema, FileSubtitlesErrorSpec, FileTouchInputSchema, FileTypeSchema, FileUploadErrorSpec, FileWatchStatusErrorSpec, FilesListEnvelopeSchema, FilesListQuerySchema, FilesMoveErrorSchema, FilesSearchQuerySchema, FolderTypeSchema, ForgotPasswordErrorSpec, FriendBaseSchema, FriendInviteJoinedUserSchema, FriendInviteJoinedUserStatusSchema, FriendInviteLookupErrorSpec, FriendInviteSchema, FriendSchema, FriendSharedFolderErrorSpec, GenerateTOTPErrorSpec, GenerateTOTPResponseSchema, GetDownloadLinksErrorSpec, GetEventTorrentErrorSpec, GetFileChildErrorSpec, GetFileErrorSpec, GetHlsMasterPlaylistErrorSpec, GetIftttStatusErrorSpec, GetOAuthAppErrorSpec, GetPaddleBillingInvoiceUrlErrorSpec, GetPaymentInfoErrorSpec, GetPaymentVoucherInfoErrorSpec, GetPublicShareErrorSpec, GetPublicShareFileUrlErrorSpec, GetRssFeedErrorSpec, GetSharedWithErrorSpec, GetSharingCloneInfoErrorSpec, GetTransferErrorSpec, GetTransferTorrentErrorSpec, GetZipErrorSpec, GiftCardLookupErrorSpec, GrantsErrorSpec, HistoryEventSchema, HistoryFileFromRssDeletedEventSchema, HistoryFileSharedEventSchema, HistoryKnownEventTypeSchema, HistoryPrivateTorrentPinEventSchema, HistoryRssFilterPausedEventSchema, HistoryTransferCallbackErrorEventSchema, HistoryTransferCompletedEventSchema, HistoryTransferErrorEventSchema, HistoryTransferFromRssErrorEventSchema, HistoryUploadEventSchema, HistoryVoucherEventSchema, HistoryZipCreatedEventSchema, JoinFamilyErrorSpec, JsonObjectSchema, JsonValueSchema, LinkDeviceErrorSpec, ListAppSpecificPasswordsErrorSpec, ListEventsErrorSpec, ListFamilyInvitesErrorSpec, ListFamilyMembersErrorSpec, ListFriendInvitesErrorSpec, ListFriendsErrorSpec, ListPaymentHistoryErrorSpec, ListPaymentInvitesErrorSpec, ListPaymentOptionsErrorSpec, ListPaymentPlansErrorSpec, ListPublicShareFilesErrorSpec, ListPublicSharesErrorSpec, ListRssFeedItemsErrorSpec, ListRssFeedsErrorSpec, ListSentRequestsErrorSpec, ListSharedFilesErrorSpec, ListTransfersErrorSpec, ListTrashErrorSpec, ListTunnelRoutesErrorSpec, ListWaitingRequestsErrorSpec, ListZipsErrorSpec, LoginErrorSpec, LoginResponseSchema, MyOAuthAppSchema, OAuthAppCreateInputSchema, OAuthAppSchema, OAuthAppSessionSchema, OAuthAppUpdateInputSchema, OAuthAppWithTokenSchema, OAuthAuthorizationCodeExchangeError, OAuthAuthorizationCodeExchangeErrorCodeSchema, OAuthAuthorizationCodeExchangeInputSchema, OAuthSetIconInputSchema, OkResponseSchema, OwnedOAuthAppSchema, PasInfoSchema, PauseRssFeedErrorSpec, PaymentChangePlanPreviewSchema, PaymentChangePlanSubmitSchema, PaymentHistoryItemSchema, PaymentInfoPlanSchema, PaymentInfoSchema, PaymentInviteSchema, PaymentOptionPlanTypeSchema, PaymentOptionSchema, PaymentPlanGroupSchema, PaymentPlanTypeSchema, PaymentProviderNameSchema, PaymentProviderSchema, PaymentSubscriptionInfoSchema, PaymentTypeSchema, PaymentVoucherInfoSchema, PodcastGetLinksInputSchema, PodcastLinkTypeSchema, PodcastLinksSchema, PopularOAuthAppSchema, PreviewPaymentChangePlanErrorSpec, PublicShareListQuerySchema, PublicShareSchema, PutioApiError, PutioAuthError, PutioConfigurationError, PutioContractError, PutioErrorEnvelopeSchema, PutioHttpClient, PutioOperationError, PutioRateLimitError, PutioSdk, PutioSdkConfig, PutioTransportError, PutioValidationError, QueryFilesErrorSpec, QueryOAuthAppsErrorSpec, ReannounceTransferErrorSpec, RecoveryCodesErrorSpec, RedeemPaymentVoucherErrorSpec, RegenerateOAuthAppTokenErrorSpec, RegenerateRecoveryCodesErrorSpec, RegisterErrorSpec, RegisterInputSchema, RemoveFamilyMemberErrorSpec, RemoveFriendErrorSpec, RemoveRateLimitBanErrorSpec, RemoveTransfersErrorSpec, RenameFileErrorSpec, ReportPaymentsErrorSpec, ResetPasswordErrorSpec, RestoreTrashErrorSpec, ResumeRssFeedErrorSpec, RetryAllRssFeedItemsErrorSpec, RetryRssFeedItemErrorSpec, RetryTransferErrorSpec, RevokeAllOAuthClientsErrorSpec, RevokeOAuthClientErrorSpec, RevokeOAuthGrantErrorSpec, RssFeedItemFailedSchema, RssFeedItemSchema, RssFeedItemSucceededSchema, RssFeedParamsSchema, RssFeedSchema, SHARED_WITH_YOU_ROOT_ID, SaveAccountSettingsErrorSpec, SaveAccountSettingsPayloadSchema, SearchFilesErrorSpec, SearchFriendsErrorSpec, SendFriendRequestErrorSpec, SendIftttEventErrorSpec, ShareFilesErrorSpec, SharedFileSchema, SharedFileShareSchema, SharedFileSharedWithSchema, SharingCloneInfoSchema, SharingCloneInputSchema, SharingCloneStatusSchema, SharingShareInputSchema, SharingUnshareInputSchema, StartFromErrorSpec, StopRecordingTransferErrorSpec, StopSubscriptionErrorSpec, SubmitPaymentChangePlanErrorSpec, TouchFilesErrorSpec, TransferAddInputSchema, TransferAddTrackersInputSchema, TransferBaseSchema, TransferRemoveInputSchema, TransferSchema, TransferStatusSchema, TransferTypeSchema, TransfersListQuerySchema, TrashFileSchema, TunnelRouteSchema, TwoFactorRecoveryCodesSchema, UnshareFileErrorSpec, UpdateOAuthAppErrorSpec, UpdateRssFeedErrorSpec, UserSearchResultSchema, UserSubscriptionStatusSchema, ValidateTokenResponseSchema, VerifyTOTPErrorSpec, VerifyTOTPResponseSchema, VoucherLookupErrorSpec, ZipStatusSchema, addManyTransfers, addTransfer, addTransferTrackers, approveFriendRequest, buildAuthLoginUrl, buildFileApiContentUrl, buildFileApiDownloadUrl, buildFileApiMp4DownloadUrl, buildFileHlsStreamUrl, buildFileXspfPlaylistUrl, buildOAuthAppIconRequest, buildOAuthAuthorizeUrl, buildPutioUrl, canWriteFile, cancelTransfers, cancelZip, checkCodeMatch, classifyPaymentChangePlanResponse, cleanTransfers, clearAccount, clearEvents, clearRssFeedLogs, clients, cloneSharedFiles, confirmFastspringOrder, continueFiles, continuePublicShareFiles, continueSearch, continueTransfers, continueTrash, convertFileSelectionToMp4, convertFileToMp4, convertFilesToMp4, copyFile, countTransfers, countWaitingRequests, createAppSpecificPassword, createDownloadLinks, createFamilyInvite, createFileUploadFormData, createFileUploadRequest, createFolder, createFriendInvite, createOAuthApp, createOpenNodeCharge, createPaddleBillingUpdatePaymentMethodTransaction, createPaddleWaitingPayment, createPublicShare, createPutioSdkEffectClient, createPutioSdkPromiseClient, createRssFeed, createZip, decodePutioErrorEnvelope, definePutioOperationErrorSpec, deleteAllAppSpecificPasswords, deleteAppSpecificPassword, deleteConfigKey, deleteEvent, deleteFileExtraction, deleteFileMp4, deleteFileSelection, deleteFiles, deleteOAuthApp, deletePublicShare, deleteRssFeed, deleteTrash, denyFriendRequest, destroyAccount, emptyTrash, encodePathSegment, exchangeOAuthAuthorizationCode, exists, extractFiles, fallbackPutioErrorEnvelope, findNextFile, findNextVideo, forgotPassword, generateTOTP, getAccountInfo, getAccountSettings, getApiContentUrl, getApiDownloadUrl, getApiMp4DownloadUrl, getCode, getConfigKey, getConfigKeyWith, getDownloadLinks, getDownloadUrl, getEventTorrent, getFamilyInvite, getFile, getFileChild, getFriendInvite, getFriendSharedFolder, getGiftCard, getHlsMasterPlaylist, getHlsStreamUrl, getIftttStatus, getMp4Status, getOAuthApp, getPaddleBillingInvoiceUrl, getPaymentInfo, getPaymentVoucherInfo, getPodcastLinks, getPopularOAuthApps, getPublicShare, getPublicShareFileUrl, getRecoveryCodes, getRssFeed, getSharedWith, getSharingCloneInfo, getStartFrom, getTransfer, getTransferInfo, getTransferTorrent, getVoucher, getXspfPlaylistUrl, getZip, grants, isPutioApiError, isPutioAuthError, isPutioConfigurationError, isPutioContractError, isPutioErrorEnvelope, isPutioOperationError, isPutioRateLimitError, isPutioTransportError, isPutioValidationError, joinFamily, linkDevice, listAccountConfirmations, listAccountSubtitleLanguages, listActiveMp4Conversions, listAppSpecificPasswords, listEvents, listFamilyInvites, listFamilyMembers, listFileExtractions, listFileSubtitles, listFriendInvites, listFriends, listPaymentHistory, listPaymentInvites, listPaymentOptions, listPaymentPlans, listPublicShareFiles, listPublicShares, listRssFeedItems, listRssFeeds, listSentRequests, listSharedFiles, listTransfers, listTrash, listTunnelRoutes, listWaitingRequests, listZips, login, logout, makePutioFetchClient, makePutioFetchLayer, makePutioSdkEffectClientLayer, makePutioSdkLiveClientLayer, mapConfigurationError, mapContractError, mapTransportError, mapValidationError, moveFileSelection, moveFiles, normalizePutioSdkOptions, parseErrorBody, pauseRssFeed, previewPaymentChangePlan, putMp4ToMyFiles, putioSdkLayer, putioSdkLiveLayer, queryFiles, queryOAuthApps, readConfig, readConfigWith, reannounceTransfer, redeemPaymentVoucher, regenerateOAuthAppToken, regenerateRecoveryCodes, register, removeFamilyMember, removeFriend, removeRateLimitBan, removeTransfers, renameFile, reportPayments, requestArrayBuffer, requestJson, requestText, requestVoid, resetFileSortSettings, resetPassword, resetStartFrom, responseRateLimitHeaders, restoreTrash, resumeRssFeed, retryAllRssFeedItems, retryRssFeedItem, retryTransfer, revokeAllClients, revokeApp, revokeClient, saveAccountSettings, searchFiles, searchFriends, selectJsonField, selectJsonFields, sendFriendRequest, sendIftttEvent, setConfigKey, setFileSort, setFilesWatchStatus, setOAuthAppIcon, setStartFrom, shareFiles, stopPaymentSubscription, stopTransferRecording, submitPaymentChangePlan, toPutioResponseError, touchFiles, unshareFile, updateOAuthApp, updateRssFeed, uploadFile, validateToken, verifyTOTP, withOperationErrors, writeConfig };
|
|
5754
5792
|
|
|
5755
5793
|
//# sourceMappingURL=index.js.map
|