@dazl/api-client 1.0.2 → 1.0.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/dist/db/generated-types.d.ts +9 -0
- package/dist/db/generated-types.d.ts.map +1 -1
- package/dist/internal/index.d.ts +1 -1
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/sdk.gen.d.ts +12 -2
- package/dist/internal/sdk.gen.d.ts.map +1 -1
- package/dist/internal/sdk.gen.js +35 -3
- package/dist/internal/sdk.gen.js.map +1 -1
- package/dist/internal/types.gen.d.ts +280 -56
- package/dist/internal/types.gen.d.ts.map +1 -1
- package/dist/public/index.d.ts +2 -2
- package/dist/public/index.d.ts.map +1 -1
- package/dist/public/index.js +1 -1
- package/dist/public/index.js.map +1 -1
- package/dist/public/sdk.gen.d.ts +9 -1
- package/dist/public/sdk.gen.d.ts.map +1 -1
- package/dist/public/sdk.gen.js +31 -0
- package/dist/public/sdk.gen.js.map +1 -1
- package/dist/public/types.gen.d.ts +227 -0
- package/dist/public/types.gen.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/db/generated-types.ts +10 -0
- package/src/internal/index.ts +1 -1
- package/src/internal/sdk.gen.ts +41 -5
- package/src/internal/types.gen.ts +306 -62
- package/src/public/index.ts +2 -2
- package/src/public/sdk.gen.ts +36 -1
- package/src/public/types.gen.ts +249 -0
|
@@ -451,12 +451,6 @@ export type UpdateCreditsInput = {
|
|
|
451
451
|
targetDazlUserId: string;
|
|
452
452
|
};
|
|
453
453
|
|
|
454
|
-
export type FeatureToggle = {
|
|
455
|
-
name: string;
|
|
456
|
-
scope: 'RemoteAndEditor' | 'SiteAndEditor';
|
|
457
|
-
updatedAt: string;
|
|
458
|
-
};
|
|
459
|
-
|
|
460
454
|
export type PurgeUserAccountInput = {
|
|
461
455
|
/**
|
|
462
456
|
* dazlId of the admin user performing the purge, for audit purposes
|
|
@@ -497,6 +491,12 @@ export type EditReplyInput = {
|
|
|
497
491
|
mentions?: Array<UserMention>;
|
|
498
492
|
};
|
|
499
493
|
|
|
494
|
+
export type FeatureToggle = {
|
|
495
|
+
name: string;
|
|
496
|
+
scope: 'RemoteAndEditor' | 'SiteAndEditor';
|
|
497
|
+
updatedAt: string;
|
|
498
|
+
};
|
|
499
|
+
|
|
500
500
|
export type EnsureMyUserData = {
|
|
501
501
|
body?: {
|
|
502
502
|
name?: string;
|
|
@@ -2479,6 +2479,133 @@ export type UpdateProjectResponses = {
|
|
|
2479
2479
|
|
|
2480
2480
|
export type UpdateProjectResponse = UpdateProjectResponses[keyof UpdateProjectResponses];
|
|
2481
2481
|
|
|
2482
|
+
export type MarkProjectAsInitializedData = {
|
|
2483
|
+
body: {
|
|
2484
|
+
/**
|
|
2485
|
+
* The dazl ID of the requesting user, used for permission checks
|
|
2486
|
+
*/
|
|
2487
|
+
ownerDazlId: string;
|
|
2488
|
+
};
|
|
2489
|
+
path: {
|
|
2490
|
+
projectId: string;
|
|
2491
|
+
};
|
|
2492
|
+
query?: never;
|
|
2493
|
+
url: '/project/{projectId}/project-init-data';
|
|
2494
|
+
};
|
|
2495
|
+
|
|
2496
|
+
export type MarkProjectAsInitializedErrors = {
|
|
2497
|
+
/**
|
|
2498
|
+
* Bad request - Invalid parameters or malformed JSON
|
|
2499
|
+
*/
|
|
2500
|
+
400: {
|
|
2501
|
+
message: string;
|
|
2502
|
+
issues?: string;
|
|
2503
|
+
};
|
|
2504
|
+
/**
|
|
2505
|
+
* Unauthorized
|
|
2506
|
+
*/
|
|
2507
|
+
401: ErrorResponse;
|
|
2508
|
+
/**
|
|
2509
|
+
* Forbidden
|
|
2510
|
+
*/
|
|
2511
|
+
403: ErrorResponse;
|
|
2512
|
+
/**
|
|
2513
|
+
* Not Found
|
|
2514
|
+
*/
|
|
2515
|
+
404: ErrorResponse;
|
|
2516
|
+
/**
|
|
2517
|
+
* Conflict
|
|
2518
|
+
*/
|
|
2519
|
+
409: ErrorResponse;
|
|
2520
|
+
/**
|
|
2521
|
+
* Internal server error
|
|
2522
|
+
*/
|
|
2523
|
+
500: ErrorResponse;
|
|
2524
|
+
/**
|
|
2525
|
+
* Service Unavailable
|
|
2526
|
+
*/
|
|
2527
|
+
503: ErrorResponse;
|
|
2528
|
+
};
|
|
2529
|
+
|
|
2530
|
+
export type MarkProjectAsInitializedError = MarkProjectAsInitializedErrors[keyof MarkProjectAsInitializedErrors];
|
|
2531
|
+
|
|
2532
|
+
export type MarkProjectAsInitializedResponses = {
|
|
2533
|
+
/**
|
|
2534
|
+
* Returns the project ID and confirmation that the project was marked as initialized
|
|
2535
|
+
*/
|
|
2536
|
+
200: {
|
|
2537
|
+
projectId: string;
|
|
2538
|
+
};
|
|
2539
|
+
};
|
|
2540
|
+
|
|
2541
|
+
export type MarkProjectAsInitializedResponse = MarkProjectAsInitializedResponses[keyof MarkProjectAsInitializedResponses];
|
|
2542
|
+
|
|
2543
|
+
export type GetProjectInitDataData = {
|
|
2544
|
+
body?: never;
|
|
2545
|
+
path: {
|
|
2546
|
+
projectId: string;
|
|
2547
|
+
};
|
|
2548
|
+
query: {
|
|
2549
|
+
/**
|
|
2550
|
+
* The dazl ID of the requesting user, used for permission checks
|
|
2551
|
+
*/
|
|
2552
|
+
ownerDazlId: string;
|
|
2553
|
+
};
|
|
2554
|
+
url: '/project/{projectId}/project-init-data';
|
|
2555
|
+
};
|
|
2556
|
+
|
|
2557
|
+
export type GetProjectInitDataErrors = {
|
|
2558
|
+
/**
|
|
2559
|
+
* Bad request - Invalid parameters or malformed JSON
|
|
2560
|
+
*/
|
|
2561
|
+
400: {
|
|
2562
|
+
message: string;
|
|
2563
|
+
issues?: string;
|
|
2564
|
+
};
|
|
2565
|
+
/**
|
|
2566
|
+
* Unauthorized
|
|
2567
|
+
*/
|
|
2568
|
+
401: ErrorResponse;
|
|
2569
|
+
/**
|
|
2570
|
+
* Forbidden
|
|
2571
|
+
*/
|
|
2572
|
+
403: ErrorResponse;
|
|
2573
|
+
/**
|
|
2574
|
+
* Not Found
|
|
2575
|
+
*/
|
|
2576
|
+
404: ErrorResponse;
|
|
2577
|
+
/**
|
|
2578
|
+
* Conflict
|
|
2579
|
+
*/
|
|
2580
|
+
409: ErrorResponse;
|
|
2581
|
+
/**
|
|
2582
|
+
* Internal server error
|
|
2583
|
+
*/
|
|
2584
|
+
500: ErrorResponse;
|
|
2585
|
+
/**
|
|
2586
|
+
* Service Unavailable
|
|
2587
|
+
*/
|
|
2588
|
+
503: ErrorResponse;
|
|
2589
|
+
};
|
|
2590
|
+
|
|
2591
|
+
export type GetProjectInitDataError = GetProjectInitDataErrors[keyof GetProjectInitDataErrors];
|
|
2592
|
+
|
|
2593
|
+
export type GetProjectInitDataResponses = {
|
|
2594
|
+
/**
|
|
2595
|
+
* Returns the project initialization data
|
|
2596
|
+
*/
|
|
2597
|
+
200: {
|
|
2598
|
+
projectId: string;
|
|
2599
|
+
gitRepoURL: string;
|
|
2600
|
+
gitBranchToClone: string | null;
|
|
2601
|
+
gitBranchToCreate: string | null;
|
|
2602
|
+
createdAt: string;
|
|
2603
|
+
updatedAt: string;
|
|
2604
|
+
};
|
|
2605
|
+
};
|
|
2606
|
+
|
|
2607
|
+
export type GetProjectInitDataResponse = GetProjectInitDataResponses[keyof GetProjectInitDataResponses];
|
|
2608
|
+
|
|
2482
2609
|
export type CreateProjectData = {
|
|
2483
2610
|
body: {
|
|
2484
2611
|
name: string;
|
|
@@ -2486,6 +2613,11 @@ export type CreateProjectData = {
|
|
|
2486
2613
|
latestScreenshot?: string | null;
|
|
2487
2614
|
originTemplateId?: string | null;
|
|
2488
2615
|
createdAt?: string;
|
|
2616
|
+
projectInitData?: {
|
|
2617
|
+
gitRepoURL: string;
|
|
2618
|
+
gitBranchToClone?: string | null;
|
|
2619
|
+
gitBranchToCreate?: string | null;
|
|
2620
|
+
};
|
|
2489
2621
|
};
|
|
2490
2622
|
path?: never;
|
|
2491
2623
|
query?: never;
|
|
@@ -5501,62 +5633,6 @@ export type AdminLogActionResponses = {
|
|
|
5501
5633
|
|
|
5502
5634
|
export type AdminLogActionResponse = AdminLogActionResponses[keyof AdminLogActionResponses];
|
|
5503
5635
|
|
|
5504
|
-
export type GetFeatureTogglesData = {
|
|
5505
|
-
body?: never;
|
|
5506
|
-
path?: never;
|
|
5507
|
-
query?: {
|
|
5508
|
-
scope?: 'RemoteAndEditor' | 'SiteAndEditor';
|
|
5509
|
-
};
|
|
5510
|
-
url: '/env-config';
|
|
5511
|
-
};
|
|
5512
|
-
|
|
5513
|
-
export type GetFeatureTogglesErrors = {
|
|
5514
|
-
/**
|
|
5515
|
-
* Bad request - Invalid parameters or malformed JSON
|
|
5516
|
-
*/
|
|
5517
|
-
400: {
|
|
5518
|
-
message: string;
|
|
5519
|
-
issues?: string;
|
|
5520
|
-
};
|
|
5521
|
-
/**
|
|
5522
|
-
* Unauthorized
|
|
5523
|
-
*/
|
|
5524
|
-
401: ErrorResponse;
|
|
5525
|
-
/**
|
|
5526
|
-
* Forbidden
|
|
5527
|
-
*/
|
|
5528
|
-
403: ErrorResponse;
|
|
5529
|
-
/**
|
|
5530
|
-
* Not Found
|
|
5531
|
-
*/
|
|
5532
|
-
404: ErrorResponse;
|
|
5533
|
-
/**
|
|
5534
|
-
* Conflict
|
|
5535
|
-
*/
|
|
5536
|
-
409: ErrorResponse;
|
|
5537
|
-
/**
|
|
5538
|
-
* Internal server error
|
|
5539
|
-
*/
|
|
5540
|
-
500: ErrorResponse;
|
|
5541
|
-
/**
|
|
5542
|
-
* Service Unavailable
|
|
5543
|
-
*/
|
|
5544
|
-
503: ErrorResponse;
|
|
5545
|
-
};
|
|
5546
|
-
|
|
5547
|
-
export type GetFeatureTogglesError = GetFeatureTogglesErrors[keyof GetFeatureTogglesErrors];
|
|
5548
|
-
|
|
5549
|
-
export type GetFeatureTogglesResponses = {
|
|
5550
|
-
/**
|
|
5551
|
-
* Returns feature toggles, optionally filtered by scope
|
|
5552
|
-
*/
|
|
5553
|
-
200: {
|
|
5554
|
-
toggles: Array<FeatureToggle>;
|
|
5555
|
-
};
|
|
5556
|
-
};
|
|
5557
|
-
|
|
5558
|
-
export type GetFeatureTogglesResponse = GetFeatureTogglesResponses[keyof GetFeatureTogglesResponses];
|
|
5559
|
-
|
|
5560
5636
|
export type OpenFeatureToggleData = {
|
|
5561
5637
|
body: {
|
|
5562
5638
|
name: string;
|
|
@@ -6947,3 +7023,171 @@ export type EditReplyResponses = {
|
|
|
6947
7023
|
};
|
|
6948
7024
|
|
|
6949
7025
|
export type EditReplyResponse = EditReplyResponses[keyof EditReplyResponses];
|
|
7026
|
+
|
|
7027
|
+
export type GetMyUserData = {
|
|
7028
|
+
body?: never;
|
|
7029
|
+
path?: never;
|
|
7030
|
+
query?: never;
|
|
7031
|
+
url: '/user/me';
|
|
7032
|
+
};
|
|
7033
|
+
|
|
7034
|
+
export type GetMyUserErrors = {
|
|
7035
|
+
/**
|
|
7036
|
+
* Bad request - Invalid parameters or malformed JSON
|
|
7037
|
+
*/
|
|
7038
|
+
400: {
|
|
7039
|
+
message: string;
|
|
7040
|
+
issues?: string;
|
|
7041
|
+
};
|
|
7042
|
+
/**
|
|
7043
|
+
* Unauthorized
|
|
7044
|
+
*/
|
|
7045
|
+
401: ErrorResponse;
|
|
7046
|
+
/**
|
|
7047
|
+
* Forbidden
|
|
7048
|
+
*/
|
|
7049
|
+
403: ErrorResponse;
|
|
7050
|
+
/**
|
|
7051
|
+
* Not Found
|
|
7052
|
+
*/
|
|
7053
|
+
404: ErrorResponse;
|
|
7054
|
+
/**
|
|
7055
|
+
* Conflict
|
|
7056
|
+
*/
|
|
7057
|
+
409: ErrorResponse;
|
|
7058
|
+
/**
|
|
7059
|
+
* Internal server error
|
|
7060
|
+
*/
|
|
7061
|
+
500: ErrorResponse;
|
|
7062
|
+
/**
|
|
7063
|
+
* Service Unavailable
|
|
7064
|
+
*/
|
|
7065
|
+
503: ErrorResponse;
|
|
7066
|
+
};
|
|
7067
|
+
|
|
7068
|
+
export type GetMyUserError = GetMyUserErrors[keyof GetMyUserErrors];
|
|
7069
|
+
|
|
7070
|
+
export type GetMyUserResponses = {
|
|
7071
|
+
/**
|
|
7072
|
+
* Returns the requested user
|
|
7073
|
+
*/
|
|
7074
|
+
200: {
|
|
7075
|
+
user: UserRaw;
|
|
7076
|
+
};
|
|
7077
|
+
};
|
|
7078
|
+
|
|
7079
|
+
export type GetMyUserResponse = GetMyUserResponses[keyof GetMyUserResponses];
|
|
7080
|
+
|
|
7081
|
+
export type UpdateMyUserData = {
|
|
7082
|
+
body: {
|
|
7083
|
+
picture?: string | null;
|
|
7084
|
+
name?: string;
|
|
7085
|
+
jobRole?: string | null;
|
|
7086
|
+
};
|
|
7087
|
+
path?: never;
|
|
7088
|
+
query?: never;
|
|
7089
|
+
url: '/user/me';
|
|
7090
|
+
};
|
|
7091
|
+
|
|
7092
|
+
export type UpdateMyUserErrors = {
|
|
7093
|
+
/**
|
|
7094
|
+
* Bad request - Invalid parameters or malformed JSON
|
|
7095
|
+
*/
|
|
7096
|
+
400: {
|
|
7097
|
+
message: string;
|
|
7098
|
+
issues?: string;
|
|
7099
|
+
};
|
|
7100
|
+
/**
|
|
7101
|
+
* Unauthorized
|
|
7102
|
+
*/
|
|
7103
|
+
401: ErrorResponse;
|
|
7104
|
+
/**
|
|
7105
|
+
* Forbidden
|
|
7106
|
+
*/
|
|
7107
|
+
403: ErrorResponse;
|
|
7108
|
+
/**
|
|
7109
|
+
* Not Found
|
|
7110
|
+
*/
|
|
7111
|
+
404: ErrorResponse;
|
|
7112
|
+
/**
|
|
7113
|
+
* Conflict
|
|
7114
|
+
*/
|
|
7115
|
+
409: ErrorResponse;
|
|
7116
|
+
/**
|
|
7117
|
+
* Internal server error
|
|
7118
|
+
*/
|
|
7119
|
+
500: ErrorResponse;
|
|
7120
|
+
/**
|
|
7121
|
+
* Service Unavailable
|
|
7122
|
+
*/
|
|
7123
|
+
503: ErrorResponse;
|
|
7124
|
+
};
|
|
7125
|
+
|
|
7126
|
+
export type UpdateMyUserError = UpdateMyUserErrors[keyof UpdateMyUserErrors];
|
|
7127
|
+
|
|
7128
|
+
export type UpdateMyUserResponses = {
|
|
7129
|
+
/**
|
|
7130
|
+
* Updates user information
|
|
7131
|
+
*/
|
|
7132
|
+
200: {
|
|
7133
|
+
user: UserRaw;
|
|
7134
|
+
};
|
|
7135
|
+
};
|
|
7136
|
+
|
|
7137
|
+
export type UpdateMyUserResponse = UpdateMyUserResponses[keyof UpdateMyUserResponses];
|
|
7138
|
+
|
|
7139
|
+
export type GetFeatureTogglesData = {
|
|
7140
|
+
body?: never;
|
|
7141
|
+
path?: never;
|
|
7142
|
+
query?: {
|
|
7143
|
+
scope?: 'RemoteAndEditor' | 'SiteAndEditor';
|
|
7144
|
+
};
|
|
7145
|
+
url: '/env-config';
|
|
7146
|
+
};
|
|
7147
|
+
|
|
7148
|
+
export type GetFeatureTogglesErrors = {
|
|
7149
|
+
/**
|
|
7150
|
+
* Bad request - Invalid parameters or malformed JSON
|
|
7151
|
+
*/
|
|
7152
|
+
400: {
|
|
7153
|
+
message: string;
|
|
7154
|
+
issues?: string;
|
|
7155
|
+
};
|
|
7156
|
+
/**
|
|
7157
|
+
* Unauthorized
|
|
7158
|
+
*/
|
|
7159
|
+
401: ErrorResponse;
|
|
7160
|
+
/**
|
|
7161
|
+
* Forbidden
|
|
7162
|
+
*/
|
|
7163
|
+
403: ErrorResponse;
|
|
7164
|
+
/**
|
|
7165
|
+
* Not Found
|
|
7166
|
+
*/
|
|
7167
|
+
404: ErrorResponse;
|
|
7168
|
+
/**
|
|
7169
|
+
* Conflict
|
|
7170
|
+
*/
|
|
7171
|
+
409: ErrorResponse;
|
|
7172
|
+
/**
|
|
7173
|
+
* Internal server error
|
|
7174
|
+
*/
|
|
7175
|
+
500: ErrorResponse;
|
|
7176
|
+
/**
|
|
7177
|
+
* Service Unavailable
|
|
7178
|
+
*/
|
|
7179
|
+
503: ErrorResponse;
|
|
7180
|
+
};
|
|
7181
|
+
|
|
7182
|
+
export type GetFeatureTogglesError = GetFeatureTogglesErrors[keyof GetFeatureTogglesErrors];
|
|
7183
|
+
|
|
7184
|
+
export type GetFeatureTogglesResponses = {
|
|
7185
|
+
/**
|
|
7186
|
+
* Returns feature toggles, optionally filtered by scope
|
|
7187
|
+
*/
|
|
7188
|
+
200: {
|
|
7189
|
+
toggles: Array<FeatureToggle>;
|
|
7190
|
+
};
|
|
7191
|
+
};
|
|
7192
|
+
|
|
7193
|
+
export type GetFeatureTogglesResponse = GetFeatureTogglesResponses[keyof GetFeatureTogglesResponses];
|
package/src/public/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
|
-
export { type Options, Ping } from './sdk.gen.ts';
|
|
4
|
-
export type { ClientOptions, ErrorResponse, GetPingData, GetPingError, GetPingErrors, GetPingResponse, GetPingResponses } from './types.gen.ts';
|
|
3
|
+
export { EnvConfig, type Options, Ping, User } from './sdk.gen.ts';
|
|
4
|
+
export type { ClientOptions, EnsureMyUserData, EnsureMyUserError, EnsureMyUserErrors, EnsureMyUserResponse, EnsureMyUserResponses, ErrorResponse, FeatureToggle, GetFeatureTogglesData, GetFeatureTogglesError, GetFeatureTogglesErrors, GetFeatureTogglesResponse, GetFeatureTogglesResponses, GetMyUserData, GetMyUserError, GetMyUserErrors, GetMyUserResponse, GetMyUserResponses, GetPingData, GetPingError, GetPingErrors, GetPingResponse, GetPingResponses, UpdateMyUserData, UpdateMyUserError, UpdateMyUserErrors, UpdateMyUserResponse, UpdateMyUserResponses, UserRaw } from './types.gen.ts';
|
package/src/public/sdk.gen.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
3
|
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.ts';
|
|
4
|
-
import type { GetPingData, GetPingErrors, GetPingResponses } from './types.gen.ts';
|
|
4
|
+
import type { EnsureMyUserData, EnsureMyUserErrors, EnsureMyUserResponses, GetFeatureTogglesData, GetFeatureTogglesErrors, GetFeatureTogglesResponses, GetMyUserData, GetMyUserErrors, GetMyUserResponses, GetPingData, GetPingErrors, GetPingResponses, UpdateMyUserData, UpdateMyUserErrors, UpdateMyUserResponses } from './types.gen.ts';
|
|
5
5
|
|
|
6
6
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
7
7
|
/**
|
|
@@ -17,6 +17,41 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
|
|
|
17
17
|
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
export class User {
|
|
21
|
+
public static ensureMyUser<ThrowOnError extends boolean = false>(options: Options<EnsureMyUserData, ThrowOnError>): RequestResult<EnsureMyUserResponses, EnsureMyUserErrors, ThrowOnError> {
|
|
22
|
+
return options.client.post<EnsureMyUserResponses, EnsureMyUserErrors, ThrowOnError>({
|
|
23
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
24
|
+
url: '/user-auth/ensure-user',
|
|
25
|
+
...options,
|
|
26
|
+
headers: {
|
|
27
|
+
'Content-Type': 'application/json',
|
|
28
|
+
...options.headers
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public static getMyUser<ThrowOnError extends boolean = false>(options: Options<GetMyUserData, ThrowOnError>): RequestResult<GetMyUserResponses, GetMyUserErrors, ThrowOnError> {
|
|
34
|
+
return options.client.get<GetMyUserResponses, GetMyUserErrors, ThrowOnError>({ url: '/user/me', ...options });
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public static updateMyUser<ThrowOnError extends boolean = false>(options: Options<UpdateMyUserData, ThrowOnError>): RequestResult<UpdateMyUserResponses, UpdateMyUserErrors, ThrowOnError> {
|
|
38
|
+
return options.client.patch<UpdateMyUserResponses, UpdateMyUserErrors, ThrowOnError>({
|
|
39
|
+
url: '/user/me',
|
|
40
|
+
...options,
|
|
41
|
+
headers: {
|
|
42
|
+
'Content-Type': 'application/json',
|
|
43
|
+
...options.headers
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export class EnvConfig {
|
|
50
|
+
public static getFeatureToggles<ThrowOnError extends boolean = false>(options: Options<GetFeatureTogglesData, ThrowOnError>): RequestResult<GetFeatureTogglesResponses, GetFeatureTogglesErrors, ThrowOnError> {
|
|
51
|
+
return options.client.get<GetFeatureTogglesResponses, GetFeatureTogglesErrors, ThrowOnError>({ url: '/env-config', ...options });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
20
55
|
export class Ping {
|
|
21
56
|
/**
|
|
22
57
|
* Ping endpoint for test
|
package/src/public/types.gen.ts
CHANGED
|
@@ -4,10 +4,259 @@ export type ClientOptions = {
|
|
|
4
4
|
baseUrl: `${string}://${string}` | (string & {});
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
+
export type UserRaw = {
|
|
8
|
+
id: number;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
picture: string | null;
|
|
11
|
+
jobRole: string | null;
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
} & {
|
|
14
|
+
dazlId: string;
|
|
15
|
+
name: string;
|
|
16
|
+
email: string;
|
|
17
|
+
authSub: string;
|
|
18
|
+
stripeCustomerId: string;
|
|
19
|
+
picture?: string | null;
|
|
20
|
+
jobRole?: string | null;
|
|
21
|
+
};
|
|
22
|
+
|
|
7
23
|
export type ErrorResponse = {
|
|
8
24
|
message: string;
|
|
9
25
|
};
|
|
10
26
|
|
|
27
|
+
export type FeatureToggle = {
|
|
28
|
+
name: string;
|
|
29
|
+
scope: 'RemoteAndEditor' | 'SiteAndEditor';
|
|
30
|
+
updatedAt: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type EnsureMyUserData = {
|
|
34
|
+
body?: {
|
|
35
|
+
name?: string;
|
|
36
|
+
picture?: string | null;
|
|
37
|
+
jobRole?: string | null;
|
|
38
|
+
};
|
|
39
|
+
path?: never;
|
|
40
|
+
query?: never;
|
|
41
|
+
url: '/user-auth/ensure-user';
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type EnsureMyUserErrors = {
|
|
45
|
+
/**
|
|
46
|
+
* Bad request - Invalid parameters or malformed JSON
|
|
47
|
+
*/
|
|
48
|
+
400: {
|
|
49
|
+
message: string;
|
|
50
|
+
issues?: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Unauthorized
|
|
54
|
+
*/
|
|
55
|
+
401: ErrorResponse;
|
|
56
|
+
/**
|
|
57
|
+
* Forbidden
|
|
58
|
+
*/
|
|
59
|
+
403: ErrorResponse;
|
|
60
|
+
/**
|
|
61
|
+
* Not Found
|
|
62
|
+
*/
|
|
63
|
+
404: ErrorResponse;
|
|
64
|
+
/**
|
|
65
|
+
* Conflict
|
|
66
|
+
*/
|
|
67
|
+
409: ErrorResponse;
|
|
68
|
+
/**
|
|
69
|
+
* Internal server error
|
|
70
|
+
*/
|
|
71
|
+
500: ErrorResponse;
|
|
72
|
+
/**
|
|
73
|
+
* Service Unavailable
|
|
74
|
+
*/
|
|
75
|
+
503: ErrorResponse;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export type EnsureMyUserError = EnsureMyUserErrors[keyof EnsureMyUserErrors];
|
|
79
|
+
|
|
80
|
+
export type EnsureMyUserResponses = {
|
|
81
|
+
/**
|
|
82
|
+
* Returns the requested user
|
|
83
|
+
*/
|
|
84
|
+
200: {
|
|
85
|
+
user: UserRaw;
|
|
86
|
+
created: boolean;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export type EnsureMyUserResponse = EnsureMyUserResponses[keyof EnsureMyUserResponses];
|
|
91
|
+
|
|
92
|
+
export type GetMyUserData = {
|
|
93
|
+
body?: never;
|
|
94
|
+
path?: never;
|
|
95
|
+
query?: never;
|
|
96
|
+
url: '/user/me';
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export type GetMyUserErrors = {
|
|
100
|
+
/**
|
|
101
|
+
* Bad request - Invalid parameters or malformed JSON
|
|
102
|
+
*/
|
|
103
|
+
400: {
|
|
104
|
+
message: string;
|
|
105
|
+
issues?: string;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Unauthorized
|
|
109
|
+
*/
|
|
110
|
+
401: ErrorResponse;
|
|
111
|
+
/**
|
|
112
|
+
* Forbidden
|
|
113
|
+
*/
|
|
114
|
+
403: ErrorResponse;
|
|
115
|
+
/**
|
|
116
|
+
* Not Found
|
|
117
|
+
*/
|
|
118
|
+
404: ErrorResponse;
|
|
119
|
+
/**
|
|
120
|
+
* Conflict
|
|
121
|
+
*/
|
|
122
|
+
409: ErrorResponse;
|
|
123
|
+
/**
|
|
124
|
+
* Internal server error
|
|
125
|
+
*/
|
|
126
|
+
500: ErrorResponse;
|
|
127
|
+
/**
|
|
128
|
+
* Service Unavailable
|
|
129
|
+
*/
|
|
130
|
+
503: ErrorResponse;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export type GetMyUserError = GetMyUserErrors[keyof GetMyUserErrors];
|
|
134
|
+
|
|
135
|
+
export type GetMyUserResponses = {
|
|
136
|
+
/**
|
|
137
|
+
* Returns the requested user
|
|
138
|
+
*/
|
|
139
|
+
200: {
|
|
140
|
+
user: UserRaw;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export type GetMyUserResponse = GetMyUserResponses[keyof GetMyUserResponses];
|
|
145
|
+
|
|
146
|
+
export type UpdateMyUserData = {
|
|
147
|
+
body: {
|
|
148
|
+
picture?: string | null;
|
|
149
|
+
name?: string;
|
|
150
|
+
jobRole?: string | null;
|
|
151
|
+
};
|
|
152
|
+
path?: never;
|
|
153
|
+
query?: never;
|
|
154
|
+
url: '/user/me';
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export type UpdateMyUserErrors = {
|
|
158
|
+
/**
|
|
159
|
+
* Bad request - Invalid parameters or malformed JSON
|
|
160
|
+
*/
|
|
161
|
+
400: {
|
|
162
|
+
message: string;
|
|
163
|
+
issues?: string;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Unauthorized
|
|
167
|
+
*/
|
|
168
|
+
401: ErrorResponse;
|
|
169
|
+
/**
|
|
170
|
+
* Forbidden
|
|
171
|
+
*/
|
|
172
|
+
403: ErrorResponse;
|
|
173
|
+
/**
|
|
174
|
+
* Not Found
|
|
175
|
+
*/
|
|
176
|
+
404: ErrorResponse;
|
|
177
|
+
/**
|
|
178
|
+
* Conflict
|
|
179
|
+
*/
|
|
180
|
+
409: ErrorResponse;
|
|
181
|
+
/**
|
|
182
|
+
* Internal server error
|
|
183
|
+
*/
|
|
184
|
+
500: ErrorResponse;
|
|
185
|
+
/**
|
|
186
|
+
* Service Unavailable
|
|
187
|
+
*/
|
|
188
|
+
503: ErrorResponse;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
export type UpdateMyUserError = UpdateMyUserErrors[keyof UpdateMyUserErrors];
|
|
192
|
+
|
|
193
|
+
export type UpdateMyUserResponses = {
|
|
194
|
+
/**
|
|
195
|
+
* Updates user information
|
|
196
|
+
*/
|
|
197
|
+
200: {
|
|
198
|
+
user: UserRaw;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export type UpdateMyUserResponse = UpdateMyUserResponses[keyof UpdateMyUserResponses];
|
|
203
|
+
|
|
204
|
+
export type GetFeatureTogglesData = {
|
|
205
|
+
body?: never;
|
|
206
|
+
path?: never;
|
|
207
|
+
query?: {
|
|
208
|
+
scope?: 'RemoteAndEditor' | 'SiteAndEditor';
|
|
209
|
+
};
|
|
210
|
+
url: '/env-config';
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
export type GetFeatureTogglesErrors = {
|
|
214
|
+
/**
|
|
215
|
+
* Bad request - Invalid parameters or malformed JSON
|
|
216
|
+
*/
|
|
217
|
+
400: {
|
|
218
|
+
message: string;
|
|
219
|
+
issues?: string;
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Unauthorized
|
|
223
|
+
*/
|
|
224
|
+
401: ErrorResponse;
|
|
225
|
+
/**
|
|
226
|
+
* Forbidden
|
|
227
|
+
*/
|
|
228
|
+
403: ErrorResponse;
|
|
229
|
+
/**
|
|
230
|
+
* Not Found
|
|
231
|
+
*/
|
|
232
|
+
404: ErrorResponse;
|
|
233
|
+
/**
|
|
234
|
+
* Conflict
|
|
235
|
+
*/
|
|
236
|
+
409: ErrorResponse;
|
|
237
|
+
/**
|
|
238
|
+
* Internal server error
|
|
239
|
+
*/
|
|
240
|
+
500: ErrorResponse;
|
|
241
|
+
/**
|
|
242
|
+
* Service Unavailable
|
|
243
|
+
*/
|
|
244
|
+
503: ErrorResponse;
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
export type GetFeatureTogglesError = GetFeatureTogglesErrors[keyof GetFeatureTogglesErrors];
|
|
248
|
+
|
|
249
|
+
export type GetFeatureTogglesResponses = {
|
|
250
|
+
/**
|
|
251
|
+
* Returns feature toggles, optionally filtered by scope
|
|
252
|
+
*/
|
|
253
|
+
200: {
|
|
254
|
+
toggles: Array<FeatureToggle>;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
export type GetFeatureTogglesResponse = GetFeatureTogglesResponses[keyof GetFeatureTogglesResponses];
|
|
259
|
+
|
|
11
260
|
export type GetPingData = {
|
|
12
261
|
body?: never;
|
|
13
262
|
path?: never;
|