@djvlc/openapi-admin-client 1.3.0 → 1.5.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.mjs CHANGED
@@ -4,6 +4,34 @@ var __export = (target, all) => {
4
4
  __defProp(target, name, { get: all[name], enumerable: true });
5
5
  };
6
6
 
7
+ // src/index.ts
8
+ import {
9
+ createClient
10
+ } from "@djvlc/openapi-client-core";
11
+
12
+ // src/gen/apis/index.ts
13
+ var apis_exports = {};
14
+ __export(apis_exports, {
15
+ ActivitiesApi: () => ActivitiesApi,
16
+ AuditApi: () => AuditApi,
17
+ ComponentsApi: () => ComponentsApi,
18
+ DefinitionsApi: () => DefinitionsApi,
19
+ ExportAuditLogsFormatEnum: () => ExportAuditLogsFormatEnum,
20
+ GetResourceAuditHistoryResourceTypeEnum: () => GetResourceAuditHistoryResourceTypeEnum,
21
+ ListActionDefinitionsStatusEnum: () => ListActionDefinitionsStatusEnum,
22
+ ListActivitiesActivityTypeEnum: () => ListActivitiesActivityTypeEnum,
23
+ ListActivitiesStatusEnum: () => ListActivitiesStatusEnum,
24
+ ListAuditLogsActionEnum: () => ListAuditLogsActionEnum,
25
+ ListAuditLogsResourceTypeEnum: () => ListAuditLogsResourceTypeEnum,
26
+ ListComponentsCategoryEnum: () => ListComponentsCategoryEnum,
27
+ ListComponentsStatusEnum: () => ListComponentsStatusEnum,
28
+ ListDataQueryDefinitionsSourceTypeEnum: () => ListDataQueryDefinitionsSourceTypeEnum,
29
+ ListDataQueryDefinitionsStatusEnum: () => ListDataQueryDefinitionsStatusEnum,
30
+ ListPagesCanvasTypeEnum: () => ListPagesCanvasTypeEnum,
31
+ ListPagesStatusEnum: () => ListPagesStatusEnum,
32
+ PagesApi: () => PagesApi
33
+ });
34
+
7
35
  // src/gen/runtime.ts
8
36
  var BASE_PATH = "https://admin-api.djvlc.com".replace(/\/+$/, "");
9
37
  var Configuration = class {
@@ -262,29 +290,6 @@ var TextApiResponse = class {
262
290
  }
263
291
  };
264
292
 
265
- // src/gen/apis/index.ts
266
- var apis_exports = {};
267
- __export(apis_exports, {
268
- ActivitiesApi: () => ActivitiesApi,
269
- AuditApi: () => AuditApi,
270
- ComponentsApi: () => ComponentsApi,
271
- DefinitionsApi: () => DefinitionsApi,
272
- ExportAuditLogsFormatEnum: () => ExportAuditLogsFormatEnum,
273
- GetResourceAuditHistoryResourceTypeEnum: () => GetResourceAuditHistoryResourceTypeEnum,
274
- ListActionDefinitionsStatusEnum: () => ListActionDefinitionsStatusEnum,
275
- ListActivitiesActivityTypeEnum: () => ListActivitiesActivityTypeEnum,
276
- ListActivitiesStatusEnum: () => ListActivitiesStatusEnum,
277
- ListAuditLogsActionEnum: () => ListAuditLogsActionEnum,
278
- ListAuditLogsResourceTypeEnum: () => ListAuditLogsResourceTypeEnum,
279
- ListComponentsCategoryEnum: () => ListComponentsCategoryEnum,
280
- ListComponentsStatusEnum: () => ListComponentsStatusEnum,
281
- ListDataQueryDefinitionsSourceTypeEnum: () => ListDataQueryDefinitionsSourceTypeEnum,
282
- ListDataQueryDefinitionsStatusEnum: () => ListDataQueryDefinitionsStatusEnum,
283
- ListPagesCanvasTypeEnum: () => ListPagesCanvasTypeEnum,
284
- ListPagesStatusEnum: () => ListPagesStatusEnum,
285
- PagesApi: () => PagesApi
286
- });
287
-
288
293
  // src/gen/models/ActionDefinitionRateLimit.ts
