sinfactura-types 1.0.94 → 1.0.95
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/audit.d.ts +35 -0
- package/dist/audit.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/order.d.ts +1 -0
- package/dist/return.d.ts +35 -0
- package/dist/return.js +1 -0
- package/package.json +2 -1
package/dist/audit.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface OrderAudit {
|
|
3
|
+
storeId: string;
|
|
4
|
+
auditId: string;
|
|
5
|
+
orderId: string;
|
|
6
|
+
userId: string;
|
|
7
|
+
fullName?: string;
|
|
8
|
+
action: OrderAuditAction;
|
|
9
|
+
createdAt: number;
|
|
10
|
+
dated: number;
|
|
11
|
+
changes?: OrderAuditChange[];
|
|
12
|
+
itemChanges?: {
|
|
13
|
+
added: Partial<BasketItem>[];
|
|
14
|
+
removed: Partial<BasketItem>[];
|
|
15
|
+
modified: Array<{
|
|
16
|
+
productId: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
oldQuantity: number;
|
|
19
|
+
newQuantity: number;
|
|
20
|
+
oldPrice: number;
|
|
21
|
+
newPrice: number;
|
|
22
|
+
}>;
|
|
23
|
+
};
|
|
24
|
+
oldTotal?: number;
|
|
25
|
+
newTotal?: number;
|
|
26
|
+
returnId?: string;
|
|
27
|
+
}
|
|
28
|
+
interface OrderAuditChange {
|
|
29
|
+
field: string;
|
|
30
|
+
oldValue: unknown;
|
|
31
|
+
newValue: unknown;
|
|
32
|
+
}
|
|
33
|
+
type OrderAuditAction = 'order_created' | 'order_edited' | 'order_ready' | 'order_delivered' | 'order_delivery_cancelled' | 'order_disabled' | 'order_enabled' | 'order_returned' | 'discount_changed' | 'payment_method_changed' | 'delivery_method_changed' | 'delivery_address_changed' | 'invoice_created' | 'credit_note_created';
|
|
34
|
+
}
|
|
35
|
+
export {};
|
package/dist/audit.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./account";
|
|
2
2
|
export * from "./afip";
|
|
3
3
|
export * from "./api";
|
|
4
|
+
export * from "./audit";
|
|
4
5
|
export * from "./auth";
|
|
5
6
|
export * from "./basket";
|
|
6
7
|
export * from "./brands";
|
|
@@ -14,6 +15,7 @@ export * from "./maintenance";
|
|
|
14
15
|
export * from "./notification";
|
|
15
16
|
export * from "./order";
|
|
16
17
|
export * from "./product";
|
|
18
|
+
export * from "./return";
|
|
17
19
|
export * from "./stock";
|
|
18
20
|
export * from "./store";
|
|
19
21
|
export * from "./subscription";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./account";
|
|
2
2
|
export * from "./afip";
|
|
3
3
|
export * from "./api";
|
|
4
|
+
export * from "./audit";
|
|
4
5
|
export * from "./auth";
|
|
5
6
|
export * from "./basket";
|
|
6
7
|
export * from "./brands";
|
|
@@ -14,6 +15,7 @@ export * from "./maintenance";
|
|
|
14
15
|
export * from "./notification";
|
|
15
16
|
export * from "./order";
|
|
16
17
|
export * from "./product";
|
|
18
|
+
export * from "./return";
|
|
17
19
|
export * from "./stock";
|
|
18
20
|
export * from "./store";
|
|
19
21
|
export * from "./subscription";
|
package/dist/order.d.ts
CHANGED
package/dist/return.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Return {
|
|
3
|
+
storeId: string;
|
|
4
|
+
returnId: string;
|
|
5
|
+
orderId: string;
|
|
6
|
+
customerId: string;
|
|
7
|
+
invoiceId?: string;
|
|
8
|
+
creditNoteId?: string;
|
|
9
|
+
items: ReturnItem[];
|
|
10
|
+
subtotal: number;
|
|
11
|
+
cost: number;
|
|
12
|
+
total: number;
|
|
13
|
+
reason: ReturnReason;
|
|
14
|
+
notes?: string;
|
|
15
|
+
userId: string;
|
|
16
|
+
emitCreditNote: boolean;
|
|
17
|
+
sendEmail: boolean;
|
|
18
|
+
creditNoteEmitted: boolean;
|
|
19
|
+
createdAt: number;
|
|
20
|
+
dated: number;
|
|
21
|
+
}
|
|
22
|
+
interface ReturnItem {
|
|
23
|
+
productId: string;
|
|
24
|
+
name: string;
|
|
25
|
+
sku?: string;
|
|
26
|
+
quantity: number;
|
|
27
|
+
price: number;
|
|
28
|
+
cost: number;
|
|
29
|
+
ivaType: number;
|
|
30
|
+
condition: 'sellable' | 'damaged';
|
|
31
|
+
restock: boolean;
|
|
32
|
+
}
|
|
33
|
+
type ReturnReason = 'defective' | 'wrong_item' | 'damaged_shipping' | 'customer_changed_mind' | 'not_as_described' | 'duplicate_order' | 'price_adjustment' | 'billing_error' | 'other';
|
|
34
|
+
}
|
|
35
|
+
export {};
|
package/dist/return.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sinfactura-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.95",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "tsc",
|
|
15
15
|
"prepublishOnly": "tsc",
|
|
16
|
+
"login": "npm login",
|
|
16
17
|
"release": "npm version patch --no-git-tag-version && npm publish"
|
|
17
18
|
},
|
|
18
19
|
"publishConfig": {
|