@markupai/api 0.0.6 → 0.1.1
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/api/errors/ContentTooLargeError.d.ts +2 -1
- package/api/errors/UnauthorizedError.d.ts +9 -0
- package/api/errors/UnauthorizedError.js +52 -0
- package/api/errors/index.d.ts +2 -1
- package/api/errors/index.js +2 -1
- package/api/resources/styleChecks/client/Client.d.ts +8 -5
- package/api/resources/styleChecks/client/Client.js +22 -9
- package/api/resources/styleChecks/client/requests/{StyleChecksCreateStyleCheckRequest.d.ts → CreateStyleCheckV1StyleChecksPostRequest.d.ts} +2 -3
- package/api/resources/styleChecks/client/requests/index.d.ts +1 -1
- package/api/resources/styleGuides/client/Client.d.ts +18 -3
- package/api/resources/styleGuides/client/Client.js +54 -15
- package/{dist/api/resources/styleGuides/client/requests/BodyStyleGuidesUpdateStyleGuide.d.ts → api/resources/styleGuides/client/requests/BodyUpdateStyleGuideV1StyleGuidesStyleGuideIdPatch.d.ts} +1 -1
- package/api/resources/styleGuides/client/requests/StyleGuideRequestBody.d.ts +5 -3
- package/api/resources/styleGuides/client/requests/index.d.ts +1 -1
- package/api/resources/styleRewrites/client/Client.d.ts +8 -5
- package/api/resources/styleRewrites/client/Client.js +22 -9
- package/{dist/api/resources/styleChecks/client/requests/StyleChecksCreateStyleCheckRequest.d.ts → api/resources/styleRewrites/client/requests/CreateStyleRewriteV1StyleRewritesPostRequest.d.ts} +2 -3
- package/api/resources/styleRewrites/client/requests/index.d.ts +1 -1
- package/api/resources/styleSuggestions/client/Client.d.ts +8 -5
- package/api/resources/styleSuggestions/client/Client.js +22 -9
- package/api/resources/{styleRewrites/client/requests/StyleRewritesCreateStyleRewriteRequest.d.ts → styleSuggestions/client/requests/CreateStyleSuggestionV1StyleSuggestionsPostRequest.d.ts} +2 -3
- package/api/resources/styleSuggestions/client/requests/index.d.ts +1 -1
- package/api/types/AnalysisScore.d.ts +8 -0
- package/api/types/ClarityCategory.d.ts +4 -0
- package/api/types/ClarityScore.d.ts +3 -5
- package/api/types/ErrorResponse.d.ts +1 -1
- package/api/types/IssueCategory.d.ts +2 -4
- package/api/types/IssueCategory.js +1 -3
- package/api/types/QualityScore.d.ts +4 -0
- package/api/types/RewriteResponse.d.ts +1 -1
- package/api/types/ScoreOutput.d.ts +1 -5
- package/api/types/StyleCheckResponse.d.ts +1 -1
- package/api/types/Subcategory.d.ts +1 -1
- package/api/types/SuggestionResponse.d.ts +1 -1
- package/api/types/ToneScore.d.ts +2 -4
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/dist/api/errors/ContentTooLargeError.d.ts +2 -1
- package/dist/api/errors/UnauthorizedError.d.ts +9 -0
- package/dist/api/errors/UnauthorizedError.js +52 -0
- package/dist/api/errors/index.d.ts +2 -1
- package/dist/api/errors/index.js +2 -1
- package/dist/api/resources/styleChecks/client/Client.d.ts +8 -5
- package/dist/api/resources/styleChecks/client/Client.js +22 -9
- package/dist/api/resources/{styleRewrites/client/requests/StyleRewritesCreateStyleRewriteRequest.d.ts → styleChecks/client/requests/CreateStyleCheckV1StyleChecksPostRequest.d.ts} +2 -3
- package/dist/api/resources/styleChecks/client/requests/index.d.ts +1 -1
- package/dist/api/resources/styleGuides/client/Client.d.ts +18 -3
- package/dist/api/resources/styleGuides/client/Client.js +54 -15
- package/{api/resources/styleGuides/client/requests/BodyStyleGuidesUpdateStyleGuide.d.ts → dist/api/resources/styleGuides/client/requests/BodyUpdateStyleGuideV1StyleGuidesStyleGuideIdPatch.d.ts} +1 -1
- package/dist/api/resources/styleGuides/client/requests/StyleGuideRequestBody.d.ts +5 -3
- package/dist/api/resources/styleGuides/client/requests/index.d.ts +1 -1
- package/dist/api/resources/styleRewrites/client/Client.d.ts +8 -5
- package/dist/api/resources/styleRewrites/client/Client.js +22 -9
- package/dist/api/resources/styleRewrites/client/requests/CreateStyleRewriteV1StyleRewritesPostRequest.d.ts +21 -0
- package/dist/api/resources/styleRewrites/client/requests/CreateStyleRewriteV1StyleRewritesPostRequest.js +5 -0
- package/dist/api/resources/styleRewrites/client/requests/index.d.ts +1 -1
- package/dist/api/resources/styleSuggestions/client/Client.d.ts +8 -5
- package/dist/api/resources/styleSuggestions/client/Client.js +22 -9
- package/dist/api/resources/styleSuggestions/client/requests/CreateStyleSuggestionV1StyleSuggestionsPostRequest.d.ts +21 -0
- package/dist/api/resources/styleSuggestions/client/requests/CreateStyleSuggestionV1StyleSuggestionsPostRequest.js +5 -0
- package/dist/api/resources/styleSuggestions/client/requests/index.d.ts +1 -1
- package/dist/api/types/AnalysisScore.d.ts +8 -0
- package/dist/api/types/AnalysisScore.js +5 -0
- package/dist/api/types/ClarityCategory.d.ts +4 -0
- package/dist/api/types/ClarityCategory.js +5 -0
- package/dist/api/types/ClarityScore.d.ts +3 -5
- package/dist/api/types/ErrorResponse.d.ts +1 -1
- package/dist/api/types/IssueCategory.d.ts +2 -4
- package/dist/api/types/IssueCategory.js +1 -3
- package/dist/api/types/QualityScore.d.ts +4 -0
- package/dist/api/types/RewriteResponse.d.ts +1 -1
- package/dist/api/types/ScoreOutput.d.ts +1 -5
- package/dist/api/types/StyleCheckResponse.d.ts +1 -1
- package/dist/api/types/Subcategory.d.ts +1 -1
- package/dist/api/types/SuggestionResponse.d.ts +1 -1
- package/dist/api/types/ToneScore.d.ts +2 -4
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/dist/environments.d.ts +2 -2
- package/dist/environments.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/environments.d.ts +2 -2
- package/environments.js +1 -1
- package/package.json +1 -1
- package/reference.md +13 -14
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/styleSuggestions/client/requests/StyleSuggestionsCreateStyleSuggestionRequest.d.ts +0 -22
- package/dist/api/resources/styleSuggestions/client/requests/StyleSuggestionsCreateStyleSuggestionRequest.d.ts +0 -22
- /package/api/resources/styleChecks/client/requests/{StyleChecksCreateStyleCheckRequest.js → CreateStyleCheckV1StyleChecksPostRequest.js} +0 -0
- /package/api/resources/styleGuides/client/requests/{BodyStyleGuidesUpdateStyleGuide.js → BodyUpdateStyleGuideV1StyleGuidesStyleGuideIdPatch.js} +0 -0
- /package/api/resources/styleRewrites/client/requests/{StyleRewritesCreateStyleRewriteRequest.js → CreateStyleRewriteV1StyleRewritesPostRequest.js} +0 -0
- /package/api/resources/styleSuggestions/client/requests/{StyleSuggestionsCreateStyleSuggestionRequest.js → CreateStyleSuggestionV1StyleSuggestionsPostRequest.js} +0 -0
- /package/{dist/api/resources/styleChecks/client/requests/StyleChecksCreateStyleCheckRequest.js → api/types/AnalysisScore.js} +0 -0
- /package/{dist/api/resources/styleGuides/client/requests/BodyStyleGuidesUpdateStyleGuide.js → api/types/ClarityCategory.js} +0 -0
- /package/dist/api/resources/{styleRewrites/client/requests/StyleRewritesCreateStyleRewriteRequest.js → styleChecks/client/requests/CreateStyleCheckV1StyleChecksPostRequest.js} +0 -0
- /package/dist/api/resources/{styleSuggestions/client/requests/StyleSuggestionsCreateStyleSuggestionRequest.js → styleGuides/client/requests/BodyUpdateStyleGuideV1StyleGuidesStyleGuideIdPatch.js} +0 -0
|
@@ -62,12 +62,14 @@ class StyleSuggestions {
|
|
|
62
62
|
this._options = _options;
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* Get suggested corrections for text.
|
|
66
66
|
*
|
|
67
67
|
* @param {File | fs.ReadStream | Blob} file_upload
|
|
68
|
-
* @param {MarkupAI.
|
|
68
|
+
* @param {MarkupAI.CreateStyleSuggestionV1StyleSuggestionsPostRequest} request
|
|
69
69
|
* @param {StyleSuggestions.RequestOptions} requestOptions - Request-specific configuration.
|
|
70
70
|
*
|
|
71
|
+
* @throws {@link MarkupAI.UnauthorizedError}
|
|
72
|
+
* @throws {@link MarkupAI.ForbiddenError}
|
|
71
73
|
* @throws {@link MarkupAI.ContentTooLargeError}
|
|
72
74
|
* @throws {@link MarkupAI.UnprocessableEntityError}
|
|
73
75
|
* @throws {@link MarkupAI.InternalServerError}
|
|
@@ -75,7 +77,6 @@ class StyleSuggestions {
|
|
|
75
77
|
* @example
|
|
76
78
|
* await client.styleSuggestions.createStyleSuggestion(fs.createReadStream("/path/to/your/file"), {
|
|
77
79
|
* dialect: "american_english",
|
|
78
|
-
* tone: "academic",
|
|
79
80
|
* style_guide: "style_guide"
|
|
80
81
|
* })
|
|
81
82
|
*/
|
|
@@ -88,16 +89,18 @@ class StyleSuggestions {
|
|
|
88
89
|
const _request = yield core.newFormData();
|
|
89
90
|
yield _request.appendFile("file_upload", file_upload);
|
|
90
91
|
_request.append("dialect", request.dialect);
|
|
91
|
-
|
|
92
|
+
if (request.tone != null) {
|
|
93
|
+
_request.append("tone", request.tone);
|
|
94
|
+
}
|
|
92
95
|
_request.append("style_guide", request.style_guide);
|
|
93
96
|
if (request.webhook_url != null) {
|
|
94
97
|
_request.append("webhook_url", request.webhook_url);
|
|
95
98
|
}
|
|
96
99
|
const _maybeEncodedRequest = yield _request.getRequest();
|
|
97
100
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
98
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MarkupAIEnvironment.
|
|
101
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MarkupAIEnvironment.Default, "v1/style/suggestions"),
|
|
99
102
|
method: "POST",
|
|
100
|
-
headers: Object.assign(Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@markupai/api", "X-Fern-SDK-Version": "0.
|
|
103
|
+
headers: Object.assign(Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@markupai/api", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@markupai/api/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
101
104
|
requestType: "file",
|
|
102
105
|
duplex: _maybeEncodedRequest.duplex,
|
|
103
106
|
body: _maybeEncodedRequest.body,
|
|
@@ -110,6 +113,10 @@ class StyleSuggestions {
|
|
|
110
113
|
}
|
|
111
114
|
if (_response.error.reason === "status-code") {
|
|
112
115
|
switch (_response.error.statusCode) {
|
|
116
|
+
case 401:
|
|
117
|
+
throw new MarkupAI.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
118
|
+
case 403:
|
|
119
|
+
throw new MarkupAI.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
113
120
|
case 413:
|
|
114
121
|
throw new MarkupAI.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
115
122
|
case 422:
|
|
@@ -142,11 +149,13 @@ class StyleSuggestions {
|
|
|
142
149
|
});
|
|
143
150
|
}
|
|
144
151
|
/**
|
|
145
|
-
* Retrieve
|
|
152
|
+
* Retrieve suggestion results.
|
|
146
153
|
*
|
|
147
154
|
* @param {string} workflowId
|
|
148
155
|
* @param {StyleSuggestions.RequestOptions} requestOptions - Request-specific configuration.
|
|
149
156
|
*
|
|
157
|
+
* @throws {@link MarkupAI.UnauthorizedError}
|
|
158
|
+
* @throws {@link MarkupAI.ForbiddenError}
|
|
150
159
|
* @throws {@link MarkupAI.NotFoundError}
|
|
151
160
|
* @throws {@link MarkupAI.UnprocessableEntityError}
|
|
152
161
|
* @throws {@link MarkupAI.InternalServerError}
|
|
@@ -161,9 +170,9 @@ class StyleSuggestions {
|
|
|
161
170
|
return __awaiter(this, void 0, void 0, function* () {
|
|
162
171
|
var _a, _b, _c;
|
|
163
172
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
164
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MarkupAIEnvironment.
|
|
173
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MarkupAIEnvironment.Default, `v1/style/suggestions/${encodeURIComponent(workflowId)}`),
|
|
165
174
|
method: "GET",
|
|
166
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@markupai/api", "X-Fern-SDK-Version": "0.
|
|
175
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@markupai/api", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@markupai/api/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
167
176
|
contentType: "application/json",
|
|
168
177
|
requestType: "json",
|
|
169
178
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -175,6 +184,10 @@ class StyleSuggestions {
|
|
|
175
184
|
}
|
|
176
185
|
if (_response.error.reason === "status-code") {
|
|
177
186
|
switch (_response.error.statusCode) {
|
|
187
|
+
case 401:
|
|
188
|
+
throw new MarkupAI.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
189
|
+
case 403:
|
|
190
|
+
throw new MarkupAI.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
178
191
|
case 404:
|
|
179
192
|
throw new MarkupAI.NotFoundError(_response.error.body, _response.rawResponse);
|
|
180
193
|
case 422:
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MarkupAI from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* dialect: "american_english",
|
|
9
|
+
* style_guide: "style_guide"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface CreateStyleSuggestionV1StyleSuggestionsPostRequest {
|
|
13
|
+
/** The language variant you'd like us to use for analysis. Choose from American English, British English, or other supported dialects. */
|
|
14
|
+
dialect: MarkupAI.Dialects;
|
|
15
|
+
/** The tone variation you're aiming for. Options include formal, academic, casual, and other tone variations to match your content goals. */
|
|
16
|
+
tone?: MarkupAI.Tones;
|
|
17
|
+
/** The style guide to follow for your content. You can use a style guide ID or choose from built-in options: `ap`, `chicago`, or `microsoft`. */
|
|
18
|
+
style_guide: string;
|
|
19
|
+
/** A URL that results will be POSTed to once the process completes. */
|
|
20
|
+
webhook_url?: string;
|
|
21
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { type
|
|
1
|
+
export { type CreateStyleSuggestionV1StyleSuggestionsPostRequest } from "./CreateStyleSuggestionV1StyleSuggestionsPostRequest";
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface ClarityScore {
|
|
5
|
-
average_sentence_length?: number;
|
|
6
|
-
flesch_kincaid_grade?: number;
|
|
7
|
-
flesch_reading_ease?: number;
|
|
8
|
-
lexical_diversity?: number;
|
|
9
5
|
score?: number;
|
|
6
|
+
flesch_reading_ease?: number;
|
|
10
7
|
sentence_complexity?: number;
|
|
11
|
-
sentence_count?: number;
|
|
12
8
|
vocabulary_complexity?: number;
|
|
9
|
+
sentence_count?: number;
|
|
13
10
|
word_count?: number;
|
|
11
|
+
average_sentence_length?: number;
|
|
14
12
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export interface ErrorResponse {
|
|
5
5
|
/** A description of the error that occurred. */
|
|
6
6
|
detail: string;
|
|
7
|
-
/**
|
|
7
|
+
/** The HTTP status code generated by the server for this issue */
|
|
8
8
|
status: number;
|
|
9
9
|
/** A unique ID associated with the HTTP request. */
|
|
10
10
|
request_id: string;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type IssueCategory = "
|
|
4
|
+
export type IssueCategory = "clarity" | "grammar" | "style_guide" | "terminology" | "tone";
|
|
5
5
|
export declare const IssueCategory: {
|
|
6
|
+
readonly Clarity: "clarity";
|
|
6
7
|
readonly Grammar: "grammar";
|
|
7
|
-
readonly SentenceLength: "sentence_length";
|
|
8
|
-
readonly SentenceStructure: "sentence_structure";
|
|
9
|
-
readonly SimpleVocab: "simple_vocab";
|
|
10
8
|
readonly StyleGuide: "style_guide";
|
|
11
9
|
readonly Terminology: "terminology";
|
|
12
10
|
readonly Tone: "tone";
|
|
@@ -5,10 +5,8 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.IssueCategory = void 0;
|
|
7
7
|
exports.IssueCategory = {
|
|
8
|
+
Clarity: "clarity",
|
|
8
9
|
Grammar: "grammar",
|
|
9
|
-
SentenceLength: "sentence_length",
|
|
10
|
-
SentenceStructure: "sentence_structure",
|
|
11
|
-
SimpleVocab: "simple_vocab",
|
|
12
10
|
StyleGuide: "style_guide",
|
|
13
11
|
Terminology: "terminology",
|
|
14
12
|
Tone: "tone",
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as MarkupAI from "../index";
|
|
4
5
|
export interface QualityScore {
|
|
5
6
|
score?: number;
|
|
7
|
+
grammar?: MarkupAI.GrammarScore;
|
|
8
|
+
style_guide?: MarkupAI.StyleGuideScore;
|
|
9
|
+
terminology?: MarkupAI.TerminologyScore;
|
|
6
10
|
}
|
|
@@ -4,9 +4,5 @@
|
|
|
4
4
|
import * as MarkupAI from "../index";
|
|
5
5
|
export interface ScoreOutput {
|
|
6
6
|
quality?: MarkupAI.QualityScore;
|
|
7
|
-
|
|
8
|
-
grammar?: MarkupAI.GrammarScore;
|
|
9
|
-
style_guide?: MarkupAI.StyleGuideScore;
|
|
10
|
-
tone?: MarkupAI.ToneScore;
|
|
11
|
-
terminology?: MarkupAI.TerminologyScore;
|
|
7
|
+
analysis?: MarkupAI.AnalysisScore;
|
|
12
8
|
}
|
|
@@ -5,4 +5,4 @@ import * as MarkupAI from "../index";
|
|
|
5
5
|
/**
|
|
6
6
|
* The sub-category of the change
|
|
7
7
|
*/
|
|
8
|
-
export type Subcategory = MarkupAI.GrammarCategory | MarkupAI.SimpleVocabCategory | MarkupAI.SentenceStructureCategory | MarkupAI.SentenceLengthCategory | MarkupAI.ToneCategory | MarkupAI.StyleGuideCategory | MarkupAI.TermReplaceCategory;
|
|
8
|
+
export type Subcategory = MarkupAI.GrammarCategory | MarkupAI.SimpleVocabCategory | MarkupAI.SentenceStructureCategory | MarkupAI.SentenceLengthCategory | MarkupAI.ToneCategory | MarkupAI.StyleGuideCategory | MarkupAI.TermReplaceCategory | MarkupAI.ClarityCategory;
|
|
@@ -5,8 +5,6 @@ export interface ToneScore {
|
|
|
5
5
|
score?: number;
|
|
6
6
|
informality?: number;
|
|
7
7
|
liveliness?: number;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
informality_tolerance?: number;
|
|
11
|
-
liveliness_tolerance?: number;
|
|
8
|
+
informality_alignment?: number;
|
|
9
|
+
liveliness_alignment?: number;
|
|
12
10
|
}
|
package/dist/api/types/index.js
CHANGED
|
@@ -14,7 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./AnalysisScore"), exports);
|
|
17
18
|
__exportStar(require("./CheckOptions"), exports);
|
|
19
|
+
__exportStar(require("./ClarityCategory"), exports);
|
|
18
20
|
__exportStar(require("./ClarityScore"), exports);
|
|
19
21
|
__exportStar(require("./Dialects"), exports);
|
|
20
22
|
__exportStar(require("./ErrorResponse"), exports);
|
package/dist/environments.d.ts
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export declare const MarkupAIEnvironment: {
|
|
5
|
-
readonly
|
|
5
|
+
readonly Default: "https://api.markup.ai";
|
|
6
6
|
};
|
|
7
|
-
export type MarkupAIEnvironment = typeof MarkupAIEnvironment.
|
|
7
|
+
export type MarkupAIEnvironment = typeof MarkupAIEnvironment.Default;
|
package/dist/environments.js
CHANGED
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.1";
|
package/dist/version.js
CHANGED
package/environments.d.ts
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export declare const MarkupAIEnvironment: {
|
|
5
|
-
readonly
|
|
5
|
+
readonly Default: "https://api.markup.ai";
|
|
6
6
|
};
|
|
7
|
-
export type MarkupAIEnvironment = typeof MarkupAIEnvironment.
|
|
7
|
+
export type MarkupAIEnvironment = typeof MarkupAIEnvironment.Default;
|
package/environments.js
CHANGED
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -85,7 +85,9 @@ Create a new style guide that can be used in checks, suggestions, and rewrites.
|
|
|
85
85
|
<dd>
|
|
86
86
|
|
|
87
87
|
```typescript
|
|
88
|
-
await client.styleGuides.createStyleGuide(fs.createReadStream("/path/to/your/file"), {
|
|
88
|
+
await client.styleGuides.createStyleGuide(fs.createReadStream("/path/to/your/file"), {
|
|
89
|
+
name: "name",
|
|
90
|
+
});
|
|
89
91
|
```
|
|
90
92
|
|
|
91
93
|
</dd>
|
|
@@ -308,7 +310,7 @@ await client.styleGuides.updateStyleGuide("style_guide_id", {
|
|
|
308
310
|
<dl>
|
|
309
311
|
<dd>
|
|
310
312
|
|
|
311
|
-
**request:** `MarkupAI.
|
|
313
|
+
**request:** `MarkupAI.BodyUpdateStyleGuideV1StyleGuidesStyleGuideIdPatch`
|
|
312
314
|
|
|
313
315
|
</dd>
|
|
314
316
|
</dl>
|
|
@@ -341,7 +343,7 @@ await client.styleGuides.updateStyleGuide("style_guide_id", {
|
|
|
341
343
|
<dl>
|
|
342
344
|
<dd>
|
|
343
345
|
|
|
344
|
-
|
|
346
|
+
Analyze text for grammar, style, and clarity issues.
|
|
345
347
|
|
|
346
348
|
</dd>
|
|
347
349
|
</dl>
|
|
@@ -359,7 +361,6 @@ Start a style and brand check workflow. Returns a workflow ID to use for polling
|
|
|
359
361
|
```typescript
|
|
360
362
|
await client.styleChecks.createStyleCheck(fs.createReadStream("/path/to/your/file"), {
|
|
361
363
|
dialect: "american_english",
|
|
362
|
-
tone: "academic",
|
|
363
364
|
style_guide: "style_guide",
|
|
364
365
|
});
|
|
365
366
|
```
|
|
@@ -385,7 +386,7 @@ await client.styleChecks.createStyleCheck(fs.createReadStream("/path/to/your/fil
|
|
|
385
386
|
<dl>
|
|
386
387
|
<dd>
|
|
387
388
|
|
|
388
|
-
**request:** `MarkupAI.
|
|
389
|
+
**request:** `MarkupAI.CreateStyleCheckV1StyleChecksPostRequest`
|
|
389
390
|
|
|
390
391
|
</dd>
|
|
391
392
|
</dl>
|
|
@@ -416,7 +417,7 @@ await client.styleChecks.createStyleCheck(fs.createReadStream("/path/to/your/fil
|
|
|
416
417
|
<dl>
|
|
417
418
|
<dd>
|
|
418
419
|
|
|
419
|
-
Retrieve
|
|
420
|
+
Retrieve style check results.
|
|
420
421
|
|
|
421
422
|
</dd>
|
|
422
423
|
</dl>
|
|
@@ -481,7 +482,7 @@ await client.styleChecks.getStyleCheck("workflow_id");
|
|
|
481
482
|
<dl>
|
|
482
483
|
<dd>
|
|
483
484
|
|
|
484
|
-
|
|
485
|
+
Get suggested corrections for text.
|
|
485
486
|
|
|
486
487
|
</dd>
|
|
487
488
|
</dl>
|
|
@@ -499,7 +500,6 @@ Start a style and brand suggestion workflow. Returns a workflow ID to use for po
|
|
|
499
500
|
```typescript
|
|
500
501
|
await client.styleSuggestions.createStyleSuggestion(fs.createReadStream("/path/to/your/file"), {
|
|
501
502
|
dialect: "american_english",
|
|
502
|
-
tone: "academic",
|
|
503
503
|
style_guide: "style_guide",
|
|
504
504
|
});
|
|
505
505
|
```
|
|
@@ -525,7 +525,7 @@ await client.styleSuggestions.createStyleSuggestion(fs.createReadStream("/path/t
|
|
|
525
525
|
<dl>
|
|
526
526
|
<dd>
|
|
527
527
|
|
|
528
|
-
**request:** `MarkupAI.
|
|
528
|
+
**request:** `MarkupAI.CreateStyleSuggestionV1StyleSuggestionsPostRequest`
|
|
529
529
|
|
|
530
530
|
</dd>
|
|
531
531
|
</dl>
|
|
@@ -556,7 +556,7 @@ await client.styleSuggestions.createStyleSuggestion(fs.createReadStream("/path/t
|
|
|
556
556
|
<dl>
|
|
557
557
|
<dd>
|
|
558
558
|
|
|
559
|
-
Retrieve
|
|
559
|
+
Retrieve suggestion results.
|
|
560
560
|
|
|
561
561
|
</dd>
|
|
562
562
|
</dl>
|
|
@@ -621,7 +621,7 @@ await client.styleSuggestions.getStyleSuggestion("workflow_id");
|
|
|
621
621
|
<dl>
|
|
622
622
|
<dd>
|
|
623
623
|
|
|
624
|
-
|
|
624
|
+
Rewrite text with style corrections applied.
|
|
625
625
|
|
|
626
626
|
</dd>
|
|
627
627
|
</dl>
|
|
@@ -639,7 +639,6 @@ Start a style and brand rewrite workflow. Returns a workflow ID to use for polli
|
|
|
639
639
|
```typescript
|
|
640
640
|
await client.styleRewrites.createStyleRewrite(fs.createReadStream("/path/to/your/file"), {
|
|
641
641
|
dialect: "american_english",
|
|
642
|
-
tone: "academic",
|
|
643
642
|
style_guide: "style_guide",
|
|
644
643
|
});
|
|
645
644
|
```
|
|
@@ -665,7 +664,7 @@ await client.styleRewrites.createStyleRewrite(fs.createReadStream("/path/to/your
|
|
|
665
664
|
<dl>
|
|
666
665
|
<dd>
|
|
667
666
|
|
|
668
|
-
**request:** `MarkupAI.
|
|
667
|
+
**request:** `MarkupAI.CreateStyleRewriteV1StyleRewritesPostRequest`
|
|
669
668
|
|
|
670
669
|
</dd>
|
|
671
670
|
</dl>
|
|
@@ -696,7 +695,7 @@ await client.styleRewrites.createStyleRewrite(fs.createReadStream("/path/to/your
|
|
|
696
695
|
<dl>
|
|
697
696
|
<dd>
|
|
698
697
|
|
|
699
|
-
Retrieve
|
|
698
|
+
Retrieve rewrite results.
|
|
700
699
|
|
|
701
700
|
</dd>
|
|
702
701
|
</dl>
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.1";
|
package/version.js
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as MarkupAI from "../../../../index";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* dialect: "american_english",
|
|
9
|
-
* tone: "academic",
|
|
10
|
-
* style_guide: "style_guide"
|
|
11
|
-
* }
|
|
12
|
-
*/
|
|
13
|
-
export interface StyleSuggestionsCreateStyleSuggestionRequest {
|
|
14
|
-
/** The language variant you'd like us to use for analysis. Choose from American English, British English, or other supported dialects. */
|
|
15
|
-
dialect: MarkupAI.Dialects;
|
|
16
|
-
/** The tone variation you're aiming for. Options include formal, academic, casual, and other tone variations to match your content goals. */
|
|
17
|
-
tone: MarkupAI.Tones;
|
|
18
|
-
/** The style guide to follow for your content. You can use a style guide ID or choose from built-in options: `ap`, `chicago`, or `microsoft`. */
|
|
19
|
-
style_guide: string;
|
|
20
|
-
/** A URL that results will be POSTed to once the process completes. */
|
|
21
|
-
webhook_url?: string;
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as MarkupAI from "../../../../index";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* dialect: "american_english",
|
|
9
|
-
* tone: "academic",
|
|
10
|
-
* style_guide: "style_guide"
|
|
11
|
-
* }
|
|
12
|
-
*/
|
|
13
|
-
export interface StyleSuggestionsCreateStyleSuggestionRequest {
|
|
14
|
-
/** The language variant you'd like us to use for analysis. Choose from American English, British English, or other supported dialects. */
|
|
15
|
-
dialect: MarkupAI.Dialects;
|
|
16
|
-
/** The tone variation you're aiming for. Options include formal, academic, casual, and other tone variations to match your content goals. */
|
|
17
|
-
tone: MarkupAI.Tones;
|
|
18
|
-
/** The style guide to follow for your content. You can use a style guide ID or choose from built-in options: `ap`, `chicago`, or `microsoft`. */
|
|
19
|
-
style_guide: string;
|
|
20
|
-
/** A URL that results will be POSTed to once the process completes. */
|
|
21
|
-
webhook_url?: string;
|
|
22
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|