289
294
  function instanceOfActionDefinitionRateLimit(value) {
290
295
  return true;
@@ -1974,7 +1979,7 @@ function GetActivityStats200ResponseDataDailyStatsInnerToJSONTyped(value, ignore
1974
1979
  return value;
1975
1980
  }
1976
1981
  return {
1977
- "date": value["date"] == null ? value["date"] : value["date"].toISOString().substring(0, 10),
1982
+ "date": value["date"] == null ? void 0 : value["date"].toISOString().substring(0, 10),
1978
1983
  "participants": value["participants"],
1979
1984
  "claims": value["claims"]
1980
1985
  };
@@ -2761,9 +2766,8 @@ var ActivitiesApi = class extends BaseAPI {
2761
2766
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
2762
2767
  }
2763
2768
  }
2764
- let urlPath = `/admin-api/activities`;
2765
2769
  const response = await this.request({
2766
- path: urlPath,
2770
+ path: `/admin-api/activities`,
2767
2771
  method: "POST",
2768
2772
  headers: headerParameters,
2769
2773
  query: queryParameters,
@@ -2797,10 +2801,8 @@ var ActivitiesApi = class extends BaseAPI {
2797
2801
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
2798
2802
  }
2799
2803
  }
2800
- let urlPath = `/admin-api/activities/{id}`;
2801
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));
2802
2804
  const response = await this.request({
2803
- path: urlPath,
2805
+ path: `/admin-api/activities/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
2804
2806
  method: "DELETE",
2805
2807
  headers: headerParameters,
2806
2808
  query: queryParameters
@@ -2832,10 +2834,8 @@ var ActivitiesApi = class extends BaseAPI {
2832
2834
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
2833
2835
  }
2834
2836
  }
2835
- let urlPath = `/admin-api/activities/{id}`;
2836
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));
2837
2837
  const response = await this.request({
2838
- path: urlPath,
2838
+ path: `/admin-api/activities/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
2839
2839
  method: "GET",
2840
2840
  headers: headerParameters,
2841
2841
  query: queryParameters
@@ -2868,10 +2868,8 @@ var ActivitiesApi = class extends BaseAPI {
2868
2868
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
2869
2869
  }
2870
2870
  }
2871
- let urlPath = `/admin-api/activities/{id}/stats`;
2872
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));
2873
2871
  const response = await this.request({
2874
- path: urlPath,
2872
+ path: `/admin-api/activities/{id}/stats`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
2875
2873
  method: "GET",
2876
2874
  headers: headerParameters,
2877
2875
  query: queryParameters
@@ -2913,9 +2911,8 @@ var ActivitiesApi = class extends BaseAPI {
2913
2911
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
2914
2912
  }
2915
2913
  }
2916
- let urlPath = `/admin-api/activities`;
2917
2914
  const response = await this.request({
2918
- path: urlPath,
2915
+ path: `/admin-api/activities`,
2919
2916
  method: "GET",
2920
2917
  headers: headerParameters,
2921
2918
  query: queryParameters
@@ -2948,10 +2945,8 @@ var ActivitiesApi = class extends BaseAPI {
2948
2945
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
2949
2946
  }
2950
2947
  }
2951
- let urlPath = `/admin-api/activities/{id}/pause`;
2952
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));
2953
2948
  const response = await this.request({
2954
- path: urlPath,
2949
+ path: `/admin-api/activities/{id}/pause`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
2955
2950
  method: "POST",
2956
2951
  headers: headerParameters,
2957
2952
  query: queryParameters
@@ -2984,10 +2979,8 @@ var ActivitiesApi = class extends BaseAPI {
2984
2979
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
2985
2980
  }
2986
2981
  }
2987
- let urlPath = `/admin-api/activities/{id}/resume`;
2988
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));
2989
2982
  const response = await this.request({
2990
- path: urlPath,
2983
+ path: `/admin-api/activities/{id}/resume`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
2991
2984
  method: "POST",
2992
2985
  headers: headerParameters,
2993
2986
  query: queryParameters
@@ -3027,10 +3020,8 @@ var ActivitiesApi = class extends BaseAPI {
3027
3020
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3028
3021
  }
3029
3022
  }
3030
- let urlPath = `/admin-api/activities/{id}`;
3031
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));
3032
3023
  const response = await this.request({
3033
- path: urlPath,
3024
+ path: `/admin-api/activities/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
3034
3025
  method: "PUT",
3035
3026
  headers: headerParameters,
3036
3027
  query: queryParameters,
@@ -3100,9 +3091,8 @@ var AuditApi = class extends BaseAPI {
3100
3091
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3101
3092
  }
3102
3093
  }
3103
- let urlPath = `/admin-api/audit/export`;
3104
3094
  const response = await this.request({
3105
- path: urlPath,
3095
+ path: `/admin-api/audit/export`,
3106
3096
  method: "GET",
3107
3097
  headers: headerParameters,
3108
3098
  query: queryParameters
@@ -3139,10 +3129,8 @@ var AuditApi = class extends BaseAPI {
3139
3129
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3140
3130
  }
3141
3131
  }
3142
- let urlPath = `/admin-api/audit/{id}`;
3143
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));
3144
3132
  const response = await this.request({
3145
- path: urlPath,
3133
+ path: `/admin-api/audit/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
3146
3134
  method: "GET",
3147
3135
  headers: headerParameters,
3148
3136
  query: queryParameters
@@ -3187,11 +3175,8 @@ var AuditApi = class extends BaseAPI {
3187
3175
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3188
3176
  }
3189
3177
  }
3190
- let urlPath = `/admin-api/audit/resource/{resourceType}/{resourceId}`;
3191
- urlPath = urlPath.replace(`{${"resourceType"}}`, encodeURIComponent(String(requestParameters["resourceType"])));
3192
- urlPath = urlPath.replace(`{${"resourceId"}}`, encodeURIComponent(String(requestParameters["resourceId"])));
3193
3178
  const response = await this.request({
3194
- path: urlPath,
3179
+ path: `/admin-api/audit/resource/{resourceType}/{resourceId}`.replace(`{${"resourceType"}}`, encodeURIComponent(String(requestParameters["resourceType"]))).replace(`{${"resourceId"}}`, encodeURIComponent(String(requestParameters["resourceId"]))),
3195
3180
  method: "GET",
3196
3181
  headers: headerParameters,
3197
3182
  query: queryParameters
@@ -3242,9 +3227,8 @@ var AuditApi = class extends BaseAPI {
3242
3227
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3243
3228
  }
3244
3229
  }
3245
- let urlPath = `/admin-api/audit`;
3246
3230
  const response = await this.request({
3247
- path: urlPath,
3231
+ path: `/admin-api/audit`,
3248
3232
  method: "GET",
3249
3233
  headers: headerParameters,
3250
3234
  query: queryParameters
@@ -3324,11 +3308,8 @@ var ComponentsApi = class extends BaseAPI {
3324
3308
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3325
3309
  }
3326
3310
  }
3327
- let urlPath = `/admin-api/components/{name}/versions/{version}/block`;
3328
- urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"])));
3329
- urlPath = urlPath.replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"])));
3330
3311
  const response = await this.request({
3331
- path: urlPath,
3312
+ path: `/admin-api/components/{name}/versions/{version}/block`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))),
3332
3313
  method: "POST",
3333
3314
  headers: headerParameters,
3334
3315
  query: queryParameters,
@@ -3363,10 +3344,8 @@ var ComponentsApi = class extends BaseAPI {
3363
3344
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3364
3345
  }
3365
3346
  }
3366
- let urlPath = `/admin-api/components/{name}`;
3367
- urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"])));
3368
3347
  const response = await this.request({
3369
- path: urlPath,
3348
+ path: `/admin-api/components/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))),
3370
3349
  method: "GET",
3371
3350
  headers: headerParameters,
3372
3351
  query: queryParameters
@@ -3405,11 +3384,8 @@ var ComponentsApi = class extends BaseAPI {
3405
3384
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3406
3385
  }
3407
3386
  }
3408
- let urlPath = `/admin-api/components/{name}/versions/{version}`;
3409
- urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"])));
3410
- urlPath = urlPath.replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"])));
3411
3387
  const response = await this.request({
3412
- path: urlPath,
3388
+ path: `/admin-api/components/{name}/versions/{version}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))),
3413
3389
  method: "GET",
