@slates/provider 1.0.0-rc.26 → 1.0.0-rc.27
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/index.cjs +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.module.js +1 -1
- package/package.json +1 -1
- package/src/auth/types.ts +4 -0
- package/src/error/base.ts +1 -1
- package/src/error/declaration.ts +1 -1
- package/src/error/utils.ts +6 -2
package/dist/index.cjs
CHANGED
|
@@ -406,7 +406,7 @@ var normalizeRetryable = (code, retryable) => {
|
|
|
406
406
|
};
|
|
407
407
|
var getDefaultMessage = (code, message) => {
|
|
408
408
|
if (message?.trim()) return message;
|
|
409
|
-
return DEFAULT_MESSAGES[code] ?? DEFAULT_MESSAGES[DEFAULT_CODE];
|
|
409
|
+
return DEFAULT_MESSAGES[code] ?? DEFAULT_MESSAGES[DEFAULT_CODE] ?? "An unexpected internal error occurred.";
|
|
410
410
|
};
|
|
411
411
|
var cleanRecord = (value) => {
|
|
412
412
|
if (!value) return void 0;
|
package/dist/index.d.cts
CHANGED
|
@@ -150,6 +150,7 @@ type SlateAuthWithOauth<InputType extends {}, OutputType extends {
|
|
|
150
150
|
scope: string;
|
|
151
151
|
}[];
|
|
152
152
|
adapters?: string[];
|
|
153
|
+
syncTokensAcrossConnections?: boolean;
|
|
153
154
|
docs?: SlateAuthDocsReference[];
|
|
154
155
|
inputSchema?: z.ZodType<InputType>;
|
|
155
156
|
onInputChanged?: (params: {
|
package/dist/index.d.ts
CHANGED
|
@@ -150,6 +150,7 @@ type SlateAuthWithOauth<InputType extends {}, OutputType extends {
|
|
|
150
150
|
scope: string;
|
|
151
151
|
}[];
|
|
152
152
|
adapters?: string[];
|
|
153
|
+
syncTokensAcrossConnections?: boolean;
|
|
153
154
|
docs?: SlateAuthDocsReference[];
|
|
154
155
|
inputSchema?: z.ZodType<InputType>;
|
|
155
156
|
onInputChanged?: (params: {
|
package/dist/index.module.js
CHANGED
|
@@ -293,7 +293,7 @@ var normalizeRetryable = (code, retryable) => {
|
|
|
293
293
|
};
|
|
294
294
|
var getDefaultMessage = (code, message) => {
|
|
295
295
|
if (message?.trim()) return message;
|
|
296
|
-
return DEFAULT_MESSAGES[code] ?? DEFAULT_MESSAGES[DEFAULT_CODE];
|
|
296
|
+
return DEFAULT_MESSAGES[code] ?? DEFAULT_MESSAGES[DEFAULT_CODE] ?? "An unexpected internal error occurred.";
|
|
297
297
|
};
|
|
298
298
|
var cleanRecord = (value) => {
|
|
299
299
|
if (!value) return void 0;
|
package/package.json
CHANGED
package/src/auth/types.ts
CHANGED
|
@@ -24,6 +24,10 @@ export type SlateAuthWithOauth<
|
|
|
24
24
|
|
|
25
25
|
adapters?: string[];
|
|
26
26
|
|
|
27
|
+
// Set when the provider issues the same rotating token pair to every
|
|
28
|
+
// connection of one installation, so a refresh must update all of them.
|
|
29
|
+
syncTokensAcrossConnections?: boolean;
|
|
30
|
+
|
|
27
31
|
docs?: SlateAuthDocsReference[];
|
|
28
32
|
|
|
29
33
|
inputSchema?: z.ZodType<InputType>;
|
package/src/error/base.ts
CHANGED
package/src/error/declaration.ts
CHANGED
|
@@ -11,7 +11,7 @@ export class SlateDeclarationError extends SlateError {
|
|
|
11
11
|
this.name = 'SlateError.DeclarationError';
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
static is(error: unknown): error is SlateDeclarationError {
|
|
14
|
+
static override is(error: unknown): error is SlateDeclarationError {
|
|
15
15
|
return error instanceof SlateDeclarationError;
|
|
16
16
|
}
|
|
17
17
|
}
|
package/src/error/utils.ts
CHANGED
|
@@ -61,9 +61,13 @@ export let normalizeRetryable = (code: string, retryable?: boolean) => {
|
|
|
61
61
|
);
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
export let getDefaultMessage = (code: string, message?: string) => {
|
|
64
|
+
export let getDefaultMessage = (code: string, message?: string): string => {
|
|
65
65
|
if (message?.trim()) return message;
|
|
66
|
-
return
|
|
66
|
+
return (
|
|
67
|
+
DEFAULT_MESSAGES[code] ??
|
|
68
|
+
DEFAULT_MESSAGES[DEFAULT_CODE] ??
|
|
69
|
+
'An unexpected internal error occurred.'
|
|
70
|
+
);
|
|
67
71
|
};
|
|
68
72
|
|
|
69
73
|
export let cleanRecord = <Value extends Record<string, unknown> | undefined>(value: Value) => {
|