@flowrunner/cli 0.1.7 → 0.1.9

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.
Files changed (37) hide show
  1. package/ai-docs/instructions/service-code-format/01-service-structure.md +2 -2
  2. package/ai-docs/instructions/service-code-format/04-http-requests.md +17 -13
  3. package/ai-docs/instructions/service-code-format/06-oauth2.md +1 -5
  4. package/ai-docs/instructions/service-code-format/07-actions.md +16 -12
  5. package/ai-docs/instructions/service-code-format/11-output-model.md +2 -1
  6. package/ai-docs/instructions/service-code-format/14-reference-service.md +5 -4
  7. package/ai-docs/instructions/service-code-format/17-client-certificates.md +5 -3
  8. package/dist/cli.js +19 -1
  9. package/dist/cli.js.map +2 -2
  10. package/dist/index.js +18 -0
  11. package/dist/index.js.map +2 -2
  12. package/dist/types/flow-extension-runner/src/v2/model/model-types.d.ts +1 -0
  13. package/dist/types/flow-extension-runner/src/v2/types.d.ts +2 -2
  14. package/dist/types/shared/src/constants/notification-types.d.ts +2 -2
  15. package/dist/types/shared/src/scheme/flowrunner/custom-elements.d.ts +4 -0
  16. package/dist/types/shared/src/scheme/shared-extensions/base.d.ts +1 -0
  17. package/dist/types/shared/src/scheme/shared-extensions/custom-extensions.d.ts +5 -0
  18. package/dist/types/shared/src/scheme/shared-extensions/extension.d.ts +4 -0
  19. package/dist/types/shared/src/scheme/shared-extensions/resolve.d.ts +3 -0
  20. package/dist/types/shared/src/scheme/shared-extensions/search.d.ts +2 -0
  21. package/dist/types/shared/src/scheme/shared-extensions/service-info.d.ts +1 -0
  22. package/package.json +1 -1
  23. package/runtime/index.js +1 -0
  24. package/runtime/index.js.map +2 -2
  25. package/runtime/types/flow-extension-runner/src/v2/model/model-types.d.ts +1 -0
  26. package/runtime/types/flow-extension-runner/src/v2/types.d.ts +2 -2
  27. package/runtime/types/shared/src/constants/notification-types.d.ts +2 -2
  28. package/runtime/types/shared/src/scheme/flowrunner/custom-elements.d.ts +4 -0
  29. package/runtime/types/shared/src/scheme/shared-extensions/base.d.ts +1 -0
  30. package/runtime/types/shared/src/scheme/shared-extensions/custom-extensions.d.ts +5 -0
  31. package/runtime/types/shared/src/scheme/shared-extensions/extension.d.ts +4 -0
  32. package/runtime/types/shared/src/scheme/shared-extensions/resolve.d.ts +3 -0
  33. package/runtime/types/shared/src/scheme/shared-extensions/search.d.ts +2 -0
  34. package/runtime/types/shared/src/scheme/shared-extensions/service-info.d.ts +1 -0
  35. package/templates/blank/files/src/index.js +1 -1
  36. package/templates/demo-todo-list/files/src/index.js +1 -1
  37. package/templates/qa-test/files/src/index.js +1 -1
@@ -59,6 +59,7 @@ export interface SharedExtensionServiceInfo {
59
59
  serviceClassName: string;
60
60
  integrationName: string;
61
61
  integrationIcon: string | null;
62
+ description?: string | null;
62
63
  integrationTriggersScope: string | null;
63
64
  requireOAuth?: boolean | null;
64
65
  }