3414
3390
  headers: headerParameters,
3415
3391
  query: queryParameters
@@ -3448,10 +3424,8 @@ var ComponentsApi = class extends BaseAPI {
3448
3424
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3449
3425
  }
3450
3426
  }
3451
- let urlPath = `/admin-api/components/{name}/versions`;
3452
- urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"])));
3453
3427
  const response = await this.request({
3454
- path: urlPath,
3428
+ path: `/admin-api/components/{name}/versions`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))),
3455
3429
  method: "GET",
3456
3430
  headers: headerParameters,
3457
3431
  query: queryParameters
@@ -3493,9 +3467,8 @@ var ComponentsApi = class extends BaseAPI {
3493
3467
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3494
3468
  }
3495
3469
  }
3496
- let urlPath = `/admin-api/components`;
3497
3470
  const response = await this.request({
3498
- path: urlPath,
3471
+ path: `/admin-api/components`,
3499
3472
  method: "GET",
3500
3473
  headers: headerParameters,
3501
3474
  query: queryParameters
@@ -3534,11 +3507,8 @@ var ComponentsApi = class extends BaseAPI {
3534
3507
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3535
3508
  }
3536
3509
  }
3537
- let urlPath = `/admin-api/components/{name}/versions/{version}/unblock`;
3538
- urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"])));
3539
- urlPath = urlPath.replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"])));
3540
3510
  const response = await this.request({
3541
- path: urlPath,
3511
+ path: `/admin-api/components/{name}/versions/{version}/unblock`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))),
3542
3512
  method: "POST",
