@greensecurity/javascript-sdk 0.44.0-beta.24 → 0.44.0-beta.25
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/commonjs/__tests__/users.test.js +3 -1
- package/dist/commonjs/__tests__/users.test.js.map +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +3 -32
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/usersGetLinkedUsers.d.ts +6 -4
- package/dist/commonjs/funcs/usersGetLinkedUsers.d.ts.map +1 -1
- package/dist/commonjs/funcs/usersGetLinkedUsers.js +6 -4
- package/dist/commonjs/funcs/usersGetLinkedUsers.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/retries.js +7 -0
- package/dist/commonjs/lib/retries.js.map +1 -1
- package/dist/commonjs/models/operations/getlinkedusers.d.ts +8 -3
- package/dist/commonjs/models/operations/getlinkedusers.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getlinkedusers.js +1 -1
- package/dist/commonjs/models/operations/getlinkedusers.js.map +1 -1
- package/dist/commonjs/react-query/usersGetLinkedUsers.core.d.ts +1 -1
- package/dist/commonjs/react-query/usersGetLinkedUsers.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/usersGetLinkedUsers.core.js.map +1 -1
- package/dist/commonjs/react-query/usersGetLinkedUsers.d.ts +14 -10
- package/dist/commonjs/react-query/usersGetLinkedUsers.d.ts.map +1 -1
- package/dist/commonjs/react-query/usersGetLinkedUsers.js +12 -8
- package/dist/commonjs/react-query/usersGetLinkedUsers.js.map +1 -1
- package/dist/commonjs/sdk/users.d.ts +6 -4
- package/dist/commonjs/sdk/users.d.ts.map +1 -1
- package/dist/commonjs/sdk/users.js +6 -4
- package/dist/commonjs/sdk/users.js.map +1 -1
- package/dist/esm/__tests__/users.test.js +3 -1
- package/dist/esm/__tests__/users.test.js.map +1 -1
- package/dist/esm/__tests__/webhooks.test.js +1 -1
- package/dist/esm/__tests__/webhooks.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +3 -32
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/usersGetLinkedUsers.d.ts +6 -4
- package/dist/esm/funcs/usersGetLinkedUsers.d.ts.map +1 -1
- package/dist/esm/funcs/usersGetLinkedUsers.js +6 -4
- package/dist/esm/funcs/usersGetLinkedUsers.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/retries.js +7 -0
- package/dist/esm/lib/retries.js.map +1 -1
- package/dist/esm/models/operations/getlinkedusers.d.ts +8 -3
- package/dist/esm/models/operations/getlinkedusers.d.ts.map +1 -1
- package/dist/esm/models/operations/getlinkedusers.js +1 -1
- package/dist/esm/models/operations/getlinkedusers.js.map +1 -1
- package/dist/esm/react-query/usersGetLinkedUsers.core.d.ts +1 -1
- package/dist/esm/react-query/usersGetLinkedUsers.core.d.ts.map +1 -1
- package/dist/esm/react-query/usersGetLinkedUsers.core.js.map +1 -1
- package/dist/esm/react-query/usersGetLinkedUsers.d.ts +14 -10
- package/dist/esm/react-query/usersGetLinkedUsers.d.ts.map +1 -1
- package/dist/esm/react-query/usersGetLinkedUsers.js +12 -8
- package/dist/esm/react-query/usersGetLinkedUsers.js.map +1 -1
- package/dist/esm/sdk/users.d.ts +6 -4
- package/dist/esm/sdk/users.d.ts.map +1 -1
- package/dist/esm/sdk/users.js +6 -4
- package/dist/esm/sdk/users.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/users.test.ts +3 -1
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/__tests__/zones.test.ts +3 -32
- package/src/funcs/usersGetLinkedUsers.ts +6 -4
- package/src/lib/config.ts +3 -3
- package/src/lib/retries.ts +8 -0
- package/src/models/operations/getlinkedusers.ts +9 -4
- package/src/react-query/usersGetLinkedUsers.core.ts +1 -1
- package/src/react-query/usersGetLinkedUsers.ts +14 -10
- package/src/sdk/users.ts +6 -4
|
@@ -11,9 +11,14 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
11
11
|
|
|
12
12
|
export type GetLinkedUsersRequest = {
|
|
13
13
|
/**
|
|
14
|
-
* The
|
|
14
|
+
* The user to fetch linked users for. Pass `me` for the authenticated user
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* (allowed for any user type), or a positive numeric user ID. A numeric ID is
|
|
18
|
+
* only honored for API users with an active app activation for that user;
|
|
19
|
+
* non-API users must pass `me`.
|
|
15
20
|
*/
|
|
16
|
-
userId
|
|
21
|
+
userId: string;
|
|
17
22
|
};
|
|
18
23
|
|
|
19
24
|
export type LinkedUsers = {
|
|
@@ -33,7 +38,7 @@ export type GetLinkedUsersGetLinkedUsersOk = {
|
|
|
33
38
|
|
|
34
39
|
/** @internal */
|
|
35
40
|
export type GetLinkedUsersRequest$Outbound = {
|
|
36
|
-
user_id
|
|
41
|
+
user_id: string;
|
|
37
42
|
};
|
|
38
43
|
|
|
39
44
|
/** @internal */
|
|
@@ -42,7 +47,7 @@ export const GetLinkedUsersRequest$outboundSchema: z.ZodType<
|
|
|
42
47
|
z.ZodTypeDef,
|
|
43
48
|
GetLinkedUsersRequest
|
|
44
49
|
> = z.object({
|
|
45
|
-
userId: z.
|
|
50
|
+
userId: z.string(),
|
|
46
51
|
}).transform((v) => {
|
|
47
52
|
return remap$(v, {
|
|
48
53
|
userId: "user_id",
|
|
@@ -56,12 +56,14 @@ export type UsersGetLinkedUsersQueryError =
|
|
|
56
56
|
* Get linked users
|
|
57
57
|
*
|
|
58
58
|
* @remarks
|
|
59
|
-
* Returns a list of users linked to the
|
|
59
|
+
* Returns a list of users linked to the requested user.
|
|
60
60
|
*
|
|
61
|
-
*
|
|
61
|
+
* Pass `user_id=me` to fetch the linked users of the authenticated user. This
|
|
62
|
+
* is allowed for any authenticated user type.
|
|
62
63
|
*
|
|
63
|
-
*
|
|
64
|
-
* have an active app activation for
|
|
64
|
+
* API users may additionally pass a numeric `user_id` to fetch another user's
|
|
65
|
+
* linked users, provided they have an active app activation for that user.
|
|
66
|
+
* Non-API users may only pass `me`.
|
|
65
67
|
*/
|
|
66
68
|
export function useUsersGetLinkedUsers(
|
|
67
69
|
request: operations.GetLinkedUsersRequest,
|
|
@@ -85,12 +87,14 @@ export function useUsersGetLinkedUsers(
|
|
|
85
87
|
* Get linked users
|
|
86
88
|
*
|
|
87
89
|
* @remarks
|
|
88
|
-
* Returns a list of users linked to the
|
|
90
|
+
* Returns a list of users linked to the requested user.
|
|
89
91
|
*
|
|
90
|
-
*
|
|
92
|
+
* Pass `user_id=me` to fetch the linked users of the authenticated user. This
|
|
93
|
+
* is allowed for any authenticated user type.
|
|
91
94
|
*
|
|
92
|
-
*
|
|
93
|
-
* have an active app activation for
|
|
95
|
+
* API users may additionally pass a numeric `user_id` to fetch another user's
|
|
96
|
+
* linked users, provided they have an active app activation for that user.
|
|
97
|
+
* Non-API users may only pass `me`.
|
|
94
98
|
*/
|
|
95
99
|
export function useUsersGetLinkedUsersSuspense(
|
|
96
100
|
request: operations.GetLinkedUsersRequest,
|
|
@@ -115,7 +119,7 @@ export function useUsersGetLinkedUsersSuspense(
|
|
|
115
119
|
|
|
116
120
|
export function setUsersGetLinkedUsersData(
|
|
117
121
|
client: QueryClient,
|
|
118
|
-
queryKeyBase: [parameters: { userId
|
|
122
|
+
queryKeyBase: [parameters: { userId: string }],
|
|
119
123
|
data: UsersGetLinkedUsersQueryData,
|
|
120
124
|
): UsersGetLinkedUsersQueryData | undefined {
|
|
121
125
|
const key = queryKeyUsersGetLinkedUsers(...queryKeyBase);
|
|
@@ -125,7 +129,7 @@ export function setUsersGetLinkedUsersData(
|
|
|
125
129
|
|
|
126
130
|
export function invalidateUsersGetLinkedUsers(
|
|
127
131
|
client: QueryClient,
|
|
128
|
-
queryKeyBase: TupleToPrefixes<[parameters: { userId
|
|
132
|
+
queryKeyBase: TupleToPrefixes<[parameters: { userId: string }]>,
|
|
129
133
|
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
130
134
|
): Promise<void> {
|
|
131
135
|
return client.invalidateQueries({
|
package/src/sdk/users.ts
CHANGED
|
@@ -173,12 +173,14 @@ export class Users extends ClientSDK {
|
|
|
173
173
|
* Get linked users
|
|
174
174
|
*
|
|
175
175
|
* @remarks
|
|
176
|
-
* Returns a list of users linked to the
|
|
176
|
+
* Returns a list of users linked to the requested user.
|
|
177
177
|
*
|
|
178
|
-
*
|
|
178
|
+
* Pass `user_id=me` to fetch the linked users of the authenticated user. This
|
|
179
|
+
* is allowed for any authenticated user type.
|
|
179
180
|
*
|
|
180
|
-
*
|
|
181
|
-
* have an active app activation for
|
|
181
|
+
* API users may additionally pass a numeric `user_id` to fetch another user's
|
|
182
|
+
* linked users, provided they have an active app activation for that user.
|
|
183
|
+
* Non-API users may only pass `me`.
|
|
182
184
|
*/
|
|
183
185
|
async getLinkedUsers(
|
|
184
186
|
request: operations.GetLinkedUsersRequest,
|