@ai-matrx/sharing 0.1.0 → 0.1.1

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/core.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _supabase_supabase_js from '@supabase/supabase-js';
2
2
  import { SupabaseClient } from '@supabase/supabase-js';
3
3
  import { DbPermissionLevel, PermissionLevel } from '@ai-matrx/data/access';
4
- export { DB_PERMISSION_LEVELS, DbPermissionLevel, PERMISSION_LEVELS, PERMISSION_LEVEL_HINTS, PERMISSION_LEVEL_LABELS, PERMISSION_LEVEL_SHORT_LABELS, PermissionLevel, isDbPermissionLevel, isPermissionLevel, toDbPermissionLevel } from '@ai-matrx/data/access';
4
+ export { DB_PERMISSION_LEVELS, DbPermissionLevel, PERMISSION_LEVELS, PERMISSION_LEVEL_HINTS, PERMISSION_LEVEL_LABELS, PERMISSION_LEVEL_SHORT_LABELS, PermissionLevel, isDbPermissionLevel, isPermissionLevel, normalizePermissionLevel, parsePermissionLevel, toDbPermissionLevel } from '@ai-matrx/data/access';
5
5
  import { EntityTypeToken } from '@ai-matrx/associations';
6
6
  import * as _ai_matrx_api_account from '@ai-matrx/api/account';
7
7
  import { components } from '@ai-matrx/api/types';
@@ -3426,15 +3426,12 @@ declare function getResourceSharePath(resourceType: string, resourceId: string):
3426
3426
  * rank map, label map or ordered array omits a level.
3427
3427
  */
3428
3428
 
3429
- /** Maps a stored/retired level onto the public ladder (a stray `edit_content` row reads as Edit). */
3430
- declare function normalizePermissionLevel(raw: unknown): PermissionLevel | null;
3431
3429
  /** The levels a picker may offer: what the database stores, never the retired `edit_content`. */
3432
3430
  declare const OFFERED_DB_PERMISSION_LEVELS: readonly DbPermissionLevel[];
3433
3431
  /** Rank of every level; a stray stored `edit_content` ranks as Edit so old data never crashes. */
3434
3432
  declare const PERMISSION_LEVEL_RANK: Record<PermissionLevel, number> & {
3435
3433
  edit_content: number;
3436
3434
  };
3437
- declare function parsePermissionLevel(raw: unknown, context: string): PermissionLevel | null;
3438
3435
  declare function permissionLevelRank(level: PermissionLevel): number;
3439
3436
 
