@markupai/api 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/errors/ConflictError.d.ts +9 -0
- package/dist/cjs/api/errors/ConflictError.js +52 -0
- package/dist/cjs/api/errors/index.d.ts +1 -0
- package/dist/cjs/api/errors/index.js +1 -0
- package/dist/cjs/api/resources/styleGuides/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/styleGuides/client/Client.js +6 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/errors/ConflictError.d.mts +9 -0
- package/dist/esm/api/errors/ConflictError.mjs +15 -0
- package/dist/esm/api/errors/index.d.mts +1 -0
- package/dist/esm/api/errors/index.mjs +1 -0
- package/dist/esm/api/resources/styleGuides/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/styleGuides/client/Client.mjs +6 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,6 +7,24 @@ The official Markup AI SDK for interacting with the Markup AI API.
|
|
|
7
7
|
|
|
8
8
|
## Table of Contents
|
|
9
9
|
|
|
10
|
+
- [Table of Contents](#table-of-contents)
|
|
11
|
+
- [Installation](#installation)
|
|
12
|
+
- [Reference](#reference)
|
|
13
|
+
- [Usage](#usage)
|
|
14
|
+
- [Request and Response Types](#request-and-response-types)
|
|
15
|
+
- [Exception Handling](#exception-handling)
|
|
16
|
+
- [Advanced](#advanced)
|
|
17
|
+
- [Additional Headers](#additional-headers)
|
|
18
|
+
- [Additional Query String Parameters](#additional-query-string-parameters)
|
|
19
|
+
- [Retries](#retries)
|
|
20
|
+
- [Timeouts](#timeouts)
|
|
21
|
+
- [Aborting Requests](#aborting-requests)
|
|
22
|
+
- [Access Raw Response Data](#access-raw-response-data)
|
|
23
|
+
- [Runtime Compatibility](#runtime-compatibility)
|
|
24
|
+
- [Contributing](#contributing)
|
|
25
|
+
|
|
26
|
+
## Table of Contents
|
|
27
|
+
|
|
10
28
|
- [Installation](#installation)
|
|
11
29
|
- [Reference](#reference)
|
|
12
30
|
- [Usage](#usage)
|
package/dist/cjs/Client.js
CHANGED
|
@@ -48,8 +48,8 @@ class MarkupAIClient {
|
|
|
48
48
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
49
49
|
"X-Fern-Language": "JavaScript",
|
|
50
50
|
"X-Fern-SDK-Name": "@markupai/api",
|
|
51
|
-
"X-Fern-SDK-Version": "1.
|
|
52
|
-
"User-Agent": "@markupai/api/1.
|
|
51
|
+
"X-Fern-SDK-Version": "1.2.0",
|
|
52
|
+
"User-Agent": "@markupai/api/1.2.0",
|
|
53
53
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
54
54
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
55
55
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as errors from "../../errors/index.js";
|
|
5
|
+
import * as MarkupAI from "../index.js";
|
|
6
|
+
import * as core from "../../core/index.js";
|
|
7
|
+
export declare class ConflictError extends errors.MarkupAIError {
|
|
8
|
+
constructor(body: MarkupAI.ErrorResponse, rawResponse?: core.RawResponse);
|
|
9
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ConflictError = void 0;
|
|
40
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
41
|
+
class ConflictError extends errors.MarkupAIError {
|
|
42
|
+
constructor(body, rawResponse) {
|
|
43
|
+
super({
|
|
44
|
+
message: "ConflictError",
|
|
45
|
+
statusCode: 409,
|
|
46
|
+
body: body,
|
|
47
|
+
rawResponse: rawResponse,
|
|
48
|
+
});
|
|
49
|
+
Object.setPrototypeOf(this, ConflictError.prototype);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.ConflictError = ConflictError;
|
|
@@ -2,6 +2,7 @@ export * from "./UnauthorizedError.js";
|
|
|
2
2
|
export * from "./ForbiddenError.js";
|
|
3
3
|
export * from "./UnprocessableEntityError.js";
|
|
4
4
|
export * from "./InternalServerError.js";
|
|
5
|
+
export * from "./ConflictError.js";
|
|
5
6
|
export * from "./ContentTooLargeError.js";
|
|
6
7
|
export * from "./NotFoundError.js";
|
|
7
8
|
export * from "./TooManyRequestsError.js";
|
|
@@ -18,6 +18,7 @@ __exportStar(require("./UnauthorizedError.js"), exports);
|
|
|
18
18
|
__exportStar(require("./ForbiddenError.js"), exports);
|
|
19
19
|
__exportStar(require("./UnprocessableEntityError.js"), exports);
|
|
20
20
|
__exportStar(require("./InternalServerError.js"), exports);
|
|
21
|
+
__exportStar(require("./ConflictError.js"), exports);
|
|
21
22
|
__exportStar(require("./ContentTooLargeError.js"), exports);
|
|
22
23
|
__exportStar(require("./NotFoundError.js"), exports);
|
|
23
24
|
__exportStar(require("./TooManyRequestsError.js"), exports);
|
|
@@ -56,6 +56,7 @@ export declare class StyleGuides {
|
|
|
56
56
|
*
|
|
57
57
|
* @throws {@link MarkupAI.UnauthorizedError}
|
|
58
58
|
* @throws {@link MarkupAI.ForbiddenError}
|
|
59
|
+
* @throws {@link MarkupAI.ConflictError}
|
|
59
60
|
* @throws {@link MarkupAI.ContentTooLargeError}
|
|
60
61
|
* @throws {@link MarkupAI.UnprocessableEntityError}
|
|
61
62
|
* @throws {@link MarkupAI.InternalServerError}
|
|
@@ -113,6 +114,7 @@ export declare class StyleGuides {
|
|
|
113
114
|
* @throws {@link MarkupAI.UnauthorizedError}
|
|
114
115
|
* @throws {@link MarkupAI.ForbiddenError}
|
|
115
116
|
* @throws {@link MarkupAI.NotFoundError}
|
|
117
|
+
* @throws {@link MarkupAI.ConflictError}
|
|
116
118
|
* @throws {@link MarkupAI.UnprocessableEntityError}
|
|
117
119
|
* @throws {@link MarkupAI.InternalServerError}
|
|
118
120
|
*
|
|
@@ -133,6 +133,7 @@ class StyleGuides {
|
|
|
133
133
|
*
|
|
134
134
|
* @throws {@link MarkupAI.UnauthorizedError}
|
|
135
135
|
* @throws {@link MarkupAI.ForbiddenError}
|
|
136
|
+
* @throws {@link MarkupAI.ConflictError}
|
|
136
137
|
* @throws {@link MarkupAI.ContentTooLargeError}
|
|
137
138
|
* @throws {@link MarkupAI.UnprocessableEntityError}
|
|
138
139
|
* @throws {@link MarkupAI.InternalServerError}
|
|
@@ -179,6 +180,8 @@ class StyleGuides {
|
|
|
179
180
|
throw new MarkupAI.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
180
181
|
case 403:
|
|
181
182
|
throw new MarkupAI.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
183
|
+
case 409:
|
|
184
|
+
throw new MarkupAI.ConflictError(_response.error.body, _response.rawResponse);
|
|
182
185
|
case 413:
|
|
183
186
|
throw new MarkupAI.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
184
187
|
case 422:
|
|
@@ -362,6 +365,7 @@ class StyleGuides {
|
|
|
362
365
|
* @throws {@link MarkupAI.UnauthorizedError}
|
|
363
366
|
* @throws {@link MarkupAI.ForbiddenError}
|
|
364
367
|
* @throws {@link MarkupAI.NotFoundError}
|
|
368
|
+
* @throws {@link MarkupAI.ConflictError}
|
|
365
369
|
* @throws {@link MarkupAI.UnprocessableEntityError}
|
|
366
370
|
* @throws {@link MarkupAI.InternalServerError}
|
|
367
371
|
*
|
|
@@ -400,6 +404,8 @@ class StyleGuides {
|
|
|
400
404
|
throw new MarkupAI.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
401
405
|
case 404:
|
|
402
406
|
throw new MarkupAI.NotFoundError(_response.error.body, _response.rawResponse);
|
|
407
|
+
case 409:
|
|
408
|
+
throw new MarkupAI.ConflictError(_response.error.body, _response.rawResponse);
|
|
403
409
|
case 422:
|
|
404
410
|
throw new MarkupAI.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
405
411
|
case 500:
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.2.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -12,8 +12,8 @@ export class MarkupAIClient {
|
|
|
12
12
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
13
13
|
"X-Fern-Language": "JavaScript",
|
|
14
14
|
"X-Fern-SDK-Name": "@markupai/api",
|
|
15
|
-
"X-Fern-SDK-Version": "1.
|
|
16
|
-
"User-Agent": "@markupai/api/1.
|
|
15
|
+
"X-Fern-SDK-Version": "1.2.0",
|
|
16
|
+
"User-Agent": "@markupai/api/1.2.0",
|
|
17
17
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
18
18
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
19
19
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as errors from "../../errors/index.mjs";
|
|
5
|
+
import * as MarkupAI from "../index.mjs";
|
|
6
|
+
import * as core from "../../core/index.mjs";
|
|
7
|
+
export declare class ConflictError extends errors.MarkupAIError {
|
|
8
|
+
constructor(body: MarkupAI.ErrorResponse, rawResponse?: core.RawResponse);
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as errors from "../../errors/index.mjs";
|
|
5
|
+
export class ConflictError extends errors.MarkupAIError {
|
|
6
|
+
constructor(body, rawResponse) {
|
|
7
|
+
super({
|
|
8
|
+
message: "ConflictError",
|
|
9
|
+
statusCode: 409,
|
|
10
|
+
body: body,
|
|
11
|
+
rawResponse: rawResponse,
|
|
12
|
+
});
|
|
13
|
+
Object.setPrototypeOf(this, ConflictError.prototype);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -2,6 +2,7 @@ export * from "./UnauthorizedError.mjs";
|
|
|
2
2
|
export * from "./ForbiddenError.mjs";
|
|
3
3
|
export * from "./UnprocessableEntityError.mjs";
|
|
4
4
|
export * from "./InternalServerError.mjs";
|
|
5
|
+
export * from "./ConflictError.mjs";
|
|
5
6
|
export * from "./ContentTooLargeError.mjs";
|
|
6
7
|
export * from "./NotFoundError.mjs";
|
|
7
8
|
export * from "./TooManyRequestsError.mjs";
|
|
@@ -2,6 +2,7 @@ export * from "./UnauthorizedError.mjs";
|
|
|
2
2
|
export * from "./ForbiddenError.mjs";
|
|
3
3
|
export * from "./UnprocessableEntityError.mjs";
|
|
4
4
|
export * from "./InternalServerError.mjs";
|
|
5
|
+
export * from "./ConflictError.mjs";
|
|
5
6
|
export * from "./ContentTooLargeError.mjs";
|
|
6
7
|
export * from "./NotFoundError.mjs";
|
|
7
8
|
export * from "./TooManyRequestsError.mjs";
|
|
@@ -56,6 +56,7 @@ export declare class StyleGuides {
|
|
|
56
56
|
*
|
|
57
57
|
* @throws {@link MarkupAI.UnauthorizedError}
|
|
58
58
|
* @throws {@link MarkupAI.ForbiddenError}
|
|
59
|
+
* @throws {@link MarkupAI.ConflictError}
|
|
59
60
|
* @throws {@link MarkupAI.ContentTooLargeError}
|
|
60
61
|
* @throws {@link MarkupAI.UnprocessableEntityError}
|
|
61
62
|
* @throws {@link MarkupAI.InternalServerError}
|
|
@@ -113,6 +114,7 @@ export declare class StyleGuides {
|
|
|
113
114
|
* @throws {@link MarkupAI.UnauthorizedError}
|
|
114
115
|
* @throws {@link MarkupAI.ForbiddenError}
|
|
115
116
|
* @throws {@link MarkupAI.NotFoundError}
|
|
117
|
+
* @throws {@link MarkupAI.ConflictError}
|
|
116
118
|
* @throws {@link MarkupAI.UnprocessableEntityError}
|
|
117
119
|
* @throws {@link MarkupAI.InternalServerError}
|
|
118
120
|
*
|
|
@@ -97,6 +97,7 @@ export class StyleGuides {
|
|
|
97
97
|
*
|
|
98
98
|
* @throws {@link MarkupAI.UnauthorizedError}
|
|
99
99
|
* @throws {@link MarkupAI.ForbiddenError}
|
|
100
|
+
* @throws {@link MarkupAI.ConflictError}
|
|
100
101
|
* @throws {@link MarkupAI.ContentTooLargeError}
|
|
101
102
|
* @throws {@link MarkupAI.UnprocessableEntityError}
|
|
102
103
|
* @throws {@link MarkupAI.InternalServerError}
|
|
@@ -143,6 +144,8 @@ export class StyleGuides {
|
|
|
143
144
|
throw new MarkupAI.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
144
145
|
case 403:
|
|
145
146
|
throw new MarkupAI.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
147
|
+
case 409:
|
|
148
|
+
throw new MarkupAI.ConflictError(_response.error.body, _response.rawResponse);
|
|
146
149
|
case 413:
|
|
147
150
|
throw new MarkupAI.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
148
151
|
case 422:
|
|
@@ -326,6 +329,7 @@ export class StyleGuides {
|
|
|
326
329
|
* @throws {@link MarkupAI.UnauthorizedError}
|
|
327
330
|
* @throws {@link MarkupAI.ForbiddenError}
|
|
328
331
|
* @throws {@link MarkupAI.NotFoundError}
|
|
332
|
+
* @throws {@link MarkupAI.ConflictError}
|
|
329
333
|
* @throws {@link MarkupAI.UnprocessableEntityError}
|
|
330
334
|
* @throws {@link MarkupAI.InternalServerError}
|
|
331
335
|
*
|
|
@@ -364,6 +368,8 @@ export class StyleGuides {
|
|
|
364
368
|
throw new MarkupAI.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
365
369
|
case 404:
|
|
366
370
|
throw new MarkupAI.NotFoundError(_response.error.body, _response.rawResponse);
|
|
371
|
+
case 409:
|
|
372
|
+
throw new MarkupAI.ConflictError(_response.error.body, _response.rawResponse);
|
|
367
373
|
case 422:
|
|
368
374
|
throw new MarkupAI.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
369
375
|
case 500:
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.2.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.2.0";
|