gumnut-sdk 0.90.0 → 0.92.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/CHANGELOG.md +16 -0
- package/LICENSE +1 -1
- package/README.md +30 -30
- package/client.d.mts +11 -11
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -11
- package/client.d.ts.map +1 -1
- package/client.js +44 -44
- package/client.js.map +1 -1
- package/client.mjs +42 -42
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +2 -2
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +2 -2
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +2 -2
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +2 -2
- package/core/error.d.ts.map +1 -1
- package/core/error.js +4 -4
- package/core/error.js.map +1 -1
- package/core/error.mjs +2 -2
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts +4 -4
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +4 -4
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +1 -1
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +2 -2
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts +3 -3
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +3 -3
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/index.d.mts +3 -3
- package/index.d.mts.map +1 -1
- package/index.d.ts +3 -3
- package/index.d.ts.map +1 -1
- package/index.js +4 -4
- package/index.js.map +1 -1
- package/index.mjs +3 -3
- package/index.mjs.map +1 -1
- package/internal/parse.d.mts +2 -2
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -2
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/shims.js +1 -1
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/uploads.d.mts +4 -4
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +4 -4
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.js +2 -2
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +3 -3
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts +3 -3
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +3 -3
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.js +1 -1
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +2 -2
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/values.js +5 -5
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +6 -6
- package/internal/utils/values.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/assets.d.mts +2 -7
- package/resources/assets.d.mts.map +1 -1
- package/resources/assets.d.ts +2 -7
- package/resources/assets.d.ts.map +1 -1
- package/resources/assets.js.map +1 -1
- package/resources/assets.mjs.map +1 -1
- package/resources/events.d.mts +4 -128
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +4 -128
- package/resources/events.d.ts.map +1 -1
- package/resources/events.js +1 -4
- package/resources/events.js.map +1 -1
- package/resources/events.mjs +1 -4
- package/resources/events.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/src/client.ts +29 -34
- package/src/core/api-promise.ts +4 -4
- package/src/core/error.ts +2 -2
- package/src/core/pagination.ts +7 -7
- package/src/core/resource.ts +3 -3
- package/src/index.ts +3 -3
- package/src/internal/parse.ts +2 -2
- package/src/internal/shims.ts +1 -1
- package/src/internal/uploads.ts +5 -5
- package/src/internal/utils/base64.ts +3 -3
- package/src/internal/utils/log.ts +3 -3
- package/src/internal/utils/path.ts +2 -2
- package/src/internal/utils/values.ts +6 -6
- package/src/resources/assets.ts +2 -8
- package/src/resources/events.ts +4 -160
- package/src/resources/index.ts +1 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.92.0 (2026-05-07)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.91.0...v0.92.0](https://github.com/gumnut-ai/photos-sdk-typescript/compare/v0.91.0...v0.92.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([ced95ff](https://github.com/gumnut-ai/photos-sdk-typescript/commit/ced95fff053473d349aefcc0a37678c0fd204247))
|
|
10
|
+
|
|
11
|
+
## 0.91.0 (2026-05-07)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.90.0...v0.91.0](https://github.com/gumnut-ai/photos-sdk-typescript/compare/v0.90.0...v0.91.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** Gumnut ([f24832a](https://github.com/gumnut-ai/photos-sdk-typescript/commit/f24832a5b19926a688096745c1fb3d70d48d0019))
|
|
18
|
+
|
|
3
19
|
## 0.90.0 (2026-05-07)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v0.89.0...v0.90.0](https://github.com/gumnut-ai/photos-sdk-typescript/compare/v0.89.0...v0.90.0)
|
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright 2026 Gumnut
|
|
189
|
+
Copyright 2026 Gumnut
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Gumnut
|
|
1
|
+
# Gumnut TypeScript API Library
|
|
2
2
|
|
|
3
3
|
[>)](https://npmjs.org/package/gumnut-sdk) 
|
|
4
4
|
|
|
5
|
-
This library provides convenient access to the Gumnut
|
|
5
|
+
This library provides convenient access to the Gumnut REST API from server-side TypeScript or JavaScript.
|
|
6
6
|
|
|
7
7
|
The REST API documentation can be found on [docs.gumnut.ai](https://docs.gumnut.ai). The full API of this library can be found in [api.md](api.md).
|
|
8
8
|
|
|
@@ -20,9 +20,9 @@ The full API of this library can be found in [api.md](api.md).
|
|
|
20
20
|
|
|
21
21
|
<!-- prettier-ignore -->
|
|
22
22
|
```js
|
|
23
|
-
import
|
|
23
|
+
import Gumnut from 'gumnut-sdk';
|
|
24
24
|
|
|
25
|
-
const client = new
|
|
25
|
+
const client = new Gumnut({
|
|
26
26
|
apiKey: process.env['GUMNUT_API_KEY'], // This is the default and can be omitted
|
|
27
27
|
});
|
|
28
28
|
|
|
@@ -37,13 +37,13 @@ This library includes TypeScript definitions for all request params and response
|
|
|
37
37
|
|
|
38
38
|
<!-- prettier-ignore -->
|
|
39
39
|
```ts
|
|
40
|
-
import
|
|
40
|
+
import Gumnut from 'gumnut-sdk';
|
|
41
41
|
|
|
42
|
-
const client = new
|
|
42
|
+
const client = new Gumnut({
|
|
43
43
|
apiKey: process.env['GUMNUT_API_KEY'], // This is the default and can be omitted
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
const albumResponse:
|
|
46
|
+
const albumResponse: Gumnut.AlbumResponse = await client.albums.create();
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
|
|
@@ -59,9 +59,9 @@ Request parameters that correspond to file uploads can be passed in many differe
|
|
|
59
59
|
|
|
60
60
|
```ts
|
|
61
61
|
import fs from 'fs';
|
|
62
|
-
import
|
|
62
|
+
import Gumnut, { toFile } from 'gumnut-sdk';
|
|
63
63
|
|
|
64
|
-
const client = new
|
|
64
|
+
const client = new Gumnut();
|
|
65
65
|
|
|
66
66
|
// If you have access to Node `fs` we recommend using `fs.createReadStream()`:
|
|
67
67
|
await client.assets.create({
|
|
@@ -116,7 +116,7 @@ a subclass of `APIError` will be thrown:
|
|
|
116
116
|
<!-- prettier-ignore -->
|
|
117
117
|
```ts
|
|
118
118
|
const albumResponse = await client.albums.create().catch(async (err) => {
|
|
119
|
-
if (err instanceof
|
|
119
|
+
if (err instanceof Gumnut.APIError) {
|
|
120
120
|
console.log(err.status); // 400
|
|
121
121
|
console.log(err.name); // BadRequestError
|
|
122
122
|
console.log(err.headers); // {server: 'nginx', ...}
|
|
@@ -150,7 +150,7 @@ You can use the `maxRetries` option to configure or disable this:
|
|
|
150
150
|
<!-- prettier-ignore -->
|
|
151
151
|
```js
|
|
152
152
|
// Configure the default for all requests:
|
|
153
|
-
const client = new
|
|
153
|
+
const client = new Gumnut({
|
|
154
154
|
maxRetries: 0, // default is 2
|
|
155
155
|
});
|
|
156
156
|
|
|
@@ -167,7 +167,7 @@ Requests time out after 1 minute by default. You can configure this with a `time
|
|
|
167
167
|
<!-- prettier-ignore -->
|
|
168
168
|
```ts
|
|
169
169
|
// Configure the default for all requests:
|
|
170
|
-
const client = new
|
|
170
|
+
const client = new Gumnut({
|
|
171
171
|
timeout: 20 * 1000, // 20 seconds (default is 1 minute)
|
|
172
172
|
});
|
|
173
173
|
|
|
@@ -183,7 +183,7 @@ Note that requests which time out will be [retried twice by default](#retries).
|
|
|
183
183
|
|
|
184
184
|
## Auto-pagination
|
|
185
185
|
|
|
186
|
-
List methods in the
|
|
186
|
+
List methods in the Gumnut API are paginated.
|
|
187
187
|
You can use the `for await … of` syntax to iterate through items across all pages:
|
|
188
188
|
|
|
189
189
|
```ts
|
|
@@ -224,7 +224,7 @@ Unlike `.asResponse()` this method consumes the body, returning once it is parse
|
|
|
224
224
|
|
|
225
225
|
<!-- prettier-ignore -->
|
|
226
226
|
```ts
|
|
227
|
-
const client = new
|
|
227
|
+
const client = new Gumnut();
|
|
228
228
|
|
|
229
229
|
const response = await client.albums.create().asResponse();
|
|
230
230
|
console.log(response.headers.get('X-My-Header'));
|
|
@@ -245,13 +245,13 @@ console.log(albumResponse.id);
|
|
|
245
245
|
|
|
246
246
|
The log level can be configured in two ways:
|
|
247
247
|
|
|
248
|
-
1. Via the `
|
|
248
|
+
1. Via the `GUMNUT_LOG` environment variable
|
|
249
249
|
2. Using the `logLevel` client option (overrides the environment variable if set)
|
|
250
250
|
|
|
251
251
|
```ts
|
|
252
|
-
import
|
|
252
|
+
import Gumnut from 'gumnut-sdk';
|
|
253
253
|
|
|
254
|
-
const client = new
|
|
254
|
+
const client = new Gumnut({
|
|
255
255
|
logLevel: 'debug', // Show all log messages
|
|
256
256
|
});
|
|
257
257
|
```
|
|
@@ -277,13 +277,13 @@ When providing a custom logger, the `logLevel` option still controls which messa
|
|
|
277
277
|
below the configured level will not be sent to your logger.
|
|
278
278
|
|
|
279
279
|
```ts
|
|
280
|
-
import
|
|
280
|
+
import Gumnut from 'gumnut-sdk';
|
|
281
281
|
import pino from 'pino';
|
|
282
282
|
|
|
283
283
|
const logger = pino();
|
|
284
284
|
|
|
285
|
-
const client = new
|
|
286
|
-
logger: logger.child({ name: '
|
|
285
|
+
const client = new Gumnut({
|
|
286
|
+
logger: logger.child({ name: 'Gumnut' }),
|
|
287
287
|
logLevel: 'debug', // Send all messages to pino, allowing it to filter
|
|
288
288
|
});
|
|
289
289
|
```
|
|
@@ -346,10 +346,10 @@ globalThis.fetch = fetch;
|
|
|
346
346
|
Or pass it to the client:
|
|
347
347
|
|
|
348
348
|
```ts
|
|
349
|
-
import
|
|
349
|
+
import Gumnut from 'gumnut-sdk';
|
|
350
350
|
import fetch from 'my-fetch';
|
|
351
351
|
|
|
352
|
-
const client = new
|
|
352
|
+
const client = new Gumnut({ fetch });
|
|
353
353
|
```
|
|
354
354
|
|
|
355
355
|
### Fetch options
|
|
@@ -357,9 +357,9 @@ const client = new GumnutAI({ fetch });
|
|
|
357
357
|
If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
|
|
358
358
|
|
|
359
359
|
```ts
|
|
360
|
-
import
|
|
360
|
+
import Gumnut from 'gumnut-sdk';
|
|
361
361
|
|
|
362
|
-
const client = new
|
|
362
|
+
const client = new Gumnut({
|
|
363
363
|
fetchOptions: {
|
|
364
364
|
// `RequestInit` options
|
|
365
365
|
},
|
|
@@ -374,11 +374,11 @@ options to requests:
|
|
|
374
374
|
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>
|
|
375
375
|
|
|
376
376
|
```ts
|
|
377
|
-
import
|
|
377
|
+
import Gumnut from 'gumnut-sdk';
|
|
378
378
|
import * as undici from 'undici';
|
|
379
379
|
|
|
380
380
|
const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
|
|
381
|
-
const client = new
|
|
381
|
+
const client = new Gumnut({
|
|
382
382
|
fetchOptions: {
|
|
383
383
|
dispatcher: proxyAgent,
|
|
384
384
|
},
|
|
@@ -388,9 +388,9 @@ const client = new GumnutAI({
|
|
|
388
388
|
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg" align="top" width="18" height="21"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>
|
|
389
389
|
|
|
390
390
|
```ts
|
|
391
|
-
import
|
|
391
|
+
import Gumnut from 'gumnut-sdk';
|
|
392
392
|
|
|
393
|
-
const client = new
|
|
393
|
+
const client = new Gumnut({
|
|
394
394
|
fetchOptions: {
|
|
395
395
|
proxy: 'http://localhost:8888',
|
|
396
396
|
},
|
|
@@ -400,10 +400,10 @@ const client = new GumnutAI({
|
|
|
400
400
|
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>
|
|
401
401
|
|
|
402
402
|
```ts
|
|
403
|
-
import
|
|
403
|
+
import Gumnut from 'npm:gumnut-sdk';
|
|
404
404
|
|
|
405
405
|
const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
|
|
406
|
-
const client = new
|
|
406
|
+
const client = new Gumnut({
|
|
407
407
|
fetchOptions: {
|
|
408
408
|
client: httpClient,
|
|
409
409
|
},
|
package/client.d.mts
CHANGED
|
@@ -11,7 +11,7 @@ import { APIPromise } from "./core/api-promise.mjs";
|
|
|
11
11
|
import { AlbumAssetListParams, AlbumAssetResponse, AlbumAssetResponsesCursorPage, AlbumAssets } from "./resources/album-assets.mjs";
|
|
12
12
|
import { APIKeyCreateParams, APIKeyCreateResponse, APIKeyListResponse, APIKeyResponse, APIKeyUpdateParams, APIKeys } from "./resources/api-keys.mjs";
|
|
13
13
|
import { AssetCheckExistenceParams, AssetCountResponse, AssetCountsParams, AssetCreateParams, AssetDeleteListParams, AssetEmptyTrashParams, AssetExistenceResponse, AssetListParams, AssetLiteResponse, AssetResponse, AssetResponsesCursorPage, AssetRestoreParams, AssetTrashParams, Assets, MetadataResponse } from "./resources/assets.mjs";
|
|
14
|
-
import { EventGetParams, Events, EventsResponse
|
|
14
|
+
import { EventGetParams, Events, EventsResponse } from "./resources/events.mjs";
|
|
15
15
|
import { ClusterAssignmentResponse, FaceDeleteParams, FaceListParams, FaceResponse, FaceResponsesCursorPage, FaceRetrieveParams, FaceUpdateParams, Faces } from "./resources/faces.mjs";
|
|
16
16
|
import { Libraries, LibraryCreateParams, LibraryListResponse, LibraryResponse, LibraryUpdateParams } from "./resources/libraries.mjs";
|
|
17
17
|
import { AuthURLResponse, ExchangeResponse, LogoutEndpointResponse, OAuth, OAuthAuthURLParams, OAuthExchangeParams } from "./resources/oauth.mjs";
|
|
@@ -32,7 +32,7 @@ export interface ClientOptions {
|
|
|
32
32
|
/**
|
|
33
33
|
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
34
34
|
*
|
|
35
|
-
* Defaults to process.env['
|
|
35
|
+
* Defaults to process.env['GUMNUT_BASE_URL'].
|
|
36
36
|
*/
|
|
37
37
|
baseURL?: string | null | undefined;
|
|
38
38
|
/**
|
|
@@ -80,7 +80,7 @@ export interface ClientOptions {
|
|
|
80
80
|
/**
|
|
81
81
|
* Set the log level.
|
|
82
82
|
*
|
|
83
|
-
* Defaults to process.env['
|
|
83
|
+
* Defaults to process.env['GUMNUT_LOG'] or 'warn' if it isn't set.
|
|
84
84
|
*/
|
|
85
85
|
logLevel?: LogLevel | undefined;
|
|
86
86
|
/**
|
|
@@ -91,9 +91,9 @@ export interface ClientOptions {
|
|
|
91
91
|
logger?: Logger | undefined;
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
|
-
* API Client for interfacing with the Gumnut
|
|
94
|
+
* API Client for interfacing with the Gumnut API.
|
|
95
95
|
*/
|
|
96
|
-
export declare class
|
|
96
|
+
export declare class Gumnut {
|
|
97
97
|
#private;
|
|
98
98
|
apiKey: string | null;
|
|
99
99
|
baseURL: string;
|
|
@@ -106,10 +106,10 @@ export declare class GumnutAI {
|
|
|
106
106
|
protected idempotencyHeader?: string;
|
|
107
107
|
private _options;
|
|
108
108
|
/**
|
|
109
|
-
* API Client for interfacing with the Gumnut
|
|
109
|
+
* API Client for interfacing with the Gumnut API.
|
|
110
110
|
*
|
|
111
111
|
* @param {string | null | undefined} [opts.apiKey=process.env['GUMNUT_API_KEY'] ?? null]
|
|
112
|
-
* @param {string} [opts.baseURL=process.env['
|
|
112
|
+
* @param {string} [opts.baseURL=process.env['GUMNUT_BASE_URL'] ?? https://api.gumnut.ai] - Override the default base URL for the API.
|
|
113
113
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
114
114
|
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
115
115
|
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -168,9 +168,9 @@ export declare class GumnutAI {
|
|
|
168
168
|
private buildHeaders;
|
|
169
169
|
private _makeAbort;
|
|
170
170
|
private buildBody;
|
|
171
|
-
static
|
|
171
|
+
static Gumnut: typeof Gumnut;
|
|
172
172
|
static DEFAULT_TIMEOUT: number;
|
|
173
|
-
static
|
|
173
|
+
static GumnutError: typeof Errors.GumnutError;
|
|
174
174
|
static APIError: typeof Errors.APIError;
|
|
175
175
|
static APIConnectionError: typeof Errors.APIConnectionError;
|
|
176
176
|
static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError;
|
|
@@ -197,7 +197,7 @@ export declare class GumnutAI {
|
|
|
197
197
|
search: API.Search;
|
|
198
198
|
users: API.Users;
|
|
199
199
|
}
|
|
200
|
-
export declare namespace
|
|
200
|
+
export declare namespace Gumnut {
|
|
201
201
|
export type RequestOptions = Opts.RequestOptions;
|
|
202
202
|
export import CursorPage = Pagination.CursorPage;
|
|
203
203
|
export { type CursorPageParams as CursorPageParams, type CursorPageResponse as CursorPageResponse };
|
|
@@ -205,7 +205,7 @@ export declare namespace GumnutAI {
|
|
|
205
205
|
export { Assets as Assets, type AssetCountResponse as AssetCountResponse, type AssetExistenceResponse as AssetExistenceResponse, type AssetLiteResponse as AssetLiteResponse, type AssetResponse as AssetResponse, type MetadataResponse as MetadataResponse, type AssetResponsesCursorPage as AssetResponsesCursorPage, type AssetCreateParams as AssetCreateParams, type AssetListParams as AssetListParams, type AssetCheckExistenceParams as AssetCheckExistenceParams, type AssetCountsParams as AssetCountsParams, type AssetDeleteListParams as AssetDeleteListParams, type AssetEmptyTrashParams as AssetEmptyTrashParams, type AssetRestoreParams as AssetRestoreParams, type AssetTrashParams as AssetTrashParams, };
|
|
206
206
|
export { Albums as Albums, type AlbumResponse as AlbumResponse, type AlbumResponsesCursorPage as AlbumResponsesCursorPage, type AlbumCreateParams as AlbumCreateParams, type AlbumUpdateParams as AlbumUpdateParams, type AlbumListParams as AlbumListParams, };
|
|
207
207
|
export { AlbumAssets as AlbumAssets, type AlbumAssetResponse as AlbumAssetResponse, type AlbumAssetResponsesCursorPage as AlbumAssetResponsesCursorPage, type AlbumAssetListParams as AlbumAssetListParams, };
|
|
208
|
-
export { Events as Events, type EventsResponse as EventsResponse, type
|
|
208
|
+
export { Events as Events, type EventsResponse as EventsResponse, type EventGetParams as EventGetParams };
|
|
209
209
|
export { Faces as Faces, type ClusterAssignmentResponse as ClusterAssignmentResponse, type FaceResponse as FaceResponse, type FaceResponsesCursorPage as FaceResponsesCursorPage, type FaceRetrieveParams as FaceRetrieveParams, type FaceUpdateParams as FaceUpdateParams, type FaceListParams as FaceListParams, type FaceDeleteParams as FaceDeleteParams, };
|
|
210
210
|
export { Libraries as Libraries, type LibraryResponse as LibraryResponse, type LibraryListResponse as LibraryListResponse, type LibraryCreateParams as LibraryCreateParams, type LibraryUpdateParams as LibraryUpdateParams, };
|
|
211
211
|
export { OAuth as OAuth, type AuthURLResponse as AuthURLResponse, type ExchangeResponse as ExchangeResponse, type LogoutEndpointResponse as LogoutEndpointResponse, type OAuthAuthURLParams as OAuthAuthURLParams, type OAuthExchangeParams as OAuthExchangeParams, };
|
package/client.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAGT,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EAAgB,KAAK,gBAAgB,EAAE,kBAAkB,EAAE;OAC3D,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,UAAU,EAAE;OACd,EACL,oBAAoB,EACpB,kBAAkB,EAClB,6BAA6B,EAC7B,WAAW,EACZ;OACM,EACL,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,OAAO,EACR;OACM,EACL,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,MAAM,EACN,gBAAgB,EACjB;OACM,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,EAAE
|
|
1
|
+
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAGT,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EAAgB,KAAK,gBAAgB,EAAE,kBAAkB,EAAE;OAC3D,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,UAAU,EAAE;OACd,EACL,oBAAoB,EACpB,kBAAkB,EAClB,6BAA6B,EAC7B,WAAW,EACZ;OACM,EACL,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,OAAO,EACR;OACM,EACL,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,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EACrC,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;IAEjE,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,KAAK,YAAY,IAAI,YAAY,EAAE,CAAC;IAE7D,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;CAC7C"}
|
package/client.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { APIPromise } from "./core/api-promise.js";
|
|
|
11
11
|
import { AlbumAssetListParams, AlbumAssetResponse, AlbumAssetResponsesCursorPage, AlbumAssets } from "./resources/album-assets.js";
|
|
12
12
|
import { APIKeyCreateParams, APIKeyCreateResponse, APIKeyListResponse, APIKeyResponse, APIKeyUpdateParams, APIKeys } from "./resources/api-keys.js";
|
|
13
13
|
import { AssetCheckExistenceParams, AssetCountResponse, AssetCountsParams, AssetCreateParams, AssetDeleteListParams, AssetEmptyTrashParams, AssetExistenceResponse, AssetListParams, AssetLiteResponse, AssetResponse, AssetResponsesCursorPage, AssetRestoreParams, AssetTrashParams, Assets, MetadataResponse } from "./resources/assets.js";
|
|
14
|
-
import { EventGetParams, Events, EventsResponse
|
|
14
|
+
import { EventGetParams, Events, EventsResponse } from "./resources/events.js";
|
|
15
15
|
import { ClusterAssignmentResponse, FaceDeleteParams, FaceListParams, FaceResponse, FaceResponsesCursorPage, FaceRetrieveParams, FaceUpdateParams, Faces } from "./resources/faces.js";
|
|
16
16
|
import { Libraries, LibraryCreateParams, LibraryListResponse, LibraryResponse, LibraryUpdateParams } from "./resources/libraries.js";
|
|
17
17
|
import { AuthURLResponse, ExchangeResponse, LogoutEndpointResponse, OAuth, OAuthAuthURLParams, OAuthExchangeParams } from "./resources/oauth.js";
|
|
@@ -32,7 +32,7 @@ export interface ClientOptions {
|
|
|
32
32
|
/**
|
|
33
33
|
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
34
34
|
*
|
|
35
|
-
* Defaults to process.env['
|
|
35
|
+
* Defaults to process.env['GUMNUT_BASE_URL'].
|
|
36
36
|
*/
|
|
37
37
|
baseURL?: string | null | undefined;
|
|
38
38
|
/**
|
|
@@ -80,7 +80,7 @@ export interface ClientOptions {
|
|
|
80
80
|
/**
|
|
81
81
|
* Set the log level.
|
|
82
82
|
*
|
|
83
|
-
* Defaults to process.env['
|
|
83
|
+
* Defaults to process.env['GUMNUT_LOG'] or 'warn' if it isn't set.
|
|
84
84
|
*/
|
|
85
85
|
logLevel?: LogLevel | undefined;
|
|
86
86
|
/**
|
|
@@ -91,9 +91,9 @@ export interface ClientOptions {
|
|
|
91
91
|
logger?: Logger | undefined;
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
|
-
* API Client for interfacing with the Gumnut
|
|
94
|
+
* API Client for interfacing with the Gumnut API.
|
|
95
95
|
*/
|
|
96
|
-
export declare class
|
|
96
|
+
export declare class Gumnut {
|
|
97
97
|
#private;
|
|
98
98
|
apiKey: string | null;
|
|
99
99
|
baseURL: string;
|
|
@@ -106,10 +106,10 @@ export declare class GumnutAI {
|
|
|
106
106
|
protected idempotencyHeader?: string;
|
|
107
107
|
private _options;
|
|
108
108
|
/**
|
|
109
|
-
* API Client for interfacing with the Gumnut
|
|
109
|
+
* API Client for interfacing with the Gumnut API.
|
|
110
110
|
*
|
|
111
111
|
* @param {string | null | undefined} [opts.apiKey=process.env['GUMNUT_API_KEY'] ?? null]
|
|
112
|
-
* @param {string} [opts.baseURL=process.env['
|
|
112
|
+
* @param {string} [opts.baseURL=process.env['GUMNUT_BASE_URL'] ?? https://api.gumnut.ai] - Override the default base URL for the API.
|
|
113
113
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
114
114
|
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
115
115
|
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -168,9 +168,9 @@ export declare class GumnutAI {
|
|
|
168
168
|
private buildHeaders;
|
|
169
169
|
private _makeAbort;
|
|
170
170
|
private buildBody;
|
|
171
|
-
static
|
|
171
|
+
static Gumnut: typeof Gumnut;
|
|
172
172
|
static DEFAULT_TIMEOUT: number;
|
|
173
|
-
static
|
|
173
|
+
static GumnutError: typeof Errors.GumnutError;
|
|
174
174
|
static APIError: typeof Errors.APIError;
|
|
175
175
|
static APIConnectionError: typeof Errors.APIConnectionError;
|
|
176
176
|
static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError;
|
|
@@ -197,7 +197,7 @@ export declare class GumnutAI {
|
|
|
197
197
|
search: API.Search;
|
|
198
198
|
users: API.Users;
|
|
199
199
|
}
|
|
200
|
-
export declare namespace
|
|
200
|
+
export declare namespace Gumnut {
|
|
201
201
|
export type RequestOptions = Opts.RequestOptions;
|
|
202
202
|
export import CursorPage = Pagination.CursorPage;
|
|
203
203
|
export { type CursorPageParams as CursorPageParams, type CursorPageResponse as CursorPageResponse };
|
|
@@ -205,7 +205,7 @@ export declare namespace GumnutAI {
|
|
|
205
205
|
export { Assets as Assets, type AssetCountResponse as AssetCountResponse, type AssetExistenceResponse as AssetExistenceResponse, type AssetLiteResponse as AssetLiteResponse, type AssetResponse as AssetResponse, type MetadataResponse as MetadataResponse, type AssetResponsesCursorPage as AssetResponsesCursorPage, type AssetCreateParams as AssetCreateParams, type AssetListParams as AssetListParams, type AssetCheckExistenceParams as AssetCheckExistenceParams, type AssetCountsParams as AssetCountsParams, type AssetDeleteListParams as AssetDeleteListParams, type AssetEmptyTrashParams as AssetEmptyTrashParams, type AssetRestoreParams as AssetRestoreParams, type AssetTrashParams as AssetTrashParams, };
|
|
206
206
|
export { Albums as Albums, type AlbumResponse as AlbumResponse, type AlbumResponsesCursorPage as AlbumResponsesCursorPage, type AlbumCreateParams as AlbumCreateParams, type AlbumUpdateParams as AlbumUpdateParams, type AlbumListParams as AlbumListParams, };
|
|
207
207
|
export { AlbumAssets as AlbumAssets, type AlbumAssetResponse as AlbumAssetResponse, type AlbumAssetResponsesCursorPage as AlbumAssetResponsesCursorPage, type AlbumAssetListParams as AlbumAssetListParams, };
|
|
208
|
-
export { Events as Events, type EventsResponse as EventsResponse, type
|
|
208
|
+
export { Events as Events, type EventsResponse as EventsResponse, type EventGetParams as EventGetParams };
|
|
209
209
|
export { Faces as Faces, type ClusterAssignmentResponse as ClusterAssignmentResponse, type FaceResponse as FaceResponse, type FaceResponsesCursorPage as FaceResponsesCursorPage, type FaceRetrieveParams as FaceRetrieveParams, type FaceUpdateParams as FaceUpdateParams, type FaceListParams as FaceListParams, type FaceDeleteParams as FaceDeleteParams, };
|
|
210
210
|
export { Libraries as Libraries, type LibraryResponse as LibraryResponse, type LibraryListResponse as LibraryListResponse, type LibraryCreateParams as LibraryCreateParams, type LibraryUpdateParams as LibraryUpdateParams, };
|
|
211
211
|
export { OAuth as OAuth, type AuthURLResponse as AuthURLResponse, type ExchangeResponse as ExchangeResponse, type LogoutEndpointResponse as LogoutEndpointResponse, type OAuthAuthURLParams as OAuthAuthURLParams, type OAuthExchangeParams as OAuthExchangeParams, };
|
package/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAA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,MAAM,EAChB,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;IAEjE,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,KAAK,YAAY,IAAI,YAAY,EAAE,CAAC;IAE7D,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;CAC7C"}
|
package/client.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
var
|
|
3
|
+
var _Gumnut_instances, _a, _Gumnut_encoder, _Gumnut_baseURLOverridden;
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
5
|
+
exports.Gumnut = void 0;
|
|
6
6
|
const tslib_1 = require("./internal/tslib.js");
|
|
7
7
|
const uuid_1 = require("./internal/utils/uuid.js");
|
|
8
8
|
const values_1 = require("./internal/utils/values.js");
|
|
@@ -35,14 +35,14 @@ const env_1 = require("./internal/utils/env.js");
|
|
|
35
35
|
const log_1 = require("./internal/utils/log.js");
|
|
36
36
|
const values_2 = require("./internal/utils/values.js");
|
|
37
37
|
/**
|
|
38
|
-
* API Client for interfacing with the Gumnut
|
|
38
|
+
* API Client for interfacing with the Gumnut API.
|
|
39
39
|
*/
|
|
40
|
-
class
|
|
40
|
+
class Gumnut {
|
|
41
41
|
/**
|
|
42
|
-
* API Client for interfacing with the Gumnut
|
|
42
|
+
* API Client for interfacing with the Gumnut API.
|
|
43
43
|
*
|
|
44
44
|
* @param {string | null | undefined} [opts.apiKey=process.env['GUMNUT_API_KEY'] ?? null]
|
|
45
|
-
* @param {string} [opts.baseURL=process.env['
|
|
45
|
+
* @param {string} [opts.baseURL=process.env['GUMNUT_BASE_URL'] ?? https://api.gumnut.ai] - Override the default base URL for the API.
|
|
46
46
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
47
47
|
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
48
48
|
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -50,9 +50,9 @@ class GumnutAI {
|
|
|
50
50
|
* @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
51
51
|
* @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
52
52
|
*/
|
|
53
|
-
constructor({ baseURL = (0, env_1.readEnv)('
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
constructor({ baseURL = (0, env_1.readEnv)('GUMNUT_BASE_URL'), apiKey = (0, env_1.readEnv)('GUMNUT_API_KEY') ?? null, ...opts } = {}) {
|
|
54
|
+
_Gumnut_instances.add(this);
|
|
55
|
+
_Gumnut_encoder.set(this, void 0);
|
|
56
56
|
this.apiKeys = new API.APIKeys(this);
|
|
57
57
|
this.assets = new API.Assets(this);
|
|
58
58
|
this.albums = new API.Albums(this);
|
|
@@ -78,13 +78,13 @@ class GumnutAI {
|
|
|
78
78
|
this.logLevel = defaultLogLevel;
|
|
79
79
|
this.logLevel =
|
|
80
80
|
(0, log_1.parseLogLevel)(options.logLevel, 'ClientOptions.logLevel', this) ??
|
|
81
|
-
(0, log_1.parseLogLevel)((0, env_1.readEnv)('
|
|
81
|
+
(0, log_1.parseLogLevel)((0, env_1.readEnv)('GUMNUT_LOG'), "process.env['GUMNUT_LOG']", this) ??
|
|
82
82
|
defaultLogLevel;
|
|
83
83
|
this.fetchOptions = options.fetchOptions;
|
|
84
84
|
this.maxRetries = options.maxRetries ?? 2;
|
|
85
85
|
this.fetch = options.fetch ?? Shims.getDefaultFetch();
|
|
86
|
-
tslib_1.__classPrivateFieldSet(this,
|
|
87
|
-
const customHeadersEnv = (0, env_1.readEnv)('
|
|
86
|
+
tslib_1.__classPrivateFieldSet(this, _Gumnut_encoder, Opts.FallbackEncoder, "f");
|
|
87
|
+
const customHeadersEnv = (0, env_1.readEnv)('GUMNUT_CUSTOM_HEADERS');
|
|
88
88
|
if (customHeadersEnv) {
|
|
89
89
|
const parsed = {};
|
|
90
90
|
for (const line of customHeadersEnv.split('\n')) {
|
|
@@ -147,7 +147,7 @@ class GumnutAI {
|
|
|
147
147
|
return Errors.APIError.generate(status, error, message, headers);
|
|
148
148
|
}
|
|
149
149
|
buildURL(path, query, defaultBaseURL) {
|
|
150
|
-
const baseURL = (!tslib_1.__classPrivateFieldGet(this,
|
|
150
|
+
const baseURL = (!tslib_1.__classPrivateFieldGet(this, _Gumnut_instances, "m", _Gumnut_baseURLOverridden).call(this) && defaultBaseURL) || this.baseURL;
|
|
151
151
|
const url = (0, values_1.isAbsoluteURL)(path) ?
|
|
152
152
|
new URL(path)
|
|
153
153
|
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
|
|
@@ -483,40 +483,40 @@ class GumnutAI {
|
|
|
483
483
|
};
|
|
484
484
|
}
|
|
485
485
|
else {
|
|
486
|
-
return tslib_1.__classPrivateFieldGet(this,
|
|
486
|
+
return tslib_1.__classPrivateFieldGet(this, _Gumnut_encoder, "f").call(this, { body, headers });
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
exports.
|
|
491
|
-
_a =
|
|
490
|
+
exports.Gumnut = Gumnut;
|
|
491
|
+
_a = Gumnut, _Gumnut_encoder = new WeakMap(), _Gumnut_instances = new WeakSet(), _Gumnut_baseURLOverridden = function _Gumnut_baseURLOverridden() {
|
|
492
492
|
return this.baseURL !== 'https://api.gumnut.ai';
|
|
493
493
|
};
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
494
|
+
Gumnut.Gumnut = _a;
|
|
495
|
+
Gumnut.DEFAULT_TIMEOUT = 60000; // 1 minute
|
|
496
|
+
Gumnut.GumnutError = Errors.GumnutError;
|
|
497
|
+
Gumnut.APIError = Errors.APIError;
|
|
498
|
+
Gumnut.APIConnectionError = Errors.APIConnectionError;
|
|
499
|
+
Gumnut.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
|
|
500
|
+
Gumnut.APIUserAbortError = Errors.APIUserAbortError;
|
|
501
|
+
Gumnut.NotFoundError = Errors.NotFoundError;
|
|
502
|
+
Gumnut.ConflictError = Errors.ConflictError;
|
|
503
|
+
Gumnut.RateLimitError = Errors.RateLimitError;
|
|
504
|
+
Gumnut.BadRequestError = Errors.BadRequestError;
|
|
505
|
+
Gumnut.AuthenticationError = Errors.AuthenticationError;
|
|
506
|
+
Gumnut.InternalServerError = Errors.InternalServerError;
|
|
507
|
+
Gumnut.PermissionDeniedError = Errors.PermissionDeniedError;
|
|
508
|
+
Gumnut.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
509
|
+
Gumnut.toFile = Uploads.toFile;
|
|
510
|
+
Gumnut.APIKeys = api_keys_1.APIKeys;
|
|
511
|
+
Gumnut.Assets = assets_1.Assets;
|
|
512
|
+
Gumnut.Albums = albums_1.Albums;
|
|
513
|
+
Gumnut.AlbumAssets = album_assets_1.AlbumAssets;
|
|
514
|
+
Gumnut.Events = events_1.Events;
|
|
515
|
+
Gumnut.Faces = faces_1.Faces;
|
|
516
|
+
Gumnut.Libraries = libraries_1.Libraries;
|
|
517
|
+
Gumnut.OAuth = oauth_1.OAuth;
|
|
518
|
+
Gumnut.People = people_1.People;
|
|
519
|
+
Gumnut.Ping = ping_1.Ping;
|
|
520
|
+
Gumnut.Search = search_1.Search;
|
|
521
|
+
Gumnut.Users = users_1.Users;
|
|
522
522
|
//# sourceMappingURL=client.js.map
|