@marianmeres/collection-types 1.29.0 → 1.31.0
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/collection.d.ts +3 -2
- package/dist/payment.d.ts +14 -17
- package/dist/project.d.ts +1 -0
- package/dist/session.d.ts +5 -0
- package/package.json +1 -1
package/dist/collection.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export interface FolderDefinition {
|
|
|
20
20
|
export interface TagDefinition {
|
|
21
21
|
label?: string;
|
|
22
22
|
color?: string;
|
|
23
|
+
[key: string]: unknown;
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
25
26
|
* Input DTO for creating/updating a collection.
|
|
@@ -47,8 +48,8 @@ export interface CollectionDTOIn {
|
|
|
47
48
|
is_readonly?: boolean;
|
|
48
49
|
/** Folder definitions */
|
|
49
50
|
folders?: Record<string, FolderDefinition>;
|
|
50
|
-
/** Tag definitions */
|
|
51
|
-
tags?: Record<string, TagDefinition
|
|
51
|
+
/** Tag definitions per model type */
|
|
52
|
+
tags?: Record<string, Record<string, TagDefinition>>;
|
|
52
53
|
}
|
|
53
54
|
/**
|
|
54
55
|
* Output DTO for collection responses.
|
package/dist/payment.d.ts
CHANGED
|
@@ -39,32 +39,29 @@ export interface PaymentIntent {
|
|
|
39
39
|
/** Provider-specific data */
|
|
40
40
|
provider_data?: Record<string, unknown>;
|
|
41
41
|
}
|
|
42
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Result of capturing/completing a payment.
|
|
44
|
+
* Errors are thrown, not returned.
|
|
45
|
+
*/
|
|
43
46
|
export interface PaymentResult {
|
|
44
|
-
/** Whether capture succeeded */
|
|
45
|
-
success: boolean;
|
|
46
47
|
/** Provider reference ID */
|
|
47
48
|
provider_reference: string;
|
|
48
|
-
/** Error message if failed */
|
|
49
|
-
error?: string;
|
|
50
49
|
}
|
|
51
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Result of a refund operation.
|
|
52
|
+
* Errors are thrown, not returned.
|
|
53
|
+
*/
|
|
52
54
|
export interface RefundResult {
|
|
53
|
-
/** Whether refund succeeded */
|
|
54
|
-
success: boolean;
|
|
55
55
|
/** Refund ID from provider */
|
|
56
|
-
refund_id
|
|
57
|
-
/** Error message if failed */
|
|
58
|
-
error?: string;
|
|
56
|
+
refund_id: string;
|
|
59
57
|
}
|
|
60
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Result of processing a webhook.
|
|
60
|
+
* Errors are thrown, not returned.
|
|
61
|
+
*/
|
|
61
62
|
export interface WebhookResult {
|
|
62
|
-
/** Whether webhook was processed successfully */
|
|
63
|
-
success: boolean;
|
|
64
63
|
/** Event type from provider */
|
|
65
|
-
event_type
|
|
64
|
+
event_type: string;
|
|
66
65
|
/** Related payment ID */
|
|
67
66
|
payment_id?: UUID;
|
|
68
|
-
/** Error message if failed */
|
|
69
|
-
error?: string;
|
|
70
67
|
}
|
package/dist/project.d.ts
CHANGED
package/dist/session.d.ts
CHANGED
|
@@ -20,9 +20,14 @@ export interface CartItem {
|
|
|
20
20
|
export interface CartData {
|
|
21
21
|
items: CartItem[];
|
|
22
22
|
}
|
|
23
|
+
/** Wishlist contents - simple array of product IDs */
|
|
24
|
+
export interface WishlistData {
|
|
25
|
+
items: UUID[];
|
|
26
|
+
}
|
|
23
27
|
/** Session data field schema */
|
|
24
28
|
export interface SessionData {
|
|
25
29
|
cart: CartData;
|
|
30
|
+
wishlist: WishlistData;
|
|
26
31
|
/** Index signature for compatibility with UserData */
|
|
27
32
|
[key: string]: unknown;
|
|
28
33
|
}
|