windmill-components 1.13.0 → 1.13.3

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 (152) hide show
  1. package/common.js +23 -0
  2. package/components/ArgInfo.svelte +3 -3
  3. package/{lib/components → components}/ArgInfo.svelte.d.ts +0 -0
  4. package/{lib/components → components}/ArgInput.svelte.d.ts +2 -2
  5. package/{lib/components → components}/AutosizedTextarea.svelte.d.ts +0 -0
  6. package/{lib/components → components}/Badge.svelte.d.ts +0 -0
  7. package/{lib/components → components}/Button.svelte.d.ts +0 -0
  8. package/{lib/components → components}/ButtonAndDropdown.svelte.d.ts +1 -1
  9. package/{lib/components → components}/CenteredPage.svelte.d.ts +0 -0
  10. package/{lib/components → components}/ChevronButton.svelte.d.ts +0 -0
  11. package/{lib/components → components}/DisplayResult.svelte.d.ts +0 -0
  12. package/components/Dropdown.svelte +1 -1
  13. package/{lib/components → components}/Dropdown.svelte.d.ts +1 -1
  14. package/components/Editor.svelte +3 -0
  15. package/{lib/components → components}/Editor.svelte.d.ts +2 -0
  16. package/{lib/components → components}/FieldHeader.svelte.d.ts +2 -1
  17. package/components/FlowBuilder.svelte +3 -3
  18. package/{lib/components → components}/FlowBuilder.svelte.d.ts +1 -1
  19. package/components/FlowEditor.svelte +3 -3
  20. package/{lib/components → components}/FlowEditor.svelte.d.ts +1 -1
  21. package/components/FlowPreview.svelte +3 -3
  22. package/{lib/components → components}/FlowPreview.svelte.d.ts +2 -2
  23. package/components/FlowStatusViewer.svelte +3 -3
  24. package/{lib/components → components}/FlowStatusViewer.svelte.d.ts +1 -1
  25. package/components/GroupModal.svelte +3 -3
  26. package/{lib/components → components}/GroupModal.svelte.d.ts +0 -0
  27. package/{lib/components → components}/IconedResourceType.svelte.d.ts +0 -0
  28. package/components/InviteGlobalUser.svelte +2 -2
  29. package/{lib/components → components}/InviteGlobalUser.svelte.d.ts +0 -0
  30. package/components/InviteUser.svelte +3 -3
  31. package/{lib/components → components}/InviteUser.svelte.d.ts +0 -0
  32. package/{lib/components → components}/ItemPicker.svelte.d.ts +0 -0
  33. package/components/JobStatus.svelte +1 -1
  34. package/{lib/components → components}/JobStatus.svelte.d.ts +1 -1
  35. package/{lib/components → components}/Modal.svelte.d.ts +0 -0
  36. package/components/ModuleStep.svelte +1 -1
  37. package/{lib/components → components}/ModuleStep.svelte.d.ts +2 -2
  38. package/{lib/components → components}/Multiselect.svelte.d.ts +0 -0
  39. package/components/ObjectResourceInput.svelte +2 -2
  40. package/{lib/components → components}/ObjectResourceInput.svelte.d.ts +0 -0
  41. package/{lib/components → components}/ObjectTypeNarrowing.svelte.d.ts +0 -0
  42. package/{lib/components → components}/PageHeader.svelte.d.ts +0 -0
  43. package/{lib/components → components}/Password.svelte.d.ts +0 -0
  44. package/components/Path.svelte +4 -4
  45. package/{lib/components → components}/Path.svelte.d.ts +1 -1
  46. package/{lib/components → components}/RadioButton.svelte.d.ts +0 -0
  47. package/{lib/components → components}/Required.svelte.d.ts +0 -0
  48. package/components/ResourceEditor.svelte +3 -3
  49. package/{lib/components → components}/ResourceEditor.svelte.d.ts +0 -0
  50. package/components/ResourcePicker.svelte +2 -2
  51. package/{lib/components → components}/ResourcePicker.svelte.d.ts +0 -0
  52. package/components/ResourceTypePicker.svelte +2 -2
  53. package/{lib/components → components}/ResourceTypePicker.svelte.d.ts +0 -0
  54. package/components/RunForm.svelte +1 -1
  55. package/{lib/components → components}/RunForm.svelte.d.ts +1 -1
  56. package/components/SchemaEditor.svelte +76 -71
  57. package/{lib/components → components}/SchemaEditor.svelte.d.ts +1 -4
  58. package/components/SchemaForm.svelte +1 -1
  59. package/{lib/components → components}/SchemaForm.svelte.d.ts +1 -1
  60. package/{lib/components → components}/SchemaModal.svelte.d.ts +1 -1
  61. package/components/SchemaViewer.svelte +1 -1
  62. package/{lib/components → components}/SchemaViewer.svelte.d.ts +1 -1
  63. package/components/ScriptBuilder.svelte +4 -4
  64. package/{lib/components → components}/ScriptBuilder.svelte.d.ts +1 -1
  65. package/components/ScriptEditor.svelte +4 -4
  66. package/{lib/components → components}/ScriptEditor.svelte.d.ts +2 -2
  67. package/components/ScriptPicker.svelte +3 -3
  68. package/{lib/components → components}/ScriptPicker.svelte.d.ts +0 -0
  69. package/{lib/components → components}/ScriptSchema.svelte.d.ts +1 -1
  70. package/components/ShareModal.svelte +4 -4
  71. package/{lib/components → components}/ShareModal.svelte.d.ts +0 -0
  72. package/components/SharedBadge.svelte +1 -1
  73. package/{lib/components → components}/SharedBadge.svelte.d.ts +0 -0
  74. package/{lib/components → components}/StringTypeNarrowing.svelte.d.ts +0 -0
  75. package/{lib/components → components}/Switch.svelte.d.ts +0 -0
  76. package/{lib/components → components}/TableCustom.svelte.d.ts +0 -0
  77. package/{lib/components → components}/TableSimple.svelte.d.ts +0 -0
  78. package/{lib/components → components}/Tabs.svelte.d.ts +0 -0
  79. package/{lib/components → components}/Tooltip.svelte.d.ts +0 -0
  80. package/components/VariableEditor.svelte +3 -3
  81. package/{lib/components → components}/VariableEditor.svelte.d.ts +0 -0
  82. package/{lib/components → components}/icons/DbIcon.svelte.d.ts +0 -0
  83. package/{lib/components → components}/icons/Mail.svelte.d.ts +0 -0
  84. package/{lib/components → components}/icons/Mysql.svelte.d.ts +0 -0
  85. package/{lib/components → components}/icons/PostgresIcon.svelte.d.ts +0 -0
  86. package/{lib/components → components}/icons/Slack.svelte.d.ts +0 -0
  87. package/gen/core/ApiError.js +10 -0
  88. package/gen/core/ApiRequestOptions.js +1 -0
  89. package/gen/core/ApiResult.js +1 -0
  90. package/gen/core/CancelablePromise.js +86 -0
  91. package/gen/core/OpenAPI.js +11 -0
  92. package/gen/core/request.js +261 -0
  93. package/gen/index.js +30 -0
  94. package/gen/models/AuditLog.js +29 -0
  95. package/gen/models/CompletedJob.js +19 -0
  96. package/gen/models/ContextualVariable.js +4 -0
  97. package/gen/models/CreateResource.js +4 -0
  98. package/gen/models/CreateVariable.js +4 -0
  99. package/gen/models/CreateWorkspace.js +4 -0
  100. package/gen/models/EditResource.js +4 -0
  101. package/gen/models/EditResourceType.js +4 -0
  102. package/gen/models/EditSchedule.js +4 -0
  103. package/gen/models/EditVariable.js +4 -0
  104. package/gen/models/EditWorkspaceUser.js +4 -0
  105. package/gen/models/Flow.js +4 -0
  106. package/gen/models/FlowModule.js +4 -0
  107. package/gen/models/FlowModuleValue.js +11 -0
  108. package/gen/models/FlowPreview.js +4 -0
  109. package/gen/models/FlowStatus.js +4 -0
  110. package/gen/models/FlowStatusModule.js +15 -0
  111. package/gen/models/FlowValue.js +4 -0
  112. package/gen/models/GlobalUserInfo.js +11 -0
  113. package/gen/models/Group.js +4 -0
  114. package/gen/models/InputTransform.js +11 -0
  115. package/gen/models/Job.js +11 -0
  116. package/gen/models/ListableVariable.js +4 -0
  117. package/gen/models/Login.js +4 -0
  118. package/gen/models/MainArgSignature.js +4 -0
  119. package/gen/models/NewSchedule.js +4 -0
  120. package/gen/models/NewToken.js +4 -0
  121. package/gen/models/NewUser.js +4 -0
  122. package/gen/models/Preview.js +11 -0
  123. package/gen/models/QueuedJob.js +19 -0
  124. package/gen/models/Resource.js +4 -0
  125. package/gen/models/ResourceType.js +4 -0
  126. package/gen/models/Schedule.js +4 -0
  127. package/gen/models/Script.js +11 -0
  128. package/gen/models/ScriptArgs.js +4 -0
  129. package/gen/models/TruncatedToken.js +4 -0
  130. package/gen/models/User.js +4 -0
  131. package/gen/models/UserWorkspaceList.js +4 -0
  132. package/gen/models/WorkerPing.js +4 -0
  133. package/gen/models/Workspace.js +4 -0
  134. package/gen/models/WorkspaceInvite.js +4 -0
  135. package/gen/services/AdminService.js +52 -0
  136. package/gen/services/AuditService.js +43 -0
  137. package/gen/services/FlowService.js +90 -0
  138. package/gen/services/GranularAclService.js +56 -0
  139. package/gen/services/GroupService.js +133 -0
  140. package/gen/services/JobService.js +260 -0
  141. package/gen/services/ResourceService.js +177 -0
  142. package/gen/services/ScheduleService.js +100 -0
  143. package/gen/services/ScriptService.js +188 -0
  144. package/gen/services/SettingsService.js +26 -0
  145. package/gen/services/UserService.js +302 -0
  146. package/gen/services/VariableService.js +98 -0
  147. package/gen/services/WorkerService.js +19 -0
  148. package/gen/services/WorkspaceService.js +185 -0
  149. package/infer.js +81 -0
  150. package/package.json +69 -3
  151. package/stores.js +26 -0
  152. package/utils.js +258 -0