@@ -42,7 +42,7 @@ export type SampleResult<TShape extends ExtensionShape, TSchema> = Record<string
42
42
  export interface ExtensionProps<TConfigSchema extends AnySchema = AnySchema, TContext = unknown, THelpers = Record<string, unknown>, TApiRequest extends ApiRequestFn = ApiRequestFn> {
43
43
  id: string;
44
44
  name: string;
45
- description: string;
45
+ description?: string;
46
46
  logo: string;
47
47
  appearanceColors?: [string, string];
48
48
  usesFileStorage?: boolean;
@@ -72,7 +72,7 @@ export interface DictionaryResultItem {
72
72
  }
73
73
  export type DictionaryResultItems = DictionaryResultItem[];
74
74
  export interface DictionaryResult {
75
- cursor?: string;
75
+ cursor?: string | null;
76
76
  items: DictionaryResultItems;
77
77
  }
78
78
  export interface DictionaryProps<TShape extends ExtensionShape = AnyShape, TCriteria extends AnySchema = AnySchema> {
@@ -477,7 +477,7 @@ export declare const WorkspaceNotificationTypes: {
477
477
  };
478
478
  readonly ACCESS_KEY_ROTATED: {
479
479
  readonly severity: "critical";
480
- readonly title: "Access key rotated";
480
+ readonly title: "API key regenerated";
481
481
  readonly message: (data: Record<string, unknown>) => string;
482
482
  readonly tags: ["security"];
483
483
  readonly dataSchema: z.ZodObject<{
@@ -806,7 +806,7 @@ export declare const AllNotificationTypes: {
806
806
  };
807
807
  readonly ACCESS_KEY_ROTATED: {
808
808
  readonly severity: "critical";
809
- readonly title: "Access key rotated";
809
+ readonly title: "API key regenerated";
810
810
  readonly message: (data: Record<string, unknown>) => string;
811
811
  readonly tags: ["security"];
812
812
  readonly dataSchema: z.ZodObject<{
@@ -3,6 +3,7 @@ export declare const CustomElementServiceInfoSchema: z.ZodObject<{
3
3
  serviceClassName: z.ZodString;
4
4
  integrationName: z.ZodString;
5
5
  integrationIcon: z.ZodNullable<z.ZodString>;
6
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
7
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
7
8
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
8
9
  appConfigDescriptions: z.ZodArray<z.ZodObject<{
@@ -85,6 +86,7 @@ export declare const CustomElementsBundleSchema: z.ZodObject<{
85
86
  serviceClassName: z.ZodString;
86
87
  integrationName: z.ZodString;
87
88
  integrationIcon: z.ZodNullable<z.ZodString>;
89
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
90
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
89
91
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
90
92
  appConfigDescriptions: z.ZodArray<z.ZodObject<{
@@ -169,6 +171,7 @@ export declare const SharedExtensionsElementsSchema: z.ZodObject<{
169
171
  serviceClassName: z.ZodString;
170
172
  integrationName: z.ZodString;
171
173
  integrationIcon: z.ZodNullable<z.ZodString>;
174
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
172
175
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
173
176
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
174
177
  appConfigDescriptions: z.ZodArray<z.ZodObject<{
@@ -281,6 +284,7 @@ export declare const CustomElementMethodWithServiceInfoSchema: z.ZodObject<{
281
284
  serviceClassName: z.ZodString;
282
285
  integrationName: z.ZodString;
283
286
  integrationIcon: z.ZodNullable<z.ZodString>;
287
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
284
288
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
285
289
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
286
290
  appConfigDescriptions: z.ZodArray<z.ZodObject<{
@@ -15,6 +15,7 @@ export declare const BaseInstalledExtensionDTOSchema: z.ZodObject<{
15
15
  serviceClassName: z.ZodString;
16
16
  integrationName: z.ZodString;
17
17
  integrationIcon: z.ZodNullable<z.ZodString>;
18
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
19
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
19
20
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
20
21
  }, z.core.$strip>;
@@ -15,6 +15,7 @@ export declare const CustomExtensionDTOSchema: z.ZodObject<{
15
15
  serviceClassName: z.ZodString;
16
16
  integrationName: z.ZodString;
17
17
  integrationIcon: z.ZodNullable<z.ZodString>;
18
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
19
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
19
20
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
20
21
  }, z.core.$strip>;
@@ -124,6 +125,7 @@ export declare const CustomExtensionDeployServiceSchema: z.ZodObject<{
124
125
  serviceClassName: z.ZodString;
125
126
  integrationName: z.ZodString;
126
127
  integrationIcon: z.ZodNullable<z.ZodString>;
128
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
127
129
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
128
130
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
129
131
  }, z.core.$strip>;
@@ -191,6 +193,7 @@ export declare const CustomExtensionDeployDefinitionSchema: z.ZodObject<{
191
193
  serviceClassName: z.ZodString;
192
194
  integrationName: z.ZodString;
193
195
  integrationIcon: z.ZodNullable<z.ZodString>;
196
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
194
197
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
195
198
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
196
199
  }, z.core.$strip>;
@@ -290,6 +293,7 @@ export declare const CustomExtensionElementsFullSchema: z.ZodObject<{
290
293
  serviceClassName: z.ZodString;
291
294
  integrationName: z.ZodString;
292
295
  integrationIcon: z.ZodNullable<z.ZodString>;
296
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
293
297
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
294
298
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
295
299
  appConfigDescriptions: z.ZodArray<z.ZodObject<{
@@ -381,6 +385,7 @@ export declare const CustomExtensionElementsSchema: z.ZodDiscriminatedUnion<[z.Z
381
385
  serviceClassName: z.ZodString;
382
386
  integrationName: z.ZodString;
383
387
  integrationIcon: z.ZodNullable<z.ZodString>;
388
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
384
389
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
385
390
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
386
391
  appConfigDescriptions: z.ZodArray<z.ZodObject<{
@@ -23,6 +23,7 @@ export declare const InstalledSharedExtensionDTOSchema: z.ZodObject<{
23
23
  serviceClassName: z.ZodString;
24
24
  integrationName: z.ZodString;
25
25
  integrationIcon: z.ZodNullable<z.ZodString>;
26
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
27
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
27
28
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
28
29
  }, z.core.$strip>;
@@ -112,6 +113,7 @@ export declare const MissingFSSharedExtensionDTOSchema: z.ZodObject<{
112
113
  serviceClassName: z.ZodString;
113
114
  integrationName: z.ZodString;
114
115
  integrationIcon: z.ZodNullable<z.ZodString>;
116
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
115
117
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
116
118
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
117
119
  }, z.core.$strip>;
@@ -211,6 +213,7 @@ export declare const AnySharedExtensionVersionSchema: z.ZodDiscriminatedUnion<[z
211
213
  serviceClassName: z.ZodString;
212
214
  integrationName: z.ZodString;
213
215
  integrationIcon: z.ZodNullable<z.ZodString>;
216
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
214
217
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
215
218
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
216
219
  }, z.core.$strip>;
@@ -299,6 +302,7 @@ export declare const AnySharedExtensionVersionSchema: z.ZodDiscriminatedUnion<[z
299
302
  serviceClassName: z.ZodString;
300
303
  integrationName: z.ZodString;
301
304
  integrationIcon: z.ZodNullable<z.ZodString>;
305
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
302
306
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
303
307
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
304
308
  }, z.core.$strip>;
@@ -34,6 +34,7 @@ export declare const ExtensionResolveUpdatedSchema: z.ZodObject<{
34
34
  serviceClassName: z.ZodString;
35
35
  integrationName: z.ZodString;
36
36
  integrationIcon: z.ZodNullable<z.ZodString>;
37
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
38
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
38
39
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
39
40
  appConfigDescriptions: z.ZodArray<z.ZodObject<{
@@ -144,6 +145,7 @@ export declare const ExtensionResolveResultItemSchema: z.ZodDiscriminatedUnion<[
144
145
  serviceClassName: z.ZodString;
145
146
  integrationName: z.ZodString;
146
147
  integrationIcon: z.ZodNullable<z.ZodString>;
148
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
147
149
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
148
150
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
149
151
  appConfigDescriptions: z.ZodArray<z.ZodObject<{
@@ -253,6 +255,7 @@ export declare const ExtensionResolveResponseSchema: z.ZodArray<z.ZodDiscriminat
253
255
  serviceClassName: z.ZodString;
254
256
  integrationName: z.ZodString;
255
257
  integrationIcon: z.ZodNullable<z.ZodString>;
258
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
256
259
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
257
260
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
258
261
  appConfigDescriptions: z.ZodArray<z.ZodObject<{
@@ -38,6 +38,7 @@ export declare const SharedExtensionSearchResultMethodSchema: z.ZodObject<{
38
38
  serviceClassName: z.ZodString;
39
39
  integrationName: z.ZodString;
40
40
  integrationIcon: z.ZodNullable<z.ZodString>;
41
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
41
42
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
42
43
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
43
44
  appConfigDescriptions: z.ZodArray<z.ZodObject<{
@@ -130,6 +131,7 @@ export declare const SearchSharedExtensionsResponseSchema: z.ZodObject<{
130
131
  serviceClassName: z.ZodString;
131
132
  integrationName: z.ZodString;
132
133
  integrationIcon: z.ZodNullable<z.ZodString>;
134
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
133
135
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
134
136
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
135
137
  appConfigDescriptions: z.ZodArray<z.ZodObject<{
@@ -3,6 +3,7 @@ export declare const ParsedFlowExtensionServiceInfoSchema: z.ZodObject<{
3
3
  serviceClassName: z.ZodString;
4
4
  integrationName: z.ZodString;
5
5
  integrationIcon: z.ZodNullable<z.ZodString>;
6
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
7
  integrationTriggersScope: z.ZodNullable<z.ZodString>;
7
8
  requireOAuth: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
8
9
  }, z.core.$strip>;
@@ -59,7 +59,7 @@ const ext = Flowrunner.createExtension({
59
59
  'X-Api-Key' : context.apiKey,
60
60
  }
61
61
 
62
- return Flowrunner.Request[method.toLowerCase()](`${ context.baseUrl }${ path }`)
62
+ return new Flowrunner.Request(`${ context.baseUrl }${ path }`, method)
63
63
  .set(headers)
64
64
  .query(query)
65
65
  .send(body)
@@ -74,7 +74,7 @@ const ext = Flowrunner.createExtension({
74
74
  : headers
75
75
 
76
76
  try {
77
- return await Flowrunner.Request[method.toLowerCase()](url)
77
+ return await new Flowrunner.Request(url, method)
78
78
  .set(allHeaders)
79
79
  .query(query)
80
80
  .send(body)
@@ -82,7 +82,7 @@ const ext = Flowrunner.createExtension({
82
82
  logger.debug(`[${ method.toUpperCase() }] ${ url } (harness ${ context.harnessVersion })`)
83
83
 
84
84
  try {
85
- return await Flowrunner.Request[method.toLowerCase()](url)
85
+ return await new Flowrunner.Request(url, method)
86
86
  .set(headers)
87
87
  .query(query)
88
88
  .send(body)