@23blocks/block-sales 5.2.0 → 5.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +749 -543
- package/dist/src/lib/mappers/customer-subscription.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/customer.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/entity-subscription.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/entity.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/mercadopago.mapper.d.ts +2 -2
- package/dist/src/lib/mappers/mercadopago.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/order-detail-vendor.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/order-detail.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/order-tax.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/order.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/payment.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/subscription-model.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/subscription.mapper.d.ts +2 -1
- package/dist/src/lib/mappers/subscription.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/user.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/vendor-payment.mapper.d.ts.map +1 -1
- package/dist/src/lib/services/customers.service.d.ts +0 -20
- package/dist/src/lib/services/customers.service.d.ts.map +1 -1
- package/dist/src/lib/services/entities.service.d.ts +0 -24
- package/dist/src/lib/services/entities.service.d.ts.map +1 -1
- package/dist/src/lib/services/mercadopago.service.d.ts +3 -15
- package/dist/src/lib/services/mercadopago.service.d.ts.map +1 -1
- package/dist/src/lib/services/order-details.service.d.ts +5 -18
- package/dist/src/lib/services/order-details.service.d.ts.map +1 -1
- package/dist/src/lib/services/order-taxes.service.d.ts +0 -19
- package/dist/src/lib/services/order-taxes.service.d.ts.map +1 -1
- package/dist/src/lib/services/orders.service.d.ts +5 -44
- package/dist/src/lib/services/orders.service.d.ts.map +1 -1
- package/dist/src/lib/services/payments.service.d.ts +3 -24
- package/dist/src/lib/services/payments.service.d.ts.map +1 -1
- package/dist/src/lib/services/stripe.service.d.ts +0 -43
- package/dist/src/lib/services/stripe.service.d.ts.map +1 -1
- package/dist/src/lib/services/subscription-models.service.d.ts +0 -16
- package/dist/src/lib/services/subscription-models.service.d.ts.map +1 -1
- package/dist/src/lib/services/subscriptions.service.d.ts +2 -38
- package/dist/src/lib/services/subscriptions.service.d.ts.map +1 -1
- package/dist/src/lib/services/users.service.d.ts +0 -51
- package/dist/src/lib/services/users.service.d.ts.map +1 -1
- package/dist/src/lib/services/vendor-payments.service.d.ts +2 -50
- package/dist/src/lib/services/vendor-payments.service.d.ts.map +1 -1
- package/dist/src/lib/types/customer.d.ts +37 -18
- package/dist/src/lib/types/customer.d.ts.map +1 -1
- package/dist/src/lib/types/entity.d.ts +25 -26
- package/dist/src/lib/types/entity.d.ts.map +1 -1
- package/dist/src/lib/types/mercadopago.d.ts +11 -51
- package/dist/src/lib/types/mercadopago.d.ts.map +1 -1
- package/dist/src/lib/types/order-detail.d.ts +83 -13
- package/dist/src/lib/types/order-detail.d.ts.map +1 -1
- package/dist/src/lib/types/order-tax.d.ts +17 -16
- package/dist/src/lib/types/order-tax.d.ts.map +1 -1
- package/dist/src/lib/types/order.d.ts +73 -56
- package/dist/src/lib/types/order.d.ts.map +1 -1
- package/dist/src/lib/types/payment.d.ts +76 -18
- package/dist/src/lib/types/payment.d.ts.map +1 -1
- package/dist/src/lib/types/stripe.d.ts +22 -107
- package/dist/src/lib/types/stripe.d.ts.map +1 -1
- package/dist/src/lib/types/subscription-model.d.ts +40 -37
- package/dist/src/lib/types/subscription-model.d.ts.map +1 -1
- package/dist/src/lib/types/subscription.d.ts +55 -38
- package/dist/src/lib/types/subscription.d.ts.map +1 -1
- package/dist/src/lib/types/user.d.ts +33 -46
- package/dist/src/lib/types/user.d.ts.map +1 -1
- package/dist/src/lib/types/vendor-payment.d.ts +81 -41
- package/dist/src/lib/types/vendor-payment.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2,72 +2,21 @@ import type { Transport, PageResult } from '@23blocks/contracts';
|
|
|
2
2
|
import type { SalesUser, RegisterSalesUserRequest, UpdateSalesUserRequest, ListSalesUsersParams, UserSubscription, CreateUserSubscriptionRequest, UpdateUserSubscriptionRequest, AddSubscriptionConsumptionRequest, ListUserSubscriptionsParams } from '../types/user.js';
|
|
3
3
|
import type { Order } from '../types/order.js';
|
|
4
4
|
export interface SalesUsersService {
|
|
5
|
-
/**
|
|
6
|
-
* List sales users with optional filtering and sorting.
|
|
7
|
-
* @returns Paginated list of SalesUser records with metadata.
|
|
8
|
-
*/
|
|
9
5
|
list(params?: ListSalesUsersParams): Promise<PageResult<SalesUser>>;
|
|
10
|
-
/**
|
|
11
|
-
* Get a sales user by unique ID.
|
|
12
|
-
* @returns The matching SalesUser record.
|
|
13
|
-
*/
|
|
14
6
|
get(uniqueId: string): Promise<SalesUser>;
|
|
15
|
-
/**
|
|
16
|
-
* Register a user in the sales system.
|
|
17
|
-
* @returns The newly registered SalesUser record.
|
|
18
|
-
*/
|
|
19
7
|
register(uniqueId: string, data?: RegisterSalesUserRequest): Promise<SalesUser>;
|
|
20
|
-
/**
|
|
21
|
-
* Update a sales user.
|
|
22
|
-
* @returns The updated SalesUser record.
|
|
23
|
-
*/
|
|
24
8
|
update(uniqueId: string, data: UpdateSalesUserRequest): Promise<SalesUser>;
|
|
25
|
-
/**
|
|
26
|
-
* List orders for a specific user.
|
|
27
|
-
* @returns Paginated list of Order records.
|
|
28
|
-
*/
|
|
29
9
|
listOrders(uniqueId: string, params?: {
|
|
30
10
|
page?: number;
|
|
31
11
|
perPage?: number;
|
|
32
12
|
}): Promise<PageResult<Order>>;
|
|
33
|
-
/**
|
|
34
|
-
* Get a specific order for a user.
|
|
35
|
-
* @returns The matching Order record.
|
|
36
|
-
*/
|
|
37
13
|
getOrder(uniqueId: string, orderUniqueId: string): Promise<Order>;
|
|
38
|
-
/**
|
|
39
|
-
* List subscriptions for a user.
|
|
40
|
-
* @returns Paginated list of UserSubscription records.
|
|
41
|
-
*/
|
|
42
14
|
listSubscriptions(uniqueId: string, params?: ListUserSubscriptionsParams): Promise<PageResult<UserSubscription>>;
|
|
43
|
-
/**
|
|
44
|
-
* Get a specific subscription for a user.
|
|
45
|
-
* @returns The matching UserSubscription record.
|
|
46
|
-
*/
|
|
47
15
|
getSubscription(uniqueId: string, subscriptionUniqueId: string): Promise<UserSubscription>;
|
|
48
|
-
/**
|
|
49
|
-
* Create a subscription for a user based on a subscription model.
|
|
50
|
-
* @returns The newly created UserSubscription record.
|
|
51
|
-
*/
|
|
52
16
|
createSubscription(uniqueId: string, subscriptionUniqueId: string, data: CreateUserSubscriptionRequest): Promise<UserSubscription>;
|
|
53
|
-
/**
|
|
54
|
-
* Update a user subscription.
|
|
55
|
-
* @returns The updated UserSubscription record.
|
|
56
|
-
*/
|
|
57
17
|
updateSubscription(uniqueId: string, subscriptionUniqueId: string, data: UpdateUserSubscriptionRequest): Promise<UserSubscription>;
|
|
58
|
-
/**
|
|
59
|
-
* Add a consumption record to a user subscription.
|
|
60
|
-
* @returns The updated UserSubscription record with consumption data.
|
|
61
|
-
*/
|
|
62
18
|
addConsumption(uniqueId: string, subscriptionUniqueId: string, data: AddSubscriptionConsumptionRequest): Promise<UserSubscription>;
|
|
63
|
-
/**
|
|
64
|
-
* Cancel a user subscription.
|
|
65
|
-
* @returns The UserSubscription record with cancelled status.
|
|
66
|
-
*/
|
|
67
19
|
cancelSubscription(uniqueId: string, subscriptionUniqueId: string): Promise<UserSubscription>;
|
|
68
|
-
/**
|
|
69
|
-
* Delete a user subscription.
|
|
70
|
-
*/
|
|
71
20
|
deleteSubscription(uniqueId: string, subscriptionUniqueId: string): Promise<void>;
|
|
72
21
|
}
|
|
73
22
|
export declare function createSalesUsersService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/users.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,SAAS,EACT,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,6BAA6B,EAC7B,6BAA6B,EAC7B,iCAAiC,EACjC,2BAA2B,EAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"users.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/users.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,SAAS,EACT,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,6BAA6B,EAC7B,6BAA6B,EAC7B,iCAAiC,EACjC,2BAA2B,EAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAyB/C,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;IACpE,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAChF,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAC3E,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,IAAI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@23blocks/contracts';
|
|
2
|
-
import type { VendorPayment, CreateVendorPaymentRequest, UpdateVendorPaymentRequest, OrderDetailVendor, CreateOrderDetailVendorRequest, UpdateOrderDetailVendorRequest
|
|
2
|
+
import type { VendorPayment, CreateVendorPaymentRequest, UpdateVendorPaymentRequest, PayVendorPaymentRequest, OrderDetailVendor, CreateOrderDetailVendorRequest, UpdateOrderDetailVendorRequest } from '../types/vendor-payment.js';
|
|
3
3
|
import type { VendorPaymentReportSummary, VendorPaymentReportList, VendorPaymentReportParams, ProviderReportSummary, ProviderReportList, ProviderReportParams } from '../types/report.js';
|
|
4
4
|
export interface VendorPaymentsService {
|
|
5
|
-
/**
|
|
6
|
-
* Get a vendor payment by unique ID.
|
|
7
|
-
* @returns The matching VendorPayment record.
|
|
8
|
-
*/
|
|
9
5
|
get(paymentUniqueId: string): Promise<VendorPayment>;
|
|
10
|
-
/**
|
|
11
|
-
* Create a vendor payment for an order detail.
|
|
12
|
-
* @returns The newly created VendorPayment record.
|
|
13
|
-
*/
|
|
14
6
|
create(orderUniqueId: string, detailUniqueId: string, vendorUniqueId: string, data: CreateVendorPaymentRequest): Promise<VendorPayment>;
|
|
15
|
-
/**
|
|
16
|
-
* Update an existing vendor payment.
|
|
17
|
-
* @returns The updated VendorPayment record.
|
|
18
|
-
*/
|
|
19
7
|
update(orderUniqueId: string, detailUniqueId: string, vendorUniqueId: string, paymentUniqueId: string, data: UpdateVendorPaymentRequest): Promise<VendorPayment>;
|
|
20
|
-
|
|
21
|
-
* Mark a vendor payment as paid.
|
|
22
|
-
* @returns The VendorPayment record with paid status and paidAt timestamp.
|
|
23
|
-
*/
|
|
24
|
-
pay(orderUniqueId: string, detailUniqueId: string, vendorUniqueId: string, paymentUniqueId: string): Promise<VendorPayment>;
|
|
25
|
-
/**
|
|
26
|
-
* Delete a vendor payment.
|
|
27
|
-
*/
|
|
8
|
+
pay(orderUniqueId: string, detailUniqueId: string, vendorUniqueId: string, paymentUniqueId: string, data?: PayVendorPaymentRequest): Promise<VendorPayment>;
|
|
28
9
|
delete(orderUniqueId: string, detailUniqueId: string, vendorUniqueId: string, paymentUniqueId: string): Promise<void>;
|
|
29
|
-
/**
|
|
30
|
-
* Create a provider (vendor) assignment for an order detail.
|
|
31
|
-
* @returns The newly created OrderDetailVendor record.
|
|
32
|
-
*/
|
|
33
10
|
createProvider(orderUniqueId: string, orderDetailUniqueId: string, data: CreateOrderDetailVendorRequest): Promise<OrderDetailVendor>;
|
|
34
|
-
/**
|
|
35
|
-
* Create a provider assignment by source ID.
|
|
36
|
-
* @returns The newly created OrderDetailVendor record.
|
|
37
|
-
*/
|
|
38
|
-
createProviderBySource(sourceId: string, data: CreateOrderDetailVendorBySourceRequest): Promise<OrderDetailVendor>;
|
|
39
|
-
/**
|
|
40
|
-
* Update a provider assignment for an order detail.
|
|
41
|
-
* @returns The updated OrderDetailVendor record.
|
|
42
|
-
*/
|
|
43
11
|
updateProvider(orderUniqueId: string, orderDetailUniqueId: string, providerUniqueId: string, data: UpdateOrderDetailVendorRequest): Promise<OrderDetailVendor>;
|
|
44
|
-
/**
|
|
45
|
-
* Get a detailed vendor payment report list.
|
|
46
|
-
* @returns VendorPaymentReportList with payments array, summary, and pagination meta.
|
|
47
|
-
*/
|
|
48
12
|
reportList(params: VendorPaymentReportParams): Promise<VendorPaymentReportList>;
|
|
49
|
-
/**
|
|
50
|
-
* Get a vendor payment report summary.
|
|
51
|
-
* @returns VendorPaymentReportSummary with totals and breakdown by status.
|
|
52
|
-
*/
|
|
53
13
|
reportSummary(params: VendorPaymentReportParams): Promise<VendorPaymentReportSummary>;
|
|
54
|
-
/**
|
|
55
|
-
* Get a detailed provider report list.
|
|
56
|
-
* @returns ProviderReportList with providers array, summary, and pagination meta.
|
|
57
|
-
*/
|
|
58
14
|
providerReportList(params: ProviderReportParams): Promise<ProviderReportList>;
|
|
59
|
-
/**
|
|
60
|
-
* Get a provider report summary.
|
|
61
|
-
* @returns ProviderReportSummary with totals, commissions, and breakdown by status.
|
|
62
|
-
*/
|
|
63
15
|
providerReportSummary(params: ProviderReportParams): Promise<ProviderReportSummary>;
|
|
64
16
|
}
|
|
65
17
|
export declare function createVendorPaymentsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendor-payments.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/vendor-payments.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EACV,aAAa,EACb,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,8BAA8B,EAC9B,8BAA8B,
|
|
1
|
+
{"version":3,"file":"vendor-payments.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/vendor-payments.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EACV,aAAa,EACb,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,iBAAiB,EACjB,8BAA8B,EAC9B,8BAA8B,EAC/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,EACzB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAuE5B,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACrD,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACxI,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,0BAA0B,GAAG,O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
|
6
6
|
phone?: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
status
|
|
10
|
-
|
|
7
|
+
companyUniqueId?: string;
|
|
8
|
+
stripeId?: string;
|
|
9
|
+
status?: string;
|
|
10
|
+
timeZone?: string;
|
|
11
|
+
preferredLanguage?: string;
|
|
12
|
+
avatarUrl?: string;
|
|
13
|
+
emailNotifications?: boolean;
|
|
14
|
+
smsNotifications?: boolean;
|
|
15
|
+
whatsappNotifications?: boolean;
|
|
16
|
+
otherNotifications?: boolean;
|
|
17
|
+
source?: string;
|
|
18
|
+
sourceAlias?: string;
|
|
19
|
+
sourceId?: string;
|
|
20
|
+
sourceType?: string;
|
|
11
21
|
createdAt: Date;
|
|
12
22
|
updatedAt: Date;
|
|
13
23
|
}
|
|
24
|
+
/** Matches customer_params in customers_controller.rb */
|
|
14
25
|
export interface RegisterSalesCustomerRequest {
|
|
15
|
-
email?: string;
|
|
16
26
|
name?: string;
|
|
27
|
+
email?: string;
|
|
17
28
|
phone?: string;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
29
|
+
companyUniqueId?: string;
|
|
30
|
+
stripeId?: string;
|
|
31
|
+
status?: string;
|
|
32
|
+
timeZone?: string;
|
|
33
|
+
preferredLanguage?: string;
|
|
34
|
+
avatarUrl?: string;
|
|
35
|
+
emailNotifications?: boolean;
|
|
36
|
+
smsNotifications?: boolean;
|
|
37
|
+
whatsappNotifications?: boolean;
|
|
38
|
+
otherNotifications?: boolean;
|
|
39
|
+
source?: string;
|
|
40
|
+
sourceAlias?: string;
|
|
41
|
+
sourceId?: string;
|
|
42
|
+
sourceType?: string;
|
|
21
43
|
}
|
|
22
44
|
export interface CustomerSubscription {
|
|
23
45
|
id: string;
|
|
24
46
|
uniqueId: string;
|
|
25
47
|
customerUniqueId: string;
|
|
26
48
|
subscriptionModelUniqueId: string;
|
|
49
|
+
subscriptionNumber?: string;
|
|
50
|
+
notes?: string;
|
|
27
51
|
status: string;
|
|
28
52
|
startDate?: Date;
|
|
29
53
|
endDate?: Date;
|
|
30
54
|
trialEndDate?: Date;
|
|
31
55
|
cancelledAt?: Date;
|
|
32
|
-
payload?: Record<string, unknown>;
|
|
33
56
|
createdAt: Date;
|
|
34
57
|
updatedAt: Date;
|
|
35
58
|
}
|
|
59
|
+
/** Matches customer_subscription_params in customers_controller.rb */
|
|
36
60
|
export interface CreateCustomerSubscriptionRequest {
|
|
37
61
|
subscriptionModelUniqueId: string;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
payload?: Record<string, unknown>;
|
|
41
|
-
}
|
|
42
|
-
export interface UpdateCustomerSubscriptionRequest {
|
|
43
|
-
status?: string;
|
|
44
|
-
endDate?: string;
|
|
45
|
-
payload?: Record<string, unknown>;
|
|
62
|
+
subscriptionNumber?: string;
|
|
63
|
+
notes?: string;
|
|
46
64
|
}
|
|
65
|
+
export type UpdateCustomerSubscriptionRequest = CreateCustomerSubscriptionRequest;
|
|
47
66
|
//# sourceMappingURL=customer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/customer.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,
|
|
1
|
+
{"version":3,"file":"customer.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/customer.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,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E,MAAM,CAAC;IACzB,yBAAyB,EAAE,MAAM,CAAC;IAClC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,sEAAsE;AACtE,MAAM,WAAW,iCAAiC;IAChD,yBAAyB,EAAE,MAAM,CAAC;IAClC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,iCAAiC,GAAG,iCAAiC,CAAC"}
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
export interface SalesEntity {
|
|
2
2
|
id: string;
|
|
3
3
|
uniqueId: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
entityType?: string;
|
|
5
|
+
entityAlias?: string;
|
|
6
|
+
entitySource?: string;
|
|
7
|
+
entityUrl?: string;
|
|
8
|
+
stripeId?: string;
|
|
9
|
+
status?: string;
|
|
10
|
+
timeZone?: string;
|
|
11
|
+
preferredLanguage?: string;
|
|
12
|
+
avatarUrl?: string;
|
|
10
13
|
createdAt: Date;
|
|
11
14
|
updatedAt: Date;
|
|
12
15
|
}
|
|
16
|
+
/** Matches entity_params in entities_controller.rb */
|
|
13
17
|
export interface RegisterSalesEntityRequest {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
export interface UpdateSalesEntityRequest {
|
|
21
|
-
name?: string;
|
|
22
|
-
email?: string;
|
|
23
|
-
phone?: string;
|
|
18
|
+
entityType?: string;
|
|
19
|
+
entityAlias?: string;
|
|
20
|
+
entitySource?: string;
|
|
21
|
+
entityUrl?: string;
|
|
22
|
+
stripeId?: string;
|
|
24
23
|
status?: string;
|
|
25
|
-
|
|
24
|
+
timeZone?: string;
|
|
25
|
+
preferredLanguage?: string;
|
|
26
|
+
avatarUrl?: string;
|
|
26
27
|
}
|
|
28
|
+
export type UpdateSalesEntityRequest = RegisterSalesEntityRequest;
|
|
27
29
|
export interface ListSalesEntitiesParams {
|
|
28
30
|
page?: number;
|
|
29
31
|
perPage?: number;
|
|
@@ -37,24 +39,21 @@ export interface EntitySubscription {
|
|
|
37
39
|
uniqueId: string;
|
|
38
40
|
entityUniqueId: string;
|
|
39
41
|
subscriptionModelUniqueId: string;
|
|
42
|
+
ownerUniqueId?: string;
|
|
43
|
+
ownerType?: string;
|
|
40
44
|
status: string;
|
|
41
45
|
startDate?: Date;
|
|
42
46
|
endDate?: Date;
|
|
43
47
|
trialEndDate?: Date;
|
|
44
48
|
cancelledAt?: Date;
|
|
45
|
-
payload?: Record<string, unknown>;
|
|
46
49
|
createdAt: Date;
|
|
47
50
|
updatedAt: Date;
|
|
48
51
|
}
|
|
52
|
+
/** Matches subscription_params in entity_subscriptions_controller.rb */
|
|
49
53
|
export interface CreateEntitySubscriptionRequest {
|
|
50
54
|
subscriptionModelUniqueId: string;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
payload?: Record<string, unknown>;
|
|
54
|
-
}
|
|
55
|
-
export interface UpdateEntitySubscriptionRequest {
|
|
56
|
-
status?: string;
|
|
57
|
-
endDate?: string;
|
|
58
|
-
payload?: Record<string, unknown>;
|
|
55
|
+
ownerUniqueId?: string;
|
|
56
|
+
ownerType?: string;
|
|
59
57
|
}
|
|
58
|
+
export type UpdateEntitySubscriptionRequest = CreateEntitySubscriptionRequest;
|
|
60
59
|
//# sourceMappingURL=entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/entity.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,
|
|
1
|
+
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/entity.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,sDAAsD;AACtD,MAAM,WAAW,0BAA0B;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAElE,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,yBAAyB,EAAE,MAAM,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,wEAAwE;AACxE,MAAM,WAAW,+BAA+B;IAC9C,yBAAyB,EAAE,MAAM,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,+BAA+B,GAAG,+BAA+B,CAAC"}
|
|
@@ -12,7 +12,7 @@ export interface MercadoPagoPaymentMethod {
|
|
|
12
12
|
maxAllowedAmount?: number;
|
|
13
13
|
processingModes?: string[];
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface MercadoPagoPayment {
|
|
16
16
|
id: string;
|
|
17
17
|
status: string;
|
|
18
18
|
statusDetail?: string;
|
|
@@ -28,59 +28,19 @@ export interface MercadoPagoPaymentIntent {
|
|
|
28
28
|
dateCreated: Date;
|
|
29
29
|
dateApproved?: Date;
|
|
30
30
|
}
|
|
31
|
+
/** Matches payment_params in mercado_pago_controller.rb */
|
|
31
32
|
export interface CreateMercadoPagoPaymentRequest {
|
|
32
|
-
|
|
33
|
+
amount: number;
|
|
34
|
+
cardToken?: string;
|
|
33
35
|
description?: string;
|
|
34
|
-
paymentMethodId?: string;
|
|
35
|
-
payerEmail: string;
|
|
36
36
|
installments?: number;
|
|
37
|
-
|
|
38
|
-
issuerId?: string;
|
|
39
|
-
externalReference?: string;
|
|
40
|
-
statementDescriptor?: string;
|
|
41
|
-
notificationUrl?: string;
|
|
42
|
-
additionalInfo?: {
|
|
43
|
-
items?: MercadoPagoItem[];
|
|
44
|
-
payer?: MercadoPagoPayer;
|
|
45
|
-
};
|
|
46
|
-
metadata?: Record<string, unknown>;
|
|
47
|
-
}
|
|
48
|
-
export interface MercadoPagoItem {
|
|
49
|
-
id?: string;
|
|
50
|
-
title: string;
|
|
51
|
-
description?: string;
|
|
52
|
-
pictureUrl?: string;
|
|
53
|
-
categoryId?: string;
|
|
54
|
-
quantity: number;
|
|
55
|
-
unitPrice: number;
|
|
56
|
-
}
|
|
57
|
-
export interface MercadoPagoPayer {
|
|
58
|
-
firstName?: string;
|
|
59
|
-
lastName?: string;
|
|
37
|
+
paymentMethodId?: string;
|
|
60
38
|
email?: string;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
number?: string;
|
|
68
|
-
};
|
|
69
|
-
address?: {
|
|
70
|
-
zipCode?: string;
|
|
71
|
-
streetName?: string;
|
|
72
|
-
streetNumber?: string;
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
export interface CreateMercadoPagoPSERequest {
|
|
76
|
-
transactionAmount: number;
|
|
77
|
-
description?: string;
|
|
78
|
-
payerEmail: string;
|
|
79
|
-
payerDocumentType: string;
|
|
80
|
-
payerDocumentNumber: string;
|
|
81
|
-
financialInstitution: string;
|
|
82
|
-
callbackUrl: string;
|
|
83
|
-
externalReference?: string;
|
|
84
|
-
metadata?: Record<string, unknown>;
|
|
39
|
+
documentType?: string;
|
|
40
|
+
documentNumber?: string;
|
|
41
|
+
orderUniqueId?: string;
|
|
42
|
+
displayUniqueId?: string;
|
|
43
|
+
financialInstitution?: string;
|
|
44
|
+
callbackUrl?: string;
|
|
85
45
|
}
|
|
86
46
|
//# sourceMappingURL=mercadopago.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mercadopago.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/mercadopago.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACrC,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"mercadopago.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/mercadopago.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACrC,oBAAoB,CAAC,EAAE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
2
2
|
export interface OrderDetail extends IdentityCore {
|
|
3
3
|
orderUniqueId: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
source?: string;
|
|
5
|
+
sourceAlias?: string;
|
|
6
|
+
sourceId?: string;
|
|
7
|
+
sourceType?: string;
|
|
8
|
+
productSku?: string;
|
|
9
|
+
productUniqueId?: string;
|
|
10
|
+
productName?: string;
|
|
11
|
+
productDescription?: string;
|
|
12
|
+
categoryName?: string;
|
|
13
|
+
isVariation?: boolean;
|
|
14
|
+
variationSku?: string;
|
|
15
|
+
productSize?: string;
|
|
16
|
+
color?: string;
|
|
17
|
+
extraVariation?: string;
|
|
8
18
|
quantity: number;
|
|
9
|
-
|
|
19
|
+
notes?: string;
|
|
20
|
+
subtotal: number;
|
|
10
21
|
discount: number;
|
|
22
|
+
discountValue?: number;
|
|
11
23
|
tax: number;
|
|
24
|
+
taxValue?: number;
|
|
25
|
+
fees?: number;
|
|
26
|
+
feesValue?: number;
|
|
27
|
+
tips?: number;
|
|
28
|
+
tipsValue?: number;
|
|
29
|
+
vendorDiscount?: number;
|
|
30
|
+
vendorDiscountValue?: number;
|
|
31
|
+
vendorPrice?: number;
|
|
12
32
|
total: number;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
33
|
+
cartDetailUniqueId?: string;
|
|
34
|
+
referredBy?: string;
|
|
35
|
+
promoCode?: string;
|
|
36
|
+
orderCode?: string;
|
|
37
|
+
status?: string;
|
|
38
|
+
logisticsStatus?: string;
|
|
16
39
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
40
|
+
/** Matches order_detail_params in orders_controller.rb */
|
|
41
|
+
export interface CreateOrderDetailRequest {
|
|
42
|
+
source?: string;
|
|
43
|
+
sourceAlias?: string;
|
|
44
|
+
sourceId?: string;
|
|
45
|
+
sourceType?: string;
|
|
46
|
+
productSku?: string;
|
|
47
|
+
productUniqueId?: string;
|
|
48
|
+
productName?: string;
|
|
49
|
+
productDescription?: string;
|
|
50
|
+
categoryName?: string;
|
|
51
|
+
isVariation?: boolean;
|
|
52
|
+
variationSku?: string;
|
|
53
|
+
productSize?: string;
|
|
54
|
+
color?: string;
|
|
55
|
+
extraVariation?: string;
|
|
56
|
+
quantity: number;
|
|
57
|
+
notes?: string;
|
|
58
|
+
subtotal?: number;
|
|
20
59
|
discount?: number;
|
|
60
|
+
discountValue?: number;
|
|
21
61
|
tax?: number;
|
|
22
|
-
|
|
62
|
+
taxValue?: number;
|
|
63
|
+
fees?: number;
|
|
64
|
+
feesValue?: number;
|
|
65
|
+
tips?: number;
|
|
66
|
+
tipsValue?: number;
|
|
67
|
+
vendorDiscount?: number;
|
|
68
|
+
vendorDiscountValue?: number;
|
|
69
|
+
vendorPrice?: number;
|
|
70
|
+
total?: number;
|
|
71
|
+
cartDetailUniqueId?: string;
|
|
72
|
+
referredBy?: string;
|
|
73
|
+
promoCode?: string;
|
|
74
|
+
orderCode?: string;
|
|
75
|
+
}
|
|
76
|
+
/** Same params for update */
|
|
77
|
+
export type UpdateOrderDetailRequest = CreateOrderDetailRequest;
|
|
78
|
+
/** Params for PUT /orders/:id/details/:id/status */
|
|
79
|
+
export interface UpdateOrderDetailStatusRequest {
|
|
80
|
+
status: string;
|
|
81
|
+
source?: string;
|
|
82
|
+
sourceAlias?: string;
|
|
83
|
+
sourceId?: string;
|
|
84
|
+
sourceType?: string;
|
|
85
|
+
}
|
|
86
|
+
/** Params for PUT /orders/:id/details/:id/logistics */
|
|
87
|
+
export interface UpdateOrderDetailLogisticsRequest {
|
|
88
|
+
logisticsStatus: string;
|
|
89
|
+
source?: string;
|
|
90
|
+
sourceAlias?: string;
|
|
91
|
+
sourceId?: string;
|
|
92
|
+
sourceType?: string;
|
|
23
93
|
}
|
|
24
94
|
//# sourceMappingURL=order-detail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-detail.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/order-detail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"order-detail.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/order-detail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,WAAW,WAAY,SAAQ,YAAY;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B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B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,6BAA6B;AAC7B,MAAM,MAAM,wBAAwB,GAAG,wBAAwB,CAAC;AAEhE,oDAAoD;AACpD,MAAM,WAAW,8BAA8B;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,uDAAuD;AACvD,MAAM,WAAW,iCAAiC;IAChD,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -2,26 +2,27 @@ export interface OrderTax {
|
|
|
2
2
|
id: string;
|
|
3
3
|
uniqueId: string;
|
|
4
4
|
orderUniqueId: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
taxUniqueId?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
level?: string;
|
|
9
|
+
taxValue?: number;
|
|
10
|
+
tax?: number;
|
|
11
|
+
displayOrder?: number;
|
|
12
|
+
status?: string;
|
|
10
13
|
createdAt: Date;
|
|
11
14
|
updatedAt: Date;
|
|
12
15
|
}
|
|
16
|
+
/** Matches tax_params in order_taxes_controller.rb */
|
|
13
17
|
export interface CreateOrderTaxRequest {
|
|
14
|
-
|
|
15
|
-
rate?: number;
|
|
16
|
-
amount?: number;
|
|
17
|
-
type: string;
|
|
18
|
-
payload?: Record<string, unknown>;
|
|
19
|
-
}
|
|
20
|
-
export interface UpdateOrderTaxRequest {
|
|
18
|
+
taxUniqueId?: string;
|
|
21
19
|
name?: string;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
description?: string;
|
|
21
|
+
level?: string;
|
|
22
|
+
taxValue?: number;
|
|
23
|
+
tax?: number;
|
|
24
|
+
displayOrder?: number;
|
|
25
|
+
status?: string;
|
|
26
26
|
}
|
|
27
|
+
export type UpdateOrderTaxRequest = CreateOrderTaxRequest;
|
|
27
28
|
//# sourceMappingURL=order-tax.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-tax.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/order-tax.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,
|
|
1
|
+
{"version":3,"file":"order-tax.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/order-tax.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,sDAAsD;AACtD,MAAM,WAAW,qBAAqB;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,CAAC"}
|