@algebrakit/sdk 1.0.0 → 1.1.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/dist/src/index.js DELETED
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./ApiClient"), exports);
18
- __exportStar(require("./types/ApiTypes"), exports);
@@ -1,23 +0,0 @@
1
- "use strict";
2
- /**
3
- * Types for the Algebrakit Webservice API.
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
17
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
- };
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- __exportStar(require("./request/RequestTypes"), exports);
21
- __exportStar(require("./response/ResponseTypes"), exports);
22
- __exportStar(require("./shared/SharedTypes"), exports);
23
- __exportStar(require("./exercise/AK_ExerciseTypes"), exports);
@@ -1,5 +0,0 @@
1
- "use strict";
2
- // AK_Exercise types for the Algebrakit Webservice API
3
- // These define the human-friendly exercise specification format accepted by
4
- // the session/create and exercise/validate endpoints.
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // Request types for the Algebrakit Webservice API
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // Shared types for the Algebrakit Webservice API
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handleApiError = handleApiError;
4
- /**
5
- * Handles errors from Axios requests and provides a standardized error message.
6
- * @param error The Axios error object.
7
- * @returns A standardized error message.
8
- */
9
- function handleApiError(error) {
10
- if (error.response) {
11
- // Server responded with a status code outside the 2xx range
12
- return `API Error: ${error.response.status} - ${error.response.data}`;
13
- }
14
- else if (error.request) {
15
- // Request was made but no response was received
16
- return 'API Error: No response received from the server.';
17
- }
18
- else {
19
- // Something happened in setting up the request
20
- return `API Error: ${error.message}`;
21
- }
22
- }