@equinor/roma-framework 0.0.7-BETA.2 → 0.0.7-BETA.4
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/dev-portal/index.html +2 -0
- package/dev-portal/lib/api/roma/api/setting-controller/setting-controller.d.ts +117 -148
- package/dev-portal/lib/api/roma/model/settingDto.d.ts +3 -0
- package/dev-portal/package.json +1 -1
- package/lib/api/roma/api/setting-controller/setting-controller.d.ts +117 -148
- package/lib/api/roma/model/settingDto.d.ts +3 -0
- package/package.json +1 -1
- package/roma-framework.mjs +166 -236
package/roma-framework.mjs
CHANGED
|
@@ -5381,306 +5381,250 @@ const useCustomClient = () => {
|
|
|
5381
5381
|
return response.json();
|
|
5382
5382
|
};
|
|
5383
5383
|
};
|
|
5384
|
-
const
|
|
5385
|
-
const
|
|
5386
|
-
return (userId,
|
|
5387
|
-
return
|
|
5388
|
-
url: `/api/settings/user/${userId}/
|
|
5384
|
+
const useGetSettingByUserAndIdHook = () => {
|
|
5385
|
+
const getSettingByUserAndId = useCustomClient();
|
|
5386
|
+
return (userId, id, signal) => {
|
|
5387
|
+
return getSettingByUserAndId({
|
|
5388
|
+
url: `/api/settings/user/${userId}/id/${id}`,
|
|
5389
5389
|
method: "get",
|
|
5390
5390
|
signal
|
|
5391
5391
|
});
|
|
5392
5392
|
};
|
|
5393
5393
|
};
|
|
5394
|
-
const
|
|
5395
|
-
return [`/api/settings/user/${userId}/
|
|
5394
|
+
const getGetSettingByUserAndIdQueryKey = (userId, id) => {
|
|
5395
|
+
return [`/api/settings/user/${userId}/id/${id}`];
|
|
5396
5396
|
};
|
|
5397
|
-
const
|
|
5397
|
+
const useGetSettingByUserAndIdQueryOptions = (userId, id, options) => {
|
|
5398
5398
|
const { query: queryOptions } = options ?? {};
|
|
5399
|
-
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ??
|
|
5400
|
-
const
|
|
5401
|
-
const queryFn = ({ signal }) =>
|
|
5399
|
+
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetSettingByUserAndIdQueryKey(userId, id);
|
|
5400
|
+
const getSettingByUserAndId = useGetSettingByUserAndIdHook();
|
|
5401
|
+
const queryFn = ({ signal }) => getSettingByUserAndId(userId, id, signal);
|
|
5402
5402
|
return {
|
|
5403
5403
|
queryKey,
|
|
5404
5404
|
queryFn,
|
|
5405
|
-
enabled: !!(userId &&
|
|
5405
|
+
enabled: !!(userId && id),
|
|
5406
5406
|
...queryOptions
|
|
5407
5407
|
};
|
|
5408
5408
|
};
|
|
5409
|
-
const
|
|
5410
|
-
const queryOptions =
|
|
5409
|
+
const useGetSettingByUserAndId = (userId, id, options) => {
|
|
5410
|
+
const queryOptions = useGetSettingByUserAndIdQueryOptions(
|
|
5411
5411
|
userId,
|
|
5412
|
-
|
|
5412
|
+
id,
|
|
5413
5413
|
options
|
|
5414
5414
|
);
|
|
5415
5415
|
const query = useQuery(queryOptions);
|
|
5416
5416
|
query.queryKey = queryOptions.queryKey;
|
|
5417
5417
|
return query;
|
|
5418
5418
|
};
|
|
5419
|
-
const
|
|
5420
|
-
const
|
|
5421
|
-
return (userId,
|
|
5422
|
-
return
|
|
5423
|
-
url: `/api/settings/user/${userId}/
|
|
5424
|
-
method: "
|
|
5419
|
+
const useUpdateByUserIdAndIdHook = () => {
|
|
5420
|
+
const updateByUserIdAndId = useCustomClient();
|
|
5421
|
+
return (userId, id, settingDto) => {
|
|
5422
|
+
return updateByUserIdAndId({
|
|
5423
|
+
url: `/api/settings/user/${userId}/id/${id}`,
|
|
5424
|
+
method: "put",
|
|
5425
5425
|
headers: { "Content-Type": "application/json" },
|
|
5426
5426
|
data: settingDto
|
|
5427
5427
|
});
|
|
5428
5428
|
};
|
|
5429
5429
|
};
|
|
5430
|
-
const
|
|
5430
|
+
const useUpdateByUserIdAndIdMutationOptions = (options) => {
|
|
5431
5431
|
const { mutation: mutationOptions } = options ?? {};
|
|
5432
|
-
const
|
|
5432
|
+
const updateByUserIdAndId = useUpdateByUserIdAndIdHook();
|
|
5433
5433
|
const mutationFn = (props) => {
|
|
5434
|
-
const { userId,
|
|
5435
|
-
return
|
|
5434
|
+
const { userId, id, data } = props ?? {};
|
|
5435
|
+
return updateByUserIdAndId(userId, id, data);
|
|
5436
5436
|
};
|
|
5437
5437
|
return { mutationFn, ...mutationOptions };
|
|
5438
5438
|
};
|
|
5439
|
-
const
|
|
5440
|
-
const mutationOptions =
|
|
5439
|
+
const useUpdateByUserIdAndId = (options) => {
|
|
5440
|
+
const mutationOptions = useUpdateByUserIdAndIdMutationOptions(options);
|
|
5441
5441
|
return useMutation(mutationOptions);
|
|
5442
5442
|
};
|
|
5443
|
-
const
|
|
5444
|
-
const
|
|
5445
|
-
return (userId,
|
|
5446
|
-
return
|
|
5447
|
-
url: `/api/settings/user/${userId}/
|
|
5443
|
+
const useDeletePrivateSettingByIdHook = () => {
|
|
5444
|
+
const deletePrivateSettingById = useCustomClient();
|
|
5445
|
+
return (userId, id) => {
|
|
5446
|
+
return deletePrivateSettingById({
|
|
5447
|
+
url: `/api/settings/user/${userId}/id/${id}`,
|
|
5448
5448
|
method: "delete"
|
|
5449
5449
|
});
|
|
5450
5450
|
};
|
|
5451
5451
|
};
|
|
5452
|
-
const
|
|
5452
|
+
const useDeletePrivateSettingByIdMutationOptions = (options) => {
|
|
5453
5453
|
const { mutation: mutationOptions } = options ?? {};
|
|
5454
|
-
const
|
|
5454
|
+
const deletePrivateSettingById = useDeletePrivateSettingByIdHook();
|
|
5455
5455
|
const mutationFn = (props) => {
|
|
5456
|
-
const { userId,
|
|
5457
|
-
return
|
|
5456
|
+
const { userId, id } = props ?? {};
|
|
5457
|
+
return deletePrivateSettingById(userId, id);
|
|
5458
5458
|
};
|
|
5459
5459
|
return { mutationFn, ...mutationOptions };
|
|
5460
5460
|
};
|
|
5461
|
-
const
|
|
5462
|
-
const mutationOptions =
|
|
5461
|
+
const useDeletePrivateSettingById = (options) => {
|
|
5462
|
+
const mutationOptions = useDeletePrivateSettingByIdMutationOptions(options);
|
|
5463
5463
|
return useMutation(mutationOptions);
|
|
5464
5464
|
};
|
|
5465
|
-
const
|
|
5466
|
-
const
|
|
5467
|
-
return (
|
|
5468
|
-
return
|
|
5469
|
-
url: `/api/settings/
|
|
5465
|
+
const useGetPublicSettingByUserAndIdHook = () => {
|
|
5466
|
+
const getPublicSettingByUserAndId = useCustomClient();
|
|
5467
|
+
return (appShortName, id, signal) => {
|
|
5468
|
+
return getPublicSettingByUserAndId({
|
|
5469
|
+
url: `/api/settings/application/${appShortName}/id/${id}`,
|
|
5470
5470
|
method: "get",
|
|
5471
5471
|
signal
|
|
5472
5472
|
});
|
|
5473
5473
|
};
|
|
5474
5474
|
};
|
|
5475
|
-
const
|
|
5476
|
-
return [
|
|
5477
|
-
`/api/settings/user/${userId}/application/${appShortName}/setting/${settingKey}`
|
|
5478
|
-
];
|
|
5475
|
+
const getGetPublicSettingByUserAndIdQueryKey = (appShortName, id) => {
|
|
5476
|
+
return [`/api/settings/application/${appShortName}/id/${id}`];
|
|
5479
5477
|
};
|
|
5480
|
-
const
|
|
5478
|
+
const useGetPublicSettingByUserAndIdQueryOptions = (appShortName, id, options) => {
|
|
5481
5479
|
const { query: queryOptions } = options ?? {};
|
|
5482
|
-
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ??
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
settingKey
|
|
5486
|
-
);
|
|
5487
|
-
const getSettingByUserAndAppShortNameAndSetttingKey = useGetSettingByUserAndAppShortNameAndSetttingKeyHook();
|
|
5488
|
-
const queryFn = ({ signal }) => getSettingByUserAndAppShortNameAndSetttingKey(
|
|
5489
|
-
userId,
|
|
5490
|
-
appShortName,
|
|
5491
|
-
settingKey,
|
|
5492
|
-
signal
|
|
5493
|
-
);
|
|
5480
|
+
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetPublicSettingByUserAndIdQueryKey(appShortName, id);
|
|
5481
|
+
const getPublicSettingByUserAndId = useGetPublicSettingByUserAndIdHook();
|
|
5482
|
+
const queryFn = ({ signal }) => getPublicSettingByUserAndId(appShortName, id, signal);
|
|
5494
5483
|
return {
|
|
5495
5484
|
queryKey,
|
|
5496
5485
|
queryFn,
|
|
5497
|
-
enabled: !!(
|
|
5486
|
+
enabled: !!(appShortName && id),
|
|
5498
5487
|
...queryOptions
|
|
5499
5488
|
};
|
|
5500
5489
|
};
|
|
5501
|
-
const
|
|
5502
|
-
const queryOptions =
|
|
5503
|
-
userId,
|
|
5490
|
+
const useGetPublicSettingByUserAndId = (appShortName, id, options) => {
|
|
5491
|
+
const queryOptions = useGetPublicSettingByUserAndIdQueryOptions(
|
|
5504
5492
|
appShortName,
|
|
5505
|
-
|
|
5493
|
+
id,
|
|
5506
5494
|
options
|
|
5507
5495
|
);
|
|
5508
5496
|
const query = useQuery(queryOptions);
|
|
5509
5497
|
query.queryKey = queryOptions.queryKey;
|
|
5510
5498
|
return query;
|
|
5511
5499
|
};
|
|
5512
|
-
const
|
|
5513
|
-
const
|
|
5514
|
-
return (
|
|
5515
|
-
return
|
|
5516
|
-
url: `/api/settings/
|
|
5517
|
-
method: "
|
|
5500
|
+
const useUpdatePublicSettingByAppShortNameAndIdHook = () => {
|
|
5501
|
+
const updatePublicSettingByAppShortNameAndId = useCustomClient();
|
|
5502
|
+
return (appShortName, id, settingDto) => {
|
|
5503
|
+
return updatePublicSettingByAppShortNameAndId({
|
|
5504
|
+
url: `/api/settings/application/${appShortName}/id/${id}`,
|
|
5505
|
+
method: "put",
|
|
5518
5506
|
headers: { "Content-Type": "application/json" },
|
|
5519
5507
|
data: settingDto
|
|
5520
5508
|
});
|
|
5521
5509
|
};
|
|
5522
5510
|
};
|
|
5523
|
-
const
|
|
5511
|
+
const useUpdatePublicSettingByAppShortNameAndIdMutationOptions = (options) => {
|
|
5524
5512
|
const { mutation: mutationOptions } = options ?? {};
|
|
5525
|
-
const
|
|
5513
|
+
const updatePublicSettingByAppShortNameAndId = useUpdatePublicSettingByAppShortNameAndIdHook();
|
|
5526
5514
|
const mutationFn = (props) => {
|
|
5527
|
-
const {
|
|
5528
|
-
return
|
|
5529
|
-
userId,
|
|
5530
|
-
appShortName,
|
|
5531
|
-
settingKey,
|
|
5532
|
-
data
|
|
5533
|
-
);
|
|
5515
|
+
const { appShortName, id, data } = props ?? {};
|
|
5516
|
+
return updatePublicSettingByAppShortNameAndId(appShortName, id, data);
|
|
5534
5517
|
};
|
|
5535
5518
|
return { mutationFn, ...mutationOptions };
|
|
5536
5519
|
};
|
|
5537
|
-
const
|
|
5538
|
-
const mutationOptions =
|
|
5539
|
-
options
|
|
5540
|
-
);
|
|
5520
|
+
const useUpdatePublicSettingByAppShortNameAndId = (options) => {
|
|
5521
|
+
const mutationOptions = useUpdatePublicSettingByAppShortNameAndIdMutationOptions(options);
|
|
5541
5522
|
return useMutation(mutationOptions);
|
|
5542
5523
|
};
|
|
5543
|
-
const
|
|
5544
|
-
const
|
|
5545
|
-
return (
|
|
5546
|
-
return
|
|
5547
|
-
url: `/api/settings/
|
|
5524
|
+
const useDeletePublicSettingByIdHook = () => {
|
|
5525
|
+
const deletePublicSettingById = useCustomClient();
|
|
5526
|
+
return (appShortName, id) => {
|
|
5527
|
+
return deletePublicSettingById({
|
|
5528
|
+
url: `/api/settings/application/${appShortName}/id/${id}`,
|
|
5548
5529
|
method: "delete"
|
|
5549
5530
|
});
|
|
5550
5531
|
};
|
|
5551
5532
|
};
|
|
5552
|
-
const
|
|
5533
|
+
const useDeletePublicSettingByIdMutationOptions = (options) => {
|
|
5553
5534
|
const { mutation: mutationOptions } = options ?? {};
|
|
5554
|
-
const
|
|
5535
|
+
const deletePublicSettingById = useDeletePublicSettingByIdHook();
|
|
5555
5536
|
const mutationFn = (props) => {
|
|
5556
|
-
const {
|
|
5557
|
-
return
|
|
5558
|
-
userId,
|
|
5559
|
-
appShortName,
|
|
5560
|
-
settingKey
|
|
5561
|
-
);
|
|
5537
|
+
const { appShortName, id } = props ?? {};
|
|
5538
|
+
return deletePublicSettingById(appShortName, id);
|
|
5562
5539
|
};
|
|
5563
5540
|
return { mutationFn, ...mutationOptions };
|
|
5564
5541
|
};
|
|
5565
|
-
const
|
|
5566
|
-
const mutationOptions =
|
|
5542
|
+
const useDeletePublicSettingById = (options) => {
|
|
5543
|
+
const mutationOptions = useDeletePublicSettingByIdMutationOptions(options);
|
|
5567
5544
|
return useMutation(mutationOptions);
|
|
5568
5545
|
};
|
|
5569
|
-
const
|
|
5570
|
-
const
|
|
5571
|
-
return (
|
|
5572
|
-
return
|
|
5573
|
-
url: `/api/settings/
|
|
5546
|
+
const useGetSettingsByUserIdHook = () => {
|
|
5547
|
+
const getSettingsByUserId = useCustomClient();
|
|
5548
|
+
return (userId, signal) => {
|
|
5549
|
+
return getSettingsByUserId({
|
|
5550
|
+
url: `/api/settings/user/${userId}`,
|
|
5574
5551
|
method: "get",
|
|
5575
5552
|
signal
|
|
5576
5553
|
});
|
|
5577
5554
|
};
|
|
5578
5555
|
};
|
|
5579
|
-
const
|
|
5580
|
-
return [
|
|
5581
|
-
`/api/settings/application/${appShortName}/setting/${settingKey}`
|
|
5582
|
-
];
|
|
5556
|
+
const getGetSettingsByUserIdQueryKey = (userId) => {
|
|
5557
|
+
return [`/api/settings/user/${userId}`];
|
|
5583
5558
|
};
|
|
5584
|
-
const
|
|
5559
|
+
const useGetSettingsByUserIdQueryOptions = (userId, options) => {
|
|
5585
5560
|
const { query: queryOptions } = options ?? {};
|
|
5586
|
-
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ??
|
|
5587
|
-
const
|
|
5588
|
-
const queryFn = ({ signal }) =>
|
|
5561
|
+
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetSettingsByUserIdQueryKey(userId);
|
|
5562
|
+
const getSettingsByUserId = useGetSettingsByUserIdHook();
|
|
5563
|
+
const queryFn = ({ signal }) => getSettingsByUserId(userId, signal);
|
|
5589
5564
|
return {
|
|
5590
5565
|
queryKey,
|
|
5591
5566
|
queryFn,
|
|
5592
|
-
enabled: !!
|
|
5567
|
+
enabled: !!userId,
|
|
5593
5568
|
...queryOptions
|
|
5594
5569
|
};
|
|
5595
5570
|
};
|
|
5596
|
-
const
|
|
5597
|
-
const queryOptions =
|
|
5598
|
-
appShortName,
|
|
5599
|
-
settingKey,
|
|
5600
|
-
options
|
|
5601
|
-
);
|
|
5571
|
+
const useGetSettingsByUserId = (userId, options) => {
|
|
5572
|
+
const queryOptions = useGetSettingsByUserIdQueryOptions(userId, options);
|
|
5602
5573
|
const query = useQuery(queryOptions);
|
|
5603
5574
|
query.queryKey = queryOptions.queryKey;
|
|
5604
5575
|
return query;
|
|
5605
5576
|
};
|
|
5606
|
-
const
|
|
5607
|
-
const
|
|
5608
|
-
return (
|
|
5609
|
-
return
|
|
5610
|
-
url: `/api/settings/
|
|
5577
|
+
const useCreateSettingByUserIdHook = () => {
|
|
5578
|
+
const createSettingByUserId = useCustomClient();
|
|
5579
|
+
return (userId, settingDto) => {
|
|
5580
|
+
return createSettingByUserId({
|
|
5581
|
+
url: `/api/settings/user/${userId}`,
|
|
5611
5582
|
method: "post",
|
|
5612
5583
|
headers: { "Content-Type": "application/json" },
|
|
5613
5584
|
data: settingDto
|
|
5614
5585
|
});
|
|
5615
5586
|
};
|
|
5616
5587
|
};
|
|
5617
|
-
const
|
|
5618
|
-
const { mutation: mutationOptions } = options ?? {};
|
|
5619
|
-
const createOrUpdateAppShortNameAndSettingKey = useCreateOrUpdateAppShortNameAndSettingKeyHook();
|
|
5620
|
-
const mutationFn = (props) => {
|
|
5621
|
-
const { appShortName, settingKey, data } = props ?? {};
|
|
5622
|
-
return createOrUpdateAppShortNameAndSettingKey(
|
|
5623
|
-
appShortName,
|
|
5624
|
-
settingKey,
|
|
5625
|
-
data
|
|
5626
|
-
);
|
|
5627
|
-
};
|
|
5628
|
-
return { mutationFn, ...mutationOptions };
|
|
5629
|
-
};
|
|
5630
|
-
const useCreateOrUpdateAppShortNameAndSettingKey = (options) => {
|
|
5631
|
-
const mutationOptions = useCreateOrUpdateAppShortNameAndSettingKeyMutationOptions(options);
|
|
5632
|
-
return useMutation(mutationOptions);
|
|
5633
|
-
};
|
|
5634
|
-
const useDeleteAppShortNameAndSettingKeyHook = () => {
|
|
5635
|
-
const deleteAppShortNameAndSettingKey = useCustomClient();
|
|
5636
|
-
return (appShortName, settingKey) => {
|
|
5637
|
-
return deleteAppShortNameAndSettingKey({
|
|
5638
|
-
url: `/api/settings/application/${appShortName}/setting/${settingKey}`,
|
|
5639
|
-
method: "delete"
|
|
5640
|
-
});
|
|
5641
|
-
};
|
|
5642
|
-
};
|
|
5643
|
-
const useDeleteAppShortNameAndSettingKeyMutationOptions = (options) => {
|
|
5588
|
+
const useCreateSettingByUserIdMutationOptions = (options) => {
|
|
5644
5589
|
const { mutation: mutationOptions } = options ?? {};
|
|
5645
|
-
const
|
|
5590
|
+
const createSettingByUserId = useCreateSettingByUserIdHook();
|
|
5646
5591
|
const mutationFn = (props) => {
|
|
5647
|
-
const {
|
|
5648
|
-
return
|
|
5592
|
+
const { userId, data } = props ?? {};
|
|
5593
|
+
return createSettingByUserId(userId, data);
|
|
5649
5594
|
};
|
|
5650
5595
|
return { mutationFn, ...mutationOptions };
|
|
5651
5596
|
};
|
|
5652
|
-
const
|
|
5653
|
-
const mutationOptions =
|
|
5597
|
+
const useCreateSettingByUserId = (options) => {
|
|
5598
|
+
const mutationOptions = useCreateSettingByUserIdMutationOptions(options);
|
|
5654
5599
|
return useMutation(mutationOptions);
|
|
5655
5600
|
};
|
|
5656
|
-
const
|
|
5657
|
-
const
|
|
5658
|
-
return (
|
|
5659
|
-
return
|
|
5660
|
-
url: `/api/settings/
|
|
5601
|
+
const useGetSettingsByAppShortNameHook = () => {
|
|
5602
|
+
const getSettingsByAppShortName = useCustomClient();
|
|
5603
|
+
return (appShortName, signal) => {
|
|
5604
|
+
return getSettingsByAppShortName({
|
|
5605
|
+
url: `/api/settings/application/${appShortName}`,
|
|
5661
5606
|
method: "get",
|
|
5662
5607
|
signal
|
|
5663
5608
|
});
|
|
5664
5609
|
};
|
|
5665
5610
|
};
|
|
5666
|
-
const
|
|
5667
|
-
return [`/api/settings/
|
|
5611
|
+
const getGetSettingsByAppShortNameQueryKey = (appShortName) => {
|
|
5612
|
+
return [`/api/settings/application/${appShortName}`];
|
|
5668
5613
|
};
|
|
5669
|
-
const
|
|
5614
|
+
const useGetSettingsByAppShortNameQueryOptions = (appShortName, options) => {
|
|
5670
5615
|
const { query: queryOptions } = options ?? {};
|
|
5671
|
-
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ??
|
|
5672
|
-
const
|
|
5673
|
-
const queryFn = ({ signal }) =>
|
|
5616
|
+
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetSettingsByAppShortNameQueryKey(appShortName);
|
|
5617
|
+
const getSettingsByAppShortName = useGetSettingsByAppShortNameHook();
|
|
5618
|
+
const queryFn = ({ signal }) => getSettingsByAppShortName(appShortName, signal);
|
|
5674
5619
|
return {
|
|
5675
5620
|
queryKey,
|
|
5676
5621
|
queryFn,
|
|
5677
|
-
enabled: !!
|
|
5622
|
+
enabled: !!appShortName,
|
|
5678
5623
|
...queryOptions
|
|
5679
5624
|
};
|
|
5680
5625
|
};
|
|
5681
|
-
const
|
|
5682
|
-
const queryOptions =
|
|
5683
|
-
userId,
|
|
5626
|
+
const useGetSettingsByAppShortName = (appShortName, options) => {
|
|
5627
|
+
const queryOptions = useGetSettingsByAppShortNameQueryOptions(
|
|
5684
5628
|
appShortName,
|
|
5685
5629
|
options
|
|
5686
5630
|
);
|
|
@@ -5688,39 +5632,29 @@ const useGetSettingByUserAndAppShortName = (userId, appShortName, options) => {
|
|
|
5688
5632
|
query.queryKey = queryOptions.queryKey;
|
|
5689
5633
|
return query;
|
|
5690
5634
|
};
|
|
5691
|
-
const
|
|
5692
|
-
const
|
|
5693
|
-
return (appShortName,
|
|
5694
|
-
return
|
|
5635
|
+
const useCreatePublicSettingByUserIdHook = () => {
|
|
5636
|
+
const createPublicSettingByUserId = useCustomClient();
|
|
5637
|
+
return (appShortName, settingDto) => {
|
|
5638
|
+
return createPublicSettingByUserId({
|
|
5695
5639
|
url: `/api/settings/application/${appShortName}`,
|
|
5696
|
-
method: "
|
|
5697
|
-
|
|
5640
|
+
method: "post",
|
|
5641
|
+
headers: { "Content-Type": "application/json" },
|
|
5642
|
+
data: settingDto
|
|
5698
5643
|
});
|
|
5699
5644
|
};
|
|
5700
5645
|
};
|
|
5701
|
-
const
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
const
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
const getSettingsAppShortName = useGetSettingsAppShortNameHook();
|
|
5708
|
-
const queryFn = ({ signal }) => getSettingsAppShortName(appShortName, signal);
|
|
5709
|
-
return {
|
|
5710
|
-
queryKey,
|
|
5711
|
-
queryFn,
|
|
5712
|
-
enabled: !!appShortName,
|
|
5713
|
-
...queryOptions
|
|
5646
|
+
const useCreatePublicSettingByUserIdMutationOptions = (options) => {
|
|
5647
|
+
const { mutation: mutationOptions } = options ?? {};
|
|
5648
|
+
const createPublicSettingByUserId = useCreatePublicSettingByUserIdHook();
|
|
5649
|
+
const mutationFn = (props) => {
|
|
5650
|
+
const { appShortName, data } = props ?? {};
|
|
5651
|
+
return createPublicSettingByUserId(appShortName, data);
|
|
5714
5652
|
};
|
|
5653
|
+
return { mutationFn, ...mutationOptions };
|
|
5715
5654
|
};
|
|
5716
|
-
const
|
|
5717
|
-
const
|
|
5718
|
-
|
|
5719
|
-
options
|
|
5720
|
-
);
|
|
5721
|
-
const query = useQuery(queryOptions);
|
|
5722
|
-
query.queryKey = queryOptions.queryKey;
|
|
5723
|
-
return query;
|
|
5655
|
+
const useCreatePublicSettingByUserId = (options) => {
|
|
5656
|
+
const mutationOptions = useCreatePublicSettingByUserIdMutationOptions(options);
|
|
5657
|
+
return useMutation(mutationOptions);
|
|
5724
5658
|
};
|
|
5725
5659
|
const useGetAllAppsHook = () => {
|
|
5726
5660
|
const getAllApps = useCustomClient();
|
|
@@ -6275,15 +6209,14 @@ export {
|
|
|
6275
6209
|
getGetAllRomaConfigurationTypesQueryKey,
|
|
6276
6210
|
getGetAllServicesQueryKey,
|
|
6277
6211
|
getGetAppByKeyQueryKey,
|
|
6278
|
-
getGetByAppShortNameAndSettingKeyQueryKey,
|
|
6279
6212
|
getGetCategoryByIdQueryKey,
|
|
6280
6213
|
getGetCurrentEnvironmentQueryKey,
|
|
6214
|
+
getGetPublicSettingByUserAndIdQueryKey,
|
|
6281
6215
|
getGetRomaConfigurationByIdQueryKey,
|
|
6282
6216
|
getGetServiceByKeyQueryKey,
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
getGetSettingsAppShortNameQueryKey,
|
|
6217
|
+
getGetSettingByUserAndIdQueryKey,
|
|
6218
|
+
getGetSettingsByAppShortNameQueryKey,
|
|
6219
|
+
getGetSettingsByUserIdQueryKey,
|
|
6287
6220
|
getStreamEventsQueryKey,
|
|
6288
6221
|
makeComponent,
|
|
6289
6222
|
useAddRomaConfiguration,
|
|
@@ -6293,42 +6226,36 @@ export {
|
|
|
6293
6226
|
useCreateOrUpdateApp,
|
|
6294
6227
|
useCreateOrUpdateAppHook,
|
|
6295
6228
|
useCreateOrUpdateAppMutationOptions,
|
|
6296
|
-
useCreateOrUpdateAppShortNameAndSettingKey,
|
|
6297
|
-
useCreateOrUpdateAppShortNameAndSettingKeyHook,
|
|
6298
|
-
useCreateOrUpdateAppShortNameAndSettingKeyMutationOptions,
|
|
6299
6229
|
useCreateOrUpdateCategory,
|
|
6300
6230
|
useCreateOrUpdateCategoryHook,
|
|
6301
6231
|
useCreateOrUpdateCategoryMutationOptions,
|
|
6302
6232
|
useCreateOrUpdateService,
|
|
6303
6233
|
useCreateOrUpdateServiceHook,
|
|
6304
6234
|
useCreateOrUpdateServiceMutationOptions,
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6235
|
+
useCreatePublicSettingByUserId,
|
|
6236
|
+
useCreatePublicSettingByUserIdHook,
|
|
6237
|
+
useCreatePublicSettingByUserIdMutationOptions,
|
|
6238
|
+
useCreateSettingByUserId,
|
|
6239
|
+
useCreateSettingByUserIdHook,
|
|
6240
|
+
useCreateSettingByUserIdMutationOptions,
|
|
6311
6241
|
useDeleteAppByKey,
|
|
6312
6242
|
useDeleteAppByKeyHook,
|
|
6313
6243
|
useDeleteAppByKeyMutationOptions,
|
|
6314
|
-
useDeleteAppShortNameAndSettingKey,
|
|
6315
|
-
useDeleteAppShortNameAndSettingKeyHook,
|
|
6316
|
-
useDeleteAppShortNameAndSettingKeyMutationOptions,
|
|
6317
6244
|
useDeleteCategoryById,
|
|
6318
6245
|
useDeleteCategoryByIdHook,
|
|
6319
6246
|
useDeleteCategoryByIdMutationOptions,
|
|
6247
|
+
useDeletePrivateSettingById,
|
|
6248
|
+
useDeletePrivateSettingByIdHook,
|
|
6249
|
+
useDeletePrivateSettingByIdMutationOptions,
|
|
6250
|
+
useDeletePublicSettingById,
|
|
6251
|
+
useDeletePublicSettingByIdHook,
|
|
6252
|
+
useDeletePublicSettingByIdMutationOptions,
|
|
6320
6253
|
useDeleteRomaConfiguration,
|
|
6321
6254
|
useDeleteRomaConfigurationHook,
|
|
6322
6255
|
useDeleteRomaConfigurationMutationOptions,
|
|
6323
6256
|
useDeleteServiceByKey,
|
|
6324
6257
|
useDeleteServiceByKeyHook,
|
|
6325
6258
|
useDeleteServiceByKeyMutationOptions,
|
|
6326
|
-
useDeleteSettingByUserAndAppShortNameAndSettingKey,
|
|
6327
|
-
useDeleteSettingByUserAndAppShortNameAndSettingKeyHook,
|
|
6328
|
-
useDeleteSettingByUserAndAppShortNameAndSettingKeyMutationOptions,
|
|
6329
|
-
useDeleteSettingByUserAndSettingKey,
|
|
6330
|
-
useDeleteSettingByUserAndSettingKeyHook,
|
|
6331
|
-
useDeleteSettingByUserAndSettingKeyMutationOptions,
|
|
6332
6259
|
useDownloadRecap,
|
|
6333
6260
|
useGetAllApps,
|
|
6334
6261
|
useGetAllAppsHook,
|
|
@@ -6351,9 +6278,6 @@ export {
|
|
|
6351
6278
|
useGetAppByKey,
|
|
6352
6279
|
useGetAppByKeyHook,
|
|
6353
6280
|
useGetAppByKeyQueryOptions,
|
|
6354
|
-
useGetByAppShortNameAndSettingKey,
|
|
6355
|
-
useGetByAppShortNameAndSettingKeyHook,
|
|
6356
|
-
useGetByAppShortNameAndSettingKeyQueryOptions,
|
|
6357
6281
|
useGetCategoryById,
|
|
6358
6282
|
useGetCategoryByIdHook,
|
|
6359
6283
|
useGetCategoryByIdQueryOptions,
|
|
@@ -6361,6 +6285,9 @@ export {
|
|
|
6361
6285
|
useGetCurrentEnvironmentHook,
|
|
6362
6286
|
useGetCurrentEnvironmentQueryOptions,
|
|
6363
6287
|
useGetDeals,
|
|
6288
|
+
useGetPublicSettingByUserAndId,
|
|
6289
|
+
useGetPublicSettingByUserAndIdHook,
|
|
6290
|
+
useGetPublicSettingByUserAndIdQueryOptions,
|
|
6364
6291
|
useGetRecap,
|
|
6365
6292
|
useGetRomaConfigurationById,
|
|
6366
6293
|
useGetRomaConfigurationByIdHook,
|
|
@@ -6368,21 +6295,24 @@ export {
|
|
|
6368
6295
|
useGetServiceByKey,
|
|
6369
6296
|
useGetServiceByKeyHook,
|
|
6370
6297
|
useGetServiceByKeyQueryOptions,
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
useGetSettingsAppShortName,
|
|
6381
|
-
useGetSettingsAppShortNameHook,
|
|
6382
|
-
useGetSettingsAppShortNameQueryOptions,
|
|
6298
|
+
useGetSettingByUserAndId,
|
|
6299
|
+
useGetSettingByUserAndIdHook,
|
|
6300
|
+
useGetSettingByUserAndIdQueryOptions,
|
|
6301
|
+
useGetSettingsByAppShortName,
|
|
6302
|
+
useGetSettingsByAppShortNameHook,
|
|
6303
|
+
useGetSettingsByAppShortNameQueryOptions,
|
|
6304
|
+
useGetSettingsByUserId,
|
|
6305
|
+
useGetSettingsByUserIdHook,
|
|
6306
|
+
useGetSettingsByUserIdQueryOptions,
|
|
6383
6307
|
useStreamEvents,
|
|
6384
6308
|
useStreamEventsHook,
|
|
6385
6309
|
useStreamEventsQueryOptions,
|
|
6310
|
+
useUpdateByUserIdAndId,
|
|
6311
|
+
useUpdateByUserIdAndIdHook,
|
|
6312
|
+
useUpdateByUserIdAndIdMutationOptions,
|
|
6313
|
+
useUpdatePublicSettingByAppShortNameAndId,
|
|
6314
|
+
useUpdatePublicSettingByAppShortNameAndIdHook,
|
|
6315
|
+
useUpdatePublicSettingByAppShortNameAndIdMutationOptions,
|
|
6386
6316
|
useUpdateRomaConfiguration,
|
|
6387
6317
|
useUpdateRomaConfigurationHook,
|
|
6388
6318
|
useUpdateRomaConfigurationMutationOptions,
|