@hexclave/next 1.0.29 → 1.0.32
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/components-page/oauth-callback.d.ts.map +1 -1
- package/dist/components-page/oauth-callback.js +2 -0
- package/dist/components-page/oauth-callback.js.map +1 -1
- package/dist/components-page/oauth-callback.test.js +3 -1
- package/dist/components-page/oauth-callback.test.js.map +1 -1
- package/dist/esm/components-page/oauth-callback.d.ts.map +1 -1
- package/dist/esm/components-page/oauth-callback.js +2 -0
- package/dist/esm/components-page/oauth-callback.js.map +1 -1
- package/dist/esm/components-page/oauth-callback.test.js +3 -1
- package/dist/esm/components-page/oauth-callback.test.js.map +1 -1
- package/dist/esm/generated/quetzal-translations.d.ts +2 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js +4 -8
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/common.js +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +15 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.js +30 -15
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js +8 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/server-app.d.ts +13 -0
- package/dist/esm/lib/hexclave-app/apps/interfaces/server-app.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/server-app.js.map +1 -1
- package/dist/esm/lib/hexclave-app/teams/index.d.ts +4 -0
- package/dist/esm/lib/hexclave-app/teams/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/teams/index.js.map +1 -1
- package/dist/generated/quetzal-translations.d.ts +2 -2
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +1 -0
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js +4 -8
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/common.js +1 -1
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +15 -1
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.js +30 -15
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/session-replay.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/session-replay.js +8 -1
- package/dist/lib/hexclave-app/apps/implementations/session-replay.js.map +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -0
- package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/server-app.d.ts +13 -0
- package/dist/lib/hexclave-app/apps/interfaces/server-app.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/server-app.js.map +1 -1
- package/dist/lib/hexclave-app/teams/index.d.ts +4 -0
- package/dist/lib/hexclave-app/teams/index.d.ts.map +1 -1
- package/dist/lib/hexclave-app/teams/index.js.map +1 -1
- package/package.json +4 -4
- package/src/components-page/oauth-callback.test.tsx +4 -0
- package/src/components-page/oauth-callback.tsx +6 -0
- package/src/lib/hexclave-app/apps/implementations/client-app-impl.ts +3 -5
- package/src/lib/hexclave-app/apps/implementations/server-app-impl.ts +35 -19
- package/src/lib/hexclave-app/apps/implementations/session-replay.ts +16 -1
- package/src/lib/hexclave-app/apps/interfaces/client-app.ts +1 -0
- package/src/lib/hexclave-app/apps/interfaces/server-app.ts +5 -0
- package/src/lib/hexclave-app/teams/index.ts +4 -0
|
@@ -14,7 +14,7 @@ import { envVars } from "../../../../generated/env.js";
|
|
|
14
14
|
import { resolveHandlerUrls } from "../../url-targets.js";
|
|
15
15
|
|
|
16
16
|
//#region src/lib/hexclave-app/apps/implementations/common.ts
|
|
17
|
-
const clientVersion = "js @hexclave/next@1.0.
|
|
17
|
+
const clientVersion = "js @hexclave/next@1.0.32";
|
|
18
18
|
if (clientVersion.startsWith("STACK_COMPILE_TIME")) throw new HexclaveAssertionError("Client version was not replaced. Something went wrong during build!");
|
|
19
19
|
const replaceHexclavePortPrefix = (input) => {
|
|
20
20
|
if (!input) return input;
|
|
@@ -70,7 +70,7 @@ declare class _HexclaveServerAppImplIncomplete<HasTokenStore extends boolean, Pr
|
|
|
70
70
|
protected _serverNotificationCategoryFromCrud(userId: string, crud: NotificationPreferenceCrud['Server']['Read']): NotificationCategory;
|
|
71
71
|
protected _serverOAuthProviderFromCrud(crud: OAuthProviderCrud['Server']['Read']): {
|
|
72
72
|
id: string;
|
|
73
|
-
type: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "
|
|
73
|
+
type: "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "twitch";
|
|
74
74
|
userId: string;
|
|
75
75
|
accountId: string;
|
|
76
76
|
email: string | undefined;
|
|
@@ -197,6 +197,7 @@ declare class _HexclaveServerAppImplIncomplete<HasTokenStore extends boolean, Pr
|
|
|
197
197
|
itemId: string;
|
|
198
198
|
customCustomerId: string;
|
|
199
199
|
}): ServerItem;
|
|
200
|
+
private _resolveCustomer;
|
|
200
201
|
grantProduct(options: (({
|
|
201
202
|
userId: string;
|
|
202
203
|
} | {
|
|
@@ -210,6 +211,19 @@ declare class _HexclaveServerAppImplIncomplete<HasTokenStore extends boolean, Pr
|
|
|
210
211
|
}) & {
|
|
211
212
|
quantity?: number;
|
|
212
213
|
})): Promise<void>;
|
|
214
|
+
createCheckoutUrl(options: (({
|
|
215
|
+
userId: string;
|
|
216
|
+
} | {
|
|
217
|
+
teamId: string;
|
|
218
|
+
} | {
|
|
219
|
+
customCustomerId: string;
|
|
220
|
+
}) & ({
|
|
221
|
+
productId: string;
|
|
222
|
+
} | {
|
|
223
|
+
product: InlineProduct;
|
|
224
|
+
}) & {
|
|
225
|
+
returnUrl?: string;
|
|
226
|
+
})): Promise<string>;
|
|
213
227
|
createTeam(data: ServerTeamCreateOptions): Promise<ServerTeam>;
|
|
214
228
|
listTeams(options?: ServerListTeamsOptions): Promise<ServerTeam[] & {
|
|
215
229
|
nextCursor: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-app-impl.d.ts","names":[],"sources":["../../../../../../src/lib/hexclave-app/apps/implementations/server-app-impl.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6Ca,gCAAA,kEAAkG,gCAAA,CAAiC,aAAA,EAAe,SAAA;EAAA,UAC3I,UAAA,EAAY,uBAAA;EAAA,iBAGb,uBAAA;EAAA,iBAOA,iBAAA;EAAA,
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A;EAAA,IAAmB,UAAA;EACtC,OAAA,CAAQ,MAAA,WAAiB,UAAA;EAAA,UAaf,2BAAA,CAA4B,EAAA,WAAa,cAAA;EAqB7C,iBAAA,CAAkB,EAAA,WAAa,OAAA,CAAQ,cAAA;EAI7C,iBAAA,CAAkB,EAAA,WAAa,cAAA;EAIzB,SAAA,CAAU,OAAA,EAAS,gBAAA,GAAmB,OAAA;EAKtC,qBAAA,CAAA,GAAyB,OAAA,CAAQ,iBAAA;EAIvC,qBAAA,CAAA,GAAyB,iBAAA;EAInB,0BAAA,CAAA,GAA8B,OAAA;EAAA,UAMX,eAAA,CAAgB,OAAA,EAAS,eAAA,GAAe,OAAA;EAAA,UAOxC,aAAA,CAAA,GAAa,OAAA;EAWhC,mBAAA,CAAoB,OAAA;IACxB,MAAA;IACA,gBAAA;IACA,SAAA;IACA,KAAA;IACA,WAAA;IACA,sBAAA;EAAA,IACE,OAAA,CAAQ,MAAA,CAAO,mBAAA,EAAqB,YAAA,QAAoB,WAAA,CAAY,0CAAA;AAAA"}
|
|
@@ -185,14 +185,16 @@ var _HexclaveServerAppImplIncomplete = class extends _HexclaveClientAppImplIncom
|
|
|
185
185
|
if (session.isKnownToBeInvalid()) return null;
|
|
186
186
|
return await this._interface.getServerUserByToken(session);
|
|
187
187
|
});
|
|
188
|
-
this._serverUsersCache = createCache(async ([cursor, limit, orderBy, desc, query, includeRestricted, includeAnonymous, onlyAnonymous, teamId]) => {
|
|
188
|
+
this._serverUsersCache = createCache(async ([cursor, limit, orderBy, desc, query, includeRestricted, includeAnonymous, onlyAnonymous, teamId, excludedEmailDomains]) => {
|
|
189
189
|
if (onlyAnonymous && !includeAnonymous) throw new HexclaveAssertionError("onlyAnonymous=true requires includeAnonymous=true");
|
|
190
|
+
const excludedEmailDomainList = excludedEmailDomains?.split(",");
|
|
190
191
|
if (onlyAnonymous) return await this._interface.listServerUsers({
|
|
191
192
|
cursor,
|
|
192
193
|
limit,
|
|
193
194
|
orderBy,
|
|
194
195
|
desc,
|
|
195
196
|
query,
|
|
197
|
+
excludedEmailDomains: excludedEmailDomainList,
|
|
196
198
|
includeRestricted,
|
|
197
199
|
includeAnonymous: true,
|
|
198
200
|
onlyAnonymous: true,
|
|
@@ -204,6 +206,7 @@ var _HexclaveServerAppImplIncomplete = class extends _HexclaveClientAppImplIncom
|
|
|
204
206
|
orderBy,
|
|
205
207
|
desc,
|
|
206
208
|
query,
|
|
209
|
+
excludedEmailDomains: excludedEmailDomainList,
|
|
207
210
|
includeRestricted,
|
|
208
211
|
includeAnonymous,
|
|
209
212
|
teamId
|
|
@@ -1091,6 +1094,7 @@ var _HexclaveServerAppImplIncomplete = class extends _HexclaveClientAppImplIncom
|
|
|
1091
1094
|
}, [crud]);
|
|
1092
1095
|
}
|
|
1093
1096
|
async listUsers(options) {
|
|
1097
|
+
const excludedEmailDomains = options?.excludedEmailDomains && options.excludedEmailDomains.length > 0 ? options.excludedEmailDomains.join(",") : void 0;
|
|
1094
1098
|
const crud = Result.orThrow(await this._serverUsersCache.getOrWait([
|
|
1095
1099
|
options?.cursor,
|
|
1096
1100
|
options?.limit,
|
|
@@ -1100,13 +1104,15 @@ var _HexclaveServerAppImplIncomplete = class extends _HexclaveClientAppImplIncom
|
|
|
1100
1104
|
options?.includeRestricted,
|
|
1101
1105
|
options?.includeAnonymous,
|
|
1102
1106
|
options?.onlyAnonymous,
|
|
1103
|
-
options?.teamId
|
|
1107
|
+
options?.teamId,
|
|
1108
|
+
excludedEmailDomains
|
|
1104
1109
|
], "write-only"));
|
|
1105
1110
|
const result = crud.items.map((j) => this._serverUserFromCrud(j));
|
|
1106
1111
|
result.nextCursor = crud.pagination?.next_cursor ?? null;
|
|
1107
1112
|
return result;
|
|
1108
1113
|
}
|
|
1109
1114
|
useUsers(options) {
|
|
1115
|
+
const excludedEmailDomains = options?.excludedEmailDomains && options.excludedEmailDomains.length > 0 ? options.excludedEmailDomains.join(",") : void 0;
|
|
1110
1116
|
const crud = useAsyncCache(this._serverUsersCache, [
|
|
1111
1117
|
options?.cursor,
|
|
1112
1118
|
options?.limit,
|
|
@@ -1116,7 +1122,8 @@ var _HexclaveServerAppImplIncomplete = class extends _HexclaveClientAppImplIncom
|
|
|
1116
1122
|
options?.includeRestricted,
|
|
1117
1123
|
options?.includeAnonymous,
|
|
1118
1124
|
options?.onlyAnonymous,
|
|
1119
|
-
options?.teamId
|
|
1125
|
+
options?.teamId,
|
|
1126
|
+
excludedEmailDomains
|
|
1120
1127
|
], "serverApp.useUsers()");
|
|
1121
1128
|
const result = crud.items.map((j) => this._serverUserFromCrud(j));
|
|
1122
1129
|
result.nextCursor = crud.pagination?.next_cursor ?? null;
|
|
@@ -1207,19 +1214,22 @@ var _HexclaveServerAppImplIncomplete = class extends _HexclaveClientAppImplIncom
|
|
|
1207
1214
|
id
|
|
1208
1215
|
}, result), [result]);
|
|
1209
1216
|
}
|
|
1217
|
+
_resolveCustomer(options) {
|
|
1218
|
+
if ("userId" in options) return {
|
|
1219
|
+
customerType: "user",
|
|
1220
|
+
customerId: options.userId
|
|
1221
|
+
};
|
|
1222
|
+
if ("teamId" in options) return {
|
|
1223
|
+
customerType: "team",
|
|
1224
|
+
customerId: options.teamId
|
|
1225
|
+
};
|
|
1226
|
+
return {
|
|
1227
|
+
customerType: "custom",
|
|
1228
|
+
customerId: options.customCustomerId
|
|
1229
|
+
};
|
|
1230
|
+
}
|
|
1210
1231
|
async grantProduct(options) {
|
|
1211
|
-
|
|
1212
|
-
let customerId;
|
|
1213
|
-
if ("userId" in options) {
|
|
1214
|
-
customerType = "user";
|
|
1215
|
-
customerId = options.userId;
|
|
1216
|
-
} else if ("teamId" in options) {
|
|
1217
|
-
customerType = "team";
|
|
1218
|
-
customerId = options.teamId;
|
|
1219
|
-
} else {
|
|
1220
|
-
customerType = "custom";
|
|
1221
|
-
customerId = options.customCustomerId;
|
|
1222
|
-
}
|
|
1232
|
+
const { customerType, customerId } = this._resolveCustomer(options);
|
|
1223
1233
|
await this._interface.grantProduct({
|
|
1224
1234
|
customerType,
|
|
1225
1235
|
customerId,
|
|
@@ -1233,6 +1243,11 @@ var _HexclaveServerAppImplIncomplete = class extends _HexclaveClientAppImplIncom
|
|
|
1233
1243
|
null
|
|
1234
1244
|
]);
|
|
1235
1245
|
}
|
|
1246
|
+
async createCheckoutUrl(options) {
|
|
1247
|
+
const { customerType, customerId } = this._resolveCustomer(options);
|
|
1248
|
+
const productIdOrInline = "productId" in options ? options.productId : options.product;
|
|
1249
|
+
return await this._interface.createCheckoutUrl(customerType, customerId, productIdOrInline, null, options.returnUrl, "server");
|
|
1250
|
+
}
|
|
1236
1251
|
async createTeam(data) {
|
|
1237
1252
|
const team = await this._interface.createServerTeam(serverTeamCreateOptionsToCrud(data));
|
|
1238
1253
|
await this._serverTeamsCache.refreshWhere(() => true);
|