3543
3513
  headers: headerParameters,
3544
3514
  query: queryParameters
@@ -3589,9 +3559,8 @@ var DefinitionsApi = class extends BaseAPI {
3589
3559
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3590
3560
  }
3591
3561
  }
3592
- let urlPath = `/admin-api/definitions/actions`;
3593
3562
  const response = await this.request({
3594
- path: urlPath,
3563
+ path: `/admin-api/definitions/actions`,
3595
3564
  method: "POST",
3596
3565
  headers: headerParameters,
3597
3566
  query: queryParameters,
@@ -3626,9 +3595,8 @@ var DefinitionsApi = class extends BaseAPI {
3626
3595
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3627
3596
  }
3628
3597
  }
3629
- let urlPath = `/admin-api/definitions/queries`;
3630
3598
  const response = await this.request({
3631
- path: urlPath,
3599
+ path: `/admin-api/definitions/queries`,
3632
3600
  method: "POST",
3633
3601
  headers: headerParameters,
3634
3602
  query: queryParameters,
@@ -3662,10 +3630,8 @@ var DefinitionsApi = class extends BaseAPI {
3662
3630
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3663
3631
  }
3664
3632
  }
3665
- let urlPath = `/admin-api/definitions/actions/{id}`;
3666
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));
3667
3633
  const response = await this.request({
3668
- path: urlPath,
3634
+ path: `/admin-api/definitions/actions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
3669
3635
  method: "GET",
3670
3636
  headers: headerParameters,
3671
3637
  query: queryParameters
@@ -3698,10 +3664,8 @@ var DefinitionsApi = class extends BaseAPI {
3698
3664
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3699
3665
  }
3700
3666
  }
3701
- let urlPath = `/admin-api/definitions/queries/{id}`;
3702
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));
3703
3667
  const response = await this.request({
3704
- path: urlPath,
3668
+ path: `/admin-api/definitions/queries/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
3705
3669
  method: "GET",
3706
3670
  headers: headerParameters,
3707
3671
  query: queryParameters
@@ -3740,9 +3704,8 @@ var DefinitionsApi = class extends BaseAPI {
3740
3704
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3741
3705
  }
3742
3706
  }
3743
- let urlPath = `/admin-api/definitions/actions`;
3744
3707
  const response = await this.request({
3745
- path: urlPath,
3708
+ path: `/admin-api/definitions/actions`,
3746
3709
  method: "GET",
3747
3710
  headers: headerParameters,
3748
3711
  query: queryParameters
@@ -3781,9 +3744,8 @@ var DefinitionsApi = class extends BaseAPI {
3781
3744
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3782
3745
  }
3783
3746
  }
3784
- let urlPath = `/admin-api/definitions/queries`;
3785
3747
  const response = await this.request({
3786
- path: urlPath,
3748
+ path: `/admin-api/definitions/queries`,
3787
3749
  method: "GET",
3788
3750
  headers: headerParameters,
3789
3751
  query: queryParameters
@@ -3823,10 +3785,8 @@ var DefinitionsApi = class extends BaseAPI {
3823
3785
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3824
3786
  }
3825
3787
  }
3826
- let urlPath = `/admin-api/definitions/actions/{id}`;
3827
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));
3828
3788
  const response = await this.request({
3829
- path: urlPath,
3789
+ path: `/admin-api/definitions/actions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
3830
3790
  method: "PUT",
3831
3791
  headers: headerParameters,
3832
3792
  query: queryParameters,
@@ -3867,10 +3827,8 @@ var DefinitionsApi = class extends BaseAPI {
3867
3827
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3868
3828
  }
3869
3829
  }
3870
- let urlPath = `/admin-api/definitions/queries/{id}`;
3871
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));
3872
3830
  const response = await this.request({
3873
- path: urlPath,
3831
+ path: `/admin-api/definitions/queries/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
3874
3832
  method: "PUT",
3875
3833
  headers: headerParameters,
3876
3834
  query: queryParameters,
@@ -3925,10 +3883,8 @@ var PagesApi = class extends BaseAPI {
3925
3883
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3926
3884
  }
3927
3885
  }
3928
- let urlPath = `/admin-api/lowcode/pages/{uid}/archive`;
3929
- urlPath = urlPath.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"])));
3930
3886
  const response = await this.request({
3931
- path: urlPath,
3887
+ path: `/admin-api/lowcode/pages/{uid}/archive`.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"]))),
3932
3888
  method: "POST",
3933
3889
  headers: headerParameters,
3934
3890
  query: queryParameters
@@ -3964,9 +3920,8 @@ var PagesApi = class extends BaseAPI {
3964
3920
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
3965
3921
  }
3966
3922
  }
3967
- let urlPath = `/admin-api/lowcode/pages`;
3968
3923
  const response = await this.request({
3969
- path: urlPath,
3924
+ path: `/admin-api/lowcode/pages`,
3970
3925
  method: "POST",
3971
3926
  headers: headerParameters,
3972
3927
  query: queryParameters,
@@ -4009,10 +3964,8 @@ var PagesApi = class extends BaseAPI {
4009
3964
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
4010
3965
  }
4011
3966
  }
4012
- let urlPath = `/admin-api/lowcode/pages/{uid}/version`;
4013
- urlPath = urlPath.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"])));
4014
3967
  const response = await this.request({
4015
- path: urlPath,
3968
+ path: `/admin-api/lowcode/pages/{uid}/version`.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"]))),
4016
3969
  method: "POST",
4017
3970
  headers: headerParameters,
4018
3971
  query: queryParameters,
@@ -4048,10 +4001,8 @@ var PagesApi = class extends BaseAPI {
4048
4001
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
4049
4002
  }
4050
4003
  }
4051
- let urlPath = `/admin-api/lowcode/pages/{uid}/delete`;
4052
- urlPath = urlPath.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"])));
4053
4004
  const response = await this.request({
4054
- path: urlPath,
4005
+ path: `/admin-api/lowcode/pages/{uid}/delete`.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"]))),
4055
4006
  method: "POST",
4056
4007
  headers: headerParameters,
4057
4008
  query: queryParameters
@@ -4087,10 +4038,8 @@ var PagesApi = class extends BaseAPI {
4087
4038
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
4088
4039
  }
4089
4040
  }
4090
- let urlPath = `/admin-api/lowcode/pages/{uid}/duplicate`;
4091
- urlPath = urlPath.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"])));
4092
4041
  const response = await this.request({
4093
- path: urlPath,
4042
+ path: `/admin-api/lowcode/pages/{uid}/duplicate`.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"]))),
4094
4043
  method: "POST",
4095
4044
  headers: headerParameters,
4096
4045
  query: queryParameters,
@@ -4126,10 +4075,8 @@ var PagesApi = class extends BaseAPI {
4126
4075
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
4127
4076
  }
4128
4077
  }
4129
- let urlPath = `/admin-api/lowcode/pages/{uid}`;
4130
- urlPath = urlPath.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"])));
4131
4078
  const response = await this.request({
4132
- path: urlPath,
4079
+ path: `/admin-api/lowcode/pages/{uid}`.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"]))),
4133
4080
  method: "GET",
4134
4081
  headers: headerParameters,
4135
4082
  query: queryParameters
@@ -4170,10 +4117,8 @@ var PagesApi = class extends BaseAPI {
4170
4117
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
4171
4118
  }
4172
4119
  }
4173
- let urlPath = `/admin-api/lowcode/pages/{pageUid}/versions`;
4174
- urlPath = urlPath.replace(`{${"pageUid"}}`, encodeURIComponent(String(requestParameters["pageUid"])));
4175
4120
  const response = await this.request({
4176
- path: urlPath,
4121
+ path: `/admin-api/lowcode/pages/{pageUid}/versions`.replace(`{${"pageUid"}}`, encodeURIComponent(String(requestParameters["pageUid"]))),
4177
4122
  method: "GET",
4178
4123
  headers: headerParameters,
4179
4124
  query: queryParameters
@@ -4217,9 +4162,8 @@ var PagesApi = class extends BaseAPI {
4217
4162
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
4218
4163
  }
4219
4164
  }
4220
- let urlPath = `/admin-api/lowcode/pages`;
4221
4165
  const response = await this.request({
4222
- path: urlPath,
4166
+ path: `/admin-api/lowcode/pages`,
4223
4167
  method: "GET",
4224
4168
  headers: headerParameters,
4225
4169
  query: queryParameters
@@ -4261,10 +4205,8 @@ var PagesApi = class extends BaseAPI {
4261
4205
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
4262
4206
  }
4263
4207
  }
4264
- let urlPath = `/admin-api/lowcode/pages/{uid}/publish`;
4265
- urlPath = urlPath.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"])));
4266
4208
  const response = await this.request({
4267
- path: urlPath,
4209
+ path: `/admin-api/lowcode/pages/{uid}/publish`.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"]))),
4268
4210
  method: "POST",
4269
4211
  headers: headerParameters,
4270
4212
  query: queryParameters,
@@ -4300,10 +4242,8 @@ var PagesApi = class extends BaseAPI {
4300
4242
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
4301
4243
  }
4302
4244
  }
4303
- let urlPath = `/admin-api/lowcode/pages/{uid}/restore`;
4304
- urlPath = urlPath.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"])));
4305
4245
  const response = await this.request({
4306
- path: urlPath,
4246
+ path: `/admin-api/lowcode/pages/{uid}/restore`.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"]))),
4307
4247
  method: "POST",
4308
4248
  headers: headerParameters,
4309
4249
  query: queryParameters
@@ -4345,10 +4285,8 @@ var PagesApi = class extends BaseAPI {
4345
4285
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
4346
4286
  }
4347
4287
  }
4348
- let urlPath = `/admin-api/lowcode/pages/{uid}/version/rollback`;
4349
- urlPath = urlPath.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"])));
4350
4288
  const response = await this.request({
4351
- path: urlPath,
4289
+ path: `/admin-api/lowcode/pages/{uid}/version/rollback`.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"]))),
4352
4290
  method: "POST",
4353
4291
  headers: headerParameters,
4354
4292
  query: queryParameters,
@@ -4391,10 +4329,8 @@ var PagesApi = class extends BaseAPI {
4391
4329
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
4392
4330
  }
4393
4331
  }
4394
- let urlPath = `/admin-api/lowcode/pages/{uid}/schema`;
4395
- urlPath = urlPath.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"])));
4396
4332
  const response = await this.request({
4397
- path: urlPath,
4333
+ path: `/admin-api/lowcode/pages/{uid}/schema`.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"]))),
4398
4334
  method: "POST",
4399
4335
  headers: headerParameters,
4400
4336
  query: queryParameters,
@@ -4430,10 +4366,8 @@ var PagesApi = class extends BaseAPI {
4430
4366
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
4431
4367
  }
4432
4368
  }
4433
- let urlPath = `/admin-api/lowcode/pages/{uid}/unpublish`;
4434
- urlPath = urlPath.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"])));
4435
4369
  const response = await this.request({
4436
- path: urlPath,
4370
+ path: `/admin-api/lowcode/pages/{uid}/unpublish`.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"]))),
4437
4371
  method: "POST",
4438
4372
  headers: headerParameters,
4439
4373
  query: queryParameters
@@ -4475,10 +4409,8 @@ var PagesApi = class extends BaseAPI {
4475
4409
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
4476
4410
  }
4477
4411
  }
4478
- let urlPath = `/admin-api/lowcode/pages/{uid}`;
4479
- urlPath = urlPath.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"])));
4480
4412
  const response = await this.request({
4481
- path: urlPath,
4413
+ path: `/admin-api/lowcode/pages/{uid}`.replace(`{${"uid"}}`, encodeURIComponent(String(requestParameters["uid"]))),
4482
4414
  method: "POST",
4483
4415
  headers: headerParameters,
4484
4416
  query: queryParameters,
@@ -4507,63 +4439,34 @@ var ListPagesCanvasTypeEnum = {
4507
4439
  };
4508
4440
 
4509
4441
  // src/index.ts
4510
- function stripTrailingSlash(url) {
4511
- return url.replace(/\/$/, "");
4512
- }
4513
- function createFetchWithTimeout(fetchImpl, timeoutMs) {
4514
- return (async (input, init) => {
4515
- const controller = new AbortController();
4516
- const id = setTimeout(() => controller.abort(), timeoutMs);
4517
- try {
4518
- return await fetchImpl(input, { ...init, signal: controller.signal });
4519
- } finally {
4520
- clearTimeout(id);
4521
- }
4522
- });
4523
- }
4524
- function normalizeHeaders(initHeaders) {
4525
- return new Headers(initHeaders ?? {});
4526
- }
4442
+ import {
4443
+ DjvApiError,
4444
+ NetworkError,
4445
+ TimeoutError,
4446
+ AbortError,
4447
+ isRetryableError,
4448
+ Configuration as Configuration3,
4449
+ createConsoleLogger,
4450
+ createSilentLogger
4451
+ } from "@djvlc/openapi-client-core";
4452
+ var SDK_INFO = {
4453
+ name: true ? "@djvlc/openapi-admin-client" : "@djvlc/openapi-admin-client",
4454
+ version: true ? "1.0.0" : "0.0.0-dev"
4455
+ };
4527
4456
  function createAdminClient(opts) {
4528
- const timeoutMs = opts.timeoutMs ?? 3e4;
4529
- const fetchImpl = opts.fetchApi ?? fetch;
4530
- const fetchWithTimeout = createFetchWithTimeout(fetchImpl, timeoutMs);
4531
- const headersMiddleware = {
4532
- async pre(context) {
4533
- const headers = normalizeHeaders(context.init.headers);
4534
- if (opts.defaultHeaders) {
4535
- for (const [k, v] of Object.entries(opts.defaultHeaders)) headers.set(k, v);
4536
- }
4537
- if (opts.getAuthToken) {
4538
- const token = await opts.getAuthToken();
4539
- if (token) headers.set("Authorization", `Bearer ${token}`);
4540
- }
4541
- if (opts.getTraceHeaders) {
4542
- const traceHeaders = opts.getTraceHeaders();
4543
- for (const [k, v] of Object.entries(traceHeaders)) headers.set(k, v);
4544
- }
4545
- return { url: context.url, init: { ...context.init, headers } };
4546
- }
4457
+ const defaultOpts = {
4458
+ timeoutMs: 3e4,
4459
+ credentials: "include"
4460
+ // 管理端常用 Cookie
4547
4461
  };
4548
- const config = new Configuration({
4549
- basePath: stripTrailingSlash(opts.baseUrl),
4550
- fetchApi: fetchWithTimeout,
4551
- middleware: [headersMiddleware],
4552
- credentials: opts.credentials ?? "include"
4553
- });
4554
- const apiInstances = {};
4555
- for (const [name, ApiClass] of Object.entries(apis_exports)) {
4556
- if (typeof ApiClass === "function" && name.endsWith("Api")) {
4557
- apiInstances[name] = new ApiClass(config);
4558
- }
4559
- }
4560
- return {
4561
- config,
4562
- apis: apiInstances,
4563
- ...apiInstances
4462
+ const mergedOpts = {
4463
+ ...defaultOpts,
4464
+ ...opts
4564
4465
  };
4466
+ return createClient(apis_exports, mergedOpts, SDK_INFO);
4565
4467
  }
4566
4468
  export {
4469
+ AbortError,
4567
4470
  ActionDefinitionFromJSON,
4568
4471
  ActionDefinitionFromJSONTyped,
4569
4472
  ActionDefinitionListResponseFromJSON,
@@ -4647,7 +4550,7 @@ export {
4647
4550
  ComponentResponseToJSON,
4648
4551
  ComponentResponseToJSONTyped,
4649
4552
  ComponentsApi,
4650
- Configuration,
4553
+ Configuration3 as Configuration,
4651
4554
  CreateActionDefinition201ResponseFromJSON,
4652
4555
  CreateActionDefinition201ResponseFromJSONTyped,
4653
4556
  CreateActionDefinition201ResponseToJSON,
@@ -4712,6 +4615,7 @@ export {
4712
4615
  DataQueryDefinitionToJSON,
4713
4616
  DataQueryDefinitionToJSONTyped,
4714
4617
  DefinitionsApi,
4618
+ DjvApiError,
4715
4619
  DuplicatePageRequestFromJSON,
4716
4620
  DuplicatePageRequestFromJSONTyped,
4717
4621
  DuplicatePageRequestToJSON,
@@ -4765,6 +4669,7 @@ export {
4765
4669
  ListPages200ResponseToJSONTyped,
4766
4670
  ListPagesCanvasTypeEnum,
4767
4671
  ListPagesStatusEnum,
4672
+ NetworkError,
4768
4673
  PageDetailVoCanvasTypeEnum,
4769
4674
  PageDetailVoFromJSON,
4770
4675
  PageDetailVoFromJSONTyped,
@@ -4829,6 +4734,7 @@ export {
4829
4734
  SuccessVoFromJSONTyped,
4830
4735
  SuccessVoToJSON,
4831
4736
  SuccessVoToJSONTyped,
4737
+ TimeoutError,
4832
4738
  TraceContextFromJSON,
4833
4739
  TraceContextFromJSONTyped,
4834
4740
  TraceContextToJSON,
@@ -4851,6 +4757,8 @@ export {
4851
4757
  VersionListVoToJSON,
4852
4758
  VersionListVoToJSONTyped,
4853
4759
  createAdminClient,
4760
+ createConsoleLogger,
4761
+ createSilentLogger,
4854
4762
  instanceOfActionDefinition,
4855
4763
  instanceOfActionDefinitionListResponse,
4856
4764
  instanceOfActionDefinitionRateLimit,
@@ -4911,5 +4819,6 @@ export {
4911
4819
  instanceOfUpdateActivityRequest,
4912
4820
  instanceOfUpdatePageDto,
4913
4821
  instanceOfVersionInfoVo,
4914
- instanceOfVersionListVo
4822
+ instanceOfVersionListVo,
4823
+ isRetryableError
4915
4824
  };