@kong-ui-public/entities-plugins 9.194.3 → 9.195.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.
Files changed (42) hide show
  1. package/dist/endpoints/plugins-endpoints.d.ts +18 -1
  2. package/dist/endpoints/plugins-endpoints.js +20 -0
  3. package/dist/entities-plugins.es.js +10231 -10041
  4. package/dist/entities-plugins.umd.js +114 -114
  5. package/dist/style.css +1 -1
  6. package/dist/types/components/CustomPluginForm.vue.d.ts +21 -12
  7. package/dist/types/components/CustomPluginForm.vue.d.ts.map +1 -1
  8. package/dist/types/components/PluginForm.vue.d.ts +1 -1
  9. package/dist/types/components/free-form/plugins/acl/index.d.ts +1 -1
  10. package/dist/types/components/free-form/plugins/ai-custom-guardrail.d.ts +1 -1
  11. package/dist/types/components/free-form/plugins/ai-mcp-proxy/index.d.ts +1 -1
  12. package/dist/types/components/free-form/plugins/cors.d.ts +1 -1
  13. package/dist/types/components/free-form/plugins/datakit/flow-editor/composables/useBranchNodeForm.d.ts +1 -1
  14. package/dist/types/components/free-form/plugins/datakit/flow-editor/store/flow.d.ts +15 -15
  15. package/dist/types/components/free-form/plugins/datakit/index.d.ts +1 -1
  16. package/dist/types/components/free-form/plugins/exit-transformer.d.ts +1 -1
  17. package/dist/types/components/free-form/plugins/file-log.d.ts +1 -1
  18. package/dist/types/components/free-form/plugins/http-log.d.ts +1 -1
  19. package/dist/types/components/free-form/plugins/key-auth/index.d.ts +1 -1
  20. package/dist/types/components/free-form/plugins/metering-and-billing/index.d.ts +1 -1
  21. package/dist/types/components/free-form/plugins/opentelemetry.d.ts +1 -1
  22. package/dist/types/components/free-form/plugins/proxy-cache-advanced.d.ts +1 -1
  23. package/dist/types/components/free-form/plugins/proxy-cache.d.ts +1 -1
  24. package/dist/types/components/free-form/plugins/request-callout/index.d.ts +1 -1
  25. package/dist/types/components/free-form/plugins/response-transformer-advanced.d.ts +1 -1
  26. package/dist/types/components/free-form/plugins/response-transformer.d.ts +1 -1
  27. package/dist/types/components/free-form/plugins/service-protection/index.d.ts +1 -1
  28. package/dist/types/components/free-form/plugins/solace-consume.d.ts +1 -1
  29. package/dist/types/components/free-form/plugins/solace-log.d.ts +1 -1
  30. package/dist/types/components/free-form/plugins/solace-upstream.d.ts +1 -1
  31. package/dist/types/components/free-form/plugins/upstream-oauth.d.ts +1 -1
  32. package/dist/types/composables/index.d.ts +2 -0
  33. package/dist/types/composables/index.d.ts.map +1 -1
  34. package/dist/types/composables/useCustomPluginApi.d.ts +34 -0
  35. package/dist/types/composables/useCustomPluginApi.d.ts.map +1 -0
  36. package/dist/types/index.d.ts +1 -1
  37. package/dist/types/plugins-endpoints.d.ts +18 -0
  38. package/dist/types/plugins-endpoints.d.ts.map +1 -1
  39. package/dist/types/types/custom-plugin-form.d.ts +26 -22
  40. package/dist/types/types/custom-plugin-form.d.ts.map +1 -1
  41. package/package.json +13 -13
  42. package/dist/endpoints/plugins-endpoints.d.ts.map +0 -1
@@ -1,38 +1,47 @@
1
1
  import '@kong-ui-public/entities-shared/dist/style.css';
2
2
  import type { PropType } from 'vue';
3
- import type { CustomPluginFormConfig, FormPayload } from '../types';
3
+ import type { ClonedPluginPayload, KonnectCustomPluginFormConfig, CustomPluginFormType, InstalledPluginResponse, StreamedPluginResponse, KongManagerCustomPluginFormConfig } from '../types';
4
4
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
5
  config: {
6
- type: PropType<CustomPluginFormConfig>;
6
+ type: PropType<KonnectCustomPluginFormConfig | KongManagerCustomPluginFormConfig>;
7
7
  required: true;
8
- validator: (config: CustomPluginFormConfig) => boolean;
8
+ validator: (config: KonnectCustomPluginFormConfig | KongManagerCustomPluginFormConfig) => boolean;
9
9
  };
