@meistrari/auth-core 2.2.0 → 2.3.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/index.d.mts CHANGED
@@ -5264,6 +5264,25 @@ declare class AdminService {
5264
5264
  getUserAccess(userId: string): Promise<{
5265
5265
  data: AdminUserAccess;
5266
5266
  } | null>;
5267
+ /**
5268
+ * Lists applications with their entitlements as a global admin. Unlike
5269
+ * {@link listApplications}, which goes through the session-only application
5270
+ * routes, this uses the admin endpoint and so also works with a bearer token.
5271
+ *
5272
+ * @param options - Pagination, ordering, organization filter, search, and member preview options
5273
+ * @returns The application listing with entitlement details
5274
+ */
5275
+ listAdminApplications(options?: ListAdminApplicationsOptions): Promise<{
5276
+ data: null;
5277
+ error: {
5278
+ message?: string | undefined;
5279
+ status: number;
5280
+ statusText: string;
5281
+ };
5282
+ } | {
5283
+ data: ListAdminApplicationsResult;
5284
+ error: null;
5285
+ }>;
5267
5286
  /**
5268
5287
  * Lists the users with access to an application as a global admin, one row
5269
5288
  * per user with every organization that grants them access and the role it
package/dist/index.d.ts CHANGED
@@ -5264,6 +5264,25 @@ declare class AdminService {
5264
5264
  getUserAccess(userId: string): Promise<{
5265
5265
  data: AdminUserAccess;
5266
5266
  } | null>;
5267
+ /**
5268
+ * Lists applications with their entitlements as a global admin. Unlike
5269
+ * {@link listApplications}, which goes through the session-only application
5270
+ * routes, this uses the admin endpoint and so also works with a bearer token.
5271
+ *
5272
+ * @param options - Pagination, ordering, organization filter, search, and member preview options
5273
+ * @returns The application listing with entitlement details
5274
+ */
5275
+ listAdminApplications(options?: ListAdminApplicationsOptions): Promise<{
5276
+ data: null;
5277
+ error: {
5278
+ message?: string | undefined;
5279
+ status: number;
5280
+ statusText: string;
5281
+ };
5282
+ } | {
5283
+ data: ListAdminApplicationsResult;
5284
+ error: null;
5285
+ }>;
5267
5286
  /**
5268
5287
  * Lists the users with access to an application as a global admin, one row
5269
5288
  * per user with every organization that grants them access and the role it
package/dist/index.mjs CHANGED
@@ -21,7 +21,7 @@ function isTokenExpired(token, expiresInMs) {
21
21
  return nowInSeconds > expirationTime;
22
22
  }
23
23
 
24
- const version = "2.2.0";
24
+ const version = "2.3.0";
25
25
 
26
26
  function parsedEnumValues(schema) {
27
27
  return Object.fromEntries(
@@ -822,6 +822,28 @@ class AdminService {
822
822
  });
823
823
  return data;
824
824
  }
825
+ /**
826
+ * Lists applications with their entitlements as a global admin. Unlike
827
+ * {@link listApplications}, which goes through the session-only application
828
+ * routes, this uses the admin endpoint and so also works with a bearer token.
829
+ *
830
+ * @param options - Pagination, ordering, organization filter, search, and member preview options
831
+ * @returns The application listing with entitlement details
832
+ */
833
+ async listAdminApplications(options = {}) {
834
+ return await this.client.$fetch("/admin/applications", {
835
+ method: "GET",
836
+ query: {
837
+ ...options.limit !== void 0 ? { limit: options.limit } : {},
838
+ ...options.offset !== void 0 ? { offset: options.offset } : {},
839
+ ...options.search ? { search: options.search } : {},
840
+ ...options.organizationId ? { organization_id: options.organizationId } : {},
841
+ ...options.membersPreview !== void 0 ? { members_preview: options.membersPreview } : {},
842
+ ...options.orderBy ? { sortBy: options.orderBy } : {},
843
+ ...options.orderDirection ? { sortDirection: options.orderDirection } : {}
844
+ }
845
+ });
846
+ }
825
847
  /**
826
848
  * Lists the users with access to an application as a global admin, one row
827
849
  * per user with every organization that grants them access and the role it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/auth-core",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {