@drmhse/sso-sdk 0.2.3 → 0.2.4

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/README.md CHANGED
@@ -307,16 +307,27 @@ await sso.organizations.oauthCredentials.set('acme-corp', 'github', {
307
307
 
308
308
  #### End-User Management (`sso.organizations.endUsers`)
309
309
 
310
- Manage your organization's customers (end-users with subscriptions).
310
+ Manage your organization's customers (end-users who have logged in or have subscriptions).
311
311
 
312
312
  ```typescript
313
- // List all end-users for an organization
314
- const endUsers = await sso.organizations.endUsers.list('acme-corp', {
313
+ // List all end-users across all services
314
+ const allUsers = await sso.organizations.endUsers.list('acme-corp', {
315
315
  page: 1,
316
316
  limit: 20
317
317
  });
318
318
 
319
- // Revoke all active sessions for a specific end-user
319
+ // Filter end-users by a specific service
320
+ const serviceUsers = await sso.organizations.endUsers.list('acme-corp', {
321
+ service_slug: 'main-app',
322
+ page: 1,
323
+ limit: 20
324
+ });
325
+
326
+ // Get detailed information about a specific end-user
327
+ const user = await sso.organizations.endUsers.get('acme-corp', 'user-id-123');
328
+ console.log(`Active sessions: ${user.session_count}`);
329
+
330
+ // Revoke all active sessions for a specific end-user (force logout)
320
331
  await sso.organizations.endUsers.revokeSessions('acme-corp', 'user-id-123');
321
332
  ```
322
333
 
package/dist/index.d.mts CHANGED
@@ -802,6 +802,10 @@ interface EndUserDetailResponse {
802
802
  * List end-users query params
803
803
  */
804
804
  interface ListEndUsersParams extends PaginationParams {
805
+ /**
806
+ * Optional service slug to filter users by a specific service
807
+ */
808
+ service_slug?: string;
805
809
  }
806
810
  /**
807
811
  * Revoke sessions response
@@ -1314,19 +1318,28 @@ declare class OrganizationsModule {
1314
1318
  endUsers: {
1315
1319
  /**
1316
1320
  * List all end-users for an organization.
1317
- * End-users are customers who have subscriptions to the organization's services.
1321
+ * Returns users who have identities (logged in) or subscriptions for the organization's services.
1318
1322
  *
1319
1323
  * @param orgSlug Organization slug
1320
- * @param params Optional query parameters for pagination
1321
- * @returns Paginated list of end-users with their subscriptions
1324
+ * @param params Optional query parameters for pagination and filtering
1325
+ * @param params.service_slug Optional service slug to filter users by a specific service
1326
+ * @returns Paginated list of end-users with their subscriptions and identities
1322
1327
  *
1323
1328
  * @example
1324
1329
  * ```typescript
1325
- * const endUsers = await sso.organizations.endUsers.list('acme-corp', {
1330
+ * // List all end-users across all services
1331
+ * const allUsers = await sso.organizations.endUsers.list('acme-corp', {
1332
+ * page: 1,
1333
+ * limit: 20
1334
+ * });
1335
+ *
1336
+ * // Filter by specific service
1337
+ * const serviceUsers = await sso.organizations.endUsers.list('acme-corp', {
1338
+ * service_slug: 'my-app',
1326
1339
  * page: 1,
1327
1340
  * limit: 20
1328
1341
  * });
1329
- * console.log(`Total end-users: ${endUsers.total}`);
1342
+ * console.log(`Total end-users: ${allUsers.total}`);
1330
1343
  * ```
1331
1344
  */
1332
1345
  list: (orgSlug: string, params?: ListEndUsersParams) => Promise<EndUserListResponse>;
package/dist/index.d.ts CHANGED
@@ -802,6 +802,10 @@ interface EndUserDetailResponse {
802
802
  * List end-users query params
803
803
  */
804
804
  interface ListEndUsersParams extends PaginationParams {
805
+ /**
806
+ * Optional service slug to filter users by a specific service
807
+ */
808
+ service_slug?: string;
805
809
  }
806
810
  /**
807
811
  * Revoke sessions response
@@ -1314,19 +1318,28 @@ declare class OrganizationsModule {
1314
1318
  endUsers: {
1315
1319
  /**
1316
1320
  * List all end-users for an organization.
1317
- * End-users are customers who have subscriptions to the organization's services.
1321
+ * Returns users who have identities (logged in) or subscriptions for the organization's services.
1318
1322
  *
1319
1323
  * @param orgSlug Organization slug
1320
- * @param params Optional query parameters for pagination
1321
- * @returns Paginated list of end-users with their subscriptions
1324
+ * @param params Optional query parameters for pagination and filtering
1325
+ * @param params.service_slug Optional service slug to filter users by a specific service
1326
+ * @returns Paginated list of end-users with their subscriptions and identities
1322
1327
  *
1323
1328
  * @example
1324
1329
  * ```typescript
1325
- * const endUsers = await sso.organizations.endUsers.list('acme-corp', {
1330
+ * // List all end-users across all services
1331
+ * const allUsers = await sso.organizations.endUsers.list('acme-corp', {
1332
+ * page: 1,
1333
+ * limit: 20
1334
+ * });
1335
+ *
1336
+ * // Filter by specific service
1337
+ * const serviceUsers = await sso.organizations.endUsers.list('acme-corp', {
1338
+ * service_slug: 'my-app',
1326
1339
  * page: 1,
1327
1340
  * limit: 20
1328
1341
  * });
1329
- * console.log(`Total end-users: ${endUsers.total}`);
1342
+ * console.log(`Total end-users: ${allUsers.total}`);
1330
1343
  * ```
1331
1344
  */
1332
1345
  list: (orgSlug: string, params?: ListEndUsersParams) => Promise<EndUserListResponse>;
package/dist/index.js CHANGED
@@ -724,19 +724,28 @@ var OrganizationsModule = class {
724
724
  this.endUsers = {
725
725
  /**
726
726
  * List all end-users for an organization.
727
- * End-users are customers who have subscriptions to the organization's services.
727
+ * Returns users who have identities (logged in) or subscriptions for the organization's services.
728
728
  *
729
729
  * @param orgSlug Organization slug
730
- * @param params Optional query parameters for pagination
731
- * @returns Paginated list of end-users with their subscriptions
730
+ * @param params Optional query parameters for pagination and filtering
731
+ * @param params.service_slug Optional service slug to filter users by a specific service
732
+ * @returns Paginated list of end-users with their subscriptions and identities
732
733
  *
733
734
  * @example
734
735
  * ```typescript
735
- * const endUsers = await sso.organizations.endUsers.list('acme-corp', {
736
+ * // List all end-users across all services
737
+ * const allUsers = await sso.organizations.endUsers.list('acme-corp', {
736
738
  * page: 1,
737
739
  * limit: 20
738
740
  * });
739
- * console.log(`Total end-users: ${endUsers.total}`);
741
+ *
742
+ * // Filter by specific service
743
+ * const serviceUsers = await sso.organizations.endUsers.list('acme-corp', {
744
+ * service_slug: 'my-app',
745
+ * page: 1,
746
+ * limit: 20
747
+ * });
748
+ * console.log(`Total end-users: ${allUsers.total}`);
740
749
  * ```
741
750
  */
742
751
  list: async (orgSlug, params) => {
package/dist/index.mjs CHANGED
@@ -691,19 +691,28 @@ var OrganizationsModule = class {
691
691
  this.endUsers = {
692
692
  /**
693
693
  * List all end-users for an organization.
694
- * End-users are customers who have subscriptions to the organization's services.
694
+ * Returns users who have identities (logged in) or subscriptions for the organization's services.
695
695
  *
696
696
  * @param orgSlug Organization slug
697
- * @param params Optional query parameters for pagination
698
- * @returns Paginated list of end-users with their subscriptions
697
+ * @param params Optional query parameters for pagination and filtering
698
+ * @param params.service_slug Optional service slug to filter users by a specific service
699
+ * @returns Paginated list of end-users with their subscriptions and identities
699
700
  *
700
701
  * @example
701
702
  * ```typescript
702
- * const endUsers = await sso.organizations.endUsers.list('acme-corp', {
703
+ * // List all end-users across all services
704
+ * const allUsers = await sso.organizations.endUsers.list('acme-corp', {
703
705
  * page: 1,
704
706
  * limit: 20
705
707
  * });
706
- * console.log(`Total end-users: ${endUsers.total}`);
708
+ *
709
+ * // Filter by specific service
710
+ * const serviceUsers = await sso.organizations.endUsers.list('acme-corp', {
711
+ * service_slug: 'my-app',
712
+ * page: 1,
713
+ * limit: 20
714
+ * });
715
+ * console.log(`Total end-users: ${allUsers.total}`);
707
716
  * ```
708
717
  */
709
718
  list: async (orgSlug, params) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drmhse/sso-sdk",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Zero-dependency TypeScript SDK for the multi-tenant SSO Platform API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",