10
- /** The ID of a specific plugin instance. If a valid Plugin ID is provided, it will put the form in Edit mode instead of Create */
11
- pluginId: {
10
+ /** The name of a specific plugin instance. If a valid Plugin Name is provided, it will put the form in Edit mode instead of Create */
11
+ pluginName: {
12
12
  type: StringConstructor;
13
13
  default: string;
14
14
  };
15
+ unsupportedTypes: {
16
+ type: PropType<CustomPluginFormType[]>;
17
+ default: () => never[];
18
+ };
15
19
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
16
20
  error: (error: unknown) => any;
17
21
  loading: (isLoading: boolean) => any;
18
- update: (data: FormPayload) => any;
22
+ update: (data: InstalledPluginResponse | StreamedPluginResponse | ClonedPluginPayload) => any;
19
23
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
20
24
  config: {
21
- type: PropType<CustomPluginFormConfig>;
25
+ type: PropType<KonnectCustomPluginFormConfig | KongManagerCustomPluginFormConfig>;
22
26
  required: true;
23
- validator: (config: CustomPluginFormConfig) => boolean;
27
+ validator: (config: KonnectCustomPluginFormConfig | KongManagerCustomPluginFormConfig) => boolean;
24
28
  };
25
- /** The ID of a specific plugin instance. If a valid Plugin ID is provided, it will put the form in Edit mode instead of Create */
26
- pluginId: {
29
+ /** The name of a specific plugin instance. If a valid Plugin Name is provided, it will put the form in Edit mode instead of Create */
30
+ pluginName: {
27
31
  type: StringConstructor;
28
32
  default: string;
29
33
  };
34
+ unsupportedTypes: {
35
+ type: PropType<CustomPluginFormType[]>;
36
+ default: () => never[];
37
+ };
30
38
  }>> & Readonly<{
31
39
  onError?: ((error: unknown) => any) | undefined;
32
40
  onLoading?: ((isLoading: boolean) => any) | undefined;
33
- onUpdate?: ((data: FormPayload) => any) | undefined;
41
+ onUpdate?: ((data: InstalledPluginResponse | StreamedPluginResponse | ClonedPluginPayload) => any) | undefined;
34
42
  }>, {
35
- pluginId: string;
43
+ pluginName: string;
44
+ unsupportedTypes: CustomPluginFormType[];
36
45
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
37
46
  declare const _default: typeof __VLS_export;
38
47
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"CustomPluginForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CustomPluginForm.vue"],"names":[],"mappings":"AAosBA,OAAO,gDAAgD,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAuB,sBAAsB,EAAwB,WAAW,EAAiD,MAAM,UAAU,CAAA;AAynC7J,QAAA,MAAM,YAAY;;cAIE,QAAQ,CAAC,sBAAsB,CAAC;;4BAE5B,sBAAsB,KAAG,OAAO;;IAOtD,kIAAkI;;;;;;;;;;;cAThH,QAAQ,CAAC,sBAAsB,CAAC;;4BAE5B,sBAAsB,KAAG,OAAO;;IAOtD,kIAAkI;;;;;;;;;;;4EAMlI,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"CustomPluginForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CustomPluginForm.vue"],"names":[],"mappings":"AAu6BA,OAAO,gDAAgD,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EACV,mBAAmB,EACnB,6BAA6B,EAC7B,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,iCAAiC,EAClC,MAAM,UAAU,CAAA;AAg6CjB,QAAA,MAAM,YAAY;;cAIE,QAAQ,CAAC,6BAA6B,GAAG,iCAAiC,CAAC;;4BAEvE,6BAA6B,GAAG,iCAAiC,KAAG,OAAO;;IASjG,sIAAsI;;;;;;cAMrH,QAAQ,CAAC,oBAAoB,EAAE,CAAC;;;;;;;;;cAjB/B,QAAQ,CAAC,6BAA6B,GAAG,iCAAiC,CAAC;;4BAEvE,6BAA6B,GAAG,iCAAiC,KAAG,OAAO;;IASjG,sIAAsI;;;;;;cAMrH,QAAQ,CAAC,oBAAoB,EAAE,CAAC;;;;;;;;;;4EAIjD,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -231,11 +231,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
231
231
  }>, {
232
232
  schema: Record<string, any>;
233
233
  credential: boolean;
234
- pluginId: string;
235
234
  developer: boolean;
236
235
  enableVaultSecretPicker: boolean;
237
236
  enableRedisPartial: boolean;
238
237
  engine: "vfg" | "freeform";
238
+ pluginId: string;
239
239
  hideScopeSelection: boolean;
240
240
  disableScopeSelection: boolean;
241
241
  isWizardStep: boolean;
@@ -1,3 +1,3 @@
1
- declare const _default: import("../../shared/types.js").PluginFormConfig;
1
+ declare const _default: import("../../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../shared/types").PluginFormConfig;
1
+ declare const _default: import("../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=ai-custom-guardrail.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../../shared/types.js").PluginFormConfig;
1
+ declare const _default: import("../../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../shared/types").PluginFormConfig;
1
+ declare const _default: import("../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=cors.d.ts.map
@@ -30,7 +30,7 @@ export declare function useBranchNodeForm<T extends BaseFormData = BaseFormData>
30
30
  removeFieldByName: (io: "input" | "output", fieldName: import("../../types").FieldName) => void;
31
31
  setInputs: (fieldName: import("../../types").FieldName, fieldValue: import("../../types").IdConnection | null) => Promise<void>;
32
32
  setInput: (value: import("../../types").IdConnection | null) => Promise<void>;
33
- nameValidator: import("./validation").ValidatorFn<string>;
33
+ nameValidator: import("./validation/basic.ts").ValidatorFn<string>;
34
34
  fieldNameValidator: (io: "input" | "output", oldFieldName: import("../../types").FieldName, newFieldName: import("../../types").FieldName) => string | undefined;
35
35
  toggleNodeValid: (isValid: boolean) => void;
36
36
  };
@@ -288,11 +288,11 @@ declare const provideFlowStore: (options: UseFlowOptions) => {
288
288
  } | undefined;
289
289
  getMembers: (ownerId: NodeId, branch: import("../../types").BranchName) => NodeId[];
290
290
  wouldCreateCycle: (ownerId: NodeId, memberId: NodeId) => boolean;
291
- setMembers: (ownerId: NodeId, branch: import("../../types").BranchName, members: readonly NodeId[], options?: import("./branch-groups").CommitOptions) => boolean;
291
+ setMembers: (ownerId: NodeId, branch: import("../../types").BranchName, members: readonly NodeId[], options?: import("./branch-groups.ts").CommitOptions) => boolean;
292
292
  prepareMembers: (ownerId: NodeId, branch: import("../../types").BranchName, candidates: readonly NodeId[]) => NodeId[];
293
- addMember: (ownerId: NodeId, branch: import("../../types").BranchName, memberId: NodeId, options?: import("./branch-groups").CommitOptions) => boolean;
294
- removeMember: (memberId: NodeId, options?: import("./branch-groups").CommitOptions) => boolean;
295
- clear: (ownerId: NodeId, options?: import("./branch-groups").CommitOptions) => boolean;
293
+ addMember: (ownerId: NodeId, branch: import("../../types").BranchName, memberId: NodeId, options?: import("./branch-groups.ts").CommitOptions) => boolean;
294
+ removeMember: (memberId: NodeId, options?: import("./branch-groups.ts").CommitOptions) => boolean;
295
+ clear: (ownerId: NodeId, options?: import("./branch-groups.ts").CommitOptions) => boolean;
296
296
  getNodeDepth: (nodeId: NodeId) => number;
297
297
  getGroupDepth: (groupId: GroupId) => number;
298
298
  isGroupId: (id?: string) => id is GroupId;
@@ -327,7 +327,7 @@ declare const provideFlowStore: (options: UseFlowOptions) => {
327
327
  target?: string | null;
328
328
  targetHandle?: string | null;
329
329
  }) => boolean;
