@sylphx/sdk 0.3.7 → 0.4.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.cts CHANGED
@@ -19946,6 +19946,16 @@ declare class SylphxError extends Error {
19946
19946
  static isRateLimited(err: unknown): err is SylphxError & {
19947
19947
  code: 'TOO_MANY_REQUESTS';
19948
19948
  };
19949
+ /**
19950
+ * Check if error is an account lockout error (too many failed login attempts).
19951
+ * When true, `error.data?.lockoutUntil` contains the ISO 8601 timestamp when the lockout expires.
19952
+ */
19953
+ static isAccountLocked(err: unknown): err is SylphxError & {
19954
+ code: 'TOO_MANY_REQUESTS';
19955
+ data: {
19956
+ lockoutUntil: string | null;
19957
+ };
19958
+ };
19949
19959
  /**
19950
19960
  * Check if error is a quota exceeded error (plan limit reached)
19951
19961
  */
@@ -21353,11 +21363,16 @@ interface RegisterInput {
21353
21363
  }
21354
21364
  /**
21355
21365
  * Org context claims present in org-scoped tokens.
21366
+ *
21367
+ * After switch-org, the JWT includes `org_permissions` — a flat array of
21368
+ * resolved RBAC permission keys for the member in that org.
21356
21369
  */
21357
21370
  interface OrgTokenPayload {
21358
21371
  org_id: string;
21359
21372
  org_slug: string;
21360
21373
  org_role: string;
21374
+ /** RBAC: resolved permission keys (e.g. ["org:members:read", "payroll:approve"]) */
21375
+ org_permissions?: string[];
21361
21376
  }
21362
21377
  /**
21363
21378
  * Invite a user request payload.
@@ -23788,6 +23803,350 @@ declare function canManageSettings(membership: OrganizationMembership | null): b
23788
23803
  */
23789
23804
  declare function canDeleteOrganization(membership: OrganizationMembership | null): boolean;
23790
23805
 
23806
+ /**
23807
+ * Permission Functions
23808
+ *
23809
+ * Pure functions for permission management — no hidden state.
23810
+ * Each function takes config as the first parameter.
23811
+ *
23812
+ * Uses REST API at /permissions/* for project-scoped operations.
23813
+ * Uses REST API at /orgs/{orgId}/members/{memberId}/permissions for member checks.
23814
+ *
23815
+ * Types are self-contained (not dependent on generated OpenAPI spec) because
23816
+ * the RBAC routes were added after the last spec generation.
23817
+ */
23818
+
23819
+ /**
23820
+ * A permission definition within a project.
23821
+ *
23822
+ * Permissions are the atomic building blocks of RBAC roles.
23823
+ * They use colon-separated keys (e.g. "org:members:read", "payroll:approve").
23824
+ */
23825
+ interface Permission {
23826
+ /** Prefixed permission ID (e.g. "perm_xxx") */
23827
+ id: string;
23828
+ /** Unique key within the project (e.g. "org:members:read") */
23829
+ key: string;
23830
+ /** Human-readable name */
23831
+ name: string;
23832
+ /** Optional description */
23833
+ description: string | null;
23834
+ /** Whether this is a system-defined permission (immutable) */
23835
+ isSystem: boolean;
23836
+ /** ISO 8601 creation timestamp */
23837
+ createdAt: string;
23838
+ }
23839
+ /**
23840
+ * Input for creating a custom permission.
23841
+ */
23842
+ interface CreatePermissionInput {
23843
+ /** Unique key — colon-separated lowercase segments (e.g. "org:leave:approve") */
23844
+ key: string;
23845
+ /** Human-readable name */
23846
+ name: string;
23847
+ /** Optional description */
23848
+ description?: string;
23849
+ }
23850
+ /**
23851
+ * Resolved permissions for a member, including their assigned role.
23852
+ */
23853
+ interface MemberPermissionsResult {
23854
+ /** Prefixed user ID of the member */
23855
+ memberId: string;
23856
+ /** Assigned role (null if no role assigned) */
23857
+ role: {
23858
+ key: string;
23859
+ name: string;
23860
+ } | null;
23861
+ /** Flattened, deduplicated permission keys from all assigned roles */
23862
+ permissions: string[];
23863
+ }
23864
+ /**
23865
+ * List all permissions for the current project.
23866
+ *
23867
+ * Returns both system-defined and custom permissions.
23868
+ * Requires a secret key (server-side only).
23869
+ *
23870
+ * @example
23871
+ * ```typescript
23872
+ * const { permissions } = await listPermissions(config)
23873
+ * console.log(permissions.map(p => p.key))
23874
+ * // ['org:members:read', 'org:members:manage', 'payroll:view', ...]
23875
+ * ```
23876
+ */
23877
+ declare function listPermissions(config: SylphxConfig): Promise<{
23878
+ permissions: Permission[];
23879
+ }>;
23880
+ /**
23881
+ * Create a custom permission for the project.
23882
+ *
23883
+ * Permission keys must be colon-separated lowercase segments
23884
+ * (e.g. "org:leave:approve", "payroll:run").
23885
+ * Requires a secret key (server-side only).
23886
+ *
23887
+ * @example
23888
+ * ```typescript
23889
+ * const { permission } = await createPermission(config, {
23890
+ * key: 'payroll:approve',
23891
+ * name: 'Approve Payroll',
23892
+ * description: 'Can approve payroll runs for the organization',
23893
+ * })
23894
+ * ```
23895
+ */
23896
+ declare function createPermission(config: SylphxConfig, input: CreatePermissionInput): Promise<{
23897
+ permission: Permission;
23898
+ }>;
23899
+ /**
23900
+ * Delete a custom permission by key.
23901
+ *
23902
+ * System permissions cannot be deleted.
23903
+ * Role-permission assignments are removed automatically via cascading delete.
23904
+ * Requires a secret key (server-side only).
23905
+ *
23906
+ * @example
23907
+ * ```typescript
23908
+ * const { success } = await deletePermission(config, 'payroll:approve')
23909
+ * ```
23910
+ */
23911
+ declare function deletePermission(config: SylphxConfig, permissionKey: string): Promise<{
23912
+ success: boolean;
23913
+ }>;
23914
+ /**
23915
+ * Get a member's resolved permissions within an organization.
23916
+ *
23917
+ * Returns the flattened, deduplicated set of permission keys from all
23918
+ * roles assigned to the member. Also returns their current role info.
23919
+ * Requires the caller to be a member of the same organization.
23920
+ *
23921
+ * @example
23922
+ * ```typescript
23923
+ * const result = await getMemberPermissions(config, 'my-org', 'usr_abc123')
23924
+ * console.log(result.permissions)
23925
+ * // ['org:members:read', 'payroll:view', 'payroll:approve']
23926
+ * console.log(result.role)
23927
+ * // { key: 'hr_manager', name: 'HR Manager' }
23928
+ * ```
23929
+ */
23930
+ declare function getMemberPermissions(config: SylphxConfig, orgIdOrSlug: string, memberId: string): Promise<MemberPermissionsResult>;
23931
+ /**
23932
+ * Check if a permission set includes a specific permission.
23933
+ *
23934
+ * Pure function — no API call. Use with permissions from JWT claims
23935
+ * (org_permissions) or from getMemberPermissions().
23936
+ *
23937
+ * @example
23938
+ * ```typescript
23939
+ * const permissions = ['org:members:read', 'payroll:view']
23940
+ * hasPermission(permissions, 'payroll:view') // true
23941
+ * hasPermission(permissions, 'payroll:approve') // false
23942
+ * ```
23943
+ */
23944
+ declare function hasPermission(permissions: string[], required: string): boolean;
23945
+ /**
23946
+ * Check if a permission set includes ANY of the required permissions.
23947
+ *
23948
+ * Pure function — no API call. Returns true if at least one of the
23949
+ * required permissions is present.
23950
+ *
23951
+ * @example
23952
+ * ```typescript
23953
+ * const permissions = ['org:members:read', 'payroll:view']
23954
+ * hasAnyPermission(permissions, ['payroll:view', 'payroll:approve']) // true
23955
+ * hasAnyPermission(permissions, ['admin:full', 'super:admin']) // false
23956
+ * ```
23957
+ */
23958
+ declare function hasAnyPermission(permissions: string[], required: string[]): boolean;
23959
+ /**
23960
+ * Check if a permission set includes ALL of the required permissions.
23961
+ *
23962
+ * Pure function — no API call. Returns true only if every required
23963
+ * permission is present.
23964
+ *
23965
+ * @example
23966
+ * ```typescript
23967
+ * const permissions = ['org:members:read', 'payroll:view', 'payroll:approve']
23968
+ * hasAllPermissions(permissions, ['payroll:view', 'payroll:approve']) // true
23969
+ * hasAllPermissions(permissions, ['payroll:view', 'admin:full']) // false
23970
+ * ```
23971
+ */
23972
+ declare function hasAllPermissions(permissions: string[], required: string[]): boolean;
23973
+
23974
+ /**
23975
+ * Role Functions
23976
+ *
23977
+ * Pure functions for role management — no hidden state.
23978
+ * Each function takes config as the first parameter.
23979
+ *
23980
+ * Uses REST API at /roles/* for project-scoped operations.
23981
+ * Uses REST API at /orgs/{orgId}/members/{memberId}/assign-role for assignment.
23982
+ *
23983
+ * Types are self-contained (not dependent on generated OpenAPI spec) because
23984
+ * the RBAC routes were added after the last spec generation.
23985
+ */
23986
+
23987
+ /**
23988
+ * A role definition within a project.
23989
+ *
23990
+ * Roles bundle permissions into named groups that can be assigned to
23991
+ * organization members (e.g. "HR Manager", "Payroll Admin").
23992
+ */
23993
+ interface Role {
23994
+ /** Prefixed role ID (e.g. "role_xxx") */
23995
+ id: string;
23996
+ /** Unique key within the project (e.g. "hr_manager") */
23997
+ key: string;
23998
+ /** Human-readable name */
23999
+ name: string;
24000
+ /** Optional description */
24001
+ description: string | null;
24002
+ /** Whether this is a system-defined role (metadata immutable) */
24003
+ isSystem: boolean;
24004
+ /** Whether this role is automatically assigned to new org members */
24005
+ isDefault: boolean;
24006
+ /** Display order (lower = higher priority) */
24007
+ sortOrder: number;
24008
+ /** Permission keys assigned to this role */
24009
+ permissions: string[];
24010
+ /** ISO 8601 creation timestamp */
24011
+ createdAt: string;
24012
+ /** ISO 8601 update timestamp (present on roles route response) */
24013
+ updatedAt?: string;
24014
+ }
24015
+ /**
24016
+ * Input for creating a custom role.
24017
+ */
24018
+ interface CreateRoleInput {
24019
+ /** Unique key — lowercase alphanumeric with underscores (e.g. "hr_manager") */
24020
+ key: string;
24021
+ /** Human-readable name */
24022
+ name: string;
24023
+ /** Optional description */
24024
+ description?: string;
24025
+ /** Permission keys to assign to this role */
24026
+ permissions?: string[];
24027
+ /** Whether to auto-assign to new org members */
24028
+ isDefault?: boolean;
24029
+ /** Display order (lower = higher priority) */
24030
+ sortOrder?: number;
24031
+ }
24032
+ /**
24033
+ * Input for updating an existing role.
24034
+ *
24035
+ * System role metadata (name, description) is immutable, but their
24036
+ * permissions can be changed.
24037
+ */
24038
+ interface UpdateRoleInput {
24039
+ /** Human-readable name (ignored for system roles) */
24040
+ name?: string;
24041
+ /** Description (ignored for system roles) */
24042
+ description?: string | null;
24043
+ /** Permission keys to assign (replaces existing) */
24044
+ permissions?: string[];
24045
+ /** Whether to auto-assign to new org members */
24046
+ isDefault?: boolean;
24047
+ /** Display order */
24048
+ sortOrder?: number;
24049
+ }
24050
+ /**
24051
+ * List all roles for the current project.
24052
+ *
24053
+ * Returns both system-defined and custom roles, each with their
24054
+ * assigned permission keys. Requires a secret key (server-side only).
24055
+ *
24056
+ * @example
24057
+ * ```typescript
24058
+ * const { roles } = await listRoles(config)
24059
+ * for (const role of roles) {
24060
+ * console.log(`${role.name}: ${role.permissions.join(', ')}`)
24061
+ * }
24062
+ * ```
24063
+ */
24064
+ declare function listRoles(config: SylphxConfig): Promise<{
24065
+ roles: Role[];
24066
+ }>;
24067
+ /**
24068
+ * Get a single role by key, including its assigned permission keys.
24069
+ *
24070
+ * Requires a secret key (server-side only).
24071
+ *
24072
+ * @example
24073
+ * ```typescript
24074
+ * const { role } = await getRole(config, 'hr_manager')
24075
+ * console.log(role.permissions)
24076
+ * // ['org:members:read', 'payroll:view', 'payroll:approve']
24077
+ * ```
24078
+ */
24079
+ declare function getRole(config: SylphxConfig, roleKey: string): Promise<{
24080
+ role: Role;
24081
+ }>;
24082
+ /**
24083
+ * Create a custom role with optional permission assignments.
24084
+ *
24085
+ * Role keys must be lowercase alphanumeric with underscores
24086
+ * (e.g. "hr_manager", "payroll_admin").
24087
+ * Requires a secret key (server-side only).
24088
+ *
24089
+ * @example
24090
+ * ```typescript
24091
+ * const { role } = await createRole(config, {
24092
+ * key: 'hr_manager',
24093
+ * name: 'HR Manager',
24094
+ * description: 'Can manage employees and approve leave',
24095
+ * permissions: ['org:members:read', 'leave:approve', 'payroll:view'],
24096
+ * })
24097
+ * ```
24098
+ */
24099
+ declare function createRole(config: SylphxConfig, input: CreateRoleInput): Promise<{
24100
+ role: Role;
24101
+ }>;
24102
+ /**
24103
+ * Update a role's metadata and/or permission assignments.
24104
+ *
24105
+ * System role metadata (name, description) is immutable, but their
24106
+ * permissions can be changed. Passing `permissions` replaces the
24107
+ * entire permission set for the role.
24108
+ * Requires a secret key (server-side only).
24109
+ *
24110
+ * @example
24111
+ * ```typescript
24112
+ * const { role } = await updateRole(config, 'hr_manager', {
24113
+ * permissions: ['org:members:read', 'org:members:manage', 'leave:approve'],
24114
+ * })
24115
+ * ```
24116
+ */
24117
+ declare function updateRole(config: SylphxConfig, roleKey: string, input: UpdateRoleInput): Promise<{
24118
+ role: Role;
24119
+ }>;
24120
+ /**
24121
+ * Delete a custom role by key.
24122
+ *
24123
+ * System roles cannot be deleted. Roles with active member assignments
24124
+ * cannot be deleted — reassign members first.
24125
+ * Requires a secret key (server-side only).
24126
+ *
24127
+ * @example
24128
+ * ```typescript
24129
+ * const { success } = await deleteRole(config, 'hr_manager')
24130
+ * ```
24131
+ */
24132
+ declare function deleteRole(config: SylphxConfig, roleKey: string): Promise<{
24133
+ success: boolean;
24134
+ }>;
24135
+ /**
24136
+ * Assign an RBAC role to an organization member.
24137
+ *
24138
+ * Replaces any existing role assignment (single-role mode).
24139
+ * Requires admin access to the organization.
24140
+ *
24141
+ * @example
24142
+ * ```typescript
24143
+ * const { success } = await assignMemberRole(config, 'my-org', 'usr_abc123', 'hr_manager')
24144
+ * ```
24145
+ */
24146
+ declare function assignMemberRole(config: SylphxConfig, orgIdOrSlug: string, memberId: string, roleKey: string): Promise<{
24147
+ success: boolean;
24148
+ }>;
24149
+
23791
24150
  /**
23792
24151
  * Secrets SDK
23793
24152
  *
@@ -25786,4 +26145,4 @@ declare const WorkersClient: {
25786
26145
  }): Promise<WorkerResult>;
25787
26146
  };
25788
26147
 
25789
- export { ACHIEVEMENT_TIER_CONFIG, type AIListModelsOptions, type AIListModelsResponse, type AIMessage, type AIMessageRole, type AIModel, type AIModelInfo, type AIModelsResponse, type AIProvider, type AIRateLimitInfo, type AIRateLimitResponse, type AIRequestType, type AIStreamChunk, type AITool, type AIToolCall, type AIUsageResponse, type AIUsageStats, type AccessTokenPayload, type AchievementCategory, type AchievementCriteria, type AchievementCriterion, type AchievementDefinition, type AchievementTier, type AchievementType, type AchievementUnlockEvent, type AdminUser, AuthenticationError, AuthorizationError, type BalanceResponse, type BatchEvent, type BatchIndexInput, type BatchIndexResult, type Breadcrumb, type BuildLog, type BuildLogHistoryResponse, type CaptureExceptionRequest, type CaptureMessageRequest, type ChatCompletionInput, type ChatCompletionResponse, type ChatInput, type ChatMessage, type ChatResult, type ChatStreamChunk, type CheckoutRequest, type CheckoutResponse, type CircuitBreakerConfig, CircuitBreakerOpenError, type CircuitState, type CommandResult, type ConsentCategory, type ConsentHistoryEntry, type ConsentHistoryResult, type ConsentPurposeDefaults, type ConsentType, type ContentPart, type CreateOrgInput, type CriteriaOperator, type CronInput, type CronSchedule, type DatabaseConnectionInfo, type DatabaseStatus, type DatabaseStatusInfo, type DebugCategory, type DeduplicationConfig, type DeleteDocumentInput, type DeployHistoryResponse, type DeployInfo, type DeployStatus, type DynamicRestClient, ERROR_CODE_STATUS, type EmbedInput, type EmbedResult, type EmbeddingInput, type EmbeddingResponse, type LeaderboardEntry as EngagementLeaderboardEntry, type LeaderboardResult as EngagementLeaderboardResult, type EnvVar, type ErrorCode, type ErrorResponse, type ExceptionFrame, type ExceptionValue, type ExecOptions, type FacetsResponse, type FileInfo, type FileUploadOptions, type FlagContext, type FlagResult, type GetConsentHistoryInput, type GetConsentsInput, type GetFacetsInput, type GetSecretInput, type GetSecretResult, type GetSecretsInput, type GetSecretsResult, type IdentifyInput, type IndexDocumentInput, type IndexDocumentResult, type InviteMemberInput, type InviteUserRequest, type InviteUserResponse, type KvExpireRequest, type KvHgetRequest, type KvHgetallRequest, type KvHsetRequest, type KvIncrRequest, type KvLpushRequest, type KvLrangeRequest, type KvMgetRequest, type KvMsetRequest, type KvRateLimitRequest, type KvRateLimitResult, type KvScanOptions, type KvScanResult, type KvSetOptions, type KvSetRequest, type KvZMember, type KvZaddRequest, type KvZrangeRequest, type LeaderboardAggregation, type LeaderboardDefinition, type LeaderboardEntry$1 as LeaderboardEntry, type LeaderboardOptions, type LeaderboardQueryOptions, type LeaderboardResetPeriod, type LeaderboardResult$1 as LeaderboardResult, type LeaderboardSortDirection, type LinkAnonymousConsentsInput, type ListScheduledEmailsOptions, type ListSecretKeysInput, type ListUsersOptions, type ListUsersResult, type ListWorkersOptions, type ListWorkersResult, type LoginHistoryEntry, type LoginRequest, type LoginResponse, type MeResponse, type MonitoringResponse, type MonitoringSeverity, type NativeStepContext, type NativeTaskDefinition, type TaskRunStatus as NativeTaskRunStatus, NetworkError, NotFoundError, type OrgRole, type OrgTokenPayload, type Organization, type OrganizationInvitation, type OrganizationMember, type OrganizationMembership, type PageInput, type PaginatedResponse, type PaginationInput, type ParsedKey, type Plan, type PortalRequest, type PortalResponse, type PushNotification, type PushNotificationPayload, type PushServiceWorkerConfig, type PushSubscription, RETRYABLE_CODES, RateLimitError, type RealtimeEmitRequest, type RealtimeEmitResponse, type RealtimeHistoryRequest, type RealtimeHistoryResponse, type RecordActivityInput, type RecordActivityResult, type RedeemReferralInput, type RedeemResult, type ReferralCode, type ReferralStats, type RegisterInput, type RegisterRequest, type RegisterResponse, type RestClient, type RestClientConfig, type RestDynamicConfig, type paths as RestPaths, type RetryConfig, type RevokeTokenOptions, type RollbackDeployRequest, type RunWorkerOptions, SandboxClient, type SandboxFile, type SandboxOptions, type ScheduleEmailOptions, type ScheduledEmail, type ScheduledEmailStats, type ScheduledEmailsResult, type SearchInput, type SearchResponse, type SearchResultItem, type SearchStatsResult, type SearchType, type SecretKeyInfo, type SecuritySettings, type SendEmailOptions, type SendResult, type SendTemplatedEmailOptions, type SendToUserOptions, type SessionResult, type SetConsentsInput, type SetEnvVarRequest, type SignedUrlOptions, type SignedUrlResult, StepCompleteSignal, StepSleepSignal, type StreakDefinition, type StreakFrequency, type StreakState, type StreamMessage, type SubmitScoreInput, type SubmitScoreResult, type Subscription, type SuccessResponse, type SylphxConfig, type SylphxConfigInput, SylphxError, type SylphxErrorCode, type SylphxErrorOptions, type TaskInput, type TaskResult, type TaskStatus, type TextCompletionInput, type TextCompletionResponse, TimeoutError, type TokenIntrospectionResult, type TokenResponse, type Tool, type ToolCall, type TrackClickInput, type TrackInput, type TriggerDeployRequest, type TwoFactorVerifyRequest, type UpdateOrgInput, type UploadProgressEvent, type UploadResult, type UpsertDocumentInput, type UpsertDocumentResult, type UsageResponse, type User, type UserAchievement, type UserConsent, type UserProfile, ValidationError, type VisionInput, type WebhookConfig, type WebhookConfigUpdate, type WebhookDeliveriesResult, type WebhookDelivery, type WebhookStats, WorkerHandle, type WorkerLogsResult, type WorkerResourceSpec, type WorkerResult, type WorkerRun, type WorkerStatus, type WorkerVolumeMount, WorkersClient, acceptAllConsents, acceptOrganizationInvitation, batchIndex, canDeleteOrganization, canManageMembers, canManageSettings, cancelScheduledEmail, cancelTask, captureException, captureExceptionRaw, captureMessage, chat, chatStream, checkFlag, complete, createCheckout, createConfig, createCron, createDynamicRestClient, createOrganization, createPortalSession, createRestClient, createServiceWorkerScript, createStepContext, createTasksHandler, createTracker, debugError, debugLog, debugTimer, debugWarn, declineOptionalConsents, deleteCron, deleteDocument, deleteEnvVar, deleteFile, deleteOrganization, deleteUser, disableDebug, embed, enableDebug, exponentialBackoff, extendedSignUp, forgotPassword, generateAnonymousId, getAchievement, getAchievementPoints, getAchievements, getAllFlags, getAllSecrets, getAllStreaks, getBillingBalance, getBillingUsage, getBuildLogHistory, getCircuitBreakerState, getConsentHistory, getConsentTypes, getDatabaseConnectionString, getDatabaseStatus, getDebugMode, getDeployHistory, getDeployStatus, getErrorCode, getErrorMessage, getFacets, getFileInfo, getFileUrl, getFlagPayload, getFlags, getLeaderboard, getMyReferralCode, getOrganization, getOrganizationInvitations, getOrganizationMembers, getOrganizations, getPlans, getPushPreferences, getRealtimeHistory, getReferralLeaderboard, getReferralStats, getRestErrorMessage, getScheduledEmail, getScheduledEmailStats, getSearchStats, getSecret, getSecrets, getSession, getSignedUrl, getStreak, getSubscription, getTask, getUser, getUserByEmail, getUserConsents, getUserLeaderboardRank, getVariant, getWebhookConfig, getWebhookDeliveries, getWebhookDelivery, getWebhookStats, hasConsent, hasError, hasRole, hasSecret, identify, incrementAchievementProgress, indexDocument, initPushServiceWorker, installGlobalDebugHelpers, introspectToken, inviteOrganizationMember, inviteUser, isEmailConfigured, isEnabled, isRetryableError, isSylphxError, kvDelete, kvExists, kvExpire, kvGet, kvGetJSON, kvHget, kvHgetall, kvHset, kvIncr, kvLpush, kvLrange, kvMget, kvMset, kvRateLimit, kvScan, kvSet, kvSetJSON, kvZadd, kvZrange, leaveOrganization, linkAnonymousConsents, listEnvVars, listScheduledEmails, listSecretKeys, listTasks, listUsers, page, parseKey, pauseCron, realtimeEmit, recordStreakActivity, recoverStreak, redeemReferralCode, refreshToken, regenerateReferralCode, registerPush, registerPushServiceWorker, removeOrganizationMember, replayWebhookDelivery, rescheduleEmail, resetCircuitBreaker, resetDebugModeCache, resetPassword, resumeCron, revokeAllTokens, revokeOrganizationInvitation, revokeToken, rollbackDeploy, scheduleEmail, scheduleTask, search, sendEmail, sendEmailToUser, sendPush, sendTemplatedEmail, setConsents, setEnvVar, signIn, signOut, signUp, streamToString, submitScore, suspendUser, switchOrg, toSylphxError, track, trackBatch, trackClick, triggerDeploy, unlockAchievement, unregisterPush, updateOrganization, updateOrganizationMemberRole, updatePushPreferences, updateUser, updateUserMetadata, updateWebhookConfig, uploadAvatar, uploadFile, upsertDocument, verifyEmail, verifySignature as verifyTaskSignature, verifyTwoFactor, withToken };
26148
+ export { ACHIEVEMENT_TIER_CONFIG, type AIListModelsOptions, type AIListModelsResponse, type AIMessage, type AIMessageRole, type AIModel, type AIModelInfo, type AIModelsResponse, type AIProvider, type AIRateLimitInfo, type AIRateLimitResponse, type AIRequestType, type AIStreamChunk, type AITool, type AIToolCall, type AIUsageResponse, type AIUsageStats, type AccessTokenPayload, type AchievementCategory, type AchievementCriteria, type AchievementCriterion, type AchievementDefinition, type AchievementTier, type AchievementType, type AchievementUnlockEvent, type AdminUser, AuthenticationError, AuthorizationError, type BalanceResponse, type BatchEvent, type BatchIndexInput, type BatchIndexResult, type Breadcrumb, type BuildLog, type BuildLogHistoryResponse, type CaptureExceptionRequest, type CaptureMessageRequest, type ChatCompletionInput, type ChatCompletionResponse, type ChatInput, type ChatMessage, type ChatResult, type ChatStreamChunk, type CheckoutRequest, type CheckoutResponse, type CircuitBreakerConfig, CircuitBreakerOpenError, type CircuitState, type CommandResult, type ConsentCategory, type ConsentHistoryEntry, type ConsentHistoryResult, type ConsentPurposeDefaults, type ConsentType, type ContentPart, type CreateOrgInput, type CreatePermissionInput, type CreateRoleInput, type CriteriaOperator, type CronInput, type CronSchedule, type DatabaseConnectionInfo, type DatabaseStatus, type DatabaseStatusInfo, type DebugCategory, type DeduplicationConfig, type DeleteDocumentInput, type DeployHistoryResponse, type DeployInfo, type DeployStatus, type DynamicRestClient, ERROR_CODE_STATUS, type EmbedInput, type EmbedResult, type EmbeddingInput, type EmbeddingResponse, type LeaderboardEntry as EngagementLeaderboardEntry, type LeaderboardResult as EngagementLeaderboardResult, type EnvVar, type ErrorCode, type ErrorResponse, type ExceptionFrame, type ExceptionValue, type ExecOptions, type FacetsResponse, type FileInfo, type FileUploadOptions, type FlagContext, type FlagResult, type GetConsentHistoryInput, type GetConsentsInput, type GetFacetsInput, type GetSecretInput, type GetSecretResult, type GetSecretsInput, type GetSecretsResult, type IdentifyInput, type IndexDocumentInput, type IndexDocumentResult, type InviteMemberInput, type InviteUserRequest, type InviteUserResponse, type KvExpireRequest, type KvHgetRequest, type KvHgetallRequest, type KvHsetRequest, type KvIncrRequest, type KvLpushRequest, type KvLrangeRequest, type KvMgetRequest, type KvMsetRequest, type KvRateLimitRequest, type KvRateLimitResult, type KvScanOptions, type KvScanResult, type KvSetOptions, type KvSetRequest, type KvZMember, type KvZaddRequest, type KvZrangeRequest, type LeaderboardAggregation, type LeaderboardDefinition, type LeaderboardEntry$1 as LeaderboardEntry, type LeaderboardOptions, type LeaderboardQueryOptions, type LeaderboardResetPeriod, type LeaderboardResult$1 as LeaderboardResult, type LeaderboardSortDirection, type LinkAnonymousConsentsInput, type ListScheduledEmailsOptions, type ListSecretKeysInput, type ListUsersOptions, type ListUsersResult, type ListWorkersOptions, type ListWorkersResult, type LoginHistoryEntry, type LoginRequest, type LoginResponse, type MeResponse, type MemberPermissionsResult, type MonitoringResponse, type MonitoringSeverity, type NativeStepContext, type NativeTaskDefinition, type TaskRunStatus as NativeTaskRunStatus, NetworkError, NotFoundError, type OrgRole, type OrgTokenPayload, type Organization, type OrganizationInvitation, type OrganizationMember, type OrganizationMembership, type PageInput, type PaginatedResponse, type PaginationInput, type ParsedKey, type Permission, type Plan, type PortalRequest, type PortalResponse, type PushNotification, type PushNotificationPayload, type PushServiceWorkerConfig, type PushSubscription, RETRYABLE_CODES, RateLimitError, type RealtimeEmitRequest, type RealtimeEmitResponse, type RealtimeHistoryRequest, type RealtimeHistoryResponse, type RecordActivityInput, type RecordActivityResult, type RedeemReferralInput, type RedeemResult, type ReferralCode, type ReferralStats, type RegisterInput, type RegisterRequest, type RegisterResponse, type RestClient, type RestClientConfig, type RestDynamicConfig, type paths as RestPaths, type RetryConfig, type RevokeTokenOptions, type Role, type RollbackDeployRequest, type RunWorkerOptions, SandboxClient, type SandboxFile, type SandboxOptions, type ScheduleEmailOptions, type ScheduledEmail, type ScheduledEmailStats, type ScheduledEmailsResult, type SearchInput, type SearchResponse, type SearchResultItem, type SearchStatsResult, type SearchType, type SecretKeyInfo, type SecuritySettings, type SendEmailOptions, type SendResult, type SendTemplatedEmailOptions, type SendToUserOptions, type SessionResult, type SetConsentsInput, type SetEnvVarRequest, type SignedUrlOptions, type SignedUrlResult, StepCompleteSignal, StepSleepSignal, type StreakDefinition, type StreakFrequency, type StreakState, type StreamMessage, type SubmitScoreInput, type SubmitScoreResult, type Subscription, type SuccessResponse, type SylphxConfig, type SylphxConfigInput, SylphxError, type SylphxErrorCode, type SylphxErrorOptions, type TaskInput, type TaskResult, type TaskStatus, type TextCompletionInput, type TextCompletionResponse, TimeoutError, type TokenIntrospectionResult, type TokenResponse, type Tool, type ToolCall, type TrackClickInput, type TrackInput, type TriggerDeployRequest, type TwoFactorVerifyRequest, type UpdateOrgInput, type UpdateRoleInput, type UploadProgressEvent, type UploadResult, type UpsertDocumentInput, type UpsertDocumentResult, type UsageResponse, type User, type UserAchievement, type UserConsent, type UserProfile, ValidationError, type VisionInput, type WebhookConfig, type WebhookConfigUpdate, type WebhookDeliveriesResult, type WebhookDelivery, type WebhookStats, WorkerHandle, type WorkerLogsResult, type WorkerResourceSpec, type WorkerResult, type WorkerRun, type WorkerStatus, type WorkerVolumeMount, WorkersClient, acceptAllConsents, acceptOrganizationInvitation, assignMemberRole, batchIndex, canDeleteOrganization, canManageMembers, canManageSettings, cancelScheduledEmail, cancelTask, captureException, captureExceptionRaw, captureMessage, chat, chatStream, checkFlag, complete, createCheckout, createConfig, createCron, createDynamicRestClient, createOrganization, createPermission, createPortalSession, createRestClient, createRole, createServiceWorkerScript, createStepContext, createTasksHandler, createTracker, debugError, debugLog, debugTimer, debugWarn, declineOptionalConsents, deleteCron, deleteDocument, deleteEnvVar, deleteFile, deleteOrganization, deletePermission, deleteRole, deleteUser, disableDebug, embed, enableDebug, exponentialBackoff, extendedSignUp, forgotPassword, generateAnonymousId, getAchievement, getAchievementPoints, getAchievements, getAllFlags, getAllSecrets, getAllStreaks, getBillingBalance, getBillingUsage, getBuildLogHistory, getCircuitBreakerState, getConsentHistory, getConsentTypes, getDatabaseConnectionString, getDatabaseStatus, getDebugMode, getDeployHistory, getDeployStatus, getErrorCode, getErrorMessage, getFacets, getFileInfo, getFileUrl, getFlagPayload, getFlags, getLeaderboard, getMemberPermissions, getMyReferralCode, getOrganization, getOrganizationInvitations, getOrganizationMembers, getOrganizations, getPlans, getPushPreferences, getRealtimeHistory, getReferralLeaderboard, getReferralStats, getRestErrorMessage, getRole, getScheduledEmail, getScheduledEmailStats, getSearchStats, getSecret, getSecrets, getSession, getSignedUrl, getStreak, getSubscription, getTask, getUser, getUserByEmail, getUserConsents, getUserLeaderboardRank, getVariant, getWebhookConfig, getWebhookDeliveries, getWebhookDelivery, getWebhookStats, hasAllPermissions, hasAnyPermission, hasConsent, hasError, hasPermission, hasRole, hasSecret, identify, incrementAchievementProgress, indexDocument, initPushServiceWorker, installGlobalDebugHelpers, introspectToken, inviteOrganizationMember, inviteUser, isEmailConfigured, isEnabled, isRetryableError, isSylphxError, kvDelete, kvExists, kvExpire, kvGet, kvGetJSON, kvHget, kvHgetall, kvHset, kvIncr, kvLpush, kvLrange, kvMget, kvMset, kvRateLimit, kvScan, kvSet, kvSetJSON, kvZadd, kvZrange, leaveOrganization, linkAnonymousConsents, listEnvVars, listPermissions, listRoles, listScheduledEmails, listSecretKeys, listTasks, listUsers, page, parseKey, pauseCron, realtimeEmit, recordStreakActivity, recoverStreak, redeemReferralCode, refreshToken, regenerateReferralCode, registerPush, registerPushServiceWorker, removeOrganizationMember, replayWebhookDelivery, rescheduleEmail, resetCircuitBreaker, resetDebugModeCache, resetPassword, resumeCron, revokeAllTokens, revokeOrganizationInvitation, revokeToken, rollbackDeploy, scheduleEmail, scheduleTask, search, sendEmail, sendEmailToUser, sendPush, sendTemplatedEmail, setConsents, setEnvVar, signIn, signOut, signUp, streamToString, submitScore, suspendUser, switchOrg, toSylphxError, track, trackBatch, trackClick, triggerDeploy, unlockAchievement, unregisterPush, updateOrganization, updateOrganizationMemberRole, updatePushPreferences, updateRole, updateUser, updateUserMetadata, updateWebhookConfig, uploadAvatar, uploadFile, upsertDocument, verifyEmail, verifySignature as verifyTaskSignature, verifyTwoFactor, withToken };