@steamsets/client-ts 0.31.0 → 0.31.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/README.md +11 -0
- package/examples/package-lock.json +1 -1
- package/funcs/adminGetAccount.d.ts +16 -0
- package/funcs/adminGetAccount.d.ts.map +1 -0
- package/funcs/adminGetAccount.js +133 -0
- package/funcs/adminGetAccount.js.map +1 -0
- package/funcs/adminRemoveVanity.d.ts +16 -0
- package/funcs/adminRemoveVanity.d.ts.map +1 -0
- package/funcs/adminRemoveVanity.js +133 -0
- package/funcs/adminRemoveVanity.js.map +1 -0
- package/funcs/adminUpdateResources.d.ts +16 -0
- package/funcs/adminUpdateResources.d.ts.map +1 -0
- package/funcs/adminUpdateResources.js +131 -0
- package/funcs/adminUpdateResources.js.map +1 -0
- package/funcs/adminUpdateRoles.d.ts +16 -0
- package/funcs/adminUpdateRoles.d.ts.map +1 -0
- package/funcs/adminUpdateRoles.js +131 -0
- package/funcs/adminUpdateRoles.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/models/components/historyvalue.d.ts +17 -0
- package/models/components/historyvalue.d.ts.map +1 -0
- package/models/components/historyvalue.js +51 -0
- package/models/components/historyvalue.js.map +1 -0
- package/models/components/index.d.ts +8 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +8 -0
- package/models/components/index.js.map +1 -1
- package/models/components/resource.d.ts +10 -0
- package/models/components/resource.d.ts.map +1 -1
- package/models/components/resource.js +12 -1
- package/models/components/resource.js.map +1 -1
- package/models/components/v1accountlocationupdate.d.ts +19 -0
- package/models/components/v1accountlocationupdate.d.ts.map +1 -0
- package/models/components/v1accountlocationupdate.js +56 -0
- package/models/components/v1accountlocationupdate.js.map +1 -0
- package/models/components/v1accountnameupdate.d.ts +15 -0
- package/models/components/v1accountnameupdate.d.ts.map +1 -0
- package/models/components/v1accountnameupdate.js +52 -0
- package/models/components/v1accountnameupdate.js.map +1 -0
- package/models/components/v1accountvanityupdate.d.ts +15 -0
- package/models/components/v1accountvanityupdate.d.ts.map +1 -0
- package/models/components/v1accountvanityupdate.js +52 -0
- package/models/components/v1accountvanityupdate.js.map +1 -0
- package/models/components/v1admingetaccountresponsebody.d.ts +104 -0
- package/models/components/v1admingetaccountresponsebody.d.ts.map +1 -0
- package/models/components/v1admingetaccountresponsebody.js +90 -0
- package/models/components/v1admingetaccountresponsebody.js.map +1 -0
- package/models/components/v1adminremovevanityresponsebody.d.ts +13 -0
- package/models/components/v1adminremovevanityresponsebody.d.ts.map +1 -0
- package/models/components/v1adminremovevanityresponsebody.js +55 -0
- package/models/components/v1adminremovevanityresponsebody.js.map +1 -0
- package/models/components/v1adminupdateresourcesrequestbody.d.ts +22 -0
- package/models/components/v1adminupdateresourcesrequestbody.d.ts.map +1 -0
- package/models/components/v1adminupdateresourcesrequestbody.js +54 -0
- package/models/components/v1adminupdateresourcesrequestbody.js.map +1 -0
- package/models/components/v1adminupdaterolesrequestbody.d.ts +45 -0
- package/models/components/v1adminupdaterolesrequestbody.d.ts.map +1 -0
- package/models/components/v1adminupdaterolesrequestbody.js +78 -0
- package/models/components/v1adminupdaterolesrequestbody.js.map +1 -0
- package/models/operations/admingetaccount.d.ts +15 -0
- package/models/operations/admingetaccount.d.ts.map +1 -0
- package/models/operations/admingetaccount.js +59 -0
- package/models/operations/admingetaccount.js.map +1 -0
- package/models/operations/adminremovevanity.d.ts +15 -0
- package/models/operations/adminremovevanity.d.ts.map +1 -0
- package/models/operations/adminremovevanity.js +59 -0
- package/models/operations/adminremovevanity.js.map +1 -0
- package/models/operations/adminupdateresources.d.ts +11 -0
- package/models/operations/adminupdateresources.d.ts.map +1 -0
- package/models/operations/adminupdateresources.js +56 -0
- package/models/operations/adminupdateresources.js.map +1 -0
- package/models/operations/adminupdateroles.d.ts +11 -0
- package/models/operations/adminupdateroles.d.ts.map +1 -0
- package/models/operations/adminupdateroles.js +56 -0
- package/models/operations/adminupdateroles.js.map +1 -0
- package/models/operations/index.d.ts +4 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +4 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/admin.d.ts +22 -0
- package/sdk/admin.d.ts.map +1 -0
- package/sdk/admin.js +40 -0
- package/sdk/admin.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/adminGetAccount.ts +185 -0
- package/src/funcs/adminRemoveVanity.ts +185 -0
- package/src/funcs/adminUpdateResources.ts +184 -0
- package/src/funcs/adminUpdateRoles.ts +184 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/historyvalue.ts +39 -0
- package/src/models/components/index.ts +8 -0
- package/src/models/components/resource.ts +22 -0
- package/src/models/components/v1accountlocationupdate.ts +45 -0
- package/src/models/components/v1accountnameupdate.ts +37 -0
- package/src/models/components/v1accountvanityupdate.ts +37 -0
- package/src/models/components/v1admingetaccountresponsebody.ts +163 -0
- package/src/models/components/v1adminremovevanityresponsebody.ts +39 -0
- package/src/models/components/v1adminupdateresourcesrequestbody.ts +57 -0
- package/src/models/components/v1adminupdaterolesrequestbody.ts +80 -0
- package/src/models/operations/admingetaccount.ts +46 -0
- package/src/models/operations/adminremovevanity.ts +46 -0
- package/src/models/operations/adminupdateresources.ts +37 -0
- package/src/models/operations/adminupdateroles.ts +37 -0
- package/src/models/operations/index.ts +4 -0
- package/src/sdk/admin.ts +70 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import { HistoryValue, HistoryValue$inboundSchema } from "./historyvalue.js";
|
|
10
|
+
|
|
11
|
+
export type V1AccountLocationUpdate = {
|
|
12
|
+
city: HistoryValue;
|
|
13
|
+
countryCode: HistoryValue;
|
|
14
|
+
countryName: HistoryValue;
|
|
15
|
+
region: HistoryValue;
|
|
16
|
+
state: HistoryValue;
|
|
17
|
+
/**
|
|
18
|
+
* The time the location was updated
|
|
19
|
+
*/
|
|
20
|
+
updatedAt: Date;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const V1AccountLocationUpdate$inboundSchema: z.ZodType<
|
|
25
|
+
V1AccountLocationUpdate,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
city: HistoryValue$inboundSchema,
|
|
30
|
+
countryCode: HistoryValue$inboundSchema,
|
|
31
|
+
countryName: HistoryValue$inboundSchema,
|
|
32
|
+
region: HistoryValue$inboundSchema,
|
|
33
|
+
state: HistoryValue$inboundSchema,
|
|
34
|
+
updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function v1AccountLocationUpdateFromJSON(
|
|
38
|
+
jsonString: string,
|
|
39
|
+
): SafeParseResult<V1AccountLocationUpdate, SDKValidationError> {
|
|
40
|
+
return safeParse(
|
|
41
|
+
jsonString,
|
|
42
|
+
(x) => V1AccountLocationUpdate$inboundSchema.parse(JSON.parse(x)),
|
|
43
|
+
`Failed to parse 'V1AccountLocationUpdate' from JSON`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import { HistoryValue, HistoryValue$inboundSchema } from "./historyvalue.js";
|
|
10
|
+
|
|
11
|
+
export type V1AccountNameUpdate = {
|
|
12
|
+
name: HistoryValue;
|
|
13
|
+
/**
|
|
14
|
+
* The time the name was updated
|
|
15
|
+
*/
|
|
16
|
+
updatedAt: Date;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const V1AccountNameUpdate$inboundSchema: z.ZodType<
|
|
21
|
+
V1AccountNameUpdate,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
unknown
|
|
24
|
+
> = z.object({
|
|
25
|
+
name: HistoryValue$inboundSchema,
|
|
26
|
+
updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function v1AccountNameUpdateFromJSON(
|
|
30
|
+
jsonString: string,
|
|
31
|
+
): SafeParseResult<V1AccountNameUpdate, SDKValidationError> {
|
|
32
|
+
return safeParse(
|
|
33
|
+
jsonString,
|
|
34
|
+
(x) => V1AccountNameUpdate$inboundSchema.parse(JSON.parse(x)),
|
|
35
|
+
`Failed to parse 'V1AccountNameUpdate' from JSON`,
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import { HistoryValue, HistoryValue$inboundSchema } from "./historyvalue.js";
|
|
10
|
+
|
|
11
|
+
export type V1AccountVanityUpdate = {
|
|
12
|
+
/**
|
|
13
|
+
* The time the vanity was updated
|
|
14
|
+
*/
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
vanity: HistoryValue;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const V1AccountVanityUpdate$inboundSchema: z.ZodType<
|
|
21
|
+
V1AccountVanityUpdate,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
unknown
|
|
24
|
+
> = z.object({
|
|
25
|
+
updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
26
|
+
vanity: HistoryValue$inboundSchema,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function v1AccountVanityUpdateFromJSON(
|
|
30
|
+
jsonString: string,
|
|
31
|
+
): SafeParseResult<V1AccountVanityUpdate, SDKValidationError> {
|
|
32
|
+
return safeParse(
|
|
33
|
+
jsonString,
|
|
34
|
+
(x) => V1AccountVanityUpdate$inboundSchema.parse(JSON.parse(x)),
|
|
35
|
+
`Failed to parse 'V1AccountVanityUpdate' from JSON`,
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import { Connection, Connection$inboundSchema } from "./connection.js";
|
|
12
|
+
import { DeveloperApp, DeveloperApp$inboundSchema } from "./developerapp.js";
|
|
13
|
+
import { Resource, Resource$inboundSchema } from "./resource.js";
|
|
14
|
+
import { Role, Role$inboundSchema } from "./role.js";
|
|
15
|
+
import { Session, Session$inboundSchema } from "./session.js";
|
|
16
|
+
import {
|
|
17
|
+
V1AccountLocationUpdate,
|
|
18
|
+
V1AccountLocationUpdate$inboundSchema,
|
|
19
|
+
} from "./v1accountlocationupdate.js";
|
|
20
|
+
import {
|
|
21
|
+
V1AccountNameUpdate,
|
|
22
|
+
V1AccountNameUpdate$inboundSchema,
|
|
23
|
+
} from "./v1accountnameupdate.js";
|
|
24
|
+
import {
|
|
25
|
+
V1AccountVanityUpdate,
|
|
26
|
+
V1AccountVanityUpdate$inboundSchema,
|
|
27
|
+
} from "./v1accountvanityupdate.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The privacy of the account
|
|
31
|
+
*/
|
|
32
|
+
export const V1AdminGetAccountResponseBodyPrivacy = {
|
|
33
|
+
Private: "private",
|
|
34
|
+
Public: "public",
|
|
35
|
+
FriendsOnly: "friends_only",
|
|
36
|
+
} as const;
|
|
37
|
+
/**
|
|
38
|
+
* The privacy of the account
|
|
39
|
+
*/
|
|
40
|
+
export type V1AdminGetAccountResponseBodyPrivacy = ClosedEnum<
|
|
41
|
+
typeof V1AdminGetAccountResponseBodyPrivacy
|
|
42
|
+
>;
|
|
43
|
+
|
|
44
|
+
export type V1AdminGetAccountResponseBody = {
|
|
45
|
+
/**
|
|
46
|
+
* A URL to the JSON Schema for this object.
|
|
47
|
+
*/
|
|
48
|
+
dollarSchema?: string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* The avatar of the account
|
|
51
|
+
*/
|
|
52
|
+
avatar: string;
|
|
53
|
+
/**
|
|
54
|
+
* The city of the account
|
|
55
|
+
*/
|
|
56
|
+
city: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* The connections the account has
|
|
59
|
+
*/
|
|
60
|
+
connections: Array<Connection> | null;
|
|
61
|
+
/**
|
|
62
|
+
* The country code of the account
|
|
63
|
+
*/
|
|
64
|
+
country: string | null;
|
|
65
|
+
/**
|
|
66
|
+
* The developer apps the account has
|
|
67
|
+
*/
|
|
68
|
+
developerApps: Array<DeveloperApp> | null;
|
|
69
|
+
/**
|
|
70
|
+
* The email of the account
|
|
71
|
+
*/
|
|
72
|
+
email: string | null;
|
|
73
|
+
/**
|
|
74
|
+
* The location updates the account has
|
|
75
|
+
*/
|
|
76
|
+
locationUpdates: Array<V1AccountLocationUpdate> | null;
|
|
77
|
+
/**
|
|
78
|
+
* The name of the account
|
|
79
|
+
*/
|
|
80
|
+
name: string;
|
|
81
|
+
/**
|
|
82
|
+
* The name updates the account has
|
|
83
|
+
*/
|
|
84
|
+
nameUpdates: Array<V1AccountNameUpdate> | null;
|
|
85
|
+
/**
|
|
86
|
+
* The privacy of the account
|
|
87
|
+
*/
|
|
88
|
+
privacy: V1AdminGetAccountResponseBodyPrivacy;
|
|
89
|
+
/**
|
|
90
|
+
* The region of the account
|
|
91
|
+
*/
|
|
92
|
+
region: string | null;
|
|
93
|
+
/**
|
|
94
|
+
* The resources the account has (permissions)
|
|
95
|
+
*/
|
|
96
|
+
resources: Array<Resource> | null;
|
|
97
|
+
/**
|
|
98
|
+
* The roles the account has
|
|
99
|
+
*/
|
|
100
|
+
roles: Array<Role> | null;
|
|
101
|
+
/**
|
|
102
|
+
* The sessions the account has
|
|
103
|
+
*/
|
|
104
|
+
sessions: Array<Session> | null;
|
|
105
|
+
/**
|
|
106
|
+
* The state of the account
|
|
107
|
+
*/
|
|
108
|
+
state: string | null;
|
|
109
|
+
/**
|
|
110
|
+
* The vanity of the account
|
|
111
|
+
*/
|
|
112
|
+
vanity: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* The vanity updates the account has
|
|
115
|
+
*/
|
|
116
|
+
vanityUpdates: Array<V1AccountVanityUpdate> | null;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/** @internal */
|
|
120
|
+
export const V1AdminGetAccountResponseBodyPrivacy$inboundSchema:
|
|
121
|
+
z.ZodNativeEnum<typeof V1AdminGetAccountResponseBodyPrivacy> = z.nativeEnum(
|
|
122
|
+
V1AdminGetAccountResponseBodyPrivacy,
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
/** @internal */
|
|
126
|
+
export const V1AdminGetAccountResponseBody$inboundSchema: z.ZodType<
|
|
127
|
+
V1AdminGetAccountResponseBody,
|
|
128
|
+
z.ZodTypeDef,
|
|
129
|
+
unknown
|
|
130
|
+
> = z.object({
|
|
131
|
+
$schema: z.string().optional(),
|
|
132
|
+
avatar: z.string(),
|
|
133
|
+
city: z.nullable(z.string()),
|
|
134
|
+
connections: z.nullable(z.array(Connection$inboundSchema)),
|
|
135
|
+
country: z.nullable(z.string()),
|
|
136
|
+
developerApps: z.nullable(z.array(DeveloperApp$inboundSchema)),
|
|
137
|
+
email: z.nullable(z.string()),
|
|
138
|
+
locationUpdates: z.nullable(z.array(V1AccountLocationUpdate$inboundSchema)),
|
|
139
|
+
name: z.string(),
|
|
140
|
+
nameUpdates: z.nullable(z.array(V1AccountNameUpdate$inboundSchema)),
|
|
141
|
+
privacy: V1AdminGetAccountResponseBodyPrivacy$inboundSchema,
|
|
142
|
+
region: z.nullable(z.string()),
|
|
143
|
+
resources: z.nullable(z.array(Resource$inboundSchema)),
|
|
144
|
+
roles: z.nullable(z.array(Role$inboundSchema)),
|
|
145
|
+
sessions: z.nullable(z.array(Session$inboundSchema)),
|
|
146
|
+
state: z.nullable(z.string()),
|
|
147
|
+
vanity: z.nullable(z.string()),
|
|
148
|
+
vanityUpdates: z.nullable(z.array(V1AccountVanityUpdate$inboundSchema)),
|
|
149
|
+
}).transform((v) => {
|
|
150
|
+
return remap$(v, {
|
|
151
|
+
"$schema": "dollarSchema",
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
export function v1AdminGetAccountResponseBodyFromJSON(
|
|
156
|
+
jsonString: string,
|
|
157
|
+
): SafeParseResult<V1AdminGetAccountResponseBody, SDKValidationError> {
|
|
158
|
+
return safeParse(
|
|
159
|
+
jsonString,
|
|
160
|
+
(x) => V1AdminGetAccountResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
161
|
+
`Failed to parse 'V1AdminGetAccountResponseBody' from JSON`,
|
|
162
|
+
);
|
|
163
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type V1AdminRemoveVanityResponseBody = {
|
|
12
|
+
/**
|
|
13
|
+
* A URL to the JSON Schema for this object.
|
|
14
|
+
*/
|
|
15
|
+
dollarSchema?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const V1AdminRemoveVanityResponseBody$inboundSchema: z.ZodType<
|
|
20
|
+
V1AdminRemoveVanityResponseBody,
|
|
21
|
+
z.ZodTypeDef,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.object({
|
|
24
|
+
$schema: z.string().optional(),
|
|
25
|
+
}).transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
"$schema": "dollarSchema",
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export function v1AdminRemoveVanityResponseBodyFromJSON(
|
|
32
|
+
jsonString: string,
|
|
33
|
+
): SafeParseResult<V1AdminRemoveVanityResponseBody, SDKValidationError> {
|
|
34
|
+
return safeParse(
|
|
35
|
+
jsonString,
|
|
36
|
+
(x) => V1AdminRemoveVanityResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
37
|
+
`Failed to parse 'V1AdminRemoveVanityResponseBody' from JSON`,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import {
|
|
7
|
+
IDSearch,
|
|
8
|
+
IDSearch$Outbound,
|
|
9
|
+
IDSearch$outboundSchema,
|
|
10
|
+
} from "./idsearch.js";
|
|
11
|
+
import {
|
|
12
|
+
Resource,
|
|
13
|
+
Resource$Outbound,
|
|
14
|
+
Resource$outboundSchema,
|
|
15
|
+
} from "./resource.js";
|
|
16
|
+
import {
|
|
17
|
+
VanitySearch,
|
|
18
|
+
VanitySearch$Outbound,
|
|
19
|
+
VanitySearch$outboundSchema,
|
|
20
|
+
} from "./vanitysearch.js";
|
|
21
|
+
|
|
22
|
+
export type V1AdminUpdateResourcesRequestBody = {
|
|
23
|
+
id?: IDSearch | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* The resources to add for this account
|
|
26
|
+
*/
|
|
27
|
+
resources: Array<Resource> | null;
|
|
28
|
+
vanity?: VanitySearch | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type V1AdminUpdateResourcesRequestBody$Outbound = {
|
|
33
|
+
id?: IDSearch$Outbound | undefined;
|
|
34
|
+
resources: Array<Resource$Outbound> | null;
|
|
35
|
+
vanity?: VanitySearch$Outbound | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const V1AdminUpdateResourcesRequestBody$outboundSchema: z.ZodType<
|
|
40
|
+
V1AdminUpdateResourcesRequestBody$Outbound,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
V1AdminUpdateResourcesRequestBody
|
|
43
|
+
> = z.object({
|
|
44
|
+
id: IDSearch$outboundSchema.optional(),
|
|
45
|
+
resources: z.nullable(z.array(Resource$outboundSchema)),
|
|
46
|
+
vanity: VanitySearch$outboundSchema.optional(),
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export function v1AdminUpdateResourcesRequestBodyToJSON(
|
|
50
|
+
v1AdminUpdateResourcesRequestBody: V1AdminUpdateResourcesRequestBody,
|
|
51
|
+
): string {
|
|
52
|
+
return JSON.stringify(
|
|
53
|
+
V1AdminUpdateResourcesRequestBody$outboundSchema.parse(
|
|
54
|
+
v1AdminUpdateResourcesRequestBody,
|
|
55
|
+
),
|
|
56
|
+
);
|
|
57
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
import {
|
|
8
|
+
IDSearch,
|
|
9
|
+
IDSearch$Outbound,
|
|
10
|
+
IDSearch$outboundSchema,
|
|
11
|
+
} from "./idsearch.js";
|
|
12
|
+
import {
|
|
13
|
+
VanitySearch,
|
|
14
|
+
VanitySearch$Outbound,
|
|
15
|
+
VanitySearch$outboundSchema,
|
|
16
|
+
} from "./vanitysearch.js";
|
|
17
|
+
|
|
18
|
+
export const Roles = {
|
|
19
|
+
User: "user",
|
|
20
|
+
Donator: "donator",
|
|
21
|
+
Staff: "staff",
|
|
22
|
+
Developer: "developer",
|
|
23
|
+
Partner: "partner",
|
|
24
|
+
Owner: "owner",
|
|
25
|
+
Amethyst: "amethyst",
|
|
26
|
+
Amber: "amber",
|
|
27
|
+
Emerald: "emerald",
|
|
28
|
+
Sapphire: "sapphire",
|
|
29
|
+
Ruby: "ruby",
|
|
30
|
+
Diamond: "diamond",
|
|
31
|
+
Contributor: "contributor",
|
|
32
|
+
EarlySupporter: "early_supporter",
|
|
33
|
+
Beta: "beta",
|
|
34
|
+
Translator: "translator",
|
|
35
|
+
Top100: "top_100",
|
|
36
|
+
BadgeScout: "badge_scout",
|
|
37
|
+
NitroBooster: "nitro_booster",
|
|
38
|
+
Astral: "astral",
|
|
39
|
+
Nebula: "nebula",
|
|
40
|
+
} as const;
|
|
41
|
+
export type Roles = ClosedEnum<typeof Roles>;
|
|
42
|
+
|
|
43
|
+
export type V1AdminUpdateRolesRequestBody = {
|
|
44
|
+
id?: IDSearch | undefined;
|
|
45
|
+
roles: Array<Roles> | null;
|
|
46
|
+
vanity?: VanitySearch | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const Roles$outboundSchema: z.ZodNativeEnum<typeof Roles> = z.nativeEnum(
|
|
51
|
+
Roles,
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export type V1AdminUpdateRolesRequestBody$Outbound = {
|
|
56
|
+
id?: IDSearch$Outbound | undefined;
|
|
57
|
+
roles: Array<string> | null;
|
|
58
|
+
vanity?: VanitySearch$Outbound | undefined;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const V1AdminUpdateRolesRequestBody$outboundSchema: z.ZodType<
|
|
63
|
+
V1AdminUpdateRolesRequestBody$Outbound,
|
|
64
|
+
z.ZodTypeDef,
|
|
65
|
+
V1AdminUpdateRolesRequestBody
|
|
66
|
+
> = z.object({
|
|
67
|
+
id: IDSearch$outboundSchema.optional(),
|
|
68
|
+
roles: z.nullable(z.array(Roles$outboundSchema)),
|
|
69
|
+
vanity: VanitySearch$outboundSchema.optional(),
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export function v1AdminUpdateRolesRequestBodyToJSON(
|
|
73
|
+
v1AdminUpdateRolesRequestBody: V1AdminUpdateRolesRequestBody,
|
|
74
|
+
): string {
|
|
75
|
+
return JSON.stringify(
|
|
76
|
+
V1AdminUpdateRolesRequestBody$outboundSchema.parse(
|
|
77
|
+
v1AdminUpdateRolesRequestBody,
|
|
78
|
+
),
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type AdminGetAccountResponse = {
|
|
13
|
+
httpMeta: components.HTTPMetadata;
|
|
14
|
+
/**
|
|
15
|
+
* OK
|
|
16
|
+
*/
|
|
17
|
+
v1AdminGetAccountResponseBody?:
|
|
18
|
+
| components.V1AdminGetAccountResponseBody
|
|
19
|
+
| undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const AdminGetAccountResponse$inboundSchema: z.ZodType<
|
|
24
|
+
AdminGetAccountResponse,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
29
|
+
V1AdminGetAccountResponseBody: components
|
|
30
|
+
.V1AdminGetAccountResponseBody$inboundSchema.optional(),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"HttpMeta": "httpMeta",
|
|
34
|
+
"V1AdminGetAccountResponseBody": "v1AdminGetAccountResponseBody",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export function adminGetAccountResponseFromJSON(
|
|
39
|
+
jsonString: string,
|
|
40
|
+
): SafeParseResult<AdminGetAccountResponse, SDKValidationError> {
|
|
41
|
+
return safeParse(
|
|
42
|
+
jsonString,
|
|
43
|
+
(x) => AdminGetAccountResponse$inboundSchema.parse(JSON.parse(x)),
|
|
44
|
+
`Failed to parse 'AdminGetAccountResponse' from JSON`,
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type AdminRemoveVanityResponse = {
|
|
13
|
+
httpMeta: components.HTTPMetadata;
|
|
14
|
+
/**
|
|
15
|
+
* OK
|
|
16
|
+
*/
|
|
17
|
+
v1AdminRemoveVanityResponseBody?:
|
|
18
|
+
| components.V1AdminRemoveVanityResponseBody
|
|
19
|
+
| undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const AdminRemoveVanityResponse$inboundSchema: z.ZodType<
|
|
24
|
+
AdminRemoveVanityResponse,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
29
|
+
V1AdminRemoveVanityResponseBody: components
|
|
30
|
+
.V1AdminRemoveVanityResponseBody$inboundSchema.optional(),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"HttpMeta": "httpMeta",
|
|
34
|
+
"V1AdminRemoveVanityResponseBody": "v1AdminRemoveVanityResponseBody",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export function adminRemoveVanityResponseFromJSON(
|
|
39
|
+
jsonString: string,
|
|
40
|
+
): SafeParseResult<AdminRemoveVanityResponse, SDKValidationError> {
|
|
41
|
+
return safeParse(
|
|
42
|
+
jsonString,
|
|
43
|
+
(x) => AdminRemoveVanityResponse$inboundSchema.parse(JSON.parse(x)),
|
|
44
|
+
`Failed to parse 'AdminRemoveVanityResponse' from JSON`,
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type AdminUpdateResourcesResponse = {
|
|
13
|
+
httpMeta: components.HTTPMetadata;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const AdminUpdateResourcesResponse$inboundSchema: z.ZodType<
|
|
18
|
+
AdminUpdateResourcesResponse,
|
|
19
|
+
z.ZodTypeDef,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.object({
|
|
22
|
+
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
23
|
+
}).transform((v) => {
|
|
24
|
+
return remap$(v, {
|
|
25
|
+
"HttpMeta": "httpMeta",
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function adminUpdateResourcesResponseFromJSON(
|
|
30
|
+
jsonString: string,
|
|
31
|
+
): SafeParseResult<AdminUpdateResourcesResponse, SDKValidationError> {
|
|
32
|
+
return safeParse(
|
|
33
|
+
jsonString,
|
|
34
|
+
(x) => AdminUpdateResourcesResponse$inboundSchema.parse(JSON.parse(x)),
|
|
35
|
+
`Failed to parse 'AdminUpdateResourcesResponse' from JSON`,
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type AdminUpdateRolesResponse = {
|
|
13
|
+
httpMeta: components.HTTPMetadata;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const AdminUpdateRolesResponse$inboundSchema: z.ZodType<
|
|
18
|
+
AdminUpdateRolesResponse,
|
|
19
|
+
z.ZodTypeDef,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.object({
|
|
22
|
+
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
23
|
+
}).transform((v) => {
|
|
24
|
+
return remap$(v, {
|
|
25
|
+
"HttpMeta": "httpMeta",
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function adminUpdateRolesResponseFromJSON(
|
|
30
|
+
jsonString: string,
|
|
31
|
+
): SafeParseResult<AdminUpdateRolesResponse, SDKValidationError> {
|
|
32
|
+
return safeParse(
|
|
33
|
+
jsonString,
|
|
34
|
+
(x) => AdminUpdateRolesResponse$inboundSchema.parse(JSON.parse(x)),
|
|
35
|
+
`Failed to parse 'AdminUpdateRolesResponse' from JSON`,
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -40,6 +40,10 @@ export * from "./accountupdatevanity.js";
|
|
|
40
40
|
export * from "./accountuploadimages.js";
|
|
41
41
|
export * from "./accountverifyconnection.js";
|
|
42
42
|
export * from "./accountverifyemail.js";
|
|
43
|
+
export * from "./admingetaccount.js";
|
|
44
|
+
export * from "./adminremovevanity.js";
|
|
45
|
+
export * from "./adminupdateresources.js";
|
|
46
|
+
export * from "./adminupdateroles.js";
|
|
43
47
|
export * from "./applistbadges.js";
|
|
44
48
|
export * from "./badgelisttags.js";
|
|
45
49
|
export * from "./badgesearchbadges.js";
|