@keboola/api-fixtures 43.0.0 → 45.0.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.
package/dist/index.d.cts CHANGED
@@ -2,8 +2,7 @@ import { App, AppRun, Deployment } from "@keboola/api-client/apps/types";
2
2
  import { AdminVendor, App as App$1, AppChange, ServiceAccount, User, Vendor, VendorListItem } from "@keboola/api-client/developerPortal/types";
3
3
  import { ApplicationToken, CreatedApplicationToken, UiApp, UiAppDetail } from "@keboola/api-client/management/types";
4
4
  import { ServiceId } from "@keboola/api-client/constants";
5
- import { DevBranch, StackInfo, StorageToken, Table, TableDetail } from "@keboola/api-client/storage/types";
6
- //#region src/clients/apps/apps.d.ts
5
+ import { DevBranch, SharingTargets, StackInfo, StorageToken, Table, TableDetail } from "@keboola/api-client/storage/types";
7
6
  declare const appFixtures: {
8
7
  neverDeployed: {
9
8
  id: string;
@@ -13,6 +12,7 @@ declare const appFixtures: {
13
12
  configId: string;
14
13
  type: 'streamlit';
15
14
  url: string;
15
+ hasManagedGitRepo: boolean;
16
16
  production: {
17
17
  desiredDeploymentId: null;
18
18
  actualDeploymentId: null;
@@ -26,6 +26,7 @@ declare const appFixtures: {
26
26
  configId: string;
27
27
  type: 'streamlit';
28
28
  url: string;
29
+ hasManagedGitRepo: boolean;
29
30
  id: string;
30
31
  production: {
31
32
  desiredDeploymentId: null;
@@ -41,6 +42,7 @@ declare const appFixtures: {
41
42
  configId: string;
42
43
  type: 'streamlit';
43
44
  url: string;
45
+ hasManagedGitRepo: boolean;
44
46
  production: {
45
47
  desiredDeploymentId: string;
46
48
  actualDeploymentId: string;
@@ -55,6 +57,7 @@ declare const appFixtures: {
55
57
  configId: string;
56
58
  type: 'streamlit';
57
59
  url: string;
60
+ hasManagedGitRepo: boolean;
58
61
  production: {
59
62
  desiredDeploymentId: string;
60
63
  actualDeploymentId: string;
@@ -69,6 +72,7 @@ declare const appFixtures: {
69
72
  configId: string;
70
73
  type: 'streamlit';
71
74
  url: string;
75
+ hasManagedGitRepo: boolean;
72
76
  production: {
73
77
  desiredDeploymentId: string;
74
78
  actualDeploymentId: string;
@@ -83,6 +87,7 @@ declare const appFixtures: {
83
87
  configId: string;
84
88
  type: 'streamlit';
85
89
  url: string;
90
+ hasManagedGitRepo: boolean;
86
91
  production: {
87
92
  desiredDeploymentId: string;
88
93
  actualDeploymentId: string;
@@ -92,8 +97,6 @@ declare const appFixtures: {
92
97
  };
93
98
  declare const getApp: () => App;
94
99
  declare const listApps: () => App[];
95
- //#endregion
96
- //#region src/clients/apps/deployments.d.ts
97
100
  declare const deploymentFixtures: {
98
101
  archived: {
99
102
  id: string;
@@ -159,8 +162,6 @@ declare const getDeployment: () => Deployment;
159
162
  * - Oldest first on purpose: the endpoint specifies no order, so consumers must sort.
160
163
  */
161
164
  declare const listDeployments: () => Deployment[];
162
- //#endregion
163
- //#region src/clients/apps/runs.d.ts
164
165
  declare const runFixtures: {
165
166
  running: {
166
167
  appId: string;
@@ -237,8 +238,6 @@ declare const getAppRun: () => AppRun;
237
238
  * data that happens to contradict it.
238
239
  */
239
240
  declare const listAppRuns: () => AppRun[];
240
- //#endregion
241
- //#region src/clients/developerPortal/apps.d.ts
242
241
  /** The public catalog list: published, non-`other` apps only. */
243
242
  declare const listPublishedApps: () => App$1[];
244
243
  /** A vendor's own apps, across every publishing state the table renders. */
@@ -587,8 +586,6 @@ declare const developerPortalFixtures: {
587
586
  };
588
587
  };
589
588
  };
590
- //#endregion
591
- //#region src/clients/management/applicationTokens.d.ts
592
589
  /** A token that has been used and never expires. */
593
590
  declare const getApplicationToken: () => ApplicationToken;
594
591
  /** Used, never-used and expiring tokens — the three states the list must render. */
@@ -652,8 +649,6 @@ declare const applicationTokenFixtures: {
652
649
  token: string;
653
650
  };
654
651
  };
655
- //#endregion
656
- //#region src/clients/management/uiApps.d.ts
657
652
  /** One UI application detail with an active and a superseded version. */
658
653
  declare const getUiApp: () => UiAppDetail;
659
654
  /** An active application and one with no active version, as `includeInactive` returns them. */
@@ -705,8 +700,6 @@ declare const uiAppFixtures: {
705
700
  })[];
706
701
  };
707
702
  };
708
- //#endregion
709
- //#region src/clients/storage/bootstrap.d.ts
710
703
  /** The stack an MSW-backed test points its client at, unless a caller passes its own. */
711
704
  declare const DEFAULT_BASE_URL = "https://connection.test";
712
705
  type StackInfoOptions = {
@@ -734,8 +727,8 @@ declare const getStackInfo: ({ baseUrl, services }?: StackInfoOptions) => StackI
734
727
  /**
735
728
  * The verified master token `GET /v2/storage/tokens/verify` returns.
736
729
  *
737
- * - Complete on purpose: `api.context.project.sapiToken` is this object verbatim and hooks read deep
738
- * into it (`owner.id`, `admin.role`, `adminOwner.email`), so a partial body surfaces as
730
+ * - Complete on purpose: kbc-ui's `useProject().sapiToken` is this object verbatim and hooks read
731
+ * deep into it (`owner.id`, `admin.role`, `adminOwner.email`), so a partial body surfaces as
739
732
  * `undefined`s far from the test that caused them.
740
733
  * - Every permission flag is granted; a test needing a restricted token overrides the handler.
741
734
  */
@@ -747,8 +740,14 @@ declare const verifyStorageToken: ({ baseUrl, features }?: StorageTokenOptions)
747
740
  * - The default branch has no creator, which `DevBranch` models as an empty `creatorToken`.
748
741
  */
749
742
  declare const getDevBranches: () => DevBranch[];
750
- //#endregion
751
- //#region src/clients/storage/tables.d.ts
743
+ /**
744
+ * The projects and users `GET /v2/storage/sharing-targets` returns.
745
+ *
746
+ * - Users come sorted by email, as Connection sorts them; their ids descend, so a list resorted by
747
+ * id shows the wrong order.
748
+ * - None is the admin behind `verifyStorageToken()`.
749
+ */
750
+ declare const getSharingTargets: () => SharingTargets;
752
751
  /**
753
752
  * Returns a single non-typed, non-alias `TableDetail` (fresh, no imports yet).
754
753
  *
@@ -955,8 +954,6 @@ declare const tableFixtures: {
955
954
  dataSizeBytes: number;
956
955
  };
957
956
  };
958
- //#endregion
959
- //#region src/fixtures.d.ts
960
957
  declare const fixtures: {
961
958
  management: {
962
959
  applicationTokens: {
@@ -1080,6 +1077,9 @@ declare const fixtures: {
1080
1077
  verifyStorageToken: typeof verifyStorageToken;
1081
1078
  getDevBranches: typeof getDevBranches;
1082
1079
  };
1080
+ bucketSharing: {
1081
+ getSharingTargets: typeof getSharingTargets;
1082
+ };
1083
1083
  tables: {
1084
1084
  getTable: typeof getTable;
1085
1085
  listTables: typeof listTables;
@@ -1285,6 +1285,7 @@ declare const fixtures: {
1285
1285
  configId: string;
1286
1286
  type: 'streamlit';
1287
1287
  url: string;
1288
+ hasManagedGitRepo: boolean;
1288
1289
  production: {
1289
1290
  desiredDeploymentId: null;
1290
1291
  actualDeploymentId: null;
@@ -1298,6 +1299,7 @@ declare const fixtures: {
1298
1299
  configId: string;
1299
1300
  type: 'streamlit';
1300
1301
  url: string;
1302
+ hasManagedGitRepo: boolean;
1301
1303
  id: string;
1302
1304
  production: {
1303
1305
  desiredDeploymentId: null;
@@ -1313,6 +1315,7 @@ declare const fixtures: {
1313
1315
  configId: string;
1314
1316
  type: 'streamlit';
1315
1317
  url: string;
1318
+ hasManagedGitRepo: boolean;
1316
1319
  production: {
1317
1320
  desiredDeploymentId: string;
1318
1321
  actualDeploymentId: string;
@@ -1327,6 +1330,7 @@ declare const fixtures: {
1327
1330
  configId: string;
1328
1331
  type: 'streamlit';
1329
1332
  url: string;
1333
+ hasManagedGitRepo: boolean;
1330
1334
  production: {
1331
1335
  desiredDeploymentId: string;
1332
1336
  actualDeploymentId: string;
@@ -1341,6 +1345,7 @@ declare const fixtures: {
1341
1345
  configId: string;
1342
1346
  type: 'streamlit';
1343
1347
  url: string;
1348
+ hasManagedGitRepo: boolean;
1344
1349
  production: {
1345
1350
  desiredDeploymentId: string;
1346
1351
  actualDeploymentId: string;
@@ -1355,6 +1360,7 @@ declare const fixtures: {
1355
1360
  configId: string;
1356
1361
  type: 'streamlit';
1357
1362
  url: string;
1363
+ hasManagedGitRepo: boolean;
1358
1364
  production: {
1359
1365
  desiredDeploymentId: string;
1360
1366
  actualDeploymentId: string;
@@ -1842,6 +1848,5 @@ declare const fixtures: {
1842
1848
  };
1843
1849
  };
1844
1850
  };
1845
- //#endregion
1846
- export { type ApplicationToken, type CreatedApplicationToken, DEFAULT_BASE_URL, type Table, type TableDetail, type UiApp, type UiAppDetail, appFixtures, applicationTokenFixtures, deploymentFixtures, developerPortalFixtures, fixtures, getApp, getAppRun, getApplicationToken, getApplicationTokens, getDeployment, getDevBranches, getStackInfo, getTable, getUiApp, getUiApps, getVendor, listAllApps, listAllVendors, listAppChanges, listAppRuns, listApps, listDeployments, listPublishedApps, listServiceAccounts, listTables, listUsers, listVendorApps, listVendors, runFixtures, tableFixtures, uiAppFixtures, verifyStorageToken };
1851
+ export { type ApplicationToken, type CreatedApplicationToken, DEFAULT_BASE_URL, type Table, type TableDetail, type UiApp, type UiAppDetail, appFixtures, applicationTokenFixtures, deploymentFixtures, developerPortalFixtures, fixtures, getApp, getAppRun, getApplicationToken, getApplicationTokens, getDeployment, getDevBranches, getSharingTargets, getStackInfo, getTable, getUiApp, getUiApps, getVendor, listAllApps, listAllVendors, listAppChanges, listAppRuns, listApps, listDeployments, listPublishedApps, listServiceAccounts, listTables, listUsers, listVendorApps, listVendors, runFixtures, tableFixtures, uiAppFixtures, verifyStorageToken };
1847
1852
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -2,8 +2,7 @@ import { ServiceId } from "@keboola/api-client/constants";
2
2
  import { App, AppRun, Deployment } from "@keboola/api-client/apps/types";
3
3
  import { AdminVendor, App as App$1, AppChange, ServiceAccount, User, Vendor, VendorListItem } from "@keboola/api-client/developerPortal/types";
4
4
  import { ApplicationToken, CreatedApplicationToken, UiApp, UiAppDetail } from "@keboola/api-client/management/types";
5
- import { DevBranch, StackInfo, StorageToken, Table, TableDetail } from "@keboola/api-client/storage/types";
6
- //#region src/clients/apps/apps.d.ts
5
+ import { DevBranch, SharingTargets, StackInfo, StorageToken, Table, TableDetail } from "@keboola/api-client/storage/types";
7
6
  declare const appFixtures: {
8
7
  neverDeployed: {
9
8
  id: string;
@@ -13,6 +12,7 @@ declare const appFixtures: {
13
12
  configId: string;
14
13
  type: 'streamlit';
15
14
  url: string;
15
+ hasManagedGitRepo: boolean;
16
16
  production: {
17
17
  desiredDeploymentId: null;
18
18
  actualDeploymentId: null;
@@ -26,6 +26,7 @@ declare const appFixtures: {
26
26
  configId: string;
27
27
  type: 'streamlit';
28
28
  url: string;
29
+ hasManagedGitRepo: boolean;
29
30
  id: string;
30
31
  production: {
31
32
  desiredDeploymentId: null;
@@ -41,6 +42,7 @@ declare const appFixtures: {
41
42
  configId: string;
42
43
  type: 'streamlit';
43
44
  url: string;
45
+ hasManagedGitRepo: boolean;
44
46
  production: {
45
47
  desiredDeploymentId: string;
46
48
  actualDeploymentId: string;
@@ -55,6 +57,7 @@ declare const appFixtures: {
55
57
  configId: string;
56
58
  type: 'streamlit';
57
59
  url: string;
60
+ hasManagedGitRepo: boolean;
58
61
  production: {
59
62
  desiredDeploymentId: string;
60
63
  actualDeploymentId: string;
@@ -69,6 +72,7 @@ declare const appFixtures: {
69
72
  configId: string;
70
73
  type: 'streamlit';
71
74
  url: string;
75
+ hasManagedGitRepo: boolean;
72
76
  production: {
73
77
  desiredDeploymentId: string;
74
78
  actualDeploymentId: string;
@@ -83,6 +87,7 @@ declare const appFixtures: {
83
87
  configId: string;
84
88
  type: 'streamlit';
85
89
  url: string;
90
+ hasManagedGitRepo: boolean;
86
91
  production: {
87
92
  desiredDeploymentId: string;
88
93
  actualDeploymentId: string;
@@ -92,8 +97,6 @@ declare const appFixtures: {
92
97
  };
93
98
  declare const getApp: () => App;
94
99
  declare const listApps: () => App[];
95
- //#endregion
96
- //#region src/clients/apps/deployments.d.ts
97
100
  declare const deploymentFixtures: {
98
101
  archived: {
99
102
  id: string;
@@ -159,8 +162,6 @@ declare const getDeployment: () => Deployment;
159
162
  * - Oldest first on purpose: the endpoint specifies no order, so consumers must sort.
160
163
  */
161
164
  declare const listDeployments: () => Deployment[];
162
- //#endregion
163
- //#region src/clients/apps/runs.d.ts
164
165
  declare const runFixtures: {
165
166
  running: {
166
167
  appId: string;
@@ -237,8 +238,6 @@ declare const getAppRun: () => AppRun;
237
238
  * data that happens to contradict it.
238
239
  */
239
240
  declare const listAppRuns: () => AppRun[];
240
- //#endregion
241
- //#region src/clients/developerPortal/apps.d.ts
242
241
  /** The public catalog list: published, non-`other` apps only. */
243
242
  declare const listPublishedApps: () => App$1[];
244
243
  /** A vendor's own apps, across every publishing state the table renders. */
@@ -587,8 +586,6 @@ declare const developerPortalFixtures: {
587
586
  };
588
587
  };
589
588
  };
590
- //#endregion
591
- //#region src/clients/management/applicationTokens.d.ts
592
589
  /** A token that has been used and never expires. */
593
590
  declare const getApplicationToken: () => ApplicationToken;
594
591
  /** Used, never-used and expiring tokens — the three states the list must render. */
@@ -652,8 +649,6 @@ declare const applicationTokenFixtures: {
652
649
  token: string;
653
650
  };
654
651
  };
655
- //#endregion
656
- //#region src/clients/management/uiApps.d.ts
657
652
  /** One UI application detail with an active and a superseded version. */
658
653
  declare const getUiApp: () => UiAppDetail;
659
654
  /** An active application and one with no active version, as `includeInactive` returns them. */
@@ -705,8 +700,6 @@ declare const uiAppFixtures: {
705
700
  })[];
706
701
  };
707
702
  };
708
- //#endregion
709
- //#region src/clients/storage/bootstrap.d.ts
710
703
  /** The stack an MSW-backed test points its client at, unless a caller passes its own. */
711
704
  declare const DEFAULT_BASE_URL = "https://connection.test";
712
705
  type StackInfoOptions = {
@@ -734,8 +727,8 @@ declare const getStackInfo: ({ baseUrl, services }?: StackInfoOptions) => StackI
734
727
  /**
735
728
  * The verified master token `GET /v2/storage/tokens/verify` returns.
736
729
  *
737
- * - Complete on purpose: `api.context.project.sapiToken` is this object verbatim and hooks read deep
738
- * into it (`owner.id`, `admin.role`, `adminOwner.email`), so a partial body surfaces as
730
+ * - Complete on purpose: kbc-ui's `useProject().sapiToken` is this object verbatim and hooks read
731
+ * deep into it (`owner.id`, `admin.role`, `adminOwner.email`), so a partial body surfaces as
739
732
  * `undefined`s far from the test that caused them.
740
733
  * - Every permission flag is granted; a test needing a restricted token overrides the handler.
741
734
  */
@@ -747,8 +740,14 @@ declare const verifyStorageToken: ({ baseUrl, features }?: StorageTokenOptions)
747
740
  * - The default branch has no creator, which `DevBranch` models as an empty `creatorToken`.
748
741
  */
749
742
  declare const getDevBranches: () => DevBranch[];
750
- //#endregion
751
- //#region src/clients/storage/tables.d.ts
743
+ /**
744
+ * The projects and users `GET /v2/storage/sharing-targets` returns.
745
+ *
746
+ * - Users come sorted by email, as Connection sorts them; their ids descend, so a list resorted by
747
+ * id shows the wrong order.
748
+ * - None is the admin behind `verifyStorageToken()`.
749
+ */
750
+ declare const getSharingTargets: () => SharingTargets;
752
751
  /**
753
752
  * Returns a single non-typed, non-alias `TableDetail` (fresh, no imports yet).
754
753
  *
@@ -955,8 +954,6 @@ declare const tableFixtures: {
955
954
  dataSizeBytes: number;
956
955
  };
957
956
  };
958
- //#endregion
959
- //#region src/fixtures.d.ts
960
957
  declare const fixtures: {
961
958
  management: {
962
959
  applicationTokens: {
@@ -1080,6 +1077,9 @@ declare const fixtures: {
1080
1077
  verifyStorageToken: typeof verifyStorageToken;
1081
1078
  getDevBranches: typeof getDevBranches;
1082
1079
  };
1080
+ bucketSharing: {
1081
+ getSharingTargets: typeof getSharingTargets;
1082
+ };
1083
1083
  tables: {
1084
1084
  getTable: typeof getTable;
1085
1085
  listTables: typeof listTables;
@@ -1285,6 +1285,7 @@ declare const fixtures: {
1285
1285
  configId: string;
1286
1286
  type: 'streamlit';
1287
1287
  url: string;
1288
+ hasManagedGitRepo: boolean;
1288
1289
  production: {
1289
1290
  desiredDeploymentId: null;
1290
1291
  actualDeploymentId: null;
@@ -1298,6 +1299,7 @@ declare const fixtures: {
1298
1299
  configId: string;
1299
1300
  type: 'streamlit';
1300
1301
  url: string;
1302
+ hasManagedGitRepo: boolean;
1301
1303
  id: string;
1302
1304
  production: {
1303
1305
  desiredDeploymentId: null;
@@ -1313,6 +1315,7 @@ declare const fixtures: {
1313
1315
  configId: string;
1314
1316
  type: 'streamlit';
1315
1317
  url: string;
1318
+ hasManagedGitRepo: boolean;
1316
1319
  production: {
1317
1320
  desiredDeploymentId: string;
1318
1321
  actualDeploymentId: string;
@@ -1327,6 +1330,7 @@ declare const fixtures: {
1327
1330
  configId: string;
1328
1331
  type: 'streamlit';
1329
1332
  url: string;
1333
+ hasManagedGitRepo: boolean;
1330
1334
  production: {
1331
1335
  desiredDeploymentId: string;
1332
1336
  actualDeploymentId: string;
@@ -1341,6 +1345,7 @@ declare const fixtures: {
1341
1345
  configId: string;
1342
1346
  type: 'streamlit';
1343
1347
  url: string;
1348
+ hasManagedGitRepo: boolean;
1344
1349
  production: {
1345
1350
  desiredDeploymentId: string;
1346
1351
  actualDeploymentId: string;
@@ -1355,6 +1360,7 @@ declare const fixtures: {
1355
1360
  configId: string;
1356
1361
  type: 'streamlit';
1357
1362
  url: string;
1363
+ hasManagedGitRepo: boolean;
1358
1364
  production: {
1359
1365
  desiredDeploymentId: string;
1360
1366
  actualDeploymentId: string;
@@ -1842,6 +1848,5 @@ declare const fixtures: {
1842
1848
  };
1843
1849
  };
1844
1850
  };
1845
- //#endregion
1846
- export { type ApplicationToken, type CreatedApplicationToken, DEFAULT_BASE_URL, type Table, type TableDetail, type UiApp, type UiAppDetail, appFixtures, applicationTokenFixtures, deploymentFixtures, developerPortalFixtures, fixtures, getApp, getAppRun, getApplicationToken, getApplicationTokens, getDeployment, getDevBranches, getStackInfo, getTable, getUiApp, getUiApps, getVendor, listAllApps, listAllVendors, listAppChanges, listAppRuns, listApps, listDeployments, listPublishedApps, listServiceAccounts, listTables, listUsers, listVendorApps, listVendors, runFixtures, tableFixtures, uiAppFixtures, verifyStorageToken };
1851
+ export { type ApplicationToken, type CreatedApplicationToken, DEFAULT_BASE_URL, type Table, type TableDetail, type UiApp, type UiAppDetail, appFixtures, applicationTokenFixtures, deploymentFixtures, developerPortalFixtures, fixtures, getApp, getAppRun, getApplicationToken, getApplicationTokens, getDeployment, getDevBranches, getSharingTargets, getStackInfo, getTable, getUiApp, getUiApps, getVendor, listAllApps, listAllVendors, listAppChanges, listAppRuns, listApps, listDeployments, listPublishedApps, listServiceAccounts, listTables, listUsers, listVendorApps, listVendors, runFixtures, tableFixtures, uiAppFixtures, verifyStorageToken };
1847
1852
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ServiceId } from "@keboola/api-client/constants";
2
- //#region src/clients/apps/deployments.ts
2
+ // src/clients/apps/deployments.ts
3
3
  const APP_ID = "374811";
4
4
  const deploymentId = (suffix) => `019f1c3a-${suffix}-7c1e-b4a2-0d9f3e6a8c15`;
5
5
  const archivedDeployment = {
@@ -78,8 +78,7 @@ const listDeployments = () => [
78
78
  buildFailedDeployment,
79
79
  runFailedDeployment
80
80
  ];
81
- //#endregion
82
- //#region src/clients/apps/apps.ts
81
+ // src/clients/apps/apps.ts
83
82
  const base$1 = {
84
83
  id: APP_ID,
85
84
  projectId: "14",
@@ -87,7 +86,8 @@ const base$1 = {
87
86
  branchId: "6",
88
87
  configId: "01kz9kny4n49x3xk0e4k8ynpmq",
89
88
  type: "streamlit",
90
- url: "https://hello-dashboard-374811.hub.canary-orion.keboola.dev"
89
+ url: "https://hello-dashboard-374811.hub.canary-orion.keboola.dev",
90
+ hasManagedGitRepo: false
91
91
  };
92
92
  const production = (deployment) => ({
93
93
  desiredDeploymentId: deployment.id,
@@ -166,8 +166,7 @@ const listApps = () => [
166
166
  readdress(suspendedApp, "374812"),
167
167
  readdress(neverDeployedApp, "374813")
168
168
  ];
169
- //#endregion
170
- //#region src/clients/apps/runs.ts
169
+ // src/clients/apps/runs.ts
171
170
  const base = {
172
171
  appId: APP_ID,
173
172
  runtimeSize: "small",
@@ -253,8 +252,7 @@ const listAppRuns = () => [
253
252
  runningRun,
254
253
  finishedRun
255
254
  ];
256
- //#endregion
257
- //#region src/clients/developerPortal/apps.ts
255
+ // src/clients/developerPortal/apps.ts
258
256
  const keboolaVendor = {
259
257
  id: "keboola",
260
258
  name: "Keboola",
@@ -596,8 +594,7 @@ const developerPortalFixtures = {
596
594
  },
597
595
  changes: { single: appChange }
598
596
  };
599
- //#endregion
600
- //#region src/clients/management/applicationTokens.ts
597
+ // src/clients/management/applicationTokens.ts
601
598
  const usedToken = {
602
599
  id: 13702,
603
600
  description: "Sandboxes API",
@@ -661,8 +658,7 @@ const applicationTokenFixtures = {
661
658
  expiring: expiringToken,
662
659
  created: createdToken
663
660
  };
664
- //#endregion
665
- //#region src/clients/management/uiApps.ts
661
+ // src/clients/management/uiApps.ts
666
662
  const activeApp = {
667
663
  stringId: "kbc",
668
664
  name: "Keboola Connection UI",
@@ -717,8 +713,7 @@ const uiAppFixtures = {
717
713
  inactive: inactiveApp,
718
714
  detail: appDetail
719
715
  };
720
- //#endregion
721
- //#region src/clients/storage/bootstrap.ts
716
+ // src/clients/storage/bootstrap.ts
722
717
  /** The stack an MSW-backed test points its client at, unless a caller passes its own. */
723
718
  const DEFAULT_BASE_URL = "https://connection.test";
724
719
  /**
@@ -751,8 +746,8 @@ const getStackInfo = ({ baseUrl = DEFAULT_BASE_URL, services = Object.values(Ser
751
746
  /**
752
747
  * The verified master token `GET /v2/storage/tokens/verify` returns.
753
748
  *
754
- * - Complete on purpose: `api.context.project.sapiToken` is this object verbatim and hooks read deep
755
- * into it (`owner.id`, `admin.role`, `adminOwner.email`), so a partial body surfaces as
749
+ * - Complete on purpose: kbc-ui's `useProject().sapiToken` is this object verbatim and hooks read
750
+ * deep into it (`owner.id`, `admin.role`, `adminOwner.email`), so a partial body surfaces as
756
751
  * `undefined`s far from the test that caused them.
757
752
  * - Every permission flag is granted; a test needing a restricted token overrides the handler.
758
753
  */
@@ -842,8 +837,48 @@ const getDevBranches = () => [{
842
837
  created: "2024-01-01T00:00:00Z",
843
838
  creatorToken: []
844
839
  }];
845
- //#endregion
846
- //#region src/clients/storage/tables.ts
840
+ // src/clients/storage/bucketSharing.ts
841
+ /**
842
+ * The projects and users `GET /v2/storage/sharing-targets` returns.
843
+ *
844
+ * - Users come sorted by email, as Connection sorts them; their ids descend, so a list resorted by
845
+ * id shows the wrong order.
846
+ * - None is the admin behind `verifyStorageToken()`.
847
+ */
848
+ const getSharingTargets = () => ({
849
+ projects: [
850
+ {
851
+ id: 7,
852
+ name: "Linked project"
853
+ },
854
+ {
855
+ id: 12,
856
+ name: "Other project"
857
+ },
858
+ {
859
+ id: 100,
860
+ name: "Sales"
861
+ }
862
+ ],
863
+ users: [
864
+ {
865
+ id: 34,
866
+ name: "Adam",
867
+ email: "adam@keboola.com"
868
+ },
869
+ {
870
+ id: 21,
871
+ name: "Beata",
872
+ email: "beata@keboola.com"
873
+ },
874
+ {
875
+ id: 7,
876
+ name: "Cyril",
877
+ email: "cyril@keboola.com"
878
+ }
879
+ ]
880
+ });
881
+ // src/clients/storage/tables.ts
847
882
  const tableBase = {
848
883
  transactional: false,
849
884
  indexType: null,
@@ -996,8 +1031,7 @@ const tableFixtures = {
996
1031
  recentlyUpdated: recentlyUpdatedTable,
997
1032
  large: largeTable
998
1033
  };
999
- //#endregion
1000
- //#region src/fixtures.ts
1034
+ // src/fixtures.ts
1001
1035
  const fixtures = {
1002
1036
  management: {
1003
1037
  applicationTokens: {
@@ -1017,6 +1051,7 @@ const fixtures = {
1017
1051
  verifyStorageToken,
1018
1052
  getDevBranches
1019
1053
  },
1054
+ bucketSharing: { getSharingTargets },
1020
1055
  tables: {
1021
1056
  getTable,
1022
1057
  listTables,
@@ -1053,7 +1088,6 @@ const fixtures = {
1053
1088
  fixtures: developerPortalFixtures
1054
1089
  }
1055
1090
  };
1056
- //#endregion
1057
- export { DEFAULT_BASE_URL, appFixtures, applicationTokenFixtures, deploymentFixtures, developerPortalFixtures, fixtures, getApp, getAppRun, getApplicationToken, getApplicationTokens, getDeployment, getDevBranches, getStackInfo, getTable, getUiApp, getUiApps, getVendor, listAllApps, listAllVendors, listAppChanges, listAppRuns, listApps, listDeployments, listPublishedApps, listServiceAccounts, listTables, listUsers, listVendorApps, listVendors, runFixtures, tableFixtures, uiAppFixtures, verifyStorageToken };
1091
+ export { DEFAULT_BASE_URL, appFixtures, applicationTokenFixtures, deploymentFixtures, developerPortalFixtures, fixtures, getApp, getAppRun, getApplicationToken, getApplicationTokens, getDeployment, getDevBranches, getSharingTargets, getStackInfo, getTable, getUiApp, getUiApps, getVendor, listAllApps, listAllVendors, listAppChanges, listAppRuns, listApps, listDeployments, listPublishedApps, listServiceAccounts, listTables, listUsers, listVendorApps, listVendors, runFixtures, tableFixtures, uiAppFixtures, verifyStorageToken };
1058
1092
 
1059
1093
  //# sourceMappingURL=index.js.map