@putdotio/sdk 10.0.1 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -21
- package/dist/{forms-ByF1AEEn.js → forms-SpjrUB4N.js} +12 -4
- package/dist/forms-SpjrUB4N.js.map +1 -0
- package/dist/{index-DuVB7yhw.d.ts → index-rAQFKGNX.d.ts} +861 -1486
- package/dist/index.d.ts +2 -2
- package/dist/index.js +332 -78
- package/dist/index.js.map +1 -1
- package/dist/utilities.d.ts +1 -2
- package/dist/utilities.js +3 -2
- package/dist/utilities.js.map +1 -1
- package/package.json +12 -11
- package/dist/forms-ByF1AEEn.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as definePutioOperationErrorSpec, B as mapTransportError, C as PutioConfigurationError, D as PutioTransportError, E as PutioRateLimitError, F as isPutioOperationError, H as responseRateLimitHeaders, I as isPutioRateLimitError, L as makeResponseError, M as isPutioApiError, N as isPutioAuthError, O as PutioValidationError, P as isPutioErrorEnvelope, R as mapConfigurationError, S as PutioAuthError, T as PutioOperationError, U as withOperationErrors, V as parseErrorBody, _ as selectJsonFields, a as PutioSdkConfig, b as DEFAULT_PUTIO_WEB_APP_URL, c as makePutioFetchClient, d as makePutioSdkLayer, f as makePutioSdkLiveLayer, g as selectJsonField, h as requestVoid, i as PutioHttpClient, j as fallbackPutioErrorEnvelope, k as decodePutioErrorEnvelope, l as makePutioFetchLayer, m as requestJson, n as toCursorSelectionForm, o as buildPutioUrl, p as requestArrayBuffer, r as OkResponseSchema, s as encodePathSegment, t as joinCsv, u as makePutioSdkConfig, v as DEFAULT_PUTIO_API_BASE_URL, w as PutioErrorEnvelopeSchema, x as PutioApiError, y as DEFAULT_PUTIO_UPLOAD_BASE_URL, z as mapDecodeErrorToValidationError } from "./forms-
|
|
2
|
-
import { Cause, Context, Effect, Exit, Layer, ManagedRuntime, Schema } from "effect";
|
|
1
|
+
import { A as definePutioOperationErrorSpec, B as mapTransportError, C as PutioConfigurationError, D as PutioTransportError, E as PutioRateLimitError, F as isPutioOperationError, H as responseRateLimitHeaders, I as isPutioRateLimitError, L as makeResponseError, M as isPutioApiError, N as isPutioAuthError, O as PutioValidationError, P as isPutioErrorEnvelope, R as mapConfigurationError, S as PutioAuthError, T as PutioOperationError, U as withOperationErrors, V as parseErrorBody, _ as selectJsonFields, a as PutioSdkConfig, b as DEFAULT_PUTIO_WEB_APP_URL, c as makePutioFetchClient, d as makePutioSdkLayer, f as makePutioSdkLiveLayer, g as selectJsonField, h as requestVoid, i as PutioHttpClient, j as fallbackPutioErrorEnvelope, k as decodePutioErrorEnvelope, l as makePutioFetchLayer, m as requestJson, n as toCursorSelectionForm, o as buildPutioUrl, p as requestArrayBuffer, r as OkResponseSchema, s as encodePathSegment, t as joinCsv, u as makePutioSdkConfig, v as DEFAULT_PUTIO_API_BASE_URL, w as PutioErrorEnvelopeSchema, x as PutioApiError, y as DEFAULT_PUTIO_UPLOAD_BASE_URL, z as mapDecodeErrorToValidationError } from "./forms-SpjrUB4N.js";
|
|
2
|
+
import { Cause, Context, Effect, Exit, Layer, ManagedRuntime, Option, Schema, SchemaIssue, SchemaParser } from "effect";
|
|
3
3
|
//#region src/domains/account.ts
|
|
4
4
|
const RequestedFlag$1 = Schema.Literal(1);
|
|
5
5
|
const AccountDiskSchema = Schema.Struct({
|
|
@@ -76,14 +76,14 @@ const AccountInfoQuerySchema = Schema.Struct({
|
|
|
76
76
|
features: Schema.optional(RequestedFlag$1),
|
|
77
77
|
intercom: Schema.optional(RequestedFlag$1),
|
|
78
78
|
pas: Schema.optional(RequestedFlag$1),
|
|
79
|
-
platform: Schema.optional(Schema.
|
|
79
|
+
platform: Schema.optional(Schema.Literals(["web", "ios"])),
|
|
80
80
|
profitwell: Schema.optional(RequestedFlag$1),
|
|
81
81
|
push_token: Schema.optional(RequestedFlag$1)
|
|
82
82
|
});
|
|
83
83
|
const AccountInfoBroadSchema = AccountInfoBaseSchema.pipe(Schema.fieldsAssign({
|
|
84
84
|
download_token: Schema.optional(Schema.String),
|
|
85
85
|
features: Schema.optional(AccountFeaturesSchema),
|
|
86
|
-
paddle_user_id: Schema.optional(Schema.NullOr(Schema.Int)),
|
|
86
|
+
paddle_user_id: Schema.optional(Schema.NullOr(Schema.Union([Schema.Int, Schema.String]))),
|
|
87
87
|
pas: Schema.optional(PasInfoSchema),
|
|
88
88
|
push_token: Schema.optional(Schema.String),
|
|
89
89
|
user_hash: Schema.optional(Schema.String)
|
|
@@ -96,11 +96,19 @@ const AccountSettingsEnvelopeSchema = Schema.Struct({
|
|
|
96
96
|
settings: AccountSettingsSchema,
|
|
97
97
|
status: Schema.Literal("OK")
|
|
98
98
|
});
|
|
99
|
+
const AccountSubtitleLanguageSchema = Schema.Struct({
|
|
100
|
+
code: Schema.String,
|
|
101
|
+
name: Schema.String
|
|
102
|
+
});
|
|
103
|
+
const AccountSubtitleLanguagesEnvelopeSchema = Schema.Struct({
|
|
104
|
+
languages: Schema.Array(AccountSubtitleLanguageSchema),
|
|
105
|
+
status: Schema.Literal("OK")
|
|
106
|
+
});
|
|
99
107
|
const AccountTwoFactorSettingsSchema = Schema.Struct({
|
|
100
108
|
code: Schema.String,
|
|
101
109
|
enable: Schema.Boolean
|
|
102
110
|
});
|
|
103
|
-
const
|
|
111
|
+
const SaveAccountSettingsCommonFields = {
|
|
104
112
|
beta_user: Schema.optional(AccountSettingsFields.beta_user),
|
|
105
113
|
callback_url: Schema.optional(AccountSettingsFields.callback_url),
|
|
106
114
|
dark_theme: Schema.optional(AccountSettingsFields.dark_theme),
|
|
@@ -126,20 +134,24 @@ const AccountSettingsPatchSchema = Schema.Struct({
|
|
|
126
134
|
two_factor_enabled: Schema.optional(AccountSettingsFields.two_factor_enabled),
|
|
127
135
|
use_private_download_ip: Schema.optional(AccountSettingsFields.use_private_download_ip),
|
|
128
136
|
use_start_from: Schema.optional(AccountSettingsFields.use_start_from),
|
|
129
|
-
video_player: Schema.optional(AccountSettingsFields.video_player)
|
|
130
|
-
|
|
137
|
+
video_player: Schema.optional(AccountSettingsFields.video_player),
|
|
138
|
+
two_factor_enabled: Schema.optional(AccountTwoFactorSettingsSchema),
|
|
139
|
+
username: Schema.optional(Schema.String)
|
|
140
|
+
};
|
|
131
141
|
const SaveAccountSettingsPayloadSchema = Schema.Union([
|
|
132
|
-
|
|
133
|
-
Schema.Struct({ username: Schema.String }),
|
|
142
|
+
Schema.Struct(SaveAccountSettingsCommonFields),
|
|
134
143
|
Schema.Struct({
|
|
144
|
+
...SaveAccountSettingsCommonFields,
|
|
135
145
|
current_password: Schema.String,
|
|
136
|
-
mail: Schema.String
|
|
146
|
+
mail: Schema.String,
|
|
147
|
+
password: Schema.optional(Schema.String)
|
|
137
148
|
}),
|
|
138
149
|
Schema.Struct({
|
|
150
|
+
...SaveAccountSettingsCommonFields,
|
|
139
151
|
current_password: Schema.String,
|
|
152
|
+
mail: Schema.optional(Schema.String),
|
|
140
153
|
password: Schema.String
|
|
141
|
-
})
|
|
142
|
-
Schema.Struct({ two_factor_enabled: AccountTwoFactorSettingsSchema })
|
|
154
|
+
})
|
|
143
155
|
]);
|
|
144
156
|
const AccountClearOptionsSchema = Schema.Struct({
|
|
145
157
|
active_transfers: Schema.Boolean,
|
|
@@ -151,13 +163,14 @@ const AccountClearOptionsSchema = Schema.Struct({
|
|
|
151
163
|
rss_logs: Schema.Boolean,
|
|
152
164
|
trash: Schema.Boolean
|
|
153
165
|
});
|
|
166
|
+
const AccountConfirmationSubjectSchema = Schema.Literals([
|
|
167
|
+
"mail_change",
|
|
168
|
+
"password_change",
|
|
169
|
+
"subscription_upgrade"
|
|
170
|
+
]);
|
|
154
171
|
const AccountConfirmationSchema = Schema.Struct({
|
|
155
172
|
created_at: Schema.String,
|
|
156
|
-
subject:
|
|
157
|
-
"mail_change",
|
|
158
|
-
"password_change",
|
|
159
|
-
"subscription_upgrade"
|
|
160
|
-
])
|
|
173
|
+
subject: AccountConfirmationSubjectSchema
|
|
161
174
|
});
|
|
162
175
|
const AccountConfirmationsEnvelopeSchema = Schema.Struct({
|
|
163
176
|
confirmations: Schema.Array(AccountConfirmationSchema),
|
|
@@ -166,9 +179,13 @@ const AccountConfirmationsEnvelopeSchema = Schema.Struct({
|
|
|
166
179
|
const missingFieldError$1 = (field) => new PutioValidationError({ cause: `Expected put.io to include "${field}" because it was requested` });
|
|
167
180
|
const failMissingField$1 = (field) => Effect.fail(missingFieldError$1(field));
|
|
168
181
|
const widenValidationError$1 = (effect) => effect;
|
|
182
|
+
const mapSensitiveAccountDecodeError = (operation) => () => new PutioValidationError({ cause: {
|
|
183
|
+
domain: "account",
|
|
184
|
+
operation,
|
|
185
|
+
reason: "Invalid request input"
|
|
186
|
+
} });
|
|
169
187
|
const hasDownloadToken = (value) => typeof value.download_token === "string";
|
|
170
188
|
const hasFeatures = (value) => typeof value.features === "object" && value.features !== null;
|
|
171
|
-
const hasIntercomUserHash = (value) => typeof value.user_hash === "string";
|
|
172
189
|
const hasPas = (value) => typeof value.pas === "object" && value.pas !== null && typeof value.pas.user_hash === "string";
|
|
173
190
|
const hasPaddleUserId = (value) => "paddle_user_id" in value;
|
|
174
191
|
const hasPushToken = (value) => typeof value.push_token === "string";
|
|
@@ -176,7 +193,6 @@ const ensureAccountInfoFields = (effect, query) => Effect.gen(function* () {
|
|
|
176
193
|
const info = yield* widenValidationError$1(effect);
|
|
177
194
|
if (query.download_token === 1 && !hasDownloadToken(info)) return yield* failMissingField$1("download_token");
|
|
178
195
|
if (query.features === 1 && !hasFeatures(info)) return yield* failMissingField$1("features");
|
|
179
|
-
if (query.intercom === 1 && !hasIntercomUserHash(info)) return yield* failMissingField$1("user_hash");
|
|
180
196
|
if (query.pas === 1 && !hasPas(info)) return yield* failMissingField$1("pas");
|
|
181
197
|
if (query.profitwell === 1 && !hasPaddleUserId(info)) return yield* failMissingField$1("paddle_user_id");
|
|
182
198
|
if (query.push_token === 1 && !hasPushToken(info)) return yield* failMissingField$1("push_token");
|
|
@@ -269,45 +285,141 @@ const AccountConfirmationsErrorSpec = definePutioOperationErrorSpec({
|
|
|
269
285
|
}]
|
|
270
286
|
});
|
|
271
287
|
function getAccountInfo(query = {}) {
|
|
272
|
-
return
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
288
|
+
return Schema.decodeUnknownEffect(AccountInfoQuerySchema, { onExcessProperty: "error" })(query).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedQuery) => {
|
|
289
|
+
const effect = requestJson(AccountInfoEnvelopeSchema, {
|
|
290
|
+
method: "GET",
|
|
291
|
+
path: "/v2/account/info",
|
|
292
|
+
query: decodedQuery
|
|
293
|
+
}).pipe(selectJsonField("info"));
|
|
294
|
+
return ensureAccountInfoFields(effect, decodedQuery);
|
|
295
|
+
}));
|
|
277
296
|
}
|
|
278
297
|
const getAccountSettings = () => requestJson(AccountSettingsEnvelopeSchema, {
|
|
279
298
|
method: "GET",
|
|
280
299
|
path: "/v2/account/settings"
|
|
281
300
|
}).pipe(selectJsonField("settings"));
|
|
282
|
-
const
|
|
301
|
+
const listAccountSubtitleLanguages = () => requestJson(AccountSubtitleLanguagesEnvelopeSchema, {
|
|
302
|
+
method: "GET",
|
|
303
|
+
path: "/v2/account/subtitle_languages"
|
|
304
|
+
}).pipe(selectJsonField("languages"));
|
|
305
|
+
const saveAccountSettings = (payload) => Schema.decodeUnknownEffect(SaveAccountSettingsPayloadSchema, { onExcessProperty: "error" })(payload).pipe(Effect.mapError(mapSensitiveAccountDecodeError("saveSettings")), Effect.flatMap((decodedPayload) => requestJson(OkResponseSchema, {
|
|
283
306
|
body: {
|
|
284
307
|
type: "json",
|
|
285
|
-
value:
|
|
308
|
+
value: decodedPayload
|
|
286
309
|
},
|
|
287
310
|
method: "POST",
|
|
288
311
|
path: "/v2/account/settings"
|
|
289
|
-
})
|
|
290
|
-
const clearAccount = (options) => requestJson(OkResponseSchema, {
|
|
312
|
+
})), withOperationErrors(SaveAccountSettingsErrorSpec));
|
|
313
|
+
const clearAccount = (options) => Schema.decodeUnknownEffect(AccountClearOptionsSchema, { onExcessProperty: "error" })(options).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedOptions) => requestJson(OkResponseSchema, {
|
|
291
314
|
body: {
|
|
292
315
|
type: "form",
|
|
293
|
-
value:
|
|
316
|
+
value: decodedOptions
|
|
294
317
|
},
|
|
295
318
|
method: "POST",
|
|
296
319
|
path: "/v2/account/clear"
|
|
297
|
-
});
|
|
298
|
-
const destroyAccount = (currentPassword) => requestJson(OkResponseSchema, {
|
|
320
|
+
})));
|
|
321
|
+
const destroyAccount = (currentPassword) => Schema.decodeUnknownEffect(Schema.String.check(Schema.isMinLength(1)))(currentPassword).pipe(Effect.mapError(mapSensitiveAccountDecodeError("destroy")), Effect.flatMap((decodedPassword) => requestJson(OkResponseSchema, {
|
|
299
322
|
body: {
|
|
300
323
|
type: "form",
|
|
301
|
-
value: { current_password:
|
|
324
|
+
value: { current_password: decodedPassword }
|
|
302
325
|
},
|
|
303
326
|
method: "POST",
|
|
304
327
|
path: "/v2/account/destroy"
|
|
305
|
-
});
|
|
306
|
-
const listAccountConfirmations = (subject) => requestJson(AccountConfirmationsEnvelopeSchema, {
|
|
328
|
+
})));
|
|
329
|
+
const listAccountConfirmations = (subject) => Schema.decodeUnknownEffect(Schema.UndefinedOr(AccountConfirmationSubjectSchema))(subject).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedSubject) => requestJson(AccountConfirmationsEnvelopeSchema, {
|
|
307
330
|
method: "GET",
|
|
308
331
|
path: "/v2/account/confirmation/list",
|
|
309
|
-
query:
|
|
310
|
-
})
|
|
332
|
+
query: decodedSubject ? { type: decodedSubject } : void 0
|
|
333
|
+
})), selectJsonField("confirmations"), withOperationErrors(AccountConfirmationsErrorSpec));
|
|
334
|
+
//#endregion
|
|
335
|
+
//#region src/domains/app-specific-passwords.ts
|
|
336
|
+
const AppSpecificPasswordIdSchema = Schema.Int.check(Schema.isGreaterThan(0));
|
|
337
|
+
const AppSpecificPasswordNoteSchema = Schema.Trim.check(Schema.isMinLength(1), Schema.isMaxLength(255));
|
|
338
|
+
const MaskedIpv4AddressPattern = /^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)\.){3}XXX$/;
|
|
339
|
+
const Ipv6HextetPattern = /^[\dA-Fa-f]{1,4}$/;
|
|
340
|
+
const isMaskedIpv6Address = (value) => {
|
|
341
|
+
const compressedParts = value.split("::");
|
|
342
|
+
if (compressedParts.length > 2) return false;
|
|
343
|
+
const hextets = compressedParts.flatMap((part) => part === "" ? [] : part.split(":"));
|
|
344
|
+
if (hextets.at(-1) !== "X" || !hextets.slice(0, -1).every((part) => Ipv6HextetPattern.test(part))) return false;
|
|
345
|
+
return compressedParts.length === 2 ? hextets.length < 8 : hextets.length === 8;
|
|
346
|
+
};
|
|
347
|
+
const MaskedIpAddressSchema = Schema.String.check(Schema.makeFilter((value) => MaskedIpv4AddressPattern.test(value) || isMaskedIpv6Address(value) ? void 0 : "Expected a masked IP address"));
|
|
348
|
+
const AppSpecificPasswordSchema = Schema.Struct({
|
|
349
|
+
created_at: Schema.String,
|
|
350
|
+
id: AppSpecificPasswordIdSchema,
|
|
351
|
+
ip_address: Schema.NullOr(MaskedIpAddressSchema),
|
|
352
|
+
last_used_at: Schema.NullOr(Schema.String),
|
|
353
|
+
note: Schema.String
|
|
354
|
+
});
|
|
355
|
+
const CreateAppSpecificPasswordInputSchema = Schema.Struct({ note: AppSpecificPasswordNoteSchema });
|
|
356
|
+
const CreateAppSpecificPasswordEnvelopeSchema = AppSpecificPasswordSchema.pipe(Schema.fieldsAssign({
|
|
357
|
+
password: Schema.String,
|
|
358
|
+
status: Schema.Literal("OK")
|
|
359
|
+
}));
|
|
360
|
+
const ListAppSpecificPasswordsEnvelopeSchema = Schema.Struct({
|
|
361
|
+
passwords: Schema.Array(AppSpecificPasswordSchema),
|
|
362
|
+
status: Schema.Literal("OK")
|
|
363
|
+
});
|
|
364
|
+
const RestrictedAppSpecificPasswordError = {
|
|
365
|
+
errorType: "invalid_scope",
|
|
366
|
+
statusCode: 401
|
|
367
|
+
};
|
|
368
|
+
const CreateAppSpecificPasswordErrorSpec = definePutioOperationErrorSpec({
|
|
369
|
+
domain: "account",
|
|
370
|
+
operation: "appSpecificPasswords.create",
|
|
371
|
+
knownErrors: [
|
|
372
|
+
{
|
|
373
|
+
errorType: "NOTE_REQUIRED",
|
|
374
|
+
statusCode: 400
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
errorType: "NOTE_TOO_LONG",
|
|
378
|
+
statusCode: 400
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
bodySchema: PutioErrorEnvelopeSchema.pipe(Schema.fieldsAssign({ extra: Schema.Struct({ limit: Schema.Int }) })),
|
|
382
|
+
errorType: "TOO_MANY_APP_SPECIFIC_PASSWORDS",
|
|
383
|
+
statusCode: 403
|
|
384
|
+
},
|
|
385
|
+
RestrictedAppSpecificPasswordError
|
|
386
|
+
]
|
|
387
|
+
});
|
|
388
|
+
const ListAppSpecificPasswordsErrorSpec = definePutioOperationErrorSpec({
|
|
389
|
+
domain: "account",
|
|
390
|
+
operation: "appSpecificPasswords.list",
|
|
391
|
+
knownErrors: [RestrictedAppSpecificPasswordError]
|
|
392
|
+
});
|
|
393
|
+
const DeleteAppSpecificPasswordErrorSpec = definePutioOperationErrorSpec({
|
|
394
|
+
domain: "account",
|
|
395
|
+
operation: "appSpecificPasswords.delete",
|
|
396
|
+
knownErrors: [RestrictedAppSpecificPasswordError]
|
|
397
|
+
});
|
|
398
|
+
const DeleteAllAppSpecificPasswordsErrorSpec = definePutioOperationErrorSpec({
|
|
399
|
+
domain: "account",
|
|
400
|
+
operation: "appSpecificPasswords.deleteAll",
|
|
401
|
+
knownErrors: [RestrictedAppSpecificPasswordError]
|
|
402
|
+
});
|
|
403
|
+
const createAppSpecificPassword = (input) => Schema.decodeUnknownEffect(CreateAppSpecificPasswordInputSchema)(input).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(CreateAppSpecificPasswordEnvelopeSchema, {
|
|
404
|
+
body: {
|
|
405
|
+
type: "form",
|
|
406
|
+
value: decodedInput
|
|
407
|
+
},
|
|
408
|
+
method: "POST",
|
|
409
|
+
path: "/v2/app_specific_password/create"
|
|
410
|
+
})), selectJsonFields("created_at", "id", "ip_address", "last_used_at", "note", "password"), withOperationErrors(CreateAppSpecificPasswordErrorSpec));
|
|
411
|
+
const listAppSpecificPasswords = () => requestJson(ListAppSpecificPasswordsEnvelopeSchema, {
|
|
412
|
+
method: "GET",
|
|
413
|
+
path: "/v2/app_specific_password/list"
|
|
414
|
+
}).pipe(selectJsonField("passwords"), withOperationErrors(ListAppSpecificPasswordsErrorSpec));
|
|
415
|
+
const deleteAppSpecificPassword = (id) => Schema.decodeUnknownEffect(AppSpecificPasswordIdSchema)(id).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedId) => requestJson(OkResponseSchema, {
|
|
416
|
+
method: "POST",
|
|
417
|
+
path: `/v2/app_specific_password/${encodePathSegment(decodedId)}/delete`
|
|
418
|
+
})), Effect.asVoid, withOperationErrors(DeleteAppSpecificPasswordErrorSpec));
|
|
419
|
+
const deleteAllAppSpecificPasswords = () => requestJson(OkResponseSchema, {
|
|
420
|
+
method: "POST",
|
|
421
|
+
path: "/v2/app_specific_password/delete_all"
|
|
422
|
+
}).pipe(Effect.asVoid, withOperationErrors(DeleteAllAppSpecificPasswordsErrorSpec));
|
|
311
423
|
//#endregion
|
|
312
424
|
//#region src/domains/oauth.ts
|
|
313
425
|
const OAuthAppBaseSchema = Schema.Struct({
|
|
@@ -1026,65 +1138,193 @@ const regenerateRecoveryCodes = () => requestJson(RecoveryCodesEnvelopeSchema, {
|
|
|
1026
1138
|
}).pipe(selectJsonField("recovery_codes"), withOperationErrors(RegenerateRecoveryCodesErrorSpec));
|
|
1027
1139
|
//#endregion
|
|
1028
1140
|
//#region src/domains/config.ts
|
|
1029
|
-
const
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1141
|
+
const nativeObjectConstructorSource = Function.prototype.toString.call(Object);
|
|
1142
|
+
const nativeArrayConstructorSource = Function.prototype.toString.call(Array);
|
|
1143
|
+
const hasMatchingNativeConstructor = (prototype, constructorSource) => {
|
|
1144
|
+
const constructor = Object.getOwnPropertyDescriptor(prototype, "constructor")?.value;
|
|
1145
|
+
const constructorPrototype = typeof constructor === "function" ? Object.getOwnPropertyDescriptor(constructor, "prototype")?.value : void 0;
|
|
1146
|
+
return typeof constructor === "function" && constructorPrototype === prototype && Function.prototype.toString.call(constructor) === constructorSource;
|
|
1034
1147
|
};
|
|
1035
|
-
const
|
|
1036
|
-
|
|
1037
|
-
const
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
|
|
1148
|
+
const isPlainRecord = (value) => {
|
|
1149
|
+
try {
|
|
1150
|
+
const prototype = Object.getPrototypeOf(value);
|
|
1151
|
+
if (prototype === null) return true;
|
|
1152
|
+
if (Object.getPrototypeOf(prototype) !== null) return false;
|
|
1153
|
+
return hasMatchingNativeConstructor(prototype, nativeObjectConstructorSource);
|
|
1154
|
+
} catch {
|
|
1155
|
+
return false;
|
|
1156
|
+
}
|
|
1157
|
+
};
|
|
1158
|
+
const isPlainArray = (value) => {
|
|
1159
|
+
try {
|
|
1160
|
+
const prototype = Object.getPrototypeOf(value);
|
|
1161
|
+
return prototype !== null && Object.getPrototypeOf(prototype) !== null && hasMatchingNativeConstructor(prototype, nativeArrayConstructorSource);
|
|
1162
|
+
} catch {
|
|
1163
|
+
return false;
|
|
1164
|
+
}
|
|
1165
|
+
};
|
|
1166
|
+
const invalidJsonWalk = { _tag: "Invalid" };
|
|
1167
|
+
const validatedJsonWalk = { _tag: "Validated" };
|
|
1168
|
+
const walkJsonValue = (value, mode, ancestors = /* @__PURE__ */ new Set()) => {
|
|
1169
|
+
if (value === null || typeof value === "string" || typeof value === "boolean") return mode === "snapshot" ? {
|
|
1170
|
+
_tag: "Snapshot",
|
|
1171
|
+
value
|
|
1172
|
+
} : validatedJsonWalk;
|
|
1173
|
+
if (typeof value === "number") return Number.isFinite(value) ? mode === "snapshot" ? {
|
|
1174
|
+
_tag: "Snapshot",
|
|
1175
|
+
value
|
|
1176
|
+
} : validatedJsonWalk : invalidJsonWalk;
|
|
1177
|
+
if (typeof value !== "object" || ancestors.has(value)) return invalidJsonWalk;
|
|
1178
|
+
ancestors.add(value);
|
|
1179
|
+
try {
|
|
1180
|
+
if (Array.isArray(value)) {
|
|
1181
|
+
if (!isPlainArray(value)) return invalidJsonWalk;
|
|
1182
|
+
const descriptors = Object.getOwnPropertyDescriptors(value);
|
|
1183
|
+
const lengthDescriptor = descriptors["length"];
|
|
1184
|
+
if (lengthDescriptor === void 0 || !("value" in lengthDescriptor) || !Number.isSafeInteger(lengthDescriptor.value) || lengthDescriptor.value < 0) return invalidJsonWalk;
|
|
1185
|
+
const output = mode === "snapshot" ? [] : void 0;
|
|
1186
|
+
for (let index = 0; index < lengthDescriptor.value; index += 1) {
|
|
1187
|
+
const descriptor = descriptors[String(index)];
|
|
1188
|
+
if (descriptor === void 0 || !("value" in descriptor)) return invalidJsonWalk;
|
|
1189
|
+
const item = walkJsonValue(descriptor.value, mode, ancestors);
|
|
1190
|
+
if (item._tag === "Invalid") return item;
|
|
1191
|
+
if (output === void 0) {
|
|
1192
|
+
if (item._tag !== "Validated") return invalidJsonWalk;
|
|
1193
|
+
} else {
|
|
1194
|
+
if (item._tag !== "Snapshot") return invalidJsonWalk;
|
|
1195
|
+
output.push(item.value);
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
return output === void 0 ? validatedJsonWalk : {
|
|
1199
|
+
_tag: "Snapshot",
|
|
1200
|
+
value: output
|
|
1201
|
+
};
|
|
1202
|
+
}
|
|
1203
|
+
if (!isPlainRecord(value)) return invalidJsonWalk;
|
|
1204
|
+
const output = mode === "snapshot" ? {} : void 0;
|
|
1205
|
+
for (const [key, descriptor] of Object.entries(Object.getOwnPropertyDescriptors(value))) {
|
|
1206
|
+
if (!descriptor.enumerable) continue;
|
|
1207
|
+
if (!("value" in descriptor)) return invalidJsonWalk;
|
|
1208
|
+
const item = walkJsonValue(descriptor.value, mode, ancestors);
|
|
1209
|
+
if (item._tag === "Invalid") return item;
|
|
1210
|
+
if (output === void 0) {
|
|
1211
|
+
if (item._tag !== "Validated") return invalidJsonWalk;
|
|
1212
|
+
continue;
|
|
1213
|
+
}
|
|
1214
|
+
if (item._tag !== "Snapshot") return invalidJsonWalk;
|
|
1215
|
+
Object.defineProperty(output, key, {
|
|
1216
|
+
configurable: true,
|
|
1217
|
+
enumerable: true,
|
|
1218
|
+
value: item.value,
|
|
1219
|
+
writable: true
|
|
1220
|
+
});
|
|
1221
|
+
}
|
|
1222
|
+
return output === void 0 ? validatedJsonWalk : {
|
|
1223
|
+
_tag: "Snapshot",
|
|
1224
|
+
value: output
|
|
1225
|
+
};
|
|
1226
|
+
} catch {
|
|
1227
|
+
return invalidJsonWalk;
|
|
1228
|
+
} finally {
|
|
1229
|
+
ancestors.delete(value);
|
|
1230
|
+
}
|
|
1231
|
+
};
|
|
1232
|
+
const snapshotJsonValue = (value) => {
|
|
1233
|
+
const result = walkJsonValue(value, "snapshot");
|
|
1234
|
+
return result._tag === "Snapshot" ? result.value : void 0;
|
|
1235
|
+
};
|
|
1236
|
+
const snapshotJsonObject = (value) => {
|
|
1237
|
+
const snapshot = snapshotJsonValue(value);
|
|
1238
|
+
return typeof snapshot === "object" && snapshot !== null && !Array.isArray(snapshot) ? snapshot : void 0;
|
|
1239
|
+
};
|
|
1240
|
+
const isJsonValue = (value) => walkJsonValue(value, "validate")._tag === "Validated";
|
|
1241
|
+
const isJsonObject = (value) => typeof value === "object" && value !== null && isJsonValue(value) && !Array.isArray(value);
|
|
1242
|
+
const JsonValueSchema = Schema.declareConstructor()([], () => (input, ast) => {
|
|
1243
|
+
const snapshot = snapshotJsonValue(input);
|
|
1244
|
+
return snapshot === void 0 ? Effect.fail(new SchemaIssue.InvalidType(ast, Option.none())) : Effect.succeed(snapshot);
|
|
1245
|
+
}, { expected: "a JSON-compatible value" });
|
|
1246
|
+
const JsonValueResponseSchema = Schema.declareConstructor()([], () => (input, ast) => isJsonValue(input) ? Effect.succeed(input) : Effect.fail(new SchemaIssue.InvalidType(ast, Option.none())), { expected: "a JSON-compatible value" });
|
|
1247
|
+
const JsonObjectResponseSchema = Schema.declareConstructor()([], () => (input, ast) => isJsonObject(input) ? Effect.succeed(input) : Effect.fail(new SchemaIssue.InvalidType(ast, Option.none())), { expected: "a JSON object" });
|
|
1248
|
+
const JsonObjectSchema = Schema.declareConstructor()([], () => (input, ast) => {
|
|
1249
|
+
const snapshot = snapshotJsonObject(input);
|
|
1250
|
+
return snapshot === void 0 ? Effect.fail(new SchemaIssue.InvalidType(ast, Option.none())) : Effect.succeed(snapshot);
|
|
1251
|
+
}, { expected: "a JSON object" });
|
|
1252
|
+
const ConfigKeySchema = Schema.String.check(Schema.isMinLength(1), Schema.isPattern(/^(?!\.{1,2}$)/), Schema.makeFilter((key) => key.isWellFormed(), { expected: "a well-formed Unicode config key" }));
|
|
1253
|
+
const ConfigSetKeyInputSchema = Schema.Struct({
|
|
1254
|
+
key: ConfigKeySchema,
|
|
1044
1255
|
value: JsonValueSchema
|
|
1045
1256
|
});
|
|
1257
|
+
const getResponseEnvelopeFields = (input, valueField) => {
|
|
1258
|
+
if (typeof input !== "object" || input === null || !isPlainRecord(input)) return;
|
|
1259
|
+
try {
|
|
1260
|
+
const statusDescriptor = Object.getOwnPropertyDescriptor(input, "status");
|
|
1261
|
+
const valueDescriptor = Object.getOwnPropertyDescriptor(input, valueField);
|
|
1262
|
+
if (statusDescriptor === void 0 || !("value" in statusDescriptor) || valueDescriptor === void 0 || !("value" in valueDescriptor)) return;
|
|
1263
|
+
return {
|
|
1264
|
+
status: statusDescriptor.value,
|
|
1265
|
+
value: valueDescriptor.value
|
|
1266
|
+
};
|
|
1267
|
+
} catch {
|
|
1268
|
+
return;
|
|
1269
|
+
}
|
|
1270
|
+
};
|
|
1271
|
+
const makeConfigEnvelopeSchema = (schema) => Schema.declareConstructor()([schema], ([configSchema]) => (input, ast, options) => {
|
|
1272
|
+
const fields = getResponseEnvelopeFields(input, "config");
|
|
1273
|
+
if (fields === void 0 || fields.status !== "OK") return Effect.fail(new SchemaIssue.InvalidType(ast, Option.none()));
|
|
1274
|
+
return SchemaParser.decodeUnknownEffect(configSchema)(fields.value, options).pipe(Effect.map((config) => ({
|
|
1275
|
+
config,
|
|
1276
|
+
status: "OK"
|
|
1277
|
+
})));
|
|
1278
|
+
});
|
|
1279
|
+
const makeConfigValueEnvelopeSchema = (schema) => Schema.declareConstructor()([schema], ([valueSchema]) => (input, ast, options) => {
|
|
1280
|
+
const fields = getResponseEnvelopeFields(input, "value");
|
|
1281
|
+
if (fields === void 0 || fields.status !== "OK") return Effect.fail(new SchemaIssue.InvalidType(ast, Option.none()));
|
|
1282
|
+
return SchemaParser.decodeUnknownEffect(valueSchema)(fields.value, options).pipe(Effect.map((value) => ({
|
|
1283
|
+
status: "OK",
|
|
1284
|
+
value
|
|
1285
|
+
})));
|
|
1286
|
+
});
|
|
1287
|
+
const ConfigEnvelopeSchema = makeConfigEnvelopeSchema(JsonObjectResponseSchema);
|
|
1288
|
+
const ConfigValueEnvelopeSchema = makeConfigValueEnvelopeSchema(JsonValueResponseSchema);
|
|
1046
1289
|
const readConfig = () => requestJson(ConfigEnvelopeSchema, {
|
|
1047
1290
|
method: "GET",
|
|
1048
1291
|
path: "/v2/config"
|
|
1049
1292
|
}).pipe(selectJsonField("config"));
|
|
1050
|
-
const readConfigWith = (schema) => requestJson(Schema.
|
|
1051
|
-
config: schema,
|
|
1052
|
-
status: Schema.Literal("OK")
|
|
1053
|
-
}), {
|
|
1293
|
+
const readConfigWith = (schema) => requestJson(makeConfigEnvelopeSchema(JsonObjectResponseSchema.pipe(Schema.decodeTo(schema))), {
|
|
1054
1294
|
method: "GET",
|
|
1055
1295
|
path: "/v2/config"
|
|
1056
1296
|
}).pipe(Effect.map((envelope) => envelope["config"]));
|
|
1057
|
-
const writeConfig = (config) => requestJson(OkResponseSchema, {
|
|
1297
|
+
const writeConfig = (config) => Schema.decodeUnknownEffect(JsonObjectSchema)(config).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedConfig) => requestJson(OkResponseSchema, {
|
|
1058
1298
|
body: {
|
|
1059
1299
|
type: "json",
|
|
1060
|
-
value: { config }
|
|
1300
|
+
value: { config: decodedConfig }
|
|
1061
1301
|
},
|
|
1062
1302
|
method: "PUT",
|
|
1063
1303
|
path: "/v2/config"
|
|
1064
|
-
});
|
|
1065
|
-
const getConfigKey = (key) => requestJson(ConfigValueEnvelopeSchema, {
|
|
1304
|
+
})));
|
|
1305
|
+
const getConfigKey = (key) => Schema.decodeUnknownEffect(ConfigKeySchema)(key).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedKey) => requestJson(ConfigValueEnvelopeSchema, {
|
|
1066
1306
|
method: "GET",
|
|
1067
|
-
path: `/v2/config/${encodePathSegment(
|
|
1068
|
-
})
|
|
1069
|
-
const getConfigKeyWith = (key, schema) => requestJson(Schema.
|
|
1070
|
-
status: Schema.Literal("OK"),
|
|
1071
|
-
value: schema
|
|
1072
|
-
}), {
|
|
1307
|
+
path: `/v2/config/${encodePathSegment(decodedKey)}`
|
|
1308
|
+
})), selectJsonField("value"));
|
|
1309
|
+
const getConfigKeyWith = (key, schema) => Schema.decodeUnknownEffect(ConfigKeySchema)(key).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedKey) => requestJson(makeConfigValueEnvelopeSchema(JsonValueResponseSchema.pipe(Schema.decodeTo(schema))), {
|
|
1073
1310
|
method: "GET",
|
|
1074
|
-
path: `/v2/config/${encodePathSegment(
|
|
1075
|
-
})
|
|
1076
|
-
const setConfigKey = (key, value) =>
|
|
1311
|
+
path: `/v2/config/${encodePathSegment(decodedKey)}`
|
|
1312
|
+
})), Effect.map((envelope) => envelope["value"]));
|
|
1313
|
+
const setConfigKey = (key, value) => Schema.decodeUnknownEffect(ConfigSetKeyInputSchema)({
|
|
1314
|
+
key,
|
|
1315
|
+
value
|
|
1316
|
+
}).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedInput) => requestJson(OkResponseSchema, {
|
|
1077
1317
|
body: {
|
|
1078
1318
|
type: "json",
|
|
1079
|
-
value: { value }
|
|
1319
|
+
value: { value: decodedInput.value }
|
|
1080
1320
|
},
|
|
1081
1321
|
method: "PUT",
|
|
1082
|
-
path: `/v2/config/${encodePathSegment(key)}`
|
|
1083
|
-
});
|
|
1084
|
-
const deleteConfigKey = (key) => requestJson(OkResponseSchema, {
|
|
1322
|
+
path: `/v2/config/${encodePathSegment(decodedInput.key)}`
|
|
1323
|
+
})));
|
|
1324
|
+
const deleteConfigKey = (key) => Schema.decodeUnknownEffect(ConfigKeySchema)(key).pipe(Effect.mapError(mapDecodeErrorToValidationError), Effect.flatMap((decodedKey) => requestJson(OkResponseSchema, {
|
|
1085
1325
|
method: "DELETE",
|
|
1086
|
-
path: `/v2/config/${encodePathSegment(
|
|
1087
|
-
});
|
|
1326
|
+
path: `/v2/config/${encodePathSegment(decodedKey)}`
|
|
1327
|
+
})));
|
|
1088
1328
|
//#endregion
|
|
1089
1329
|
//#region src/domains/download-links.ts
|
|
1090
1330
|
const DownloadLinksStatusSchema = Schema.Literals([
|
|
@@ -1711,7 +1951,7 @@ const FileConversionNotAvailableSchema = Schema.Struct({
|
|
|
1711
1951
|
});
|
|
1712
1952
|
const FileConversionInQueueSchema = Schema.Struct({
|
|
1713
1953
|
id: Schema.Int,
|
|
1714
|
-
percent_done: Schema.Number.check(Schema.isGreaterThanOrEqualTo(0)),
|
|
1954
|
+
percent_done: Schema.optional(Schema.Number.check(Schema.isGreaterThanOrEqualTo(0))),
|
|
1715
1955
|
status: Schema.Literal("IN_QUEUE")
|
|
1716
1956
|
});
|
|
1717
1957
|
const FileConversionConvertingSchema = Schema.Struct({
|
|
@@ -2256,10 +2496,10 @@ const setStartFrom = (input) => requestJson(OkResponseSchema, {
|
|
|
2256
2496
|
value: { time: input.time }
|
|
2257
2497
|
},
|
|
2258
2498
|
method: "POST",
|
|
2259
|
-
path: `/v2/files/${encodePathSegment(input.file_id)}/start-from
|
|
2499
|
+
path: `/v2/files/${encodePathSegment(input.file_id)}/start-from`
|
|
2260
2500
|
}).pipe(withOperationErrors(StartFromErrorSpec));
|
|
2261
2501
|
const resetStartFrom = (fileId) => requestJson(OkResponseSchema, {
|
|
2262
|
-
method: "
|
|
2502
|
+
method: "POST",
|
|
2263
2503
|
path: `/v2/files/${encodePathSegment(fileId)}/start-from/delete`
|
|
2264
2504
|
}).pipe(withOperationErrors(StartFromErrorSpec));
|
|
2265
2505
|
const getMp4Status = (fileId) => requestJson(FileConversionStatusEnvelopeSchema, {
|
|
@@ -4658,10 +4898,17 @@ const rejectWithSdkFailure = (exit) => Exit.match(exit, {
|
|
|
4658
4898
|
const provideSdk = async (config, effect) => rejectWithSdkFailure(await getPromiseClientRuntime(config).runPromiseExit(effect));
|
|
4659
4899
|
const createPutioSdkEffectClient = () => ({
|
|
4660
4900
|
account: {
|
|
4901
|
+
appSpecificPasswords: {
|
|
4902
|
+
create: createAppSpecificPassword,
|
|
4903
|
+
delete: deleteAppSpecificPassword,
|
|
4904
|
+
deleteAll: deleteAllAppSpecificPasswords,
|
|
4905
|
+
list: listAppSpecificPasswords
|
|
4906
|
+
},
|
|
4661
4907
|
clear: clearAccount,
|
|
4662
4908
|
destroy: destroyAccount,
|
|
4663
4909
|
getInfo: getAccountInfo,
|
|
4664
4910
|
getSettings: getAccountSettings,
|
|
4911
|
+
listSubtitleLanguages: listAccountSubtitleLanguages,
|
|
4665
4912
|
listConfirmations: listAccountConfirmations,
|
|
4666
4913
|
saveSettings: saveAccountSettings
|
|
4667
4914
|
},
|
|
@@ -4880,7 +5127,7 @@ const makePutioSdkEffectClientLayer = () => Layer.succeed(PutioSdk, createPutioS
|
|
|
4880
5127
|
const makePutioSdkLiveClientLayer = (config) => Layer.mergeAll(makePutioSdkEffectClientLayer(), makePutioSdkLiveLayer(config));
|
|
4881
5128
|
const createPutioSdkPromiseClient = (initialConfig = {}) => {
|
|
4882
5129
|
const config = { ...initialConfig };
|
|
4883
|
-
function getInfo(query) {
|
|
5130
|
+
function getInfo(query = {}) {
|
|
4884
5131
|
return provideSdk(config, getAccountInfo(query));
|
|
4885
5132
|
}
|
|
4886
5133
|
function getFileById(input) {
|
|
@@ -4889,10 +5136,17 @@ const createPutioSdkPromiseClient = (initialConfig = {}) => {
|
|
|
4889
5136
|
return {
|
|
4890
5137
|
dispose: () => disposePromiseClientRuntime(config),
|
|
4891
5138
|
account: {
|
|
5139
|
+
appSpecificPasswords: {
|
|
5140
|
+
create: (input) => provideSdk(config, createAppSpecificPassword(input)),
|
|
5141
|
+
delete: (id) => provideSdk(config, deleteAppSpecificPassword(id)),
|
|
5142
|
+
deleteAll: () => provideSdk(config, deleteAllAppSpecificPasswords()),
|
|
5143
|
+
list: () => provideSdk(config, listAppSpecificPasswords())
|
|
5144
|
+
},
|
|
4892
5145
|
clear: (options) => provideSdk(config, clearAccount(options)),
|
|
4893
5146
|
destroy: (currentPassword) => provideSdk(config, destroyAccount(currentPassword)),
|
|
4894
5147
|
getInfo,
|
|
4895
5148
|
getSettings: () => provideSdk(config, getAccountSettings()),
|
|
5149
|
+
listSubtitleLanguages: () => provideSdk(config, listAccountSubtitleLanguages()),
|
|
4896
5150
|
listConfirmations: (subject) => provideSdk(config, listAccountConfirmations(subject)),
|
|
4897
5151
|
saveSettings: (payload) => provideSdk(config, saveAccountSettings(payload))
|
|
4898
5152
|
},
|
|
@@ -5109,6 +5363,6 @@ const createPutioSdkPromiseClient = (initialConfig = {}) => {
|
|
|
5109
5363
|
};
|
|
5110
5364
|
};
|
|
5111
5365
|
//#endregion
|
|
5112
|
-
export { AccountClearOptionsSchema, AccountConfirmationSchema, AccountConfirmationsErrorSpec, AccountDiskSchema, AccountInfoBaseSchema, AccountInfoBroadSchema, AccountInfoQuerySchema, AccountSettingsSchema, AccountTwoFactorSettingsSchema, AccountWarningsSchema, AddManyTransfersErrorSpec, AddTransferErrorSpec, ApproveFriendRequestErrorSpec, AuthorizationCodeSchema, CancelZipErrorSpec, ClearEventsErrorSpec, ClearRssFeedLogsErrorSpec, ClientsErrorSpec, ConfirmFastspringOrderErrorSpec, ContinueFilesErrorSpec, ContinuePublicShareFilesErrorSpec, ContinueTrashErrorSpec, CountWaitingRequestsErrorSpec, CreateCoinbaseChargeErrorSpec, CreateDownloadLinksErrorSpec, CreateFamilyInviteErrorSpec, CreateFolderErrorSpec, CreateFriendInviteErrorSpec, CreateOAuthAppErrorSpec, CreateOpenNodeChargeErrorSpec, CreatePaddleBillingUpdatePaymentMethodTransactionErrorSpec, CreatePaddleWaitingPaymentErrorSpec, CreatePublicShareErrorSpec, CreateRssFeedErrorSpec, CreateSharingCloneErrorSpec, CreateZipErrorSpec, DEFAULT_PUTIO_API_BASE_URL, DEFAULT_PUTIO_UPLOAD_BASE_URL, DEFAULT_PUTIO_WEB_APP_URL, DeleteEventErrorSpec, DeleteOAuthAppErrorSpec, DeletePublicShareErrorSpec, DeleteRssFeedErrorSpec, DeleteTrashErrorSpec, DenyFriendRequestErrorSpec, DownloadLinksCreateInputSchema, DownloadLinksInfoSchema, DownloadLinksPayloadSchema, DownloadLinksStatusSchema, DownloadUrlErrorSpec, EmptyTrashErrorSpec, EventsListQuerySchema, FamilyInviteLookupErrorSpec, FamilyInviteSchema, FamilyMemberSchema, FileActiveConversionSchema, FileActiveConversionsErrorSpec, FileBaseSchema, FileBreadcrumbSchema, FileBroadSchema, FileConversionStatusSchema, FileExtractionSchema, FileExtractionStatusSchema, FileExtractionsErrorSpec, FileMediaInfoFormatSchema, FileMediaInfoSchema, FileMediaInfoStreamSchema, FileMediaMetadataSchema, FileMp4ErrorSpec, FileMp4MutationErrorSpec, FileQuerySchema, FileSortSchema, FileSubtitleSchema, FileSubtitlesErrorSpec, FileTypeSchema, FileUploadErrorSpec, FileWatchStatusErrorSpec, FilesListEnvelopeSchema, FilesListQuerySchema, FilesMoveErrorSchema, FilesSearchQuerySchema, FolderTypeSchema, ForgotPasswordErrorSpec, FriendBaseSchema, FriendInviteJoinedUserSchema, FriendInviteJoinedUserStatusSchema, FriendInviteLookupErrorSpec, FriendInviteSchema, FriendSchema, FriendSharedFolderErrorSpec, GenerateTOTPErrorSpec, GenerateTOTPResponseSchema, GetDownloadLinksErrorSpec, GetEventTorrentErrorSpec, GetFileErrorSpec, GetIftttStatusErrorSpec, GetOAuthAppErrorSpec, GetPaddleBillingInvoiceUrlErrorSpec, GetPaymentInfoErrorSpec, GetPaymentVoucherInfoErrorSpec, GetPublicShareErrorSpec, GetPublicShareFileUrlErrorSpec, GetRssFeedErrorSpec, GetSharedWithErrorSpec, GetSharingCloneInfoErrorSpec, GetTransferErrorSpec, GetZipErrorSpec, GiftCardLookupErrorSpec, GrantsErrorSpec, HistoryEventSchema, HistoryFileFromRssDeletedEventSchema, HistoryFileSharedEventSchema, HistoryKnownEventTypeSchema, HistoryPrivateTorrentPinEventSchema, HistoryRssFilterPausedEventSchema, HistoryTransferCallbackErrorEventSchema, HistoryTransferCompletedEventSchema, HistoryTransferErrorEventSchema, HistoryTransferFromRssErrorEventSchema, HistoryUploadEventSchema, HistoryVoucherEventSchema, HistoryZipCreatedEventSchema, JoinFamilyErrorSpec, JsonObjectSchema, JsonValueSchema, LinkDeviceErrorSpec, ListEventsErrorSpec, ListFamilyInvitesErrorSpec, ListFamilyMembersErrorSpec, ListFriendInvitesErrorSpec, ListFriendsErrorSpec, ListPaymentHistoryErrorSpec, ListPaymentInvitesErrorSpec, ListPaymentOptionsErrorSpec, ListPaymentPlansErrorSpec, ListPublicShareFilesErrorSpec, ListPublicSharesErrorSpec, ListRssFeedItemsErrorSpec, ListRssFeedsErrorSpec, ListSentRequestsErrorSpec, ListSharedFilesErrorSpec, ListTransfersErrorSpec, ListTrashErrorSpec, ListTunnelRoutesErrorSpec, ListWaitingRequestsErrorSpec, ListZipsErrorSpec, LoginErrorSpec, LoginResponseSchema, MyOAuthAppSchema, OAuthAppCreateInputSchema, OAuthAppSchema, OAuthAppSessionSchema, OAuthAppUpdateInputSchema, OAuthAppWithTokenSchema, OAuthSetIconInputSchema, OkResponseSchema, OwnedOAuthAppSchema, PasInfoSchema, PauseRssFeedErrorSpec, PaymentChangePlanPreviewSchema, PaymentChangePlanSubmitSchema, PaymentHistoryItemSchema, PaymentInfoPlanSchema, PaymentInfoSchema, PaymentInviteSchema, PaymentOptionPlanTypeSchema, PaymentOptionSchema, PaymentPlanGroupSchema, PaymentPlanTypeSchema, PaymentProviderNameSchema, PaymentProviderSchema, PaymentSubscriptionInfoSchema, PaymentTypeSchema, PaymentVoucherInfoSchema, PopularOAuthAppSchema, PreviewPaymentChangePlanErrorSpec, PublicShareListQuerySchema, PublicShareSchema, PutioApiError, PutioAuthError, PutioConfigurationError, PutioErrorEnvelopeSchema, PutioHttpClient, PutioOperationError, PutioRateLimitError, PutioSdk, PutioSdkConfig, PutioTransportError, PutioValidationError, QueryFilesErrorSpec, QueryOAuthAppsErrorSpec, ReannounceTransferErrorSpec, RecoveryCodesErrorSpec, RedeemPaymentVoucherErrorSpec, RegenerateOAuthAppTokenErrorSpec, RegenerateRecoveryCodesErrorSpec, RegisterErrorSpec, RegisterInputSchema, RemoveFamilyMemberErrorSpec, RemoveFriendErrorSpec, RenameFileErrorSpec, ReportPaymentsErrorSpec, ResetPasswordErrorSpec, RestoreTrashErrorSpec, ResumeRssFeedErrorSpec, RetryAllRssFeedItemsErrorSpec, RetryRssFeedItemErrorSpec, RetryTransferErrorSpec, RevokeAllOAuthClientsErrorSpec, RevokeOAuthClientErrorSpec, RevokeOAuthGrantErrorSpec, RssFeedItemFailedSchema, RssFeedItemSchema, RssFeedItemSucceededSchema, RssFeedParamsSchema, RssFeedSchema, SaveAccountSettingsErrorSpec, SaveAccountSettingsPayloadSchema, SearchFilesErrorSpec, SearchFriendsErrorSpec, SendFriendRequestErrorSpec, SendIftttEventErrorSpec, ShareFilesErrorSpec, SharedFileSchema, SharedFileShareSchema, SharedFileSharedWithSchema, SharingCloneInfoSchema, SharingCloneInputSchema, SharingCloneStatusSchema, SharingShareInputSchema, SharingUnshareInputSchema, StartFromErrorSpec, StopRecordingTransferErrorSpec, StopSubscriptionErrorSpec, SubmitPaymentChangePlanErrorSpec, TransferAddInputSchema, TransferBaseSchema, TransferSchema, TransferStatusSchema, TransferTypeSchema, TransfersListQuerySchema, TrashFileSchema, TunnelRouteSchema, TwoFactorRecoveryCodesSchema, UnshareFileErrorSpec, UpdateOAuthAppErrorSpec, UpdateRssFeedErrorSpec, UserSearchResultSchema, UserSubscriptionStatusSchema, ValidateTokenResponseSchema, VerifyTOTPErrorSpec, VerifyTOTPResponseSchema, VoucherLookupErrorSpec, ZipStatusSchema, addManyTransfers, addTransfer, approveFriendRequest, buildAuthLoginUrl, buildFileApiContentUrl, buildFileApiDownloadUrl, buildFileApiMp4DownloadUrl, buildFileHlsStreamUrl, buildOAuthAppIconUrl, buildOAuthAuthorizeUrl, buildPutioUrl, cancelTransfers, cancelZip, checkCodeMatch, classifyPaymentChangePlanResponse, cleanTransfers, clearAccount, clearEvents, clearRssFeedLogs, clients, cloneSharedFiles, confirmFastspringOrder, continueFiles, continuePublicShareFiles, continueSearch, continueTransfers, continueTrash, convertFileSelectionToMp4, convertFileToMp4, convertFilesToMp4, countTransfers, countWaitingRequests, createCoinbaseCharge, createDownloadLinks, createFamilyInvite, createFileUploadFormData, createFileUploadRequest, createFolder, createFriendInvite, createOAuthApp, createOpenNodeCharge, createPaddleBillingUpdatePaymentMethodTransaction, createPaddleWaitingPayment, createPublicShare, createPutioSdkEffectClient, createPutioSdkPromiseClient, createRssFeed, createZip, decodePutioErrorEnvelope, definePutioOperationErrorSpec, deleteConfigKey, deleteEvent, deleteFileExtraction, deleteFileMp4, deleteFileSelection, deleteFiles, deleteOAuthApp, deletePublicShare, deleteRssFeed, deleteTrash, denyFriendRequest, destroyAccount, emptyTrash, encodePathSegment, exists, extractFiles, fallbackPutioErrorEnvelope, findNextFile, findNextVideo, forgotPassword, generateTOTP, getAccountInfo, getAccountSettings, getApiContentUrl, getApiDownloadUrl, getApiMp4DownloadUrl, getCode, getConfigKey, getConfigKeyWith, getDownloadLinks, getDownloadUrl, getEventTorrent, getFamilyInvite, getFile, getFriendInvite, getFriendSharedFolder, getGiftCard, getHlsStreamUrl, getIftttStatus, getMp4Status, getOAuthApp, getPaddleBillingInvoiceUrl, getPaymentInfo, getPaymentVoucherInfo, getPopularOAuthApps, getPublicShare, getPublicShareFileUrl, getRecoveryCodes, getRssFeed, getSharedWith, getSharingCloneInfo, getStartFrom, getTransfer, getTransferInfo, getVoucher, getZip, grants, isPutioApiError, isPutioAuthError, isPutioErrorEnvelope, isPutioOperationError, isPutioRateLimitError, joinFamily, linkDevice, listAccountConfirmations, listActiveMp4Conversions, listEvents, listFamilyInvites, listFamilyMembers, listFileExtractions, listFileSubtitles, listFriendInvites, listFriends, listPaymentHistory, listPaymentInvites, listPaymentOptions, listPaymentPlans, listPublicShareFiles, listPublicShares, listRssFeedItems, listRssFeeds, listSentRequests, listSharedFiles, listTransfers, listTrash, listTunnelRoutes, listWaitingRequests, listZips, login, logout, makePutioFetchClient, makePutioFetchLayer, makePutioSdkConfig, makePutioSdkEffectClientLayer, makePutioSdkLayer, makePutioSdkLiveClientLayer, makePutioSdkLiveLayer, makeResponseError, mapConfigurationError, mapDecodeErrorToValidationError, mapTransportError, moveFileSelection, moveFiles, parseErrorBody, pauseRssFeed, previewPaymentChangePlan, putMp4ToMyFiles, queryFiles, queryOAuthApps, readConfig, readConfigWith, reannounceTransfer, redeemPaymentVoucher, regenerateOAuthAppToken, regenerateRecoveryCodes, register, removeFamilyMember, removeFriend, renameFile, reportPayments, requestArrayBuffer, requestJson, requestVoid, resetPassword, resetStartFrom, responseRateLimitHeaders, restoreTrash, resumeRssFeed, retryAllRssFeedItems, retryRssFeedItem, retryTransfer, revokeAllClients, revokeApp, revokeClient, saveAccountSettings, searchFiles, searchFriends, selectJsonField, selectJsonFields, sendFriendRequest, sendIftttEvent, setConfigKey, setFilesWatchStatus, setOAuthAppIcon, setStartFrom, shareFiles, stopPaymentSubscription, stopTransferRecording, submitPaymentChangePlan, unshareFile, updateOAuthApp, updateRssFeed, uploadFile, validateToken, verifyTOTP, withOperationErrors, writeConfig };
|
|
5366
|
+
export { AccountClearOptionsSchema, AccountConfirmationSchema, AccountConfirmationsErrorSpec, AccountDiskSchema, AccountInfoBaseSchema, AccountInfoBroadSchema, AccountInfoQuerySchema, AccountSettingsSchema, AccountSubtitleLanguageSchema, AccountTwoFactorSettingsSchema, AccountWarningsSchema, AddManyTransfersErrorSpec, AddTransferErrorSpec, AppSpecificPasswordSchema, ApproveFriendRequestErrorSpec, AuthorizationCodeSchema, CancelZipErrorSpec, ClearEventsErrorSpec, ClearRssFeedLogsErrorSpec, ClientsErrorSpec, ConfirmFastspringOrderErrorSpec, ContinueFilesErrorSpec, ContinuePublicShareFilesErrorSpec, ContinueTrashErrorSpec, CountWaitingRequestsErrorSpec, CreateAppSpecificPasswordErrorSpec, CreateAppSpecificPasswordInputSchema, CreateCoinbaseChargeErrorSpec, CreateDownloadLinksErrorSpec, CreateFamilyInviteErrorSpec, CreateFolderErrorSpec, CreateFriendInviteErrorSpec, CreateOAuthAppErrorSpec, CreateOpenNodeChargeErrorSpec, CreatePaddleBillingUpdatePaymentMethodTransactionErrorSpec, CreatePaddleWaitingPaymentErrorSpec, CreatePublicShareErrorSpec, CreateRssFeedErrorSpec, CreateSharingCloneErrorSpec, CreateZipErrorSpec, DEFAULT_PUTIO_API_BASE_URL, DEFAULT_PUTIO_UPLOAD_BASE_URL, DEFAULT_PUTIO_WEB_APP_URL, DeleteAllAppSpecificPasswordsErrorSpec, DeleteAppSpecificPasswordErrorSpec, DeleteEventErrorSpec, DeleteOAuthAppErrorSpec, DeletePublicShareErrorSpec, DeleteRssFeedErrorSpec, DeleteTrashErrorSpec, DenyFriendRequestErrorSpec, DownloadLinksCreateInputSchema, DownloadLinksInfoSchema, DownloadLinksPayloadSchema, DownloadLinksStatusSchema, DownloadUrlErrorSpec, EmptyTrashErrorSpec, EventsListQuerySchema, FamilyInviteLookupErrorSpec, FamilyInviteSchema, FamilyMemberSchema, FileActiveConversionSchema, FileActiveConversionsErrorSpec, FileBaseSchema, FileBreadcrumbSchema, FileBroadSchema, FileConversionStatusSchema, FileExtractionSchema, FileExtractionStatusSchema, FileExtractionsErrorSpec, FileMediaInfoFormatSchema, FileMediaInfoSchema, FileMediaInfoStreamSchema, FileMediaMetadataSchema, FileMp4ErrorSpec, FileMp4MutationErrorSpec, FileQuerySchema, FileSortSchema, FileSubtitleSchema, FileSubtitlesErrorSpec, FileTypeSchema, FileUploadErrorSpec, FileWatchStatusErrorSpec, FilesListEnvelopeSchema, FilesListQuerySchema, FilesMoveErrorSchema, FilesSearchQuerySchema, FolderTypeSchema, ForgotPasswordErrorSpec, FriendBaseSchema, FriendInviteJoinedUserSchema, FriendInviteJoinedUserStatusSchema, FriendInviteLookupErrorSpec, FriendInviteSchema, FriendSchema, FriendSharedFolderErrorSpec, GenerateTOTPErrorSpec, GenerateTOTPResponseSchema, GetDownloadLinksErrorSpec, GetEventTorrentErrorSpec, GetFileErrorSpec, GetIftttStatusErrorSpec, GetOAuthAppErrorSpec, GetPaddleBillingInvoiceUrlErrorSpec, GetPaymentInfoErrorSpec, GetPaymentVoucherInfoErrorSpec, GetPublicShareErrorSpec, GetPublicShareFileUrlErrorSpec, GetRssFeedErrorSpec, GetSharedWithErrorSpec, GetSharingCloneInfoErrorSpec, GetTransferErrorSpec, GetZipErrorSpec, GiftCardLookupErrorSpec, GrantsErrorSpec, HistoryEventSchema, HistoryFileFromRssDeletedEventSchema, HistoryFileSharedEventSchema, HistoryKnownEventTypeSchema, HistoryPrivateTorrentPinEventSchema, HistoryRssFilterPausedEventSchema, HistoryTransferCallbackErrorEventSchema, HistoryTransferCompletedEventSchema, HistoryTransferErrorEventSchema, HistoryTransferFromRssErrorEventSchema, HistoryUploadEventSchema, HistoryVoucherEventSchema, HistoryZipCreatedEventSchema, JoinFamilyErrorSpec, JsonObjectSchema, JsonValueSchema, LinkDeviceErrorSpec, ListAppSpecificPasswordsErrorSpec, ListEventsErrorSpec, ListFamilyInvitesErrorSpec, ListFamilyMembersErrorSpec, ListFriendInvitesErrorSpec, ListFriendsErrorSpec, ListPaymentHistoryErrorSpec, ListPaymentInvitesErrorSpec, ListPaymentOptionsErrorSpec, ListPaymentPlansErrorSpec, ListPublicShareFilesErrorSpec, ListPublicSharesErrorSpec, ListRssFeedItemsErrorSpec, ListRssFeedsErrorSpec, ListSentRequestsErrorSpec, ListSharedFilesErrorSpec, ListTransfersErrorSpec, ListTrashErrorSpec, ListTunnelRoutesErrorSpec, ListWaitingRequestsErrorSpec, ListZipsErrorSpec, LoginErrorSpec, LoginResponseSchema, MyOAuthAppSchema, OAuthAppCreateInputSchema, OAuthAppSchema, OAuthAppSessionSchema, OAuthAppUpdateInputSchema, OAuthAppWithTokenSchema, OAuthSetIconInputSchema, OkResponseSchema, OwnedOAuthAppSchema, PasInfoSchema, PauseRssFeedErrorSpec, PaymentChangePlanPreviewSchema, PaymentChangePlanSubmitSchema, PaymentHistoryItemSchema, PaymentInfoPlanSchema, PaymentInfoSchema, PaymentInviteSchema, PaymentOptionPlanTypeSchema, PaymentOptionSchema, PaymentPlanGroupSchema, PaymentPlanTypeSchema, PaymentProviderNameSchema, PaymentProviderSchema, PaymentSubscriptionInfoSchema, PaymentTypeSchema, PaymentVoucherInfoSchema, PopularOAuthAppSchema, PreviewPaymentChangePlanErrorSpec, PublicShareListQuerySchema, PublicShareSchema, PutioApiError, PutioAuthError, PutioConfigurationError, PutioErrorEnvelopeSchema, PutioHttpClient, PutioOperationError, PutioRateLimitError, PutioSdk, PutioSdkConfig, PutioTransportError, PutioValidationError, QueryFilesErrorSpec, QueryOAuthAppsErrorSpec, ReannounceTransferErrorSpec, RecoveryCodesErrorSpec, RedeemPaymentVoucherErrorSpec, RegenerateOAuthAppTokenErrorSpec, RegenerateRecoveryCodesErrorSpec, RegisterErrorSpec, RegisterInputSchema, RemoveFamilyMemberErrorSpec, RemoveFriendErrorSpec, RenameFileErrorSpec, ReportPaymentsErrorSpec, ResetPasswordErrorSpec, RestoreTrashErrorSpec, ResumeRssFeedErrorSpec, RetryAllRssFeedItemsErrorSpec, RetryRssFeedItemErrorSpec, RetryTransferErrorSpec, RevokeAllOAuthClientsErrorSpec, RevokeOAuthClientErrorSpec, RevokeOAuthGrantErrorSpec, RssFeedItemFailedSchema, RssFeedItemSchema, RssFeedItemSucceededSchema, RssFeedParamsSchema, RssFeedSchema, SaveAccountSettingsErrorSpec, SaveAccountSettingsPayloadSchema, SearchFilesErrorSpec, SearchFriendsErrorSpec, SendFriendRequestErrorSpec, SendIftttEventErrorSpec, ShareFilesErrorSpec, SharedFileSchema, SharedFileShareSchema, SharedFileSharedWithSchema, SharingCloneInfoSchema, SharingCloneInputSchema, SharingCloneStatusSchema, SharingShareInputSchema, SharingUnshareInputSchema, StartFromErrorSpec, StopRecordingTransferErrorSpec, StopSubscriptionErrorSpec, SubmitPaymentChangePlanErrorSpec, TransferAddInputSchema, TransferBaseSchema, TransferSchema, TransferStatusSchema, TransferTypeSchema, TransfersListQuerySchema, TrashFileSchema, TunnelRouteSchema, TwoFactorRecoveryCodesSchema, UnshareFileErrorSpec, UpdateOAuthAppErrorSpec, UpdateRssFeedErrorSpec, UserSearchResultSchema, UserSubscriptionStatusSchema, ValidateTokenResponseSchema, VerifyTOTPErrorSpec, VerifyTOTPResponseSchema, VoucherLookupErrorSpec, ZipStatusSchema, addManyTransfers, addTransfer, approveFriendRequest, buildAuthLoginUrl, buildFileApiContentUrl, buildFileApiDownloadUrl, buildFileApiMp4DownloadUrl, buildFileHlsStreamUrl, buildOAuthAppIconUrl, buildOAuthAuthorizeUrl, buildPutioUrl, cancelTransfers, cancelZip, checkCodeMatch, classifyPaymentChangePlanResponse, cleanTransfers, clearAccount, clearEvents, clearRssFeedLogs, clients, cloneSharedFiles, confirmFastspringOrder, continueFiles, continuePublicShareFiles, continueSearch, continueTransfers, continueTrash, convertFileSelectionToMp4, convertFileToMp4, convertFilesToMp4, countTransfers, countWaitingRequests, createAppSpecificPassword, createCoinbaseCharge, createDownloadLinks, createFamilyInvite, createFileUploadFormData, createFileUploadRequest, createFolder, createFriendInvite, createOAuthApp, createOpenNodeCharge, createPaddleBillingUpdatePaymentMethodTransaction, createPaddleWaitingPayment, createPublicShare, createPutioSdkEffectClient, createPutioSdkPromiseClient, createRssFeed, createZip, decodePutioErrorEnvelope, definePutioOperationErrorSpec, deleteAllAppSpecificPasswords, deleteAppSpecificPassword, deleteConfigKey, deleteEvent, deleteFileExtraction, deleteFileMp4, deleteFileSelection, deleteFiles, deleteOAuthApp, deletePublicShare, deleteRssFeed, deleteTrash, denyFriendRequest, destroyAccount, emptyTrash, encodePathSegment, exists, extractFiles, fallbackPutioErrorEnvelope, findNextFile, findNextVideo, forgotPassword, generateTOTP, getAccountInfo, getAccountSettings, getApiContentUrl, getApiDownloadUrl, getApiMp4DownloadUrl, getCode, getConfigKey, getConfigKeyWith, getDownloadLinks, getDownloadUrl, getEventTorrent, getFamilyInvite, getFile, getFriendInvite, getFriendSharedFolder, getGiftCard, getHlsStreamUrl, getIftttStatus, getMp4Status, getOAuthApp, getPaddleBillingInvoiceUrl, getPaymentInfo, getPaymentVoucherInfo, getPopularOAuthApps, getPublicShare, getPublicShareFileUrl, getRecoveryCodes, getRssFeed, getSharedWith, getSharingCloneInfo, getStartFrom, getTransfer, getTransferInfo, getVoucher, getZip, grants, isPutioApiError, isPutioAuthError, isPutioErrorEnvelope, isPutioOperationError, isPutioRateLimitError, joinFamily, linkDevice, listAccountConfirmations, listAccountSubtitleLanguages, listActiveMp4Conversions, listAppSpecificPasswords, listEvents, listFamilyInvites, listFamilyMembers, listFileExtractions, listFileSubtitles, listFriendInvites, listFriends, listPaymentHistory, listPaymentInvites, listPaymentOptions, listPaymentPlans, listPublicShareFiles, listPublicShares, listRssFeedItems, listRssFeeds, listSentRequests, listSharedFiles, listTransfers, listTrash, listTunnelRoutes, listWaitingRequests, listZips, login, logout, makePutioFetchClient, makePutioFetchLayer, makePutioSdkConfig, makePutioSdkEffectClientLayer, makePutioSdkLayer, makePutioSdkLiveClientLayer, makePutioSdkLiveLayer, makeResponseError, mapConfigurationError, mapDecodeErrorToValidationError, mapTransportError, moveFileSelection, moveFiles, parseErrorBody, pauseRssFeed, previewPaymentChangePlan, putMp4ToMyFiles, queryFiles, queryOAuthApps, readConfig, readConfigWith, reannounceTransfer, redeemPaymentVoucher, regenerateOAuthAppToken, regenerateRecoveryCodes, register, removeFamilyMember, removeFriend, renameFile, reportPayments, requestArrayBuffer, requestJson, requestVoid, resetPassword, resetStartFrom, responseRateLimitHeaders, restoreTrash, resumeRssFeed, retryAllRssFeedItems, retryRssFeedItem, retryTransfer, revokeAllClients, revokeApp, revokeClient, saveAccountSettings, searchFiles, searchFriends, selectJsonField, selectJsonFields, sendFriendRequest, sendIftttEvent, setConfigKey, setFilesWatchStatus, setOAuthAppIcon, setStartFrom, shareFiles, stopPaymentSubscription, stopTransferRecording, submitPaymentChangePlan, unshareFile, updateOAuthApp, updateRssFeed, uploadFile, validateToken, verifyTOTP, withOperationErrors, writeConfig };
|
|
5113
5367
|
|
|
5114
5368
|
//# sourceMappingURL=index.js.map
|