@stackframe/stack-shared 2.5.32 → 2.5.33
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/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { CrudTypeOf } from "../../crud";
|
|
2
|
-
export declare const teamMembershipsCrudClientReadSchema: import("yup").ObjectSchema<{
|
|
2
|
+
export declare const teamMembershipsCrudClientReadSchema: import("yup").ObjectSchema<{
|
|
3
|
+
team_id: string;
|
|
4
|
+
user_id: string;
|
|
5
|
+
}, import("yup").AnyObject, {
|
|
6
|
+
team_id: undefined;
|
|
7
|
+
user_id: undefined;
|
|
8
|
+
}, "">;
|
|
3
9
|
export declare const teamMembershipsCrudServerCreateSchema: import("yup").ObjectSchema<{}, import("yup").AnyObject, {}, "">;
|
|
4
10
|
export declare const teamMembershipsCrudClientDeleteSchema: import("yup").MixedSchema<{} | undefined, import("yup").AnyObject, undefined, "">;
|
|
5
11
|
export declare const teamMembershipsCrud: import("../../crud").CrudSchemaFromOptions<{
|
|
6
|
-
clientReadSchema: import("yup").ObjectSchema<{
|
|
12
|
+
clientReadSchema: import("yup").ObjectSchema<{
|
|
13
|
+
team_id: string;
|
|
14
|
+
user_id: string;
|
|
15
|
+
}, import("yup").AnyObject, {
|
|
16
|
+
team_id: undefined;
|
|
17
|
+
user_id: undefined;
|
|
18
|
+
}, "">;
|
|
7
19
|
clientDeleteSchema: import("yup").MixedSchema<{} | undefined, import("yup").AnyObject, undefined, "">;
|
|
8
20
|
serverCreateSchema: import("yup").ObjectSchema<{}, import("yup").AnyObject, {}, "">;
|
|
9
21
|
docs: {
|
|
@@ -25,3 +37,33 @@ export declare const teamMembershipsCrud: import("../../crud").CrudSchemaFromOpt
|
|
|
25
37
|
};
|
|
26
38
|
}>;
|
|
27
39
|
export type TeamMembershipsCrud = CrudTypeOf<typeof teamMembershipsCrud>;
|
|
40
|
+
export declare const teamMembershipCreatedWebhookEvent: {
|
|
41
|
+
type: string;
|
|
42
|
+
schema: import("yup").ObjectSchema<{
|
|
43
|
+
team_id: string;
|
|
44
|
+
user_id: string;
|
|
45
|
+
}, import("yup").AnyObject, {
|
|
46
|
+
team_id: undefined;
|
|
47
|
+
user_id: undefined;
|
|
48
|
+
}, "">;
|
|
49
|
+
metadata: {
|
|
50
|
+
summary: string;
|
|
51
|
+
description: string;
|
|
52
|
+
tags: string[];
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export declare const teamMembershipDeletedWebhookEvent: {
|
|
56
|
+
type: string;
|
|
57
|
+
schema: import("yup").ObjectSchema<{
|
|
58
|
+
team_id: string;
|
|
59
|
+
user_id: string;
|
|
60
|
+
}, import("yup").AnyObject, {
|
|
61
|
+
team_id: undefined;
|
|
62
|
+
user_id: undefined;
|
|
63
|
+
}, "">;
|
|
64
|
+
metadata: {
|
|
65
|
+
summary: string;
|
|
66
|
+
description: string;
|
|
67
|
+
tags: string[];
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { createCrud } from "../../crud";
|
|
2
|
-
import { yupMixed, yupObject } from "../../schema-fields";
|
|
3
|
-
export const teamMembershipsCrudClientReadSchema = yupObject({
|
|
2
|
+
import { yupMixed, yupObject, yupString } from "../../schema-fields";
|
|
3
|
+
export const teamMembershipsCrudClientReadSchema = yupObject({
|
|
4
|
+
team_id: yupString().required(),
|
|
5
|
+
user_id: yupString().required(),
|
|
6
|
+
}).required();
|
|
4
7
|
export const teamMembershipsCrudServerCreateSchema = yupObject({}).required();
|
|
5
8
|
export const teamMembershipsCrudClientDeleteSchema = yupMixed();
|
|
6
9
|
export const teamMembershipsCrud = createCrud({
|
|
@@ -27,3 +30,21 @@ export const teamMembershipsCrud = createCrud({
|
|
|
27
30
|
},
|
|
28
31
|
},
|
|
29
32
|
});
|
|
33
|
+
export const teamMembershipCreatedWebhookEvent = {
|
|
34
|
+
type: "team_membership.created",
|
|
35
|
+
schema: teamMembershipsCrud.server.readSchema,
|
|
36
|
+
metadata: {
|
|
37
|
+
summary: "Team Membership Created",
|
|
38
|
+
description: "This event is triggered when a user is added to a team.",
|
|
39
|
+
tags: ["Teams"],
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export const teamMembershipDeletedWebhookEvent = {
|
|
43
|
+
type: "team_membership.deleted",
|
|
44
|
+
schema: teamMembershipsCrud.server.readSchema,
|
|
45
|
+
metadata: {
|
|
46
|
+
summary: "Team Membership Deleted",
|
|
47
|
+
description: "This event is triggered when a user is removed from a team.",
|
|
48
|
+
tags: ["Teams"],
|
|
49
|
+
},
|
|
50
|
+
};
|
|
@@ -260,4 +260,32 @@ export declare const webhookEvents: readonly [{
|
|
|
260
260
|
description: string;
|
|
261
261
|
tags: string[];
|
|
262
262
|
};
|
|
263
|
+
}, {
|
|
264
|
+
type: string;
|
|
265
|
+
schema: yup.ObjectSchema<{
|
|
266
|
+
team_id: string;
|
|
267
|
+
user_id: string;
|
|
268
|
+
}, yup.AnyObject, {
|
|
269
|
+
team_id: undefined;
|
|
270
|
+
user_id: undefined;
|
|
271
|
+
}, "">;
|
|
272
|
+
metadata: {
|
|
273
|
+
summary: string;
|
|
274
|
+
description: string;
|
|
275
|
+
tags: string[];
|
|
276
|
+
};
|
|
277
|
+
}, {
|
|
278
|
+
type: string;
|
|
279
|
+
schema: yup.ObjectSchema<{
|
|
280
|
+
team_id: string;
|
|
281
|
+
user_id: string;
|
|
282
|
+
}, yup.AnyObject, {
|
|
283
|
+
team_id: undefined;
|
|
284
|
+
user_id: undefined;
|
|
285
|
+
}, "">;
|
|
286
|
+
metadata: {
|
|
287
|
+
summary: string;
|
|
288
|
+
description: string;
|
|
289
|
+
tags: string[];
|
|
290
|
+
};
|
|
263
291
|
}];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { teamMembershipCreatedWebhookEvent, teamMembershipDeletedWebhookEvent } from "./crud/team-memberships";
|
|
1
2
|
import { teamCreatedWebhookEvent, teamDeletedWebhookEvent, teamUpdatedWebhookEvent } from "./crud/teams";
|
|
2
3
|
import { userCreatedWebhookEvent, userDeletedWebhookEvent, userUpdatedWebhookEvent } from "./crud/users";
|
|
3
4
|
export const webhookEvents = [
|
|
@@ -7,4 +8,6 @@ export const webhookEvents = [
|
|
|
7
8
|
teamCreatedWebhookEvent,
|
|
8
9
|
teamUpdatedWebhookEvent,
|
|
9
10
|
teamDeletedWebhookEvent,
|
|
11
|
+
teamMembershipCreatedWebhookEvent,
|
|
12
|
+
teamMembershipDeletedWebhookEvent,
|
|
10
13
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackframe/stack-shared",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.33",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"jose": "^5.2.2",
|
|
38
38
|
"oauth4webapi": "^2.10.3",
|
|
39
39
|
"uuid": "^9.0.1",
|
|
40
|
-
"@stackframe/stack-sc": "2.5.
|
|
40
|
+
"@stackframe/stack-sc": "2.5.33"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/bcrypt": "^5.0.2",
|