@thelllabs/winehaus-sdk 0.0.11 → 0.0.13
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/cjs/api/api.js +178 -1
- package/dist/esm/api/api.js +177 -0
- package/dist/types/api/api.d.ts +652 -1
- package/dist/umd/index.ts +178 -1
- package/package.json +1 -1
package/dist/types/api/api.d.ts
CHANGED
|
@@ -1,3 +1,82 @@
|
|
|
1
|
+
export interface AddressEntityDto {
|
|
2
|
+
addressLine1: string;
|
|
3
|
+
addressLine2?: string;
|
|
4
|
+
city: string;
|
|
5
|
+
country: string;
|
|
6
|
+
/** @format date-time */
|
|
7
|
+
createdAt: string;
|
|
8
|
+
/** @format date-time */
|
|
9
|
+
deletedAt?: string | null;
|
|
10
|
+
/** @format uuid */
|
|
11
|
+
id: string;
|
|
12
|
+
location?: string;
|
|
13
|
+
name: string;
|
|
14
|
+
notes?: string;
|
|
15
|
+
postalCode: string;
|
|
16
|
+
state: string;
|
|
17
|
+
/** @format date-time */
|
|
18
|
+
updatedAt: string;
|
|
19
|
+
/** @format uuid */
|
|
20
|
+
userId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface AddressEntityPaginatedDto {
|
|
23
|
+
items: AddressEntityDto[];
|
|
24
|
+
links?: PaginationLinksDto;
|
|
25
|
+
meta: PaginationMetaDto;
|
|
26
|
+
}
|
|
27
|
+
export interface CaseBatchOperationResponseDto {
|
|
28
|
+
operations: CaseOperationEntityDto[];
|
|
29
|
+
}
|
|
30
|
+
export interface CaseEntityDto {
|
|
31
|
+
/** @format date-time */
|
|
32
|
+
billingEndDate?: string | null;
|
|
33
|
+
/** @format date-time */
|
|
34
|
+
billingStartDate?: string | null;
|
|
35
|
+
/** @format date-time */
|
|
36
|
+
createdAt: string;
|
|
37
|
+
/** @min 0 */
|
|
38
|
+
currentItems: number;
|
|
39
|
+
customer: UserEntityDto;
|
|
40
|
+
/** @format uuid */
|
|
41
|
+
customerId: string;
|
|
42
|
+
/** @format date-time */
|
|
43
|
+
deletedAt?: string | null;
|
|
44
|
+
description?: string | null;
|
|
45
|
+
/** @format uuid */
|
|
46
|
+
id: string;
|
|
47
|
+
/** @min 0 */
|
|
48
|
+
maxItems: number;
|
|
49
|
+
name: string;
|
|
50
|
+
/** @format uuid */
|
|
51
|
+
tenantId: string;
|
|
52
|
+
/** @format date-time */
|
|
53
|
+
updatedAt: string;
|
|
54
|
+
}
|
|
55
|
+
export interface CaseEntityPaginatedDto {
|
|
56
|
+
items: CaseEntityDto[];
|
|
57
|
+
links?: PaginationLinksDto;
|
|
58
|
+
meta: PaginationMetaDto;
|
|
59
|
+
}
|
|
60
|
+
export interface CaseOperationEntityDto {
|
|
61
|
+
/** @format uuid */
|
|
62
|
+
caseId: string;
|
|
63
|
+
/** @format date-time */
|
|
64
|
+
createdAt: string;
|
|
65
|
+
/** @format uuid */
|
|
66
|
+
id: string;
|
|
67
|
+
/** @example [] */
|
|
68
|
+
logs: CaseOperationLogDto[];
|
|
69
|
+
/** @format uuid */
|
|
70
|
+
requestId?: string | null;
|
|
71
|
+
/** @example "processed" */
|
|
72
|
+
status: CaseOperationStatusEnum;
|
|
73
|
+
/** @format uuid */
|
|
74
|
+
tenantId: string;
|
|
75
|
+
/** @example "deposit" */
|
|
76
|
+
type: CaseOperationTypesEnum;
|
|
77
|
+
/** @format date-time */
|
|
78
|
+
updatedAt: string;
|
|
79
|
+
}
|
|
1
80
|
export interface CaseOperationExtraTemplateEntityDto {
|
|
2
81
|
/** @format date-time */
|
|
3
82
|
createdAt: string;
|
|
@@ -22,6 +101,107 @@ export interface CaseOperationExtraTemplateEntityPaginatedDto {
|
|
|
22
101
|
links?: PaginationLinksDto;
|
|
23
102
|
meta: PaginationMetaDto;
|
|
24
103
|
}
|
|
104
|
+
export interface CaseOperationLogDto {
|
|
105
|
+
/** @example "confirmed" */
|
|
106
|
+
currentStatus?: CaseOperationStatusEnum;
|
|
107
|
+
/** @example "confirmed" */
|
|
108
|
+
newStatus?: CaseOperationStatusEnum;
|
|
109
|
+
/** @example "request_accepted" */
|
|
110
|
+
type: CaseOperationLogTypeEnum;
|
|
111
|
+
/** @format uuid */
|
|
112
|
+
userId: string;
|
|
113
|
+
}
|
|
114
|
+
export declare enum CaseOperationLogTypeEnum {
|
|
115
|
+
RequestAccepted = "request_accepted",
|
|
116
|
+
StatusChange = "status_change"
|
|
117
|
+
}
|
|
118
|
+
export declare enum CaseOperationStatusEnum {
|
|
119
|
+
OnHold = "on_hold",
|
|
120
|
+
Confirmed = "confirmed",
|
|
121
|
+
Processed = "processed",
|
|
122
|
+
Cancelled = "cancelled"
|
|
123
|
+
}
|
|
124
|
+
export declare enum CaseOperationTypesEnum {
|
|
125
|
+
Deposit = "deposit",
|
|
126
|
+
Withdrawal = "withdrawal"
|
|
127
|
+
}
|
|
128
|
+
export interface CaseWineInventoryItemEntityDto {
|
|
129
|
+
/** @min 0 */
|
|
130
|
+
amount: number;
|
|
131
|
+
bottleFormat: WineBottleFormatEntityDto;
|
|
132
|
+
/** @format uuid */
|
|
133
|
+
bottleFormatId: string;
|
|
134
|
+
bottleVintage: WineBottleVintageEntityDto;
|
|
135
|
+
/** @format uuid */
|
|
136
|
+
bottleVintageId: string;
|
|
137
|
+
/** @format uuid */
|
|
138
|
+
caseId?: string | null;
|
|
139
|
+
/** @format date-time */
|
|
140
|
+
createdAt: string;
|
|
141
|
+
/** @format uuid */
|
|
142
|
+
id: string;
|
|
143
|
+
/** @format uuid */
|
|
144
|
+
tenantId: string;
|
|
145
|
+
/** @format date-time */
|
|
146
|
+
updatedAt: string;
|
|
147
|
+
wine: WineEntityDto;
|
|
148
|
+
/** @format uuid */
|
|
149
|
+
wineId: string;
|
|
150
|
+
}
|
|
151
|
+
export interface CaseWineInventoryItemEntityPaginatedDto {
|
|
152
|
+
items: CaseWineInventoryItemEntityDto[];
|
|
153
|
+
links?: PaginationLinksDto;
|
|
154
|
+
meta: PaginationMetaDto;
|
|
155
|
+
}
|
|
156
|
+
export interface CreateAddressDto {
|
|
157
|
+
addressLine1: string;
|
|
158
|
+
addressLine2?: string;
|
|
159
|
+
city: string;
|
|
160
|
+
country: string;
|
|
161
|
+
location?: string;
|
|
162
|
+
name: string;
|
|
163
|
+
notes?: string;
|
|
164
|
+
postalCode: string;
|
|
165
|
+
state: string;
|
|
166
|
+
}
|
|
167
|
+
export interface CreateBatchCaseOperationsDto {
|
|
168
|
+
/** @minItems 1 */
|
|
169
|
+
operations: CreateCaseOperationDto[];
|
|
170
|
+
}
|
|
171
|
+
export interface CreateCaseDto {
|
|
172
|
+
/** @format date-time */
|
|
173
|
+
billingEndDate?: string | null;
|
|
174
|
+
/** @format date-time */
|
|
175
|
+
billingStartDate?: string | null;
|
|
176
|
+
/** @format uuid */
|
|
177
|
+
customerId: string;
|
|
178
|
+
description?: string | null;
|
|
179
|
+
/** @min 0 */
|
|
180
|
+
maxItems: number;
|
|
181
|
+
name: string;
|
|
182
|
+
}
|
|
183
|
+
export interface CreateCaseOperationDto {
|
|
184
|
+
/** @minItems 0 */
|
|
185
|
+
extras?: CreateCaseOperationExtraDto[];
|
|
186
|
+
/** @format uuid */
|
|
187
|
+
requestId?: string | null;
|
|
188
|
+
/** @example "processed" */
|
|
189
|
+
status?: CreateOnlyCaseOperationStatusEnum;
|
|
190
|
+
/** @example "deposit" */
|
|
191
|
+
type: CaseOperationTypesEnum;
|
|
192
|
+
/** @minItems 1 */
|
|
193
|
+
wines: CreateWineInventoryItemDto[];
|
|
194
|
+
}
|
|
195
|
+
export interface CreateCaseOperationExtraDto {
|
|
196
|
+
/** @min 1 */
|
|
197
|
+
amount?: number | null;
|
|
198
|
+
description?: string | null;
|
|
199
|
+
invoiceTitle?: string;
|
|
200
|
+
/** @min 0 */
|
|
201
|
+
pricePerItem?: number | null;
|
|
202
|
+
/** @format uuid */
|
|
203
|
+
templateId?: string;
|
|
204
|
+
}
|
|
25
205
|
export interface CreateCaseOperationExtraTemplateDto {
|
|
26
206
|
description?: string | null;
|
|
27
207
|
invoiceTitle: string;
|
|
@@ -35,6 +215,11 @@ export interface CreateNameOnlyEntityDto {
|
|
|
35
215
|
isGlobal?: boolean;
|
|
36
216
|
name: string;
|
|
37
217
|
}
|
|
218
|
+
export declare enum CreateOnlyCaseOperationStatusEnum {
|
|
219
|
+
OnHold = "on_hold",
|
|
220
|
+
Confirmed = "confirmed",
|
|
221
|
+
Processed = "processed"
|
|
222
|
+
}
|
|
38
223
|
export interface CreateTenantUserDto {
|
|
39
224
|
/** @example "user@example.com" */
|
|
40
225
|
email: string;
|
|
@@ -66,6 +251,16 @@ export interface CreateWineDto {
|
|
|
66
251
|
/** @format uuid */
|
|
67
252
|
vineyardId: string;
|
|
68
253
|
}
|
|
254
|
+
export interface CreateWineInventoryItemDto {
|
|
255
|
+
/** @min 1 */
|
|
256
|
+
amount: number;
|
|
257
|
+
/** @format uuid */
|
|
258
|
+
bottleFormatId: string;
|
|
259
|
+
/** @format uuid */
|
|
260
|
+
bottleVintageId: string;
|
|
261
|
+
/** @format uuid */
|
|
262
|
+
wineId: string;
|
|
263
|
+
}
|
|
69
264
|
export interface HttpExceptionDto {
|
|
70
265
|
/** @example null */
|
|
71
266
|
data?: object;
|
|
@@ -128,7 +323,7 @@ export interface SigninDto {
|
|
|
128
323
|
}
|
|
129
324
|
export interface SigninResponseDto {
|
|
130
325
|
token: string;
|
|
131
|
-
user:
|
|
326
|
+
user: UserEntityWithTenantAccessesDto;
|
|
132
327
|
}
|
|
133
328
|
export declare enum TenantRoleEnum {
|
|
134
329
|
Operator = "operator",
|
|
@@ -155,6 +350,18 @@ export declare enum TenantUserStatusEnum {
|
|
|
155
350
|
Enabled = "enabled",
|
|
156
351
|
Blocked = "blocked"
|
|
157
352
|
}
|
|
353
|
+
export interface UpdateCaseDto {
|
|
354
|
+
/** @format date-time */
|
|
355
|
+
billingEndDate?: string | null;
|
|
356
|
+
/** @format date-time */
|
|
357
|
+
billingStartDate?: string | null;
|
|
358
|
+
/** @format uuid */
|
|
359
|
+
customerId: string;
|
|
360
|
+
description?: string | null;
|
|
361
|
+
/** @min 0 */
|
|
362
|
+
maxItems: number;
|
|
363
|
+
name: string;
|
|
364
|
+
}
|
|
158
365
|
export interface UpdateCaseOperationExtraTemplateDto {
|
|
159
366
|
description?: string | null;
|
|
160
367
|
invoiceTitle: string;
|
|
@@ -214,6 +421,19 @@ export interface UserEntityDto {
|
|
|
214
421
|
/** @format date-time */
|
|
215
422
|
updatedAt: string;
|
|
216
423
|
}
|
|
424
|
+
export interface UserEntityWithTenantAccessesDto {
|
|
425
|
+
/** @format date-time */
|
|
426
|
+
createdAt: string;
|
|
427
|
+
/** @format date-time */
|
|
428
|
+
deletedAt?: string | null;
|
|
429
|
+
email: string;
|
|
430
|
+
/** @format uuid */
|
|
431
|
+
id: string;
|
|
432
|
+
name?: string | null;
|
|
433
|
+
tenants: TenantUserEntityDto[];
|
|
434
|
+
/** @format date-time */
|
|
435
|
+
updatedAt: string;
|
|
436
|
+
}
|
|
217
437
|
export interface WineBottleFormatEntityDto {
|
|
218
438
|
/** @format date-time */
|
|
219
439
|
createdAt: string;
|
|
@@ -483,6 +703,94 @@ export declare namespace Auth {
|
|
|
483
703
|
}
|
|
484
704
|
}
|
|
485
705
|
export declare namespace Users {
|
|
706
|
+
/**
|
|
707
|
+
* No description
|
|
708
|
+
* @tags Users Addresses
|
|
709
|
+
* @name CreateUserAddress
|
|
710
|
+
* @request POST:/users/{userId}/addresses
|
|
711
|
+
* @secure
|
|
712
|
+
* @response `201` `AddressEntityDto`
|
|
713
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
714
|
+
*/
|
|
715
|
+
namespace CreateUserAddress {
|
|
716
|
+
type RequestParams = {
|
|
717
|
+
userId: string;
|
|
718
|
+
};
|
|
719
|
+
type RequestQuery = {};
|
|
720
|
+
type RequestBody = CreateAddressDto;
|
|
721
|
+
type RequestHeaders = {};
|
|
722
|
+
type ResponseBody = AddressEntityDto;
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* No description
|
|
726
|
+
* @tags Users Addresses
|
|
727
|
+
* @name DeleteUserAddress
|
|
728
|
+
* @request DELETE:/users/{userId}/addresses/{addressId}
|
|
729
|
+
* @secure
|
|
730
|
+
* @response `204` `void`
|
|
731
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
732
|
+
*/
|
|
733
|
+
namespace DeleteUserAddress {
|
|
734
|
+
type RequestParams = {
|
|
735
|
+
addressId: string;
|
|
736
|
+
userId: string;
|
|
737
|
+
};
|
|
738
|
+
type RequestQuery = {};
|
|
739
|
+
type RequestBody = never;
|
|
740
|
+
type RequestHeaders = {};
|
|
741
|
+
type ResponseBody = void;
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* No description
|
|
745
|
+
* @tags Users
|
|
746
|
+
* @name GetUserProfile
|
|
747
|
+
* @request GET:/users/{userId}
|
|
748
|
+
* @secure
|
|
749
|
+
* @response `200` `UserEntityWithTenantAccessesDto`
|
|
750
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
751
|
+
*/
|
|
752
|
+
namespace GetUserProfile {
|
|
753
|
+
type RequestParams = {
|
|
754
|
+
userId: string;
|
|
755
|
+
};
|
|
756
|
+
type RequestQuery = {};
|
|
757
|
+
type RequestBody = never;
|
|
758
|
+
type RequestHeaders = {};
|
|
759
|
+
type ResponseBody = UserEntityWithTenantAccessesDto;
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* No description
|
|
763
|
+
* @tags Users Addresses
|
|
764
|
+
* @name ListUserAddresses
|
|
765
|
+
* @request GET:/users/{userId}/addresses
|
|
766
|
+
* @secure
|
|
767
|
+
* @response `200` `AddressEntityPaginatedDto`
|
|
768
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
769
|
+
*/
|
|
770
|
+
namespace ListUserAddresses {
|
|
771
|
+
type RequestParams = {
|
|
772
|
+
userId: string;
|
|
773
|
+
};
|
|
774
|
+
type RequestQuery = {
|
|
775
|
+
createdAt?: string;
|
|
776
|
+
/**
|
|
777
|
+
* @default 10
|
|
778
|
+
* @example 10
|
|
779
|
+
*/
|
|
780
|
+
limit?: number;
|
|
781
|
+
orderBy?: OrderByEnum;
|
|
782
|
+
/**
|
|
783
|
+
* @default 1
|
|
784
|
+
* @example 1
|
|
785
|
+
*/
|
|
786
|
+
page?: number;
|
|
787
|
+
search?: string;
|
|
788
|
+
sortBy?: string[];
|
|
789
|
+
};
|
|
790
|
+
type RequestBody = never;
|
|
791
|
+
type RequestHeaders = {};
|
|
792
|
+
type ResponseBody = AddressEntityPaginatedDto;
|
|
793
|
+
}
|
|
486
794
|
/**
|
|
487
795
|
* No description
|
|
488
796
|
* @tags Users
|
|
@@ -521,6 +829,25 @@ export declare namespace Users {
|
|
|
521
829
|
}
|
|
522
830
|
}
|
|
523
831
|
export declare namespace Admin {
|
|
832
|
+
/**
|
|
833
|
+
* No description
|
|
834
|
+
* @tags Admin Tenant Cases
|
|
835
|
+
* @name AddTenantCaseBatchOperations
|
|
836
|
+
* @request POST:/admin/tenants/{tenantId}/cases/{caseId}/operations/batch
|
|
837
|
+
* @secure
|
|
838
|
+
* @response `200` `CaseBatchOperationResponseDto`
|
|
839
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin, operator
|
|
840
|
+
*/
|
|
841
|
+
namespace AddTenantCaseBatchOperations {
|
|
842
|
+
type RequestParams = {
|
|
843
|
+
caseId: string;
|
|
844
|
+
tenantId: string;
|
|
845
|
+
};
|
|
846
|
+
type RequestQuery = {};
|
|
847
|
+
type RequestBody = CreateBatchCaseOperationsDto;
|
|
848
|
+
type RequestHeaders = {};
|
|
849
|
+
type ResponseBody = CaseBatchOperationResponseDto;
|
|
850
|
+
}
|
|
524
851
|
/**
|
|
525
852
|
* @description Gives some user access to the tenant. If there's no user account attached to this users, it creates a new one
|
|
526
853
|
* @tags Admin Tenant Users
|
|
@@ -539,6 +866,24 @@ export declare namespace Admin {
|
|
|
539
866
|
type RequestHeaders = {};
|
|
540
867
|
type ResponseBody = TenantUserEntityDto;
|
|
541
868
|
}
|
|
869
|
+
/**
|
|
870
|
+
* No description
|
|
871
|
+
* @tags Admin Tenant Cases
|
|
872
|
+
* @name CreateTenantCase
|
|
873
|
+
* @request POST:/admin/tenants/{tenantId}/cases
|
|
874
|
+
* @secure
|
|
875
|
+
* @response `201` `CaseEntityDto`
|
|
876
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
877
|
+
*/
|
|
878
|
+
namespace CreateTenantCase {
|
|
879
|
+
type RequestParams = {
|
|
880
|
+
tenantId: string;
|
|
881
|
+
};
|
|
882
|
+
type RequestQuery = {};
|
|
883
|
+
type RequestBody = CreateCaseDto;
|
|
884
|
+
type RequestHeaders = {};
|
|
885
|
+
type ResponseBody = CaseEntityDto;
|
|
886
|
+
}
|
|
542
887
|
/**
|
|
543
888
|
* No description
|
|
544
889
|
* @tags Admin Tenant Operation Extras Templates
|
|
@@ -737,6 +1082,25 @@ export declare namespace Admin {
|
|
|
737
1082
|
type RequestHeaders = {};
|
|
738
1083
|
type ResponseBody = WineVineyardEntityDto;
|
|
739
1084
|
}
|
|
1085
|
+
/**
|
|
1086
|
+
* No description
|
|
1087
|
+
* @tags Admin Tenant Cases
|
|
1088
|
+
* @name DeleteTenantCase
|
|
1089
|
+
* @request DELETE:/admin/tenants/{tenantId}/cases/{caseId}
|
|
1090
|
+
* @secure
|
|
1091
|
+
* @response `204` `void`
|
|
1092
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
1093
|
+
*/
|
|
1094
|
+
namespace DeleteTenantCase {
|
|
1095
|
+
type RequestParams = {
|
|
1096
|
+
caseId: string;
|
|
1097
|
+
tenantId: string;
|
|
1098
|
+
};
|
|
1099
|
+
type RequestQuery = {};
|
|
1100
|
+
type RequestBody = never;
|
|
1101
|
+
type RequestHeaders = {};
|
|
1102
|
+
type ResponseBody = void;
|
|
1103
|
+
}
|
|
740
1104
|
/**
|
|
741
1105
|
* No description
|
|
742
1106
|
* @tags Admin Tenant Operation Extras Templates
|
|
@@ -984,6 +1348,25 @@ export declare namespace Admin {
|
|
|
984
1348
|
type RequestHeaders = {};
|
|
985
1349
|
type ResponseBody = void;
|
|
986
1350
|
}
|
|
1351
|
+
/**
|
|
1352
|
+
* No description
|
|
1353
|
+
* @tags Admin Tenant Cases
|
|
1354
|
+
* @name GetTenantCaseById
|
|
1355
|
+
* @request GET:/admin/tenants/{tenantId}/cases/{caseId}
|
|
1356
|
+
* @secure
|
|
1357
|
+
* @response `200` `CaseEntityDto`
|
|
1358
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin, operator, customer
|
|
1359
|
+
*/
|
|
1360
|
+
namespace GetTenantCaseById {
|
|
1361
|
+
type RequestParams = {
|
|
1362
|
+
caseId: string;
|
|
1363
|
+
tenantId: string;
|
|
1364
|
+
};
|
|
1365
|
+
type RequestQuery = {};
|
|
1366
|
+
type RequestBody = never;
|
|
1367
|
+
type RequestHeaders = {};
|
|
1368
|
+
type ResponseBody = CaseEntityDto;
|
|
1369
|
+
}
|
|
987
1370
|
/**
|
|
988
1371
|
* No description
|
|
989
1372
|
* @tags Admin Tenant Operation Extras Templates
|
|
@@ -1193,6 +1576,81 @@ export declare namespace Admin {
|
|
|
1193
1576
|
type RequestHeaders = {};
|
|
1194
1577
|
type ResponseBody = WineVineyardEntityDto;
|
|
1195
1578
|
}
|
|
1579
|
+
/**
|
|
1580
|
+
* No description
|
|
1581
|
+
* @tags Admin Tenant Cases
|
|
1582
|
+
* @name ListTenantCaseInventory
|
|
1583
|
+
* @request GET:/admin/tenants/{tenantId}/cases/{caseId}/inventory
|
|
1584
|
+
* @secure
|
|
1585
|
+
* @response `200` `CaseWineInventoryItemEntityPaginatedDto`
|
|
1586
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin, operator, customer
|
|
1587
|
+
*/
|
|
1588
|
+
namespace ListTenantCaseInventory {
|
|
1589
|
+
type RequestParams = {
|
|
1590
|
+
caseId: string;
|
|
1591
|
+
tenantId: string;
|
|
1592
|
+
};
|
|
1593
|
+
type RequestQuery = {
|
|
1594
|
+
amount?: string;
|
|
1595
|
+
bottleFormatIds?: string[];
|
|
1596
|
+
bottleVintageIds?: string[];
|
|
1597
|
+
createdAt?: string;
|
|
1598
|
+
/**
|
|
1599
|
+
* @default 10
|
|
1600
|
+
* @example 10
|
|
1601
|
+
*/
|
|
1602
|
+
limit?: number;
|
|
1603
|
+
orderBy?: OrderByEnum;
|
|
1604
|
+
/**
|
|
1605
|
+
* @default 1
|
|
1606
|
+
* @example 1
|
|
1607
|
+
*/
|
|
1608
|
+
page?: number;
|
|
1609
|
+
search?: string;
|
|
1610
|
+
sortBy?: string[];
|
|
1611
|
+
wineIds?: string[];
|
|
1612
|
+
};
|
|
1613
|
+
type RequestBody = never;
|
|
1614
|
+
type RequestHeaders = {};
|
|
1615
|
+
type ResponseBody = CaseWineInventoryItemEntityPaginatedDto;
|
|
1616
|
+
}
|
|
1617
|
+
/**
|
|
1618
|
+
* No description
|
|
1619
|
+
* @tags Admin Tenant Cases
|
|
1620
|
+
* @name ListTenantCases
|
|
1621
|
+
* @request GET:/admin/tenants/{tenantId}/cases
|
|
1622
|
+
* @secure
|
|
1623
|
+
* @response `200` `CaseEntityPaginatedDto`
|
|
1624
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin, operator, customer
|
|
1625
|
+
*/
|
|
1626
|
+
namespace ListTenantCases {
|
|
1627
|
+
type RequestParams = {
|
|
1628
|
+
tenantId: string;
|
|
1629
|
+
};
|
|
1630
|
+
type RequestQuery = {
|
|
1631
|
+
billingEndDate?: string;
|
|
1632
|
+
billingStartDate?: string;
|
|
1633
|
+
createdAt?: string;
|
|
1634
|
+
customerIds?: string[];
|
|
1635
|
+
/**
|
|
1636
|
+
* @default 10
|
|
1637
|
+
* @example 10
|
|
1638
|
+
*/
|
|
1639
|
+
limit?: number;
|
|
1640
|
+
minRemainingItems?: number;
|
|
1641
|
+
orderBy?: OrderByEnum;
|
|
1642
|
+
/**
|
|
1643
|
+
* @default 1
|
|
1644
|
+
* @example 1
|
|
1645
|
+
*/
|
|
1646
|
+
page?: number;
|
|
1647
|
+
search?: string;
|
|
1648
|
+
sortBy?: string[];
|
|
1649
|
+
};
|
|
1650
|
+
type RequestBody = never;
|
|
1651
|
+
type RequestHeaders = {};
|
|
1652
|
+
type ResponseBody = CaseEntityPaginatedDto;
|
|
1653
|
+
}
|
|
1196
1654
|
/**
|
|
1197
1655
|
* No description
|
|
1198
1656
|
* @tags Admin Tenant Operation Extras Templates
|
|
@@ -1596,6 +2054,25 @@ export declare namespace Admin {
|
|
|
1596
2054
|
type RequestHeaders = {};
|
|
1597
2055
|
type ResponseBody = WineVineyardEntityPaginatedDto;
|
|
1598
2056
|
}
|
|
2057
|
+
/**
|
|
2058
|
+
* No description
|
|
2059
|
+
* @tags Admin Tenant Cases
|
|
2060
|
+
* @name UpdateTenantCase
|
|
2061
|
+
* @request PATCH:/admin/tenants/{tenantId}/cases/{caseId}
|
|
2062
|
+
* @secure
|
|
2063
|
+
* @response `200` `CaseEntityDto`
|
|
2064
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
2065
|
+
*/
|
|
2066
|
+
namespace UpdateTenantCase {
|
|
2067
|
+
type RequestParams = {
|
|
2068
|
+
caseId: string;
|
|
2069
|
+
tenantId: string;
|
|
2070
|
+
};
|
|
2071
|
+
type RequestQuery = {};
|
|
2072
|
+
type RequestBody = UpdateCaseDto;
|
|
2073
|
+
type RequestHeaders = {};
|
|
2074
|
+
type ResponseBody = CaseEntityDto;
|
|
2075
|
+
}
|
|
1599
2076
|
/**
|
|
1600
2077
|
* No description
|
|
1601
2078
|
* @tags Admin Tenant Operation Extras Templates
|
|
@@ -1907,6 +2384,65 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1907
2384
|
signIn: (data: SigninDto, params?: RequestParams) => Promise<SigninResponseDto>;
|
|
1908
2385
|
};
|
|
1909
2386
|
users: {
|
|
2387
|
+
/**
|
|
2388
|
+
* No description
|
|
2389
|
+
*
|
|
2390
|
+
* @tags Users Addresses
|
|
2391
|
+
* @name CreateUserAddress
|
|
2392
|
+
* @request POST:/users/{userId}/addresses
|
|
2393
|
+
* @secure
|
|
2394
|
+
* @response `201` `AddressEntityDto`
|
|
2395
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
2396
|
+
*/
|
|
2397
|
+
createUserAddress: (userId: string, data: CreateAddressDto, params?: RequestParams) => Promise<AddressEntityDto>;
|
|
2398
|
+
/**
|
|
2399
|
+
* No description
|
|
2400
|
+
*
|
|
2401
|
+
* @tags Users Addresses
|
|
2402
|
+
* @name DeleteUserAddress
|
|
2403
|
+
* @request DELETE:/users/{userId}/addresses/{addressId}
|
|
2404
|
+
* @secure
|
|
2405
|
+
* @response `204` `void`
|
|
2406
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
2407
|
+
*/
|
|
2408
|
+
deleteUserAddress: (userId: string, addressId: string, params?: RequestParams) => Promise<void>;
|
|
2409
|
+
/**
|
|
2410
|
+
* No description
|
|
2411
|
+
*
|
|
2412
|
+
* @tags Users
|
|
2413
|
+
* @name GetUserProfile
|
|
2414
|
+
* @request GET:/users/{userId}
|
|
2415
|
+
* @secure
|
|
2416
|
+
* @response `200` `UserEntityWithTenantAccessesDto`
|
|
2417
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
2418
|
+
*/
|
|
2419
|
+
getUserProfile: (userId: string, params?: RequestParams) => Promise<UserEntityWithTenantAccessesDto>;
|
|
2420
|
+
/**
|
|
2421
|
+
* No description
|
|
2422
|
+
*
|
|
2423
|
+
* @tags Users Addresses
|
|
2424
|
+
* @name ListUserAddresses
|
|
2425
|
+
* @request GET:/users/{userId}/addresses
|
|
2426
|
+
* @secure
|
|
2427
|
+
* @response `200` `AddressEntityPaginatedDto`
|
|
2428
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
2429
|
+
*/
|
|
2430
|
+
listUserAddresses: (userId: string, query?: {
|
|
2431
|
+
createdAt?: string;
|
|
2432
|
+
/**
|
|
2433
|
+
* @default 10
|
|
2434
|
+
* @example 10
|
|
2435
|
+
*/
|
|
2436
|
+
limit?: number;
|
|
2437
|
+
orderBy?: OrderByEnum;
|
|
2438
|
+
/**
|
|
2439
|
+
* @default 1
|
|
2440
|
+
* @example 1
|
|
2441
|
+
*/
|
|
2442
|
+
page?: number;
|
|
2443
|
+
search?: string;
|
|
2444
|
+
sortBy?: string[];
|
|
2445
|
+
}, params?: RequestParams) => Promise<AddressEntityPaginatedDto>;
|
|
1910
2446
|
/**
|
|
1911
2447
|
* No description
|
|
1912
2448
|
*
|
|
@@ -1931,6 +2467,17 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1931
2467
|
updateUserProfile: (userId: string, data: UpdateUserProfileDto, params?: RequestParams) => Promise<UserEntityDto>;
|
|
1932
2468
|
};
|
|
1933
2469
|
admin: {
|
|
2470
|
+
/**
|
|
2471
|
+
* No description
|
|
2472
|
+
*
|
|
2473
|
+
* @tags Admin Tenant Cases
|
|
2474
|
+
* @name AddTenantCaseBatchOperations
|
|
2475
|
+
* @request POST:/admin/tenants/{tenantId}/cases/{caseId}/operations/batch
|
|
2476
|
+
* @secure
|
|
2477
|
+
* @response `200` `CaseBatchOperationResponseDto`
|
|
2478
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin, operator
|
|
2479
|
+
*/
|
|
2480
|
+
addTenantCaseBatchOperations: (tenantId: string, caseId: string, data: CreateBatchCaseOperationsDto, params?: RequestParams) => Promise<CaseBatchOperationResponseDto>;
|
|
1934
2481
|
/**
|
|
1935
2482
|
* @description Gives some user access to the tenant. If there's no user account attached to this users, it creates a new one
|
|
1936
2483
|
*
|
|
@@ -1942,6 +2489,17 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1942
2489
|
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
1943
2490
|
*/
|
|
1944
2491
|
createOrUpdateTenantUserAndPermissionsByUserEmail: (tenantId: string, data: CreateTenantUserDto, params?: RequestParams) => Promise<TenantUserEntityDto>;
|
|
2492
|
+
/**
|
|
2493
|
+
* No description
|
|
2494
|
+
*
|
|
2495
|
+
* @tags Admin Tenant Cases
|
|
2496
|
+
* @name CreateTenantCase
|
|
2497
|
+
* @request POST:/admin/tenants/{tenantId}/cases
|
|
2498
|
+
* @secure
|
|
2499
|
+
* @response `201` `CaseEntityDto`
|
|
2500
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
2501
|
+
*/
|
|
2502
|
+
createTenantCase: (tenantId: string, data: CreateCaseDto, params?: RequestParams) => Promise<CaseEntityDto>;
|
|
1945
2503
|
/**
|
|
1946
2504
|
* No description
|
|
1947
2505
|
*
|
|
@@ -2063,6 +2621,17 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2063
2621
|
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
2064
2622
|
*/
|
|
2065
2623
|
createTenantWineVineyard: (tenantId: string, data: CreateNameOnlyEntityDto, params?: RequestParams) => Promise<WineVineyardEntityDto>;
|
|
2624
|
+
/**
|
|
2625
|
+
* No description
|
|
2626
|
+
*
|
|
2627
|
+
* @tags Admin Tenant Cases
|
|
2628
|
+
* @name DeleteTenantCase
|
|
2629
|
+
* @request DELETE:/admin/tenants/{tenantId}/cases/{caseId}
|
|
2630
|
+
* @secure
|
|
2631
|
+
* @response `204` `void`
|
|
2632
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
2633
|
+
*/
|
|
2634
|
+
deleteTenantCase: (tenantId: string, caseId: string, params?: RequestParams) => Promise<void>;
|
|
2066
2635
|
/**
|
|
2067
2636
|
* No description
|
|
2068
2637
|
*
|
|
@@ -2206,6 +2775,17 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2206
2775
|
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
2207
2776
|
*/
|
|
2208
2777
|
enableTenantUser: (tenantId: string, userId: string, params?: RequestParams) => Promise<void>;
|
|
2778
|
+
/**
|
|
2779
|
+
* No description
|
|
2780
|
+
*
|
|
2781
|
+
* @tags Admin Tenant Cases
|
|
2782
|
+
* @name GetTenantCaseById
|
|
2783
|
+
* @request GET:/admin/tenants/{tenantId}/cases/{caseId}
|
|
2784
|
+
* @secure
|
|
2785
|
+
* @response `200` `CaseEntityDto`
|
|
2786
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin, operator, customer
|
|
2787
|
+
*/
|
|
2788
|
+
getTenantCaseById: (tenantId: string, caseId: string, params?: RequestParams) => Promise<CaseEntityDto>;
|
|
2209
2789
|
/**
|
|
2210
2790
|
* No description
|
|
2211
2791
|
*
|
|
@@ -2327,6 +2907,66 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2327
2907
|
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin, operator
|
|
2328
2908
|
*/
|
|
2329
2909
|
getTenantWineVineyardById: (tenantId: string, vineyardId: string, params?: RequestParams) => Promise<WineVineyardEntityDto>;
|
|
2910
|
+
/**
|
|
2911
|
+
* No description
|
|
2912
|
+
*
|
|
2913
|
+
* @tags Admin Tenant Cases
|
|
2914
|
+
* @name ListTenantCaseInventory
|
|
2915
|
+
* @request GET:/admin/tenants/{tenantId}/cases/{caseId}/inventory
|
|
2916
|
+
* @secure
|
|
2917
|
+
* @response `200` `CaseWineInventoryItemEntityPaginatedDto`
|
|
2918
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin, operator, customer
|
|
2919
|
+
*/
|
|
2920
|
+
listTenantCaseInventory: (tenantId: string, caseId: string, query?: {
|
|
2921
|
+
amount?: string;
|
|
2922
|
+
bottleFormatIds?: string[];
|
|
2923
|
+
bottleVintageIds?: string[];
|
|
2924
|
+
createdAt?: string;
|
|
2925
|
+
/**
|
|
2926
|
+
* @default 10
|
|
2927
|
+
* @example 10
|
|
2928
|
+
*/
|
|
2929
|
+
limit?: number;
|
|
2930
|
+
orderBy?: OrderByEnum;
|
|
2931
|
+
/**
|
|
2932
|
+
* @default 1
|
|
2933
|
+
* @example 1
|
|
2934
|
+
*/
|
|
2935
|
+
page?: number;
|
|
2936
|
+
search?: string;
|
|
2937
|
+
sortBy?: string[];
|
|
2938
|
+
wineIds?: string[];
|
|
2939
|
+
}, params?: RequestParams) => Promise<CaseWineInventoryItemEntityPaginatedDto>;
|
|
2940
|
+
/**
|
|
2941
|
+
* No description
|
|
2942
|
+
*
|
|
2943
|
+
* @tags Admin Tenant Cases
|
|
2944
|
+
* @name ListTenantCases
|
|
2945
|
+
* @request GET:/admin/tenants/{tenantId}/cases
|
|
2946
|
+
* @secure
|
|
2947
|
+
* @response `200` `CaseEntityPaginatedDto`
|
|
2948
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin, operator, customer
|
|
2949
|
+
*/
|
|
2950
|
+
listTenantCases: (tenantId: string, query?: {
|
|
2951
|
+
billingEndDate?: string;
|
|
2952
|
+
billingStartDate?: string;
|
|
2953
|
+
createdAt?: string;
|
|
2954
|
+
customerIds?: string[];
|
|
2955
|
+
/**
|
|
2956
|
+
* @default 10
|
|
2957
|
+
* @example 10
|
|
2958
|
+
*/
|
|
2959
|
+
limit?: number;
|
|
2960
|
+
minRemainingItems?: number;
|
|
2961
|
+
orderBy?: OrderByEnum;
|
|
2962
|
+
/**
|
|
2963
|
+
* @default 1
|
|
2964
|
+
* @example 1
|
|
2965
|
+
*/
|
|
2966
|
+
page?: number;
|
|
2967
|
+
search?: string;
|
|
2968
|
+
sortBy?: string[];
|
|
2969
|
+
}, params?: RequestParams) => Promise<CaseEntityPaginatedDto>;
|
|
2330
2970
|
/**
|
|
2331
2971
|
* No description
|
|
2332
2972
|
*
|
|
@@ -2646,6 +3286,17 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2646
3286
|
search?: string;
|
|
2647
3287
|
sortBy?: string[];
|
|
2648
3288
|
}, params?: RequestParams) => Promise<WineVineyardEntityPaginatedDto>;
|
|
3289
|
+
/**
|
|
3290
|
+
* No description
|
|
3291
|
+
*
|
|
3292
|
+
* @tags Admin Tenant Cases
|
|
3293
|
+
* @name UpdateTenantCase
|
|
3294
|
+
* @request PATCH:/admin/tenants/{tenantId}/cases/{caseId}
|
|
3295
|
+
* @secure
|
|
3296
|
+
* @response `200` `CaseEntityDto`
|
|
3297
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
3298
|
+
*/
|
|
3299
|
+
updateTenantCase: (tenantId: string, caseId: string, data: UpdateCaseDto, params?: RequestParams) => Promise<CaseEntityDto>;
|
|
2649
3300
|
/**
|
|
2650
3301
|
* No description
|
|
2651
3302
|
*
|