330
- validateGraph: () => import("./validation").ValidationResult;
330
+ validateGraph: () => import("./validation.ts").ValidationResult;
331
331
  clearPendingLayout: () => void;
332
332
  setPendingFitView: (isPending?: boolean) => void;
333
333
  };
@@ -602,11 +602,11 @@ declare const provideFlowStore: (options: UseFlowOptions) => {
602
602
  } | undefined;
603
603
  getMembers: (ownerId: NodeId, branch: import("../../types").BranchName) => NodeId[];
604
604
  wouldCreateCycle: (ownerId: NodeId, memberId: NodeId) => boolean;
605
- setMembers: (ownerId: NodeId, branch: import("../../types").BranchName, members: readonly NodeId[], options?: import("./branch-groups").CommitOptions) => boolean;
605
+ setMembers: (ownerId: NodeId, branch: import("../../types").BranchName, members: readonly NodeId[], options?: import("./branch-groups.ts").CommitOptions) => boolean;
606
606
  prepareMembers: (ownerId: NodeId, branch: import("../../types").BranchName, candidates: readonly NodeId[]) => NodeId[];
607
- addMember: (ownerId: NodeId, branch: import("../../types").BranchName, memberId: NodeId, options?: import("./branch-groups").CommitOptions) => boolean;
608
- removeMember: (memberId: NodeId, options?: import("./branch-groups").CommitOptions) => boolean;
609
- clear: (ownerId: NodeId, options?: import("./branch-groups").CommitOptions) => boolean;
607
+ addMember: (ownerId: NodeId, branch: import("../../types").BranchName, memberId: NodeId, options?: import("./branch-groups.ts").CommitOptions) => boolean;
608
+ removeMember: (memberId: NodeId, options?: import("./branch-groups.ts").CommitOptions) => boolean;
609
+ clear: (ownerId: NodeId, options?: import("./branch-groups.ts").CommitOptions) => boolean;
610
610
  getNodeDepth: (nodeId: NodeId) => number;
