@stackframe/stack-shared 2.6.20 → 2.6.21

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,5 +1,13 @@
1
1
  # @stackframe/stack-shared
2
2
 
3
+ ## 2.6.21
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed inviteUser
8
+ - Updated dependencies
9
+ - @stackframe/stack-sc@2.6.21
10
+
3
11
  ## 2.6.20
4
12
 
5
13
  ### Patch Changes
@@ -90,7 +90,7 @@ export declare class StackClientInterface {
90
90
  email: string;
91
91
  teamId: string;
92
92
  callbackUrl: string;
93
- session: InternalSession | null;
93
+ session: InternalSession;
94
94
  }): Promise<void>;
95
95
  acceptTeamInvitation<T extends 'use' | 'details' | 'check'>(options: {
96
96
  code: string;
@@ -90,4 +90,9 @@ export declare class StackServerInterface extends StackClientInterface {
90
90
  deleteServerContactChannel(userId: string, contactChannelId: string): Promise<void>;
91
91
  listServerContactChannels(userId: string): Promise<ContactChannelsCrud['Server']['Read'][]>;
92
92
  sendServerContactChannelVerificationEmail(userId: string, contactChannelId: string, callbackUrl: string): Promise<void>;
93
+ sendServerTeamInvitation(options: {
94
+ email: string;
95
+ teamId: string;
96
+ callbackUrl: string;
97
+ }): Promise<void>;
93
98
  }
@@ -276,4 +276,17 @@ export class StackServerInterface extends StackClientInterface {
276
276
  body: JSON.stringify({ callback_url: callbackUrl }),
277
277
  }, null);
278
278
  }
279
+ async sendServerTeamInvitation(options) {
280
+ await this.sendServerRequest("/team-invitations/send-code", {
281
+ method: "POST",
282
+ headers: {
283
+ "Content-Type": "application/json"
284
+ },
285
+ body: JSON.stringify({
286
+ email: options.email,
287
+ team_id: options.teamId,
288
+ callback_url: options.callbackUrl,
289
+ }),
290
+ }, null);
291
+ }
279
292
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackframe/stack-shared",
3
- "version": "2.6.20",
3
+ "version": "2.6.21",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -49,7 +49,7 @@
49
49
  "oauth4webapi": "^2.10.3",
50
50
  "semver": "^7.6.3",
51
51
  "uuid": "^9.0.1",
52
- "@stackframe/stack-sc": "2.6.20"
52
+ "@stackframe/stack-sc": "2.6.21"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@simplewebauthn/types": "^11.0.0",