3440
3437
  /**
@@ -4737,4 +4734,4 @@ interface HrDepartmentOption {
4737
4734
  declare function listTeams(organizationId: string, includeArchived?: boolean): Promise<Team[]>;
4738
4735
  declare function listTeamMembers(teamId: string): Promise<TeamMember[]>;
4739
4736
 
4740
- export { ACCESS_SUMMARY_ERROR_HEADLINE, type AccessContainer, type AccessDirectGrant, type AccessGranteeType, type AccessKpis, type AccessNotice, type AccessPanelView, type AccessReasonRow, type AccessSummary, type AccessSummaryView, type ApiCallResult, type AppDispatch, type ChannelReadiness, type CheckPermissionOptions, type ForkResult, GRANT_LIST_SCOPE_NOTE, type GranteeKind, type HrDepartmentOption, type LaneChoice, MEMBER_ROWS_TTL_MS, type MakePublicOptions, type MyPendingTableInvitation, NOTHING_ELSE_GRANTS, NO_GRANTS_DETAIL, NO_GRANTS_HEADLINE, NO_GRANTS_YET_HEADLINE, OFFERED_DB_PERMISSION_LEVELS, type OrCapable, type OrgAvailabilityOptions, type OrganizationMemberRow, type OutsideInviteAnswer, type OutsideShareDelivery, type OutsideShareInvitation, type OutsideShareLevel, type OutsideShareState, type OwnedResource, type OwnerCheckResult, type OwnershipResolution, PERMISSION_LEVEL_RANK, PUBLIC_LANE_COLUMNS, PUBLIC_LANE_TYPES, type Permission, type PermissionCheckResult, PermissionError, PermissionErrorCode, type PermissionWithDetails, type PublishLane, RESOURCE_TYPES, type ResolvedShareToken, type ResourceType, type ResourceVisibility, type RevokeAccessOptions, SHAREABLE_RESOURCE_REGISTRY, SHOWN_TO_ORDER, SHOWN_TO_WORDS, type SearchEngineIndexedState, type SecureDeliveryCreate, type SecureDeliveryOptions, type SecureDeliveryPage, type SecureDeliveryReceipt, SecureDeliveryRefusal, type SentSecureDelivery, type ShareActionResult, type ShareCapabilities, type ShareDbClient, type ShareLink, type ShareNoticeAnswer, type ShareServerCall, type ShareServerResult, type ShareTargetType, type ShareWithUserOptions, type ShareableResourceEntry, type SharingCopyContext, type SharingHost, type SharingState, type ShownTo, type ShownToContext, type TableSharePeek, type Team, type TeamMember, type TeamRole, type UpdatePermissionOptions, type WhoCanSee, absoluteInviteUrl, acceptOutsideShare, accessKpis, accessReasonRows, accessSummaryView, appUrl, applyShownTo, batchShareWithUsers, callApi, checkPermission, configureSharing, containerDetail, containerTitle, createClient, createSafeShareMessage, createShareLink, describeAccessSummary, describeShareLinkAccess, describeShareLinkExpiry, ensureOrgAvailability, ensureOrgId, evaluateShareLinkHandoff, fetchAccessSummary, fetchEntityTitles, fetchRecipientPhoneOnFile, fetchSecureDeliveryOptions, fetchShownToContext, forgetOrganizationMemberRows, forkSharedResource, getActiveOrgId, getClaimsUser, getPermissionLevelLabel, getPermissionLevelsAtOrAbove, getResourcePermissions, getResourceSharePath, getResourceTypeLabel, getResourceVisibility, getSearchEngineIndexedState, getShareCapabilities, getShareableResource, getSharedWithMe, grantCsvRow, grantCsvRows, grantLevelLabel, grantOrgAvailability, granteeKind, granteeLabel, granteeSecondaryLabel, hasPublicPage, humanAccessPanel, humanAccessSummary, humanGrantList, humanGrantRow, humanNotices, isForkable, isJsonObject, isKnownEntity, isPrivateSummary, isResourceOwner, listPermissions, listSentSecureDeliveries, listShareLinks, listTeamMembers, listTeams, makePrivate, makePublic, myPendingTableInvitations, normalizePermissionLevel, onlyOpenOrganizations, openSecureDelivery, organizationDisambiguators, parsePermissionLevel, passThroughDispatch, peekTableShare, permissionLevelRank, publicLaneSelect, publicResourceUrl, readOrganizationMemberRows, readOutsideShare, reasonCsvRows, recordNoun, requestSecureDeliveryCode, resendOutside, resolveEntityHref, resolveResourceOwnership, resolveResourceToken, resolveShareToken, resolveSharingAuthority, resolveTableName, revokeAccess, revokeOrgAccess, revokeOutside, revokePublicAccess, revokeSecureDelivery, revokeShareLink, revokeUserAccess, satisfiesPermissionLevel, sendSecureDelivery, sendShareNotice, setResourceShownTo, setSearchEngineIndexed, setStoreLane, shareClient, shareLinkSecurityStateMatches, shareLinkUnavailableReason, shareLinkUrl, shareUrlForLink, shareWithOutsidePerson, shareWithUser, sharingHost, sharingLocation, shownToBlendedFilter, shownToFilter, shownToMyOrgsFilter, summaryReachLabel, supabase, updatePermissionLevel, validatePermission, viewSecureDelivery };
4737
+ export { ACCESS_SUMMARY_ERROR_HEADLINE, type AccessContainer, type AccessDirectGrant, type AccessGranteeType, type AccessKpis, type AccessNotice, type AccessPanelView, type AccessReasonRow, type AccessSummary, type AccessSummaryView, type ApiCallResult, type AppDispatch, type ChannelReadiness, type CheckPermissionOptions, type ForkResult, GRANT_LIST_SCOPE_NOTE, type GranteeKind, type HrDepartmentOption, type LaneChoice, MEMBER_ROWS_TTL_MS, type MakePublicOptions, type MyPendingTableInvitation, NOTHING_ELSE_GRANTS, NO_GRANTS_DETAIL, NO_GRANTS_HEADLINE, NO_GRANTS_YET_HEADLINE, OFFERED_DB_PERMISSION_LEVELS, type OrCapable, type OrgAvailabilityOptions, type OrganizationMemberRow, type OutsideInviteAnswer, type OutsideShareDelivery, type OutsideShareInvitation, type OutsideShareLevel, type OutsideShareState, type OwnedResource, type OwnerCheckResult, type OwnershipResolution, PERMISSION_LEVEL_RANK, PUBLIC_LANE_COLUMNS, PUBLIC_LANE_TYPES, type Permission, type PermissionCheckResult, PermissionError, PermissionErrorCode, type PermissionWithDetails, type PublishLane, RESOURCE_TYPES, type ResolvedShareToken, type ResourceType, type ResourceVisibility, type RevokeAccessOptions, SHAREABLE_RESOURCE_REGISTRY, SHOWN_TO_ORDER, SHOWN_TO_WORDS, type SearchEngineIndexedState, type SecureDeliveryCreate, type SecureDeliveryOptions, type SecureDeliveryPage, type SecureDeliveryReceipt, SecureDeliveryRefusal, type SentSecureDelivery, type ShareActionResult, type ShareCapabilities, type ShareDbClient, type ShareLink, type ShareNoticeAnswer, type ShareServerCall, type ShareServerResult, type ShareTargetType, type ShareWithUserOptions, type ShareableResourceEntry, type SharingCopyContext, type SharingHost, type SharingState, type ShownTo, type ShownToContext, type TableSharePeek, type Team, type TeamMember, type TeamRole, type UpdatePermissionOptions, type WhoCanSee, absoluteInviteUrl, acceptOutsideShare, accessKpis, accessReasonRows, accessSummaryView, appUrl, applyShownTo, batchShareWithUsers, callApi, checkPermission, configureSharing, containerDetail, containerTitle, createClient, createSafeShareMessage, createShareLink, describeAccessSummary, describeShareLinkAccess, describeShareLinkExpiry, ensureOrgAvailability, ensureOrgId, evaluateShareLinkHandoff, fetchAccessSummary, fetchEntityTitles, fetchRecipientPhoneOnFile, fetchSecureDeliveryOptions, fetchShownToContext, forgetOrganizationMemberRows, forkSharedResource, getActiveOrgId, getClaimsUser, getPermissionLevelLabel, getPermissionLevelsAtOrAbove, getResourcePermissions, getResourceSharePath, getResourceTypeLabel, getResourceVisibility, getSearchEngineIndexedState, getShareCapabilities, getShareableResource, getSharedWithMe, grantCsvRow, grantCsvRows, grantLevelLabel, grantOrgAvailability, granteeKind, granteeLabel, granteeSecondaryLabel, hasPublicPage, humanAccessPanel, humanAccessSummary, humanGrantList, humanGrantRow, humanNotices, isForkable, isJsonObject, isKnownEntity, isPrivateSummary, isResourceOwner, listPermissions, listSentSecureDeliveries, listShareLinks, listTeamMembers, listTeams, makePrivate, makePublic, myPendingTableInvitations, onlyOpenOrganizations, openSecureDelivery, organizationDisambiguators, passThroughDispatch, peekTableShare, permissionLevelRank, publicLaneSelect, publicResourceUrl, readOrganizationMemberRows, readOutsideShare, reasonCsvRows, recordNoun, requestSecureDeliveryCode, resendOutside, resolveEntityHref, resolveResourceOwnership, resolveResourceToken, resolveShareToken, resolveSharingAuthority, resolveTableName, revokeAccess, revokeOrgAccess, revokeOutside, revokePublicAccess, revokeSecureDelivery, revokeShareLink, revokeUserAccess, satisfiesPermissionLevel, sendSecureDelivery, sendShareNotice, setResourceShownTo, setSearchEngineIndexed, setStoreLane, shareClient, shareLinkSecurityStateMatches, shareLinkUnavailableReason, shareLinkUrl, shareUrlForLink, shareWithOutsidePerson, shareWithUser, sharingHost, sharingLocation, shownToBlendedFilter, shownToFilter, shownToMyOrgsFilter, summaryReachLabel, supabase, updatePermissionLevel, validatePermission, viewSecureDelivery };
package/dist/core.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _supabase_supabase_js from '@supabase/supabase-js';
2
2
  import { SupabaseClient } from '@supabase/supabase-js';
3
3
  import { DbPermissionLevel, PermissionLevel } from '@ai-matrx/data/access';
4
- export { DB_PERMISSION_LEVELS, DbPermissionLevel, PERMISSION_LEVELS, PERMISSION_LEVEL_HINTS, PERMISSION_LEVEL_LABELS, PERMISSION_LEVEL_SHORT_LABELS, PermissionLevel, isDbPermissionLevel, isPermissionLevel, toDbPermissionLevel } from '@ai-matrx/data/access';
4
+ export { DB_PERMISSION_LEVELS, DbPermissionLevel, PERMISSION_LEVELS, PERMISSION_LEVEL_HINTS, PERMISSION_LEVEL_LABELS, PERMISSION_LEVEL_SHORT_LABELS, PermissionLevel, isDbPermissionLevel, isPermissionLevel, normalizePermissionLevel, parsePermissionLevel, toDbPermissionLevel } from '@ai-matrx/data/access';
5
5
  import { EntityTypeToken } from '@ai-matrx/associations';
6
6
  import * as _ai_matrx_api_account from '@ai-matrx/api/account';
7
7
  import { components } from '@ai-matrx/api/types';
@@ -3426,15 +3426,12 @@ declare function getResourceSharePath(resourceType: string, resourceId: string):
3426
3426
  * rank map, label map or ordered array omits a level.
3427
3427
  */
