@kahitsan/plugin-sdk 0.4.3-staging.22 → 0.4.3-staging.25

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.ts CHANGED
@@ -592,6 +592,18 @@ type ServiceHandler = (args: unknown, ctx: {
592
592
  declare function mountPluginServices(app: Hono, handlers: Record<string, ServiceHandler>, opts: {
593
593
  parseIdentity: MiddlewareHandler;
594
594
  }): void;
595
+ declare function s3Enabled(): boolean;
596
+ declare function s3PublicUrl(key: string): string;
597
+ declare function s3KeyFromUrl(s3Link: string | null | undefined): string | null;
598
+ declare function s3PutObject(key: string, body: Buffer, contentType: string, opts?: {
599
+ acl?: "public-read" | "private";
600
+ }): Promise<void>;
601
+ declare function s3GetObject(key: string): Promise<{
602
+ body: Buffer;
603
+ contentType: string | null;
604
+ }>;
605
+ declare function s3DeleteObject(key: string): Promise<void>;
606
+ declare function s3PresignUrl(key: string, expirySeconds?: number): string;
595
607
  interface PluginSettings {
596
608
  get<T = unknown>(key: string): Promise<T | undefined>;
597
609
  all(): Promise<Record<string, unknown>>;
@@ -780,5 +792,5 @@ type ExecFlow = Omit<FlowDefinition, "nodes"> & {
780
792
  nodes: ExecNode[];
781
793
  };
782
794
  declare function runFlow(flow: ExecFlow, startId: string, ctx: FlowContext): Promise<void>;
783
- export { FlowSteps, IDENTITY_HEADER, INTERNAL_SECRET_HEADER, MIGRATION_ADVISORY_LOCK_KEY, MigrationBuilder, PROTOCOL_VERSION, PluginUnavailableError, Types, applyTenantContext, asyncHandler, buildFlow, buildResourceRouter, buildResourceServices, callPlugin, checkInternalSecret, checkProtocol, compileCreateTable, composeWhere, createPlugin, createPluginServer, defineFlow, defineJob, defineResource, defineSchema, edge, escapeLike, identityHeaderOf, indexExpr, loadMigrations, makeDataSurface, makeDatabaseService, migration, mountPluginServices, mountWsReceiver, node, parseIdentity, quoteIdent, readIdentity, requireAuth, requirePermission, requireWorkspace, resolveEngine, resourceMigrations, rollbackMigration, runFlow, runMigrationList, runMigrations, runWithTenantContext, searchFragment, statusFilter, tenant, tryCallPlugin, verifyIdentity, withTenantContext };
795
+ export { FlowSteps, IDENTITY_HEADER, INTERNAL_SECRET_HEADER, MIGRATION_ADVISORY_LOCK_KEY, MigrationBuilder, PROTOCOL_VERSION, PluginUnavailableError, Types, applyTenantContext, asyncHandler, buildFlow, buildResourceRouter, buildResourceServices, callPlugin, checkInternalSecret, checkProtocol, compileCreateTable, composeWhere, createPlugin, createPluginServer, defineFlow, defineJob, defineResource, defineSchema, edge, escapeLike, identityHeaderOf, indexExpr, loadMigrations, makeDataSurface, makeDatabaseService, migration, mountPluginServices, mountWsReceiver, node, parseIdentity, quoteIdent, readIdentity, requireAuth, requirePermission, requireWorkspace, resolveEngine, resourceMigrations, rollbackMigration, runFlow, runMigrationList, runMigrations, runWithTenantContext, s3DeleteObject, s3Enabled, s3GetObject, s3KeyFromUrl, s3PresignUrl, s3PublicUrl, s3PutObject, searchFragment, statusFilter, tenant, tryCallPlugin, verifyIdentity, withTenantContext };
784
796
  export type { AdditionalMount, AuthProvider, AuthProviderDecl, AuthService, AuthenticatedUser, BackfillOpts, ColumnDef, ColumnDefault, ColumnKind, ColumnOpts, CompileTableOpts, CoreServices, CreatePluginServerOptions, DataSurface, DecimalOpts, DefinedResource, Engine, EscapeHatch, ExecFlow, ExecNode, FindOpts, FlowContext, FlowDefinition, FlowNode, FlowNodeDef, FlowNodeKind, FlowPort, ForwardedIdentity, Identity, IndexMember, IndexOpts, Logger, MemberDTO, Migration, MigrationContext, MigrationOpts, NodeExec, PermissionsService, PluginAsset, PluginAssets, PluginContext, PluginDb, PluginDefinition, PluginEvents, PluginInitInput, PluginInitOutput, PluginKernel, PluginManifest, PluginPeer, PluginRouterFactory, PluginRpc, PluginServerContext, PluginServerHandle, PluginServicesFactory, PluginSettings, PresignedAsset, ResourceColumns, ResourceCreateSpec, ResourceField, ResourceFields, ResourceFilter, ResourceIndex, ResourceListSpec, ResourcePagination, ResourceRouterDeps, ResourceSearch, ResourceService, ResourceSoftDelete, ResourceSort, ResourceSpec, ResourceUpdateSpec, RunMigrationsOptions, SchemaDef, SqlFragment, StringOpts, TableDef, TenantContext, TenantDb, WhereOpts, WorkspaceDTO, WsReceiverOptions };