@gepetto/sdk 0.1.0 → 0.1.2
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/LICENSE +21 -0
- package/README.md +6 -2
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +10 -12
- package/dist/index.d.ts +10 -12
- package/dist/index.js +3 -3
- package/package.json +8 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gepetto
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Gepetto SDK
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@gepetto/sdk)
|
|
4
|
+
|
|
3
5
|
The official TypeScript / JavaScript SDK of the [Gepetto API v2](https://docs.gepettoapp.com): real estate photo editing. Enhance a photo, declutter a room, furnish it, change the sky, restyle it, repaint walls and floors, upscale. One call, an image URL in return.
|
|
4
6
|
|
|
5
7
|
```bash
|
|
@@ -166,6 +168,8 @@ new Gepetto({
|
|
|
166
168
|
|
|
167
169
|
Keep the key on your server: it gives access to your account and bills it. The SDK refuses to run in a web page.
|
|
168
170
|
|
|
169
|
-
##
|
|
171
|
+
## About Gepetto
|
|
172
|
+
|
|
173
|
+
Gepetto is the AI photo studio for real estate professionals. From a single photo, it furnishes an empty room, empties a cluttered one, restyles an interior, replaces a grey sky, repaints walls, changes floors, enhances the picture and animates the property on video, in seconds and with no technical skill. Launched in January 2023 in Bordeaux, France, Gepetto is used by more than 1,000 agencies, networks and real estate photographers, on the web, on iPhone and Android, and through this API inside real estate CRMs and platforms.
|
|
170
174
|
|
|
171
|
-
|
|
175
|
+
[gepettoapp.com](https://gepettoapp.com) · [API documentation](https://docs.gepettoapp.com)
|
package/dist/index.cjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.Gepetto = exports.GepettoError = exports.VERSION = void 0;
|
|
10
10
|
exports.verifyWebhook = verifyWebhook;
|
|
11
|
-
exports.VERSION = '0.1.
|
|
11
|
+
exports.VERSION = '0.1.2';
|
|
12
12
|
const DEFAULT_BASE_URL = 'https://europe-west1-gepettoai.cloudfunctions.net/v2';
|
|
13
13
|
/** A render is stopped by the API after 450 s: 10 minutes covers it, retries included. */
|
|
14
14
|
const DEFAULT_TIMEOUT_MS = 10 * 60 * 1000;
|
|
@@ -152,8 +152,8 @@ class Gepetto {
|
|
|
152
152
|
usage() {
|
|
153
153
|
return this.#get('/usage');
|
|
154
154
|
}
|
|
155
|
-
/** The payment link of the subscription
|
|
156
|
-
*
|
|
155
|
+
/** The payment link of the subscription. A test key is enough; once paid,
|
|
156
|
+
* the live key is on https://app.gepettoapp.com/easy/account/api. */
|
|
157
157
|
async subscribe() {
|
|
158
158
|
return this.#json(await this.#send('POST', '/subscribe', { body: {}, idempotencyKey: uniqueId() }));
|
|
159
159
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Methods and fields have the names of the API: what the docs say of an endpoint is true of the method.
|
|
6
6
|
*/
|
|
7
|
-
export declare const VERSION = "0.1.
|
|
7
|
+
export declare const VERSION = "0.1.2";
|
|
8
8
|
/** Rooms of `GET /rooms`. */
|
|
9
9
|
export type KnownRoomId = 'bar' | 'bath_room' | 'bedroom' | 'clothing_store' | 'coworking_space' | 'dining_room' | 'dressing' | 'gaming_room' | 'hall' | 'home_office' | 'kitchen' | 'kitchen_living' | 'living_dining' | 'living_room' | 'meeting_room' | 'office' | 'optician' | 'osteopathy_clinic' | 'outdoor_garden' | 'outdoor_piscine' | 'outdoor_snowy_garden' | 'outdoor_terrace' | 'psychologist_office' | 'restaurant' | 'salle_de_sport' | 'shoe_store' | 'teenager_bedroom' | 'toilet';
|
|
10
10
|
/** Rooms that can be furnished whole, without a mask (mode `auto`). */
|
|
@@ -272,7 +272,7 @@ export declare class Gepetto {
|
|
|
272
272
|
constructor(apiKeyOrOptions?: string | ClientOptions, options?: ClientOptions);
|
|
273
273
|
/** True with a test key: renders are free (200 per account) and `priceCents` is 0. */
|
|
274
274
|
get isTest(): boolean;
|
|
275
|
-
/** Empty the whole room, or remove what a mask covers.
|
|
275
|
+
/** Empty the whole room, or remove what a mask covers. */
|
|
276
276
|
declutter(params: DeclutterParams & {
|
|
277
277
|
webhook: string | URL;
|
|
278
278
|
}, options?: RequestOptions): Promise<Job>;
|
|
@@ -280,8 +280,7 @@ export declare class Gepetto {
|
|
|
280
280
|
webhook?: undefined;
|
|
281
281
|
}, options?: RequestOptions): Promise<CompletedJob>;
|
|
282
282
|
declutter(params: DeclutterParams, options?: RequestOptions): Promise<Job>;
|
|
283
|
-
/** Furnish a whole room (`roomId` + `styleId`), or the zone of a mask (as a room, or with one `furnitureId`).
|
|
284
|
-
* 0.30 € per successful render. */
|
|
283
|
+
/** Furnish a whole room (`roomId` + `styleId`), or the zone of a mask (as a room, or with one `furnitureId`). */
|
|
285
284
|
furnish(params: FurnishParams & {
|
|
286
285
|
webhook: string | URL;
|
|
287
286
|
}, options?: RequestOptions): Promise<Job>;
|
|
@@ -289,7 +288,7 @@ export declare class Gepetto {
|
|
|
289
288
|
webhook?: undefined;
|
|
290
289
|
}, options?: RequestOptions): Promise<CompletedJob>;
|
|
291
290
|
furnish(params: FurnishParams, options?: RequestOptions): Promise<Job>;
|
|
292
|
-
/** A blue sky (`skyId`) and the matching light, outside or through the windows.
|
|
291
|
+
/** A blue sky (`skyId`) and the matching light, outside or through the windows. */
|
|
293
292
|
sunshine(params: SunshineParams & {
|
|
294
293
|
webhook: string | URL;
|
|
295
294
|
}, options?: RequestOptions): Promise<Job>;
|
|
@@ -297,7 +296,7 @@ export declare class Gepetto {
|
|
|
297
296
|
webhook?: undefined;
|
|
298
297
|
}, options?: RequestOptions): Promise<CompletedJob>;
|
|
299
298
|
sunshine(params: SunshineParams, options?: RequestOptions): Promise<Job>;
|
|
300
|
-
/** The room redesigned in a style.
|
|
299
|
+
/** The room redesigned in a style. */
|
|
301
300
|
creativeRedesign(params: CreativeRedesignParams & {
|
|
302
301
|
webhook: string | URL;
|
|
303
302
|
}, options?: RequestOptions): Promise<Job>;
|
|
@@ -305,7 +304,7 @@ export declare class Gepetto {
|
|
|
305
304
|
webhook?: undefined;
|
|
306
305
|
}, options?: RequestOptions): Promise<CompletedJob>;
|
|
307
306
|
creativeRedesign(params: CreativeRedesignParams, options?: RequestOptions): Promise<Job>;
|
|
308
|
-
/** Repaint the walls, change the floor, or apply a finish: one `surface` per call.
|
|
307
|
+
/** Repaint the walls, change the floor, or apply a finish: one `surface` per call. */
|
|
309
308
|
surfaces(params: SurfacesParams & {
|
|
310
309
|
webhook: string | URL;
|
|
311
310
|
}, options?: RequestOptions): Promise<Job>;
|
|
@@ -313,8 +312,7 @@ export declare class Gepetto {
|
|
|
313
312
|
webhook?: undefined;
|
|
314
313
|
}, options?: RequestOptions): Promise<CompletedJob>;
|
|
315
314
|
surfaces(params: SurfacesParams, options?: RequestOptions): Promise<Job>;
|
|
316
|
-
/** Light and colours corrected at the size of the photo, nothing redrawn; `straighten` for the verticals.
|
|
317
|
-
* 0.20 € per successful render. */
|
|
315
|
+
/** Light and colours corrected at the size of the photo, nothing redrawn; `straighten` for the verticals. */
|
|
318
316
|
enhance(params: EnhanceParams & {
|
|
319
317
|
webhook: string | URL;
|
|
320
318
|
}, options?: RequestOptions): Promise<Job>;
|
|
@@ -322,7 +320,7 @@ export declare class Gepetto {
|
|
|
322
320
|
webhook?: undefined;
|
|
323
321
|
}, options?: RequestOptions): Promise<CompletedJob>;
|
|
324
322
|
enhance(params: EnhanceParams, options?: RequestOptions): Promise<Job>;
|
|
325
|
-
/** Enlarge an image to about 4 (`2k`) or 16 megapixels (`4k`, the default).
|
|
323
|
+
/** Enlarge an image to about 4 (`2k`) or 16 megapixels (`4k`, the default). */
|
|
326
324
|
upscale(params: UpscaleParams & {
|
|
327
325
|
webhook: string | URL;
|
|
328
326
|
}, options?: RequestOptions): Promise<Job>;
|
|
@@ -351,8 +349,8 @@ export declare class Gepetto {
|
|
|
351
349
|
account(): Promise<Account>;
|
|
352
350
|
/** Renders and consumption of the current period. */
|
|
353
351
|
usage(): Promise<Usage>;
|
|
354
|
-
/** The payment link of the subscription
|
|
355
|
-
*
|
|
352
|
+
/** The payment link of the subscription. A test key is enough; once paid,
|
|
353
|
+
* the live key is on https://app.gepettoapp.com/easy/account/api. */
|
|
356
354
|
subscribe(): Promise<{
|
|
357
355
|
url: string;
|
|
358
356
|
message: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Methods and fields have the names of the API: what the docs say of an endpoint is true of the method.
|
|
6
6
|
*/
|
|
7
|
-
export declare const VERSION = "0.1.
|
|
7
|
+
export declare const VERSION = "0.1.2";
|
|
8
8
|
/** Rooms of `GET /rooms`. */
|
|
9
9
|
export type KnownRoomId = 'bar' | 'bath_room' | 'bedroom' | 'clothing_store' | 'coworking_space' | 'dining_room' | 'dressing' | 'gaming_room' | 'hall' | 'home_office' | 'kitchen' | 'kitchen_living' | 'living_dining' | 'living_room' | 'meeting_room' | 'office' | 'optician' | 'osteopathy_clinic' | 'outdoor_garden' | 'outdoor_piscine' | 'outdoor_snowy_garden' | 'outdoor_terrace' | 'psychologist_office' | 'restaurant' | 'salle_de_sport' | 'shoe_store' | 'teenager_bedroom' | 'toilet';
|
|
10
10
|
/** Rooms that can be furnished whole, without a mask (mode `auto`). */
|
|
@@ -272,7 +272,7 @@ export declare class Gepetto {
|
|
|
272
272
|
constructor(apiKeyOrOptions?: string | ClientOptions, options?: ClientOptions);
|
|
273
273
|
/** True with a test key: renders are free (200 per account) and `priceCents` is 0. */
|
|
274
274
|
get isTest(): boolean;
|
|
275
|
-
/** Empty the whole room, or remove what a mask covers.
|
|
275
|
+
/** Empty the whole room, or remove what a mask covers. */
|
|
276
276
|
declutter(params: DeclutterParams & {
|
|
277
277
|
webhook: string | URL;
|
|
278
278
|
}, options?: RequestOptions): Promise<Job>;
|
|
@@ -280,8 +280,7 @@ export declare class Gepetto {
|
|
|
280
280
|
webhook?: undefined;
|
|
281
281
|
}, options?: RequestOptions): Promise<CompletedJob>;
|
|
282
282
|
declutter(params: DeclutterParams, options?: RequestOptions): Promise<Job>;
|
|
283
|
-
/** Furnish a whole room (`roomId` + `styleId`), or the zone of a mask (as a room, or with one `furnitureId`).
|
|
284
|
-
* 0.30 € per successful render. */
|
|
283
|
+
/** Furnish a whole room (`roomId` + `styleId`), or the zone of a mask (as a room, or with one `furnitureId`). */
|
|
285
284
|
furnish(params: FurnishParams & {
|
|
286
285
|
webhook: string | URL;
|
|
287
286
|
}, options?: RequestOptions): Promise<Job>;
|
|
@@ -289,7 +288,7 @@ export declare class Gepetto {
|
|
|
289
288
|
webhook?: undefined;
|
|
290
289
|
}, options?: RequestOptions): Promise<CompletedJob>;
|
|
291
290
|
furnish(params: FurnishParams, options?: RequestOptions): Promise<Job>;
|
|
292
|
-
/** A blue sky (`skyId`) and the matching light, outside or through the windows.
|
|
291
|
+
/** A blue sky (`skyId`) and the matching light, outside or through the windows. */
|
|
293
292
|
sunshine(params: SunshineParams & {
|
|
294
293
|
webhook: string | URL;
|
|
295
294
|
}, options?: RequestOptions): Promise<Job>;
|
|
@@ -297,7 +296,7 @@ export declare class Gepetto {
|
|
|
297
296
|
webhook?: undefined;
|
|
298
297
|
}, options?: RequestOptions): Promise<CompletedJob>;
|
|
299
298
|
sunshine(params: SunshineParams, options?: RequestOptions): Promise<Job>;
|
|
300
|
-
/** The room redesigned in a style.
|
|
299
|
+
/** The room redesigned in a style. */
|
|
301
300
|
creativeRedesign(params: CreativeRedesignParams & {
|
|
302
301
|
webhook: string | URL;
|
|
303
302
|
}, options?: RequestOptions): Promise<Job>;
|
|
@@ -305,7 +304,7 @@ export declare class Gepetto {
|
|
|
305
304
|
webhook?: undefined;
|
|
306
305
|
}, options?: RequestOptions): Promise<CompletedJob>;
|
|
307
306
|
creativeRedesign(params: CreativeRedesignParams, options?: RequestOptions): Promise<Job>;
|
|
308
|
-
/** Repaint the walls, change the floor, or apply a finish: one `surface` per call.
|
|
307
|
+
/** Repaint the walls, change the floor, or apply a finish: one `surface` per call. */
|
|
309
308
|
surfaces(params: SurfacesParams & {
|
|
310
309
|
webhook: string | URL;
|
|
311
310
|
}, options?: RequestOptions): Promise<Job>;
|
|
@@ -313,8 +312,7 @@ export declare class Gepetto {
|
|
|
313
312
|
webhook?: undefined;
|
|
314
313
|
}, options?: RequestOptions): Promise<CompletedJob>;
|
|
315
314
|
surfaces(params: SurfacesParams, options?: RequestOptions): Promise<Job>;
|
|
316
|
-
/** Light and colours corrected at the size of the photo, nothing redrawn; `straighten` for the verticals.
|
|
317
|
-
* 0.20 € per successful render. */
|
|
315
|
+
/** Light and colours corrected at the size of the photo, nothing redrawn; `straighten` for the verticals. */
|
|
318
316
|
enhance(params: EnhanceParams & {
|
|
319
317
|
webhook: string | URL;
|
|
320
318
|
}, options?: RequestOptions): Promise<Job>;
|
|
@@ -322,7 +320,7 @@ export declare class Gepetto {
|
|
|
322
320
|
webhook?: undefined;
|
|
323
321
|
}, options?: RequestOptions): Promise<CompletedJob>;
|
|
324
322
|
enhance(params: EnhanceParams, options?: RequestOptions): Promise<Job>;
|
|
325
|
-
/** Enlarge an image to about 4 (`2k`) or 16 megapixels (`4k`, the default).
|
|
323
|
+
/** Enlarge an image to about 4 (`2k`) or 16 megapixels (`4k`, the default). */
|
|
326
324
|
upscale(params: UpscaleParams & {
|
|
327
325
|
webhook: string | URL;
|
|
328
326
|
}, options?: RequestOptions): Promise<Job>;
|
|
@@ -351,8 +349,8 @@ export declare class Gepetto {
|
|
|
351
349
|
account(): Promise<Account>;
|
|
352
350
|
/** Renders and consumption of the current period. */
|
|
353
351
|
usage(): Promise<Usage>;
|
|
354
|
-
/** The payment link of the subscription
|
|
355
|
-
*
|
|
352
|
+
/** The payment link of the subscription. A test key is enough; once paid,
|
|
353
|
+
* the live key is on https://app.gepettoapp.com/easy/account/api. */
|
|
356
354
|
subscribe(): Promise<{
|
|
357
355
|
url: string;
|
|
358
356
|
message: string;
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Methods and fields have the names of the API: what the docs say of an endpoint is true of the method.
|
|
6
6
|
*/
|
|
7
|
-
export const VERSION = '0.1.
|
|
7
|
+
export const VERSION = '0.1.2';
|
|
8
8
|
const DEFAULT_BASE_URL = 'https://europe-west1-gepettoai.cloudfunctions.net/v2';
|
|
9
9
|
/** A render is stopped by the API after 450 s: 10 minutes covers it, retries included. */
|
|
10
10
|
const DEFAULT_TIMEOUT_MS = 10 * 60 * 1000;
|
|
@@ -147,8 +147,8 @@ export class Gepetto {
|
|
|
147
147
|
usage() {
|
|
148
148
|
return this.#get('/usage');
|
|
149
149
|
}
|
|
150
|
-
/** The payment link of the subscription
|
|
151
|
-
*
|
|
150
|
+
/** The payment link of the subscription. A test key is enough; once paid,
|
|
151
|
+
* the live key is on https://app.gepettoapp.com/easy/account/api. */
|
|
152
152
|
async subscribe() {
|
|
153
153
|
return this.#json(await this.#send('POST', '/subscribe', { body: {}, idempotencyKey: uniqueId() }));
|
|
154
154
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gepetto/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Official TypeScript / JavaScript SDK of the Gepetto API v2: real estate photo editing (enhance, declutter, furnish, sky, restyle, walls and floors, upscale).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "node scripts/build.mjs",
|
|
32
32
|
"ids": "node scripts/generate-ids.mjs",
|
|
33
|
-
"prepublishOnly": "npm run build"
|
|
33
|
+
"prepublishOnly": "npm run build",
|
|
34
|
+
"version": "node scripts/sync-version.mjs src/index.ts && git add src/index.ts"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
36
37
|
"typescript": "5.6.3"
|
|
@@ -48,5 +49,9 @@
|
|
|
48
49
|
"sdk"
|
|
49
50
|
],
|
|
50
51
|
"homepage": "https://docs.gepettoapp.com",
|
|
51
|
-
"license": "
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "git+https://github.com/Gepetto-AI/gepetto-sdk.git"
|
|
56
|
+
}
|
|
52
57
|
}
|