611
611
  getGroupDepth: (groupId: GroupId) => number;
612
612
  isGroupId: (id?: string) => id is GroupId;
@@ -641,7 +641,7 @@ declare const provideFlowStore: (options: UseFlowOptions) => {
641
641
  target?: string | null;
642
642
  targetHandle?: string | null;
643
643
  }) => boolean;
644
- validateGraph: () => import("./validation").ValidationResult;
644
+ validateGraph: () => import("./validation.ts").ValidationResult;
645
645
  clearPendingLayout: () => void;
646
646
  setPendingFitView: (isPending?: boolean) => void;
647
647
  };
@@ -918,11 +918,11 @@ export declare function useFlowStore(): {
918
918
  } | undefined;
919
919
  getMembers: (ownerId: NodeId, branch: import("../../types").BranchName) => NodeId[];
920
920
  wouldCreateCycle: (ownerId: NodeId, memberId: NodeId) => boolean;
921
- setMembers: (ownerId: NodeId, branch: import("../../types").BranchName, members: readonly NodeId[], options?: import("./branch-groups").CommitOptions) => boolean;
921
+ setMembers: (ownerId: NodeId, branch: import("../../types").BranchName, members: readonly NodeId[], options?: import("./branch-groups.ts").CommitOptions) => boolean;
922
922
  prepareMembers: (ownerId: NodeId, branch: import("../../types").BranchName, candidates: readonly NodeId[]) => NodeId[];
923
- addMember: (ownerId: NodeId, branch: import("../../types").BranchName, memberId: NodeId, options?: import("./branch-groups").CommitOptions) => boolean;
924
- removeMember: (memberId: NodeId, options?: import("./branch-groups").CommitOptions) => boolean;
925
- clear: (ownerId: NodeId, options?: import("./branch-groups").CommitOptions) => boolean;
923
+ addMember: (ownerId: NodeId, branch: import("../../types").BranchName, memberId: NodeId, options?: import("./branch-groups.ts").CommitOptions) => boolean;
924
+ removeMember: (memberId: NodeId, options?: import("./branch-groups.ts").CommitOptions) => boolean;
925
+ clear: (ownerId: NodeId, options?: import("./branch-groups.ts").CommitOptions) => boolean;
926
926
  getNodeDepth: (nodeId: NodeId) => number;
927
927
  getGroupDepth: (groupId: GroupId) => number;
928
928
  isGroupId: (id?: string) => id is GroupId;
@@ -957,7 +957,7 @@ export declare function useFlowStore(): {
957
957
  target?: string | null;
958
958
  targetHandle?: string | null;
959
959
  }) => boolean;
960
- validateGraph: () => import("./validation").ValidationResult;
960
+ validateGraph: () => import("./validation.ts").ValidationResult;
961
961
  clearPendingLayout: () => void;
962
962
  setPendingFitView: (isPending?: boolean) => void;
963
963
  };
