@unboundcx/sdk 4.13.44 → 4.13.45

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unboundcx/sdk",
3
- "version": "4.13.44",
3
+ "version": "4.13.45",
4
4
  "description": "Official JavaScript SDK for the Unbound API - A comprehensive toolkit for integrating with Unbound's communication, AI, and data management services",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -617,6 +617,18 @@ export class PortalsService {
617
617
  * portal with no login surface, e.g. `marketing`, is never included);
618
618
  * `matches` is whether this person currently passes that portal's
619
619
  * people-access filter.
620
+ * sessions: Array<{
621
+ * id: string,
622
+ * portalId: string,
623
+ * portalName: string,
624
+ * ip: string,
625
+ * browser: string,
626
+ * os: string,
627
+ * device: string,
628
+ * createdAt: string|null,
629
+ * lastSeenAt: string|null,
630
+ * expiresAt: string|null
631
+ * }>
620
632
  */
621
633
  async getPeopleAccess(peopleId) {
622
634
  this.sdk.validateParams(
@@ -737,9 +749,55 @@ export class PortalsService {
737
749
  );
738
750
  }
739
751
 
752
+ /**
753
+ * Revokes one portal login session for the person (logs that browser out).
754
+ *
755
+ * @param {string} peopleId
756
+ * @param {string} sessionId
757
+ * @returns {Promise<{ ok: true }>}
758
+ */
759
+ async revokePeoplePortalSession(peopleId, sessionId) {
760
+ this.sdk.validateParams(
761
+ { peopleId, sessionId },
762
+ {
763
+ peopleId: { type: "string", required: true },
764
+ sessionId: { type: "string", required: true },
765
+ },
766
+ );
767
+
768
+ return internalRequest(
769
+ this.sdk,
770
+ `/portals/people/${encodeURIComponent(peopleId)}/sessions/${encodeURIComponent(sessionId)}`,
771
+ "DELETE",
772
+ );
773
+ }
774
+
775
+ /**
776
+ * Revokes every active portal login session for the person (logs them
777
+ * out of all browsers). Does not delete their credential — they can
778
+ * sign in again.
779
+ *
780
+ * @param {string} peopleId
781
+ * @returns {Promise<{ ok: true }>}
782
+ */
783
+ async revokeAllPeoplePortalSessions(peopleId) {
784
+ this.sdk.validateParams(
785
+ { peopleId },
786
+ {
787
+ peopleId: { type: "string", required: true },
788
+ },
789
+ );
790
+
791
+ return internalRequest(
792
+ this.sdk,
793
+ `/portals/people/${encodeURIComponent(peopleId)}/sessions`,
794
+ "DELETE",
795
+ );
796
+ }
797
+
740
798
  /**
741
799
  * Revokes a person's portal access (soft-deletes their credential across
742
- * every portal on the account). Idempotent — revoking someone with no
800
+ * every portal on this account). Idempotent — revoking someone with no
743
801
  * credential is a no-op, not an error.
744
802
  *
745
803
  * @param {string} peopleId