You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -200,7 +201,7 @@ Get all other pages of paginated results and return the complete data
200
201
Check compatibility with the API
201
202
202
203
203
-
- Returns: <code>[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<"compatible" | "outdated" | "incompatible"></code>`compatible` - versions are fully compatible (only patch version may differ), `outdated` - compatible, but new features unavailable (minor version differs), `incompatible` - breaking changes (major version differs)
-`statusText` <code>[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)</code> The status message corresponding to the status code. (e.g., `OK` for `200`). (read-only)
686
687
-`url` <code>[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)</code> The URL of the response. (read-only)
687
688
689
+
<aname="enum-cloudnodecompatibilitystatus"></a>
690
+
691
+
### Enum: `Cloudnode.CompatibilityStatus`
692
+
693
+
API client compatibility status
694
+
695
+
-`COMPATIBLE` <code>"compatible"</code> Fully compatible (API patch version may differ)
696
+
-`OUTDATED` <code>"outdated"</code> Compatible, but outdated (i.e. existing APIs will work, but you are missing out on new features).
697
+
-`INCOMPATIBLE` <code>"incompatible"</code> API has implemented breaking changes which are not compatible with this client.
Copy file name to clipboardExpand all lines: browser/Cloudnode.js
+21-4Lines changed: 21 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -150,14 +150,13 @@ class Cloudnode {
150
150
constverA=[partsA[0]||"0",partsA[1]||"0"];
151
151
constverB=[partsB[0]||"0",partsB[1]||"0"];
152
152
if(verA[0]!==verB[0])
153
-
return"incompatible";
153
+
returnCloudnode.CompatibilityStatus.INCOMPATIBLE;
154
154
if(verA[1]!==verB[1])
155
-
return"outdated";
156
-
return"compatible";
155
+
returnCloudnode.CompatibilityStatus.OUTDATED;
156
+
returnCloudnode.CompatibilityStatus.COMPATIBLE;
157
157
}
158
158
/**
159
159
* Check compatibility with the API
160
-
* @returns `compatible` - versions are fully compatible (only patch version may differ), `outdated` - compatible, but new features unavailable (minor version differs), `incompatible` - breaking changes (major version differs)
Copy file name to clipboardExpand all lines: gen/docs.ts
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,12 @@ export const globalTypes = {
34
34
newDocSchema.Property("maxRetryDelay","number","The maximum number of seconds that is acceptable to wait before retrying a failed request.\nThis requires `autoRetry` to be enabled."),
35
35
newDocSchema.Property("maxRetries","number","The maximum number of times to retry a failed request.\nThis requires `autoRetry` to be enabled.")
description: "`compatible` - versions are fully compatible (only patch version may differ), `outdated` - compatible, but new features unavailable (minor version differs), `incompatible` - breaking changes (major version differs)"
if (verA[0] !== verB[0]) return Cloudnode.CompatibilityStatus.INCOMPATIBLE;
164
+
if (verA[1] !== verB[1]) return Cloudnode.CompatibilityStatus.OUTDATED;
165
+
return Cloudnode.CompatibilityStatus.COMPATIBLE;
166
166
}
167
167
168
168
/**
169
169
* Check compatibility with the API
170
-
* @returns `compatible` - versions are fully compatible (only patch version may differ), `outdated` - compatible, but new features unavailable (minor version differs), `incompatible` - breaking changes (major version differs)
171
170
*/
172
171
public async checkCompatibility() {
173
172
const data: any = await (await fetch(new URL("../", this.#options.baseUrl).toString(), {
@@ -431,6 +430,26 @@ namespace {{config.name}} {
431
430
*/
432
431
maxRetries: number;
433
432
}
433
+
434
+
/**
435
+
* API client compatibility status
436
+
*/
437
+
export enum CompatibilityStatus {
438
+
/**
439
+
* Fully compatible (API patch version may differ)
440
+
*/
441
+
COMPATIBLE = "compatible",
442
+
443
+
/**
444
+
* Compatible, but outdated (i.e. existing APIs will work, but you are missing out on new features).
445
+
*/
446
+
OUTDATED = "outdated",
447
+
448
+
/**
449
+
* API has implemented breaking changes which are not compatible with this client.
* @returns `compatible` - versions are fully compatible (only patch version may differ), `outdated` - compatible, but new features unavailable (minor version differs), `incompatible` - breaking changes (major version differs)
Copy file name to clipboardExpand all lines: src/Cloudnode.js
+21-4Lines changed: 21 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -150,14 +150,13 @@ class Cloudnode {
150
150
constverA=[partsA[0]||"0",partsA[1]||"0"];
151
151
constverB=[partsB[0]||"0",partsB[1]||"0"];
152
152
if(verA[0]!==verB[0])
153
-
return"incompatible";
153
+
returnCloudnode.CompatibilityStatus.INCOMPATIBLE;
154
154
if(verA[1]!==verB[1])
155
-
return"outdated";
156
-
return"compatible";
155
+
returnCloudnode.CompatibilityStatus.OUTDATED;
156
+
returnCloudnode.CompatibilityStatus.COMPATIBLE;
157
157
}
158
158
/**
159
159
* Check compatibility with the API
160
-
* @returns `compatible` - versions are fully compatible (only patch version may differ), `outdated` - compatible, but new features unavailable (minor version differs), `incompatible` - breaking changes (major version differs)
* @returns `compatible` - versions are fully compatible (only patch version may differ), `outdated` - compatible, but new features unavailable (minor version differs), `incompatible` - breaking changes (major version differs)
0 commit comments