@@ -1,3 +1,3 @@
1
- declare const _default: import("../../shared/types.js").PluginFormConfig;
1
+ declare const _default: import("../../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../shared/types").PluginFormConfig;
1
+ declare const _default: import("../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=exit-transformer.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../shared/types").PluginFormConfig;
1
+ declare const _default: import("../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=file-log.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../shared/types").PluginFormConfig;
1
+ declare const _default: import("../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=http-log.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../../shared/types.js").PluginFormConfig;
1
+ declare const _default: import("../../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../../shared/types.js").PluginFormConfig;
1
+ declare const _default: import("../../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../shared/types.js").PluginFormConfig;
1
+ declare const _default: import("../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=opentelemetry.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../shared/types").PluginFormConfig;
1
+ declare const _default: import("../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=proxy-cache-advanced.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../shared/types").PluginFormConfig;
1
+ declare const _default: import("../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=proxy-cache.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../../shared/types.js").PluginFormConfig;
1
+ declare const _default: import("../../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../shared/types").PluginFormConfig;
1
+ declare const _default: import("../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=response-transformer-advanced.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../shared/types").PluginFormConfig;
1
+ declare const _default: import("../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=response-transformer.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../../shared/types.js").PluginFormConfig;
1
+ declare const _default: import("../../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../shared/types").PluginFormConfig;
1
+ declare const _default: import("../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=solace-consume.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../shared/types").PluginFormConfig;
1
+ declare const _default: import("../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=solace-log.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../shared/types").PluginFormConfig;
1
+ declare const _default: import("../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=solace-upstream.d.ts.map
@@ -1,3 +1,3 @@
1
- declare const _default: import("../shared/types.js").PluginFormConfig;
1
+ declare const _default: import("../shared/types.ts").PluginFormConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=upstream-oauth.d.ts.map
@@ -1,6 +1,7 @@
1
1
  import useI18n from './useI18n';
2
2
  import usePluginHelpers from './usePluginHelpers';
3
3
  import { useExperimentalFreeForms, useProvideExperimentalFreeForms, useFreeFormResolver } from './useExperimentalFreeForms';
4
+ import { useCustomPluginApi } from './useCustomPluginApi';
4
5
  declare const _default: {
5
6
  useI18n: typeof useI18n;
6
7
  usePluginMetaData: () => {
@@ -59,6 +60,7 @@ declare const _default: {
59
60
  useExperimentalFreeForms: typeof useExperimentalFreeForms;
60
61
  useProvideExperimentalFreeForms: typeof useProvideExperimentalFreeForms;
61
62
  useFreeFormResolver: typeof useFreeFormResolver;
63
+ useCustomPluginApi: typeof useCustomPluginApi;
62
64
  };
63
65
  export default _default;
64
66
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAA;AAC/B,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AAGjD,OAAO,EAAE,wBAAwB,EAAE,+BAA+B,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG3H,wBAQC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAA;AAC/B,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AAGjD,OAAO,EAAE,wBAAwB,EAAE,+BAA+B,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAC3H,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGzD,wBASC"}
@@ -0,0 +1,34 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import type { InstalledPluginRequestBody, InstalledPluginResponse, StreamedPluginRequestBody, StreamedPluginResponse } from '../types';
3
+ /** Symbol key used to indicate which type a plugin was resolved as */
4
+ export declare const CUSTOM_PLUGIN_TYPE_KEY: unique symbol;
5
+ export type CustomPluginWithType = (InstalledPluginResponse & {
6
+ [CUSTOM_PLUGIN_TYPE_KEY]: 'installed';
7
+ }) | (StreamedPluginResponse & {
8
+ [CUSTOM_PLUGIN_TYPE_KEY]: 'streamed';
9
+ });
10
+ interface UseKonnectCustomPluginApiOptions {
11
+ app: 'konnect';
12
+ controlPlaneId: string;
13
+ workspace?: string;
14
+ }
15
+ interface UseKongManagerCustomPluginApiOptions {
16
+ app: 'kongManager';
17
+ workspace: string;
18
+ }
19
+ type UseCustomPluginApiOptions = (UseKonnectCustomPluginApiOptions | UseKongManagerCustomPluginApiOptions) & {
20
+ axiosInstance: AxiosInstance;
21
+ apiBaseUrl: string;
22
+ };
23
+ export declare function useCustomPluginApi(options: UseCustomPluginApiOptions): {
24
+ getInstalledPlugin: (pluginId: string) => Promise<InstalledPluginResponse>;
25
+ createInstalledPlugin: (body: InstalledPluginRequestBody) => Promise<InstalledPluginResponse>;
26
+ updateInstalledPlugin: (pluginId: string, body: InstalledPluginRequestBody) => Promise<InstalledPluginResponse>;
27
+ getStreamedPlugin: (pluginId: string) => Promise<StreamedPluginResponse>;
28
+ createStreamedPlugin: (body: StreamedPluginRequestBody) => Promise<StreamedPluginResponse>;
29
+ updateStreamedPlugin: (pluginId: string, body: StreamedPluginRequestBody) => Promise<StreamedPluginResponse>;
30
+ getPluginByUnknownType: (pluginId: string) => Promise<CustomPluginWithType | null>;
31
+ getPluginType: (plugin: CustomPluginWithType) => "installed" | "streamed";
32
+ };
33
+ export {};
34
+ //# sourceMappingURL=useCustomPluginApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCustomPluginApi.d.ts","sourceRoot":"","sources":["../../../src/composables/useCustomPluginApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG1C,OAAO,KAAK,EACV,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,EACzB,sBAAsB,EACvB,MAAM,UAAU,CAAA;AAEjB,sEAAsE;AACtE,eAAO,MAAM,sBAAsB,eAA6B,CAAA;AAEhE,MAAM,MAAM,oBAAoB,GAC5B,CAAC,uBAAuB,GAAG;IAAE,CAAC,sBAAsB,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC,GACrE,CAAC,sBAAsB,GAAG;IAAE,CAAC,sBAAsB,CAAC,EAAE,UAAU,CAAA;CAAE,CAAC,CAAA;AAEvE,UAAU,gCAAgC;IACxC,GAAG,EAAE,SAAS,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,oCAAoC;IAC5C,GAAG,EAAE,aAAa,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,KAAK,yBAAyB,GAAG,CAC/B,gCAAgC,GAC9B,oCAAoC,CACvC,GAAG;IACF,aAAa,EAAE,aAAa,CAAA;IAC5B,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB;mCAqBvB,MAAM,KAAG,OAAO,CAAC,uBAAuB,CAAC;kCAM1C,0BAA0B,KAAG,OAAO,CAAC,uBAAuB,CAAC;sCAMzD,MAAM,QAAQ,0BAA0B,KAAG,OAAO,CAAC,uBAAuB,CAAC;kCAQ/E,MAAM,KAAG,OAAO,CAAC,sBAAsB,CAAC;iCAMzC,yBAAyB,KAAG,OAAO,CAAC,sBAAsB,CAAC;qCAMvD,MAAM,QAAQ,yBAAyB,KAAG,OAAO,CAAC,sBAAsB,CAAC;uCAavE,MAAM,KAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;4BA8B9D,oBAAoB,KAAG,WAAW,GAAG,UAAU;EAc/E"}
@@ -12,7 +12,7 @@ declare const usePluginMetaData: () => {
12
12
  credentialMetaData: Record<string, any>;
13
13
  credentialSchemas: Record<string, any>;
14
14
  getDisplayName: (name: string) => string;
15
- }, useProvideExperimentalFreeForms: typeof import("./composables/useExperimentalFreeForms.js").useProvideExperimentalFreeForms;
15
+ }, useProvideExperimentalFreeForms: typeof import("./composables/useExperimentalFreeForms.ts").useProvideExperimentalFreeForms;
16
16
  export { CustomPluginForm, PluginForm, PluginList, PluginSelect, PluginCatalog, PluginSelectGrid, PluginSelectCard, PluginConfigCard, usePluginMetaData, useProvideExperimentalFreeForms, };
17
17
  export * from './types';
18
18
  export { pluginEndpoints };
@@ -60,6 +60,24 @@ declare const _default: {
60
60
  entityGetAll: string;
61
61
  };
62
62
  };
63
+ customPlugin: {
64
+ konnect: {
65
+ installed: {
66
+ create: string;
67
+ edit: string;
68
+ };
69
+ streamed: {
70
+ create: string;
71
+ edit: string;
72
+ };
73
+ };
74
+ kongManager: {
75
+ streamed: {
76
+ create: string;
77
+ edit: string;
78
+ };
79
+ };
80
+ };
63
81
  item: {
64
82
  konnect: {
65
83
  all: string;
@@ -1 +1 @@
1
- {"version":3,"file":"plugins-endpoints.d.ts","sourceRoot":"","sources":["../../src/plugins-endpoints.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBA0EC"}
1
+ {"version":3,"file":"plugins-endpoints.d.ts","sourceRoot":"","sources":["../../src/plugins-endpoints.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBA8FC"}
@@ -1,35 +1,40 @@
1
- import type { KonnectBaseFormConfig } from '@kong-ui-public/entities-shared';
1
+ import type { KonnectBaseFormConfig, KongManagerBaseFormConfig } from '@kong-ui-public/entities-shared';
2
2
  import type { RouteLocationRaw } from 'vue-router';
3
3
  export type CustomPluginFormType = 'installed' | 'streamed' | 'cloned';
4
- export interface CustomPluginFormConfig extends KonnectBaseFormConfig {
4
+ export interface CustomPluginFormConfig {
5
5
  /** Route to navigate on cancel */
6
6
  cancelRoute: RouteLocationRaw;
7
+ /** Route to navigate on successful create/update */
8
+ successRoute: RouteLocationRaw;
7
9
  /** Available plugins for cloning (only needed for Cloned type) */
8
10
  clonablePlugins?: string[];
9
11
  }
10
- export interface CustomPluginFormFields {
11
- pluginType: CustomPluginFormType;
12
- schemaFile: File | null;
13
- handlerFile: File | null;
14
- name: string;
15
- sourcePlugin: string;
16
- aliasName: string;
17
- priority: string;
12
+ export type KonnectCustomPluginFormConfig = KonnectBaseFormConfig & CustomPluginFormConfig;
13
+ export type KongManagerCustomPluginFormConfig = KongManagerBaseFormConfig & CustomPluginFormConfig;
14
+ export interface InstalledPluginRequestBody {
15
+ lua_schema: string;
18
16
  }
19
- export interface CustomPluginFormState {
20
- fields: CustomPluginFormFields;
21
- readonly: boolean;
22
- errorMessage: string;
17
+ export interface StreamedPluginRequestBody {
18
+ name: string;
19
+ schema: string;
20
+ handler: string;
23
21
  }
24
- export interface InstalledPluginPayload {
25
- pluginType: 'installed';
26
- schemaFile: File;
22
+ export interface InstalledPluginResponse {
23
+ item: {
24
+ lua_schema: string;
25
+ name: string;
26
+ created_at: number;
27
+ updated_at: number;
28
+ };
27
29
  }
28
- export interface StreamedPluginPayload {
29
- pluginType: 'streamed';
30
- schemaFile: File;
31
- handlerFile: File;
30
+ export interface StreamedPluginResponse {
31
+ id: string;
32
32
  name: string;
33
+ schema: string;
34
+ handler: string;
35
+ created_at?: number;
36
+ updated_at?: number;
37
+ tags?: string[];
33
38
  }
34
39
  export interface ClonedPluginPayload {
35
40
  pluginType: 'cloned';
@@ -37,5 +42,4 @@ export interface ClonedPluginPayload {
37
42
  aliasName: string;
38
43
  priority?: string;
39
44
  }
40
- export type FormPayload = InstalledPluginPayload | StreamedPluginPayload | ClonedPluginPayload;
41
45
  //# sourceMappingURL=custom-plugin-form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"custom-plugin-form.d.ts","sourceRoot":"","sources":["../../../src/types/custom-plugin-form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,CAAA;AAEtE,MAAM,WAAW,sBAAuB,SAAQ,qBAAqB;IACnE,kCAAkC;IAClC,WAAW,EAAE,gBAAgB,CAAA;IAC7B,kEAAkE;IAClE,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,oBAAoB,CAAA;IAEhC,UAAU,EAAE,IAAI,GAAG,IAAI,CAAA;IAEvB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAA;IACxB,IAAI,EAAE,MAAM,CAAA;IAEZ,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,sBAAsB,CAAA;IAC9B,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,WAAW,CAAA;IACvB,UAAU,EAAE,IAAI,CAAA;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,IAAI,CAAA;IAChB,WAAW,EAAE,IAAI,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,QAAQ,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,WAAW,GAAG,sBAAsB,GAAG,qBAAqB,GAAG,mBAAmB,CAAA"}
1
+ {"version":3,"file":"custom-plugin-form.d.ts","sourceRoot":"","sources":["../../../src/types/custom-plugin-form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AACvG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,CAAA;AAEtE,MAAM,WAAW,sBAAsB;IACrC,kCAAkC;IAClC,WAAW,EAAE,gBAAgB,CAAA;IAC7B,oDAAoD;IACpD,YAAY,EAAE,gBAAgB,CAAA;IAC9B,kEAAkE;IAClE,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;CAC3B;AACD,MAAM,MAAM,6BAA6B,GAAG,qBAAqB,GAAG,sBAAsB,CAAA;AAE1F,MAAM,MAAM,iCAAiC,GAAG,yBAAyB,GAAG,sBAAsB,CAAA;AAIlG,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CAChB;AAID,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE;QACJ,UAAU,EAAE,MAAM,CAAA;QAClB,IAAI,EAAE,MAAM,CAAA;QACZ,UAAU,EAAE,MAAM,CAAA;QAClB,UAAU,EAAE,MAAM,CAAA;KACnB,CAAA;CACF;AAED,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;CAChB;AAID,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,QAAQ,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-plugins",
3
- "version": "9.194.3",
3
+ "version": "9.195.0",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-plugins.umd.js",
6
6
  "module": "./dist/entities-plugins.es.js",
@@ -51,7 +51,7 @@
51
51
  "vue-router": "^4.6.4",
52
52
  "zod": ">= 4.1.3 < 5",
53
53
  "@kong-ui-public/i18n": "^2.4.6",
54
- "@kong-ui-public/entities-shared": "^3.42.1",
54
+ "@kong-ui-public/entities-shared": "^3.42.2",
55
55
  "@kong-ui-public/monaco-editor": "^0.22.2"
56
56
  },
57
57
  "peerDependenciesMeta": {
@@ -79,16 +79,16 @@
79
79
  "@vue-flow/core": "^1.48.2",
80
80
  "@vueuse/core": "^13.9.0",
81
81
  "@vueuse/integrations": "^13.9.0",
82
- "axios": "^1.13.6",
82
+ "axios": "^1.15.0",
83
83
  "monaco-editor": "^0.55.1",
84
- "nanoid": "^5.1.7",
84
+ "nanoid": "^5.1.9",
85
85
  "reflect-metadata": "^0.2.2",
86
86
  "vue": "^3.5.32",
87
87
  "vue-router": "^4.6.4",
88
88
  "zod": "^4.3.6",
89
- "@kong-ui-public/entities-vaults": "^4.4.17",
89
+ "@kong-ui-public/entities-shared": "^3.42.2",
90
+ "@kong-ui-public/entities-vaults": "^4.4.18",
90
91
  "@kong-ui-public/i18n": "^2.4.6",
91
- "@kong-ui-public/entities-shared": "^3.42.1",
92
92
  "@kong-ui-public/monaco-editor": "^0.22.2"
93
93
  },
94
94
  "repository": {
@@ -108,15 +108,15 @@
108
108
  "dependencies": {
109
109
  "lodash-es": "^4.18.1",
110
110
  "marked": "^14.1.4",
111
- "@kong-ui-public/entities-consumers": "^4.3.15",
112
- "@kong-ui-public/entities-gateway-services": "^3.19.1",
111
+ "@kong-ui-public/entities-consumer-groups": "^4.3.16",
112
+ "@kong-ui-public/entities-gateway-services": "^3.19.2",
113
+ "@kong-ui-public/entities-consumers": "^4.3.16",
113
114
  "@kong-ui-public/entities-plugins-icon": "^1.6.4",
114
- "@kong-ui-public/entities-consumer-groups": "^4.3.15",
115
115
  "@kong-ui-public/entities-plugins-metadata": "^1.13.3",
116
- "@kong-ui-public/entities-redis-configurations": "^1.14.20",
117
- "@kong-ui-public/entities-routes": "^3.21.20",
118
- "@kong-ui-public/forms": "^4.23.19",
119
- "@kong-ui-public/entities-vaults": "^4.4.17"
116
+ "@kong-ui-public/entities-routes": "^3.21.21",
117
+ "@kong-ui-public/entities-vaults": "^4.4.18",
118
+ "@kong-ui-public/forms": "^4.23.20",
119
+ "@kong-ui-public/entities-redis-configurations": "^1.14.21"
120
120
  },
121
121
  "scripts": {
122
122
  "dev": "cross-env USE_SANDBOX=true vite",
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugins-endpoints.d.ts","sourceRoot":"","sources":["../../src/plugins-endpoints.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBA0EC"}