@@ -1,6 +1,6 @@
1
1
  <script>import SchemaModal, { DEFAULT_PROPERTY, modalToSchema, schemaToModal } from './SchemaModal.svelte';
2
2
  import Editor from './Editor.svelte';
3
- import { emptySchema, sendUserToast } from '../../utils';
3
+ import { emptySchema, sendUserToast } from '../utils';
4
4
  import Tooltip from './Tooltip.svelte';
5
5
  import TableCustom from './TableCustom.svelte';
6
6
  export let schema = emptySchema();
@@ -12,16 +12,11 @@ let argError = '';
12
12
  let editing = false;
13
13
  let oldArgName; // when editing argument and changing name
14
14
  let viewJsonSchema = false;
15
- let editor;
16
- $: schemaString = JSON.stringify(schema, null, '\t');
17
- export function getEditor() {
18
- return editor;
19
- }
20
15
  // Binding is not enough because monaco Editor does not support two-way binding
21
16
  export function getSchema() {
22
17
  if (viewJsonSchema) {
23
18
  try {
24
- schema = JSON.parse(editor.getCode());
19
+ schema = JSON.parse(schemaString);
25
20
  return schema;
26
21
  }
27
22
  catch (err) {
@@ -30,7 +25,7 @@ export function getSchema() {
30
25
  }
31
26
  else {
32
27
  try {
33
- editor.setCode(JSON.stringify(schema, null, '\t'));
28
+ schemaString = JSON.stringify(schema, null, '\t');
34
29
  return schema;
35
30
  }
36
31
  catch (err) {
@@ -66,6 +61,8 @@ function handleAddOrEditArgument() {
66
61
  oldArgName = undefined;
67
62
  schemaModal.closeModal();
68
63
  }
64
+ schema = schema;
65
+ schemaString = JSON.stringify(schema, null, '\t');
69
66
  }
70
67
  function startEditArgument(argName) {
71
68
  argError = '';
@@ -83,7 +80,8 @@ function handleDeleteArgument(argName) {
83
80
  try {
84
81
  if (Object.keys(schema.properties).includes(argName)) {
85
82
  delete schema.properties[argName];
86
- schema = schema; //needed for reactivity, see https://svelte.dev/tutorial/updating-arrays-and-objects
83
+ schema = schema;
84
+ schemaString = JSON.stringify(schema, null, '\t');
87
85
  }
88
86
  else {
89
87
  throw Error('Argument not found!');
@@ -96,21 +94,14 @@ function handleDeleteArgument(argName) {
96
94
  }
97
95
  function switchTab() {
98
96
  if (viewJsonSchema) {
99
- let schemaString = editor.getCode();
100
97
  if (schemaString === '') {
101
98
  schemaString = JSON.stringify(emptySchema(), null, 4);
102
99
  }
103
- try {
104
- schema = JSON.parse(schemaString);
105
- viewJsonSchema = false;
106
- }
107
- catch (err) {
108
- sendUserToast(err, true);
109
- }
100
+ viewJsonSchema = false;
110
101
  }
111
102
  else {
112
103
  try {
113
- editor.setCode(JSON.stringify(schema, null, '\t'));
104
+ schemaString = JSON.stringify(schema, null, '\t');
114
105
  viewJsonSchema = true;
115
106
  }
116
107
  catch (err) {
@@ -153,61 +144,75 @@ function switchTab() {
153
144
  </div>
154
145
  <!--json schema or table view-->
155
146
  <div class="border-t py-1 h-full overflow-y-auto">
156
- <div class="h-full {viewJsonSchema ? 'hidden' : ''}">
157
- {#if schema.properties && Object.keys(schema.properties).length > 0 && schema.required}
158
- <TableCustom class="w-full min-h-full">
159
- <tr slot="header-row" class="underline">
160
- <th>name</th>
161
- <th>type</th>
162
- <th>description</th>
163
- <th>default</th>
164
- <th>required</th>
165
- </tr>
166
- <tbody slot="body">
167
- {#each Object.entries(schema.properties) as [name, property] (name)}
168
- <tr>
169
- <td>{name}</td>
170
- <td
171
- >{#if !property.type} any {:else} {property.type} {/if}</td
172
- >
173
- <td>{property.description}</td>
174
- <td>{JSON.stringify(property.default) ?? ''}</td>
175
- <td>{schema.required.includes(name) ? 'required' : 'optional'}</td>
176
- <td class="">
177
- <button class="mr-2" on:click={() => handleDeleteArgument(name)}
178
- ><svg
179
- class="w-4 h-4"
180
- fill="none"
181
- stroke="currentColor"
182
- viewBox="0 0 24 14"
183
- xmlns="http://www.w3.org/2000/svg"
147
+ {#if !viewJsonSchema}
148
+ <div class="h-full">
149
+ {#if schema.properties && Object.keys(schema.properties).length > 0 && schema.required}
150
+ <TableCustom class="w-full min-h-full">
151
+ <tr slot="header-row" class="underline">
152
+ <th>name</th>
153
+ <th>type</th>
154
+ <th>description</th>
155
+ <th>default</th>
156
+ <th>required</th>
157
+ </tr>
158
+ <tbody slot="body">
159
+ {#each Object.entries(schema.properties) as [name, property] (name)}
160
+ <tr>
161
+ <td>{name}</td>
162
+ <td
163
+ >{#if !property.type} any {:else} {property.type} {/if}</td
164
+ >
165
+ <td>{property.description}</td>
166
+ <td>{JSON.stringify(property.default) ?? ''}</td>
167
+ <td>{schema.required.includes(name) ? 'required' : 'optional'}</td>
168
+ <td class="">
169
+ <button class="mr-2" on:click={() => handleDeleteArgument(name)}
170
+ ><svg
171
+ class="w-4 h-4"
172
+ fill="none"
173
+ stroke="currentColor"
174
+ viewBox="0 0 24 14"
175
+ xmlns="http://www.w3.org/2000/svg"
176
+ >
177
+ <path
178
+ stroke-linecap="round"
179
+ stroke-linejoin="round"
180
+ stroke-width="2"
181
+ d="M6 18L18 6M6 6l12 12"
182
+ />
183
+ </svg></button
184
184
  >
185
- <path
186
- stroke-linecap="round"
187
- stroke-linejoin="round"
188
- stroke-width="2"
189
- d="M6 18L18 6M6 6l12 12"
190
- />
191
- </svg></button
185
+ <button
186
+ class="default-button-secondary text-xs inline-flex"
187
+ on:click={() => {
188
+ startEditArgument(name)
189
+ }}>edit</button
190
+ ></td
192
191
  >
193
- <button
194
- class="default-button-secondary text-xs inline-flex"
195
- on:click={() => {
196
- startEditArgument(name)
197
- }}>edit</button
198
- ></td
199
- >
200
- </tr>
201
- {/each}
202
- </tbody>
203
- </TableCustom>
204
- {:else}
205
- <div class="text-gray-700 text-xs italic">This script has no argument</div>
206
- {/if}
207
- </div>
208
- <div class={viewJsonSchema ? '' : 'hidden'}>
209
- <Editor code={schemaString} bind:this={editor} lang={'json'} class="small-editor" />
210
- </div>
192
+ </tr>
193
+ {/each}
194
+ </tbody>
195
+ </TableCustom>
196
+ {:else}
197
+ <div class="text-gray-700 text-xs italic">This script has no argument</div>
198
+ {/if}
199
+ </div>
200
+ {:else}
201
+ <div>
202
+ <Editor
203
+ on:change={() => {
204
+ try {
205
+ schema = JSON.parse(schemaString)
206
+ } catch (err) {
207
+ sendUserToast(err.message, true)
208
+ }
209
+ }}
210
+ bind:code={schemaString}
211
+ lang={'json'}
212
+ class="small-editor"
213
+ />
214
+ </div>
215
+ {/if}
211
216
  </div>
212
217
  </div>
213
218
 
@@ -1,10 +1,8 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { Schema } from '../../common';
3
- import Editor from './Editor.svelte';
2
+ import type { Schema } from '../common';
4
3
  declare const __propDef: {
5
4
  props: {
6
5
  schema?: Schema | undefined;
7
- getEditor?: (() => Editor) | undefined;
8
6
  getSchema?: (() => Schema) | undefined;
9
7
  };
10
8
  events: {
@@ -16,7 +14,6 @@ export declare type SchemaEditorProps = typeof __propDef.props;
16
14
  export declare type SchemaEditorEvents = typeof __propDef.events;
17
15
  export declare type SchemaEditorSlots = typeof __propDef.slots;
18
16
  export default class SchemaEditor extends SvelteComponentTyped<SchemaEditorProps, SchemaEditorEvents, SchemaEditorSlots> {
19
- get getEditor(): () => Editor;
20
17
  get getSchema(): () => Schema;
21
18
  }
22
19
  export {};
@@ -1,4 +1,4 @@
1
- <script>import { allTrue } from '../../utils';
1
+ <script>import { allTrue } from '../utils';
2
2
  import { slide } from 'svelte/transition';
3
3
  import ArgInput from './ArgInput.svelte';
4
4
  import RadioButton from './RadioButton.svelte';
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { Schema } from '../../common';
2
+ import type { Schema } from '../common';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  inputTransform?: boolean | undefined;
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { SchemaProperty } from '../../common';
2
+ import type { SchemaProperty } from '../common';
3
3
  export declare const ARG_TYPES: readonly ["integer", "number", "string", "boolean", "object", "array"];
4
4
  export declare type ArgType = typeof ARG_TYPES[number];
5
5
  export interface ModalSchemaProperty {
@@ -1,4 +1,4 @@
1
- <script>import { emptySchema } from '../../utils';
1
+ <script>import { emptySchema } from '../utils';
2
2
  import Highlight from 'svelte-highlight';
3
3
  import json from 'svelte-highlight/languages/json';
4
4
  import github from 'svelte-highlight/styles/github';
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { Schema } from '../../common';
2
+ import type { Schema } from '../common';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  schema?: Schema | undefined;
@@ -46,17 +46,17 @@ export async function main(x: string, y: string = 'default arg') {
46
46
  `
47
47
  </script>
48
48
 
49
- <script>import { ScriptService } from '../../gen';
50
- import { emptySchema, sendUserToast } from '../../utils';
49
+ <script>import { ScriptService } from '../gen';
50
+ import { emptySchema, sendUserToast } from '../utils';
51
51
  import { onDestroy } from 'svelte';
52
52
  import ScriptEditor from './ScriptEditor.svelte';
53
53
  import { page } from '$app/stores';
54
54
  import { goto } from '$app/navigation';
55
55
  import Path from './Path.svelte';
56
56
  import SvelteMarkdown from 'svelte-markdown';
57
- import { workspaceStore } from '../../stores';
57
+ import { workspaceStore } from '../stores';
58
58
  import ScriptSchema from './ScriptSchema.svelte';
59
- import { inferArgs } from '../../infer';
59
+ import { inferArgs } from '../infer';
60
60
  import Required from './Required.svelte';
61
61
  import RadioButton from './RadioButton.svelte';
62
62
  let editor;
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import { type Script } from '../../gen';
2
+ import { type Script } from '../gen';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  script: Script;
@@ -1,12 +1,12 @@
1
- <script>import { JobService, Job, CompletedJob, VariableService, ResourceService, ScriptService } from '../../gen';
2
- import { sendUserToast, emptySchema, displayDate } from '../../utils';
1
+ <script>import { JobService, Job, CompletedJob, VariableService, ResourceService, ScriptService } from '../gen';
2
+ import { sendUserToast, emptySchema, displayDate } from '../utils';
3
3
  import { fade } from 'svelte/transition';
4
4
  import Icon from 'svelte-awesome';
5
5
  import { faCheck, faChevronDown, faChevronUp, faExclamationTriangle, faMagic, faSearch, faSpinner, faTimes } from '@fortawesome/free-solid-svg-icons';
6
6
  import Editor from './Editor.svelte';
7
7
  import Tooltip from './Tooltip.svelte';
8
8
  import { onDestroy, onMount } from 'svelte';
9
- import { userStore, workspaceStore } from '../../stores';
9
+ import { userStore, workspaceStore } from '../stores';
10
10
  import TableCustom from './TableCustom.svelte';
11
11
  import { check } from 'svelte-awesome/icons';
12
12
  import Modal from './Modal.svelte';
@@ -16,7 +16,7 @@ import github from 'svelte-highlight/styles/github';
16
16
  import ItemPicker from './ItemPicker.svelte';
17
17
  import VariableEditor from './VariableEditor.svelte';
18
18
  import ResourceEditor from './ResourceEditor.svelte';
19
- import { inferArgs } from '../../infer';
19
+ import { inferArgs } from '../infer';
20
20
  // @ts-ignore
21
21
  import { VSplitPane } from 'svelte-split-pane';
22
22
  import SchemaForm from './SchemaForm.svelte';
@@ -1,7 +1,7 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { Schema } from '../../common';
2
+ import type { Schema } from '../common';
3
3
  import Editor from './Editor.svelte';
4
- import type { Preview } from '../../gen/models/Preview';
4
+ import type { Preview } from '../gen/models/Preview';
5
5
  declare const __propDef: {
6
6
  props: {
7
7
  schema?: Schema | undefined;
@@ -1,8 +1,8 @@
1
- <script>import { sendUserToast } from '../../utils';
2
- import { ScriptService, FlowService, Script } from '../../gen';
1
+ <script>import { sendUserToast } from '../utils';
2
+ import { ScriptService, FlowService, Script } from '../gen';
3
3
  import Icon from 'svelte-awesome';
4
4
  import { faSearch } from '@fortawesome/free-solid-svg-icons';
5
- import { hubScripts, workspaceStore } from '../../stores';
5
+ import { hubScripts, workspaceStore } from '../stores';
6
6
  import { createEventDispatcher } from 'svelte';
7
7
  import ItemPicker from './ItemPicker.svelte';
8
8
  import RadioButton from './RadioButton.svelte';
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { Schema } from '../../common';
2
+ import type { Schema } from '../common';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  schema: Schema;
@@ -1,11 +1,11 @@
1
1
  <script>import Modal from './Modal.svelte';
2
2
  import TableCustom from './TableCustom.svelte';
3
- import { GranularAclService } from '../../gen/services/GranularAclService';
4
- import { sendUserToast } from '../../utils';
5
- import { GroupService, UserService } from '../../gen';
3
+ import { GranularAclService } from '../gen/services/GranularAclService';
4
+ import { sendUserToast } from '../utils';
5
+ import { GroupService, UserService } from '../gen';
6
6
  import { createEventDispatcher } from 'svelte';
7
7
  import AutoComplete from 'simple-svelte-autocomplete';
8
- import { workspaceStore } from '../../stores';
8
+ import { workspaceStore } from '../stores';
9
9
  const dispatch = createEventDispatcher();
10
10
  export let kind;
11
11
  export let path = '';
@@ -1,4 +1,4 @@
1
- <script>import { userStore } from '../../stores';
1
+ <script>import { userStore } from '../stores';
2
2
  import Badge from './Badge.svelte';
3
3
  export let extraPerms = {};
4
4
  export let canWrite;
File without changes
@@ -1,11 +1,11 @@
1
1
  <script>import Password from './Password.svelte';
2
- import { sendUserToast } from '../../utils';
3
- import { VariableService } from '../../gen';
2
+ import { sendUserToast } from '../utils';
3
+ import { VariableService } from '../gen';
4
4
  import AutosizedTextarea from './AutosizedTextarea.svelte';
5
5
  import Path from './Path.svelte';
6
6
  import Modal from './Modal.svelte';
7
7
  import { createEventDispatcher } from 'svelte';
8
- import { workspaceStore } from '../../stores';
8
+ import { workspaceStore } from '../stores';
9
9
  import Required from './Required.svelte';
10
10
  const dispatch = createEventDispatcher();
11
11
  let path = '';
@@ -0,0 +1,10 @@
1
+ export class ApiError extends Error {
2
+ constructor(response, message) {
3
+ super(message);
4
+ this.name = 'ApiError';
5
+ this.url = response.url;
6
+ this.status = response.status;
7
+ this.statusText = response.statusText;
8
+ this.body = response.body;
9
+ }
10
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,86 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ export class CancelError extends Error {
5
+ constructor(message) {
6
+ super(message);
7
+ this.name = 'CancelError';
8
+ }
9
+ get isCancelled() {
10
+ return true;
11
+ }
12
+ }
13
+ export class CancelablePromise {
14
+ constructor(executor) {
15
+ this._isResolved = false;
16
+ this._isRejected = false;
17
+ this._isCancelled = false;
18
+ this._cancelHandlers = [];
19
+ this._promise = new Promise((resolve, reject) => {
20
+ this._resolve = resolve;
21
+ this._reject = reject;
22
+ const onResolve = (value) => {
23
+ if (this._isResolved || this._isRejected || this._isCancelled) {
24
+ return;
25
+ }
26
+ this._isResolved = true;
27
+ this._resolve?.(value);
28
+ };
29
+ const onReject = (reason) => {
30
+ if (this._isResolved || this._isRejected || this._isCancelled) {
31
+ return;
32
+ }
33
+ this._isRejected = true;
34
+ this._reject?.(reason);
35
+ };
36
+ const onCancel = (cancelHandler) => {
37
+ if (this._isResolved || this._isRejected || this._isCancelled) {
38
+ return;
39
+ }
40
+ this._cancelHandlers.push(cancelHandler);
41
+ };
42
+ Object.defineProperty(onCancel, 'isResolved', {
43
+ get: () => this._isResolved,
44
+ });
45
+ Object.defineProperty(onCancel, 'isRejected', {
46
+ get: () => this._isRejected,
47
+ });
48
+ Object.defineProperty(onCancel, 'isCancelled', {
49
+ get: () => this._isCancelled,
50
+ });
51
+ return executor(onResolve, onReject, onCancel);
52
+ });
53
+ }
54
+ then(onFulfilled, onRejected) {
55
+ return this._promise.then(onFulfilled, onRejected);
56
+ }
57
+ catch(onRejected) {
58
+ return this._promise.catch(onRejected);
59
+ }
60
+ finally(onFinally) {
61
+ return this._promise.finally(onFinally);
62
+ }
63
+ cancel() {
64
+ if (this._isResolved || this._isRejected || this._isCancelled) {
65
+ return;
66
+ }
67
+ this._isCancelled = true;
68
+ if (this._cancelHandlers.length) {
69
+ try {
70
+ for (const cancelHandler of this._cancelHandlers) {
71
+ cancelHandler();
72
+ }
73
+ }
74
+ catch (error) {
75
+ console.warn('Cancellation threw an error', error);
76
+ return;
77
+ }
78
+ }
79
+ this._cancelHandlers.length = 0;
80
+ this._reject?.(new CancelError('Request aborted'));
81
+ }
82
+ get isCancelled() {
83
+ return this._isCancelled;
84
+ }
85
+ }
86
+ Symbol.toStringTag;
@@ -0,0 +1,11 @@
1
+ export const OpenAPI = {
2
+ BASE: '/api',
3
+ VERSION: '1.13.0',
4
+ WITH_CREDENTIALS: false,
5
+ CREDENTIALS: 'include',
6
+ TOKEN: undefined,
7
+ USERNAME: undefined,
8
+ PASSWORD: undefined,
9
+ HEADERS: undefined,
10
+ ENCODE_PATH: undefined,
11
+ };