@mynthio/sdk 0.0.11 → 0.0.13
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 +14 -10
- package/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/{task.d.ts → image-generation-result.d.ts} +2 -2
- package/dist/image-generation-result.d.ts.map +1 -0
- package/dist/image-rate-result.d.ts +36 -0
- package/dist/image-rate-result.d.ts.map +1 -0
- package/dist/index.d.ts +79 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/task-async.d.ts +7 -7
- package/dist/task-async.d.ts.map +1 -1
- package/dist/types.d.ts +35 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/task.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ const mynth = new Mynth();
|
|
|
39
39
|
Generate an image:
|
|
40
40
|
|
|
41
41
|
```ts
|
|
42
|
-
const task = await mynth.generate({
|
|
42
|
+
const task = await mynth.image.generate({
|
|
43
43
|
prompt: "A fox in a neon-lit city at night",
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -71,7 +71,7 @@ const mynth = new Mynth({
|
|
|
71
71
|
Sync mode is the default. It polls until the task is completed.
|
|
72
72
|
|
|
73
73
|
```ts
|
|
74
|
-
const task = await mynth.generate({
|
|
74
|
+
const task = await mynth.image.generate({
|
|
75
75
|
prompt: "Editorial product photo of a matte black coffee grinder",
|
|
76
76
|
model: "black-forest-labs/flux.2-dev",
|
|
77
77
|
});
|
|
@@ -85,7 +85,7 @@ console.log(task.urls);
|
|
|
85
85
|
Use async mode when you want to trigger work now and fetch the final task later.
|
|
86
86
|
|
|
87
87
|
```ts
|
|
88
|
-
const taskAsync = await mynth.generate(
|
|
88
|
+
const taskAsync = await mynth.image.generate(
|
|
89
89
|
{
|
|
90
90
|
prompt: "A cinematic fantasy castle on a cliff",
|
|
91
91
|
model: "google/gemini-3.1-flash-image",
|
|
@@ -96,7 +96,7 @@ const taskAsync = await mynth.generate(
|
|
|
96
96
|
console.log(taskAsync.id);
|
|
97
97
|
console.log(taskAsync.access.publicAccessToken);
|
|
98
98
|
|
|
99
|
-
const completedTask = await taskAsync.
|
|
99
|
+
const completedTask = await taskAsync.wait();
|
|
100
100
|
console.log(completedTask.urls);
|
|
101
101
|
```
|
|
102
102
|
|
|
@@ -110,7 +110,7 @@ You can use it as a Bearer token against:
|
|
|
110
110
|
Example:
|
|
111
111
|
|
|
112
112
|
```ts
|
|
113
|
-
const taskAsync = await mynth.generate(
|
|
113
|
+
const taskAsync = await mynth.image.generate(
|
|
114
114
|
{
|
|
115
115
|
prompt: "A cinematic fantasy castle on a cliff",
|
|
116
116
|
model: "google/gemini-3.1-flash-image",
|
|
@@ -143,7 +143,7 @@ if (status.status === "completed") {
|
|
|
143
143
|
`generate()` accepts a typed `ImageGenerationRequest`. The simplest request is just a prompt:
|
|
144
144
|
|
|
145
145
|
```ts
|
|
146
|
-
await mynth.generate({
|
|
146
|
+
await mynth.image.generate({
|
|
147
147
|
prompt: "A cozy cabin in a snowy pine forest",
|
|
148
148
|
});
|
|
149
149
|
```
|
|
@@ -151,7 +151,7 @@ await mynth.generate({
|
|
|
151
151
|
You can also pass structured options:
|
|
152
152
|
|
|
153
153
|
```ts
|
|
154
|
-
const task = await mynth.generate({
|
|
154
|
+
const task = await mynth.image.generate({
|
|
155
155
|
prompt: {
|
|
156
156
|
positive: "Studio portrait of a futuristic fashion model",
|
|
157
157
|
negative: "blurry, low detail",
|
|
@@ -285,7 +285,7 @@ String URLs are a shorthand for image inputs. Structured inputs let you control
|
|
|
285
285
|
Completed tasks expose a few helpful accessors:
|
|
286
286
|
|
|
287
287
|
```ts
|
|
288
|
-
const task = await mynth.generate({
|
|
288
|
+
const task = await mynth.image.generate({
|
|
289
289
|
prompt: "An orange cat astronaut on the moon",
|
|
290
290
|
metadata: { source: "readme-example" },
|
|
291
291
|
});
|
|
@@ -334,6 +334,7 @@ Current model IDs include:
|
|
|
334
334
|
- `black-forest-labs/flux.2-klein-4b`
|
|
335
335
|
- `google/gemini-3.1-flash-image`
|
|
336
336
|
- `google/gemini-3-pro-image-preview`
|
|
337
|
+
- `imagineart/imagineart-1.5-pro`
|
|
337
338
|
- `john6666/bismuth-illustrious-mix`
|
|
338
339
|
- `purplesmartai/pony-diffusion-v6-xl`
|
|
339
340
|
- `recraft/recraft-v4`
|
|
@@ -390,9 +391,12 @@ import {
|
|
|
390
391
|
} from "@mynthio/sdk";
|
|
391
392
|
|
|
392
393
|
try {
|
|
393
|
-
const taskAsync = await mynth.generate(
|
|
394
|
+
const taskAsync = await mynth.image.generate(
|
|
395
|
+
{ prompt: "A watercolor landscape" },
|
|
396
|
+
{ mode: "async" },
|
|
397
|
+
);
|
|
394
398
|
|
|
395
|
-
const task = await taskAsync.
|
|
399
|
+
const task = await taskAsync.wait();
|
|
396
400
|
console.log(task.urls);
|
|
397
401
|
} catch (error) {
|
|
398
402
|
if (error instanceof MynthAPIError) {
|
package/dist/constants.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export declare const API_URL = "https://api.mynth.io";
|
|
|
3
3
|
/** Environment variable name for the API key */
|
|
4
4
|
export declare const API_KEY_ENV_VAR = "MYNTH_API_KEY";
|
|
5
5
|
export declare const GENERATE_IMAGE_PATH = "/image/generate";
|
|
6
|
+
export declare const RATE_IMAGE_PATH = "/image/rate";
|
|
6
7
|
export declare const TASK_PATH = "/tasks";
|
|
7
8
|
export declare const TASK_DETAILS_PATH: (id: string) => string;
|
|
8
9
|
export declare const TASK_STATUS_PATH: (id: string) => string;
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,eAAO,MAAM,OAAO,yBAAyB,CAAC;AAE9C,gDAAgD;AAChD,eAAO,MAAM,eAAe,kBAAkB,CAAC;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kC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,YAAY,EAAE,SAAS,eAAe,EAAE,CAAC;CAC1C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EA0GrD,CAAC"}
|
|
@@ -15,7 +15,7 @@ type TypedImageResult<ContentRatingT> = Omit<MynthSDKTypes.ImageResult, "images"
|
|
|
15
15
|
* @template MetadataT - Type of the metadata attached to the request
|
|
16
16
|
* @template ContentRatingT - Type of the content rating response
|
|
17
17
|
*/
|
|
18
|
-
export declare class
|
|
18
|
+
export declare class ImageGenerationResult<MetadataT = Record<string, unknown> | undefined, ContentRatingT = MynthSDKTypes.ImageResultContentRating | undefined> {
|
|
19
19
|
/** Raw task data from the API */
|
|
20
20
|
readonly data: MynthSDKTypes.TaskData;
|
|
21
21
|
constructor(data: MynthSDKTypes.TaskData);
|
|
@@ -55,4 +55,4 @@ export declare class Task<MetadataT = Record<string, unknown> | undefined, Conte
|
|
|
55
55
|
getMetadata(): MetadataT;
|
|
56
56
|
}
|
|
57
57
|
export {};
|
|
58
|
-
//# sourceMappingURL=
|
|
58
|
+
//# sourceMappingURL=image-generation-result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-generation-result.d.ts","sourceRoot":"","sources":["../src/image-generation-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,yDAAyD;AACzD,KAAK,4BAA4B,CAAC,cAAc,IAAI,IAAI,CACtD,aAAa,CAAC,uBAAuB,EACrC,gBAAgB,CACjB,GAAG;IACF,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF,KAAK,4BAA4B,GAAG,aAAa,CAAC,uBAAuB,CAAC;AAE1E,KAAK,qBAAqB,CAAC,cAAc,IACrC,4BAA4B,CAAC,cAAc,CAAC,GAC5C,4BAA4B,CAAC;AAEjC,6DAA6D;AAC7D,KAAK,gBAAgB,CAAC,cAAc,IAAI,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,QAAQ,CAAC,GAAG;IAClF,MAAM,EAAE,qBAAqB,CAAC,cAAc,CAAC,EAAE,CAAC;CACjD,CAAC;AAEF;;;;;GAKG;AACH,qBAAa,qBAAqB,CAChC,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC/C,cAAc,GAAG,aAAa,CAAC,wBAAwB,GAAG,SAAS;IAEnE,iCAAiC;IACjC,SAAgB,IAAI,EAAE,aAAa,CAAC,QAAQ,CAAC;gBAEjC,IAAI,EAAE,aAAa,CAAC,QAAQ;IAIxC,sCAAsC;IACtC,IAAI,EAAE,IAAI,MAAM,CAEf;IAED,iCAAiC;IACjC,IAAI,MAAM,IAAI,aAAa,CAAC,UAAU,CAErC;IAED;;;OAGG;IACH,IAAI,MAAM,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,IAAI,CAEpD;IAED,8CAA8C;IAC9C,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,8BAA8B;IAC9B,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;;OAGG;IACH,IAAI,IAAI,IAAI,MAAM,EAAE,CAMnB;IAED;;;;;OAKG;IACH,SAAS,CAAC,OAAO,EAAE;QAAE,aAAa,EAAE,IAAI,CAAA;KAAE,GAAG,qBAAqB,CAAC,cAAc,CAAC,EAAE;IACpF,SAAS,CAAC,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,KAAK,CAAA;KAAE,GAAG,4BAA4B,CAAC,cAAc,CAAC,EAAE;IAW9F;;OAEG;IACH,WAAW,IAAI,SAAS;CAGzB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { MynthSDKTypes } from "./types";
|
|
2
|
+
/** A successfully rated image */
|
|
3
|
+
type ImageRateResultItemSuccess<LevelT extends string> = {
|
|
4
|
+
/** The submitted image URL */
|
|
5
|
+
url: string;
|
|
6
|
+
/** The assigned rating level */
|
|
7
|
+
rating: LevelT;
|
|
8
|
+
};
|
|
9
|
+
/** An image that could not be rated */
|
|
10
|
+
type ImageRateResultItemError = {
|
|
11
|
+
error_code: string;
|
|
12
|
+
};
|
|
13
|
+
/** Individual rating result — success or error */
|
|
14
|
+
export type ImageRateResultItem<LevelT extends string = string> = ImageRateResultItemSuccess<LevelT> | ImageRateResultItemError;
|
|
15
|
+
/**
|
|
16
|
+
* Represents the result of a synchronous image content rating request.
|
|
17
|
+
*
|
|
18
|
+
* @template LevelT - Union of possible rating level strings (e.g. `"sfw" | "nsfw"`)
|
|
19
|
+
*/
|
|
20
|
+
export declare class ImageRateResult<LevelT extends string = "sfw" | "nsfw"> {
|
|
21
|
+
/** The task ID created for this rating request */
|
|
22
|
+
readonly taskId: string;
|
|
23
|
+
/** Raw results array from the API */
|
|
24
|
+
readonly results: ImageRateResultItem<LevelT>[];
|
|
25
|
+
constructor(data: MynthSDKTypes.ImageRateResponse<LevelT>);
|
|
26
|
+
/**
|
|
27
|
+
* Get only the successfully rated images.
|
|
28
|
+
*/
|
|
29
|
+
getRatings(): ImageRateResultItemSuccess<LevelT>[];
|
|
30
|
+
/**
|
|
31
|
+
* Get only the images that failed to be rated.
|
|
32
|
+
*/
|
|
33
|
+
getErrors(): ImageRateResultItemError[];
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=image-rate-result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-rate-result.d.ts","sourceRoot":"","sources":["../src/image-rate-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,iCAAiC;AACjC,KAAK,0BAA0B,CAAC,MAAM,SAAS,MAAM,IAAI;IACvD,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,uCAAuC;AACvC,KAAK,wBAAwB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,kDAAkD;AAClD,MAAM,MAAM,mBAAmB,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,IAC1D,0BAA0B,CAAC,MAAM,CAAC,GAClC,wBAAwB,CAAC;AAE7B;;;;GAIG;AACH,qBAAa,eAAe,CAAC,MAAM,SAAS,MAAM,GAAG,KAAK,GAAG,MAAM;IACjE,kDAAkD;IAClD,SAAgB,MAAM,EAAE,MAAM,CAAC;IAE/B,qCAAqC;IACrC,SAAgB,OAAO,EAAE,mBAAmB,CAAC,MAAM,CAAC,EAAE,CAAC;gBAE3C,IAAI,EAAE,aAAa,CAAC,iBAAiB,CAAC,MAAM,CAAC;IAKzD;;OAEG;IACH,UAAU,IAAI,0BAA0B,CAAC,MAAM,CAAC,EAAE;IAIlD;;OAEG;IACH,SAAS,IAAI,wBAAwB,EAAE;CAGxC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { MynthAPIError } from "./client";
|
|
2
2
|
import type { AvailableModel, ModelCapability } from "./constants";
|
|
3
3
|
import { AVAILABLE_MODELS } from "./constants";
|
|
4
|
-
import
|
|
4
|
+
import { ImageGenerationResult } from "./image-generation-result";
|
|
5
|
+
import { ImageRateResult } from "./image-rate-result";
|
|
5
6
|
import type { TaskAsyncAccess } from "./task-async";
|
|
6
7
|
import { TaskAsync, TaskAsyncFetchError, TaskAsyncTaskFailedError, TaskAsyncTaskFetchError, TaskAsyncTimeoutError, TaskAsyncUnauthorizedError } from "./task-async";
|
|
7
8
|
import type { MynthSDKTypes } from "./types";
|
|
@@ -47,30 +48,35 @@ type ExtractContentRatingResponse<T extends MynthSDKTypes.ImageGenerationRequest
|
|
|
47
48
|
mode: "default";
|
|
48
49
|
level: MynthSDKTypes.ImageResultContentRatingDefaultLevel;
|
|
49
50
|
} : MynthSDKTypes.ImageResultContentRating | undefined;
|
|
51
|
+
type ExtractRateLevelValues<T extends MynthSDKTypes.ImageRateRequest> = T["levels"] extends readonly {
|
|
52
|
+
value: infer V;
|
|
53
|
+
}[] ? V extends string ? V : string : T["levels"] extends {
|
|
54
|
+
value: infer V;
|
|
55
|
+
}[] ? V extends string ? V : string : "sfw" | "nsfw";
|
|
50
56
|
/**
|
|
51
|
-
*
|
|
57
|
+
* Client for interacting with the Mynth image generation and rating APIs.
|
|
52
58
|
*
|
|
53
59
|
* @example
|
|
54
60
|
* ```typescript
|
|
55
61
|
* // Using environment variable (MYNTH_API_KEY)
|
|
56
|
-
* const
|
|
62
|
+
* const image = new MynthImage();
|
|
57
63
|
*
|
|
58
64
|
* // Or with explicit API key
|
|
59
|
-
* const
|
|
65
|
+
* const image = new MynthImage({ apiKey: "mak_..." });
|
|
60
66
|
*
|
|
61
67
|
* // Generate an image
|
|
62
|
-
* const
|
|
68
|
+
* const result = await image.generate({
|
|
63
69
|
* prompt: "A beautiful sunset over mountains",
|
|
64
70
|
* model: "black-forest-labs/flux.1-dev",
|
|
65
71
|
* });
|
|
66
72
|
*
|
|
67
|
-
* console.log(
|
|
73
|
+
* console.log(result.urls); // ["https://..."]
|
|
68
74
|
* ```
|
|
69
75
|
*/
|
|
70
|
-
declare class
|
|
76
|
+
declare class MynthImage {
|
|
71
77
|
private readonly client;
|
|
72
78
|
/**
|
|
73
|
-
* Creates a new
|
|
79
|
+
* Creates a new MynthImage client instance.
|
|
74
80
|
*
|
|
75
81
|
* @param options - Configuration options
|
|
76
82
|
* @param options.apiKey - Your API key (defaults to MYNTH_API_KEY env var)
|
|
@@ -82,28 +88,28 @@ declare class Mynth {
|
|
|
82
88
|
* Generate images from a text prompt.
|
|
83
89
|
*
|
|
84
90
|
* @param request - Image generation request parameters
|
|
85
|
-
* @returns A completed
|
|
91
|
+
* @returns A completed ImageGenerationResult with the generation results
|
|
86
92
|
*
|
|
87
93
|
* @example
|
|
88
94
|
* ```typescript
|
|
89
|
-
* const
|
|
95
|
+
* const result = await image.generate({
|
|
90
96
|
* prompt: "A serene lake at dawn",
|
|
91
97
|
* model: "black-forest-labs/flux.1-dev",
|
|
92
98
|
* });
|
|
93
|
-
* console.log(
|
|
99
|
+
* console.log(result.urls);
|
|
94
100
|
* ```
|
|
95
101
|
*/
|
|
96
|
-
generate<const T extends MynthSDKTypes.ImageGenerationRequest>(request: T): Promise<
|
|
102
|
+
generate<const T extends MynthSDKTypes.ImageGenerationRequest>(request: T): Promise<ImageGenerationResult<ExtractMetadata<T>, ExtractContentRatingResponse<T>>>;
|
|
97
103
|
/**
|
|
98
104
|
* Generate images asynchronously without waiting for completion.
|
|
99
105
|
*
|
|
100
106
|
* @param request - Image generation request parameters
|
|
101
107
|
* @param opts - Options with mode set to "async"
|
|
102
|
-
* @returns A TaskAsync that can be polled for completion
|
|
108
|
+
* @returns A TaskAsync that can be polled for completion via `.wait()`
|
|
103
109
|
*
|
|
104
110
|
* @example
|
|
105
111
|
* ```typescript
|
|
106
|
-
* const taskAsync = await
|
|
112
|
+
* const taskAsync = await image.generate(
|
|
107
113
|
* { prompt: "A futuristic cityscape" },
|
|
108
114
|
* { mode: "async" }
|
|
109
115
|
* );
|
|
@@ -112,24 +118,78 @@ declare class Mynth {
|
|
|
112
118
|
* return { id: taskAsync.id, access: taskAsync.access };
|
|
113
119
|
*
|
|
114
120
|
* // Or wait for completion later
|
|
115
|
-
* const
|
|
121
|
+
* const result = await taskAsync.wait();
|
|
116
122
|
* ```
|
|
117
123
|
*/
|
|
118
124
|
generate<const T extends MynthSDKTypes.ImageGenerationRequest>(request: T, opts: {
|
|
119
125
|
mode: "async";
|
|
120
|
-
}): Promise<TaskAsync<ExtractMetadata<T>, ExtractContentRatingResponse<T
|
|
126
|
+
}): Promise<TaskAsync<ImageGenerationResult<ExtractMetadata<T>, ExtractContentRatingResponse<T>>>>;
|
|
121
127
|
/**
|
|
122
128
|
* Generate images synchronously, waiting for completion.
|
|
123
129
|
*
|
|
124
130
|
* @param request - Image generation request parameters
|
|
125
131
|
* @param opts - Options with mode set to "sync"
|
|
126
|
-
* @returns A completed
|
|
132
|
+
* @returns A completed ImageGenerationResult with the generation results
|
|
127
133
|
*/
|
|
128
134
|
generate<const T extends MynthSDKTypes.ImageGenerationRequest>(request: T, opts: {
|
|
129
135
|
mode: "sync";
|
|
130
|
-
}): Promise<
|
|
136
|
+
}): Promise<ImageGenerationResult<ExtractMetadata<T>, ExtractContentRatingResponse<T>>>;
|
|
137
|
+
/**
|
|
138
|
+
* Rate the content of one or more images.
|
|
139
|
+
*
|
|
140
|
+
* Uses AI classification to assign a rating level to each image.
|
|
141
|
+
* By default uses `"sfw"` / `"nsfw"` levels; pass custom `levels` to define
|
|
142
|
+
* your own scale.
|
|
143
|
+
*
|
|
144
|
+
* @param request - URLs to rate and optional custom levels
|
|
145
|
+
* @returns An ImageRateResult with per-image ratings
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```typescript
|
|
149
|
+
* // Default sfw/nsfw
|
|
150
|
+
* const result = await image.rate({ urls: ["https://..."] });
|
|
151
|
+
* console.log(result.getRatings()); // [{ url: "...", rating: "sfw" }]
|
|
152
|
+
*
|
|
153
|
+
* // Custom levels
|
|
154
|
+
* const result = await image.rate({
|
|
155
|
+
* urls: ["https://..."],
|
|
156
|
+
* levels: [
|
|
157
|
+
* { value: "safe", description: "No explicit content" },
|
|
158
|
+
* { value: "mature", description: "Adult themes, no nudity" },
|
|
159
|
+
* { value: "explicit", description: "Contains nudity or graphic content" },
|
|
160
|
+
* ] as const,
|
|
161
|
+
* });
|
|
162
|
+
* result.getRatings(); // [{ url: "...", rating: "safe" | "mature" | "explicit" }]
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
rate<const T extends MynthSDKTypes.ImageRateRequest>(request: T): Promise<ImageRateResult<ExtractRateLevelValues<T>>>;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Bundled Mynth client providing access to all media type clients.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```typescript
|
|
172
|
+
* const mynth = new Mynth({ apiKey: "mak_..." });
|
|
173
|
+
*
|
|
174
|
+
* // Generate an image
|
|
175
|
+
* const result = await mynth.image.generate({
|
|
176
|
+
* prompt: "A beautiful sunset over mountains",
|
|
177
|
+
* });
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
declare class Mynth {
|
|
181
|
+
/** Image generation and rating client */
|
|
182
|
+
readonly image: MynthImage;
|
|
183
|
+
/**
|
|
184
|
+
* Creates a new Mynth client instance.
|
|
185
|
+
*
|
|
186
|
+
* @param options - Configuration options
|
|
187
|
+
* @param options.apiKey - Your API key (defaults to MYNTH_API_KEY env var)
|
|
188
|
+
* @param options.baseUrl - Custom API base URL
|
|
189
|
+
*/
|
|
190
|
+
constructor(options?: MynthOptions);
|
|
131
191
|
}
|
|
132
|
-
export { AVAILABLE_MODELS, Mynth, MynthAPIError, TaskAsyncFetchError, TaskAsyncTaskFailedError, TaskAsyncTaskFetchError, TaskAsyncTimeoutError, TaskAsyncUnauthorizedError, };
|
|
192
|
+
export { AVAILABLE_MODELS, ImageGenerationResult, ImageRateResult, Mynth, MynthImage, MynthAPIError, TaskAsyncFetchError, TaskAsyncTaskFailedError, TaskAsyncTaskFetchError, TaskAsyncTimeoutError, TaskAsyncUnauthorizedError, };
|
|
133
193
|
export type { AvailableModel, GenerateOptions, ModelCapability, MynthOptions, MynthSDKTypes, TaskAsyncAccess, };
|
|
134
194
|
export default Mynth;
|
|
135
195
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAe,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,
|
|
1
|
+
{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U,CAAC;IAE3B;;;;;;OAMG;gBACS,OAAO,GAAE,YAAiB;CAGvC;AAED,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,KAAK,EACL,UAAU,EAEV,aAAa,EACb,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,GAC3B,CAAC;AACF,YAAY,EACV,cAAc,EACd,eAAe,EACf,eAAe,EACf,YAAY,EACZ,aAAa,EACb,eAAe,GAChB,CAAC;AACF,eAAe,KAAK,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
2
|
+
var b="https://api.mynth.io",X="MYNTH_API_KEY",v="/image/generate",G="/image/rate";var O=(J)=>`/tasks/${J}`,K=(J)=>`/tasks/${J}/status`,M=[{id:"auto",label:"Auto",capabilities:[]},{id:"alibaba/qwen-image-2.0",label:"Qwen Image 2.0",capabilities:["inputs","native_enhance_prompt"]},{id:"alibaba/qwen-image-2.0-pro",label:"Qwen Image 2.0 Pro",capabilities:["inputs","native_enhance_prompt"]},{id:"bytedance/seedream-5.0-lite",label:"Seedream 5.0 Lite",capabilities:["inputs"]},{id:"black-forest-labs/flux.1-dev",label:"FLUX.1 Dev",capabilities:["mynth_magic_prompt"]},{id:"black-forest-labs/flux-1-schnell",label:"FLUX.1 Schnell",capabilities:["mynth_magic_prompt"]},{id:"tongyi-mai/z-image-turbo",label:"Z Image Turbo",capabilities:["mynth_magic_prompt"]},{id:"black-forest-labs/flux.2-dev",label:"FLUX.2 Dev",capabilities:["inputs","mynth_magic_prompt"]},{id:"black-forest-labs/flux.2-pro",label:"FLUX.2 Pro",capabilities:["inputs"]},{id:"black-forest-labs/flux.2-flex",label:"FLUX.2 Flex",capabilities:["inputs"]},{id:"black-forest-labs/flux.2-max",label:"FLUX.2 Max",capabilities:["inputs"]},{id:"black-forest-labs/flux.2-klein-4b",label:"FLUX.2 Klein 4B",capabilities:["inputs"]},{id:"john6666/bismuth-illustrious-mix",label:"Bismuth Illustrious Mix",capabilities:["mynth_magic_prompt","negative_prompt"]},{id:"purplesmartai/pony-diffusion-v6-xl",label:"Pony Diffusion V6 XL",capabilities:["negative_prompt"]},{id:"recraft/recraft-v4",label:"Recraft V4",capabilities:[]},{id:"recraft/recraft-v4-pro",label:"Recraft V4 Pro",capabilities:[]},{id:"google/gemini-3.1-flash-image",label:"Nano Banana 2",capabilities:["inputs","4k","native_enhance_prompt","native_auto_size"]},{id:"google/gemini-3-pro-image-preview",label:"Nano Banana Pro",capabilities:["4k","native_enhance_prompt"]},{id:"imagineart/imagineart-1.5-pro",label:"ImagineArt 1.5 Pro",capabilities:["4k"]},{id:"wan/wan2.6-image",label:"Wan 2.6 Image",capabilities:[]},{id:"xai/grok-imagine-image",label:"Grok Imagine Image",capabilities:["inputs","native_auto_size"]}];class w extends Error{status;code;constructor(J,Q,Z){super(J);this.name="MynthAPIError",this.status=Q,this.code=Z}}class D{apiKey;baseUrl;constructor(J){this.apiKey=J.apiKey,this.baseUrl=J.baseUrl?J.baseUrl.endsWith("/")?J.baseUrl.slice(0,-1):J.baseUrl:b}getAuthHeaders(J){return{Authorization:`Bearer ${J?.accessToken??this.apiKey}`}}getUrl(J){return`${this.baseUrl}${J}`}async post(J,Q){let Z=await fetch(this.getUrl(J),{method:"POST",headers:{"Content-Type":"application/json",...this.getAuthHeaders()},body:JSON.stringify(Q)}),$=await Z.json();if(!Z.ok){let x=$,B=x.error||x.message||`Request failed with status ${Z.status}`;throw new w(B,Z.status,x.code)}return $}async get(J,{headers:Q,accessToken:Z}={}){let $=await fetch(this.getUrl(J),{headers:{...this.getAuthHeaders({accessToken:Z}),...Q}});return{data:await $.json(),status:$.status,ok:$.ok}}}class j{data;constructor(J){this.data=J}get id(){return this.data.id}get status(){return this.data.status}get result(){return this.data.result}get isCompleted(){return this.data.status==="completed"}get isFailed(){return this.data.status==="failed"}get urls(){return this.data.result?.images.filter((J)=>J.status==="succeeded").map((J)=>J.url)??[]}getImages(J={}){if(J.includeFailed)return this.data.result?.images??[];return this.data.result?.images.filter((Q)=>Q.status==="succeeded")??[]}getMetadata(){return this.data.request?.metadata}}class q{taskId;results;constructor(J){this.taskId=J.taskId,this.results=J.results}getRatings(){return this.results.filter((J)=>("url"in J))}getErrors(){return this.results.filter((J)=>("error_code"in J))}}var H=300000,_=12000,m=2500,h=5000,E=7;class Y extends Error{constructor(J){super(`Task ${J} polling timed out after ${H}ms`);this.name="TaskAsyncTimeoutError"}}class W extends Error{constructor(J){super(`Unauthorized access to task ${J}`);this.name="TaskAsyncUnauthorizedError"}}class z extends Error{constructor(J,Q){super(`Failed to fetch status for task ${J} after multiple retries`);this.name="TaskAsyncFetchError",this.cause=Q}}class V extends Error{constructor(J,Q){let Z=Q?` (status ${Q})`:"";super(`Failed to fetch task ${J}${Z}`);this.name="TaskAsyncTaskFetchError"}}class f extends Error{constructor(J){super(`Task ${J} failed during generation`);this.name="TaskAsyncTaskFailedError"}}class C{id;client;_access;resultFactory;_completionPromise=null;constructor(J,Q){this.id=J,this.client=Q.client,this._access={publicAccessToken:Q.pat},this.resultFactory=Q.resultFactory}get access(){return this._access}toString(){return this.id}async wait(){if(!this._completionPromise)this._completionPromise=this.pollUntilCompleted();return this._completionPromise}async pollUntilCompleted(){let J=Date.now(),Q=0,Z=!1,$;while(!0){let x=Date.now()-J;if(x>=H)throw new Y(this.id);let B=await this.fetchStatus(Z);if(B.ok){if(Q=0,B.status==="completed"){let g=await this.fetchTask();return this.resultFactory(g)}if(B.status==="failed")throw new f(this.id)}else{if(B.unauthorized){if(this._access.publicAccessToken&&!Z){Z=!0;continue}throw new W(this.id)}if(B.retryable){if(Q++,$=B.error,Q>=E)throw new z(this.id,$)}}let S=x<_?m:h,U=Math.random()*500,R=S+U,P=H-x,L=Math.min(R,P);await this.sleep(L)}}async fetchStatus(J){let Q=J||!this._access.publicAccessToken?void 0:this._access.publicAccessToken;try{let Z=await this.client.get(K(this.id),{accessToken:Q});if(Z.ok)return{ok:!0,status:Z.data.status};if(Z.status===401||Z.status===403)return{ok:!1,unauthorized:!0,retryable:!1};if(Z.status===404)return{ok:!1,unauthorized:!0,retryable:!1};if(Z.status>=500)return{ok:!1,unauthorized:!1,retryable:!0};return{ok:!1,unauthorized:!1,retryable:!1}}catch(Z){return{ok:!1,unauthorized:!1,retryable:!0,error:Z instanceof Error?Z:Error(String(Z))}}}async fetchTask(){let J=await this.client.get(O(this.id));if(J.ok)return J.data;if(J.status===401||J.status===403)throw new W(this.id);if(J.status===404)throw new W(this.id);throw new V(this.id,J.status)}sleep(J){return new Promise((Q)=>setTimeout(Q,J))}}function I(){if(typeof process<"u"&&process.env)return process.env[X];return}class F{client;constructor(J={}){let Q=J.apiKey??I();if(!Q)throw Error(`Mynth API key is required. Either pass it as an option or set the ${X} environment variable.`);this.client=new D({apiKey:Q,baseUrl:J.baseUrl})}async generate(J,Q={}){let Z=Q.mode??"sync",$=await this.client.post(v,J),x=new C($.taskId,{client:this.client,pat:$.access?.publicAccessToken,resultFactory:(B)=>new j(B)});if(Z==="async")return x;return x.wait()}async rate(J){let Q=await this.client.post(G,J);return new q(Q)}}class N{image;constructor(J={}){this.image=new F(J)}}var t=N;export{t as default,W as TaskAsyncUnauthorizedError,Y as TaskAsyncTimeoutError,V as TaskAsyncTaskFetchError,f as TaskAsyncTaskFailedError,z as TaskAsyncFetchError,F as MynthImage,w as MynthAPIError,N as Mynth,q as ImageRateResult,j as ImageGenerationResult,M as AVAILABLE_MODELS};
|
package/dist/task-async.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { MynthClient } from "./client";
|
|
2
|
-
import { Task } from "./task";
|
|
3
2
|
import type { MynthSDKTypes } from "./types";
|
|
4
3
|
/**
|
|
5
4
|
* Error thrown when task polling exceeds the maximum timeout duration.
|
|
@@ -40,20 +39,21 @@ export type TaskAsyncAccess = {
|
|
|
40
39
|
};
|
|
41
40
|
/**
|
|
42
41
|
* Represents an async task that can be polled for completion.
|
|
43
|
-
* Use `
|
|
42
|
+
* Use `wait()` to poll until completion and get the typed result.
|
|
44
43
|
*
|
|
45
|
-
* @template
|
|
46
|
-
* @template ContentRatingT - Type of the content rating response
|
|
44
|
+
* @template ResultT - The result type returned once the task completes
|
|
47
45
|
*/
|
|
48
|
-
export declare class TaskAsync<
|
|
46
|
+
export declare class TaskAsync<ResultT> {
|
|
49
47
|
/** The unique identifier for this task */
|
|
50
48
|
readonly id: string;
|
|
51
49
|
private readonly client;
|
|
52
50
|
private readonly _access;
|
|
51
|
+
private readonly resultFactory;
|
|
53
52
|
private _completionPromise;
|
|
54
53
|
constructor(id: string, options: {
|
|
55
54
|
client: MynthClient;
|
|
56
55
|
pat?: string;
|
|
56
|
+
resultFactory: (data: MynthSDKTypes.TaskData) => ResultT;
|
|
57
57
|
});
|
|
58
58
|
/**
|
|
59
59
|
* Public access information for client-side polling.
|
|
@@ -62,7 +62,7 @@ export declare class TaskAsync<MetadataT = Record<string, unknown> | undefined,
|
|
|
62
62
|
get access(): TaskAsyncAccess;
|
|
63
63
|
toString(): string;
|
|
64
64
|
/**
|
|
65
|
-
* Polls the task until completion and returns the
|
|
65
|
+
* Polls the task until completion and returns the typed result.
|
|
66
66
|
* Multiple calls to this method return the same promise.
|
|
67
67
|
*
|
|
68
68
|
* @throws {TaskAsyncTimeoutError} If polling exceeds the timeout
|
|
@@ -70,7 +70,7 @@ export declare class TaskAsync<MetadataT = Record<string, unknown> | undefined,
|
|
|
70
70
|
* @throws {TaskAsyncFetchError} If fetching status fails repeatedly
|
|
71
71
|
* @throws {TaskAsyncTaskFailedError} If the task fails during generation
|
|
72
72
|
*/
|
|
73
|
-
|
|
73
|
+
wait(): Promise<ResultT>;
|
|
74
74
|
private pollUntilCompleted;
|
|
75
75
|
private fetchStatus;
|
|
76
76
|
private fetchTask;
|
package/dist/task-async.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-async.d.ts","sourceRoot":"","sources":["../src/task-async.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,
|
|
1
|
+
{"version":3,"file":"task-async.d.ts","sourceRoot":"","sources":["../src/task-async.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAQ7C;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,MAAM,EAAE,MAAM;CAI3B;AAED;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;gBACvC,MAAM,EAAE,MAAM;CAI3B;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAK1C;AAED;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;CAK5C;AAED;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,MAAM,EAAE,MAAM;CAI3B;AAMD;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,yDAAyD;IACzD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF;;;;;GAKG;AACH,qBAAa,SAAS,CAAC,OAAO;IAC5B,0CAA0C;IAC1C,SAAgB,EAAE,EAAE,MAAM,CAAC;IAE3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IAErC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;IAE1C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA4C;IAE1E,OAAO,CAAC,kBAAkB,CAAiC;gBAGzD,EAAE,EAAE,MAAM,EACV,OAAO,EAAE;QACP,MAAM,EAAE,WAAW,CAAC;QACpB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,aAAa,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,QAAQ,KAAK,OAAO,CAAC;KAC1D;IAQH;;;OAGG;IACH,IAAI,MAAM,IAAI,eAAe,CAE5B;IAED,QAAQ,IAAI,MAAM;IAIlB;;;;;;;;OAQG;IACU,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;YASvB,kBAAkB;YA6DlB,WAAW;YA2CX,SAAS;IAkBvB,OAAO,CAAC,KAAK;CAGd"}
|
package/dist/types.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
export declare namespace MynthSDKTypes {
|
|
6
6
|
/** Status of a generation task */
|
|
7
7
|
type TaskStatus = "pending" | "completed" | "failed";
|
|
8
|
-
/** Type of task
|
|
9
|
-
type TaskType = "image.generate";
|
|
8
|
+
/** Type of task */
|
|
9
|
+
type TaskType = "image.generate" | "image.rate";
|
|
10
10
|
/** Full task data returned from the API */
|
|
11
11
|
type TaskData = {
|
|
12
12
|
/** Unique task identifier */
|
|
@@ -31,7 +31,7 @@ export declare namespace MynthSDKTypes {
|
|
|
31
31
|
updatedAt: string;
|
|
32
32
|
};
|
|
33
33
|
/** Available model identifiers */
|
|
34
|
-
type ImageGenerationModelId = "alibaba/qwen-image-2.0" | "alibaba/qwen-image-2.0-pro" | "bytedance/seedream-5.0-lite" | "black-forest-labs/flux.1-dev" | "black-forest-labs/flux-1-schnell" | "black-forest-labs/flux.2-dev" | "black-forest-labs/flux.2-pro" | "black-forest-labs/flux.2-flex" | "black-forest-labs/flux.2-max" | "black-forest-labs/flux.2-klein-4b" | "google/gemini-3.1-flash-image" | "google/gemini-3-pro-image-preview" | "tongyi-mai/z-image-turbo" | "john6666/bismuth-illustrious-mix" | "purplesmartai/pony-diffusion-v6-xl" | "recraft/recraft-v4" | "recraft/recraft-v4-pro" | "wan/wan2.6-image" | "xai/grok-imagine-image";
|
|
34
|
+
type ImageGenerationModelId = "alibaba/qwen-image-2.0" | "alibaba/qwen-image-2.0-pro" | "bytedance/seedream-5.0-lite" | "black-forest-labs/flux.1-dev" | "black-forest-labs/flux-1-schnell" | "black-forest-labs/flux.2-dev" | "black-forest-labs/flux.2-pro" | "black-forest-labs/flux.2-flex" | "black-forest-labs/flux.2-max" | "black-forest-labs/flux.2-klein-4b" | "google/gemini-3.1-flash-image" | "google/gemini-3-pro-image-preview" | "imagineart/imagineart-1.5-pro" | "tongyi-mai/z-image-turbo" | "john6666/bismuth-illustrious-mix" | "purplesmartai/pony-diffusion-v6-xl" | "recraft/recraft-v4" | "recraft/recraft-v4-pro" | "wan/wan2.6-image" | "xai/grok-imagine-image";
|
|
35
35
|
/** Model to use for generation ("auto" lets the system choose) */
|
|
36
36
|
type ImageGenerationModel = ImageGenerationModelId | "auto";
|
|
37
37
|
/** Prompt enhancement mode for structured prompts */
|
|
@@ -256,5 +256,37 @@ export declare namespace MynthSDKTypes {
|
|
|
256
256
|
* Webhook payload union
|
|
257
257
|
*/
|
|
258
258
|
type WebhookPayload = WebhookTaskImageCompletedPayload | WebhookTaskImageFailedPayload;
|
|
259
|
+
/** Custom rating level definition */
|
|
260
|
+
type ImageRateRequestLevel<T extends string = string> = {
|
|
261
|
+
/** Level value returned in results */
|
|
262
|
+
value: T;
|
|
263
|
+
/** Human-readable description for the rating model */
|
|
264
|
+
description: string;
|
|
265
|
+
};
|
|
266
|
+
/** Request body for the image rate endpoint */
|
|
267
|
+
type ImageRateRequest = {
|
|
268
|
+
/** Image URLs to rate (1–10) */
|
|
269
|
+
urls: string[];
|
|
270
|
+
/** Custom rating levels (uses default sfw/nsfw if not provided) */
|
|
271
|
+
levels?: readonly ImageRateRequestLevel[];
|
|
272
|
+
};
|
|
273
|
+
/** A successfully rated image */
|
|
274
|
+
type ImageRateResponseItemSuccess<LevelT extends string = string> = {
|
|
275
|
+
/** The submitted image URL */
|
|
276
|
+
url: string;
|
|
277
|
+
/** The assigned rating level */
|
|
278
|
+
rating: LevelT;
|
|
279
|
+
};
|
|
280
|
+
/** An image that could not be rated */
|
|
281
|
+
type ImageRateResponseItemError = {
|
|
282
|
+
error_code: string;
|
|
283
|
+
};
|
|
284
|
+
/** Individual rating result item */
|
|
285
|
+
type ImageRateResponseItem<LevelT extends string = string> = ImageRateResponseItemSuccess<LevelT> | ImageRateResponseItemError;
|
|
286
|
+
/** API response from the image rate endpoint */
|
|
287
|
+
type ImageRateResponse<LevelT extends string = string> = {
|
|
288
|
+
taskId: string;
|
|
289
|
+
results: ImageRateResponseItem<LevelT>[];
|
|
290
|
+
};
|
|
259
291
|
}
|
|
260
292
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,yBAAiB,aAAa,CAAC;IAC7B,kCAAkC;IAClC,KAAY,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAE5D,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,yBAAiB,aAAa,CAAC;IAC7B,kCAAkC;IAClC,KAAY,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAE5D,mBAAmB;IACnB,KAAY,QAAQ,GAAG,gBAAgB,GAAG,YAAY,CAAC;IAEvD,2CAA2C;IAC3C,KAAY,QAAQ,GAAG;QACrB,6BAA6B;QAC7B,EAAE,EAAE,MAAM,CAAC;QACX,iCAAiC;QACjC,MAAM,EAAE,UAAU,CAAC;QACnB,mBAAmB;QACnB,IAAI,EAAE,QAAQ,CAAC;QACf,sDAAsD;QACtD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,0CAA0C;QAC1C,MAAM,EAAE,MAAM,CAAC;QACf,+DAA+D;QAC/D,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QACpB,gDAAgD;QAChD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AEG;IACH,KAAY,cAAc,GAAG,gCAAgC,GAAG,6BAA6B,CAAC;IAM9F,qCAAqC;IACrC,KAAY,qBAAqB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI;QAC7D,sCAAsC;QACtC,KAAK,EAAE,CAAC,CAAC;QACT,sDAAsD;QACtD,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IAEF,+CAA+C;IAC/C,KAAY,gBAAgB,GAAG;QAC7B,gCAAgC;QAChC,IAAI,EAAE,MAAM,EAAE,CAAC;QACf,mEAAmE;QACnE,MAAM,CAAC,EAAE,SAAS,qBAAqB,EAAE,CAAC;KAC3C,CAAC;IAEF,iCAAiC;IACjC,KAAY,4BAA4B,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,IAAI;QACzE,8BAA8B;QAC9B,GAAG,EAAE,MAAM,CAAC;QACZ,gCAAgC;QAChC,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IAEF,uCAAuC;IACvC,KAAY,0BAA0B,GAAG;QACvC,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF,oCAAoC;IACpC,KAAY,qBAAqB,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,IAC5D,4BAA4B,CAAC,MAAM,CAAC,GACpC,0BAA0B,CAAC;IAE/B,gDAAgD;IAChD,KAAY,iBAAiB,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,IAAI;QAC9D,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,qBAAqB,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1C,CAAC;CACH"}
|
package/package.json
CHANGED
package/dist/task.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../src/task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,yDAAyD;AACzD,KAAK,4BAA4B,CAAC,cAAc,IAAI,IAAI,CACtD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