@kwkevinchan/backstage-plugin-temporal-module-approvals 0.0.0-stage → 0.2.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.
@@ -0,0 +1,215 @@
1
+ import { stringifyEntityRef, parseEntityRef } from '@backstage/catalog-model';
2
+ import { DEFAULT_APPROVAL_SEARCH_ATTRIBUTE, isTemporalWorkflowEntity, getTemporalWorkflowApproval } from '@kwkevinchan/backstage-plugin-temporal-common';
3
+
4
+ function buildApprovalEntityIndex(entities, defaultNamespace = "default") {
5
+ const index = /* @__PURE__ */ new Map();
6
+ for (const entity of entities) {
7
+ if (!isTemporalWorkflowEntity(entity)) continue;
8
+ const workflowType = entity.spec.workflowType;
9
+ if (!workflowType) continue;
10
+ const ns = entity.spec.namespace?.trim() || defaultNamespace;
11
+ const info = {
12
+ entity,
13
+ entityRef: stringifyEntityRef(entity),
14
+ namespace: ns,
15
+ title: entity.metadata.title || entity.metadata.name,
16
+ approval: getTemporalWorkflowApproval(entity)
17
+ };
18
+ const key = `${ns}:${workflowType}`;
19
+ if (!index.has(key)) {
20
+ index.set(key, info);
21
+ }
22
+ }
23
+ return index;
24
+ }
25
+ function collectNamespaceSearchAttributes(entityIndex, namespace, fallbackSearchAttribute = DEFAULT_APPROVAL_SEARCH_ATTRIBUTE) {
26
+ const attrs = /* @__PURE__ */ new Set([fallbackSearchAttribute]);
27
+ for (const info of entityIndex.values()) {
28
+ if (info.namespace !== namespace) continue;
29
+ if (info.approval?.searchAttribute) {
30
+ attrs.add(info.approval.searchAttribute);
31
+ }
32
+ }
33
+ return [...attrs];
34
+ }
35
+ async function listApprovalCandidates(searchAttributes, list) {
36
+ const settled = await Promise.allSettled(
37
+ searchAttributes.map((attr) => list(attr))
38
+ );
39
+ const listings = [];
40
+ const failures = [];
41
+ settled.forEach((result, i) => {
42
+ const searchAttribute = searchAttributes[i];
43
+ if (result.status === "fulfilled") {
44
+ listings.push({
45
+ searchAttribute,
46
+ workflows: result.value.items,
47
+ hasMore: Boolean(result.value.nextPageToken)
48
+ });
49
+ } else {
50
+ const reason = result.reason;
51
+ failures.push({
52
+ searchAttribute,
53
+ error: reason instanceof Error ? reason : new Error(String(reason))
54
+ });
55
+ }
56
+ });
57
+ if (listings.length === 0 && failures.length > 0) {
58
+ throw failures[0].error;
59
+ }
60
+ return { listings, failures };
61
+ }
62
+ function describeAttributeFailures(failures) {
63
+ return failures.map((f) => `${f.searchAttribute}: ${f.error.message}`).join("; ");
64
+ }
65
+ function matchApprovalItemsByAttribute(resultsByAttr, entityIndex) {
66
+ const seen = /* @__PURE__ */ new Set();
67
+ const out = [];
68
+ for (const { searchAttribute, workflows } of resultsByAttr) {
69
+ for (const workflow of workflows) {
70
+ const entityInfo = entityIndex.get(
71
+ `${workflow.namespace}:${workflow.workflowType}`
72
+ );
73
+ if (entityInfo?.approval?.searchAttribute && entityInfo.approval.searchAttribute !== searchAttribute) {
74
+ continue;
75
+ }
76
+ const runKey = `${workflow.namespace}:${workflow.workflowId}:${workflow.runId}`;
77
+ if (seen.has(runKey)) continue;
78
+ seen.add(runKey);
79
+ out.push({
80
+ workflow,
81
+ entityInfo,
82
+ approval: entityInfo?.approval,
83
+ matchedSearchAttribute: searchAttribute
84
+ });
85
+ }
86
+ }
87
+ return out;
88
+ }
89
+ function normalizeApproverRef(ref, defaultNamespace = "default") {
90
+ const trimmed = ref.trim();
91
+ if (!trimmed) return "";
92
+ try {
93
+ const parsed = parseEntityRef(trimmed, {
94
+ defaultKind: "group",
95
+ defaultNamespace
96
+ });
97
+ return stringifyEntityRef(parsed).toLocaleLowerCase("en-US");
98
+ } catch {
99
+ return trimmed.toLocaleLowerCase("en-US");
100
+ }
101
+ }
102
+ function resolveItemApprovers(item) {
103
+ if (item.workflow.approvers && item.workflow.approvers.length > 0) {
104
+ return item.workflow.approvers;
105
+ }
106
+ if (item.approval?.approvers && item.approval.approvers.length > 0) {
107
+ return item.approval.approvers;
108
+ }
109
+ return [];
110
+ }
111
+ function isAwaitingMyApproval(item, ownershipEntityRefs) {
112
+ const approvers = resolveItemApprovers(item);
113
+ if (approvers.length === 0 || ownershipEntityRefs.length === 0) {
114
+ return false;
115
+ }
116
+ const defaultNamespace = item.entityInfo?.entity.metadata.namespace || "default";
117
+ const normalizedClaims = new Set(
118
+ ownershipEntityRefs.map((ref) => ref.trim().toLocaleLowerCase("en-US")).filter(Boolean)
119
+ );
120
+ return approvers.some(
121
+ (ref) => normalizedClaims.has(normalizeApproverRef(ref, defaultNamespace))
122
+ );
123
+ }
124
+ function isInitiatedByUser(item, userEntityRef) {
125
+ if (!userEntityRef || !item.workflow.initiator) return false;
126
+ return item.workflow.initiator.trim().toLocaleLowerCase("en-US") === userEntityRef.trim().toLocaleLowerCase("en-US");
127
+ }
128
+ function filterPendingApprovals(items, options) {
129
+ const ownership = options.ownershipEntityRefs ?? [];
130
+ const q = options.search.trim().toLocaleLowerCase("en-US");
131
+ return items.filter((item) => {
132
+ if (options.tab === "awaiting" && !isAwaitingMyApproval(item, ownership)) {
133
+ return false;
134
+ }
135
+ if (options.tab === "initiated" && !isInitiatedByUser(item, options.userEntityRef)) {
136
+ return false;
137
+ }
138
+ if (!q) return true;
139
+ const haystack = [
140
+ item.workflow.workflowId,
141
+ item.workflow.workflowType,
142
+ item.workflow.initiator ?? "",
143
+ item.entityInfo?.title ?? "",
144
+ item.workflow.entityRef ?? "",
145
+ ...resolveItemApprovers(item)
146
+ ].join(" ").toLocaleLowerCase("en-US");
147
+ return haystack.includes(q);
148
+ });
149
+ }
150
+ function findMessageSpec(entity, action) {
151
+ const list = action.kind === "update" ? entity?.spec.messages?.updates : entity?.spec.messages?.signals;
152
+ return list?.find((m) => m.name === action.name);
153
+ }
154
+ function toApprovalMessageDefinition(action, messageSpec) {
155
+ if (!messageSpec) return void 0;
156
+ const fixedKeys = new Set(Object.keys(action.args ?? {}));
157
+ let inputSchema = messageSpec.inputSchema;
158
+ if (inputSchema && typeof inputSchema === "object" && !Array.isArray(inputSchema) && fixedKeys.size > 0) {
159
+ const schemaObj = { ...inputSchema };
160
+ if (schemaObj.properties && typeof schemaObj.properties === "object" && !Array.isArray(schemaObj.properties)) {
161
+ const nextProps = {};
162
+ for (const [k, v] of Object.entries(schemaObj.properties)) {
163
+ if (!fixedKeys.has(k) && v !== void 0) {
164
+ nextProps[k] = v;
165
+ }
166
+ }
167
+ schemaObj.properties = nextProps;
168
+ }
169
+ if (Array.isArray(schemaObj.required)) {
170
+ schemaObj.required = schemaObj.required.filter(
171
+ (k) => typeof k !== "string" || !fixedKeys.has(k)
172
+ );
173
+ }
174
+ inputSchema = schemaObj;
175
+ }
176
+ return {
177
+ name: messageSpec.name,
178
+ ...messageSpec.description ? { description: messageSpec.description } : {},
179
+ ...inputSchema ? { inputSchema } : {},
180
+ ...messageSpec.example !== void 0 ? { example: messageSpec.example } : {},
181
+ ...messageSpec.userField ? { userField: messageSpec.userField } : {}
182
+ };
183
+ }
184
+ function buildDecisionArgs(options) {
185
+ const hasOverrides = Boolean(
186
+ options.action.args && Object.keys(options.action.args).length > 0
187
+ ) || Boolean(options.messageSpec?.userField && options.userEntityRef);
188
+ if (!hasOverrides) {
189
+ return options.formArgs;
190
+ }
191
+ const first = options.formArgs[0];
192
+ const base = first && typeof first === "object" && !Array.isArray(first) ? { ...first } : {};
193
+ if (options.action.args) {
194
+ Object.assign(base, options.action.args);
195
+ }
196
+ if (options.messageSpec?.userField && options.userEntityRef) {
197
+ base[options.messageSpec.userField] = options.userEntityRef;
198
+ }
199
+ return [base, ...options.formArgs.slice(1)];
200
+ }
201
+ function formatWaitingDuration(startTime, nowMs = Date.now()) {
202
+ if (!startTime) return "\u2014";
203
+ const started = Date.parse(startTime);
204
+ if (Number.isNaN(started)) return "\u2014";
205
+ const diffSec = Math.max(0, Math.floor((nowMs - started) / 1e3));
206
+ const days = Math.floor(diffSec / 86400);
207
+ const hours = Math.floor(diffSec % 86400 / 3600);
208
+ const minutes = Math.floor(diffSec % 3600 / 60);
209
+ if (days > 0) return `${days}d ${hours}h`;
210
+ if (hours > 0) return `${hours}h ${minutes}m`;
211
+ return `${minutes}m`;
212
+ }
213
+
214
+ export { buildApprovalEntityIndex, buildDecisionArgs, collectNamespaceSearchAttributes, describeAttributeFailures, filterPendingApprovals, findMessageSpec, formatWaitingDuration, isAwaitingMyApproval, isInitiatedByUser, listApprovalCandidates, matchApprovalItemsByAttribute, resolveItemApprovers, toApprovalMessageDefinition };
215
+ //# sourceMappingURL=approvalModel.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approvalModel.esm.js","sources":["../../src/components/approvalModel.ts"],"sourcesContent":["/*\n * Copyright 2026 The backstage-plugin-temporal Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n type Entity,\n parseEntityRef,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport type { JsonObject, JsonValue } from '@backstage/types';\nimport {\n DEFAULT_APPROVAL_SEARCH_ATTRIBUTE,\n getTemporalWorkflowApproval,\n isTemporalWorkflowEntity,\n type TemporalWorkflowApprovalAction,\n type TemporalWorkflowApprovalSpec,\n type TemporalWorkflowEntityV1alpha1,\n type TemporalWorkflowMessageSpec,\n type WorkflowMessageDefinition,\n type WorkflowSummary,\n} from '@kwkevinchan/backstage-plugin-temporal-common';\n\nexport type ApprovalFilterTab = 'all' | 'awaiting' | 'initiated';\n\nexport interface ApprovalEntityInfo {\n entity: TemporalWorkflowEntityV1alpha1;\n entityRef: string;\n namespace: string;\n title: string;\n approval?: TemporalWorkflowApprovalSpec;\n}\n\nexport interface PendingApprovalItem {\n workflow: WorkflowSummary;\n entityInfo?: ApprovalEntityInfo;\n /** Present only when a matching `TemporalWorkflow` entity configures `spec.approval`. */\n approval?: TemporalWorkflowApprovalSpec;\n /** The search attribute query that surfaced this workflow. */\n matchedSearchAttribute: string;\n}\n\n/**\n * Indexes `TemporalWorkflow` catalog entities strictly by\n * `${spec.namespace ?? defaultNamespace}:${spec.workflowType}` so runs in\n * different namespaces never collide on the same workflow type.\n */\nexport function buildApprovalEntityIndex(\n entities: Entity[],\n defaultNamespace: string = 'default',\n): Map<string, ApprovalEntityInfo> {\n const index = new Map<string, ApprovalEntityInfo>();\n for (const entity of entities) {\n if (!isTemporalWorkflowEntity(entity)) continue;\n const workflowType = entity.spec.workflowType;\n if (!workflowType) continue;\n const ns = entity.spec.namespace?.trim() || defaultNamespace;\n const info: ApprovalEntityInfo = {\n entity,\n entityRef: stringifyEntityRef(entity),\n namespace: ns,\n title: entity.metadata.title || entity.metadata.name,\n approval: getTemporalWorkflowApproval(entity),\n };\n const key = `${ns}:${workflowType}`;\n if (!index.has(key)) {\n index.set(key, info);\n }\n }\n return index;\n}\n\n/**\n * Collects the distinct `Bool` search attributes to query for `namespace`:\n * always includes `fallbackSearchAttribute` plus every `spec.approval.searchAttribute`\n * configured by `TemporalWorkflow` entities in that namespace.\n */\nexport function collectNamespaceSearchAttributes(\n entityIndex: Map<string, ApprovalEntityInfo>,\n namespace: string,\n fallbackSearchAttribute: string = DEFAULT_APPROVAL_SEARCH_ATTRIBUTE,\n): string[] {\n const attrs = new Set<string>([fallbackSearchAttribute]);\n for (const info of entityIndex.values()) {\n if (info.namespace !== namespace) continue;\n if (info.approval?.searchAttribute) {\n attrs.add(info.approval.searchAttribute);\n }\n }\n return [...attrs];\n}\n\n/**\n * Merges workflows fetched per search attribute against the namespace-scoped\n * `TemporalWorkflow` index, deduplicating runs and discarding runs whose\n * matched entity declares a different `spec.approval.searchAttribute`.\n */\n/** Workflows listed for one approval search attribute. */\nexport interface ApprovalAttributeListing {\n searchAttribute: string;\n workflows: WorkflowSummary[];\n hasMore: boolean;\n}\n\n/** A search attribute whose listing failed. */\nexport interface ApprovalAttributeFailure {\n searchAttribute: string;\n error: Error;\n}\n\n/**\n * Lists running workflows for each search attribute. One failed listing (for\n * example an attribute that is not registered in the namespace) does not hide\n * the others; it is returned in `failures`. Throws only when every listing\n * fails.\n */\nexport async function listApprovalCandidates(\n searchAttributes: string[],\n list: (\n searchAttribute: string,\n ) => Promise<{ items: WorkflowSummary[]; nextPageToken?: string }>,\n): Promise<{\n listings: ApprovalAttributeListing[];\n failures: ApprovalAttributeFailure[];\n}> {\n const settled = await Promise.allSettled(\n searchAttributes.map(attr => list(attr)),\n );\n const listings: ApprovalAttributeListing[] = [];\n const failures: ApprovalAttributeFailure[] = [];\n settled.forEach((result, i) => {\n const searchAttribute = searchAttributes[i];\n if (result.status === 'fulfilled') {\n listings.push({\n searchAttribute,\n workflows: result.value.items,\n hasMore: Boolean(result.value.nextPageToken),\n });\n } else {\n const reason = result.reason;\n failures.push({\n searchAttribute,\n error: reason instanceof Error ? reason : new Error(String(reason)),\n });\n }\n });\n if (listings.length === 0 && failures.length > 0) {\n throw failures[0].error;\n }\n return { listings, failures };\n}\n\n/** Text for a warning that names the search attributes that failed. */\nexport function describeAttributeFailures(\n failures: ApprovalAttributeFailure[],\n): string {\n return failures\n .map(f => `${f.searchAttribute}: ${f.error.message}`)\n .join('; ');\n}\n\nexport function matchApprovalItemsByAttribute(\n resultsByAttr: Array<{\n searchAttribute: string;\n workflows: WorkflowSummary[];\n }>,\n entityIndex: Map<string, ApprovalEntityInfo>,\n): PendingApprovalItem[] {\n const seen = new Set<string>();\n const out: PendingApprovalItem[] = [];\n for (const { searchAttribute, workflows } of resultsByAttr) {\n for (const workflow of workflows) {\n const entityInfo = entityIndex.get(\n `${workflow.namespace}:${workflow.workflowType}`,\n );\n if (\n entityInfo?.approval?.searchAttribute &&\n entityInfo.approval.searchAttribute !== searchAttribute\n ) {\n continue;\n }\n const runKey = `${workflow.namespace}:${workflow.workflowId}:${workflow.runId}`;\n if (seen.has(runKey)) continue;\n seen.add(runKey);\n out.push({\n workflow,\n entityInfo,\n approval: entityInfo?.approval,\n matchedSearchAttribute: searchAttribute,\n });\n }\n }\n return out;\n}\n\nfunction normalizeApproverRef(\n ref: string,\n defaultNamespace: string = 'default',\n): string {\n const trimmed = ref.trim();\n if (!trimmed) return '';\n try {\n const parsed = parseEntityRef(trimmed, {\n defaultKind: 'group',\n defaultNamespace,\n });\n return stringifyEntityRef(parsed).toLocaleLowerCase('en-US');\n } catch {\n return trimmed.toLocaleLowerCase('en-US');\n }\n}\n\n/**\n * Returns the explicit approver entity references (`group:...` / `user:...`)\n * for a pending run: per-run `workflow.approvers` (from the `approvers` search\n * attribute) takes precedence, falling back to static `spec.approval.approvers`\n * on the `TemporalWorkflow` entity. `spec.owner` is intentionally never used.\n */\nexport function resolveItemApprovers(item: PendingApprovalItem): string[] {\n if (item.workflow.approvers && item.workflow.approvers.length > 0) {\n return item.workflow.approvers;\n }\n if (item.approval?.approvers && item.approval.approvers.length > 0) {\n return item.approval.approvers;\n }\n return [];\n}\n\nexport function isAwaitingMyApproval(\n item: PendingApprovalItem,\n ownershipEntityRefs: string[],\n): boolean {\n const approvers = resolveItemApprovers(item);\n if (approvers.length === 0 || ownershipEntityRefs.length === 0) {\n return false;\n }\n const defaultNamespace =\n item.entityInfo?.entity.metadata.namespace || 'default';\n const normalizedClaims = new Set(\n ownershipEntityRefs\n .map(ref => ref.trim().toLocaleLowerCase('en-US'))\n .filter(Boolean),\n );\n return approvers.some(ref =>\n normalizedClaims.has(normalizeApproverRef(ref, defaultNamespace)),\n );\n}\n\nexport function isInitiatedByUser(\n item: PendingApprovalItem,\n userEntityRef: string | undefined,\n): boolean {\n if (!userEntityRef || !item.workflow.initiator) return false;\n return (\n item.workflow.initiator.trim().toLocaleLowerCase('en-US') ===\n userEntityRef.trim().toLocaleLowerCase('en-US')\n );\n}\n\nexport function filterPendingApprovals(\n items: PendingApprovalItem[],\n options: {\n tab: ApprovalFilterTab;\n search: string;\n userEntityRef?: string;\n ownershipEntityRefs?: string[];\n },\n): PendingApprovalItem[] {\n const ownership = options.ownershipEntityRefs ?? [];\n const q = options.search.trim().toLocaleLowerCase('en-US');\n\n return items.filter(item => {\n if (options.tab === 'awaiting' && !isAwaitingMyApproval(item, ownership)) {\n return false;\n }\n if (\n options.tab === 'initiated' &&\n !isInitiatedByUser(item, options.userEntityRef)\n ) {\n return false;\n }\n if (!q) return true;\n const haystack = [\n item.workflow.workflowId,\n item.workflow.workflowType,\n item.workflow.initiator ?? '',\n item.entityInfo?.title ?? '',\n item.workflow.entityRef ?? '',\n ...resolveItemApprovers(item),\n ]\n .join(' ')\n .toLocaleLowerCase('en-US');\n return haystack.includes(q);\n });\n}\n\nexport function findMessageSpec(\n entity: TemporalWorkflowEntityV1alpha1 | undefined,\n action: TemporalWorkflowApprovalAction,\n): TemporalWorkflowMessageSpec | undefined {\n const list =\n action.kind === 'update'\n ? entity?.spec.messages?.updates\n : entity?.spec.messages?.signals;\n return list?.find(m => m.name === action.name);\n}\n\n/**\n * Converts a `TemporalWorkflowMessageSpec` into a `WorkflowMessageDefinition`\n * for `SchemaArgsField`, stripping fixed `action.args` keys from `properties`\n * and `required` so the approver only enters dynamic fields.\n */\nexport function toApprovalMessageDefinition(\n action: TemporalWorkflowApprovalAction,\n messageSpec: TemporalWorkflowMessageSpec | undefined,\n): WorkflowMessageDefinition | undefined {\n if (!messageSpec) return undefined;\n const fixedKeys = new Set(Object.keys(action.args ?? {}));\n let inputSchema = messageSpec.inputSchema;\n if (\n inputSchema &&\n typeof inputSchema === 'object' &&\n !Array.isArray(inputSchema) &&\n fixedKeys.size > 0\n ) {\n const schemaObj = { ...(inputSchema as JsonObject) };\n if (\n schemaObj.properties &&\n typeof schemaObj.properties === 'object' &&\n !Array.isArray(schemaObj.properties)\n ) {\n const nextProps: JsonObject = {};\n for (const [k, v] of Object.entries(schemaObj.properties)) {\n if (!fixedKeys.has(k) && v !== undefined) {\n nextProps[k] = v;\n }\n }\n schemaObj.properties = nextProps;\n }\n if (Array.isArray(schemaObj.required)) {\n schemaObj.required = schemaObj.required.filter(\n k => typeof k !== 'string' || !fixedKeys.has(k),\n );\n }\n inputSchema = schemaObj;\n }\n return {\n name: messageSpec.name,\n ...(messageSpec.description\n ? { description: messageSpec.description }\n : {}),\n ...(inputSchema ? { inputSchema } : {}),\n ...(messageSpec.example !== undefined\n ? { example: messageSpec.example }\n : {}),\n ...(messageSpec.userField ? { userField: messageSpec.userField } : {}),\n };\n}\n\n/**\n * Merges form arguments with optional fixed `action.args` and optional\n * `messageSpec.userField` in strict precedence order:\n * `form -> action.args -> userField` so neither fixed decision fields nor\n * `userField` can be forged through the form.\n */\nexport function buildDecisionArgs(options: {\n action: TemporalWorkflowApprovalAction;\n formArgs: JsonValue[];\n messageSpec?: TemporalWorkflowMessageSpec;\n userEntityRef?: string;\n}): JsonValue[] {\n const hasOverrides =\n Boolean(\n options.action.args && Object.keys(options.action.args).length > 0,\n ) || Boolean(options.messageSpec?.userField && options.userEntityRef);\n\n if (!hasOverrides) {\n return options.formArgs;\n }\n\n const first = options.formArgs[0];\n const base: JsonObject =\n first && typeof first === 'object' && !Array.isArray(first)\n ? { ...(first as JsonObject) }\n : {};\n\n if (options.action.args) {\n Object.assign(base, options.action.args);\n }\n if (options.messageSpec?.userField && options.userEntityRef) {\n base[options.messageSpec.userField] = options.userEntityRef;\n }\n\n return [base, ...options.formArgs.slice(1)];\n}\n\nexport function formatWaitingDuration(\n startTime: string | undefined,\n nowMs: number = Date.now(),\n): string {\n if (!startTime) return '—';\n const started = Date.parse(startTime);\n if (Number.isNaN(started)) return '—';\n const diffSec = Math.max(0, Math.floor((nowMs - started) / 1000));\n const days = Math.floor(diffSec / 86400);\n const hours = Math.floor((diffSec % 86400) / 3600);\n const minutes = Math.floor((diffSec % 3600) / 60);\n if (days > 0) return `${days}d ${hours}h`;\n if (hours > 0) return `${hours}h ${minutes}m`;\n return `${minutes}m`;\n}\n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AAK,CAAA,CAAA,CAAA;AACtC,EAAA,IAAI,QAAQ,CAAA,EAAG,OAAO,CAAA,EAAG,KAAK,KAAK,OAAO,CAAA,CAAA,CAAA;AAC1C,EAAA,OAAO,GAAG,OAAO,CAAA,CAAA,CAAA;AACnB;;"}
@@ -0,0 +1,33 @@
1
+ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
2
+ import * as react from 'react';
3
+
4
+ /**
5
+ * Route reference for the standalone `/temporal-approvals` page.
6
+ *
7
+ * @public
8
+ */
9
+ declare const temporalApprovalsRouteRef: _backstage_core_plugin_api.RouteRef<undefined>;
10
+
11
+ /**
12
+ * Standalone `/temporal-approvals` page with its own `<HeaderPage>`, for the
13
+ * Legacy Frontend System.
14
+ *
15
+ * @public
16
+ */
17
+ declare function TemporalApprovalsPage(props: {
18
+ searchAttribute?: string;
19
+ }): react.JSX.Element;
20
+
21
+ /**
22
+ * Lightweight card displaying the number of pending Temporal approvals and
23
+ * the most recent waiting runs, with a direct link to the approvals page.
24
+ *
25
+ * @public
26
+ */
27
+ declare function TemporalPendingApprovalsCard(props: {
28
+ namespace?: string;
29
+ searchAttribute?: string;
30
+ approvalsPath?: string;
31
+ }): react.JSX.Element;
32
+
33
+ export { TemporalApprovalsPage, TemporalPendingApprovalsCard, temporalApprovalsRouteRef };
@@ -0,0 +1,4 @@
1
+ export { temporalApprovalsRouteRef } from './routes.esm.js';
2
+ export { TemporalApprovalsPage } from './components/TemporalApprovalsPage.esm.js';
3
+ export { TemporalPendingApprovalsCard } from './components/TemporalPendingApprovalsCard.esm.js';
4
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,8 @@
1
+ import { createRouteRef } from '@backstage/core-plugin-api';
2
+
3
+ const temporalApprovalsRouteRef = createRouteRef({
4
+ id: "temporal-approvals"
5
+ });
6
+
7
+ export { temporalApprovalsRouteRef };
8
+ //# sourceMappingURL=routes.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2026 The backstage-plugin-temporal Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createRouteRef } from '@backstage/core-plugin-api';\n\n/**\n * Route reference for the standalone `/temporal-approvals` page.\n *\n * @public\n */\nexport const temporalApprovalsRouteRef = createRouteRef({\n id: 'temporal-approvals',\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,4BAA4B,cAAA,CAAe;AAAA,EACtD,EAAA,EAAI;AACN,CAAC;;"}
package/package.json CHANGED
@@ -1,6 +1,100 @@
1
1
  {
2
2
  "name": "@kwkevinchan/backstage-plugin-temporal-module-approvals",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.0",
4
+ "description": "Module of the unofficial Backstage Temporal plugin providing a dedicated /temporal-approvals page, approval drawer with browser-side codec decoding, and pending approvals card",
5
+ "license": "Apache-2.0",
6
+ "keywords": [
7
+ "backstage",
8
+ "backstage-plugin",
9
+ "temporal",
10
+ "workflow",
11
+ "approvals"
12
+ ],
13
+ "homepage": "https://github.com/kwkevinchan/backstage-plugin-temporal/tree/main/plugins/temporal-module-approvals",
14
+ "bugs": {
15
+ "url": "https://github.com/kwkevinchan/backstage-plugin-temporal/issues"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/kwkevinchan/backstage-plugin-temporal",
20
+ "directory": "plugins/temporal-module-approvals"
21
+ },
22
+ "main": "./dist/index.esm.js",
23
+ "types": "./dist/index.d.ts",
24
+ "exports": {
25
+ ".": {
26
+ "import": "./dist/index.esm.js",
27
+ "types": "./dist/index.d.ts",
28
+ "default": "./dist/index.esm.js"
29
+ },
30
+ "./alpha": {
31
+ "backstage": "@backstage/FrontendModule",
32
+ "import": "./dist/alpha.esm.js",
33
+ "types": "./dist/alpha.d.ts",
34
+ "default": "./dist/alpha.esm.js"
35
+ },
36
+ "./package.json": "./package.json"
37
+ },
38
+ "typesVersions": {
39
+ "*": {
40
+ "alpha": [
41
+ "dist/alpha.d.ts"
42
+ ],
43
+ "package.json": [
44
+ "package.json"
45
+ ]
46
+ }
47
+ },
48
+ "publishConfig": {
49
+ "access": "public"
50
+ },
51
+ "backstage": {
52
+ "role": "frontend-plugin-module",
53
+ "pluginId": "temporal",
54
+ "pluginPackage": "@kwkevinchan/backstage-plugin-temporal",
55
+ "features": {
56
+ "./alpha": "@backstage/FrontendModule"
57
+ }
58
+ },
59
+ "sideEffects": false,
60
+ "scripts": {
61
+ "build": "backstage-cli package build",
62
+ "lint": "backstage-cli package lint",
63
+ "test": "backstage-cli package test",
64
+ "clean": "backstage-cli package clean",
65
+ "prepack": "backstage-cli package prepack",
66
+ "postpack": "backstage-cli package postpack"
67
+ },
68
+ "dependencies": {
69
+ "@backstage/catalog-model": "^1.10.2",
70
+ "@backstage/core-compat-api": "^0.5.16",
71
+ "@backstage/core-plugin-api": "^1.12.11",
72
+ "@backstage/frontend-plugin-api": "^0.18.2",
73
+ "@backstage/plugin-catalog-react": "^3.3.0",
74
+ "@backstage/types": "^1.2.2",
75
+ "@backstage/ui": "^0.19.0",
76
+ "@kwkevinchan/backstage-plugin-temporal": "^0.2.0",
77
+ "@kwkevinchan/backstage-plugin-temporal-common": "^0.2.0",
78
+ "@kwkevinchan/backstage-plugin-temporal-react": "^0.2.0",
79
+ "@remixicon/react": ">=4.6.0 <4.9.0"
80
+ },
81
+ "peerDependencies": {
82
+ "react": "^18.0.0",
83
+ "react-dom": "^18.0.0",
84
+ "react-router-dom": "^6.0.0"
85
+ },
86
+ "devDependencies": {
87
+ "@backstage/cli": "^0.36.7",
88
+ "@backstage/test-utils": "^1.7.23",
89
+ "@testing-library/jest-dom": "^6.0.0",
90
+ "@testing-library/react": "^14.0.0",
91
+ "@testing-library/user-event": "^14.0.0",
92
+ "react": "^18.0.0",
93
+ "react-dom": "^18.0.0",
94
+ "react-router-dom": "^6.0.0"
95
+ },
96
+ "files": [
97
+ "dist"
98
+ ],
99
+ "module": "./dist/index.esm.js"
6
100
  }