@yaakapp/api 0.2.14 → 0.2.16

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.
@@ -171,6 +171,9 @@ export type InternalEventPayload = {
171
171
  };
172
172
  export type OpenFileFilter = {
173
173
  name: string;
174
+ /**
175
+ * File extensions to require
176
+ */
174
177
  extensions: Array<string>;
175
178
  };
176
179
  export type PromptTextRequest = {
@@ -217,6 +220,11 @@ export type ShowToastRequest = {
217
220
  };
218
221
  export type TemplateFunction = {
219
222
  name: string;
223
+ description?: string;
224
+ /**
225
+ * Also support alternative names. This is useful for not breaking existing
226
+ * tags when changing the `name` property
227
+ */
220
228
  aliases?: Array<string>;
221
229
  args: Array<TemplateFunctionArg>;
222
230
  };
@@ -232,50 +240,134 @@ export type TemplateFunctionArg = {
232
240
  "type": "file";
233
241
  } & TemplateFunctionFileArg;
234
242
  export type TemplateFunctionBaseArg = {
243
+ /**
244
+ * The name of the argument. Should be `camelCase` format
245
+ */
235
246
  name: string;
247
+ /**
248
+ * Whether the user must fill in the argument
249
+ */
236
250
  optional?: boolean;
251
+ /**
252
+ * The label of the input
253
+ */
237
254
  label?: string;
255
+ /**
256
+ * The default value
257
+ */
238
258
  defaultValue?: string;
239
259
  };
240
260
  export type TemplateFunctionCheckboxArg = {
261
+ /**
262
+ * The name of the argument. Should be `camelCase` format
263
+ */
241
264
  name: string;
265
+ /**
266
+ * Whether the user must fill in the argument
267
+ */
242
268
  optional?: boolean;
269
+ /**
270
+ * The label of the input
271
+ */
243
272
  label?: string;
273
+ /**
274
+ * The default value
275
+ */
244
276
  defaultValue?: string;
245
277
  };
246
278
  export type TemplateFunctionFileArg = {
279
+ /**
280
+ * The title of the file selection window
281
+ */
247
282
  title: string;
283
+ /**
284
+ * Allow selecting multiple files
285
+ */
248
286
  multiple?: boolean;
249
287
  directory?: boolean;
250
288
  defaultPath?: string;
251
289
  filters?: Array<OpenFileFilter>;
290
+ /**
291
+ * The name of the argument. Should be `camelCase` format
292
+ */
252
293
  name: string;
294
+ /**
295
+ * Whether the user must fill in the argument
296
+ */
253
297
  optional?: boolean;
298
+ /**
299
+ * The label of the input
300
+ */
254
301
  label?: string;
302
+ /**
303
+ * The default value
304
+ */
255
305
  defaultValue?: string;
256
306
  };
257
307
  export type TemplateFunctionHttpRequestArg = {
308
+ /**
309
+ * The name of the argument. Should be `camelCase` format
310
+ */
258
311
  name: string;
312
+ /**
313
+ * Whether the user must fill in the argument
314
+ */
259
315
  optional?: boolean;
316
+ /**
317
+ * The label of the input
318
+ */
260
319
  label?: string;
320
+ /**
321
+ * The default value
322
+ */
261
323
  defaultValue?: string;
262
324
  };
263
325
  export type TemplateFunctionSelectArg = {
326
+ /**
327
+ * The options that will be available in the select input
328
+ */
264
329
  options: Array<TemplateFunctionSelectOption>;
330
+ /**
331
+ * The name of the argument. Should be `camelCase` format
332
+ */
265
333
  name: string;
334
+ /**
335
+ * Whether the user must fill in the argument
336
+ */
266
337
  optional?: boolean;
338
+ /**
339
+ * The label of the input
340
+ */
267
341
  label?: string;
342
+ /**
343
+ * The default value
344
+ */
268
345
  defaultValue?: string;
269
346
  };
270
347
  export type TemplateFunctionSelectOption = {
271
- name: string;
348
+ label: string;
272
349
  value: string;
273
350
  };
274
351
  export type TemplateFunctionTextArg = {
352
+ /**
353
+ * Placeholder for the text input
354
+ */
275
355
  placeholder?: string;
356
+ /**
357
+ * The name of the argument. Should be `camelCase` format
358
+ */
276
359
  name: string;
360
+ /**
361
+ * Whether the user must fill in the argument
362
+ */
277
363
  optional?: boolean;
364
+ /**
365
+ * The label of the input
366
+ */
278
367
  label?: string;
368
+ /**
369
+ * The default value
370
+ */
279
371
  defaultValue?: string;
280
372
  };
281
373
  export type TemplateRenderRequest = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaakapp/api",
3
- "version": "0.2.14",
3
+ "version": "0.2.16",
4
4
  "main": "lib/index.js",
5
5
  "typings": "./lib/index.d.ts",
6
6
  "files": [
@@ -13,7 +13,8 @@
13
13
  "build:copy-types": "run-p build:copy-types:*",
14
14
  "build:copy-types:root": "cpy --flat ../src-tauri/yaak_plugin_runtime/bindings/*.ts ./src/bindings",
15
15
  "build:copy-types:next": "cpy --flat ../src-tauri/yaak_plugin_runtime/bindings/serde_json/*.ts ./src/bindings/serde_json",
16
- "prepublishOnly": "npm run build"
16
+ "prepublishOnly": "npm run build",
17
+ "publish": "npm publish"
17
18
  },
18
19
  "dependencies": {
19
20
  "@types/node": "^22.5.4"