@objectstack/platform-objects 6.8.1 → 6.9.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/audit/index.d.mts +128 -0
- package/dist/audit/index.d.ts +128 -0
- package/dist/identity/index.d.mts +160 -0
- package/dist/identity/index.d.ts +160 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +195 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +195 -1
- package/dist/index.mjs.map +1 -1
- package/dist/integration/index.d.mts +8 -0
- package/dist/integration/index.d.ts +8 -0
- package/dist/metadata/index.d.mts +16 -0
- package/dist/metadata/index.d.ts +16 -0
- package/dist/security/index.d.mts +3681 -1
- package/dist/security/index.d.ts +3681 -1
- package/dist/security/index.js +195 -0
- package/dist/security/index.js.map +1 -1
- package/dist/security/index.mjs +195 -1
- package/dist/security/index.mjs.map +1 -1
- package/dist/system/index.d.mts +24 -0
- package/dist/system/index.d.ts +24 -0
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3428,6 +3428,200 @@ var SysSharingRule = ObjectSchema.create({
|
|
|
3428
3428
|
{ fields: ["organization_id"] }
|
|
3429
3429
|
]
|
|
3430
3430
|
});
|
|
3431
|
+
var SysShareLink = ObjectSchema.create({
|
|
3432
|
+
name: "sys_share_link",
|
|
3433
|
+
label: "Share Link",
|
|
3434
|
+
pluralLabel: "Share Links",
|
|
3435
|
+
icon: "link-2",
|
|
3436
|
+
isSystem: true,
|
|
3437
|
+
managedBy: "system",
|
|
3438
|
+
description: "Opaque capability token granting access to a single record. Notion/Figma-style public link sharing.",
|
|
3439
|
+
titleFormat: "{object_name}/{record_id} ({permission})",
|
|
3440
|
+
compactLayout: ["object_name", "record_id", "permission", "audience", "expires_at", "revoked_at"],
|
|
3441
|
+
listViews: {
|
|
3442
|
+
active_links: {
|
|
3443
|
+
type: "grid",
|
|
3444
|
+
name: "active_links",
|
|
3445
|
+
label: "Active",
|
|
3446
|
+
data: { provider: "object", object: "sys_share_link" },
|
|
3447
|
+
columns: ["object_name", "record_id", "permission", "audience", "expires_at", "use_count", "last_used_at"],
|
|
3448
|
+
filter: [{ field: "revoked_at", operator: "isNull" }],
|
|
3449
|
+
sort: [{ field: "created_at", order: "desc" }],
|
|
3450
|
+
pagination: { pageSize: 100 }
|
|
3451
|
+
},
|
|
3452
|
+
by_me: {
|
|
3453
|
+
type: "grid",
|
|
3454
|
+
name: "by_me",
|
|
3455
|
+
label: "Created by Me",
|
|
3456
|
+
data: { provider: "object", object: "sys_share_link" },
|
|
3457
|
+
columns: ["object_name", "record_id", "permission", "audience", "expires_at", "revoked_at"],
|
|
3458
|
+
filter: [{ field: "created_by", operator: "equals", value: "{current_user_id}" }],
|
|
3459
|
+
sort: [{ field: "created_at", order: "desc" }],
|
|
3460
|
+
pagination: { pageSize: 100 }
|
|
3461
|
+
},
|
|
3462
|
+
revoked: {
|
|
3463
|
+
type: "grid",
|
|
3464
|
+
name: "revoked",
|
|
3465
|
+
label: "Revoked",
|
|
3466
|
+
data: { provider: "object", object: "sys_share_link" },
|
|
3467
|
+
columns: ["object_name", "record_id", "revoked_at", "created_by"],
|
|
3468
|
+
filter: [{ field: "revoked_at", operator: "isNotNull" }],
|
|
3469
|
+
sort: [{ field: "revoked_at", order: "desc" }],
|
|
3470
|
+
pagination: { pageSize: 50 }
|
|
3471
|
+
},
|
|
3472
|
+
all_links: {
|
|
3473
|
+
type: "grid",
|
|
3474
|
+
name: "all_links",
|
|
3475
|
+
label: "All",
|
|
3476
|
+
data: { provider: "object", object: "sys_share_link" },
|
|
3477
|
+
columns: ["object_name", "record_id", "permission", "audience", "expires_at", "revoked_at", "created_at"],
|
|
3478
|
+
sort: [{ field: "created_at", order: "desc" }],
|
|
3479
|
+
pagination: { pageSize: 200 }
|
|
3480
|
+
}
|
|
3481
|
+
},
|
|
3482
|
+
fields: {
|
|
3483
|
+
id: Field.text({
|
|
3484
|
+
label: "Link ID",
|
|
3485
|
+
required: true,
|
|
3486
|
+
readonly: true,
|
|
3487
|
+
group: "System"
|
|
3488
|
+
}),
|
|
3489
|
+
// ── Token (the secret) ───────────────────────────────────────
|
|
3490
|
+
token: Field.text({
|
|
3491
|
+
label: "Token",
|
|
3492
|
+
required: true,
|
|
3493
|
+
maxLength: 64,
|
|
3494
|
+
description: "Opaque URL-safe random token (\u2265 22 chars). The only secret in this row.",
|
|
3495
|
+
group: "Token"
|
|
3496
|
+
}),
|
|
3497
|
+
// ── Target ───────────────────────────────────────────────────
|
|
3498
|
+
object_name: Field.text({
|
|
3499
|
+
label: "Object",
|
|
3500
|
+
required: true,
|
|
3501
|
+
maxLength: 100,
|
|
3502
|
+
description: "Short object name of the shared record (e.g. ai_conversation, contracts_contract)",
|
|
3503
|
+
group: "Target"
|
|
3504
|
+
}),
|
|
3505
|
+
record_id: Field.text({
|
|
3506
|
+
label: "Record",
|
|
3507
|
+
required: true,
|
|
3508
|
+
maxLength: 100,
|
|
3509
|
+
description: "Primary key of the shared record within object_name",
|
|
3510
|
+
group: "Target"
|
|
3511
|
+
}),
|
|
3512
|
+
// ── Access Policy ────────────────────────────────────────────
|
|
3513
|
+
permission: Field.select(
|
|
3514
|
+
[
|
|
3515
|
+
{ label: "View", value: "view" },
|
|
3516
|
+
{ label: "Comment", value: "comment" },
|
|
3517
|
+
{ label: "Edit", value: "edit" }
|
|
3518
|
+
],
|
|
3519
|
+
{
|
|
3520
|
+
label: "Permission",
|
|
3521
|
+
required: true,
|
|
3522
|
+
defaultValue: "view",
|
|
3523
|
+
description: "What the link holder can do with the record",
|
|
3524
|
+
group: "Access Policy"
|
|
3525
|
+
}
|
|
3526
|
+
),
|
|
3527
|
+
audience: Field.select(
|
|
3528
|
+
[
|
|
3529
|
+
{ label: "Public (indexable)", value: "public" },
|
|
3530
|
+
{ label: "Anyone with the link", value: "link_only" },
|
|
3531
|
+
{ label: "Signed-in users", value: "signed_in" },
|
|
3532
|
+
{ label: "Specific emails", value: "email" }
|
|
3533
|
+
],
|
|
3534
|
+
{
|
|
3535
|
+
label: "Audience",
|
|
3536
|
+
required: true,
|
|
3537
|
+
defaultValue: "link_only",
|
|
3538
|
+
description: "Gating layer applied on top of the token check",
|
|
3539
|
+
group: "Access Policy"
|
|
3540
|
+
}
|
|
3541
|
+
),
|
|
3542
|
+
expires_at: Field.datetime({
|
|
3543
|
+
label: "Expires At",
|
|
3544
|
+
description: "When set, resolveToken returns null after this timestamp",
|
|
3545
|
+
group: "Access Policy"
|
|
3546
|
+
}),
|
|
3547
|
+
email_allowlist: Field.json({
|
|
3548
|
+
label: "Email Allowlist",
|
|
3549
|
+
description: "Lowercased addresses checked when audience=email",
|
|
3550
|
+
group: "Access Policy"
|
|
3551
|
+
}),
|
|
3552
|
+
password_hash: Field.text({
|
|
3553
|
+
label: "Password Hash",
|
|
3554
|
+
maxLength: 256,
|
|
3555
|
+
description: "Argon2/bcrypt hash. When set, the UI prompts for a password before rendering.",
|
|
3556
|
+
group: "Access Policy"
|
|
3557
|
+
}),
|
|
3558
|
+
redact_fields: Field.json({
|
|
3559
|
+
label: "Per-Link Redactions",
|
|
3560
|
+
description: "Extra fields stripped from the response, on top of the object-default set",
|
|
3561
|
+
group: "Access Policy"
|
|
3562
|
+
}),
|
|
3563
|
+
label: Field.text({
|
|
3564
|
+
label: "Label",
|
|
3565
|
+
maxLength: 200,
|
|
3566
|
+
description: 'Free-text shown in the share dialog (e.g. "ACME Q3 contract")',
|
|
3567
|
+
group: "Metadata"
|
|
3568
|
+
}),
|
|
3569
|
+
// ── Lifecycle ────────────────────────────────────────────────
|
|
3570
|
+
revoked_at: Field.datetime({
|
|
3571
|
+
label: "Revoked At",
|
|
3572
|
+
readonly: true,
|
|
3573
|
+
description: "When set, the link is permanently disabled",
|
|
3574
|
+
group: "Lifecycle"
|
|
3575
|
+
}),
|
|
3576
|
+
created_by: Field.lookup("sys_user", {
|
|
3577
|
+
label: "Created By",
|
|
3578
|
+
readonly: true,
|
|
3579
|
+
description: "Issuer of the link",
|
|
3580
|
+
group: "Lifecycle"
|
|
3581
|
+
}),
|
|
3582
|
+
created_at: Field.datetime({
|
|
3583
|
+
label: "Created At",
|
|
3584
|
+
required: true,
|
|
3585
|
+
defaultValue: "NOW()",
|
|
3586
|
+
readonly: true,
|
|
3587
|
+
group: "Lifecycle"
|
|
3588
|
+
}),
|
|
3589
|
+
last_used_at: Field.datetime({
|
|
3590
|
+
label: "Last Used At",
|
|
3591
|
+
readonly: true,
|
|
3592
|
+
description: "Stamped by resolveToken; used by the dashboard to highlight active links",
|
|
3593
|
+
group: "Lifecycle"
|
|
3594
|
+
}),
|
|
3595
|
+
use_count: Field.number({
|
|
3596
|
+
label: "Use Count",
|
|
3597
|
+
defaultValue: 0,
|
|
3598
|
+
readonly: true,
|
|
3599
|
+
description: "Incremented by resolveToken on every successful resolution",
|
|
3600
|
+
group: "Lifecycle"
|
|
3601
|
+
})
|
|
3602
|
+
},
|
|
3603
|
+
indexes: [
|
|
3604
|
+
// Hot path: resolveToken — one row lookup per public request.
|
|
3605
|
+
{ fields: ["token"], unique: true },
|
|
3606
|
+
// Management UI: "all links for this record".
|
|
3607
|
+
{ fields: ["object_name", "record_id"] },
|
|
3608
|
+
// "Active links I issued".
|
|
3609
|
+
{ fields: ["created_by", "revoked_at"] },
|
|
3610
|
+
// Reaper for expired rows (background sweep).
|
|
3611
|
+
{ fields: ["expires_at"] }
|
|
3612
|
+
],
|
|
3613
|
+
enable: {
|
|
3614
|
+
trackHistory: false,
|
|
3615
|
+
searchable: false,
|
|
3616
|
+
apiEnabled: true,
|
|
3617
|
+
// The /api/v1/share-links endpoints are the authoritative surface;
|
|
3618
|
+
// the generic data API is exposed read-only for the admin grid.
|
|
3619
|
+
apiMethods: ["get", "list"],
|
|
3620
|
+
trash: false,
|
|
3621
|
+
mru: false,
|
|
3622
|
+
clone: false
|
|
3623
|
+
}
|
|
3624
|
+
});
|
|
3431
3625
|
var BETTER_AUTH_MANAGED_OBJECTS = [
|
|
3432
3626
|
"sys_user",
|
|
3433
3627
|
"sys_account",
|
|
@@ -19088,6 +19282,6 @@ var SetupAppTranslations = {
|
|
|
19088
19282
|
"es-ES": esES
|
|
19089
19283
|
};
|
|
19090
19284
|
|
|
19091
|
-
export { SETUP_APP, STUDIO_APP, SetupAppTranslations, SysAccount, SysActivity, SysApiKey, SysApprovalAction, SysApprovalProcess, SysApprovalRequest, SysAttachment, SysAuditLog, SysComment, SysDepartment, SysDepartmentMember, SysDeviceCode, SysEmail, SysEmailTemplate, SysInvitation, SysJob, SysJobQueue, SysJobRun, SysJwks, SysMember, SysMetadataObject as SysMetadata, SysMetadataHistoryObject, SysMetadataObject, SysNotification, SysOauthAccessToken, SysOauthApplication, SysOauthConsent, SysOauthRefreshToken, SysOrganization, SysPermissionSet, SysPresence, SysRecordShare, SysReportSchedule, SysRole, SysRolePermissionSet, SysSavedReport, SysSecret, SysSession, SysSetting, SysSettingAudit, SysSharingRule, SysTeam, SysTeamMember, SysTwoFactor, SysUser, SysUserPermissionSet, SysUserPreference, SysVerification, SysWebhook, SystemOverviewDashboard, defaultPermissionSets, en, esES, jaJP, zhCN };
|
|
19285
|
+
export { SETUP_APP, STUDIO_APP, SetupAppTranslations, SysAccount, SysActivity, SysApiKey, SysApprovalAction, SysApprovalProcess, SysApprovalRequest, SysAttachment, SysAuditLog, SysComment, SysDepartment, SysDepartmentMember, SysDeviceCode, SysEmail, SysEmailTemplate, SysInvitation, SysJob, SysJobQueue, SysJobRun, SysJwks, SysMember, SysMetadataObject as SysMetadata, SysMetadataHistoryObject, SysMetadataObject, SysNotification, SysOauthAccessToken, SysOauthApplication, SysOauthConsent, SysOauthRefreshToken, SysOrganization, SysPermissionSet, SysPresence, SysRecordShare, SysReportSchedule, SysRole, SysRolePermissionSet, SysSavedReport, SysSecret, SysSession, SysSetting, SysSettingAudit, SysShareLink, SysSharingRule, SysTeam, SysTeamMember, SysTwoFactor, SysUser, SysUserPermissionSet, SysUserPreference, SysVerification, SysWebhook, SystemOverviewDashboard, defaultPermissionSets, en, esES, jaJP, zhCN };
|
|
19092
19286
|
//# sourceMappingURL=index.mjs.map
|
|
19093
19287
|
//# sourceMappingURL=index.mjs.map
|