@kahitsan/plugin-sdk 0.7.0 → 0.7.2
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/flow-bundle.d.ts +2 -2
- package/dist/flow-bundle.js +5 -1
- package/dist/index.d.ts +15 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/flow-bundle.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { buildFlow, FlowSteps, runFlow, defineFlow, node, edge } from "./index.js";
|
|
2
|
-
export type { FlowDefinition, FlowNodeDef, FlowNodeKind, FlowPort, FlowNode, ExecFlow, ExecNode, FlowContext, NodeExec } from "./index.js";
|
|
1
|
+
export { buildFlow, FlowSteps, runFlow, defineFlow, node, edge, resourceFlows } from "./index.js";
|
|
2
|
+
export type { FlowDefinition, FlowNodeDef, FlowNodeKind, FlowPort, FlowNode, ExecFlow, ExecNode, FlowContext, NodeExec, ResourceFlows, ResourceFlowsConfig } from "./index.js";
|
package/dist/flow-bundle.js
CHANGED
|
@@ -193,7 +193,7 @@ function crudFlow(opts) {
|
|
|
193
193
|
title: opts.title,
|
|
194
194
|
nodes: [
|
|
195
195
|
{
|
|
196
|
-
id:
|
|
196
|
+
id: opts.triggerId,
|
|
197
197
|
kind: "trigger",
|
|
198
198
|
label: opts.triggerLabel,
|
|
199
199
|
out: [{ id: "o", to: "commit" }]
|
|
@@ -241,6 +241,7 @@ function resourceFlows(cfg) {
|
|
|
241
241
|
const createFlow = crudFlow({
|
|
242
242
|
id: `${cfg.id}.create`,
|
|
243
243
|
title: `Add ${noun}`,
|
|
244
|
+
triggerId: "submit",
|
|
244
245
|
triggerLabel: `Create ${noun}`,
|
|
245
246
|
commitLabel: `Create ${lower}`,
|
|
246
247
|
commitDetail: `POST ${cfg.basePath}`,
|
|
@@ -254,6 +255,7 @@ function resourceFlows(cfg) {
|
|
|
254
255
|
const editFlow = crudFlow({
|
|
255
256
|
id: `${cfg.id}.edit`,
|
|
256
257
|
title: `Edit ${noun}`,
|
|
258
|
+
triggerId: "submit",
|
|
257
259
|
triggerLabel: "Save Changes",
|
|
258
260
|
commitLabel: `Update ${lower}`,
|
|
259
261
|
commitDetail: `PUT ${cfg.basePath}/:id`,
|
|
@@ -271,6 +273,7 @@ function resourceFlows(cfg) {
|
|
|
271
273
|
const archiveFlow = crudFlow({
|
|
272
274
|
id: `${cfg.id}.archive`,
|
|
273
275
|
title: `Archive ${noun}`,
|
|
276
|
+
triggerId: "trigger",
|
|
274
277
|
triggerLabel: `Archive button (active ${lower})`,
|
|
275
278
|
commitLabel: `Soft-delete ${lower}`,
|
|
276
279
|
commitDetail: `DELETE ${cfg.basePath}/:id`,
|
|
@@ -284,6 +287,7 @@ function resourceFlows(cfg) {
|
|
|
284
287
|
const restoreFlow = crudFlow({
|
|
285
288
|
id: `${cfg.id}.restore`,
|
|
286
289
|
title: `Restore ${noun}`,
|
|
290
|
+
triggerId: "trigger",
|
|
287
291
|
triggerLabel: `Restore button (archived ${lower})`,
|
|
288
292
|
commitLabel: `Restore ${lower}`,
|
|
289
293
|
commitDetail: `PATCH ${cfg.basePath}/:id/restore`,
|
package/dist/index.d.ts
CHANGED
|
@@ -793,5 +793,18 @@ type ExecFlow = Omit<FlowDefinition, "nodes"> & {
|
|
|
793
793
|
nodes: ExecNode[];
|
|
794
794
|
};
|
|
795
795
|
declare function runFlow(flow: ExecFlow, startId: string, ctx: FlowContext): Promise<void>;
|
|
796
|
-
|
|
797
|
-
|
|
796
|
+
interface ResourceFlowsConfig {
|
|
797
|
+
readonly id: string;
|
|
798
|
+
readonly noun: string;
|
|
799
|
+
readonly basePath: string;
|
|
800
|
+
}
|
|
801
|
+
interface ResourceFlows {
|
|
802
|
+
readonly createFlow: ExecFlow;
|
|
803
|
+
readonly editFlow: ExecFlow;
|
|
804
|
+
readonly archiveFlow: ExecFlow;
|
|
805
|
+
readonly restoreFlow: ExecFlow;
|
|
806
|
+
readonly all: readonly ExecFlow[];
|
|
807
|
+
}
|
|
808
|
+
declare function resourceFlows(cfg: ResourceFlowsConfig): ResourceFlows;
|
|
809
|
+
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, isWorkspaceElevated, loadMigrations, makeDataSurface, makeDatabaseService, migration, mountPluginServices, mountWsReceiver, node, parseIdentity, quoteIdent, readIdentity, requireAuth, requirePermission, requireWorkspace, resolveEngine, resourceFlows, resourceMigrations, rollbackMigration, runFlow, runMigrationList, runMigrations, runWithTenantContext, s3DeleteObject, s3Enabled, s3GetObject, s3KeyFromUrl, s3PresignUrl, s3PublicUrl, s3PutObject, searchFragment, statusFilter, tenant, tryCallPlugin, verifyIdentity, withTenantContext };
|
|
810
|
+
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, ResourceFlows, ResourceFlowsConfig, ResourceIndex, ResourceListSpec, ResourcePagination, ResourceRouterDeps, ResourceSearch, ResourceService, ResourceSoftDelete, ResourceSort, ResourceSpec, ResourceUpdateSpec, RunMigrationsOptions, SchemaDef, SqlFragment, StringOpts, TableDef, TenantContext, TenantDb, WhereOpts, WorkspaceDTO, WsReceiverOptions };
|