@polar-sh/sdk 0.17.2 → 0.17.4
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/docs/sdks/files/README.md +5 -1
- package/funcs/filesCreate.js +1 -1
- package/funcs/filesDelete.d.ts +1 -1
- package/funcs/filesDelete.d.ts.map +1 -1
- package/funcs/filesDelete.js +1 -1
- package/funcs/filesDelete.js.map +1 -1
- package/funcs/filesUpdate.d.ts +1 -1
- package/funcs/filesUpdate.d.ts.map +1 -1
- package/funcs/filesUpdate.js +2 -2
- package/funcs/filesUpdate.js.map +1 -1
- package/funcs/filesUploaded.d.ts +1 -1
- package/funcs/filesUploaded.d.ts.map +1 -1
- package/funcs/filesUploaded.js +2 -2
- package/funcs/filesUploaded.js.map +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/errors/alreadycanceledsubscription.d.ts +10 -10
- package/models/errors/alreadycanceledsubscription.d.ts.map +1 -1
- package/models/errors/alreadycanceledsubscription.js +14 -14
- package/models/errors/alreadycanceledsubscription.js.map +1 -1
- package/models/errors/index.d.ts +0 -1
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +0 -1
- package/models/errors/index.js.map +1 -1
- package/models/errors/notpermitted.d.ts +10 -10
- package/models/errors/notpermitted.d.ts.map +1 -1
- package/models/errors/notpermitted.js +14 -14
- package/models/errors/notpermitted.js.map +1 -1
- package/models/errors/resourcenotfound.d.ts +10 -10
- package/models/errors/resourcenotfound.d.ts.map +1 -1
- package/models/errors/resourcenotfound.js +15 -14
- package/models/errors/resourcenotfound.js.map +1 -1
- package/models/errors/unauthorized.d.ts +10 -10
- package/models/errors/unauthorized.d.ts.map +1 -1
- package/models/errors/unauthorized.js +14 -14
- package/models/errors/unauthorized.js.map +1 -1
- package/models/operations/filesupdate.d.ts +1 -1
- package/models/operations/filesuploaded.d.ts +1 -1
- package/package.json +1 -1
- package/src/funcs/filesCreate.ts +1 -1
- package/src/funcs/filesDelete.ts +3 -3
- package/src/funcs/filesUpdate.ts +7 -1
- package/src/funcs/filesUploaded.ts +7 -1
- package/src/lib/config.ts +2 -2
- package/src/models/errors/alreadycanceledsubscription.ts +20 -20
- package/src/models/errors/index.ts +0 -1
- package/src/models/errors/notpermitted.ts +19 -19
- package/src/models/errors/resourcenotfound.ts +17 -18
- package/src/models/errors/unauthorized.ts +19 -19
- package/src/models/operations/filesupdate.ts +1 -1
- package/src/models/operations/filesuploaded.ts +1 -1
- package/models/errors/filenotfound.d.ts +0 -57
- package/models/errors/filenotfound.d.ts.map +0 -1
- package/models/errors/filenotfound.js +0 -88
- package/models/errors/filenotfound.js.map +0 -1
- package/src/models/errors/filenotfound.ts +0 -102
|
@@ -26,9 +26,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.ResourceNotFound$ = exports.ResourceNotFound$outboundSchema = exports.ResourceNotFound$inboundSchema = exports.
|
|
29
|
+
exports.ResourceNotFound$ = exports.ResourceNotFound$outboundSchema = exports.ResourceNotFound$inboundSchema = exports.ErrorT$ = exports.ErrorT$outboundSchema = exports.ErrorT$inboundSchema = exports.ResourceNotFound = exports.ErrorT = void 0;
|
|
30
30
|
const z = __importStar(require("zod"));
|
|
31
|
-
exports.
|
|
31
|
+
exports.ErrorT = {
|
|
32
32
|
ResourceNotFound: "ResourceNotFound",
|
|
33
33
|
};
|
|
34
34
|
class ResourceNotFound extends Error {
|
|
@@ -38,30 +38,31 @@ class ResourceNotFound extends Error {
|
|
|
38
38
|
: `API error occurred: ${JSON.stringify(err)}`;
|
|
39
39
|
super(message);
|
|
40
40
|
this.data$ = err;
|
|
41
|
-
this.
|
|
41
|
+
this.error = err.error;
|
|
42
42
|
this.detail = err.detail;
|
|
43
43
|
this.name = "ResourceNotFound";
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
exports.ResourceNotFound = ResourceNotFound;
|
|
47
47
|
/** @internal */
|
|
48
|
-
exports.
|
|
48
|
+
exports.ErrorT$inboundSchema = z
|
|
49
|
+
.nativeEnum(exports.ErrorT);
|
|
49
50
|
/** @internal */
|
|
50
|
-
exports.
|
|
51
|
+
exports.ErrorT$outboundSchema = exports.ErrorT$inboundSchema;
|
|
51
52
|
/**
|
|
52
53
|
* @internal
|
|
53
54
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
54
55
|
*/
|
|
55
|
-
var
|
|
56
|
-
(function (
|
|
57
|
-
/** @deprecated use `
|
|
58
|
-
|
|
59
|
-
/** @deprecated use `
|
|
60
|
-
|
|
61
|
-
})(
|
|
56
|
+
var ErrorT$;
|
|
57
|
+
(function (ErrorT$) {
|
|
58
|
+
/** @deprecated use `ErrorT$inboundSchema` instead. */
|
|
59
|
+
ErrorT$.inboundSchema = exports.ErrorT$inboundSchema;
|
|
60
|
+
/** @deprecated use `ErrorT$outboundSchema` instead. */
|
|
61
|
+
ErrorT$.outboundSchema = exports.ErrorT$outboundSchema;
|
|
62
|
+
})(ErrorT$ || (exports.ErrorT$ = ErrorT$ = {}));
|
|
62
63
|
/** @internal */
|
|
63
64
|
exports.ResourceNotFound$inboundSchema = z.object({
|
|
64
|
-
|
|
65
|
+
error: z.literal("ResourceNotFound"),
|
|
65
66
|
detail: z.string(),
|
|
66
67
|
})
|
|
67
68
|
.transform((v) => {
|
|
@@ -71,7 +72,7 @@ exports.ResourceNotFound$inboundSchema = z.object({
|
|
|
71
72
|
exports.ResourceNotFound$outboundSchema = z.instanceof(ResourceNotFound)
|
|
72
73
|
.transform(v => v.data$)
|
|
73
74
|
.pipe(z.object({
|
|
74
|
-
|
|
75
|
+
error: z.literal("ResourceNotFound").default("ResourceNotFound"),
|
|
75
76
|
detail: z.string(),
|
|
76
77
|
}));
|
|
77
78
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resourcenotfound.js","sourceRoot":"","sources":["../../src/models/errors/resourcenotfound.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AAGZ,QAAA,
|
|
1
|
+
{"version":3,"file":"resourcenotfound.js","sourceRoot":"","sources":["../../src/models/errors/resourcenotfound.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AAGZ,QAAA,MAAM,GAAG;IACpB,gBAAgB,EAAE,kBAAkB;CAC5B,CAAC;AAQX,MAAa,gBAAiB,SAAQ,KAAK;IAOzC,YAAY,GAAyB;QACnC,MAAM,OAAO,GAAG,SAAS,IAAI,GAAG,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ;YACjE,CAAC,CAAC,GAAG,CAAC,OAAO;YACb,CAAC,CAAC,uBAAuB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;QACjD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;QAEjB,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;QAEzB,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AAnBD,4CAmBC;AAED,gBAAgB;AACH,QAAA,oBAAoB,GAAmC,CAAC;KAClE,UAAU,CAAC,cAAM,CAAC,CAAC;AAEtB,gBAAgB;AACH,QAAA,qBAAqB,GAChC,4BAAoB,CAAC;AAEvB;;;GAGG;AACH,IAAiB,OAAO,CAKvB;AALD,WAAiB,OAAO;IACtB,sDAAsD;IACzC,qBAAa,GAAG,4BAAoB,CAAC;IAClD,uDAAuD;IAC1C,sBAAc,GAAG,6BAAqB,CAAC;AACtD,CAAC,EALgB,OAAO,uBAAP,OAAO,QAKvB;AAED,gBAAgB;AACH,QAAA,8BAA8B,GAIvC,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC;KACC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACf,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAAC;AACjC,CAAC,CAAC,CAAC;AAQL,gBAAgB;AACH,QAAA,+BAA+B,GAIxC,CAAC,CAAC,UAAU,CAAC,gBAAgB,CAAC;KAC/B,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;KACvB,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IACb,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;IAChE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAC,CAAC;AAEN;;;GAGG;AACH,IAAiB,iBAAiB,CAOjC;AAPD,WAAiB,iBAAiB;IAChC,gEAAgE;IACnD,+BAAa,GAAG,sCAA8B,CAAC;IAC5D,iEAAiE;IACpD,gCAAc,GAAG,uCAA+B,CAAC;AAGhE,CAAC,EAPgB,iBAAiB,iCAAjB,iBAAiB,QAOjC"}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { ClosedEnum } from "../../types/enums.js";
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const UnauthorizedError: {
|
|
4
4
|
readonly Unauthorized: "Unauthorized";
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
6
|
+
export type UnauthorizedError = ClosedEnum<typeof UnauthorizedError>;
|
|
7
7
|
export type UnauthorizedData = {
|
|
8
|
-
|
|
8
|
+
error: "Unauthorized";
|
|
9
9
|
detail: string;
|
|
10
10
|
};
|
|
11
11
|
export declare class Unauthorized extends Error {
|
|
12
|
-
|
|
12
|
+
error: "Unauthorized";
|
|
13
13
|
detail: string;
|
|
14
14
|
/** The original data that was passed to this error instance. */
|
|
15
15
|
data$: UnauthorizedData;
|
|
16
16
|
constructor(err: UnauthorizedData);
|
|
17
17
|
}
|
|
18
18
|
/** @internal */
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const UnauthorizedError$inboundSchema: z.ZodNativeEnum<typeof UnauthorizedError>;
|
|
20
20
|
/** @internal */
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const UnauthorizedError$outboundSchema: z.ZodNativeEnum<typeof UnauthorizedError>;
|
|
22
22
|
/**
|
|
23
23
|
* @internal
|
|
24
24
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
25
25
|
*/
|
|
26
|
-
export declare namespace
|
|
27
|
-
/** @deprecated use `
|
|
26
|
+
export declare namespace UnauthorizedError$ {
|
|
27
|
+
/** @deprecated use `UnauthorizedError$inboundSchema` instead. */
|
|
28
28
|
const inboundSchema: z.ZodNativeEnum<{
|
|
29
29
|
readonly Unauthorized: "Unauthorized";
|
|
30
30
|
}>;
|
|
31
|
-
/** @deprecated use `
|
|
31
|
+
/** @deprecated use `UnauthorizedError$outboundSchema` instead. */
|
|
32
32
|
const outboundSchema: z.ZodNativeEnum<{
|
|
33
33
|
readonly Unauthorized: "Unauthorized";
|
|
34
34
|
}>;
|
|
@@ -37,7 +37,7 @@ export declare namespace UnauthorizedType$ {
|
|
|
37
37
|
export declare const Unauthorized$inboundSchema: z.ZodType<Unauthorized, z.ZodTypeDef, unknown>;
|
|
38
38
|
/** @internal */
|
|
39
39
|
export type Unauthorized$Outbound = {
|
|
40
|
-
|
|
40
|
+
error: "Unauthorized";
|
|
41
41
|
detail: string;
|
|
42
42
|
};
|
|
43
43
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unauthorized.d.ts","sourceRoot":"","sources":["../../src/models/errors/unauthorized.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACz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BAAgB;AAChB,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,OAAO,CACjD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,YAAY,CAMT,CAAC;AAEN;;;GAGG;AACH,yBAAiB,aAAa,CAAC;IAC7B,4DAA4D;IACrD,MAAM,aAAa,gDAA6B,CAAC;IACxD,6DAA6D;IACtD,MAAM,cAAc,8DAA8B,CAAC;IAC1D,uDAAuD;IACvD,KAAY,QAAQ,GAAG,qBAAqB,CAAC;CAC9C"}
|
|
@@ -26,9 +26,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Unauthorized$ = exports.Unauthorized$outboundSchema = exports.Unauthorized$inboundSchema = exports.
|
|
29
|
+
exports.Unauthorized$ = exports.Unauthorized$outboundSchema = exports.Unauthorized$inboundSchema = exports.UnauthorizedError$ = exports.UnauthorizedError$outboundSchema = exports.UnauthorizedError$inboundSchema = exports.Unauthorized = exports.UnauthorizedError = void 0;
|
|
30
30
|
const z = __importStar(require("zod"));
|
|
31
|
-
exports.
|
|
31
|
+
exports.UnauthorizedError = {
|
|
32
32
|
Unauthorized: "Unauthorized",
|
|
33
33
|
};
|
|
34
34
|
class Unauthorized extends Error {
|
|
@@ -38,30 +38,30 @@ class Unauthorized extends Error {
|
|
|
38
38
|
: `API error occurred: ${JSON.stringify(err)}`;
|
|
39
39
|
super(message);
|
|
40
40
|
this.data$ = err;
|
|
41
|
-
this.
|
|
41
|
+
this.error = err.error;
|
|
42
42
|
this.detail = err.detail;
|
|
43
43
|
this.name = "Unauthorized";
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
exports.Unauthorized = Unauthorized;
|
|
47
47
|
/** @internal */
|
|
48
|
-
exports.
|
|
48
|
+
exports.UnauthorizedError$inboundSchema = z.nativeEnum(exports.UnauthorizedError);
|
|
49
49
|
/** @internal */
|
|
50
|
-
exports.
|
|
50
|
+
exports.UnauthorizedError$outboundSchema = exports.UnauthorizedError$inboundSchema;
|
|
51
51
|
/**
|
|
52
52
|
* @internal
|
|
53
53
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
54
54
|
*/
|
|
55
|
-
var
|
|
56
|
-
(function (
|
|
57
|
-
/** @deprecated use `
|
|
58
|
-
|
|
59
|
-
/** @deprecated use `
|
|
60
|
-
|
|
61
|
-
})(
|
|
55
|
+
var UnauthorizedError$;
|
|
56
|
+
(function (UnauthorizedError$) {
|
|
57
|
+
/** @deprecated use `UnauthorizedError$inboundSchema` instead. */
|
|
58
|
+
UnauthorizedError$.inboundSchema = exports.UnauthorizedError$inboundSchema;
|
|
59
|
+
/** @deprecated use `UnauthorizedError$outboundSchema` instead. */
|
|
60
|
+
UnauthorizedError$.outboundSchema = exports.UnauthorizedError$outboundSchema;
|
|
61
|
+
})(UnauthorizedError$ || (exports.UnauthorizedError$ = UnauthorizedError$ = {}));
|
|
62
62
|
/** @internal */
|
|
63
63
|
exports.Unauthorized$inboundSchema = z.object({
|
|
64
|
-
|
|
64
|
+
error: z.literal("Unauthorized"),
|
|
65
65
|
detail: z.string(),
|
|
66
66
|
})
|
|
67
67
|
.transform((v) => {
|
|
@@ -71,7 +71,7 @@ exports.Unauthorized$inboundSchema = z.object({
|
|
|
71
71
|
exports.Unauthorized$outboundSchema = z.instanceof(Unauthorized)
|
|
72
72
|
.transform(v => v.data$)
|
|
73
73
|
.pipe(z.object({
|
|
74
|
-
|
|
74
|
+
error: z.literal("Unauthorized").default("Unauthorized"),
|
|
75
75
|
detail: z.string(),
|
|
76
76
|
}));
|
|
77
77
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unauthorized.js","sourceRoot":"","sources":["../../src/models/errors/unauthorized.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AAGZ,QAAA,
|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,CAAC;KACC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACf,OAAO,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;AAC7B,CAAC,CAAC,CAAC;AAQL,gBAAgB;AACH,QAAA,2BAA2B,GAIpC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC;KAC3B,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;KACvB,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IACb,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IACxD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAC,CAAC;AAEN;;;GAGG;AACH,IAAiB,aAAa,CAO7B;AAPD,WAAiB,aAAa;IAC5B,4DAA4D;IAC/C,2BAAa,GAAG,kCAA0B,CAAC;IACxD,6DAA6D;IAChD,4BAAc,GAAG,mCAA2B,CAAC;AAG5D,CAAC,EAPgB,aAAa,6BAAb,aAAa,QAO7B"}
|
|
@@ -10,7 +10,7 @@ export type FilesUploadedRequest = {
|
|
|
10
10
|
fileUploadCompleted: components.FileUploadCompleted;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* File upload completed.
|
|
14
14
|
*/
|
|
15
15
|
export type FilesUploadedResponseFilesUploaded = (components.DownloadableFileRead & {
|
|
16
16
|
service: "downloadable";
|
package/package.json
CHANGED
package/src/funcs/filesCreate.ts
CHANGED
|
@@ -119,7 +119,7 @@ export async function filesCreate(
|
|
|
119
119
|
| RequestTimeoutError
|
|
120
120
|
| ConnectionError
|
|
121
121
|
>(
|
|
122
|
-
M.json(
|
|
122
|
+
M.json(201, components.FileUpload$inboundSchema),
|
|
123
123
|
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
124
124
|
M.fail(["4XX", "5XX"]),
|
|
125
125
|
)(response, { extraFields: responseFields });
|
package/src/funcs/filesDelete.ts
CHANGED
|
@@ -37,7 +37,7 @@ export async function filesDelete(
|
|
|
37
37
|
Result<
|
|
38
38
|
void,
|
|
39
39
|
| errors.NotPermitted
|
|
40
|
-
| errors.
|
|
40
|
+
| errors.ResourceNotFound
|
|
41
41
|
| errors.HTTPValidationError
|
|
42
42
|
| SDKError
|
|
43
43
|
| SDKValidationError
|
|
@@ -120,7 +120,7 @@ export async function filesDelete(
|
|
|
120
120
|
const [result] = await M.match<
|
|
121
121
|
void,
|
|
122
122
|
| errors.NotPermitted
|
|
123
|
-
| errors.
|
|
123
|
+
| errors.ResourceNotFound
|
|
124
124
|
| errors.HTTPValidationError
|
|
125
125
|
| SDKError
|
|
126
126
|
| SDKValidationError
|
|
@@ -132,7 +132,7 @@ export async function filesDelete(
|
|
|
132
132
|
>(
|
|
133
133
|
M.nil(204, z.void()),
|
|
134
134
|
M.jsonErr(403, errors.NotPermitted$inboundSchema),
|
|
135
|
-
M.jsonErr(404, errors.
|
|
135
|
+
M.jsonErr(404, errors.ResourceNotFound$inboundSchema),
|
|
136
136
|
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
137
137
|
M.fail(["4XX", "5XX"]),
|
|
138
138
|
)(response, { extraFields: responseFields });
|
package/src/funcs/filesUpdate.ts
CHANGED
|
@@ -35,6 +35,8 @@ export async function filesUpdate(
|
|
|
35
35
|
): Promise<
|
|
36
36
|
Result<
|
|
37
37
|
operations.FilesUpdateResponseFilesUpdate,
|
|
38
|
+
| errors.NotPermitted
|
|
39
|
+
| errors.ResourceNotFound
|
|
38
40
|
| errors.HTTPValidationError
|
|
39
41
|
| SDKError
|
|
40
42
|
| SDKValidationError
|
|
@@ -102,7 +104,7 @@ export async function filesUpdate(
|
|
|
102
104
|
|
|
103
105
|
const doResult = await client._do(req, {
|
|
104
106
|
context,
|
|
105
|
-
errorCodes: ["422", "4XX", "5XX"],
|
|
107
|
+
errorCodes: ["403", "404", "422", "4XX", "5XX"],
|
|
106
108
|
retryConfig: context.retryConfig,
|
|
107
109
|
retryCodes: context.retryCodes,
|
|
108
110
|
});
|
|
@@ -117,6 +119,8 @@ export async function filesUpdate(
|
|
|
117
119
|
|
|
118
120
|
const [result] = await M.match<
|
|
119
121
|
operations.FilesUpdateResponseFilesUpdate,
|
|
122
|
+
| errors.NotPermitted
|
|
123
|
+
| errors.ResourceNotFound
|
|
120
124
|
| errors.HTTPValidationError
|
|
121
125
|
| SDKError
|
|
122
126
|
| SDKValidationError
|
|
@@ -127,6 +131,8 @@ export async function filesUpdate(
|
|
|
127
131
|
| ConnectionError
|
|
128
132
|
>(
|
|
129
133
|
M.json(200, operations.FilesUpdateResponseFilesUpdate$inboundSchema),
|
|
134
|
+
M.jsonErr(403, errors.NotPermitted$inboundSchema),
|
|
135
|
+
M.jsonErr(404, errors.ResourceNotFound$inboundSchema),
|
|
130
136
|
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
131
137
|
M.fail(["4XX", "5XX"]),
|
|
132
138
|
)(response, { extraFields: responseFields });
|
|
@@ -35,6 +35,8 @@ export async function filesUploaded(
|
|
|
35
35
|
): Promise<
|
|
36
36
|
Result<
|
|
37
37
|
operations.FilesUploadedResponseFilesUploaded,
|
|
38
|
+
| errors.NotPermitted
|
|
39
|
+
| errors.ResourceNotFound
|
|
38
40
|
| errors.HTTPValidationError
|
|
39
41
|
| SDKError
|
|
40
42
|
| SDKValidationError
|
|
@@ -104,7 +106,7 @@ export async function filesUploaded(
|
|
|
104
106
|
|
|
105
107
|
const doResult = await client._do(req, {
|
|
106
108
|
context,
|
|
107
|
-
errorCodes: ["422", "4XX", "5XX"],
|
|
109
|
+
errorCodes: ["403", "404", "422", "4XX", "5XX"],
|
|
108
110
|
retryConfig: context.retryConfig,
|
|
109
111
|
retryCodes: context.retryCodes,
|
|
110
112
|
});
|
|
@@ -119,6 +121,8 @@ export async function filesUploaded(
|
|
|
119
121
|
|
|
120
122
|
const [result] = await M.match<
|
|
121
123
|
operations.FilesUploadedResponseFilesUploaded,
|
|
124
|
+
| errors.NotPermitted
|
|
125
|
+
| errors.ResourceNotFound
|
|
122
126
|
| errors.HTTPValidationError
|
|
123
127
|
| SDKError
|
|
124
128
|
| SDKValidationError
|
|
@@ -129,6 +133,8 @@ export async function filesUploaded(
|
|
|
129
133
|
| ConnectionError
|
|
130
134
|
>(
|
|
131
135
|
M.json(200, operations.FilesUploadedResponseFilesUploaded$inboundSchema),
|
|
136
|
+
M.jsonErr(403, errors.NotPermitted$inboundSchema),
|
|
137
|
+
M.jsonErr(404, errors.ResourceNotFound$inboundSchema),
|
|
132
138
|
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
133
139
|
M.fail(["4XX", "5XX"]),
|
|
134
140
|
)(response, { extraFields: responseFields });
|
package/src/lib/config.ts
CHANGED
|
@@ -60,7 +60,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
60
60
|
export const SDK_METADATA = {
|
|
61
61
|
language: "typescript",
|
|
62
62
|
openapiDocVersion: "0.1.0",
|
|
63
|
-
sdkVersion: "0.17.
|
|
63
|
+
sdkVersion: "0.17.4",
|
|
64
64
|
genVersion: "2.467.4",
|
|
65
|
-
userAgent: "speakeasy-sdk/typescript 0.17.
|
|
65
|
+
userAgent: "speakeasy-sdk/typescript 0.17.4 2.467.4 0.1.0 @polar-sh/sdk",
|
|
66
66
|
} as const;
|
|
@@ -5,20 +5,20 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { ClosedEnum } from "../../types/enums.js";
|
|
7
7
|
|
|
8
|
-
export const
|
|
8
|
+
export const AlreadyCanceledSubscriptionError = {
|
|
9
9
|
AlreadyCanceledSubscription: "AlreadyCanceledSubscription",
|
|
10
10
|
} as const;
|
|
11
|
-
export type
|
|
12
|
-
typeof
|
|
11
|
+
export type AlreadyCanceledSubscriptionError = ClosedEnum<
|
|
12
|
+
typeof AlreadyCanceledSubscriptionError
|
|
13
13
|
>;
|
|
14
14
|
|
|
15
15
|
export type AlreadyCanceledSubscriptionData = {
|
|
16
|
-
|
|
16
|
+
error: "AlreadyCanceledSubscription";
|
|
17
17
|
detail: string;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export class AlreadyCanceledSubscription extends Error {
|
|
21
|
-
|
|
21
|
+
error: "AlreadyCanceledSubscription";
|
|
22
22
|
detail: string;
|
|
23
23
|
|
|
24
24
|
/** The original data that was passed to this error instance. */
|
|
@@ -31,7 +31,7 @@ export class AlreadyCanceledSubscription extends Error {
|
|
|
31
31
|
super(message);
|
|
32
32
|
this.data$ = err;
|
|
33
33
|
|
|
34
|
-
this.
|
|
34
|
+
this.error = err.error;
|
|
35
35
|
this.detail = err.detail;
|
|
36
36
|
|
|
37
37
|
this.name = "AlreadyCanceledSubscription";
|
|
@@ -39,24 +39,24 @@ export class AlreadyCanceledSubscription extends Error {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/** @internal */
|
|
42
|
-
export const
|
|
43
|
-
typeof
|
|
44
|
-
> = z.nativeEnum(
|
|
42
|
+
export const AlreadyCanceledSubscriptionError$inboundSchema: z.ZodNativeEnum<
|
|
43
|
+
typeof AlreadyCanceledSubscriptionError
|
|
44
|
+
> = z.nativeEnum(AlreadyCanceledSubscriptionError);
|
|
45
45
|
|
|
46
46
|
/** @internal */
|
|
47
|
-
export const
|
|
48
|
-
typeof
|
|
49
|
-
> =
|
|
47
|
+
export const AlreadyCanceledSubscriptionError$outboundSchema: z.ZodNativeEnum<
|
|
48
|
+
typeof AlreadyCanceledSubscriptionError
|
|
49
|
+
> = AlreadyCanceledSubscriptionError$inboundSchema;
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* @internal
|
|
53
53
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
54
54
|
*/
|
|
55
|
-
export namespace
|
|
56
|
-
/** @deprecated use `
|
|
57
|
-
export const inboundSchema =
|
|
58
|
-
/** @deprecated use `
|
|
59
|
-
export const outboundSchema =
|
|
55
|
+
export namespace AlreadyCanceledSubscriptionError$ {
|
|
56
|
+
/** @deprecated use `AlreadyCanceledSubscriptionError$inboundSchema` instead. */
|
|
57
|
+
export const inboundSchema = AlreadyCanceledSubscriptionError$inboundSchema;
|
|
58
|
+
/** @deprecated use `AlreadyCanceledSubscriptionError$outboundSchema` instead. */
|
|
59
|
+
export const outboundSchema = AlreadyCanceledSubscriptionError$outboundSchema;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/** @internal */
|
|
@@ -65,7 +65,7 @@ export const AlreadyCanceledSubscription$inboundSchema: z.ZodType<
|
|
|
65
65
|
z.ZodTypeDef,
|
|
66
66
|
unknown
|
|
67
67
|
> = z.object({
|
|
68
|
-
|
|
68
|
+
error: z.literal("AlreadyCanceledSubscription"),
|
|
69
69
|
detail: z.string(),
|
|
70
70
|
})
|
|
71
71
|
.transform((v) => {
|
|
@@ -74,7 +74,7 @@ export const AlreadyCanceledSubscription$inboundSchema: z.ZodType<
|
|
|
74
74
|
|
|
75
75
|
/** @internal */
|
|
76
76
|
export type AlreadyCanceledSubscription$Outbound = {
|
|
77
|
-
|
|
77
|
+
error: "AlreadyCanceledSubscription";
|
|
78
78
|
detail: string;
|
|
79
79
|
};
|
|
80
80
|
|
|
@@ -86,7 +86,7 @@ export const AlreadyCanceledSubscription$outboundSchema: z.ZodType<
|
|
|
86
86
|
> = z.instanceof(AlreadyCanceledSubscription)
|
|
87
87
|
.transform(v => v.data$)
|
|
88
88
|
.pipe(z.object({
|
|
89
|
-
|
|
89
|
+
error: z.literal("AlreadyCanceledSubscription").default(
|
|
90
90
|
"AlreadyCanceledSubscription",
|
|
91
91
|
),
|
|
92
92
|
detail: z.string(),
|
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { ClosedEnum } from "../../types/enums.js";
|
|
7
7
|
|
|
8
|
-
export const
|
|
8
|
+
export const NotPermittedError = {
|
|
9
9
|
NotPermitted: "NotPermitted",
|
|
10
10
|
} as const;
|
|
11
|
-
export type
|
|
11
|
+
export type NotPermittedError = ClosedEnum<typeof NotPermittedError>;
|
|
12
12
|
|
|
13
13
|
export type NotPermittedData = {
|
|
14
|
-
|
|
14
|
+
error: "NotPermitted";
|
|
15
15
|
detail: string;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export class NotPermitted extends Error {
|
|
19
|
-
|
|
19
|
+
error: "NotPermitted";
|
|
20
20
|
detail: string;
|
|
21
21
|
|
|
22
22
|
/** The original data that was passed to this error instance. */
|
|
@@ -29,7 +29,7 @@ export class NotPermitted extends Error {
|
|
|
29
29
|
super(message);
|
|
30
30
|
this.data$ = err;
|
|
31
31
|
|
|
32
|
-
this.
|
|
32
|
+
this.error = err.error;
|
|
33
33
|
this.detail = err.detail;
|
|
34
34
|
|
|
35
35
|
this.name = "NotPermitted";
|
|
@@ -37,24 +37,24 @@ export class NotPermitted extends Error {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/** @internal */
|
|
40
|
-
export const
|
|
41
|
-
typeof
|
|
42
|
-
> = z.nativeEnum(
|
|
40
|
+
export const NotPermittedError$inboundSchema: z.ZodNativeEnum<
|
|
41
|
+
typeof NotPermittedError
|
|
42
|
+
> = z.nativeEnum(NotPermittedError);
|
|
43
43
|
|
|
44
44
|
/** @internal */
|
|
45
|
-
export const
|
|
46
|
-
typeof
|
|
47
|
-
> =
|
|
45
|
+
export const NotPermittedError$outboundSchema: z.ZodNativeEnum<
|
|
46
|
+
typeof NotPermittedError
|
|
47
|
+
> = NotPermittedError$inboundSchema;
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* @internal
|
|
51
51
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
52
52
|
*/
|
|
53
|
-
export namespace
|
|
54
|
-
/** @deprecated use `
|
|
55
|
-
export const inboundSchema =
|
|
56
|
-
/** @deprecated use `
|
|
57
|
-
export const outboundSchema =
|
|
53
|
+
export namespace NotPermittedError$ {
|
|
54
|
+
/** @deprecated use `NotPermittedError$inboundSchema` instead. */
|
|
55
|
+
export const inboundSchema = NotPermittedError$inboundSchema;
|
|
56
|
+
/** @deprecated use `NotPermittedError$outboundSchema` instead. */
|
|
57
|
+
export const outboundSchema = NotPermittedError$outboundSchema;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/** @internal */
|
|
@@ -63,7 +63,7 @@ export const NotPermitted$inboundSchema: z.ZodType<
|
|
|
63
63
|
z.ZodTypeDef,
|
|
64
64
|
unknown
|
|
65
65
|
> = z.object({
|
|
66
|
-
|
|
66
|
+
error: z.literal("NotPermitted"),
|
|
67
67
|
detail: z.string(),
|
|
68
68
|
})
|
|
69
69
|
.transform((v) => {
|
|
@@ -72,7 +72,7 @@ export const NotPermitted$inboundSchema: z.ZodType<
|
|
|
72
72
|
|
|
73
73
|
/** @internal */
|
|
74
74
|
export type NotPermitted$Outbound = {
|
|
75
|
-
|
|
75
|
+
error: "NotPermitted";
|
|
76
76
|
detail: string;
|
|
77
77
|
};
|
|
78
78
|
|
|
@@ -84,7 +84,7 @@ export const NotPermitted$outboundSchema: z.ZodType<
|
|
|
84
84
|
> = z.instanceof(NotPermitted)
|
|
85
85
|
.transform(v => v.data$)
|
|
86
86
|
.pipe(z.object({
|
|
87
|
-
|
|
87
|
+
error: z.literal("NotPermitted").default("NotPermitted"),
|
|
88
88
|
detail: z.string(),
|
|
89
89
|
}));
|
|
90
90
|
|
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { ClosedEnum } from "../../types/enums.js";
|
|
7
7
|
|
|
8
|
-
export const
|
|
8
|
+
export const ErrorT = {
|
|
9
9
|
ResourceNotFound: "ResourceNotFound",
|
|
10
10
|
} as const;
|
|
11
|
-
export type
|
|
11
|
+
export type ErrorT = ClosedEnum<typeof ErrorT>;
|
|
12
12
|
|
|
13
13
|
export type ResourceNotFoundData = {
|
|
14
|
-
|
|
14
|
+
error: "ResourceNotFound";
|
|
15
15
|
detail: string;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export class ResourceNotFound extends Error {
|
|
19
|
-
|
|
19
|
+
error: "ResourceNotFound";
|
|
20
20
|
detail: string;
|
|
21
21
|
|
|
22
22
|
/** The original data that was passed to this error instance. */
|
|
@@ -29,7 +29,7 @@ export class ResourceNotFound extends Error {
|
|
|
29
29
|
super(message);
|
|
30
30
|
this.data$ = err;
|
|
31
31
|
|
|
32
|
-
this.
|
|
32
|
+
this.error = err.error;
|
|
33
33
|
this.detail = err.detail;
|
|
34
34
|
|
|
35
35
|
this.name = "ResourceNotFound";
|
|
@@ -37,23 +37,22 @@ export class ResourceNotFound extends Error {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/** @internal */
|
|
40
|
-
export const
|
|
41
|
-
|
|
42
|
-
);
|
|
40
|
+
export const ErrorT$inboundSchema: z.ZodNativeEnum<typeof ErrorT> = z
|
|
41
|
+
.nativeEnum(ErrorT);
|
|
43
42
|
|
|
44
43
|
/** @internal */
|
|
45
|
-
export const
|
|
46
|
-
|
|
44
|
+
export const ErrorT$outboundSchema: z.ZodNativeEnum<typeof ErrorT> =
|
|
45
|
+
ErrorT$inboundSchema;
|
|
47
46
|
|
|
48
47
|
/**
|
|
49
48
|
* @internal
|
|
50
49
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
50
|
*/
|
|
52
|
-
export namespace
|
|
53
|
-
/** @deprecated use `
|
|
54
|
-
export const inboundSchema =
|
|
55
|
-
/** @deprecated use `
|
|
56
|
-
export const outboundSchema =
|
|
51
|
+
export namespace ErrorT$ {
|
|
52
|
+
/** @deprecated use `ErrorT$inboundSchema` instead. */
|
|
53
|
+
export const inboundSchema = ErrorT$inboundSchema;
|
|
54
|
+
/** @deprecated use `ErrorT$outboundSchema` instead. */
|
|
55
|
+
export const outboundSchema = ErrorT$outboundSchema;
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
/** @internal */
|
|
@@ -62,7 +61,7 @@ export const ResourceNotFound$inboundSchema: z.ZodType<
|
|
|
62
61
|
z.ZodTypeDef,
|
|
63
62
|
unknown
|
|
64
63
|
> = z.object({
|
|
65
|
-
|
|
64
|
+
error: z.literal("ResourceNotFound"),
|
|
66
65
|
detail: z.string(),
|
|
67
66
|
})
|
|
68
67
|
.transform((v) => {
|
|
@@ -71,7 +70,7 @@ export const ResourceNotFound$inboundSchema: z.ZodType<
|
|
|
71
70
|
|
|
72
71
|
/** @internal */
|
|
73
72
|
export type ResourceNotFound$Outbound = {
|
|
74
|
-
|
|
73
|
+
error: "ResourceNotFound";
|
|
75
74
|
detail: string;
|
|
76
75
|
};
|
|
77
76
|
|
|
@@ -83,7 +82,7 @@ export const ResourceNotFound$outboundSchema: z.ZodType<
|
|
|
83
82
|
> = z.instanceof(ResourceNotFound)
|
|
84
83
|
.transform(v => v.data$)
|
|
85
84
|
.pipe(z.object({
|
|
86
|
-
|
|
85
|
+
error: z.literal("ResourceNotFound").default("ResourceNotFound"),
|
|
87
86
|
detail: z.string(),
|
|
88
87
|
}));
|
|
89
88
|
|