@foir/sdk 0.23.0 → 0.25.0

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/push.js CHANGED
@@ -1093,8 +1093,9 @@ var AUTH_OPS = {
1093
1093
  requestPasswordReset: "requestPasswordReset",
1094
1094
  resetPassword: "resetPassword",
1095
1095
  updatePassword: "updatePassword",
1096
- verifyEmail: "verifyEmail",
1097
1096
  deleteMyAccount: "deleteMyAccount",
1097
+ // Ending their own membership where the request stands.
1098
+ leaveMembership: "leaveMembership",
1098
1099
  // The user's own profile, and the apps they have agreed may act for them.
1099
1100
  updateMyProfile: "updateMyProfile",
1100
1101
  myAuthorizedApps: "myAuthorizedApps",
@@ -1104,6 +1105,14 @@ var AUTH_OPS = {
1104
1105
  mySessions: "mySessions",
1105
1106
  endMySession: "endMySession",
1106
1107
  signOutEverywhere: "signOutEverywhere",
1108
+ // Their email addresses: one added is kept once the code it was sent proves it.
1109
+ myAddresses: "myAddresses",
1110
+ addMyAddress: "addMyAddress",
1111
+ proveMyAddress: "proveMyAddress",
1112
+ makeMyAddressPrimary: "makeMyAddressPrimary",
1113
+ removeMyAddress: "removeMyAddress",
1114
+ // A copy of their own data.
1115
+ exportMyData: "exportMyData",
1107
1116
  createPersonalAccessToken: "createPersonalAccessToken",
1108
1117
  mySignInMethods: "mySignInMethods",
1109
1118
  connectSignInMethod: "connectSignInMethod",
@@ -1115,6 +1124,7 @@ var AUTH_OPS = {
1115
1124
  beginFactorEnrollment: "beginFactorEnrollment",
1116
1125
  completeFactorEnrollment: "completeFactorEnrollment",
1117
1126
  removeFactor: "removeFactor",
1127
+ renameFactor: "renameFactor",
1118
1128
  makeRecoveryCodes: "makeRecoveryCodes",
1119
1129
  // The organizations the caller may stand in. Nothing selects one: a request
1120
1130
  // names the organization it acts in (`orgId` or `orgUrl` below), and the
package/dist/react.js CHANGED
@@ -967,8 +967,9 @@ var AUTH_OPS = {
967
967
  requestPasswordReset: "requestPasswordReset",
968
968
  resetPassword: "resetPassword",
969
969
  updatePassword: "updatePassword",
970
- verifyEmail: "verifyEmail",
971
970
  deleteMyAccount: "deleteMyAccount",
971
+ // Ending their own membership where the request stands.
972
+ leaveMembership: "leaveMembership",
972
973
  // The user's own profile, and the apps they have agreed may act for them.
973
974
  updateMyProfile: "updateMyProfile",
974
975
  myAuthorizedApps: "myAuthorizedApps",
@@ -978,6 +979,14 @@ var AUTH_OPS = {
978
979
  mySessions: "mySessions",
979
980
  endMySession: "endMySession",
980
981
  signOutEverywhere: "signOutEverywhere",
982
+ // Their email addresses: one added is kept once the code it was sent proves it.
983
+ myAddresses: "myAddresses",
984
+ addMyAddress: "addMyAddress",
985
+ proveMyAddress: "proveMyAddress",
986
+ makeMyAddressPrimary: "makeMyAddressPrimary",
987
+ removeMyAddress: "removeMyAddress",
988
+ // A copy of their own data.
989
+ exportMyData: "exportMyData",
981
990
  createPersonalAccessToken: "createPersonalAccessToken",
982
991
  mySignInMethods: "mySignInMethods",
983
992
  connectSignInMethod: "connectSignInMethod",
@@ -989,6 +998,7 @@ var AUTH_OPS = {
989
998
  beginFactorEnrollment: "beginFactorEnrollment",
990
999
  completeFactorEnrollment: "completeFactorEnrollment",
991
1000
  removeFactor: "removeFactor",
1001
+ renameFactor: "renameFactor",
992
1002
  makeRecoveryCodes: "makeRecoveryCodes",
993
1003
  // The organizations the caller may stand in. Nothing selects one: a request
994
1004
  // names the organization it acts in (`orgId` or `orgUrl` below), and the
@@ -1431,8 +1441,9 @@ var DEFAULT_REFRESH_SKEW_SECONDS = 60;
1431
1441
  var MIN_REFRESH_DELAY_MS = 5e3;
1432
1442
  var CSRF_HEADER = { "X-Foir-Session": "1" };
1433
1443
  function createFoirSessionClient(config) {
1434
- const sessionUrl = `${trimSlash(config.loginOrigin)}${config.sessionPath ?? DEFAULT_SESSION_PATH}`;
1435
- const logoutUrl = `${trimSlash(config.loginOrigin)}${config.logoutPath ?? DEFAULT_LOGOUT_PATH}`;
1444
+ const forApp = config.clientId ? `?client_id=${encodeURIComponent(config.clientId)}` : "";
1445
+ const sessionUrl = `${trimSlash(config.loginOrigin)}${config.sessionPath ?? DEFAULT_SESSION_PATH}${forApp}`;
1446
+ const logoutUrl = `${trimSlash(config.loginOrigin)}${config.logoutPath ?? DEFAULT_LOGOUT_PATH}${forApp}`;
1436
1447
  const skewMs = (config.refreshSkewSeconds ?? DEFAULT_REFRESH_SKEW_SECONDS) * 1e3;
1437
1448
  let cached = null;
1438
1449
  let inflight = null;
@@ -28,8 +28,8 @@
28
28
  *
29
29
  * The reason is a predicate asymmetry rather than a policy preference.
30
30
  * `events.view` is plain tenant+project containment; `record.view` carries
31
- * owner, admin_owner, access_mode, grantee, comp_parent, read_borrow and
32
- * slice_parent terms on top of it. A containment-only read over the log
31
+ * ownership, access-mode, grantee, composition, read-borrow and slice terms
32
+ * on top of it. A containment-only read over the log
33
33
  * therefore describes rows whose underlying records the same caller could not
34
34
  * read — and every row carries `actor`, naming which OTHER user acted. In a
35
35
  * project with owner confinement that is a per-record activity feed of other
package/dist/server.js CHANGED
@@ -1489,7 +1489,7 @@ function parseResumeFrom(message) {
1489
1489
  const n = Number(m[1]);
1490
1490
  return Number.isSafeInteger(n) ? n : void 0;
1491
1491
  }
1492
- function assertOperatorKey(apiKey) {
1492
+ function assertAdminKey(apiKey) {
1493
1493
  const key = apiKey?.trim() ?? "";
1494
1494
  if (!key) {
1495
1495
  throw new FoirRequestError(
@@ -1576,7 +1576,7 @@ async function readErrorMessage(res) {
1576
1576
  }
1577
1577
  }
1578
1578
  function createEventsClient(config) {
1579
- const apiKey = assertOperatorKey(config.apiKey);
1579
+ const apiKey = assertAdminKey(config.apiKey);
1580
1580
  assertNoBearer(config.headers);
1581
1581
  const url = foirApiEndpoint(config.apiUrl, FOIR_EVENTS_PATH);
1582
1582
  async function list(params = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foir/sdk",
3
- "version": "0.23.0",
3
+ "version": "0.25.0",
4
4
  "description": "Official Foir SDK — editor iframe client + server-side platform helpers",
5
5
  "type": "module",
6
6
  "publishConfig": {