mirror of
https://github.com/block/buzz.git
synced 2026-11-27 11:41:21 +00:00
Merge remote-tracking branch 'origin/main' into projects-v6
Signed-off-by: Thomas Petersen <thomasp@squareup.com>
This commit is contained in:
@@ -100,6 +100,7 @@ type RawSearchResponse = {
|
||||
|
||||
type RawRelayAgent = {
|
||||
pubkey: string;
|
||||
owner_pubkey?: string | null;
|
||||
name: string;
|
||||
agent_type: string;
|
||||
channels: string[];
|
||||
@@ -109,7 +110,6 @@ type RawRelayAgent = {
|
||||
respond_to?: RelayAgent["respondTo"];
|
||||
respond_to_allowlist?: string[];
|
||||
};
|
||||
|
||||
import type { RestartDiffEntry as RawRestartDiffEntry } from "./restartDiff";
|
||||
export type RawManagedAgent = {
|
||||
pubkey: string;
|
||||
@@ -652,10 +652,10 @@ export async function createAuthEvent(input: {
|
||||
const eventJson = await invokeTauri<string>("create_auth_event", input);
|
||||
return JSON.parse(eventJson) as RelayEvent;
|
||||
}
|
||||
|
||||
function fromRawRelayAgent(agent: RawRelayAgent): RelayAgent {
|
||||
return {
|
||||
pubkey: agent.pubkey,
|
||||
ownerPubkey: agent.owner_pubkey ?? null,
|
||||
name: agent.name,
|
||||
agentType: agent.agent_type,
|
||||
channels: agent.channels,
|
||||
|
||||
@@ -13,6 +13,7 @@ import type {
|
||||
|
||||
type RawWorkflow = {
|
||||
id: string;
|
||||
revision: string;
|
||||
name: string;
|
||||
owner_pubkey: string;
|
||||
channel_id: string | null;
|
||||
@@ -94,6 +95,7 @@ type RawApprovalActionResponse = {
|
||||
function fromRawWorkflow(raw: RawWorkflow): Workflow {
|
||||
return {
|
||||
id: raw.id,
|
||||
revision: raw.revision,
|
||||
name: raw.name,
|
||||
ownerPubkey: raw.owner_pubkey,
|
||||
channelId: raw.channel_id,
|
||||
@@ -220,10 +222,12 @@ export async function createWorkflow(
|
||||
export async function updateWorkflow(
|
||||
workflowId: string,
|
||||
yamlDefinition: string,
|
||||
expectedRevision: string,
|
||||
): Promise<WorkflowSaveResult> {
|
||||
const raw = await invokeTauri<RawWorkflowSaveResponse>("update_workflow", {
|
||||
workflowId,
|
||||
yamlDefinition,
|
||||
expectedRevision,
|
||||
});
|
||||
return fromRawWorkflowSave(raw);
|
||||
}
|
||||
|
||||
@@ -266,9 +266,9 @@ export type RelayMember = {
|
||||
addedBy: string | null;
|
||||
createdAt: string;
|
||||
};
|
||||
|
||||
export type RelayAgent = {
|
||||
pubkey: string;
|
||||
ownerPubkey: string | null;
|
||||
name: string;
|
||||
agentType: string;
|
||||
channels: string[];
|
||||
|
||||
@@ -2,6 +2,7 @@ export type WorkflowStatus = "active" | "disabled" | "archived";
|
||||
|
||||
export type Workflow = {
|
||||
id: string;
|
||||
revision: string;
|
||||
name: string;
|
||||
ownerPubkey: string;
|
||||
channelId: string | null;
|
||||
|
||||
Reference in New Issue
Block a user