3428
3428
 
3429
- /** Maps a stored/retired level onto the public ladder (a stray `edit_content` row reads as Edit). */
3430
- declare function normalizePermissionLevel(raw: unknown): PermissionLevel | null;
3431
3429
  /** The levels a picker may offer: what the database stores, never the retired `edit_content`. */
3432
3430
  declare const OFFERED_DB_PERMISSION_LEVELS: readonly DbPermissionLevel[];
3433
3431
  /** Rank of every level; a stray stored `edit_content` ranks as Edit so old data never crashes. */
3434
3432
  declare const PERMISSION_LEVEL_RANK: Record<PermissionLevel, number> & {
3435
3433
  edit_content: number;
3436
3434
  };
3437
- declare function parsePermissionLevel(raw: unknown, context: string): PermissionLevel | null;
3438
3435
  declare function permissionLevelRank(level: PermissionLevel): number;
3439
3436
 
3440
3437
  /**
@@ -4737,4 +4734,4 @@ interface HrDepartmentOption {
4737
4734
  declare function listTeams(organizationId: string, includeArchived?: boolean): Promise<Team[]>;
4738
4735
  declare function listTeamMembers(teamId: string): Promise<TeamMember[]>;
4739
4736
 
4740
- export { ACCESS_SUMMARY_ERROR_HEADLINE, type AccessContainer, type AccessDirectGrant, type AccessGranteeType, type AccessKpis, type AccessNotice, type AccessPanelView, type AccessReasonRow, type AccessSummary, type AccessSummaryView, type ApiCallResult, type AppDispatch, type ChannelReadiness, type CheckPermissionOptions, type ForkResult, GRANT_LIST_SCOPE_NOTE, type GranteeKind, type HrDepartmentOption, type LaneChoice, MEMBER_ROWS_TTL_MS, type MakePublicOptions, type MyPendingTableInvitation, NOTHING_ELSE_GRANTS, NO_GRANTS_DETAIL, NO_GRANTS_HEADLINE, NO_GRANTS_YET_HEADLINE, OFFERED_DB_PERMISSION_LEVELS, type OrCapable, type OrgAvailabilityOptions, type OrganizationMemberRow, type OutsideInviteAnswer, type OutsideShareDelivery, type OutsideShareInvitation, type OutsideShareLevel, type OutsideShareState, type OwnedResource, type OwnerCheckResult, type OwnershipResolution, PERMISSION_LEVEL_RANK, PUBLIC_LANE_COLUMNS, PUBLIC_LANE_TYPES, type Permission, type PermissionCheckResult, PermissionError, PermissionErrorCode, type PermissionWithDetails, type PublishLane, RESOURCE_TYPES, type ResolvedShareToken, type ResourceType, type ResourceVisibility, type RevokeAccessOptions, SHAREABLE_RESOURCE_REGISTRY, SHOWN_TO_ORDER, SHOWN_TO_WORDS, type SearchEngineIndexedState, type SecureDeliveryCreate, type SecureDeliveryOptions, type SecureDeliveryPage, type SecureDeliveryReceipt, SecureDeliveryRefusal, type SentSecureDelivery, type ShareActionResult, type ShareCapabilities, type ShareDbClient, type ShareLink, type ShareNoticeAnswer, type ShareServerCall, type ShareServerResult, type ShareTargetType, type ShareWithUserOptions, type ShareableResourceEntry, type SharingCopyContext, type SharingHost, type SharingState, type ShownTo, type ShownToContext, type TableSharePeek, type Team, type TeamMember, type TeamRole, type UpdatePermissionOptions, type WhoCanSee, absoluteInviteUrl, acceptOutsideShare, accessKpis, accessReasonRows, accessSummaryView, appUrl, applyShownTo, batchShareWithUsers, callApi, checkPermission, configureSharing, containerDetail, containerTitle, createClient, createSafeShareMessage, createShareLink, describeAccessSummary, describeShareLinkAccess, describeShareLinkExpiry, ensureOrgAvailability, ensureOrgId, evaluateShareLinkHandoff, fetchAccessSummary, fetchEntityTitles, fetchRecipientPhoneOnFile, fetchSecureDeliveryOptions, fetchShownToContext, forgetOrganizationMemberRows, forkSharedResource, getActiveOrgId, getClaimsUser, getPermissionLevelLabel, getPermissionLevelsAtOrAbove, getResourcePermissions, getResourceSharePath, getResourceTypeLabel, getResourceVisibility, getSearchEngineIndexedState, getShareCapabilities, getShareableResource, getSharedWithMe, grantCsvRow, grantCsvRows, grantLevelLabel, grantOrgAvailability, granteeKind, granteeLabel, granteeSecondaryLabel, hasPublicPage, humanAccessPanel, humanAccessSummary, humanGrantList, humanGrantRow, humanNotices, isForkable, isJsonObject, isKnownEntity, isPrivateSummary, isResourceOwner, listPermissions, listSentSecureDeliveries, listShareLinks, listTeamMembers, listTeams, makePrivate, makePublic, myPendingTableInvitations, normalizePermissionLevel, onlyOpenOrganizations, openSecureDelivery, organizationDisambiguators, parsePermissionLevel, passThroughDispatch, peekTableShare, permissionLevelRank, publicLaneSelect, publicResourceUrl, readOrganizationMemberRows, readOutsideShare, reasonCsvRows, recordNoun, requestSecureDeliveryCode, resendOutside, resolveEntityHref, resolveResourceOwnership, resolveResourceToken, resolveShareToken, resolveSharingAuthority, resolveTableName, revokeAccess, revokeOrgAccess, revokeOutside, revokePublicAccess, revokeSecureDelivery, revokeShareLink, revokeUserAccess, satisfiesPermissionLevel, sendSecureDelivery, sendShareNotice, setResourceShownTo, setSearchEngineIndexed, setStoreLane, shareClient, shareLinkSecurityStateMatches, shareLinkUnavailableReason, shareLinkUrl, shareUrlForLink, shareWithOutsidePerson, shareWithUser, sharingHost, sharingLocation, shownToBlendedFilter, shownToFilter, shownToMyOrgsFilter, summaryReachLabel, supabase, updatePermissionLevel, validatePermission, viewSecureDelivery };
4737
+ export { ACCESS_SUMMARY_ERROR_HEADLINE, type AccessContainer, type AccessDirectGrant, type AccessGranteeType, type AccessKpis, type AccessNotice, type AccessPanelView, type AccessReasonRow, type AccessSummary, type AccessSummaryView, type ApiCallResult, type AppDispatch, type ChannelReadiness, type CheckPermissionOptions, type ForkResult, GRANT_LIST_SCOPE_NOTE, type GranteeKind, type HrDepartmentOption, type LaneChoice, MEMBER_ROWS_TTL_MS, type MakePublicOptions, type MyPendingTableInvitation, NOTHING_ELSE_GRANTS, NO_GRANTS_DETAIL, NO_GRANTS_HEADLINE, NO_GRANTS_YET_HEADLINE, OFFERED_DB_PERMISSION_LEVELS, type OrCapable, type OrgAvailabilityOptions, type OrganizationMemberRow, type OutsideInviteAnswer, type OutsideShareDelivery, type OutsideShareInvitation, type OutsideShareLevel, type OutsideShareState, type OwnedResource, type OwnerCheckResult, type OwnershipResolution, PERMISSION_LEVEL_RANK, PUBLIC_LANE_COLUMNS, PUBLIC_LANE_TYPES, type Permission, type PermissionCheckResult, PermissionError, PermissionErrorCode, type PermissionWithDetails, type PublishLane, RESOURCE_TYPES, type ResolvedShareToken, type ResourceType, type ResourceVisibility, type RevokeAccessOptions, SHAREABLE_RESOURCE_REGISTRY, SHOWN_TO_ORDER, SHOWN_TO_WORDS, type SearchEngineIndexedState, type SecureDeliveryCreate, type SecureDeliveryOptions, type SecureDeliveryPage, type SecureDeliveryReceipt, SecureDeliveryRefusal, type SentSecureDelivery, type ShareActionResult, type ShareCapabilities, type ShareDbClient, type ShareLink, type ShareNoticeAnswer, type ShareServerCall, type ShareServerResult, type ShareTargetType, type ShareWithUserOptions, type ShareableResourceEntry, type SharingCopyContext, type SharingHost, type SharingState, type ShownTo, type ShownToContext, type TableSharePeek, type Team, type TeamMember, type TeamRole, type UpdatePermissionOptions, type WhoCanSee, absoluteInviteUrl, acceptOutsideShare, accessKpis, accessReasonRows, accessSummaryView, appUrl, applyShownTo, batchShareWithUsers, callApi, checkPermission, configureSharing, containerDetail, containerTitle, createClient, createSafeShareMessage, createShareLink, describeAccessSummary, describeShareLinkAccess, describeShareLinkExpiry, ensureOrgAvailability, ensureOrgId, evaluateShareLinkHandoff, fetchAccessSummary, fetchEntityTitles, fetchRecipientPhoneOnFile, fetchSecureDeliveryOptions, fetchShownToContext, forgetOrganizationMemberRows, forkSharedResource, getActiveOrgId, getClaimsUser, getPermissionLevelLabel, getPermissionLevelsAtOrAbove, getResourcePermissions, getResourceSharePath, getResourceTypeLabel, getResourceVisibility, getSearchEngineIndexedState, getShareCapabilities, getShareableResource, getSharedWithMe, grantCsvRow, grantCsvRows, grantLevelLabel, grantOrgAvailability, granteeKind, granteeLabel, granteeSecondaryLabel, hasPublicPage, humanAccessPanel, humanAccessSummary, humanGrantList, humanGrantRow, humanNotices, isForkable, isJsonObject, isKnownEntity, isPrivateSummary, isResourceOwner, listPermissions, listSentSecureDeliveries, listShareLinks, listTeamMembers, listTeams, makePrivate, makePublic, myPendingTableInvitations, onlyOpenOrganizations, openSecureDelivery, organizationDisambiguators, passThroughDispatch, peekTableShare, permissionLevelRank, publicLaneSelect, publicResourceUrl, readOrganizationMemberRows, readOutsideShare, reasonCsvRows, recordNoun, requestSecureDeliveryCode, resendOutside, resolveEntityHref, resolveResourceOwnership, resolveResourceToken, resolveShareToken, resolveSharingAuthority, resolveTableName, revokeAccess, revokeOrgAccess, revokeOutside, revokePublicAccess, revokeSecureDelivery, revokeShareLink, revokeUserAccess, satisfiesPermissionLevel, sendSecureDelivery, sendShareNotice, setResourceShownTo, setSearchEngineIndexed, setStoreLane, shareClient, shareLinkSecurityStateMatches, shareLinkUnavailableReason, shareLinkUrl, shareUrlForLink, shareWithOutsidePerson, shareWithUser, sharingHost, sharingLocation, shownToBlendedFilter, shownToFilter, shownToMyOrgsFilter, summaryReachLabel, supabase, updatePermissionLevel, validatePermission, viewSecureDelivery };
package/dist/core.js CHANGED
@@ -3376,10 +3376,10 @@ function getResourceSharePath(resourceType, resourceId) {
3376
3376
  }
3377
3377
 
3378
3378
  // src/core/levels.ts
3379
- import { isPermissionLevel, DB_PERMISSION_LEVELS, PERMISSION_LEVEL_RANK as PACKAGE_RANK, PERMISSION_LEVELS } from "@ai-matrx/data/access";
3379
+ import { DB_PERMISSION_LEVELS, PERMISSION_LEVEL_RANK as PACKAGE_RANK } from "@ai-matrx/data/access";
3380
3380
  import {
3381
- PERMISSION_LEVELS as PERMISSION_LEVELS2,
3382
- isPermissionLevel as isPermissionLevel2,
3381
+ PERMISSION_LEVELS,
3382
+ isPermissionLevel,
3383
3383
  PERMISSION_LEVEL_LABELS,
3384
3384
  PERMISSION_LEVEL_HINTS,
3385
3385
  PERMISSION_LEVEL_SHORT_LABELS,
@@ -3387,28 +3387,16 @@ import {
3387
3387
  isDbPermissionLevel,
3388
3388
  toDbPermissionLevel
3389
3389
  } from "@ai-matrx/data/access";
3390
- function normalizePermissionLevel(raw) {
3391
- if (raw === "edit_content") return "editor";
3392
- return isPermissionLevel(raw) ? raw : null;
3393
- }
3390
+ import { normalizePermissionLevel, parsePermissionLevel } from "@ai-matrx/data/access";
3394
3391
  var OFFERED_DB_PERMISSION_LEVELS = DB_PERMISSION_LEVELS;
3395
3392
  var PERMISSION_LEVEL_RANK = {
3396
3393
  ...PACKAGE_RANK,
3397
3394
  edit_content: PACKAGE_RANK.editor
3398
3395
  };
3399
- function parsePermissionLevel(raw, context) {
3400
- const level = normalizePermissionLevel(raw);
3401
- if (level) return level;
3402
- if (raw === null || raw === void 0) return null;
3403
- console.error(
3404
- `[permissions] ${context}: unrecognised permission level ${JSON.stringify(raw)}. Known levels are ${PERMISSION_LEVELS.join(", ")}. Add it to PERMISSION_LEVELS in utils/permissions/levels.ts (the package ladder is re-exported there) if the database gained a new value.`
3405
- );
3406
- return null;
3407
- }
3408
3396
  function permissionLevelRank(level) {
3409
3397
  const rank = PERMISSION_LEVEL_RANK[level];
3410
3398
  if (rank === void 0) {
3411
- console.error(`[permissions] no rank for permission level ${JSON.stringify(level)}. Add it to PERMISSION_LEVELS in utils/permissions/levels.ts.`);
3399
+ console.error(`[permissions] no rank for permission level ${JSON.stringify(level)}. Add it to PERMISSION_LEVELS in @ai-matrx/data/access (permissionLevels.ts).`);
3412
3400
  return Number.NaN;
3413
3401
  }
3414
3402
  return rank;
@@ -3419,8 +3407,8 @@ function satisfiesPermissionLevel(current, required) {
3419
3407
  return permissionLevelRank(current) >= permissionLevelRank(required);
3420
3408
  }
3421
3409
  function getPermissionLevelsAtOrAbove(level) {
3422
- const levelIndex = PERMISSION_LEVELS2.indexOf(level);
3423
- return [...PERMISSION_LEVELS2].slice(levelIndex);
3410
+ const levelIndex = PERMISSION_LEVELS.indexOf(level);
3411
+ return [...PERMISSION_LEVELS].slice(levelIndex);
3424
3412
  }
3425
3413
  function getPermissionLevelLabel(level) {
3426
3414
  return PERMISSION_LEVEL_LABELS[level] ?? `Unknown level (${level})`;
@@ -5231,7 +5219,7 @@ export {
5231
5219
  NO_GRANTS_HEADLINE,
5232
5220
  NO_GRANTS_YET_HEADLINE,
5233
5221
  OFFERED_DB_PERMISSION_LEVELS,
5234
- PERMISSION_LEVELS2 as PERMISSION_LEVELS,
5222
+ PERMISSION_LEVELS,
5235
5223
  PERMISSION_LEVEL_HINTS,
5236
5224
  PERMISSION_LEVEL_LABELS,
5237
5225
  PERMISSION_LEVEL_RANK,
@@ -5304,7 +5292,7 @@ export {
5304
5292
  isForkable,
5305
5293
  isJsonObject,
5306
5294
  isKnownEntity,
5307
- isPermissionLevel2 as isPermissionLevel,
5295
+ isPermissionLevel,
5308
5296
  isPrivateSummary,
5309
5297
  isResourceOwner,
5310
5298
  listPermissions,