@vindentech/api-client 0.3.0-next.0 → 0.3.0-next.10
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/README.md +81 -0
- package/dist/client.d.ts +30 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +27 -6
- package/dist/client.js.map +1 -1
- package/dist/generated/_all.d.ts +58 -0
- package/dist/generated/_all.d.ts.map +1 -0
- package/dist/generated/_all.js +60 -0
- package/dist/generated/_all.js.map +1 -0
- package/dist/generated/_permissions.d.ts +797 -0
- package/dist/generated/_permissions.d.ts.map +1 -0
- package/dist/generated/_permissions.js +207 -0
- package/dist/generated/_permissions.js.map +1 -0
- package/dist/generated/account-credits/account-credits.d.ts +72 -0
- package/dist/generated/account-credits/account-credits.d.ts.map +1 -0
- package/dist/generated/account-credits/account-credits.js +57 -0
- package/dist/generated/account-credits/account-credits.js.map +1 -0
- package/dist/generated/addresses/addresses.d.ts +86 -0
- package/dist/generated/addresses/addresses.d.ts.map +1 -0
- package/dist/generated/addresses/addresses.js +62 -0
- package/dist/generated/addresses/addresses.js.map +1 -0
- package/dist/generated/articles/articles.d.ts +4 -0
- package/dist/generated/articles/articles.d.ts.map +1 -1
- package/dist/generated/articles/articles.js.map +1 -1
- package/dist/generated/billable-event-types/billable-event-types.d.ts +23 -0
- package/dist/generated/billable-event-types/billable-event-types.d.ts.map +1 -0
- package/dist/generated/billable-event-types/billable-event-types.js +12 -0
- package/dist/generated/billable-event-types/billable-event-types.js.map +1 -0
- package/dist/generated/billable-events-webhook/billable-events-webhook.d.ts +23 -0
- package/dist/generated/billable-events-webhook/billable-events-webhook.d.ts.map +1 -0
- package/dist/generated/billable-events-webhook/billable-events-webhook.js +14 -0
- package/dist/generated/billable-events-webhook/billable-events-webhook.js.map +1 -0
- package/dist/generated/billing-accounts/billing-accounts.d.ts +12 -1
- package/dist/generated/billing-accounts/billing-accounts.d.ts.map +1 -1
- package/dist/generated/billing-accounts/billing-accounts.js +0 -1
- package/dist/generated/billing-accounts/billing-accounts.js.map +1 -1
- package/dist/generated/billing-model-templates/billing-model-templates.d.ts +23 -0
- package/dist/generated/billing-model-templates/billing-model-templates.d.ts.map +1 -0
- package/dist/generated/billing-model-templates/billing-model-templates.js +12 -0
- package/dist/generated/billing-model-templates/billing-model-templates.js.map +1 -0
- package/dist/generated/binding-plans/binding-plans.d.ts +37 -0
- package/dist/generated/binding-plans/binding-plans.d.ts.map +1 -0
- package/dist/generated/binding-plans/binding-plans.js +31 -0
- package/dist/generated/binding-plans/binding-plans.js.map +1 -0
- package/dist/generated/bookings/bookings.d.ts +51 -0
- package/dist/generated/bookings/bookings.d.ts.map +1 -0
- package/dist/generated/bookings/bookings.js +34 -0
- package/dist/generated/bookings/bookings.js.map +1 -0
- package/dist/generated/carrier-bookings/carrier-bookings.d.ts +23 -0
- package/dist/generated/carrier-bookings/carrier-bookings.d.ts.map +1 -0
- package/dist/generated/carrier-bookings/carrier-bookings.js +19 -0
- package/dist/generated/carrier-bookings/carrier-bookings.js.map +1 -0
- package/dist/generated/carts/carts.d.ts +121 -0
- package/dist/generated/carts/carts.d.ts.map +1 -0
- package/dist/generated/carts/carts.js +92 -0
- package/dist/generated/carts/carts.js.map +1 -0
- package/dist/generated/check-in/check-in.d.ts +51 -0
- package/dist/generated/check-in/check-in.d.ts.map +1 -0
- package/dist/generated/check-in/check-in.js +38 -0
- package/dist/generated/check-in/check-in.js.map +1 -0
- package/dist/generated/container-types/container-types.d.ts +30 -0
- package/dist/generated/container-types/container-types.d.ts.map +1 -0
- package/dist/generated/container-types/container-types.js +13 -0
- package/dist/generated/container-types/container-types.js.map +1 -0
- package/dist/generated/containers/containers.d.ts +86 -0
- package/dist/generated/containers/containers.d.ts.map +1 -0
- package/dist/generated/containers/containers.js +62 -0
- package/dist/generated/containers/containers.js.map +1 -0
- package/dist/generated/coupons/coupons.d.ts +121 -0
- package/dist/generated/coupons/coupons.d.ts.map +1 -0
- package/dist/generated/coupons/coupons.js +90 -0
- package/dist/generated/coupons/coupons.js.map +1 -0
- package/dist/generated/damage-reports/damage-reports.d.ts +37 -0
- package/dist/generated/damage-reports/damage-reports.d.ts.map +1 -0
- package/dist/generated/damage-reports/damage-reports.js +24 -0
- package/dist/generated/damage-reports/damage-reports.js.map +1 -0
- package/dist/generated/discount-rules/discount-rules.d.ts +37 -0
- package/dist/generated/discount-rules/discount-rules.d.ts.map +1 -0
- package/dist/generated/discount-rules/discount-rules.js +31 -0
- package/dist/generated/discount-rules/discount-rules.js.map +1 -0
- package/dist/generated/files/files.d.ts +23 -0
- package/dist/generated/files/files.d.ts.map +1 -0
- package/dist/generated/files/files.js +14 -0
- package/dist/generated/files/files.js.map +1 -0
- package/dist/generated/folders/folders.d.ts +100 -0
- package/dist/generated/folders/folders.d.ts.map +1 -0
- package/dist/generated/folders/folders.js +74 -0
- package/dist/generated/folders/folders.js.map +1 -0
- package/dist/generated/fortnox-o-auth/fortnox-o-auth.d.ts +1 -1
- package/dist/generated/hasura-sales-order-webhook/hasura-sales-order-webhook.d.ts +23 -0
- package/dist/generated/hasura-sales-order-webhook/hasura-sales-order-webhook.d.ts.map +1 -0
- package/dist/generated/hasura-sales-order-webhook/hasura-sales-order-webhook.js +12 -0
- package/dist/generated/hasura-sales-order-webhook/hasura-sales-order-webhook.js.map +1 -0
- package/dist/generated/hasura-user-webhook/hasura-user-webhook.d.ts +23 -0
- package/dist/generated/hasura-user-webhook/hasura-user-webhook.d.ts.map +1 -0
- package/dist/generated/hasura-user-webhook/hasura-user-webhook.js +12 -0
- package/dist/generated/hasura-user-webhook/hasura-user-webhook.js.map +1 -0
- package/dist/generated/health/health.d.ts +1 -0
- package/dist/generated/health/health.d.ts.map +1 -1
- package/dist/generated/health/health.js.map +1 -1
- package/dist/generated/index.schemas.d.ts +4726 -471
- package/dist/generated/index.schemas.d.ts.map +1 -1
- package/dist/generated/index.schemas.js +282 -0
- package/dist/generated/index.schemas.js.map +1 -1
- package/dist/generated/integrations/integrations.d.ts +61 -1
- package/dist/generated/integrations/integrations.d.ts.map +1 -1
- package/dist/generated/integrations/integrations.js +42 -0
- package/dist/generated/integrations/integrations.js.map +1 -1
- package/dist/generated/invoices/invoices.d.ts +143 -1
- package/dist/generated/invoices/invoices.d.ts.map +1 -1
- package/dist/generated/invoices/invoices.js +77 -0
- package/dist/generated/invoices/invoices.js.map +1 -1
- package/dist/generated/items/items.d.ts +51 -0
- package/dist/generated/items/items.d.ts.map +1 -0
- package/dist/generated/items/items.js +41 -0
- package/dist/generated/items/items.js.map +1 -0
- package/dist/generated/me/me.d.ts +16 -1
- package/dist/generated/me/me.d.ts.map +1 -1
- package/dist/generated/me/me.js +12 -0
- package/dist/generated/me/me.js.map +1 -1
- package/dist/generated/move-adjust/move-adjust.d.ts +37 -0
- package/dist/generated/move-adjust/move-adjust.d.ts.map +1 -0
- package/dist/generated/move-adjust/move-adjust.js +26 -0
- package/dist/generated/move-adjust/move-adjust.js.map +1 -0
- package/dist/generated/order-groups/order-groups.d.ts +37 -0
- package/dist/generated/order-groups/order-groups.d.ts.map +1 -0
- package/dist/generated/order-groups/order-groups.js +29 -0
- package/dist/generated/order-groups/order-groups.js.map +1 -0
- package/dist/generated/orders/orders.d.ts +23 -8
- package/dist/generated/orders/orders.d.ts.map +1 -1
- package/dist/generated/orders/orders.js +21 -4
- package/dist/generated/orders/orders.js.map +1 -1
- package/dist/generated/org-contacts/org-contacts.d.ts +65 -0
- package/dist/generated/org-contacts/org-contacts.d.ts.map +1 -0
- package/dist/generated/org-contacts/org-contacts.js +53 -0
- package/dist/generated/org-contacts/org-contacts.js.map +1 -0
- package/dist/generated/organizations/organizations.d.ts +79 -0
- package/dist/generated/organizations/organizations.d.ts.map +1 -0
- package/dist/generated/organizations/organizations.js +63 -0
- package/dist/generated/organizations/organizations.js.map +1 -0
- package/dist/generated/outbound/outbound.d.ts +51 -0
- package/dist/generated/outbound/outbound.d.ts.map +1 -0
- package/dist/generated/outbound/outbound.js +38 -0
- package/dist/generated/outbound/outbound.js.map +1 -0
- package/dist/generated/payment-instruments/payment-instruments.d.ts +23 -0
- package/dist/generated/payment-instruments/payment-instruments.d.ts.map +1 -0
- package/dist/generated/payment-instruments/payment-instruments.js +12 -0
- package/dist/generated/payment-instruments/payment-instruments.js.map +1 -0
- package/dist/generated/pods/pods.d.ts +79 -0
- package/dist/generated/pods/pods.d.ts.map +1 -0
- package/dist/generated/pods/pods.js +68 -0
- package/dist/generated/pods/pods.js.map +1 -0
- package/dist/generated/positions/positions.d.ts +135 -0
- package/dist/generated/positions/positions.d.ts.map +1 -0
- package/dist/generated/positions/positions.js +91 -0
- package/dist/generated/positions/positions.js.map +1 -0
- package/dist/generated/price-lists/price-lists.d.ts +6 -0
- package/dist/generated/price-lists/price-lists.d.ts.map +1 -1
- package/dist/generated/price-lists/price-lists.js.map +1 -1
- package/dist/generated/pricing-rules/pricing-rules.d.ts +37 -0
- package/dist/generated/pricing-rules/pricing-rules.d.ts.map +1 -0
- package/dist/generated/pricing-rules/pricing-rules.js +31 -0
- package/dist/generated/pricing-rules/pricing-rules.js.map +1 -0
- package/dist/generated/products/products.d.ts +100 -0
- package/dist/generated/products/products.d.ts.map +1 -0
- package/dist/generated/products/products.js +74 -0
- package/dist/generated/products/products.js.map +1 -0
- package/dist/generated/provider-switch/provider-switch.d.ts +2 -0
- package/dist/generated/provider-switch/provider-switch.d.ts.map +1 -1
- package/dist/generated/provider-switch/provider-switch.js.map +1 -1
- package/dist/generated/receive/receive.d.ts +65 -0
- package/dist/generated/receive/receive.d.ts.map +1 -0
- package/dist/generated/receive/receive.js +50 -0
- package/dist/generated/receive/receive.js.map +1 -0
- package/dist/generated/route-stops/route-stops.d.ts +65 -0
- package/dist/generated/route-stops/route-stops.d.ts.map +1 -0
- package/dist/generated/route-stops/route-stops.js +50 -0
- package/dist/generated/route-stops/route-stops.js.map +1 -0
- package/dist/generated/routes/routes.d.ts +205 -0
- package/dist/generated/routes/routes.d.ts.map +1 -0
- package/dist/generated/routes/routes.js +169 -0
- package/dist/generated/routes/routes.js.map +1 -0
- package/dist/generated/sales-orders/sales-orders.d.ts +23 -0
- package/dist/generated/sales-orders/sales-orders.d.ts.map +1 -0
- package/dist/generated/sales-orders/sales-orders.js +19 -0
- package/dist/generated/sales-orders/sales-orders.js.map +1 -0
- package/dist/generated/sessions/sessions.d.ts +23 -0
- package/dist/generated/sessions/sessions.d.ts.map +1 -0
- package/dist/generated/sessions/sessions.js +12 -0
- package/dist/generated/sessions/sessions.js.map +1 -0
- package/dist/generated/shipments/shipments.d.ts +23 -0
- package/dist/generated/shipments/shipments.d.ts.map +1 -0
- package/dist/generated/shipments/shipments.js +12 -0
- package/dist/generated/shipments/shipments.js.map +1 -0
- package/dist/generated/stripe-webhook/stripe-webhook.d.ts +1 -1
- package/dist/generated/subscription-configs/subscription-configs.d.ts +3 -0
- package/dist/generated/subscription-configs/subscription-configs.d.ts.map +1 -1
- package/dist/generated/subscription-configs/subscription-configs.js.map +1 -1
- package/dist/generated/sync-dimensions/sync-dimensions.d.ts +23 -0
- package/dist/generated/sync-dimensions/sync-dimensions.d.ts.map +1 -0
- package/dist/generated/sync-dimensions/sync-dimensions.js +14 -0
- package/dist/generated/sync-dimensions/sync-dimensions.js.map +1 -0
- package/dist/generated/tenant-config/tenant-config.d.ts +2 -0
- package/dist/generated/tenant-config/tenant-config.d.ts.map +1 -1
- package/dist/generated/tenant-config/tenant-config.js.map +1 -1
- package/dist/generated/transport/transport.d.ts +37 -0
- package/dist/generated/transport/transport.d.ts.map +1 -0
- package/dist/generated/transport/transport.js +36 -0
- package/dist/generated/transport/transport.js.map +1 -0
- package/dist/generated/transport-leg-booking/transport-leg-booking.d.ts +37 -0
- package/dist/generated/transport-leg-booking/transport-leg-booking.d.ts.map +1 -0
- package/dist/generated/transport-leg-booking/transport-leg-booking.js +24 -0
- package/dist/generated/transport-leg-booking/transport-leg-booking.js.map +1 -0
- package/dist/generated/transport-legs/transport-legs.d.ts +149 -0
- package/dist/generated/transport-legs/transport-legs.d.ts.map +1 -0
- package/dist/generated/transport-legs/transport-legs.js +125 -0
- package/dist/generated/transport-legs/transport-legs.js.map +1 -0
- package/dist/generated/units-of-measure/units-of-measure.d.ts +37 -0
- package/dist/generated/units-of-measure/units-of-measure.d.ts.map +1 -0
- package/dist/generated/units-of-measure/units-of-measure.js +29 -0
- package/dist/generated/units-of-measure/units-of-measure.js.map +1 -0
- package/dist/generated/warehouse-orders/warehouse-orders.d.ts +107 -0
- package/dist/generated/warehouse-orders/warehouse-orders.d.ts.map +1 -0
- package/dist/generated/warehouse-orders/warehouse-orders.js +89 -0
- package/dist/generated/warehouse-orders/warehouse-orders.js.map +1 -0
- package/dist/generated/warehouses/warehouses.d.ts +135 -0
- package/dist/generated/warehouses/warehouses.d.ts.map +1 -0
- package/dist/generated/warehouses/warehouses.js +83 -0
- package/dist/generated/warehouses/warehouses.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/permissions.d.ts +46 -0
- package/dist/permissions.d.ts.map +1 -0
- package/dist/permissions.js +53 -0
- package/dist/permissions.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Vinden Core API
|
|
5
|
+
* Core API for the Vinden Platform
|
|
6
|
+
* OpenAPI spec version: 0.1.0
|
|
7
|
+
*/
|
|
8
|
+
import type { AddWarehouseOrderProductDto, AddedWarehouseOrderProductDto, CreateWarehouseOrderDto, RegisterLaborDto, UpdateWarehouseOrderStatusDto, WarehouseOrderCommandResultDto, WarehouseOrderDetailDto, WarehouseOrderSummaryDto, WarehouseOrdersControllerListV1Params, WaybillImageDto, WaybillImageResultDto } from '../index.schemas.js';
|
|
9
|
+
/**
|
|
10
|
+
* 🔒 Requires permission: warehouseorder:read. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
11
|
+
* @summary List warehouse orders visible to the caller (RLS-scoped)
|
|
12
|
+
*/
|
|
13
|
+
export type warehouseOrdersControllerListV1Response200 = {
|
|
14
|
+
data: WarehouseOrderSummaryDto[];
|
|
15
|
+
status: 200;
|
|
16
|
+
};
|
|
17
|
+
export type warehouseOrdersControllerListV1ResponseSuccess = (warehouseOrdersControllerListV1Response200) & {
|
|
18
|
+
headers: Headers;
|
|
19
|
+
};
|
|
20
|
+
export type warehouseOrdersControllerListV1Response = (warehouseOrdersControllerListV1ResponseSuccess);
|
|
21
|
+
export declare const getWarehouseOrdersControllerListV1Url: (params?: WarehouseOrdersControllerListV1Params) => string;
|
|
22
|
+
export declare const warehouseOrdersControllerListV1: (params?: WarehouseOrdersControllerListV1Params, options?: RequestInit) => Promise<warehouseOrdersControllerListV1Response>;
|
|
23
|
+
/**
|
|
24
|
+
* 🔒 Requires permission: warehouseorder:write. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
25
|
+
* @summary Create a warehouse order with its lines (non-TRANSFER) or containers (TRANSFER)
|
|
26
|
+
*/
|
|
27
|
+
export type warehouseOrdersControllerCreateV1Response201 = {
|
|
28
|
+
data: WarehouseOrderCommandResultDto;
|
|
29
|
+
status: 201;
|
|
30
|
+
};
|
|
31
|
+
export type warehouseOrdersControllerCreateV1ResponseSuccess = (warehouseOrdersControllerCreateV1Response201) & {
|
|
32
|
+
headers: Headers;
|
|
33
|
+
};
|
|
34
|
+
export type warehouseOrdersControllerCreateV1Response = (warehouseOrdersControllerCreateV1ResponseSuccess);
|
|
35
|
+
export declare const getWarehouseOrdersControllerCreateV1Url: () => string;
|
|
36
|
+
export declare const warehouseOrdersControllerCreateV1: (createWarehouseOrderDto: CreateWarehouseOrderDto, options?: RequestInit) => Promise<warehouseOrdersControllerCreateV1Response>;
|
|
37
|
+
/**
|
|
38
|
+
* 🔒 Requires permission: warehouseorder:read. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
39
|
+
* @summary Get one warehouse order with its lines, containers and status history
|
|
40
|
+
*/
|
|
41
|
+
export type warehouseOrdersControllerGetByIdV1Response200 = {
|
|
42
|
+
data: WarehouseOrderDetailDto;
|
|
43
|
+
status: 200;
|
|
44
|
+
};
|
|
45
|
+
export type warehouseOrdersControllerGetByIdV1ResponseSuccess = (warehouseOrdersControllerGetByIdV1Response200) & {
|
|
46
|
+
headers: Headers;
|
|
47
|
+
};
|
|
48
|
+
export type warehouseOrdersControllerGetByIdV1Response = (warehouseOrdersControllerGetByIdV1ResponseSuccess);
|
|
49
|
+
export declare const getWarehouseOrdersControllerGetByIdV1Url: (id: string) => string;
|
|
50
|
+
export declare const warehouseOrdersControllerGetByIdV1: (id: string, options?: RequestInit) => Promise<warehouseOrdersControllerGetByIdV1Response>;
|
|
51
|
+
/**
|
|
52
|
+
* 🔒 Requires permission: warehouseorder:write. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
53
|
+
* @summary Register other work — log labor/time as an OTHER-typed warehouse order
|
|
54
|
+
*/
|
|
55
|
+
export type warehouseOrdersControllerRegisterLaborV1Response201 = {
|
|
56
|
+
data: WarehouseOrderCommandResultDto;
|
|
57
|
+
status: 201;
|
|
58
|
+
};
|
|
59
|
+
export type warehouseOrdersControllerRegisterLaborV1ResponseSuccess = (warehouseOrdersControllerRegisterLaborV1Response201) & {
|
|
60
|
+
headers: Headers;
|
|
61
|
+
};
|
|
62
|
+
export type warehouseOrdersControllerRegisterLaborV1Response = (warehouseOrdersControllerRegisterLaborV1ResponseSuccess);
|
|
63
|
+
export declare const getWarehouseOrdersControllerRegisterLaborV1Url: () => string;
|
|
64
|
+
export declare const warehouseOrdersControllerRegisterLaborV1: (registerLaborDto: RegisterLaborDto, options?: RequestInit) => Promise<warehouseOrdersControllerRegisterLaborV1Response>;
|
|
65
|
+
/**
|
|
66
|
+
* 🔒 Requires permission: warehouseorder:write. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
67
|
+
* @summary Guarded warehouse-order status transition (writes the audit row)
|
|
68
|
+
*/
|
|
69
|
+
export type warehouseOrdersControllerUpdateStatusV1Response200 = {
|
|
70
|
+
data: WarehouseOrderCommandResultDto;
|
|
71
|
+
status: 200;
|
|
72
|
+
};
|
|
73
|
+
export type warehouseOrdersControllerUpdateStatusV1ResponseSuccess = (warehouseOrdersControllerUpdateStatusV1Response200) & {
|
|
74
|
+
headers: Headers;
|
|
75
|
+
};
|
|
76
|
+
export type warehouseOrdersControllerUpdateStatusV1Response = (warehouseOrdersControllerUpdateStatusV1ResponseSuccess);
|
|
77
|
+
export declare const getWarehouseOrdersControllerUpdateStatusV1Url: (id: string) => string;
|
|
78
|
+
export declare const warehouseOrdersControllerUpdateStatusV1: (id: string, updateWarehouseOrderStatusDto: UpdateWarehouseOrderStatusDto, options?: RequestInit) => Promise<warehouseOrdersControllerUpdateStatusV1Response>;
|
|
79
|
+
/**
|
|
80
|
+
* 🔒 Requires permission: warehouseorder:write. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
81
|
+
* @summary Add a product line to an existing non-TRANSFER warehouse order
|
|
82
|
+
*/
|
|
83
|
+
export type warehouseOrdersControllerAddProductV1Response201 = {
|
|
84
|
+
data: AddedWarehouseOrderProductDto;
|
|
85
|
+
status: 201;
|
|
86
|
+
};
|
|
87
|
+
export type warehouseOrdersControllerAddProductV1ResponseSuccess = (warehouseOrdersControllerAddProductV1Response201) & {
|
|
88
|
+
headers: Headers;
|
|
89
|
+
};
|
|
90
|
+
export type warehouseOrdersControllerAddProductV1Response = (warehouseOrdersControllerAddProductV1ResponseSuccess);
|
|
91
|
+
export declare const getWarehouseOrdersControllerAddProductV1Url: (id: string) => string;
|
|
92
|
+
export declare const warehouseOrdersControllerAddProductV1: (id: string, addWarehouseOrderProductDto: AddWarehouseOrderProductDto, options?: RequestInit) => Promise<warehouseOrdersControllerAddProductV1Response>;
|
|
93
|
+
/**
|
|
94
|
+
* 🔒 Requires permission: warehouseorder:write. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
95
|
+
* @summary Attach a pre-uploaded goods-in waybill photo to a warehouse order
|
|
96
|
+
*/
|
|
97
|
+
export type warehouseOrdersControllerAttachWaybillImageV1Response200 = {
|
|
98
|
+
data: WaybillImageResultDto;
|
|
99
|
+
status: 200;
|
|
100
|
+
};
|
|
101
|
+
export type warehouseOrdersControllerAttachWaybillImageV1ResponseSuccess = (warehouseOrdersControllerAttachWaybillImageV1Response200) & {
|
|
102
|
+
headers: Headers;
|
|
103
|
+
};
|
|
104
|
+
export type warehouseOrdersControllerAttachWaybillImageV1Response = (warehouseOrdersControllerAttachWaybillImageV1ResponseSuccess);
|
|
105
|
+
export declare const getWarehouseOrdersControllerAttachWaybillImageV1Url: (id: string) => string;
|
|
106
|
+
export declare const warehouseOrdersControllerAttachWaybillImageV1: (id: string, waybillImageDto: WaybillImageDto, options?: RequestInit) => Promise<warehouseOrdersControllerAttachWaybillImageV1Response>;
|
|
107
|
+
//# sourceMappingURL=warehouse-orders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warehouse-orders.d.ts","sourceRoot":"","sources":["../../../src/generated/warehouse-orders/warehouse-orders.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,2BAA2B,EAC3B,6BAA6B,EAC7B,uBAAuB,EACvB,gBAAgB,EAChB,6BAA6B,EAC7B,8BAA8B,EAC9B,uBAAuB,EACvB,wBAAwB,EACxB,qCAAqC,EACrC,eAAe,EACf,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAI7B;;;GAGG;AACH,MAAM,MAAM,0CAA0C,GAAG;IACvD,IAAI,EAAE,wBAAwB,EAAE,CAAA;IAChC,MAAM,EAAE,GAAG,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,8CAA8C,GAAG,CAAC,0CAA0C,CAAC,GAAG;IAC1G,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAGF,MAAM,MAAM,uCAAuC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IACrE,IAAI,EAAE,qBAAqB,CAAA;IAC3B,MAAM,EAAE,GAAG,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,4DAA4D,GAAG,CAAC,wDAAwD,CAAC,GAAG;IACtI,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAGF,MAAM,MAAM,qDAAqD,GAAG,CAAC,4DAA4D,CAAC,CAAA;AAElI,eAAO,MAAM,mDAAmD,GAAI,IAAI,MAAM,WAM7E,CAAA;AAED,eAAO,MAAM,6CAA6C,GAAU,IAAI,MAAM,EAC1E,iBAAiB,eAAe,EAAE,UAAU,WAAW,KAAG,OAAO,CAAC,qDAAqD,CAUxH,CAAA"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { customFetch } from '../../mutator.js';
|
|
2
|
+
;
|
|
3
|
+
export const getWarehouseOrdersControllerListV1Url = (params) => {
|
|
4
|
+
const normalizedParams = new URLSearchParams();
|
|
5
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
6
|
+
if (value !== undefined) {
|
|
7
|
+
normalizedParams.append(key, value === null ? 'null' : value.toString());
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
const stringifiedParams = normalizedParams.toString();
|
|
11
|
+
return stringifiedParams.length > 0 ? `/v1/warehouse-orders?${stringifiedParams}` : `/v1/warehouse-orders`;
|
|
12
|
+
};
|
|
13
|
+
export const warehouseOrdersControllerListV1 = async (params, options) => {
|
|
14
|
+
return customFetch(getWarehouseOrdersControllerListV1Url(params), {
|
|
15
|
+
...options,
|
|
16
|
+
method: 'GET'
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
;
|
|
20
|
+
export const getWarehouseOrdersControllerCreateV1Url = () => {
|
|
21
|
+
return `/v1/warehouse-orders`;
|
|
22
|
+
};
|
|
23
|
+
export const warehouseOrdersControllerCreateV1 = async (createWarehouseOrderDto, options) => {
|
|
24
|
+
return customFetch(getWarehouseOrdersControllerCreateV1Url(), {
|
|
25
|
+
...options,
|
|
26
|
+
method: 'POST',
|
|
27
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
28
|
+
body: JSON.stringify(createWarehouseOrderDto)
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
;
|
|
32
|
+
export const getWarehouseOrdersControllerGetByIdV1Url = (id) => {
|
|
33
|
+
return `/v1/warehouse-orders/${id}`;
|
|
34
|
+
};
|
|
35
|
+
export const warehouseOrdersControllerGetByIdV1 = async (id, options) => {
|
|
36
|
+
return customFetch(getWarehouseOrdersControllerGetByIdV1Url(id), {
|
|
37
|
+
...options,
|
|
38
|
+
method: 'GET'
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
;
|
|
42
|
+
export const getWarehouseOrdersControllerRegisterLaborV1Url = () => {
|
|
43
|
+
return `/v1/warehouse-orders/labor`;
|
|
44
|
+
};
|
|
45
|
+
export const warehouseOrdersControllerRegisterLaborV1 = async (registerLaborDto, options) => {
|
|
46
|
+
return customFetch(getWarehouseOrdersControllerRegisterLaborV1Url(), {
|
|
47
|
+
...options,
|
|
48
|
+
method: 'POST',
|
|
49
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
50
|
+
body: JSON.stringify(registerLaborDto)
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
;
|
|
54
|
+
export const getWarehouseOrdersControllerUpdateStatusV1Url = (id) => {
|
|
55
|
+
return `/v1/warehouse-orders/${id}/status`;
|
|
56
|
+
};
|
|
57
|
+
export const warehouseOrdersControllerUpdateStatusV1 = async (id, updateWarehouseOrderStatusDto, options) => {
|
|
58
|
+
return customFetch(getWarehouseOrdersControllerUpdateStatusV1Url(id), {
|
|
59
|
+
...options,
|
|
60
|
+
method: 'PATCH',
|
|
61
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
62
|
+
body: JSON.stringify(updateWarehouseOrderStatusDto)
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
;
|
|
66
|
+
export const getWarehouseOrdersControllerAddProductV1Url = (id) => {
|
|
67
|
+
return `/v1/warehouse-orders/${id}/products`;
|
|
68
|
+
};
|
|
69
|
+
export const warehouseOrdersControllerAddProductV1 = async (id, addWarehouseOrderProductDto, options) => {
|
|
70
|
+
return customFetch(getWarehouseOrdersControllerAddProductV1Url(id), {
|
|
71
|
+
...options,
|
|
72
|
+
method: 'POST',
|
|
73
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
74
|
+
body: JSON.stringify(addWarehouseOrderProductDto)
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
;
|
|
78
|
+
export const getWarehouseOrdersControllerAttachWaybillImageV1Url = (id) => {
|
|
79
|
+
return `/v1/warehouse-orders/${id}/waybill-image`;
|
|
80
|
+
};
|
|
81
|
+
export const warehouseOrdersControllerAttachWaybillImageV1 = async (id, waybillImageDto, options) => {
|
|
82
|
+
return customFetch(getWarehouseOrdersControllerAttachWaybillImageV1Url(id), {
|
|
83
|
+
...options,
|
|
84
|
+
method: 'POST',
|
|
85
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
86
|
+
body: JSON.stringify(waybillImageDto)
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=warehouse-orders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warehouse-orders.js","sourceRoot":"","sources":["../../../src/generated/warehouse-orders/warehouse-orders.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAc/C,CAAC;AAID,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,MAA8C,EAAG,EAAE;IACvG,MAAM,gBAAgB,GAAG,IAAI,eAAe,EAAE,CAAC;IAE/C,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAEpD,IAAI,KAAK,KAAK,SAAS,EAAE,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,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,qCAAqC,GAAG,KAAK,EAAE,EAAU,EAClE,2BAAwD,EAAE,OAAqB,EAA0D,EAAE;IAE7I,OAAO,WAAW,CAAgD,2CAA2C,CAAC,EAAE,CAAC,EACjH;QACE,GAAG,OAAO;QACV,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;QACpE,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB,2BAA2B,CAAE;KAChC,CACF,CAAC;AAAA,CAAC,CAAA;AAeH,CAAC;AAID,MAAM,CAAC,MAAM,mDAAmD,GAAG,CAAC,EAAU,EAAG,EAAE;IAKjF,OAAO,wBAAwB,EAAE,gBAAgB,CAAA;AACnD,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,6CAA6C,GAAG,KAAK,EAAE,EAAU,EAC1E,eAAgC,EAAE,OAAqB,EAAkE,EAAE;IAE7H,OAAO,WAAW,CAAwD,mDAAmD,CAAC,EAAE,CAAC,EACjI;QACE,GAAG,OAAO;QACV,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;QACpE,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB,eAAe,CAAE;KACpB,CACF,CAAC;AAAA,CAAC,CAAA"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.21.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Vinden Core API
|
|
5
|
+
* Core API for the Vinden Platform
|
|
6
|
+
* OpenAPI spec version: 0.1.0
|
|
7
|
+
*/
|
|
8
|
+
import type { CreatePositionDto, CreateWarehouseDto, PositionDto, UpdateWarehouseDto, ValidateLocationDto, ValidateLocationResultDto, WarehouseDto, WarehousesControllerListV1Params } from '../index.schemas.js';
|
|
9
|
+
/**
|
|
10
|
+
* 🔒 Requires permission: warehouse:read. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
11
|
+
* @summary List warehouses visible to the caller (RLS-scoped)
|
|
12
|
+
*/
|
|
13
|
+
export type warehousesControllerListV1Response200 = {
|
|
14
|
+
data: WarehouseDto[];
|
|
15
|
+
status: 200;
|
|
16
|
+
};
|
|
17
|
+
export type warehousesControllerListV1ResponseSuccess = (warehousesControllerListV1Response200) & {
|
|
18
|
+
headers: Headers;
|
|
19
|
+
};
|
|
20
|
+
export type warehousesControllerListV1Response = (warehousesControllerListV1ResponseSuccess);
|
|
21
|
+
export declare const getWarehousesControllerListV1Url: (params?: WarehousesControllerListV1Params) => string;
|
|
22
|
+
export declare const warehousesControllerListV1: (params?: WarehousesControllerListV1Params, options?: RequestInit) => Promise<warehousesControllerListV1Response>;
|
|
23
|
+
/**
|
|
24
|
+
* 🔒 Requires permission: warehouse:write. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
25
|
+
* @summary Create a warehouse for the tenant
|
|
26
|
+
*/
|
|
27
|
+
export type warehousesControllerCreateV1Response201 = {
|
|
28
|
+
data: WarehouseDto;
|
|
29
|
+
status: 201;
|
|
30
|
+
};
|
|
31
|
+
export type warehousesControllerCreateV1Response409 = {
|
|
32
|
+
data: void;
|
|
33
|
+
status: 409;
|
|
34
|
+
};
|
|
35
|
+
export type warehousesControllerCreateV1ResponseSuccess = (warehousesControllerCreateV1Response201) & {
|
|
36
|
+
headers: Headers;
|
|
37
|
+
};
|
|
38
|
+
export type warehousesControllerCreateV1ResponseError = (warehousesControllerCreateV1Response409) & {
|
|
39
|
+
headers: Headers;
|
|
40
|
+
};
|
|
41
|
+
export type warehousesControllerCreateV1Response = (warehousesControllerCreateV1ResponseSuccess | warehousesControllerCreateV1ResponseError);
|
|
42
|
+
export declare const getWarehousesControllerCreateV1Url: () => string;
|
|
43
|
+
export declare const warehousesControllerCreateV1: (createWarehouseDto: CreateWarehouseDto, options?: RequestInit) => Promise<warehousesControllerCreateV1Response>;
|
|
44
|
+
/**
|
|
45
|
+
* 🔒 Requires permission: warehouse:read. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
46
|
+
* @summary Get one warehouse
|
|
47
|
+
*/
|
|
48
|
+
export type warehousesControllerGetByIdV1Response200 = {
|
|
49
|
+
data: WarehouseDto;
|
|
50
|
+
status: 200;
|
|
51
|
+
};
|
|
52
|
+
export type warehousesControllerGetByIdV1ResponseSuccess = (warehousesControllerGetByIdV1Response200) & {
|
|
53
|
+
headers: Headers;
|
|
54
|
+
};
|
|
55
|
+
export type warehousesControllerGetByIdV1Response = (warehousesControllerGetByIdV1ResponseSuccess);
|
|
56
|
+
export declare const getWarehousesControllerGetByIdV1Url: (id: string) => string;
|
|
57
|
+
export declare const warehousesControllerGetByIdV1: (id: string, options?: RequestInit) => Promise<warehousesControllerGetByIdV1Response>;
|
|
58
|
+
/**
|
|
59
|
+
* 🔒 Requires permission: warehouse:write. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
60
|
+
* @summary Update a warehouse (partial)
|
|
61
|
+
*/
|
|
62
|
+
export type warehousesControllerUpdateV1Response200 = {
|
|
63
|
+
data: WarehouseDto;
|
|
64
|
+
status: 200;
|
|
65
|
+
};
|
|
66
|
+
export type warehousesControllerUpdateV1ResponseSuccess = (warehousesControllerUpdateV1Response200) & {
|
|
67
|
+
headers: Headers;
|
|
68
|
+
};
|
|
69
|
+
export type warehousesControllerUpdateV1Response = (warehousesControllerUpdateV1ResponseSuccess);
|
|
70
|
+
export declare const getWarehousesControllerUpdateV1Url: (id: string) => string;
|
|
71
|
+
export declare const warehousesControllerUpdateV1: (id: string, updateWarehouseDto: UpdateWarehouseDto, options?: RequestInit) => Promise<warehousesControllerUpdateV1Response>;
|
|
72
|
+
/**
|
|
73
|
+
* 🔒 Requires permission: warehouse:write. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
74
|
+
* @summary Soft-delete a warehouse
|
|
75
|
+
*/
|
|
76
|
+
export type warehousesControllerRemoveV1Response204 = {
|
|
77
|
+
data: void;
|
|
78
|
+
status: 204;
|
|
79
|
+
};
|
|
80
|
+
export type warehousesControllerRemoveV1Response409 = {
|
|
81
|
+
data: void;
|
|
82
|
+
status: 409;
|
|
83
|
+
};
|
|
84
|
+
export type warehousesControllerRemoveV1ResponseSuccess = (warehousesControllerRemoveV1Response204) & {
|
|
85
|
+
headers: Headers;
|
|
86
|
+
};
|
|
87
|
+
export type warehousesControllerRemoveV1ResponseError = (warehousesControllerRemoveV1Response409) & {
|
|
88
|
+
headers: Headers;
|
|
89
|
+
};
|
|
90
|
+
export type warehousesControllerRemoveV1Response = (warehousesControllerRemoveV1ResponseSuccess | warehousesControllerRemoveV1ResponseError);
|
|
91
|
+
export declare const getWarehousesControllerRemoveV1Url: (id: string) => string;
|
|
92
|
+
export declare const warehousesControllerRemoveV1: (id: string, options?: RequestInit) => Promise<warehousesControllerRemoveV1Response>;
|
|
93
|
+
/**
|
|
94
|
+
* 🔒 Requires permission: position:write. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
95
|
+
* @summary Create a position (slot) in this warehouse
|
|
96
|
+
*/
|
|
97
|
+
export type warehousesControllerCreatePositionV1Response201 = {
|
|
98
|
+
data: PositionDto;
|
|
99
|
+
status: 201;
|
|
100
|
+
};
|
|
101
|
+
export type warehousesControllerCreatePositionV1Response409 = {
|
|
102
|
+
data: void;
|
|
103
|
+
status: 409;
|
|
104
|
+
};
|
|
105
|
+
export type warehousesControllerCreatePositionV1ResponseSuccess = (warehousesControllerCreatePositionV1Response201) & {
|
|
106
|
+
headers: Headers;
|
|
107
|
+
};
|
|
108
|
+
export type warehousesControllerCreatePositionV1ResponseError = (warehousesControllerCreatePositionV1Response409) & {
|
|
109
|
+
headers: Headers;
|
|
110
|
+
};
|
|
111
|
+
export type warehousesControllerCreatePositionV1Response = (warehousesControllerCreatePositionV1ResponseSuccess | warehousesControllerCreatePositionV1ResponseError);
|
|
112
|
+
export declare const getWarehousesControllerCreatePositionV1Url: (id: string) => string;
|
|
113
|
+
export declare const warehousesControllerCreatePositionV1: (id: string, createPositionDto: CreatePositionDto, options?: RequestInit) => Promise<warehousesControllerCreatePositionV1Response>;
|
|
114
|
+
/**
|
|
115
|
+
* 🔒 Requires permission: warehouse:read. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
116
|
+
* @summary Is a lat/lng inside this warehouse's service polygon?
|
|
117
|
+
*/
|
|
118
|
+
export type warehousesControllerValidateLocationV1Response200 = {
|
|
119
|
+
data: ValidateLocationResultDto;
|
|
120
|
+
status: 200;
|
|
121
|
+
};
|
|
122
|
+
export type warehousesControllerValidateLocationV1Response409 = {
|
|
123
|
+
data: void;
|
|
124
|
+
status: 409;
|
|
125
|
+
};
|
|
126
|
+
export type warehousesControllerValidateLocationV1ResponseSuccess = (warehousesControllerValidateLocationV1Response200) & {
|
|
127
|
+
headers: Headers;
|
|
128
|
+
};
|
|
129
|
+
export type warehousesControllerValidateLocationV1ResponseError = (warehousesControllerValidateLocationV1Response409) & {
|
|
130
|
+
headers: Headers;
|
|
131
|
+
};
|
|
132
|
+
export type warehousesControllerValidateLocationV1Response = (warehousesControllerValidateLocationV1ResponseSuccess | warehousesControllerValidateLocationV1ResponseError);
|
|
133
|
+
export declare const getWarehousesControllerValidateLocationV1Url: (id: string) => string;
|
|
134
|
+
export declare const warehousesControllerValidateLocationV1: (id: string, validateLocationDto: ValidateLocationDto, options?: RequestInit) => Promise<warehousesControllerValidateLocationV1Response>;
|
|
135
|
+
//# sourceMappingURL=warehouses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warehouses.d.ts","sourceRoot":"","sources":["../../../src/generated/warehouses/warehouses.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,YAAY,EACZ,gCAAgC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CAAC,iDAAiD,CAAC,GAAG;IACtH,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,8CAA8C,GAAG,CAAC,qDAAqD,GAAG,mDAAmD,CAAC,CAAA;AAE1K,eAAO,MAAM,4CAA4C,GAAI,IAAI,MAAM,WAMtE,CAAA;AAED,eAAO,MAAM,sCAAsC,GAAU,IAAI,MAAM,EACnE,qBAAqB,mBAAmB,EAAE,UAAU,WAAW,KAAG,OAAO,CAAC,8CAA8C,CAUzH,CAAA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { customFetch } from '../../mutator.js';
|
|
2
|
+
;
|
|
3
|
+
export const getWarehousesControllerListV1Url = (params) => {
|
|
4
|
+
const normalizedParams = new URLSearchParams();
|
|
5
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
6
|
+
if (value !== undefined) {
|
|
7
|
+
normalizedParams.append(key, value === null ? 'null' : value.toString());
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
const stringifiedParams = normalizedParams.toString();
|
|
11
|
+
return stringifiedParams.length > 0 ? `/v1/warehouses?${stringifiedParams}` : `/v1/warehouses`;
|
|
12
|
+
};
|
|
13
|
+
export const warehousesControllerListV1 = async (params, options) => {
|
|
14
|
+
return customFetch(getWarehousesControllerListV1Url(params), {
|
|
15
|
+
...options,
|
|
16
|
+
method: 'GET'
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
export const getWarehousesControllerCreateV1Url = () => {
|
|
20
|
+
return `/v1/warehouses`;
|
|
21
|
+
};
|
|
22
|
+
export const warehousesControllerCreateV1 = async (createWarehouseDto, options) => {
|
|
23
|
+
return customFetch(getWarehousesControllerCreateV1Url(), {
|
|
24
|
+
...options,
|
|
25
|
+
method: 'POST',
|
|
26
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
27
|
+
body: JSON.stringify(createWarehouseDto)
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
;
|
|
31
|
+
export const getWarehousesControllerGetByIdV1Url = (id) => {
|
|
32
|
+
return `/v1/warehouses/${id}`;
|
|
33
|
+
};
|
|
34
|
+
export const warehousesControllerGetByIdV1 = async (id, options) => {
|
|
35
|
+
return customFetch(getWarehousesControllerGetByIdV1Url(id), {
|
|
36
|
+
...options,
|
|
37
|
+
method: 'GET'
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
;
|
|
41
|
+
export const getWarehousesControllerUpdateV1Url = (id) => {
|
|
42
|
+
return `/v1/warehouses/${id}`;
|
|
43
|
+
};
|
|
44
|
+
export const warehousesControllerUpdateV1 = async (id, updateWarehouseDto, options) => {
|
|
45
|
+
return customFetch(getWarehousesControllerUpdateV1Url(id), {
|
|
46
|
+
...options,
|
|
47
|
+
method: 'PATCH',
|
|
48
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
49
|
+
body: JSON.stringify(updateWarehouseDto)
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
export const getWarehousesControllerRemoveV1Url = (id) => {
|
|
53
|
+
return `/v1/warehouses/${id}`;
|
|
54
|
+
};
|
|
55
|
+
export const warehousesControllerRemoveV1 = async (id, options) => {
|
|
56
|
+
return customFetch(getWarehousesControllerRemoveV1Url(id), {
|
|
57
|
+
...options,
|
|
58
|
+
method: 'DELETE'
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
export const getWarehousesControllerCreatePositionV1Url = (id) => {
|
|
62
|
+
return `/v1/warehouses/${id}/positions`;
|
|
63
|
+
};
|
|
64
|
+
export const warehousesControllerCreatePositionV1 = async (id, createPositionDto, options) => {
|
|
65
|
+
return customFetch(getWarehousesControllerCreatePositionV1Url(id), {
|
|
66
|
+
...options,
|
|
67
|
+
method: 'POST',
|
|
68
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
69
|
+
body: JSON.stringify(createPositionDto)
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
export const getWarehousesControllerValidateLocationV1Url = (id) => {
|
|
73
|
+
return `/v1/warehouses/${id}/validate-location`;
|
|
74
|
+
};
|
|
75
|
+
export const warehousesControllerValidateLocationV1 = async (id, validateLocationDto, options) => {
|
|
76
|
+
return customFetch(getWarehousesControllerValidateLocationV1Url(id), {
|
|
77
|
+
...options,
|
|
78
|
+
method: 'POST',
|
|
79
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
80
|
+
body: JSON.stringify(validateLocationDto)
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=warehouses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warehouses.js","sourceRoot":"","sources":["../../../src/generated/warehouses/warehouses.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAc/C,CAAC;AAID,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,MAAyC,EAAG,EAAE;IAC7F,MAAM,gBAAgB,GAAG,IAAI,eAAe,EAAE,CAAC;IAE/C,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAEpD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,gBAAgB,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;QAC1E,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,QAAQ,EAAE,CAAC;IAEtD,OAAO,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,kBAAkB,iBAAiB,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAA;AAChG,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,EAAE,MAAyC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AAwC,EAAE,OAAqB,EAA2D,EAAE;IAE9H,OAAO,WAAW,CAAiD,4CAA4C,CAAC,EAAE,CAAC,EACnH;QACE,GAAG,OAAO;QACV,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;QACpE,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB,mBAAmB,CAAE;KACxB,CACF,CAAC;AAAA,CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { createVindenClient, type CreateVindenClientOptions, type GetTokenFn, type VindenClient, } from "./client.js";
|
|
2
2
|
export { VindenApiError } from "./mutator.js";
|
|
3
|
+
export { OPERATION_PERMISSIONS, requiredPermissions, hasRequiredPermissions, type ApiPermission, type OperationAccess, type OperationName, } from "./permissions.js";
|
|
4
|
+
export * from "./generated/_all.js";
|
|
3
5
|
export type { healthControllerCheckResponse as HealthCheckResponse, } from "./generated/health/health.js";
|
|
4
6
|
export type { meControllerGetMeV1Response as GetMeResponse, } from "./generated/me/me.js";
|
|
5
|
-
export type {
|
|
6
|
-
export type { HealthResponseDto, MeResponseDto, MembershipDto, OrderDto, OrderDtoMetadata, } from "./generated/index.schemas.js";
|
|
7
|
+
export type { ordersControllerListV1Response as ListOrdersResponse, } from "./generated/orders/orders.js";
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,UAAU,EACf,KAAK,YAAY,GAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,UAAU,EACf,KAAK,YAAY,GAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAM9C,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,GACnB,MAAM,kBAAkB,CAAC;AAQ1B,cAAc,qBAAqB,CAAC;AAKpC,YAAY,EACV,6BAA6B,IAAI,mBAAmB,GACrD,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,2BAA2B,IAAI,aAAa,GAC7C,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,8BAA8B,IAAI,kBAAkB,GACrD,MAAM,8BAA8B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
export { createVindenClient, } from "./client.js";
|
|
2
2
|
export { VindenApiError } from "./mutator.js";
|
|
3
|
+
// Per-operation access rules, surfaced from the API's @RequiresPermission /
|
|
4
|
+
// @Public decorators. `requiredPermissions(op)` returns a closed access rule;
|
|
5
|
+
// `hasRequiredPermissions(caps, op)` pairs with the `capabilities` array from
|
|
6
|
+
// GET /v1/me to gate UI before calling. Keyed by typed operation name.
|
|
7
|
+
export { OPERATION_PERMISSIONS, requiredPermissions, hasRequiredPermissions, } from "./permissions.js";
|
|
8
|
+
// The full generated surface: every operation function (e.g.
|
|
9
|
+
// `billingAccountsControllerListAccountsV1`), its response envelope type, and
|
|
10
|
+
// every DTO/params type. Re-exported wholesale from the orval-generated barrel
|
|
11
|
+
// so a new controller tag reaches consumers the moment the SDK is regenerated —
|
|
12
|
+
// no per-module hand-wiring to drift out of date. Reach any endpoint through
|
|
13
|
+
// `client.call(operation, ...args)` (see client.ts).
|
|
14
|
+
export * from "./generated/_all.js";
|
|
3
15
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,GAInB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,GAInB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,4EAA4E;AAC5E,8EAA8E;AAC9E,8EAA8E;AAC9E,uEAAuE;AACvE,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,GAIvB,MAAM,kBAAkB,CAAC;AAE1B,6DAA6D;AAC7D,8EAA8E;AAC9E,+EAA+E;AAC/E,gFAAgF;AAChF,6EAA6E;AAC7E,qDAAqD;AACrD,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { OPERATION_PERMISSIONS, type ApiPermission, type OperationAccess, type OperationName } from "./generated/_permissions.js";
|
|
2
|
+
export { OPERATION_PERMISSIONS };
|
|
3
|
+
export type { ApiPermission, OperationAccess, OperationName };
|
|
4
|
+
/**
|
|
5
|
+
* The access rule for an operation — what a caller needs to invoke it. A closed
|
|
6
|
+
* discriminated union, so every operation is classified and none reads as
|
|
7
|
+
* "open by omission":
|
|
8
|
+
* - `{ kind: "permissions", permissions }` — caller must hold ALL of them;
|
|
9
|
+
* - `{ kind: "guest-session", permissions }` — callable with a verified
|
|
10
|
+
* anonymous-session token (X-Session-Token) instead of a JWT; an
|
|
11
|
+
* authenticated caller must still hold ALL listed permissions (may be
|
|
12
|
+
* empty);
|
|
13
|
+
* - `{ kind: "authenticated" }` — any authenticated user;
|
|
14
|
+
* - `{ kind: "public" }` — no authentication required.
|
|
15
|
+
*
|
|
16
|
+
* Keyed by the operation-function name as a typed string literal (e.g.
|
|
17
|
+
* `"billingAccountsControllerCreateAccountV1"`), so a renamed or removed
|
|
18
|
+
* operation is a compile error. Pass the name string, not the function — name
|
|
19
|
+
* lookup is bundler-safe where `Function.name` is not.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* import { requiredPermissions } from "@vindentech/api-client";
|
|
23
|
+
* requiredPermissions("billingAccountsControllerCreateAccountV1");
|
|
24
|
+
* // → { kind: "permissions", permissions: ["billingaccount:write"] }
|
|
25
|
+
*/
|
|
26
|
+
export declare function requiredPermissions(operation: OperationName): OperationAccess;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the given capabilities (e.g. `me.capabilities` from `GET /v1/me`)
|
|
29
|
+
* satisfy an operation's access rule. `true` for public and authenticated-only
|
|
30
|
+
* operations (they require no specific permission); for permission-gated ones —
|
|
31
|
+
* including the authenticated-caller side of a guest-session operation — the
|
|
32
|
+
* caller must hold ALL required permissions, mirroring the backend
|
|
33
|
+
* PermissionGuard exactly. Use to gate UI before calling. (For rendering a
|
|
34
|
+
* guest flow without a signed-in user, check `kind === "guest-session"`
|
|
35
|
+
* instead — this helper answers for an authenticated caller.)
|
|
36
|
+
*
|
|
37
|
+
* For logged-out rendering, read `requiredPermissions(op).kind` to distinguish
|
|
38
|
+
* `"public"` from `"authenticated"`.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* if (hasRequiredPermissions(me.capabilities, "billingAccountsControllerCreateAccountV1")) {
|
|
42
|
+
* // show the "Create account" button
|
|
43
|
+
* }
|
|
44
|
+
*/
|
|
45
|
+
export declare function hasRequiredPermissions(capabilities: readonly string[], operation: OperationName): boolean;
|
|
46
|
+
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../src/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,qBAAqB,EAAE,CAAC;AACjC,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,aAAa,GAAG,eAAe,CAE7E;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,SAAS,EAAE,aAAa,GACvB,OAAO,CAKT"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { OPERATION_PERMISSIONS, } from "./generated/_permissions.js";
|
|
2
|
+
export { OPERATION_PERMISSIONS };
|
|
3
|
+
/**
|
|
4
|
+
* The access rule for an operation — what a caller needs to invoke it. A closed
|
|
5
|
+
* discriminated union, so every operation is classified and none reads as
|
|
6
|
+
* "open by omission":
|
|
7
|
+
* - `{ kind: "permissions", permissions }` — caller must hold ALL of them;
|
|
8
|
+
* - `{ kind: "guest-session", permissions }` — callable with a verified
|
|
9
|
+
* anonymous-session token (X-Session-Token) instead of a JWT; an
|
|
10
|
+
* authenticated caller must still hold ALL listed permissions (may be
|
|
11
|
+
* empty);
|
|
12
|
+
* - `{ kind: "authenticated" }` — any authenticated user;
|
|
13
|
+
* - `{ kind: "public" }` — no authentication required.
|
|
14
|
+
*
|
|
15
|
+
* Keyed by the operation-function name as a typed string literal (e.g.
|
|
16
|
+
* `"billingAccountsControllerCreateAccountV1"`), so a renamed or removed
|
|
17
|
+
* operation is a compile error. Pass the name string, not the function — name
|
|
18
|
+
* lookup is bundler-safe where `Function.name` is not.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* import { requiredPermissions } from "@vindentech/api-client";
|
|
22
|
+
* requiredPermissions("billingAccountsControllerCreateAccountV1");
|
|
23
|
+
* // → { kind: "permissions", permissions: ["billingaccount:write"] }
|
|
24
|
+
*/
|
|
25
|
+
export function requiredPermissions(operation) {
|
|
26
|
+
return OPERATION_PERMISSIONS[operation];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Whether the given capabilities (e.g. `me.capabilities` from `GET /v1/me`)
|
|
30
|
+
* satisfy an operation's access rule. `true` for public and authenticated-only
|
|
31
|
+
* operations (they require no specific permission); for permission-gated ones —
|
|
32
|
+
* including the authenticated-caller side of a guest-session operation — the
|
|
33
|
+
* caller must hold ALL required permissions, mirroring the backend
|
|
34
|
+
* PermissionGuard exactly. Use to gate UI before calling. (For rendering a
|
|
35
|
+
* guest flow without a signed-in user, check `kind === "guest-session"`
|
|
36
|
+
* instead — this helper answers for an authenticated caller.)
|
|
37
|
+
*
|
|
38
|
+
* For logged-out rendering, read `requiredPermissions(op).kind` to distinguish
|
|
39
|
+
* `"public"` from `"authenticated"`.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* if (hasRequiredPermissions(me.capabilities, "billingAccountsControllerCreateAccountV1")) {
|
|
43
|
+
* // show the "Create account" button
|
|
44
|
+
* }
|
|
45
|
+
*/
|
|
46
|
+
export function hasRequiredPermissions(capabilities, operation) {
|
|
47
|
+
const access = OPERATION_PERMISSIONS[operation];
|
|
48
|
+
if (access.kind !== "permissions" && access.kind !== "guest-session")
|
|
49
|
+
return true;
|
|
50
|
+
const held = new Set(capabilities);
|
|
51
|
+
return access.permissions.every((p) => held.has(p));
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=permissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../src/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,GAItB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAGjC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAwB;IAC1D,OAAO,qBAAqB,CAAC,SAAS,CAAC,CAAC;AAC1C,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,sBAAsB,CACpC,YAA+B,EAC/B,SAAwB;IAExB,MAAM,MAAM,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAC;IAChD,IAAI,MAAM,CAAC,IAAI,KAAK,aAAa,IAAI,MAAM,CAAC,IAAI,KAAK,eAAe;QAAE,OAAO,IAAI,CAAC;IAClF,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC;IACnC,OAAO,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACtD,CAAC"}
|