@ever-works/make-plugin 1.0.0 → 1.0.6
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.cjs +3608 -0
- package/dist/index.d.cts +144 -0
- package/dist/index.d.ts +144 -0
- package/dist/index.js +3581 -0
- package/package.json +82 -73
- package/LICENSE +0 -661
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { IPlugin, IPipelinePlugin, IFormSchemaProvider, PluginCategory, JsonSchema, PluginContext, PluginHealthCheck, ValidationResult, ConnectionValidationResult, PluginManifest, FormFieldDefinition, FormFieldGroup, PipelineStepDefinition, WorkReference, GenerationRequest, ExistingItems, PipelineExecutionOptions, PipelineProgressCallback, PipelineResult, PipelineState } from '@ever-works/plugin';
|
|
2
|
+
|
|
3
|
+
/** Step IDs for the Make.com pipeline. */
|
|
4
|
+
type MakeStepId = 'validate-make' | 'prepare-payload' | 'execute-scenario' | 'collect-results' | 'capture-screenshots' | 'cleanup';
|
|
5
|
+
/** Execution modes supported by the plugin */
|
|
6
|
+
type MakeExecutionMode = 'webhook' | 'scenario';
|
|
7
|
+
/** Data source types for passing data to Make.com */
|
|
8
|
+
type DataSourceType = 'inline' | 'github-repo';
|
|
9
|
+
/** Input payload sent to Make.com scenario or webhook */
|
|
10
|
+
interface MakeWorkflowInput {
|
|
11
|
+
metadata: {
|
|
12
|
+
workId: string;
|
|
13
|
+
workName: string;
|
|
14
|
+
workSlug: string;
|
|
15
|
+
workDescription?: string;
|
|
16
|
+
prompt?: string;
|
|
17
|
+
generationMethod?: string;
|
|
18
|
+
targetItems: number;
|
|
19
|
+
};
|
|
20
|
+
existingSummary?: {
|
|
21
|
+
totalItems: number;
|
|
22
|
+
categories: string[];
|
|
23
|
+
tags: string[];
|
|
24
|
+
sampleItems: Array<{
|
|
25
|
+
name: string;
|
|
26
|
+
url?: string;
|
|
27
|
+
}>;
|
|
28
|
+
};
|
|
29
|
+
dataSource?: {
|
|
30
|
+
type: DataSourceType;
|
|
31
|
+
repoUrl?: string;
|
|
32
|
+
accessToken?: string;
|
|
33
|
+
branch?: string;
|
|
34
|
+
path?: string;
|
|
35
|
+
};
|
|
36
|
+
scenarioParams?: Record<string, unknown>;
|
|
37
|
+
}
|
|
38
|
+
/** Expected output from a Make.com scenario/webhook */
|
|
39
|
+
interface MakeWorkflowOutput {
|
|
40
|
+
items: MakeOutputItem[];
|
|
41
|
+
categories?: Array<{
|
|
42
|
+
name: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
}>;
|
|
45
|
+
tags?: Array<{
|
|
46
|
+
name: string;
|
|
47
|
+
}>;
|
|
48
|
+
brands?: Array<{
|
|
49
|
+
name: string;
|
|
50
|
+
url?: string;
|
|
51
|
+
}>;
|
|
52
|
+
}
|
|
53
|
+
/** Single item in Make.com workflow output */
|
|
54
|
+
interface MakeOutputItem {
|
|
55
|
+
name: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
url?: string;
|
|
58
|
+
source_url?: string;
|
|
59
|
+
content?: string;
|
|
60
|
+
category?: string;
|
|
61
|
+
tags?: string[];
|
|
62
|
+
brand?: string;
|
|
63
|
+
images?: string[];
|
|
64
|
+
metadata?: Record<string, unknown>;
|
|
65
|
+
}
|
|
66
|
+
/** Resolved settings for the Make.com plugin */
|
|
67
|
+
interface MakeSettings {
|
|
68
|
+
apiKey: string;
|
|
69
|
+
baseUrl: string;
|
|
70
|
+
teamId?: string;
|
|
71
|
+
organizationId?: string;
|
|
72
|
+
defaultScenarioId?: string;
|
|
73
|
+
defaultHookId?: string;
|
|
74
|
+
defaultWebhookUrl?: string;
|
|
75
|
+
executionMode: MakeExecutionMode;
|
|
76
|
+
timeoutMs: number;
|
|
77
|
+
pollIntervalMs: number;
|
|
78
|
+
maxPollAttempts: number;
|
|
79
|
+
}
|
|
80
|
+
/** Shape of a Make.com scenario returned by the API */
|
|
81
|
+
interface MakeScenarioSummary {
|
|
82
|
+
id: number | string;
|
|
83
|
+
name: string;
|
|
84
|
+
teamId?: number;
|
|
85
|
+
isActive?: boolean;
|
|
86
|
+
isPaused?: boolean;
|
|
87
|
+
hookId?: number | string;
|
|
88
|
+
description?: string;
|
|
89
|
+
}
|
|
90
|
+
/** Shape of a Make.com hook returned by the API */
|
|
91
|
+
interface MakeHookSummary {
|
|
92
|
+
id: number | string;
|
|
93
|
+
name: string;
|
|
94
|
+
type?: string;
|
|
95
|
+
url?: string;
|
|
96
|
+
teamId?: number;
|
|
97
|
+
typeName?: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Make.com Workflows Plugin
|
|
102
|
+
*
|
|
103
|
+
* Pipeline plugin that delegates work generation to a Make.com scenario
|
|
104
|
+
* or webhook. The plugin triggers the scenario/webhook at a pipeline stage,
|
|
105
|
+
* polls for completion, and returns structured items ready to be stored.
|
|
106
|
+
*/
|
|
107
|
+
declare class MakePlugin implements IPlugin, IPipelinePlugin, IFormSchemaProvider {
|
|
108
|
+
readonly id = "make";
|
|
109
|
+
readonly name = "Make.com Workflows";
|
|
110
|
+
readonly version = "1.0.0";
|
|
111
|
+
readonly category: PluginCategory;
|
|
112
|
+
readonly capabilities: readonly ["pipeline", "form-schema-provider"];
|
|
113
|
+
readonly configurationMode: "user-required";
|
|
114
|
+
readonly handledConfigFields: readonly ["*"];
|
|
115
|
+
readonly settingsSchema: JsonSchema;
|
|
116
|
+
private context;
|
|
117
|
+
onLoad(context: PluginContext): Promise<void>;
|
|
118
|
+
onUnload(): Promise<void>;
|
|
119
|
+
healthCheck(): Promise<PluginHealthCheck>;
|
|
120
|
+
isAvailable(settings?: Record<string, unknown>): Promise<boolean>;
|
|
121
|
+
validateSettings(settings: Record<string, unknown>): Promise<ValidationResult>;
|
|
122
|
+
validateConnection(rawSettings: Record<string, unknown>): Promise<ConnectionValidationResult>;
|
|
123
|
+
getManifest(): PluginManifest;
|
|
124
|
+
getFormFields(): FormFieldDefinition[];
|
|
125
|
+
getFormGroups(): FormFieldGroup[];
|
|
126
|
+
validateFormInput(values: Record<string, unknown>): ValidationResult;
|
|
127
|
+
getDefaultValues(): Record<string, unknown>;
|
|
128
|
+
getStepDefinitions(): readonly PipelineStepDefinition[];
|
|
129
|
+
private _lastState;
|
|
130
|
+
private _lastAbortController;
|
|
131
|
+
execute(work: WorkReference, request: GenerationRequest, existing: ExistingItems, options?: PipelineExecutionOptions, onProgress?: PipelineProgressCallback): Promise<PipelineResult>;
|
|
132
|
+
cancel(): Promise<void>;
|
|
133
|
+
getState(): PipelineState<MakeStepId> | null;
|
|
134
|
+
private resolveMakeSettings;
|
|
135
|
+
private resolveExecutionTarget;
|
|
136
|
+
private extractExecutionId;
|
|
137
|
+
private captureScreenshots;
|
|
138
|
+
/**
|
|
139
|
+
* Flatten a ResolvedSettings map into plain key->value pairs.
|
|
140
|
+
*/
|
|
141
|
+
private flattenSettings;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export { type MakeExecutionMode, type MakeHookSummary, type MakeOutputItem, MakePlugin, type MakeScenarioSummary, type MakeSettings, type MakeStepId, type MakeWorkflowInput, type MakeWorkflowOutput, MakePlugin as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { IPlugin, IPipelinePlugin, IFormSchemaProvider, PluginCategory, JsonSchema, PluginContext, PluginHealthCheck, ValidationResult, ConnectionValidationResult, PluginManifest, FormFieldDefinition, FormFieldGroup, PipelineStepDefinition, WorkReference, GenerationRequest, ExistingItems, PipelineExecutionOptions, PipelineProgressCallback, PipelineResult, PipelineState } from '@ever-works/plugin';
|
|
2
|
+
|
|
3
|
+
/** Step IDs for the Make.com pipeline. */
|
|
4
|
+
type MakeStepId = 'validate-make' | 'prepare-payload' | 'execute-scenario' | 'collect-results' | 'capture-screenshots' | 'cleanup';
|
|
5
|
+
/** Execution modes supported by the plugin */
|
|
6
|
+
type MakeExecutionMode = 'webhook' | 'scenario';
|
|
7
|
+
/** Data source types for passing data to Make.com */
|
|
8
|
+
type DataSourceType = 'inline' | 'github-repo';
|
|
9
|
+
/** Input payload sent to Make.com scenario or webhook */
|
|
10
|
+
interface MakeWorkflowInput {
|
|
11
|
+
metadata: {
|
|
12
|
+
workId: string;
|
|
13
|
+
workName: string;
|
|
14
|
+
workSlug: string;
|
|
15
|
+
workDescription?: string;
|
|
16
|
+
prompt?: string;
|
|
17
|
+
generationMethod?: string;
|
|
18
|
+
targetItems: number;
|
|
19
|
+
};
|
|
20
|
+
existingSummary?: {
|
|
21
|
+
totalItems: number;
|
|
22
|
+
categories: string[];
|
|
23
|
+
tags: string[];
|
|
24
|
+
sampleItems: Array<{
|
|
25
|
+
name: string;
|
|
26
|
+
url?: string;
|
|
27
|
+
}>;
|
|
28
|
+
};
|
|
29
|
+
dataSource?: {
|
|
30
|
+
type: DataSourceType;
|
|
31
|
+
repoUrl?: string;
|
|
32
|
+
accessToken?: string;
|
|
33
|
+
branch?: string;
|
|
34
|
+
path?: string;
|
|
35
|
+
};
|
|
36
|
+
scenarioParams?: Record<string, unknown>;
|
|
37
|
+
}
|
|
38
|
+
/** Expected output from a Make.com scenario/webhook */
|
|
39
|
+
interface MakeWorkflowOutput {
|
|
40
|
+
items: MakeOutputItem[];
|
|
41
|
+
categories?: Array<{
|
|
42
|
+
name: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
}>;
|
|
45
|
+
tags?: Array<{
|
|
46
|
+
name: string;
|
|
47
|
+
}>;
|
|
48
|
+
brands?: Array<{
|
|
49
|
+
name: string;
|
|
50
|
+
url?: string;
|
|
51
|
+
}>;
|
|
52
|
+
}
|
|
53
|
+
/** Single item in Make.com workflow output */
|
|
54
|
+
interface MakeOutputItem {
|
|
55
|
+
name: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
url?: string;
|
|
58
|
+
source_url?: string;
|
|
59
|
+
content?: string;
|
|
60
|
+
category?: string;
|
|
61
|
+
tags?: string[];
|
|
62
|
+
brand?: string;
|
|
63
|
+
images?: string[];
|
|
64
|
+
metadata?: Record<string, unknown>;
|
|
65
|
+
}
|
|
66
|
+
/** Resolved settings for the Make.com plugin */
|
|
67
|
+
interface MakeSettings {
|
|
68
|
+
apiKey: string;
|
|
69
|
+
baseUrl: string;
|
|
70
|
+
teamId?: string;
|
|
71
|
+
organizationId?: string;
|
|
72
|
+
defaultScenarioId?: string;
|
|
73
|
+
defaultHookId?: string;
|
|
74
|
+
defaultWebhookUrl?: string;
|
|
75
|
+
executionMode: MakeExecutionMode;
|
|
76
|
+
timeoutMs: number;
|
|
77
|
+
pollIntervalMs: number;
|
|
78
|
+
maxPollAttempts: number;
|
|
79
|
+
}
|
|
80
|
+
/** Shape of a Make.com scenario returned by the API */
|
|
81
|
+
interface MakeScenarioSummary {
|
|
82
|
+
id: number | string;
|
|
83
|
+
name: string;
|
|
84
|
+
teamId?: number;
|
|
85
|
+
isActive?: boolean;
|
|
86
|
+
isPaused?: boolean;
|
|
87
|
+
hookId?: number | string;
|
|
88
|
+
description?: string;
|
|
89
|
+
}
|
|
90
|
+
/** Shape of a Make.com hook returned by the API */
|
|
91
|
+
interface MakeHookSummary {
|
|
92
|
+
id: number | string;
|
|
93
|
+
name: string;
|
|
94
|
+
type?: string;
|
|
95
|
+
url?: string;
|
|
96
|
+
teamId?: number;
|
|
97
|
+
typeName?: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Make.com Workflows Plugin
|
|
102
|
+
*
|
|
103
|
+
* Pipeline plugin that delegates work generation to a Make.com scenario
|
|
104
|
+
* or webhook. The plugin triggers the scenario/webhook at a pipeline stage,
|
|
105
|
+
* polls for completion, and returns structured items ready to be stored.
|
|
106
|
+
*/
|
|
107
|
+
declare class MakePlugin implements IPlugin, IPipelinePlugin, IFormSchemaProvider {
|
|
108
|
+
readonly id = "make";
|
|
109
|
+
readonly name = "Make.com Workflows";
|
|
110
|
+
readonly version = "1.0.0";
|
|
111
|
+
readonly category: PluginCategory;
|
|
112
|
+
readonly capabilities: readonly ["pipeline", "form-schema-provider"];
|
|
113
|
+
readonly configurationMode: "user-required";
|
|
114
|
+
readonly handledConfigFields: readonly ["*"];
|
|
115
|
+
readonly settingsSchema: JsonSchema;
|
|
116
|
+
private context;
|
|
117
|
+
onLoad(context: PluginContext): Promise<void>;
|
|
118
|
+
onUnload(): Promise<void>;
|
|
119
|
+
healthCheck(): Promise<PluginHealthCheck>;
|
|
120
|
+
isAvailable(settings?: Record<string, unknown>): Promise<boolean>;
|
|
121
|
+
validateSettings(settings: Record<string, unknown>): Promise<ValidationResult>;
|
|
122
|
+
validateConnection(rawSettings: Record<string, unknown>): Promise<ConnectionValidationResult>;
|
|
123
|
+
getManifest(): PluginManifest;
|
|
124
|
+
getFormFields(): FormFieldDefinition[];
|
|
125
|
+
getFormGroups(): FormFieldGroup[];
|
|
126
|
+
validateFormInput(values: Record<string, unknown>): ValidationResult;
|
|
127
|
+
getDefaultValues(): Record<string, unknown>;
|
|
128
|
+
getStepDefinitions(): readonly PipelineStepDefinition[];
|
|
129
|
+
private _lastState;
|
|
130
|
+
private _lastAbortController;
|
|
131
|
+
execute(work: WorkReference, request: GenerationRequest, existing: ExistingItems, options?: PipelineExecutionOptions, onProgress?: PipelineProgressCallback): Promise<PipelineResult>;
|
|
132
|
+
cancel(): Promise<void>;
|
|
133
|
+
getState(): PipelineState<MakeStepId> | null;
|
|
134
|
+
private resolveMakeSettings;
|
|
135
|
+
private resolveExecutionTarget;
|
|
136
|
+
private extractExecutionId;
|
|
137
|
+
private captureScreenshots;
|
|
138
|
+
/**
|
|
139
|
+
* Flatten a ResolvedSettings map into plain key->value pairs.
|
|
140
|
+
*/
|
|
141
|
+
private flattenSettings;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export { type MakeExecutionMode, type MakeHookSummary, type MakeOutputItem, MakePlugin, type MakeScenarioSummary, type MakeSettings, type MakeStepId, type MakeWorkflowInput, type MakeWorkflowOutput, MakePlugin as default };
|