@putdotio/sdk 9.2.0 → 9.4.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 +6 -3
- package/dist/{forms-NEv3jqmj.js → forms-ByF1AEEn.js} +57 -23
- package/dist/forms-ByF1AEEn.js.map +1 -0
- package/dist/{index-Bdf0QH3l.d.ts → index-DAs6a4pA.d.ts} +67 -56
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/utilities.d.ts +1 -1
- package/dist/utilities.js +1 -1
- package/dist/utilities.js.map +1 -1
- package/package.json +18 -11
- package/dist/forms-NEv3jqmj.js.map +0 -1
package/README.md
CHANGED
|
@@ -51,6 +51,7 @@ const sdk = createPutioSdkPromiseClient();
|
|
|
51
51
|
|
|
52
52
|
const validation = await sdk.auth.validateToken(tokenToCheck);
|
|
53
53
|
const login = await sdk.auth.login({
|
|
54
|
+
callbackUrl,
|
|
54
55
|
clientId,
|
|
55
56
|
clientSecret,
|
|
56
57
|
password,
|
|
@@ -107,9 +108,9 @@ const serviceProgram = Effect.gen(function* () {
|
|
|
107
108
|
}).pipe(Effect.provide(makePutioSdkLiveClientLayer({ accessToken: userAccessToken })));
|
|
108
109
|
```
|
|
109
110
|
|
|
110
|
-
`makePutioSdkLiveClientLayer(...)` provides the SDK service, SDK config, and default fetch-backed
|
|
111
|
-
`makePutioSdkLiveLayer(...)` provides both the SDK config and the default fetch-backed
|
|
112
|
-
Use `makePutioSdkLayer(...)`
|
|
111
|
+
`makePutioSdkLiveClientLayer(...)` provides the SDK service, SDK config, and default fetch-backed transport.
|
|
112
|
+
`makePutioSdkLiveLayer(...)` provides both the SDK config and the default fetch-backed transport.
|
|
113
|
+
Use `makePutioSdkLayer(...)` with `makePutioFetchLayer(...)` or your own `PutioHttpClient` service when you want to supply custom transport.
|
|
113
114
|
|
|
114
115
|
## Side-By-Side Usage
|
|
115
116
|
|
|
@@ -189,6 +190,8 @@ For upload flows, the host should also provide file-compatible inputs such as `F
|
|
|
189
190
|
|
|
190
191
|
If a target runtime is missing these APIs, provide them with host-level polyfills or adapters instead of patching the SDK surface.
|
|
191
192
|
|
|
193
|
+
The package compatibility gate installs the packed tarball into external consumers and runs strict Node type/runtime checks, bundled browser checks in Chromium, Firefox, and WebKit, and a Bun runtime import check.
|
|
194
|
+
|
|
192
195
|
## Error Handling
|
|
193
196
|
|
|
194
197
|
Promise consumers receive tagged SDK error objects:
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Context, Data, Effect, Layer,
|
|
2
|
-
import { FetchHttpClient, Headers, HttpClient, HttpClientRequest, HttpClientResponse } from "effect/unstable/http";
|
|
1
|
+
import { Context, Data, Effect, Layer, Schema } from "effect";
|
|
3
2
|
//#region src/core/errors.ts
|
|
4
3
|
const PutioErrorEnvelopeSchema = Schema.Struct({
|
|
5
4
|
error_message: Schema.optional(Schema.String),
|
|
@@ -67,13 +66,14 @@ const fallbackPutioErrorEnvelope = (status) => ({
|
|
|
67
66
|
error_message: `put.io API request failed with status ${status}`,
|
|
68
67
|
status_code: status
|
|
69
68
|
});
|
|
69
|
+
const getHeader = (headers, name) => headers.get(name) ?? void 0;
|
|
70
70
|
const responseRateLimitHeaders = (headers) => ({
|
|
71
|
-
action:
|
|
72
|
-
id:
|
|
73
|
-
limit:
|
|
74
|
-
remaining:
|
|
75
|
-
retryAfter:
|
|
76
|
-
reset:
|
|
71
|
+
action: getHeader(headers, "x-ratelimit-action"),
|
|
72
|
+
id: getHeader(headers, "x-ratelimit-id"),
|
|
73
|
+
limit: getHeader(headers, "x-ratelimit-limit"),
|
|
74
|
+
remaining: getHeader(headers, "x-ratelimit-remaining"),
|
|
75
|
+
retryAfter: getHeader(headers, "retry-after"),
|
|
76
|
+
reset: getHeader(headers, "x-ratelimit-reset")
|
|
77
77
|
});
|
|
78
78
|
const mapDecodeErrorToValidationError = (cause) => new PutioValidationError({ cause });
|
|
79
79
|
const mapConfigurationError = (cause) => new PutioConfigurationError({ cause });
|
|
@@ -123,6 +123,7 @@ const DEFAULT_PUTIO_WEB_APP_URL = "https://app.put.io";
|
|
|
123
123
|
//#endregion
|
|
124
124
|
//#region src/core/http.ts
|
|
125
125
|
var PutioSdkConfig = class extends Context.Service()("PutioSdkConfig") {};
|
|
126
|
+
var PutioHttpClient = class extends Context.Service()("PutioHttpClient") {};
|
|
126
127
|
const makePutioSdkConfig = (config) => ({
|
|
127
128
|
accessToken: config.accessToken,
|
|
128
129
|
baseUrl: config.baseUrl ?? "https://api.put.io",
|
|
@@ -130,7 +131,31 @@ const makePutioSdkConfig = (config) => ({
|
|
|
130
131
|
webAppUrl: config.webAppUrl ?? "https://app.put.io"
|
|
131
132
|
});
|
|
132
133
|
const makePutioSdkLayer = (config) => Layer.succeed(PutioSdkConfig, makePutioSdkConfig(config));
|
|
133
|
-
const makePutioSdkLiveLayer = (config) => Layer.mergeAll(makePutioSdkLayer(config),
|
|
134
|
+
const makePutioSdkLiveLayer = (config) => Layer.mergeAll(makePutioSdkLayer(config), makePutioFetchLayer());
|
|
135
|
+
const makePutioFetchLayer = (fetchImplementation = globalThis.fetch) => Layer.succeed(PutioHttpClient, makePutioFetchClient(fetchImplementation));
|
|
136
|
+
const makePutioFetchClient = (fetchImplementation = globalThis.fetch) => ({ execute: (request) => Effect.tryPromise({
|
|
137
|
+
try: async (signal) => {
|
|
138
|
+
const response = await fetchImplementation(request.url, {
|
|
139
|
+
body: request.body,
|
|
140
|
+
headers: request.headers,
|
|
141
|
+
method: request.method,
|
|
142
|
+
signal
|
|
143
|
+
});
|
|
144
|
+
return {
|
|
145
|
+
arrayBuffer: Effect.tryPromise({
|
|
146
|
+
try: () => response.arrayBuffer(),
|
|
147
|
+
catch: mapTransportError
|
|
148
|
+
}),
|
|
149
|
+
headers: response.headers,
|
|
150
|
+
json: Effect.tryPromise({
|
|
151
|
+
try: () => response.json(),
|
|
152
|
+
catch: mapTransportError
|
|
153
|
+
}),
|
|
154
|
+
status: response.status
|
|
155
|
+
};
|
|
156
|
+
},
|
|
157
|
+
catch: mapTransportError
|
|
158
|
+
}) });
|
|
134
159
|
const encodePathSegment = (value) => encodeURIComponent(String(value));
|
|
135
160
|
const absoluteUrlPattern = /^(?:[a-z][a-z\d+.-]*:|\/\/)/i;
|
|
136
161
|
const normalizeApiPath = (path) => {
|
|
@@ -147,7 +172,7 @@ const buildPutioUrl = (baseUrl, path, query) => {
|
|
|
147
172
|
const mapUrlBuildError = (cause) => cause instanceof PutioConfigurationError ? cause : mapConfigurationError(cause);
|
|
148
173
|
const OkResponseSchema = Schema.Struct({ status: Schema.Literal("OK") });
|
|
149
174
|
const isSuccessStatus = (status) => status >= 200 && status < 300;
|
|
150
|
-
const decodeSuccessJson = (schema, response) =>
|
|
175
|
+
const decodeSuccessJson = (schema, response) => response.json.pipe(Effect.flatMap(Schema.decodeUnknownEffect(schema)), Effect.mapError(mapDecodeErrorToValidationError));
|
|
151
176
|
const decodeFailure = (response, headers) => response.json.pipe(Effect.flatMap((json) => parseErrorBody(response.status, json)), Effect.orElseSucceed(() => fallbackPutioErrorEnvelope(response.status)), Effect.map((body) => makeResponseError(response.status, headers, body)));
|
|
152
177
|
const toBasicAuthorization = (username, password) => {
|
|
153
178
|
if (typeof globalThis.btoa === "function") return `Basic ${globalThis.btoa(`${username}:${password}`)}`;
|
|
@@ -173,30 +198,39 @@ const normalizeFormValue = (value) => {
|
|
|
173
198
|
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
174
199
|
return JSON.stringify(value);
|
|
175
200
|
};
|
|
176
|
-
const withBody = (
|
|
201
|
+
const withBody = (body) => {
|
|
177
202
|
switch (body.type) {
|
|
178
|
-
case "none": return Effect.succeed(
|
|
179
|
-
case "json": return
|
|
180
|
-
|
|
181
|
-
|
|
203
|
+
case "none": return Effect.succeed(void 0);
|
|
204
|
+
case "json": return Effect.try({
|
|
205
|
+
try: () => JSON.stringify(body.value),
|
|
206
|
+
catch: mapDecodeErrorToValidationError
|
|
207
|
+
});
|
|
208
|
+
case "form": return Effect.succeed(new URLSearchParams(Object.entries(body.value).flatMap(([key, value]) => value === void 0 ? [] : [[key, normalizeFormValue(value)]])));
|
|
209
|
+
case "form-data": return Effect.succeed(body.value);
|
|
182
210
|
}
|
|
183
211
|
};
|
|
184
212
|
const makeRequest = (url, options, authorization) => Effect.gen(function* () {
|
|
185
|
-
const headers =
|
|
213
|
+
const headers = new Headers(options.headers);
|
|
186
214
|
const body = options.body ?? { type: "none" };
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
215
|
+
headers.set("accept", "application/json");
|
|
216
|
+
if (authorization) headers.set("authorization", authorization);
|
|
217
|
+
if (body.type === "json" && !headers.has("content-type")) headers.set("content-type", "application/json");
|
|
218
|
+
return {
|
|
219
|
+
body: yield* withBody(body),
|
|
220
|
+
headers,
|
|
221
|
+
method: options.method,
|
|
222
|
+
url
|
|
223
|
+
};
|
|
191
224
|
});
|
|
192
225
|
const executeRequest = (options) => Effect.gen(function* () {
|
|
193
226
|
const config = yield* PutioSdkConfig;
|
|
227
|
+
const httpClient = yield* PutioHttpClient;
|
|
194
228
|
const authorization = yield* resolveAuthorization(config, options.auth);
|
|
195
229
|
const request = yield* makeRequest(yield* Effect.try({
|
|
196
230
|
try: () => buildPutioUrl(options.baseUrl ?? config.baseUrl ?? "https://api.put.io", options.path, options.query),
|
|
197
231
|
catch: mapUrlBuildError
|
|
198
232
|
}), options, authorization);
|
|
199
|
-
return yield*
|
|
233
|
+
return yield* httpClient.execute(request);
|
|
200
234
|
});
|
|
201
235
|
const requestJson = (schema, options) => executeRequest(options).pipe(Effect.flatMap((response) => isSuccessStatus(response.status) ? decodeSuccessJson(schema, response) : decodeFailure(response, response.headers).pipe(Effect.flatMap(Effect.fail))));
|
|
202
236
|
const selectJsonField = (field) => (effect) => effect.pipe(Effect.map((value) => value[field]));
|
|
@@ -215,6 +249,6 @@ const toCursorSelectionForm = (selection, idsFieldName) => {
|
|
|
215
249
|
};
|
|
216
250
|
};
|
|
217
251
|
//#endregion
|
|
218
|
-
export {
|
|
252
|
+
export { definePutioOperationErrorSpec as A, mapTransportError as B, PutioConfigurationError as C, PutioTransportError as D, PutioRateLimitError as E, isPutioOperationError as F, responseRateLimitHeaders as H, isPutioRateLimitError as I, makeResponseError as L, isPutioApiError as M, isPutioAuthError as N, PutioValidationError as O, isPutioErrorEnvelope as P, mapConfigurationError as R, PutioAuthError as S, PutioOperationError as T, withOperationErrors as U, parseErrorBody as V, selectJsonFields as _, PutioSdkConfig as a, DEFAULT_PUTIO_WEB_APP_URL as b, makePutioFetchClient as c, makePutioSdkLayer as d, makePutioSdkLiveLayer as f, selectJsonField as g, requestVoid as h, PutioHttpClient as i, fallbackPutioErrorEnvelope as j, decodePutioErrorEnvelope as k, makePutioFetchLayer as l, requestJson as m, toCursorSelectionForm as n, buildPutioUrl as o, requestArrayBuffer as p, OkResponseSchema as r, encodePathSegment as s, joinCsv as t, makePutioSdkConfig as u, DEFAULT_PUTIO_API_BASE_URL as v, PutioErrorEnvelopeSchema as w, PutioApiError as x, DEFAULT_PUTIO_UPLOAD_BASE_URL as y, mapDecodeErrorToValidationError as z };
|
|
219
253
|
|
|
220
|
-
//# sourceMappingURL=forms-
|
|
254
|
+
//# sourceMappingURL=forms-ByF1AEEn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forms-ByF1AEEn.js","names":[],"sources":["../src/core/errors.ts","../src/core/defaults.ts","../src/core/http.ts","../src/core/forms.ts"],"sourcesContent":["import { Data, Effect, Schema } from \"effect\";\n\nexport const PutioErrorEnvelopeSchema = Schema.Struct({\n error_message: Schema.optional(Schema.String),\n error_type: Schema.optional(Schema.String),\n status_code: Schema.optional(Schema.Int),\n details: Schema.optional(Schema.Unknown),\n});\n\nexport type PutioErrorEnvelope = Schema.Schema.Type<typeof PutioErrorEnvelopeSchema>;\n\nexport interface PutioKnownErrorContract<\n TType extends string = string,\n TStatus extends number = number,\n> {\n readonly errorType?: TType | undefined;\n readonly statusCode?: TStatus | undefined;\n}\n\ntype ContractErrorType<TContract extends PutioKnownErrorContract> =\n TContract extends PutioKnownErrorContract<infer TType, number> ? TType : never;\n\ntype ContractStatusCode<TContract extends PutioKnownErrorContract> =\n TContract extends PutioKnownErrorContract<string, infer TStatus> ? TStatus : never;\n\nexport type PutioTypedErrorEnvelope<TContract extends PutioKnownErrorContract> = Omit<\n PutioErrorEnvelope,\n \"error_message\" | \"error_type\" | \"status_code\"\n> & {\n readonly error_message?: string;\n readonly error_type?: [ContractErrorType<TContract>] extends [never]\n ? string\n : ContractErrorType<TContract>;\n readonly status_code?: [ContractStatusCode<TContract>] extends [never]\n ? number\n : ContractStatusCode<TContract>;\n};\n\nexport interface PutioOperationErrorSpec<\n TDomain extends string = string,\n TOperation extends string = string,\n TContracts extends ReadonlyArray<PutioKnownErrorContract> =\n ReadonlyArray<PutioKnownErrorContract>,\n> {\n readonly domain: TDomain;\n readonly operation: TOperation;\n readonly knownErrors: TContracts;\n}\n\ntype OperationContractOf<TSpec extends PutioOperationErrorSpec> = Extract<\n TSpec[\"knownErrors\"][number],\n PutioKnownOperationErrorContract\n>;\n\ntype OperationContractOfParts<\n TDomain extends string,\n TOperation extends string,\n TContracts extends ReadonlyArray<PutioKnownErrorContract>,\n> = OperationContractOf<PutioOperationErrorSpec<TDomain, TOperation, TContracts>>;\n\ntype PutioOperationErrorReason<TContract extends PutioKnownErrorContract> = TContract extends {\n readonly errorType: infer TType extends string;\n}\n ? {\n readonly kind: \"error_type\";\n readonly errorType: TType;\n }\n : TContract extends { readonly statusCode: infer TStatus extends number }\n ? {\n readonly kind: \"status_code\";\n readonly statusCode: TStatus;\n }\n : never;\n\nexport type PutioKnownOperationErrorContract =\n | {\n readonly errorType: string;\n readonly statusCode?: number;\n }\n | {\n readonly errorType?: undefined;\n readonly statusCode: number;\n };\n\nconst isKnownContractMatch = <TContract extends PutioKnownErrorContract>(\n contract: TContract,\n error: PutioApiError | PutioAuthError,\n): contract is Extract<TContract, PutioKnownOperationErrorContract> => {\n if (contract.errorType !== undefined) {\n if (error.body.error_type !== contract.errorType) {\n return false;\n }\n\n return contract.statusCode === undefined || error.status === contract.statusCode;\n }\n\n if (contract.statusCode !== undefined) {\n return error.status === contract.statusCode;\n }\n\n return false;\n};\n\nconst isMatchableApiError = (error: PutioSdkError): error is PutioApiError | PutioAuthError =>\n error._tag === \"PutioApiError\" || error._tag === \"PutioAuthError\";\n\nconst isRecord = (value: unknown): value is Readonly<Record<string, unknown>> =>\n typeof value === \"object\" && value !== null;\n\nconst hasOptionalString = (record: Readonly<Record<string, unknown>>, key: string): boolean =>\n !(key in record) || record[key] === undefined || typeof record[key] === \"string\";\n\nconst hasOptionalInteger = (record: Readonly<Record<string, unknown>>, key: string): boolean =>\n !(key in record) ||\n record[key] === undefined ||\n (typeof record[key] === \"number\" && Number.isInteger(record[key]));\n\nconst isKnownOperationErrorContract = (value: unknown): value is PutioKnownOperationErrorContract =>\n isRecord(value) &&\n (typeof value.errorType === \"string\" || typeof value.statusCode === \"number\") &&\n hasOptionalString(value, \"errorType\") &&\n hasOptionalInteger(value, \"statusCode\");\n\nconst isOperationReason = (\n value: unknown,\n): value is PutioOperationErrorReason<PutioKnownOperationErrorContract> => {\n if (!isRecord(value)) {\n return false;\n }\n\n if (value.kind === \"error_type\") {\n return typeof value.errorType === \"string\";\n }\n\n if (value.kind === \"status_code\") {\n return typeof value.statusCode === \"number\";\n }\n\n return false;\n};\n\nfunction toOperationReason<TContract extends { readonly errorType: string }>(\n contract: TContract,\n): PutioOperationErrorReason<TContract>;\nfunction toOperationReason<TContract extends { readonly statusCode: number }>(\n contract: TContract,\n): PutioOperationErrorReason<TContract>;\nfunction toOperationReason(\n contract: PutioKnownOperationErrorContract,\n): PutioOperationErrorReason<PutioKnownOperationErrorContract> {\n if (contract.errorType !== undefined) {\n return {\n kind: \"error_type\",\n errorType: contract.errorType,\n };\n }\n\n return {\n kind: \"status_code\",\n statusCode: contract.statusCode,\n };\n}\n\nexport class PutioTransportError extends Data.TaggedError(\"PutioTransportError\")<{\n readonly cause: unknown;\n}> {}\n\nexport class PutioConfigurationError extends Data.TaggedError(\"PutioConfigurationError\")<{\n readonly cause: unknown;\n}> {}\n\nexport class PutioValidationError extends Data.TaggedError(\"PutioValidationError\")<{\n readonly cause: unknown;\n}> {}\n\nconst PutioResponseErrorFields = {\n status: Schema.Int,\n body: PutioErrorEnvelopeSchema,\n};\n\nexport class PutioApiError extends Schema.TaggedErrorClass<PutioApiError>()(\"PutioApiError\", {\n ...PutioResponseErrorFields,\n}) {}\n\nexport class PutioAuthError extends Schema.TaggedErrorClass<PutioAuthError>()(\"PutioAuthError\", {\n ...PutioResponseErrorFields,\n}) {}\n\nexport class PutioRateLimitError extends Schema.TaggedErrorClass<PutioRateLimitError>()(\n \"PutioRateLimitError\",\n {\n ...PutioResponseErrorFields,\n action: Schema.optional(Schema.String),\n id: Schema.optional(Schema.String),\n limit: Schema.optional(Schema.String),\n remaining: Schema.optional(Schema.String),\n retryAfter: Schema.optional(Schema.String),\n reset: Schema.optional(Schema.String),\n },\n) {}\n\nexport class PutioOperationError<\n TDomain extends string,\n TOperation extends string,\n TContract extends PutioKnownOperationErrorContract,\n> extends Data.TaggedError(\"PutioOperationError\")<{\n readonly body: PutioTypedErrorEnvelope<TContract>;\n readonly contract: TContract;\n readonly domain: TDomain;\n readonly operation: TOperation;\n readonly reason: PutioOperationErrorReason<TContract>;\n readonly status: number;\n}> {}\n\nexport type PutioSdkError =\n | PutioConfigurationError\n | PutioTransportError\n | PutioValidationError\n | PutioApiError\n | PutioAuthError\n | PutioRateLimitError;\n\nexport type PutioUnhandledSdkError =\n | PutioConfigurationError\n | PutioTransportError\n | PutioValidationError\n | PutioApiError\n | PutioAuthError\n | PutioRateLimitError;\n\nexport type PutioOperationErrorFromSpec<TSpec extends PutioOperationErrorSpec> =\n PutioOperationError<TSpec[\"domain\"], TSpec[\"operation\"], OperationContractOf<TSpec>>;\n\nexport type PutioOperationFailure<TSpec extends PutioOperationErrorSpec> =\n | PutioUnhandledSdkError\n | PutioOperationErrorFromSpec<TSpec>;\n\nexport type AnyPutioOperationError = PutioOperationError<\n string,\n string,\n PutioKnownOperationErrorContract\n>;\n\nexport const definePutioOperationErrorSpec = <\n const TDomain extends string,\n const TOperation extends string,\n const TContracts extends ReadonlyArray<PutioKnownErrorContract>,\n>(\n spec: PutioOperationErrorSpec<TDomain, TOperation, TContracts>,\n) => spec;\n\nexport const decodePutioErrorEnvelope = Schema.decodeUnknownEffect(PutioErrorEnvelopeSchema);\n\nexport const isPutioErrorEnvelope = (value: unknown): value is PutioErrorEnvelope =>\n isRecord(value) &&\n hasOptionalString(value, \"error_message\") &&\n hasOptionalString(value, \"error_type\") &&\n hasOptionalInteger(value, \"status_code\");\n\nconst hasStatusAndBody = <TTag extends string>(\n value: unknown,\n tag: TTag,\n): value is {\n readonly _tag: TTag;\n readonly body: PutioErrorEnvelope;\n readonly status: number;\n} =>\n isRecord(value) &&\n value._tag === tag &&\n typeof value.status === \"number\" &&\n isPutioErrorEnvelope(value.body);\n\nexport const isPutioApiError = (value: unknown): value is PutioApiError =>\n hasStatusAndBody(value, \"PutioApiError\");\n\nexport const isPutioAuthError = (value: unknown): value is PutioAuthError =>\n hasStatusAndBody(value, \"PutioAuthError\");\n\nexport const isPutioRateLimitError = (value: unknown): value is PutioRateLimitError =>\n hasStatusAndBody(value, \"PutioRateLimitError\") &&\n isRecord(value) &&\n hasOptionalString(value, \"action\") &&\n hasOptionalString(value, \"id\") &&\n hasOptionalString(value, \"limit\") &&\n hasOptionalString(value, \"remaining\") &&\n hasOptionalString(value, \"retryAfter\") &&\n hasOptionalString(value, \"reset\");\n\nexport const isPutioOperationError = (value: unknown): value is AnyPutioOperationError =>\n isRecord(value) &&\n value._tag === \"PutioOperationError\" &&\n isPutioErrorEnvelope(value.body) &&\n isKnownOperationErrorContract(value.contract) &&\n typeof value.domain === \"string\" &&\n typeof value.operation === \"string\" &&\n isOperationReason(value.reason) &&\n typeof value.status === \"number\";\n\nexport const fallbackPutioErrorEnvelope = (status: number): PutioErrorEnvelope => ({\n error_message: `put.io API request failed with status ${status}`,\n status_code: status,\n});\n\nconst getHeader = (headers: Headers, name: string): string | undefined =>\n headers.get(name) ?? undefined;\n\nexport const responseRateLimitHeaders = (headers: Headers) => ({\n action: getHeader(headers, \"x-ratelimit-action\"),\n id: getHeader(headers, \"x-ratelimit-id\"),\n limit: getHeader(headers, \"x-ratelimit-limit\"),\n remaining: getHeader(headers, \"x-ratelimit-remaining\"),\n retryAfter: getHeader(headers, \"retry-after\"),\n reset: getHeader(headers, \"x-ratelimit-reset\"),\n});\n\nexport const mapDecodeErrorToValidationError = (cause: unknown) =>\n new PutioValidationError({ cause });\n\nexport const mapConfigurationError = (cause: unknown) => new PutioConfigurationError({ cause });\n\nexport const mapTransportError = (cause: unknown) => new PutioTransportError({ cause });\n\nexport const makeResponseError = (\n status: number,\n headers: Headers,\n body: PutioErrorEnvelope,\n): PutioSdkError => {\n if (status === 429) {\n return new PutioRateLimitError({\n status,\n body,\n ...responseRateLimitHeaders(headers),\n });\n }\n\n if (status === 401 || status === 403) {\n return new PutioAuthError({ status, body });\n }\n\n return new PutioApiError({ status, body });\n};\n\nexport const parseErrorBody = (status: number, json: unknown) =>\n decodePutioErrorEnvelope(json).pipe(\n Effect.orElseSucceed(() => fallbackPutioErrorEnvelope(status)),\n );\n\nexport function withOperationErrors<\n A,\n E extends PutioSdkError,\n R,\n const TDomain extends string,\n const TOperation extends string,\n const TContracts extends ReadonlyArray<PutioKnownErrorContract>,\n>(\n effect: Effect.Effect<A, E, R>,\n spec: PutioOperationErrorSpec<TDomain, TOperation, TContracts>,\n): Effect.Effect<\n A,\n | E\n | PutioOperationError<\n TDomain,\n TOperation,\n OperationContractOfParts<TDomain, TOperation, TContracts>\n >,\n R\n>;\nexport function withOperationErrors<\n const TDomain extends string,\n const TOperation extends string,\n const TContracts extends ReadonlyArray<PutioKnownErrorContract>,\n>(\n spec: PutioOperationErrorSpec<TDomain, TOperation, TContracts>,\n): <A, E extends PutioSdkError, R>(\n effect: Effect.Effect<A, E, R>,\n) => Effect.Effect<\n A,\n | E\n | PutioOperationError<\n TDomain,\n TOperation,\n OperationContractOfParts<TDomain, TOperation, TContracts>\n >,\n R\n>;\nexport function withOperationErrors<\n A,\n E extends PutioSdkError,\n R,\n const TDomain extends string,\n const TOperation extends string,\n const TContracts extends ReadonlyArray<PutioKnownErrorContract>,\n>(\n effectOrSpec: Effect.Effect<A, E, R> | PutioOperationErrorSpec<TDomain, TOperation, TContracts>,\n maybeSpec?: PutioOperationErrorSpec<TDomain, TOperation, TContracts>,\n):\n | Effect.Effect<\n A,\n | E\n | PutioOperationError<\n TDomain,\n TOperation,\n OperationContractOfParts<TDomain, TOperation, TContracts>\n >,\n R\n >\n | (<A2, E2 extends PutioSdkError, R2>(\n effect: Effect.Effect<A2, E2, R2>,\n ) => Effect.Effect<\n A2,\n | E2\n | PutioOperationError<\n TDomain,\n TOperation,\n OperationContractOfParts<TDomain, TOperation, TContracts>\n >,\n R2\n >) {\n if (maybeSpec === undefined) {\n const spec = effectOrSpec as PutioOperationErrorSpec<TDomain, TOperation, TContracts>;\n\n return <A2, E2 extends PutioSdkError, R2>(effect: Effect.Effect<A2, E2, R2>) =>\n withOperationErrors(effect, spec);\n }\n\n const effect = effectOrSpec as Effect.Effect<A, E, R>;\n const spec = maybeSpec;\n\n return effect.pipe(\n Effect.mapError((error) => {\n if (!isMatchableApiError(error)) {\n return error;\n }\n\n const contract = spec.knownErrors.find((candidate) => isKnownContractMatch(candidate, error));\n\n if (!contract) {\n return error;\n }\n\n return new PutioOperationError({\n body: error.body as PutioTypedErrorEnvelope<\n OperationContractOfParts<TDomain, TOperation, TContracts>\n >,\n contract,\n domain: spec.domain,\n operation: spec.operation,\n reason: toOperationReason(contract),\n status: error.status,\n });\n }),\n );\n}\n","export const DEFAULT_PUTIO_API_BASE_URL = \"https://api.put.io\";\nexport const DEFAULT_PUTIO_UPLOAD_BASE_URL = \"https://upload.put.io\";\nexport const DEFAULT_PUTIO_WEB_APP_URL = \"https://app.put.io\";\n","import { Context, Effect, Layer, Schema } from \"effect\";\n\nimport {\n DEFAULT_PUTIO_API_BASE_URL,\n DEFAULT_PUTIO_UPLOAD_BASE_URL,\n DEFAULT_PUTIO_WEB_APP_URL,\n} from \"./defaults.js\";\nimport {\n fallbackPutioErrorEnvelope,\n makeResponseError,\n mapConfigurationError,\n mapDecodeErrorToValidationError,\n mapTransportError,\n parseErrorBody,\n PutioConfigurationError,\n type PutioSdkError,\n} from \"./errors.js\";\n\nexport type PutioQueryValue = string | number | boolean | null | undefined;\n\nexport type PutioQuery = Readonly<Record<string, PutioQueryValue>>;\n\nexport type PutioPathSegment = string | number | boolean;\n\nexport interface PutioSdkConfigShape {\n readonly accessToken?: string;\n readonly baseUrl?: string | URL;\n readonly uploadBaseUrl?: string | URL;\n readonly webAppUrl?: string | URL;\n}\n\nexport class PutioSdkConfig extends Context.Service<PutioSdkConfig, PutioSdkConfigShape>()(\n \"PutioSdkConfig\",\n) {}\n\nexport interface PutioHttpRequest {\n readonly body?: BodyInit;\n readonly headers: Headers;\n readonly method: PutioRequestMethod;\n readonly url: string;\n}\n\nexport interface PutioHttpResponse {\n readonly arrayBuffer: Effect.Effect<ArrayBuffer, PutioSdkError>;\n readonly headers: Headers;\n readonly json: Effect.Effect<unknown, PutioSdkError>;\n readonly status: number;\n}\n\nexport interface PutioHttpClientShape {\n readonly execute: (request: PutioHttpRequest) => Effect.Effect<PutioHttpResponse, PutioSdkError>;\n}\n\nexport class PutioHttpClient extends Context.Service<PutioHttpClient, PutioHttpClientShape>()(\n \"PutioHttpClient\",\n) {}\n\nexport type PutioSdkContext = PutioSdkConfig | PutioHttpClient;\n\nexport const makePutioSdkConfig = (config: PutioSdkConfigShape): PutioSdkConfigShape => ({\n accessToken: config.accessToken,\n baseUrl: config.baseUrl ?? DEFAULT_PUTIO_API_BASE_URL,\n uploadBaseUrl: config.uploadBaseUrl ?? DEFAULT_PUTIO_UPLOAD_BASE_URL,\n webAppUrl: config.webAppUrl ?? DEFAULT_PUTIO_WEB_APP_URL,\n});\n\nexport const makePutioSdkLayer = (config: PutioSdkConfigShape) =>\n Layer.succeed(PutioSdkConfig, makePutioSdkConfig(config));\n\nexport const makePutioSdkLiveLayer = (config: PutioSdkConfigShape) =>\n Layer.mergeAll(makePutioSdkLayer(config), makePutioFetchLayer());\n\nexport const makePutioFetchLayer = (\n fetchImplementation: typeof globalThis.fetch = globalThis.fetch,\n) => Layer.succeed(PutioHttpClient, makePutioFetchClient(fetchImplementation));\n\nexport const makePutioFetchClient = (\n fetchImplementation: typeof globalThis.fetch = globalThis.fetch,\n): PutioHttpClientShape => ({\n execute: (request) =>\n Effect.tryPromise({\n try: async (signal) => {\n const response = await fetchImplementation(request.url, {\n body: request.body,\n headers: request.headers,\n method: request.method,\n signal,\n });\n\n return {\n arrayBuffer: Effect.tryPromise({\n try: () => response.arrayBuffer(),\n catch: mapTransportError,\n }),\n headers: response.headers,\n json: Effect.tryPromise({\n try: () => response.json(),\n catch: mapTransportError,\n }),\n status: response.status,\n };\n },\n catch: mapTransportError,\n }),\n});\n\nexport const encodePathSegment = (value: PutioPathSegment): string =>\n encodeURIComponent(String(value));\n\nconst absoluteUrlPattern = /^(?:[a-z][a-z\\d+.-]*:|\\/\\/)/i;\n\nconst normalizeApiPath = (path: string): string => {\n if (absoluteUrlPattern.test(path)) {\n throw mapConfigurationError(\"SDK API request paths must be relative to the configured baseUrl\");\n }\n\n return path.startsWith(\"/\") ? path : `/${path}`;\n};\n\nexport const buildPutioUrl = (baseUrl: string | URL, path: string, query?: PutioQuery): string => {\n const url = new URL(normalizeApiPath(path), baseUrl);\n\n if (query) {\n for (const [key, value] of Object.entries(query)) {\n if (value !== undefined && value !== null) {\n url.searchParams.set(key, String(value));\n }\n }\n }\n\n return url.toString();\n};\n\nconst mapUrlBuildError = (cause: unknown) =>\n cause instanceof PutioConfigurationError ? cause : mapConfigurationError(cause);\n\nexport const OkResponseSchema = Schema.Struct({\n status: Schema.Literal(\"OK\"),\n});\n\nexport type PutioAuth =\n | { readonly type: \"config-token\" }\n | { readonly type: \"token\"; readonly token: string }\n | { readonly type: \"basic\"; readonly username: string; readonly password: string }\n | { readonly type: \"none\" };\n\ntype PutioRequestMethod = \"GET\" | \"POST\" | \"PUT\" | \"PATCH\" | \"DELETE\";\n\ntype PutioRequestBody =\n | { readonly type: \"none\" }\n | { readonly type: \"json\"; readonly value: unknown }\n | { readonly type: \"form\"; readonly value: Record<string, unknown> }\n | { readonly type: \"form-data\"; readonly value: FormData };\n\ninterface PutioRequestOptions {\n readonly method: PutioRequestMethod;\n readonly path: string;\n readonly baseUrl?: string | URL;\n readonly query?: PutioQuery;\n readonly headers?: HeadersInit;\n readonly auth?: PutioAuth;\n readonly body?: PutioRequestBody;\n}\n\nconst isSuccessStatus = (status: number) => status >= 200 && status < 300;\n\nconst decodeSuccessJson = <S extends Schema.Top>(schema: S, response: PutioHttpResponse) =>\n response.json.pipe(\n Effect.flatMap(Schema.decodeUnknownEffect(schema)),\n Effect.mapError(mapDecodeErrorToValidationError),\n );\n\nconst decodeFailure = (response: PutioHttpResponse, headers: Headers) =>\n response.json.pipe(\n Effect.flatMap((json) => parseErrorBody(response.status, json)),\n Effect.orElseSucceed(() => fallbackPutioErrorEnvelope(response.status)),\n Effect.map((body) => makeResponseError(response.status, headers, body)),\n );\n\nconst toBasicAuthorization = (username: string, password: string) => {\n if (typeof globalThis.btoa === \"function\") {\n return `Basic ${globalThis.btoa(`${username}:${password}`)}`;\n }\n\n throw mapConfigurationError(\n \"This runtime does not provide btoa(), so Basic auth cannot be encoded safely\",\n );\n};\n\nconst resolveAuthorization = (\n config: PutioSdkConfigShape,\n auth: PutioAuth | undefined,\n): Effect.Effect<string | undefined, PutioSdkError> => {\n const resolvedAuth = auth ?? { type: \"config-token\" as const };\n\n switch (resolvedAuth.type) {\n case \"none\":\n return Effect.succeed(undefined);\n case \"token\":\n return Effect.succeed(`Token ${resolvedAuth.token}`);\n case \"basic\":\n return Effect.try({\n try: () => toBasicAuthorization(resolvedAuth.username, resolvedAuth.password),\n catch: mapConfigurationError,\n });\n case \"config-token\":\n if (!config.accessToken) {\n return Effect.fail(\n mapConfigurationError(\n \"This endpoint requires an access token, but PutioSdkConfig.accessToken is missing\",\n ),\n );\n }\n\n return Effect.succeed(`Token ${config.accessToken}`);\n }\n};\n\nconst normalizeFormValue = (value: unknown): string => {\n if (value === null || value === undefined) {\n return \"\";\n }\n\n if (typeof value === \"string\") {\n return value;\n }\n\n if (typeof value === \"number\" || typeof value === \"boolean\") {\n return String(value);\n }\n\n return JSON.stringify(value);\n};\n\nconst withBody = (body: PutioRequestBody): Effect.Effect<BodyInit | undefined, PutioSdkError> => {\n switch (body.type) {\n case \"none\":\n return Effect.succeed(undefined);\n case \"json\":\n return Effect.try({\n try: () => JSON.stringify(body.value),\n catch: mapDecodeErrorToValidationError,\n });\n case \"form\":\n return Effect.succeed(\n new URLSearchParams(\n Object.entries(body.value).flatMap(([key, value]) =>\n value === undefined ? [] : [[key, normalizeFormValue(value)]],\n ),\n ),\n );\n case \"form-data\":\n return Effect.succeed(body.value);\n }\n};\n\nconst makeRequest = (url: string, options: PutioRequestOptions, authorization?: string) =>\n Effect.gen(function* () {\n const headers = new Headers(options.headers);\n\n const body = options.body ?? { type: \"none\" as const };\n headers.set(\"accept\", \"application/json\");\n\n if (authorization) {\n headers.set(\"authorization\", authorization);\n }\n\n if (body.type === \"json\" && !headers.has(\"content-type\")) {\n headers.set(\"content-type\", \"application/json\");\n }\n\n return {\n body: yield* withBody(body),\n headers,\n method: options.method,\n url,\n };\n });\n\nconst executeRequest = (options: PutioRequestOptions) =>\n Effect.gen(function* () {\n const config = yield* PutioSdkConfig;\n const httpClient = yield* PutioHttpClient;\n const authorization = yield* resolveAuthorization(config, options.auth);\n const url = yield* Effect.try({\n try: () =>\n buildPutioUrl(\n options.baseUrl ?? config.baseUrl ?? DEFAULT_PUTIO_API_BASE_URL,\n options.path,\n options.query,\n ),\n catch: mapUrlBuildError,\n });\n const request = yield* makeRequest(url, options, authorization);\n\n return yield* httpClient.execute(request);\n });\n\nexport const requestJson = <S extends Schema.Top>(\n schema: S,\n options: PutioRequestOptions,\n): Effect.Effect<S[\"Type\"], PutioSdkError, PutioSdkContext | S[\"DecodingServices\"]> =>\n executeRequest(options).pipe(\n Effect.flatMap((response) =>\n isSuccessStatus(response.status)\n ? decodeSuccessJson(schema, response)\n : decodeFailure(response, response.headers).pipe(Effect.flatMap(Effect.fail)),\n ),\n );\n\nexport const selectJsonField =\n <K extends string>(field: K) =>\n <A extends { readonly [P in K]: unknown }, E, R>(\n effect: Effect.Effect<A, E, R>,\n ): Effect.Effect<A[K], E, R> =>\n effect.pipe(Effect.map((value) => value[field]));\n\nexport const selectJsonFields =\n <const K extends readonly string[]>(...fields: K) =>\n <A extends { readonly [P in K[number]]: unknown }, E, R>(\n effect: Effect.Effect<A, E, R>,\n ): Effect.Effect<Pick<A, K[number]>, E, R> =>\n effect.pipe(\n Effect.map(\n (value) =>\n Object.fromEntries(fields.map((field) => [field, value[field as K[number]]])) as Pick<\n A,\n K[number]\n >,\n ),\n );\n\nexport const requestArrayBuffer = (\n options: PutioRequestOptions,\n): Effect.Effect<Uint8Array, PutioSdkError, PutioSdkContext> =>\n executeRequest(options).pipe(\n Effect.flatMap((response) =>\n isSuccessStatus(response.status)\n ? response.arrayBuffer.pipe(\n Effect.mapError(mapTransportError),\n Effect.map((buffer) => new Uint8Array(buffer)),\n )\n : decodeFailure(response, response.headers).pipe(Effect.flatMap(Effect.fail)),\n ),\n );\n\nexport const requestVoid = (\n options: PutioRequestOptions,\n): Effect.Effect<void, PutioSdkError, PutioSdkContext> =>\n executeRequest(options).pipe(\n Effect.flatMap((response) =>\n isSuccessStatus(response.status)\n ? Effect.void\n : decodeFailure(response, response.headers).pipe(Effect.flatMap(Effect.fail)),\n ),\n );\n","type CsvValue = string | number;\n\nexport interface CursorSelectionInput<TValue extends CsvValue = number> {\n readonly cursor?: string;\n readonly excludeIds?: ReadonlyArray<TValue>;\n readonly ids?: ReadonlyArray<TValue>;\n}\n\nexport const joinCsv = <TValue extends CsvValue>(\n values: ReadonlyArray<TValue> | undefined,\n): string | undefined => (values && values.length > 0 ? values.join(\",\") : undefined);\n\nexport const toCursorSelectionForm = <\n TValue extends CsvValue,\n const TIdsFieldName extends string = \"file_ids\",\n>(\n selection: CursorSelectionInput<TValue>,\n idsFieldName?: TIdsFieldName,\n): {\n readonly cursor?: string;\n readonly exclude_ids?: string;\n} & Record<TIdsFieldName, string | undefined> => {\n const resolvedIdsFieldName = (idsFieldName ?? \"file_ids\") as TIdsFieldName;\n\n return {\n cursor: selection.cursor,\n exclude_ids: joinCsv(selection.excludeIds),\n [resolvedIdsFieldName]: joinCsv(selection.ids),\n } as {\n readonly cursor?: string;\n readonly exclude_ids?: string;\n } & Record<TIdsFieldName, string | undefined>;\n};\n"],"mappings":";;AAEA,MAAa,2BAA2B,OAAO,OAAO;CACpD,eAAe,OAAO,SAAS,OAAO,MAAM;CAC5C,YAAY,OAAO,SAAS,OAAO,MAAM;CACzC,aAAa,OAAO,SAAS,OAAO,GAAG;CACvC,SAAS,OAAO,SAAS,OAAO,OAAO;AACzC,CAAC;AA6ED,MAAM,wBACJ,UACA,UACqE;CACrE,IAAI,SAAS,cAAc,KAAA,GAAW;EACpC,IAAI,MAAM,KAAK,eAAe,SAAS,WACrC,OAAO;EAGT,OAAO,SAAS,eAAe,KAAA,KAAa,MAAM,WAAW,SAAS;CACxE;CAEA,IAAI,SAAS,eAAe,KAAA,GAC1B,OAAO,MAAM,WAAW,SAAS;CAGnC,OAAO;AACT;AAEA,MAAM,uBAAuB,UAC3B,MAAM,SAAS,mBAAmB,MAAM,SAAS;AAEnD,MAAM,YAAY,UAChB,OAAO,UAAU,YAAY,UAAU;AAEzC,MAAM,qBAAqB,QAA2C,QACpE,EAAE,OAA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X,YAEA,eAAe,OAAO,CAAC,CAAC,KACtB,OAAO,SAAS,aACd,gBAAgB,SAAS,MAAM,IAC3B,OAAO,OACP,cAAc,UAAU,SAAS,OAAO,CAAC,CAAC,KAAK,OAAO,QAAQ,OAAO,IAAI,CAAC,CAChF,CACF;;;AC3VF,MAAa,WACX,WACwB,UAAU,OAAO,SAAS,IAAI,OAAO,KAAK,GAAG,IAAI,KAAA;AAE3E,MAAa,yBAIX,WACA,iBAI+C;CAC/C,MAAM,uBAAwB,gBAAgB;CAE9C,OAAO;EACL,QAAQ,UAAU;EAClB,aAAa,QAAQ,UAAU,UAAU;GACxC,uBAAuB,QAAQ,UAAU,GAAG;CAC/C;AAIF"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { Context, Effect, Layer, Schema } from "effect";
|
|
2
|
-
import { Headers, HttpClient } from "effect/unstable/http";
|
|
3
|
-
import * as _$effect_Types0 from "effect/Types";
|
|
4
|
-
import * as _$effect_Cause0 from "effect/Cause";
|
|
5
|
-
import * as _$effect_SchemaAST0 from "effect/SchemaAST";
|
|
6
|
-
import * as _$effect_unstable_http_HttpClient0 from "effect/unstable/http/HttpClient";
|
|
7
2
|
|
|
8
3
|
//#region src/core/errors.d.ts
|
|
9
4
|
declare const PutioErrorEnvelopeSchema: Schema.Struct<{
|
|
@@ -14,8 +9,8 @@ declare const PutioErrorEnvelopeSchema: Schema.Struct<{
|
|
|
14
9
|
}>;
|
|
15
10
|
type PutioErrorEnvelope = Schema.Schema.Type<typeof PutioErrorEnvelopeSchema>;
|
|
16
11
|
interface PutioKnownErrorContract<TType extends string = string, TStatus extends number = number> {
|
|
17
|
-
readonly errorType?: TType;
|
|
18
|
-
readonly statusCode?: TStatus;
|
|
12
|
+
readonly errorType?: TType | undefined;
|
|
13
|
+
readonly statusCode?: TStatus | undefined;
|
|
19
14
|
}
|
|
20
15
|
type ContractErrorType<TContract extends PutioKnownErrorContract> = TContract extends PutioKnownErrorContract<infer TType, number> ? TType : never;
|
|
21
16
|
type ContractStatusCode<TContract extends PutioKnownErrorContract> = TContract extends PutioKnownErrorContract<string, infer TStatus> ? TStatus : never;
|
|
@@ -49,19 +44,19 @@ type PutioKnownOperationErrorContract = {
|
|
|
49
44
|
readonly errorType?: undefined;
|
|
50
45
|
readonly statusCode: number;
|
|
51
46
|
};
|
|
52
|
-
declare const PutioTransportError_base: new <A extends Record<string, any> = {}>(args:
|
|
47
|
+
declare const PutioTransportError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
53
48
|
readonly _tag: "PutioTransportError";
|
|
54
49
|
} & Readonly<A>;
|
|
55
50
|
declare class PutioTransportError extends PutioTransportError_base<{
|
|
56
51
|
readonly cause: unknown;
|
|
57
52
|
}> {}
|
|
58
|
-
declare const PutioConfigurationError_base: new <A extends Record<string, any> = {}>(args:
|
|
53
|
+
declare const PutioConfigurationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
59
54
|
readonly _tag: "PutioConfigurationError";
|
|
60
55
|
} & Readonly<A>;
|
|
61
56
|
declare class PutioConfigurationError extends PutioConfigurationError_base<{
|
|
62
57
|
readonly cause: unknown;
|
|
63
58
|
}> {}
|
|
64
|
-
declare const PutioValidationError_base: new <A extends Record<string, any> = {}>(args:
|
|
59
|
+
declare const PutioValidationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
65
60
|
readonly _tag: "PutioValidationError";
|
|
66
61
|
} & Readonly<A>;
|
|
67
62
|
declare class PutioValidationError extends PutioValidationError_base<{
|
|
@@ -75,7 +70,7 @@ declare const PutioApiError_base: Schema.Class<PutioApiError, Schema.TaggedStruc
|
|
|
75
70
|
readonly status_code: Schema.optional<Schema.Int>;
|
|
76
71
|
readonly details: Schema.optional<Schema.Unknown>;
|
|
77
72
|
}>;
|
|
78
|
-
}>,
|
|
73
|
+
}>, import("effect/Cause").YieldableError>;
|
|
79
74
|
declare class PutioApiError extends PutioApiError_base {}
|
|
80
75
|
declare const PutioAuthError_base: Schema.Class<PutioAuthError, Schema.TaggedStruct<"PutioAuthError", {
|
|
81
76
|
readonly status: Schema.Int;
|
|
@@ -85,7 +80,7 @@ declare const PutioAuthError_base: Schema.Class<PutioAuthError, Schema.TaggedStr
|
|
|
85
80
|
readonly status_code: Schema.optional<Schema.Int>;
|
|
86
81
|
readonly details: Schema.optional<Schema.Unknown>;
|
|
87
82
|
}>;
|
|
88
|
-
}>,
|
|
83
|
+
}>, import("effect/Cause").YieldableError>;
|
|
89
84
|
declare class PutioAuthError extends PutioAuthError_base {}
|
|
90
85
|
declare const PutioRateLimitError_base: Schema.Class<PutioRateLimitError, Schema.TaggedStruct<"PutioRateLimitError", {
|
|
91
86
|
readonly action: Schema.optional<Schema.String>;
|
|
@@ -101,9 +96,9 @@ declare const PutioRateLimitError_base: Schema.Class<PutioRateLimitError, Schema
|
|
|
101
96
|
readonly status_code: Schema.optional<Schema.Int>;
|
|
102
97
|
readonly details: Schema.optional<Schema.Unknown>;
|
|
103
98
|
}>;
|
|
104
|
-
}>,
|
|
99
|
+
}>, import("effect/Cause").YieldableError>;
|
|
105
100
|
declare class PutioRateLimitError extends PutioRateLimitError_base {}
|
|
106
|
-
declare const PutioOperationError_base: new <A extends Record<string, any> = {}>(args:
|
|
101
|
+
declare const PutioOperationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
107
102
|
readonly _tag: "PutioOperationError";
|
|
108
103
|
} & Readonly<A>;
|
|
109
104
|
declare class PutioOperationError<TDomain extends string, TOperation extends string, TContract extends PutioKnownOperationErrorContract> extends PutioOperationError_base<{
|
|
@@ -120,7 +115,7 @@ type PutioOperationErrorFromSpec<TSpec extends PutioOperationErrorSpec> = PutioO
|
|
|
120
115
|
type PutioOperationFailure<TSpec extends PutioOperationErrorSpec> = PutioUnhandledSdkError | PutioOperationErrorFromSpec<TSpec>;
|
|
121
116
|
type AnyPutioOperationError = PutioOperationError<string, string, PutioKnownOperationErrorContract>;
|
|
122
117
|
declare const definePutioOperationErrorSpec: <const TDomain extends string, const TOperation extends string, const TContracts extends ReadonlyArray<PutioKnownErrorContract>>(spec: PutioOperationErrorSpec<TDomain, TOperation, TContracts>) => PutioOperationErrorSpec<TDomain, TOperation, TContracts>;
|
|
123
|
-
declare const decodePutioErrorEnvelope: (input: unknown, options?:
|
|
118
|
+
declare const decodePutioErrorEnvelope: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
|
|
124
119
|
readonly error_message?: string | undefined;
|
|
125
120
|
readonly error_type?: string | undefined;
|
|
126
121
|
readonly status_code?: number | undefined;
|
|
@@ -132,7 +127,7 @@ declare const isPutioAuthError: (value: unknown) => value is PutioAuthError;
|
|
|
132
127
|
declare const isPutioRateLimitError: (value: unknown) => value is PutioRateLimitError;
|
|
133
128
|
declare const isPutioOperationError: (value: unknown) => value is AnyPutioOperationError;
|
|
134
129
|
declare const fallbackPutioErrorEnvelope: (status: number) => PutioErrorEnvelope;
|
|
135
|
-
declare const responseRateLimitHeaders: (headers: Headers
|
|
130
|
+
declare const responseRateLimitHeaders: (headers: Headers) => {
|
|
136
131
|
action: string | undefined;
|
|
137
132
|
id: string | undefined;
|
|
138
133
|
limit: string | undefined;
|
|
@@ -143,7 +138,7 @@ declare const responseRateLimitHeaders: (headers: Headers.Headers) => {
|
|
|
143
138
|
declare const mapDecodeErrorToValidationError: (cause: unknown) => PutioValidationError;
|
|
144
139
|
declare const mapConfigurationError: (cause: unknown) => PutioConfigurationError;
|
|
145
140
|
declare const mapTransportError: (cause: unknown) => PutioTransportError;
|
|
146
|
-
declare const makeResponseError: (status: number, headers: Headers
|
|
141
|
+
declare const makeResponseError: (status: number, headers: Headers, body: PutioErrorEnvelope) => PutioSdkError;
|
|
147
142
|
declare const parseErrorBody: (status: number, json: unknown) => Effect.Effect<{
|
|
148
143
|
readonly error_message?: string | undefined;
|
|
149
144
|
readonly error_type?: string | undefined;
|
|
@@ -165,10 +160,29 @@ interface PutioSdkConfigShape {
|
|
|
165
160
|
}
|
|
166
161
|
declare const PutioSdkConfig_base: Context.ServiceClass<PutioSdkConfig, "PutioSdkConfig", PutioSdkConfigShape>;
|
|
167
162
|
declare class PutioSdkConfig extends PutioSdkConfig_base {}
|
|
168
|
-
|
|
163
|
+
interface PutioHttpRequest {
|
|
164
|
+
readonly body?: BodyInit;
|
|
165
|
+
readonly headers: Headers;
|
|
166
|
+
readonly method: PutioRequestMethod;
|
|
167
|
+
readonly url: string;
|
|
168
|
+
}
|
|
169
|
+
interface PutioHttpResponse {
|
|
170
|
+
readonly arrayBuffer: Effect.Effect<ArrayBuffer, PutioSdkError>;
|
|
171
|
+
readonly headers: Headers;
|
|
172
|
+
readonly json: Effect.Effect<unknown, PutioSdkError>;
|
|
173
|
+
readonly status: number;
|
|
174
|
+
}
|
|
175
|
+
interface PutioHttpClientShape {
|
|
176
|
+
readonly execute: (request: PutioHttpRequest) => Effect.Effect<PutioHttpResponse, PutioSdkError>;
|
|
177
|
+
}
|
|
178
|
+
declare const PutioHttpClient_base: Context.ServiceClass<PutioHttpClient, "PutioHttpClient", PutioHttpClientShape>;
|
|
179
|
+
declare class PutioHttpClient extends PutioHttpClient_base {}
|
|
180
|
+
type PutioSdkContext = PutioSdkConfig | PutioHttpClient;
|
|
169
181
|
declare const makePutioSdkConfig: (config: PutioSdkConfigShape) => PutioSdkConfigShape;
|
|
170
182
|
declare const makePutioSdkLayer: (config: PutioSdkConfigShape) => Layer.Layer<PutioSdkConfig, never, never>;
|
|
171
|
-
declare const makePutioSdkLiveLayer: (config: PutioSdkConfigShape) => Layer.Layer<PutioSdkConfig |
|
|
183
|
+
declare const makePutioSdkLiveLayer: (config: PutioSdkConfigShape) => Layer.Layer<PutioSdkConfig | PutioHttpClient, never, never>;
|
|
184
|
+
declare const makePutioFetchLayer: (fetchImplementation?: typeof globalThis.fetch) => Layer.Layer<PutioHttpClient, never, never>;
|
|
185
|
+
declare const makePutioFetchClient: (fetchImplementation?: typeof globalThis.fetch) => PutioHttpClientShape;
|
|
172
186
|
declare const encodePathSegment: (value: PutioPathSegment) => string;
|
|
173
187
|
declare const buildPutioUrl: (baseUrl: string | URL, path: string, query?: PutioQuery) => string;
|
|
174
188
|
declare const OkResponseSchema: Schema.Struct<{
|
|
@@ -186,6 +200,7 @@ type PutioAuth = {
|
|
|
186
200
|
} | {
|
|
187
201
|
readonly type: "none";
|
|
188
202
|
};
|
|
203
|
+
type PutioRequestMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
189
204
|
type PutioRequestBody = {
|
|
190
205
|
readonly type: "none";
|
|
191
206
|
} | {
|
|
@@ -199,11 +214,11 @@ type PutioRequestBody = {
|
|
|
199
214
|
readonly value: FormData;
|
|
200
215
|
};
|
|
201
216
|
interface PutioRequestOptions {
|
|
202
|
-
readonly method:
|
|
217
|
+
readonly method: PutioRequestMethod;
|
|
203
218
|
readonly path: string;
|
|
204
219
|
readonly baseUrl?: string | URL;
|
|
205
220
|
readonly query?: PutioQuery;
|
|
206
|
-
readonly headers?:
|
|
221
|
+
readonly headers?: HeadersInit;
|
|
207
222
|
readonly auth?: PutioAuth;
|
|
208
223
|
readonly body?: PutioRequestBody;
|
|
209
224
|
}
|
|
@@ -985,6 +1000,15 @@ type GenerateTOTPError = PutioOperationFailure<typeof GenerateTOTPErrorSpec>;
|
|
|
985
1000
|
type VerifyTOTPError = PutioOperationFailure<typeof VerifyTOTPErrorSpec>;
|
|
986
1001
|
type RecoveryCodesError = PutioOperationFailure<typeof RecoveryCodesErrorSpec>;
|
|
987
1002
|
type RegenerateRecoveryCodesError = PutioOperationFailure<typeof RegenerateRecoveryCodesErrorSpec>;
|
|
1003
|
+
type LoginInput = {
|
|
1004
|
+
readonly clientId: string | number;
|
|
1005
|
+
readonly clientSecret: string;
|
|
1006
|
+
readonly password: string;
|
|
1007
|
+
readonly username: string;
|
|
1008
|
+
readonly callbackUrl?: string;
|
|
1009
|
+
readonly clientName?: string;
|
|
1010
|
+
readonly fingerprint?: string;
|
|
1011
|
+
};
|
|
988
1012
|
declare const buildAuthLoginUrl: (options: {
|
|
989
1013
|
readonly clientId: string | number;
|
|
990
1014
|
readonly redirectUri: string;
|
|
@@ -993,14 +1017,7 @@ declare const buildAuthLoginUrl: (options: {
|
|
|
993
1017
|
readonly clientName?: string;
|
|
994
1018
|
readonly webAppUrl?: string | URL;
|
|
995
1019
|
}) => string;
|
|
996
|
-
declare const login: (input:
|
|
997
|
-
readonly clientId: string | number;
|
|
998
|
-
readonly clientSecret: string;
|
|
999
|
-
readonly password: string;
|
|
1000
|
-
readonly username: string;
|
|
1001
|
-
readonly clientName?: string;
|
|
1002
|
-
readonly fingerprint?: string;
|
|
1003
|
-
}) => Effect.Effect<LoginResponse, LoginError, PutioSdkContext>;
|
|
1020
|
+
declare const login: (input: LoginInput) => Effect.Effect<LoginResponse, LoginError, PutioSdkContext>;
|
|
1004
1021
|
declare const logout: () => Effect.Effect<Schema.Schema.Type<typeof OkResponseSchema>, PutioSdkError, PutioSdkContext>;
|
|
1005
1022
|
declare const register: (input: RegisterInput) => Effect.Effect<{
|
|
1006
1023
|
readonly access_token: string;
|
|
@@ -5231,14 +5248,7 @@ declare const createPutioSdkEffectClient: () => {
|
|
|
5231
5248
|
}>>["voucher"], VoucherLookupError, PutioSdkContext>;
|
|
5232
5249
|
grants: () => Effect.Effect<ReadonlyArray<Schema.Schema.Type<typeof OAuthAppSchema>>, GrantsError, PutioSdkContext>;
|
|
5233
5250
|
linkDevice: (code: string) => Effect.Effect<Schema.Schema.Type<typeof OAuthAppSchema>, LinkDeviceError, PutioSdkContext>;
|
|
5234
|
-
login: (input:
|
|
5235
|
-
readonly clientId: string | number;
|
|
5236
|
-
readonly clientSecret: string;
|
|
5237
|
-
readonly password: string;
|
|
5238
|
-
readonly username: string;
|
|
5239
|
-
readonly clientName?: string;
|
|
5240
|
-
readonly fingerprint?: string;
|
|
5241
|
-
}) => Effect.Effect<LoginResponse, LoginError, PutioSdkContext>;
|
|
5251
|
+
login: (input: LoginInput) => Effect.Effect<LoginResponse, LoginError, PutioSdkContext>;
|
|
5242
5252
|
logout: () => Effect.Effect<Schema.Schema.Type<typeof OkResponseSchema>, PutioSdkError, PutioSdkContext>;
|
|
5243
5253
|
register: (input: RegisterInput) => Effect.Effect<{
|
|
5244
5254
|
readonly access_token: string;
|
|
@@ -5854,14 +5864,7 @@ declare const PutioSdk_base: Context.ServiceClass<PutioSdk, "PutioSdk", {
|
|
|
5854
5864
|
}>>["voucher"], VoucherLookupError, PutioSdkContext>;
|
|
5855
5865
|
grants: () => Effect.Effect<ReadonlyArray<Schema.Schema.Type<typeof OAuthAppSchema>>, GrantsError, PutioSdkContext>;
|
|
5856
5866
|
linkDevice: (code: string) => Effect.Effect<Schema.Schema.Type<typeof OAuthAppSchema>, LinkDeviceError, PutioSdkContext>;
|
|
5857
|
-
login: (input:
|
|
5858
|
-
readonly clientId: string | number;
|
|
5859
|
-
readonly clientSecret: string;
|
|
5860
|
-
readonly password: string;
|
|
5861
|
-
readonly username: string;
|
|
5862
|
-
readonly clientName?: string;
|
|
5863
|
-
readonly fingerprint?: string;
|
|
5864
|
-
}) => Effect.Effect<LoginResponse, LoginError, PutioSdkContext>;
|
|
5867
|
+
login: (input: LoginInput) => Effect.Effect<LoginResponse, LoginError, PutioSdkContext>;
|
|
5865
5868
|
logout: () => Effect.Effect<Schema.Schema.Type<typeof OkResponseSchema>, PutioSdkError, PutioSdkContext>;
|
|
5866
5869
|
register: (input: RegisterInput) => Effect.Effect<{
|
|
5867
5870
|
readonly access_token: string;
|
|
@@ -6418,7 +6421,7 @@ declare const PutioSdk_base: Context.ServiceClass<PutioSdk, "PutioSdk", {
|
|
|
6418
6421
|
}>;
|
|
6419
6422
|
declare class PutioSdk extends PutioSdk_base {}
|
|
6420
6423
|
declare const makePutioSdkEffectClientLayer: () => Layer.Layer<PutioSdk, never, never>;
|
|
6421
|
-
declare const makePutioSdkLiveClientLayer: (config: PutioSdkConfigShape) => Layer.Layer<PutioSdkConfig |
|
|
6424
|
+
declare const makePutioSdkLiveClientLayer: (config: PutioSdkConfigShape) => Layer.Layer<PutioSdkConfig | PutioHttpClient | PutioSdk, never, never>;
|
|
6422
6425
|
declare const createPutioSdkPromiseClient: (initialConfig?: PutioSdkConfigShape) => {
|
|
6423
6426
|
dispose: () => Promise<void>;
|
|
6424
6427
|
account: {
|
|
@@ -6528,14 +6531,7 @@ declare const createPutioSdkPromiseClient: (initialConfig?: PutioSdkConfigShape)
|
|
|
6528
6531
|
readonly name: string;
|
|
6529
6532
|
readonly website: string;
|
|
6530
6533
|
}>;
|
|
6531
|
-
login: (input:
|
|
6532
|
-
readonly clientId: string | number;
|
|
6533
|
-
readonly clientSecret: string;
|
|
6534
|
-
readonly password: string;
|
|
6535
|
-
readonly username: string;
|
|
6536
|
-
readonly clientName?: string;
|
|
6537
|
-
readonly fingerprint?: string;
|
|
6538
|
-
}) => Promise<LoginResponse>;
|
|
6534
|
+
login: (input: LoginInput) => Promise<LoginResponse>;
|
|
6539
6535
|
logout: () => Promise<{
|
|
6540
6536
|
readonly status: "OK";
|
|
6541
6537
|
}>;
|
|
@@ -7351,5 +7347,20 @@ declare const DEFAULT_PUTIO_API_BASE_URL = "https://api.put.io";
|
|
|
7351
7347
|
declare const DEFAULT_PUTIO_UPLOAD_BASE_URL = "https://upload.put.io";
|
|
7352
7348
|
declare const DEFAULT_PUTIO_WEB_APP_URL = "https://app.put.io";
|
|
7353
7349
|
//#endregion
|
|
7354
|
-
export { TransferSchema as $, ContinueFilesErrorSpec as $a, HistoryEvent as $c, AccountClearOptions as $d, PutioErrorEnvelope as $f, previewPaymentChangePlan as $i, FamilyInviteLookupErrorSpec as $l, GetRssFeedErrorSpec as $n, FileTypeSchema as $o, ListPaymentOptionsErrorSpec as $r, getFile as $s, GetPublicShareFileUrlErrorSpec as $t, getGiftCard as $u, TunnelRoute as A, approveFriendRequest as Aa, FamilyMemberSchema as Ac, OAuthAppWithTokenSchema as Ad, saveAccountSettings as Af, PreviewPaymentChangePlanError as Ai, DownloadLinksPayloadSchema as Al, SharingUnshareInputSchema as An, FileMediaInfo as Ao, retryAllRssFeedItems as Ar, buildFileApiContentUrl as As, RestoreTrashErrorSpec as At, RevokeOAuthClientError as Au, ListTransfersErrorSpec as B, CreateFriendInviteError as Ba, joinFamily as Bc, RegenerateOAuthAppTokenErrorSpec as Bd, encodePathSegment as Bf, UserSubscriptionStatusSchema as Bi, PutioJsonPrimitive as Bl, getSharingCloneInfo as Bn, FileQuery as Bo, CreateOpenNodeChargeError as Br, createFileUploadRequest as Bs, listTrash as Bt, VerifyTOTPResponse as Bu, ZipSummary as C, RemoveFriendErrorSpec as Ca, sendIftttEvent as Cc, OAuthAppCreateInput as Cd, SaveAccountSettingsPayload as Cf, PaymentProvider as Ci, CreateDownloadLinksError as Cl, SharingCloneInfoSchema as Cn, FileExtractionStatus as Co, mapDecodeErrorToValidationError as Cp, createRssFeed as Cr, QueryFilesErrorSpec as Cs, DeleteTrashError as Ct, RegisterErrorSpec as Cu, listZips as D, SendFriendRequestErrorSpec as Da, FamilyInviteSchema as Dc, OAuthAppSessionSchema as Dd, getAccountInfo as Df, PaymentTypeSchema as Di, DownloadLinksInfo as Dl, SharingShareInput as Dn, FileHlsStreamUrlOptions as Do, withOperationErrors as Dp, listRssFeeds as Dr, SearchFilesErrorSpec as Ds, ListTrashError as Dt, ResetPasswordErrorSpec as Du, getZip as E, SendFriendRequestError as Ea, FamilyInvite as Ec, OAuthAppSession as Ed, destroyAccount as Ef, PaymentSubscriptionInfoSchema as Ei, DownloadLinksCreateInputSchema as El, SharingCloneStatusSchema as En, FileExtractionsErrorSpec as Eo, responseRateLimitHeaders as Ep, listRssFeedItems as Er, SearchFilesError as Es, EmptyTrashErrorSpec as Et, ResetPasswordError as Eu, AddTransferError as F, listSentRequests as Fa, ListFamilyMembersError as Fc, PopularOAuthApp as Fd, PutioQueryValue as Ff, ReportPaymentsErrorSpec as Fi, createDownloadLinks as Fl, createPublicShare as Fn, FileMediaMetadataSchema as Fo, ConfirmFastspringOrderErrorSpec as Fr, continueSearch as Fs, TrashListQuery as Ft, TwoFactorRecoveryCodesSchema as Fu, StopRecordingTransferError as G, FriendInviteJoinedUserStatus as Ga, ClearEventsErrorSpec as Gc, createOAuthApp as Gd, requestJson as Gf, createOpenNodeCharge as Gi, readConfig as Gl, unshareFile as Gn, FileSort as Go, GetPaymentInfoErrorSpec as Gr, deleteFiles as Gs, CreatePublicShareErrorSpec as Gt, checkCodeMatch as Gu, ReannounceTransferErrorSpec as H, FriendInvite as Ha, listFamilyMembers as Hc, UpdateOAuthAppErrorSpec as Hd, makePutioSdkLayer as Hf, confirmFastspringOrder as Hi, deleteConfigKey as Hl, listPublicShares as Hn, FileRenameInput as Ho, CreatePaddleWaitingPaymentError as Hr, deleteFileExtraction as Hs, ContinuePublicShareFilesError as Ht, VoucherLookupError as Hu, AddTransferErrorSpec as I, listWaitingRequests as Ia, ListFamilyMembersErrorSpec as Ic, PopularOAuthAppSchema as Id, PutioSdkConfig as If, StopSubscriptionError as Ii, getDownloadLinks as Il, deletePublicShare as In, FileMp4Error as Io, CreateCoinbaseChargeError as Ir, convertFileSelectionToMp4 as Is, TrashListResponse as It, ValidateTokenResponse as Iu, TransferAddInput as J, ListFriendInvitesError as Ja, EventsListQuery as Jc, getPopularOAuthApps as Jd, selectJsonFields as Jf, getPaymentVoucherInfo as Ji, writeConfig as Jl, CreateRssFeedError as Jn, FileSubtitle as Jo, ListPaymentHistoryError as Jr, findNextVideo as Js, DeletePublicShareError as Jt, forgotPassword as Ju, StopRecordingTransferErrorSpec as K, FriendInviteJoinedUserStatusSchema as Ka, DeleteEventError as Kc, deleteOAuthApp as Kd, requestVoid as Kf, createPaddleWaitingPayment as Ki, readConfigWith as Kl, ClearRssFeedLogsError as Kn, FileSortSchema as Ko, GetPaymentVoucherInfoError as Kr, extractFiles as Ks, CreateSharingCloneError as Kt, clients as Ku, GetTransferError as L, removeFriend as La, RemoveFamilyMemberError as Lc, QueryOAuthAppsError as Ld, PutioSdkConfigShape as Lf, StopSubscriptionErrorSpec as Li, JsonObjectSchema as Ll, getPublicShare as Ln, FileMp4ErrorSpec as Lo, CreateCoinbaseChargeErrorSpec as Lr, convertFileToMp4 as Ls, continueTrash as Lt, ValidateTokenResponseSchema as Lu, listTunnelRoutes as M, denyFriendRequest as Ma, JoinFamilyErrorSpec as Mc, OAuthSetIconInputSchema as Md, PutioAuth as Mf, RedeemPaymentVoucherError as Mi, DownloadLinksStatusSchema as Ml, UnshareFileErrorSpec as Mn, FileMediaInfoSchema as Mo, updateRssFeed as Mr, buildFileApiMp4DownloadUrl as Ms, TrashContinueResponse as Mt, RevokeOAuthGrantError as Mu, AddManyTransfersError as N, getFriendSharedFolder as Na, ListFamilyInvitesError as Nc, OwnedOAuthApp as Nd, PutioPathSegment as Nf, RedeemPaymentVoucherErrorSpec as Ni, GetDownloadLinksError as Nl, cloneSharedFiles as Nn, FileMediaInfoStreamSchema as No, ClassifiedPaymentChangePlanSubmitResponse as Nr, buildFileHlsStreamUrl as Ns, TrashFile as Nt, RevokeOAuthGrantErrorSpec as Nu, ListTunnelRoutesError as O, UserSearchResult as Oa, FamilyInvitesResponse as Oc, OAuthAppUpdateInput as Od, getAccountSettings as Of, PaymentVoucherInfo as Oi, DownloadLinksInfoSchema as Ol, SharingShareInputSchema as On, FileListContinuationResponse as Oo, pauseRssFeed as Or, StartFromError as Os, ListTrashErrorSpec as Ot, RevokeAllOAuthClientsError as Ou, AddManyTransfersErrorSpec as P, listFriends as Pa, ListFamilyInvitesErrorSpec as Pc, OwnedOAuthAppSchema as Pd, PutioQuery as Pf, ReportPaymentsError as Pi, GetDownloadLinksErrorSpec as Pl, continuePublicShareFiles as Pn, FileMediaMetadata as Po, ConfirmFastspringOrderError as Pr, continueFiles as Ps, TrashFileSchema as Pt, TwoFactorRecoveryCodes as Pu, TransferLink as Q, ContinueFilesError as Qa, GetEventTorrentErrorSpec as Qc, updateOAuthApp as Qd, PutioConfigurationError as Qf, listPaymentPlans as Qi, FamilyInviteLookupError as Ql, GetRssFeedError as Qn, FileType as Qo, ListPaymentOptionsError as Qr, getDownloadUrl as Qs, GetPublicShareFileUrlError as Qt, getFriendInvite as Qu, GetTransferErrorSpec as R, searchFriends as Ra, RemoveFamilyMemberErrorSpec as Rc, QueryOAuthAppsErrorSpec as Rd, PutioSdkContext as Rf, SubmitPaymentChangePlanError as Ri, JsonValueSchema as Rl, getPublicShareFileUrl as Rn, FileMp4MutationError as Ro, CreateNanoPaymentRequestError as Rr, convertFilesToMp4 as Rs, deleteTrash as Rt, VerifyTOTPError as Ru, ZipStatusSchema as S, RemoveFriendError as Sa, getIftttStatus as Sc, OAuthApp as Sd, SaveAccountSettingsErrorSpec as Sf, PaymentPlanTypeSchema as Si, listEvents as Sl, SharingCloneInfo as Sn, FileExtractionSchema as So, mapConfigurationError as Sp, clearRssFeedLogs as Sr, QueryFilesError as Ss, ContinueTrashErrorSpec as St, RegisterError as Su, createZip as T, SearchFriendsErrorSpec as Ta, CreateFamilyInviteErrorSpec as Tc, OAuthAppSchema as Td, clearAccount as Tf, PaymentProviderSchema as Ti, DownloadLinksCreateInput as Tl, SharingCloneInputSchema as Tn, FileExtractionsError as To, parseErrorBody as Tp, getRssFeed as Tr, RenameFileErrorSpec as Ts, EmptyTrashError as Tt, RegisterInputSchema as Tu, RetryTransferError as U, FriendInviteJoinedUser as Ua, removeFamilyMember as Uc, buildOAuthAppIconUrl as Ud, makePutioSdkLiveLayer as Uf, createCoinbaseCharge as Ui, getConfigKey as Ul, listSharedFiles as Un, FileResponseFor as Uo, CreatePaddleWaitingPaymentErrorSpec as Ur, deleteFileMp4 as Us, ContinuePublicShareFilesErrorSpec as Ut, VoucherLookupErrorSpec as Uu, ReannounceTransferError as V, CreateFriendInviteErrorSpec as Va, listFamilyInvites as Vc, UpdateOAuthAppError as Vd, makePutioSdkConfig as Vf, classifyPaymentChangePlanResponse as Vi, PutioJsonValue as Vl, listPublicShareFiles as Vn, FileQuerySchema as Vo, CreateOpenNodeChargeErrorSpec as Vr, createFolder as Vs, restoreTrash as Vt, VerifyTOTPResponseSchema as Vu, RetryTransferErrorSpec as W, FriendInviteJoinedUserSchema as Wa, ClearEventsError as Wc, buildOAuthAuthorizeUrl as Wd, requestArrayBuffer as Wf, createNanoPaymentRequest as Wi, getConfigKeyWith as Wl, shareFiles as Wn, FileSearchResponse as Wo, GetPaymentInfoError as Wr, deleteFileSelection as Ws, CreatePublicShareError as Wt, buildAuthLoginUrl as Wu, TransferBaseSchema as X, createFriendInvite as Xa, EventsListResponse as Xc, regenerateOAuthAppToken as Xd, PutioApiError as Xf, listPaymentInvites as Xi, ClientsError as Xl, DeleteRssFeedError as Xn, FileSubtitlesError as Xo, ListPaymentInvitesError as Xr, getApiDownloadUrl as Xs, GetPublicShareError as Xt, getCode as Xu, TransferAddInputSchema as Y, ListFriendInvitesErrorSpec as Ya, EventsListQuerySchema as Yc, queryOAuthApps as Yd, AnyPutioOperationError as Yf, listPaymentHistory as Yi, AuthorizationCodeSchema as Yl, CreateRssFeedErrorSpec as Yn, FileSubtitleSchema as Yo, ListPaymentHistoryErrorSpec as Yr, getApiContentUrl as Ys, DeletePublicShareErrorSpec as Yt, generateTOTP as Yu, TransferInfoItem as Z, listFriendInvites as Za, GetEventTorrentError as Zc, setOAuthAppIcon as Zd, PutioAuthError as Zf, listPaymentOptions as Zi, ClientsErrorSpec as Zl, DeleteRssFeedErrorSpec as Zn, FileSubtitlesErrorSpec as Zo, ListPaymentInvitesErrorSpec as Zr, getApiMp4DownloadUrl as Zs, GetPublicShareErrorSpec as Zt, getFamilyInvite as Zu, GetZipErrorSpec as _, ListFriendsErrorSpec as _a, GetIftttStatusErrorSpec as _c, DeleteOAuthAppErrorSpec as _d, AccountWarnings as _f, PaymentOptionPlanTypeSchema as _i, ListEventsError as _l, SharedFileSchema as _n, FileConversionStatusSchema as _o, isPutioAuthError as _p, RssFeedParams as _r, FilesSearchQuerySchema as _s, listTransfers as _t, LoginResponseSchema as _u, PutioSdkEffectClient as a, ApproveFriendRequestErrorSpec as aa, listFileSubtitles as ac, logout as ad, AccountDisk as af, PaymentChangePlanSubmitInput as ai, HistoryKnownEventTypeSchema as al, ListPublicShareFilesErrorSpec as an, FileActiveConversionSchema as ao, PutioOperationErrorSpec as ap, PauseRssFeedErrorSpec as ar, FileUploadResult as as, TransfersContinueResponse as at, GenerateTOTPErrorSpec as au, ZipCreateResponse as b, ListWaitingRequestsError as ba, SendIftttEventError as bc, MyOAuthApp as bd, PasInfoSchema as bf, PaymentPlanGroup as bi, deleteEvent as bl, SharedFileSharedWith as bn, FileDirectAccessOptions as bo, isPutioRateLimitError as bp, UpdateRssFeedError as br, GetFileError as bs, stopTransferRecording as bt, RegenerateRecoveryCodesError as bu, createPutioSdkPromiseClient as c, DenyFriendRequestError as ca, putMp4ToMyFiles as cc, resetPassword as cd, AccountInfoBaseSchema as cf, PaymentHistoryItem as ci, HistoryTransferCallbackErrorEventSchema as cl, ListSharedFilesError as cn, FileApiDownloadUrlOptions as co, PutioSdkError as cp, RetryAllRssFeedItemsError as cr, FileWatchStatusError as cs, TransfersListResponse as ct, GiftCardLookupError as cu, CancelZipError as d, FriendBase as da, resetStartFrom as dc, revokeClient as dd, AccountInfoQuery as df, PaymentInfo as di, HistoryTransferErrorEventSchema as dl, PublicShareListQuery as dn, FileBaseSchema as do, PutioUnhandledSdkError as dp, RetryRssFeedItemErrorSpec as dr, FilesListEnvelopeSchema as ds, cancelTransfers as dt, GrantsErrorSpec as du, redeemPaymentVoucher as ea, getHlsStreamUrl as ec, getRecoveryCodes as ed, AccountClearOptionsSchema as ef, ListPaymentPlansError as ei, HistoryEventSchema as el, GetSharedWithError as en, CreateFolderError as eo, PutioErrorEnvelopeSchema as ep, ListRssFeedItemsError as er, FileUploadEnvelope as es, TransferStatus as et, ForgotPasswordError as eu, CancelZipErrorSpec as f, FriendBaseSchema as fa, searchFiles as fc, validateToken as fd, AccountInfoQuerySchema as ff, PaymentInfoPlanSchema as fi, HistoryTransferFromRssErrorEventSchema as fl, PublicShareListQuerySchema as fn, FileBreadcrumb as fo, PutioValidationError as fp, RssFeed as fr, FilesListQuery as fs, cleanTransfers as ft, LinkDeviceError as fu, GetZipError as g, ListFriendsError as ga, GetIftttStatusError as gc, DeleteOAuthAppError as gd, AccountTwoFactorSettingsSchema as gf, PaymentOption as gi, HistoryZipCreatedEventSchema as gl, SharedFile as gn, FileConversionStatus as go, isPutioApiError as gp, RssFeedItemSucceededSchema as gr, FilesSearchQuery as gs, getTransferInfo as gt, LoginResponse as gu, CreateZipInput as h, FriendSharedFolderErrorSpec as ha, uploadFile as hc, CreateOAuthAppErrorSpec as hd, AccountSettingsSchema as hf, PaymentInviteSchema as hi, HistoryZipCreatedEvent as hl, ShareFilesErrorSpec as hn, FileBroadSchema as ho, fallbackPutioErrorEnvelope as hp, RssFeedItemSchema as hr, FilesMoveErrorSchema as hs, getTransfer as ht, LoginErrorSpec as hu, PutioSdk as i, ApproveFriendRequestError as ia, listFileExtractions as ic, login as id, AccountConfirmationsErrorSpec as if, PaymentChangePlanPreviewSchema as ii, HistoryKnownEventType as il, ListPublicShareFilesError as in, FileActiveConversion as io, PutioOperationErrorFromSpec as ip, PauseRssFeedError as ir, FileUploadRequestDescriptor as is, TransfersAddMultiError as it, GenerateTOTPError as iu, TunnelRouteSchema as j, countWaitingRequests as ja, JoinFamilyError as jc, OAuthSetIconInput as jd, OkResponseSchema as jf, PreviewPaymentChangePlanErrorSpec as ji, DownloadLinksStatus as jl, UnshareFileError as jn, FileMediaInfoFormatSchema as jo, retryRssFeedItem as jr, buildFileApiDownloadUrl as js, TrashBulkInput as jt, RevokeOAuthClientErrorSpec as ju, ListTunnelRoutesErrorSpec as k, UserSearchResultSchema as ka, FamilyMember as kc, OAuthAppUpdateInputSchema as kd, listAccountConfirmations as kf, PaymentVoucherInfoSchema as ki, DownloadLinksPayload as kl, SharingUnshareInput as kn, FileListResponse as ko, resumeRssFeed as kr, StartFromErrorSpec as ks, RestoreTrashError as kt, RevokeAllOAuthClientsErrorSpec as ku, makePutioSdkEffectClientLayer as l, DenyFriendRequestErrorSpec as la, queryFiles as lc, revokeAllClients as ld, AccountInfoBroad as lf, PaymentHistoryItemSchema as li, HistoryTransferCompletedEvent as ll, ListSharedFilesErrorSpec as ln, FileApiMp4DownloadUrlOptions as lo, PutioTransportError as lp, RetryAllRssFeedItemsErrorSpec as lr, FileWatchStatusErrorSpec as ls, addManyTransfers as lt, GiftCardLookupErrorSpec as lu, CreateZipErrorSpec as m, FriendSharedFolderError as ma, setStartFrom as mc, CreateOAuthAppError as md, AccountSettings as mf, PaymentInvite as mi, HistoryVoucherEventSchema as ml, ShareFilesError as mn, FileBroad as mo, definePutioOperationErrorSpec as mp, RssFeedItemFailedSchema as mr, FilesMoveError as ms, countTransfers as mt, LoginError as mu, DEFAULT_PUTIO_UPLOAD_BASE_URL as n, stopPaymentSubscription as na, getStartFrom as nc, grants as nd, AccountConfirmationSchema as nf, PaymentChangePlanPreview as ni, HistoryFileSharedEvent as nl, GetSharingCloneInfoError as nn, DownloadUrlError as no, PutioKnownOperationErrorContract as np, ListRssFeedsError as nr, FileUploadErrorSpec as ns, TransferType as nt, FriendInviteLookupError as nu, PutioSdkPromiseClient as o, CountWaitingRequestsError as oa, moveFileSelection as oc, regenerateRecoveryCodes as od, AccountDiskSchema as of, PaymentChangePlanSubmitResponse as oi, HistoryPrivateTorrentPinEventSchema as ol, ListPublicSharesError as on, FileActiveConversionsError as oo, PutioOperationFailure as op, ResumeRssFeedError as or, FileUploadTransfer as os, TransfersListQuery as ot, GenerateTOTPResponse as ou, CreateZipError as p, FriendSchema as pa, setFilesWatchStatus as pc, verifyTOTP as pd, AccountInfoResponseFor as pf, PaymentInfoSchema as pi, HistoryUploadEventSchema as pl, PublicShareSchema as pn, FileBreadcrumbSchema as po, decodePutioErrorEnvelope as pp, RssFeedItem as pr, FilesListQuerySchema as ps, continueTransfers as pt, LinkDeviceErrorSpec as pu, Transfer as q, FriendInviteSchema as qa, DeleteEventErrorSpec as qc, getOAuthApp as qd, selectJsonField as qf, getPaymentInfo as qi, setConfigKey as ql, ClearRssFeedLogsErrorSpec as qn, FileStartFromSetInput as qo, GetPaymentVoucherInfoErrorSpec as qr, findNextFile as qs, CreateSharingCloneErrorSpec as qt, exists as qu, DEFAULT_PUTIO_WEB_APP_URL as r, submitPaymentChangePlan as ra, listActiveMp4Conversions as rc, linkDevice as rd, AccountConfirmationsError as rf, PaymentChangePlanPreviewInput as ri, HistoryFileSharedEventSchema as rl, GetSharingCloneInfoErrorSpec as rn, DownloadUrlErrorSpec as ro, PutioOperationError as rp, ListRssFeedsErrorSpec as rr, FileUploadInput as rs, TransferTypeSchema as rt, FriendInviteLookupErrorSpec as ru, createPutioSdkEffectClient as s, CountWaitingRequestsErrorSpec as sa, moveFiles as sc, register as sd, AccountInfoBase as sf, PaymentChangePlanSubmitSchema as si, HistoryRssFilterPausedEventSchema as sl, ListPublicSharesErrorSpec as sn, FileActiveConversionsErrorSpec as so, PutioRateLimitError as sp, ResumeRssFeedErrorSpec as sr, FileVideoMetadata as ss, TransfersListQuerySchema as st, GenerateTOTPResponseSchema as su, DEFAULT_PUTIO_API_BASE_URL as t, reportPayments as ta, getMp4Status as tc, getVoucher as td, AccountConfirmation as tf, ListPaymentPlansErrorSpec as ti, HistoryFileFromRssDeletedEventSchema as tl, GetSharedWithErrorSpec as tn, CreateFolderErrorSpec as to, PutioKnownErrorContract as tp, ListRssFeedItemsErrorSpec as tr, FileUploadError as ts, TransferStatusSchema as tt, ForgotPasswordErrorSpec as tu, makePutioSdkLiveClientLayer as u, Friend as ua, renameFile as uc, revokeApp as ud, AccountInfoBroadSchema as uf, PaymentHistoryQuery as ui, HistoryTransferCompletedEventSchema as ul, PublicShare as un, FileBase as uo, PutioTypedErrorEnvelope as up, RetryRssFeedItemError as ur, FilesBulkSelection as us, addTransfer as ut, GrantsError as uu, ListZipsError as v, ListSentRequestsError as va, IftttEventInput as vc, GetOAuthAppError as vd, AccountWarningsSchema as vf, PaymentOptionSchema as vi, ListEventsErrorSpec as vl, SharedFileShare as vn, FileCore as vo, isPutioErrorEnvelope as vp, RssFeedParamsSchema as vr, FolderType as vs, reannounceTransfer as vt, RecoveryCodesError as vu, cancelZip as w, SearchFriendsError as wa, CreateFamilyInviteError as wc, OAuthAppCreateInputSchema as wd, SaveAccountSettingsPayloadSchema as wf, PaymentProviderNameSchema as wi, CreateDownloadLinksErrorSpec as wl, SharingCloneInput as wn, FileExtractionStatusSchema as wo, mapTransportError as wp, deleteRssFeed as wr, RenameFileError as ws, DeleteTrashErrorSpec as wt, RegisterInput as wu, ZipInfo as x, ListWaitingRequestsErrorSpec as xa, SendIftttEventErrorSpec as xc, MyOAuthAppSchema as xd, SaveAccountSettingsError as xf, PaymentPlanGroupSchema as xi, getEventTorrent as xl, SharedFileSharedWithSchema as xn, FileExtraction as xo, makeResponseError as xp, UpdateRssFeedErrorSpec as xr, GetFileErrorSpec as xs, ContinueTrashError as xt, RegenerateRecoveryCodesErrorSpec as xu, ListZipsErrorSpec as y, ListSentRequestsErrorSpec as ya, IftttEventType as yc, GetOAuthAppErrorSpec as yd, PasInfo as yf, PaymentPaddleWaitingPaymentInput as yi, clearEvents as yl, SharedFileShareSchema as yn, FileCreateFolderInput as yo, isPutioOperationError as yp, RssFeedSchema as yr, FolderTypeSchema as ys, retryTransfer as yt, RecoveryCodesErrorSpec as yu, ListTransfersError as z, sendFriendRequest as za, createFamilyInvite as zc, RegenerateOAuthAppTokenError as zd, buildPutioUrl as zf, SubmitPaymentChangePlanErrorSpec as zi, PutioJsonObject as zl, getSharedWith as zn, FileMp4MutationErrorSpec as zo, CreateNanoPaymentRequestErrorSpec as zr, createFileUploadFormData as zs, emptyTrash as zt, VerifyTOTPErrorSpec as zu };
|
|
7355
|
-
|
|
7350
|
+
//#region src/index.d.ts
|
|
7351
|
+
declare global {
|
|
7352
|
+
interface SymbolConstructor {
|
|
7353
|
+
readonly asyncDispose: unique symbol;
|
|
7354
|
+
readonly dispose: unique symbol;
|
|
7355
|
+
}
|
|
7356
|
+
interface AsyncDisposable {
|
|
7357
|
+
[Symbol.asyncDispose](): PromiseLike<void>;
|
|
7358
|
+
}
|
|
7359
|
+
interface Disposable {
|
|
7360
|
+
[Symbol.dispose](): void;
|
|
7361
|
+
}
|
|
7362
|
+
var SchemaErrorTypeId: symbol;
|
|
7363
|
+
}
|
|
7364
|
+
//#endregion
|
|
7365
|
+
export { TransferSchema as $, ContinueFilesErrorSpec as $a, HistoryEvent as $c, updateOAuthApp as $d, requestVoid as $f, previewPaymentChangePlan as $i, FamilyInviteLookupErrorSpec as $l, GetRssFeedErrorSpec as $n, FileTypeSchema as $o, ListPaymentOptionsErrorSpec as $r, getFile as $s, GetPublicShareFileUrlErrorSpec as $t, getFriendInvite as $u, TunnelRoute as A, approveFriendRequest as Aa, FamilyMemberSchema as Ac, OAuthAppUpdateInputSchema as Ad, listAccountConfirmations as Af, PreviewPaymentChangePlanError as Ai, DownloadLinksPayloadSchema as Al, SharingUnshareInputSchema as An, FileMediaInfo as Ao, mapDecodeErrorToValidationError as Ap, retryAllRssFeedItems as Ar, buildFileApiContentUrl as As, RestoreTrashErrorSpec as At, RevokeAllOAuthClientsErrorSpec as Au, ListTransfersErrorSpec as B, CreateFriendInviteError as Ba, joinFamily as Bc, RegenerateOAuthAppTokenError as Bd, PutioQueryValue as Bf, UserSubscriptionStatusSchema as Bi, PutioJsonPrimitive as Bl, getSharingCloneInfo as Bn, FileQuery as Bo, CreateOpenNodeChargeError as Br, createFileUploadRequest as Bs, listTrash as Bt, VerifyTOTPErrorSpec as Bu, ZipSummary as C, RemoveFriendErrorSpec as Ca, sendIftttEvent as Cc, OAuthApp as Cd, SaveAccountSettingsErrorSpec as Cf, PaymentProvider as Ci, CreateDownloadLinksError as Cl, SharingCloneInfoSchema as Cn, FileExtractionStatus as Co, isPutioApiError as Cp, createRssFeed as Cr, QueryFilesErrorSpec as Cs, DeleteTrashError as Ct, RegisterError as Cu, listZips as D, SendFriendRequestErrorSpec as Da, FamilyInviteSchema as Dc, OAuthAppSession as Dd, destroyAccount as Df, PaymentTypeSchema as Di, DownloadLinksInfo as Dl, SharingShareInput as Dn, FileHlsStreamUrlOptions as Do, isPutioRateLimitError as Dp, listRssFeeds as Dr, SearchFilesErrorSpec as Ds, ListTrashError as Dt, ResetPasswordError as Du, getZip as E, SendFriendRequestError as Ea, FamilyInvite as Ec, OAuthAppSchema as Ed, clearAccount as Ef, PaymentSubscriptionInfoSchema as Ei, DownloadLinksCreateInputSchema as El, SharingCloneStatusSchema as En, FileExtractionsErrorSpec as Eo, isPutioOperationError as Ep, listRssFeedItems as Er, SearchFilesError as Es, EmptyTrashErrorSpec as Et, RegisterInputSchema as Eu, AddTransferError as F, listSentRequests as Fa, ListFamilyMembersError as Fc, OwnedOAuthAppSchema as Fd, PutioHttpClientShape as Ff, ReportPaymentsErrorSpec as Fi, createDownloadLinks as Fl, createPublicShare as Fn, FileMediaMetadataSchema as Fo, ConfirmFastspringOrderErrorSpec as Fr, continueSearch as Fs, TrashListQuery as Ft, TwoFactorRecoveryCodes as Fu, StopRecordingTransferError as G, FriendInviteJoinedUserStatus as Ga, ClearEventsErrorSpec as Gc, buildOAuthAuthorizeUrl as Gd, encodePathSegment as Gf, createOpenNodeCharge as Gi, readConfig as Gl, unshareFile as Gn, FileSort as Go, GetPaymentInfoErrorSpec as Gr, deleteFiles as Gs, CreatePublicShareErrorSpec as Gt, buildAuthLoginUrl as Gu, ReannounceTransferErrorSpec as H, FriendInvite as Ha, listFamilyMembers as Hc, UpdateOAuthAppError as Hd, PutioSdkConfigShape as Hf, confirmFastspringOrder as Hi, deleteConfigKey as Hl, listPublicShares as Hn, FileRenameInput as Ho, CreatePaddleWaitingPaymentError as Hr, deleteFileExtraction as Hs, ContinuePublicShareFilesError as Ht, VerifyTOTPResponseSchema as Hu, AddTransferErrorSpec as I, listWaitingRequests as Ia, ListFamilyMembersErrorSpec as Ic, PopularOAuthApp as Id, PutioHttpRequest as If, StopSubscriptionError as Ii, getDownloadLinks as Il, deletePublicShare as In, FileMp4Error as Io, CreateCoinbaseChargeError as Ir, convertFileSelectionToMp4 as Is, TrashListResponse as It, TwoFactorRecoveryCodesSchema as Iu, TransferAddInput as J, ListFriendInvitesError as Ja, EventsListQuery as Jc, getOAuthApp as Jd, makePutioSdkConfig as Jf, getPaymentVoucherInfo as Ji, writeConfig as Jl, CreateRssFeedError as Jn, FileSubtitle as Jo, ListPaymentHistoryError as Jr, findNextVideo as Js, DeletePublicShareError as Jt, exists as Ju, StopRecordingTransferErrorSpec as K, FriendInviteJoinedUserStatusSchema as Ka, DeleteEventError as Kc, createOAuthApp as Kd, makePutioFetchClient as Kf, createPaddleWaitingPayment as Ki, readConfigWith as Kl, ClearRssFeedLogsError as Kn, FileSortSchema as Ko, GetPaymentVoucherInfoError as Kr, extractFiles as Ks, CreateSharingCloneError as Kt, checkCodeMatch as Ku, GetTransferError as L, removeFriend as La, RemoveFamilyMemberError as Lc, PopularOAuthAppSchema as Ld, PutioHttpResponse as Lf, StopSubscriptionErrorSpec as Li, JsonObjectSchema as Ll, getPublicShare as Ln, FileMp4ErrorSpec as Lo, CreateCoinbaseChargeErrorSpec as Lr, convertFileToMp4 as Ls, continueTrash as Lt, ValidateTokenResponse as Lu, listTunnelRoutes as M, denyFriendRequest as Ma, JoinFamilyErrorSpec as Mc, OAuthSetIconInput as Md, OkResponseSchema as Mf, RedeemPaymentVoucherError as Mi, DownloadLinksStatusSchema as Ml, UnshareFileErrorSpec as Mn, FileMediaInfoSchema as Mo, parseErrorBody as Mp, updateRssFeed as Mr, buildFileApiMp4DownloadUrl as Ms, TrashContinueResponse as Mt, RevokeOAuthClientErrorSpec as Mu, AddManyTransfersError as N, getFriendSharedFolder as Na, ListFamilyInvitesError as Nc, OAuthSetIconInputSchema as Nd, PutioAuth as Nf, RedeemPaymentVoucherErrorSpec as Ni, GetDownloadLinksError as Nl, cloneSharedFiles as Nn, FileMediaInfoStreamSchema as No, responseRateLimitHeaders as Np, ClassifiedPaymentChangePlanSubmitResponse as Nr, buildFileHlsStreamUrl as Ns, TrashFile as Nt, RevokeOAuthGrantError as Nu, ListTunnelRoutesError as O, UserSearchResult as Oa, FamilyInvitesResponse as Oc, OAuthAppSessionSchema as Od, getAccountInfo as Of, PaymentVoucherInfo as Oi, DownloadLinksInfoSchema as Ol, SharingShareInputSchema as On, FileListContinuationResponse as Oo, makeResponseError as Op, pauseRssFeed as Or, StartFromError as Os, ListTrashErrorSpec as Ot, ResetPasswordErrorSpec as Ou, AddManyTransfersErrorSpec as P, listFriends as Pa, ListFamilyInvitesErrorSpec as Pc, OwnedOAuthApp as Pd, PutioHttpClient as Pf, ReportPaymentsError as Pi, GetDownloadLinksErrorSpec as Pl, continuePublicShareFiles as Pn, FileMediaMetadata as Po, withOperationErrors as Pp, ConfirmFastspringOrderError as Pr, continueFiles as Ps, TrashFileSchema as Pt, RevokeOAuthGrantErrorSpec as Pu, TransferLink as Q, ContinueFilesError as Qa, GetEventTorrentErrorSpec as Qc, setOAuthAppIcon as Qd, requestJson as Qf, listPaymentPlans as Qi, FamilyInviteLookupError as Ql, GetRssFeedError as Qn, FileType as Qo, ListPaymentOptionsError as Qr, getDownloadUrl as Qs, GetPublicShareFileUrlError as Qt, getFamilyInvite as Qu, GetTransferErrorSpec as R, searchFriends as Ra, RemoveFamilyMemberErrorSpec as Rc, QueryOAuthAppsError as Rd, PutioPathSegment as Rf, SubmitPaymentChangePlanError as Ri, JsonValueSchema as Rl, getPublicShareFileUrl as Rn, FileMp4MutationError as Ro, CreateNanoPaymentRequestError as Rr, convertFilesToMp4 as Rs, deleteTrash as Rt, ValidateTokenResponseSchema as Ru, ZipStatusSchema as S, RemoveFriendError as Sa, getIftttStatus as Sc, MyOAuthAppSchema as Sd, SaveAccountSettingsError as Sf, PaymentPlanTypeSchema as Si, listEvents as Sl, SharingCloneInfo as Sn, FileExtractionSchema as So, fallbackPutioErrorEnvelope as Sp, clearRssFeedLogs as Sr, QueryFilesError as Ss, ContinueTrashErrorSpec as St, RegenerateRecoveryCodesErrorSpec as Su, createZip as T, SearchFriendsErrorSpec as Ta, CreateFamilyInviteErrorSpec as Tc, OAuthAppCreateInputSchema as Td, SaveAccountSettingsPayloadSchema as Tf, PaymentProviderSchema as Ti, DownloadLinksCreateInput as Tl, SharingCloneInputSchema as Tn, FileExtractionsError as To, isPutioErrorEnvelope as Tp, getRssFeed as Tr, RenameFileErrorSpec as Ts, EmptyTrashError as Tt, RegisterInput as Tu, RetryTransferError as U, FriendInviteJoinedUser as Ua, removeFamilyMember as Uc, UpdateOAuthAppErrorSpec as Ud, PutioSdkContext as Uf, createCoinbaseCharge as Ui, getConfigKey as Ul, listSharedFiles as Un, FileResponseFor as Uo, CreatePaddleWaitingPaymentErrorSpec as Ur, deleteFileMp4 as Us, ContinuePublicShareFilesErrorSpec as Ut, VoucherLookupError as Uu, ReannounceTransferError as V, CreateFriendInviteErrorSpec as Va, listFamilyInvites as Vc, RegenerateOAuthAppTokenErrorSpec as Vd, PutioSdkConfig as Vf, classifyPaymentChangePlanResponse as Vi, PutioJsonValue as Vl, listPublicShareFiles as Vn, FileQuerySchema as Vo, CreateOpenNodeChargeErrorSpec as Vr, createFolder as Vs, restoreTrash as Vt, VerifyTOTPResponse as Vu, RetryTransferErrorSpec as W, FriendInviteJoinedUserSchema as Wa, ClearEventsError as Wc, buildOAuthAppIconUrl as Wd, buildPutioUrl as Wf, createNanoPaymentRequest as Wi, getConfigKeyWith as Wl, shareFiles as Wn, FileSearchResponse as Wo, GetPaymentInfoError as Wr, deleteFileSelection as Ws, CreatePublicShareError as Wt, VoucherLookupErrorSpec as Wu, TransferBaseSchema as X, createFriendInvite as Xa, EventsListResponse as Xc, queryOAuthApps as Xd, makePutioSdkLiveLayer as Xf, listPaymentInvites as Xi, ClientsError as Xl, DeleteRssFeedError as Xn, FileSubtitlesError as Xo, ListPaymentInvitesError as Xr, getApiDownloadUrl as Xs, GetPublicShareError as Xt, generateTOTP as Xu, TransferAddInputSchema as Y, ListFriendInvitesErrorSpec as Ya, EventsListQuerySchema as Yc, getPopularOAuthApps as Yd, makePutioSdkLayer as Yf, listPaymentHistory as Yi, AuthorizationCodeSchema as Yl, CreateRssFeedErrorSpec as Yn, FileSubtitleSchema as Yo, ListPaymentHistoryErrorSpec as Yr, getApiContentUrl as Ys, DeletePublicShareErrorSpec as Yt, forgotPassword as Yu, TransferInfoItem as Z, listFriendInvites as Za, GetEventTorrentError as Zc, regenerateOAuthAppToken as Zd, requestArrayBuffer as Zf, listPaymentOptions as Zi, ClientsErrorSpec as Zl, DeleteRssFeedErrorSpec as Zn, FileSubtitlesErrorSpec as Zo, ListPaymentInvitesErrorSpec as Zr, getApiMp4DownloadUrl as Zs, GetPublicShareErrorSpec as Zt, getCode as Zu, GetZipErrorSpec as _, ListFriendsErrorSpec as _a, GetIftttStatusErrorSpec as _c, DeleteOAuthAppError as _d, AccountTwoFactorSettingsSchema as _f, PaymentOptionPlanTypeSchema as _i, ListEventsError as _l, SharedFileSchema as _n, FileConversionStatusSchema as _o, PutioTypedErrorEnvelope as _p, RssFeedParams as _r, FilesSearchQuerySchema as _s, listTransfers as _t, LoginResponse as _u, PutioSdkEffectClient as a, ApproveFriendRequestErrorSpec as aa, listFileSubtitles as ac, login as ad, AccountConfirmationsErrorSpec as af, PaymentChangePlanSubmitInput as ai, HistoryKnownEventTypeSchema as al, ListPublicShareFilesErrorSpec as an, FileActiveConversionSchema as ao, PutioConfigurationError as ap, PauseRssFeedErrorSpec as ar, FileUploadResult as as, TransfersContinueResponse as at, GenerateTOTPErrorSpec as au, ZipCreateResponse as b, ListWaitingRequestsError as ba, SendIftttEventError as bc, GetOAuthAppErrorSpec as bd, PasInfo as bf, PaymentPlanGroup as bi, deleteEvent as bl, SharedFileSharedWith as bn, FileDirectAccessOptions as bo, decodePutioErrorEnvelope as bp, UpdateRssFeedError as br, GetFileError as bs, stopTransferRecording as bt, RecoveryCodesErrorSpec as bu, createPutioSdkPromiseClient as c, DenyFriendRequestError as ca, putMp4ToMyFiles as cc, register as cd, AccountInfoBase as cf, PaymentHistoryItem as ci, HistoryTransferCallbackErrorEventSchema as cl, ListSharedFilesError as cn, FileApiDownloadUrlOptions as co, PutioKnownErrorContract as cp, RetryAllRssFeedItemsError as cr, FileWatchStatusError as cs, TransfersListResponse as ct, GiftCardLookupError as cu, CancelZipError as d, FriendBase as da, resetStartFrom as dc, revokeApp as dd, AccountInfoBroadSchema as df, PaymentInfo as di, HistoryTransferErrorEventSchema as dl, PublicShareListQuery as dn, FileBaseSchema as do, PutioOperationErrorFromSpec as dp, RetryRssFeedItemErrorSpec as dr, FilesListEnvelopeSchema as ds, cancelTransfers as dt, GrantsErrorSpec as du, redeemPaymentVoucher as ea, getHlsStreamUrl as ec, getGiftCard as ed, AccountClearOptions as ef, ListPaymentPlansError as ei, HistoryEventSchema as el, GetSharedWithError as en, CreateFolderError as eo, selectJsonField as ep, ListRssFeedItemsError as er, FileUploadEnvelope as es, TransferStatus as et, ForgotPasswordError as eu, CancelZipErrorSpec as f, FriendBaseSchema as fa, searchFiles as fc, revokeClient as fd, AccountInfoQuery as ff, PaymentInfoPlanSchema as fi, HistoryTransferFromRssErrorEventSchema as fl, PublicShareListQuerySchema as fn, FileBreadcrumb as fo, PutioOperationErrorSpec as fp, RssFeed as fr, FilesListQuery as fs, cleanTransfers as ft, LinkDeviceError as fu, GetZipError as g, ListFriendsError as ga, GetIftttStatusError as gc, CreateOAuthAppErrorSpec as gd, AccountSettingsSchema as gf, PaymentOption as gi, HistoryZipCreatedEventSchema as gl, SharedFile as gn, FileConversionStatus as go, PutioTransportError as gp, RssFeedItemSucceededSchema as gr, FilesSearchQuery as gs, getTransferInfo as gt, LoginInput as gu, CreateZipInput as h, FriendSharedFolderErrorSpec as ha, uploadFile as hc, CreateOAuthAppError as hd, AccountSettings as hf, PaymentInviteSchema as hi, HistoryZipCreatedEvent as hl, ShareFilesErrorSpec as hn, FileBroadSchema as ho, PutioSdkError as hp, RssFeedItemSchema as hr, FilesMoveErrorSchema as hs, getTransfer as ht, LoginErrorSpec as hu, PutioSdk as i, ApproveFriendRequestError as ia, listFileExtractions as ic, linkDevice as id, AccountConfirmationsError as if, PaymentChangePlanPreviewSchema as ii, HistoryKnownEventType as il, ListPublicShareFilesError as in, FileActiveConversion as io, PutioAuthError as ip, PauseRssFeedError as ir, FileUploadRequestDescriptor as is, TransfersAddMultiError as it, GenerateTOTPError as iu, TunnelRouteSchema as j, countWaitingRequests as ja, JoinFamilyError as jc, OAuthAppWithTokenSchema as jd, saveAccountSettings as jf, PreviewPaymentChangePlanErrorSpec as ji, DownloadLinksStatus as jl, UnshareFileError as jn, FileMediaInfoFormatSchema as jo, mapTransportError as jp, retryRssFeedItem as jr, buildFileApiDownloadUrl as js, TrashBulkInput as jt, RevokeOAuthClientError as ju, ListTunnelRoutesErrorSpec as k, UserSearchResultSchema as ka, FamilyMember as kc, OAuthAppUpdateInput as kd, getAccountSettings as kf, PaymentVoucherInfoSchema as ki, DownloadLinksPayload as kl, SharingUnshareInput as kn, FileListResponse as ko, mapConfigurationError as kp, resumeRssFeed as kr, StartFromErrorSpec as ks, RestoreTrashError as kt, RevokeAllOAuthClientsError as ku, makePutioSdkEffectClientLayer as l, DenyFriendRequestErrorSpec as la, queryFiles as lc, resetPassword as ld, AccountInfoBaseSchema as lf, PaymentHistoryItemSchema as li, HistoryTransferCompletedEvent as ll, ListSharedFilesErrorSpec as ln, FileApiMp4DownloadUrlOptions as lo, PutioKnownOperationErrorContract as lp, RetryAllRssFeedItemsErrorSpec as lr, FileWatchStatusErrorSpec as ls, addManyTransfers as lt, GiftCardLookupErrorSpec as lu, CreateZipErrorSpec as m, FriendSharedFolderError as ma, setStartFrom as mc, verifyTOTP as md, AccountInfoResponseFor as mf, PaymentInvite as mi, HistoryVoucherEventSchema as ml, ShareFilesError as mn, FileBroad as mo, PutioRateLimitError as mp, RssFeedItemFailedSchema as mr, FilesMoveError as ms, countTransfers as mt, LoginError as mu, DEFAULT_PUTIO_UPLOAD_BASE_URL as n, stopPaymentSubscription as na, getStartFrom as nc, getVoucher as nd, AccountConfirmation as nf, PaymentChangePlanPreview as ni, HistoryFileSharedEvent as nl, GetSharingCloneInfoError as nn, DownloadUrlError as no, AnyPutioOperationError as np, ListRssFeedsError as nr, FileUploadErrorSpec as ns, TransferType as nt, FriendInviteLookupError as nu, PutioSdkPromiseClient as o, CountWaitingRequestsError as oa, moveFileSelection as oc, logout as od, AccountDisk as of, PaymentChangePlanSubmitResponse as oi, HistoryPrivateTorrentPinEventSchema as ol, ListPublicSharesError as on, FileActiveConversionsError as oo, PutioErrorEnvelope as op, ResumeRssFeedError as or, FileUploadTransfer as os, TransfersListQuery as ot, GenerateTOTPResponse as ou, CreateZipError as p, FriendSchema as pa, setFilesWatchStatus as pc, validateToken as pd, AccountInfoQuerySchema as pf, PaymentInfoSchema as pi, HistoryUploadEventSchema as pl, PublicShareSchema as pn, FileBreadcrumbSchema as po, PutioOperationFailure as pp, RssFeedItem as pr, FilesListQuerySchema as ps, continueTransfers as pt, LinkDeviceErrorSpec as pu, Transfer as q, FriendInviteSchema as qa, DeleteEventErrorSpec as qc, deleteOAuthApp as qd, makePutioFetchLayer as qf, getPaymentInfo as qi, setConfigKey as ql, ClearRssFeedLogsErrorSpec as qn, FileStartFromSetInput as qo, GetPaymentVoucherInfoErrorSpec as qr, findNextFile as qs, CreateSharingCloneErrorSpec as qt, clients as qu, DEFAULT_PUTIO_WEB_APP_URL as r, submitPaymentChangePlan as ra, listActiveMp4Conversions as rc, grants as rd, AccountConfirmationSchema as rf, PaymentChangePlanPreviewInput as ri, HistoryFileSharedEventSchema as rl, GetSharingCloneInfoErrorSpec as rn, DownloadUrlErrorSpec as ro, PutioApiError as rp, ListRssFeedsErrorSpec as rr, FileUploadInput as rs, TransferTypeSchema as rt, FriendInviteLookupErrorSpec as ru, createPutioSdkEffectClient as s, CountWaitingRequestsErrorSpec as sa, moveFiles as sc, regenerateRecoveryCodes as sd, AccountDiskSchema as sf, PaymentChangePlanSubmitSchema as si, HistoryRssFilterPausedEventSchema as sl, ListPublicSharesErrorSpec as sn, FileActiveConversionsErrorSpec as so, PutioErrorEnvelopeSchema as sp, ResumeRssFeedErrorSpec as sr, FileVideoMetadata as ss, TransfersListQuerySchema as st, GenerateTOTPResponseSchema as su, DEFAULT_PUTIO_API_BASE_URL as t, reportPayments as ta, getMp4Status as tc, getRecoveryCodes as td, AccountClearOptionsSchema as tf, ListPaymentPlansErrorSpec as ti, HistoryFileFromRssDeletedEventSchema as tl, GetSharedWithErrorSpec as tn, CreateFolderErrorSpec as to, selectJsonFields as tp, ListRssFeedItemsErrorSpec as tr, FileUploadError as ts, TransferStatusSchema as tt, ForgotPasswordErrorSpec as tu, makePutioSdkLiveClientLayer as u, Friend as ua, renameFile as uc, revokeAllClients as ud, AccountInfoBroad as uf, PaymentHistoryQuery as ui, HistoryTransferCompletedEventSchema as ul, PublicShare as un, FileBase as uo, PutioOperationError as up, RetryRssFeedItemError as ur, FilesBulkSelection as us, addTransfer as ut, GrantsError as uu, ListZipsError as v, ListSentRequestsError as va, IftttEventInput as vc, DeleteOAuthAppErrorSpec as vd, AccountWarnings as vf, PaymentOptionSchema as vi, ListEventsErrorSpec as vl, SharedFileShare as vn, FileCore as vo, PutioUnhandledSdkError as vp, RssFeedParamsSchema as vr, FolderType as vs, reannounceTransfer as vt, LoginResponseSchema as vu, cancelZip as w, SearchFriendsError as wa, CreateFamilyInviteError as wc, OAuthAppCreateInput as wd, SaveAccountSettingsPayload as wf, PaymentProviderNameSchema as wi, CreateDownloadLinksErrorSpec as wl, SharingCloneInput as wn, FileExtractionStatusSchema as wo, isPutioAuthError as wp, deleteRssFeed as wr, RenameFileError as ws, DeleteTrashErrorSpec as wt, RegisterErrorSpec as wu, ZipInfo as x, ListWaitingRequestsErrorSpec as xa, SendIftttEventErrorSpec as xc, MyOAuthApp as xd, PasInfoSchema as xf, PaymentPlanGroupSchema as xi, getEventTorrent as xl, SharedFileSharedWithSchema as xn, FileExtraction as xo, definePutioOperationErrorSpec as xp, UpdateRssFeedErrorSpec as xr, GetFileErrorSpec as xs, ContinueTrashError as xt, RegenerateRecoveryCodesError as xu, ListZipsErrorSpec as y, ListSentRequestsErrorSpec as ya, IftttEventType as yc, GetOAuthAppError as yd, AccountWarningsSchema as yf, PaymentPaddleWaitingPaymentInput as yi, clearEvents as yl, SharedFileShareSchema as yn, FileCreateFolderInput as yo, PutioValidationError as yp, RssFeedSchema as yr, FolderTypeSchema as ys, retryTransfer as yt, RecoveryCodesError as yu, ListTransfersError as z, sendFriendRequest as za, createFamilyInvite as zc, QueryOAuthAppsErrorSpec as zd, PutioQuery as zf, SubmitPaymentChangePlanErrorSpec as zi, PutioJsonObject as zl, getSharedWith as zn, FileMp4MutationErrorSpec as zo, CreateNanoPaymentRequestErrorSpec as zr, createFileUploadFormData as zs, emptyTrash as zt, VerifyTOTPError as zu };
|
|
7366
|
+
//# sourceMappingURL=index-DAs6a4pA.d.ts.map
|