@atiproto/lexicons 1.1.0 → 2.0.0-beta.1

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.
Files changed (93) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.js +3455 -2465
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +3452 -2465
  5. package/dist/index.mjs.map +1 -1
  6. package/dist/lexicons/com/atiproto/authCreateCart.d.ts +2 -0
  7. package/dist/lexicons/com/atiproto/authCreateCart.defs.d.ts +5 -0
  8. package/dist/lexicons/com/atiproto/authCreatePayment.d.ts +2 -0
  9. package/dist/lexicons/com/atiproto/authCreatePayment.defs.d.ts +5 -0
  10. package/dist/lexicons/com/atiproto/authReadCart.d.ts +2 -0
  11. package/dist/lexicons/com/atiproto/authReadCart.defs.d.ts +5 -0
  12. package/dist/lexicons/com/atiproto/authReadEntitlements.d.ts +2 -0
  13. package/dist/lexicons/com/atiproto/authReadEntitlements.defs.d.ts +5 -0
  14. package/dist/lexicons/com/atiproto/authReadPayments.d.ts +2 -0
  15. package/dist/lexicons/com/atiproto/authReadPayments.defs.d.ts +5 -0
  16. package/dist/lexicons/com/atiproto/authReadPublic.d.ts +2 -0
  17. package/dist/lexicons/com/atiproto/authReadPublic.defs.d.ts +5 -0
  18. package/dist/lexicons/com/atiproto/authReadRecipient.d.ts +2 -0
  19. package/dist/lexicons/com/atiproto/authReadRecipient.defs.d.ts +5 -0
  20. package/dist/lexicons/com/atiproto/authWriteProfile.d.ts +2 -0
  21. package/dist/lexicons/com/atiproto/authWriteProfile.defs.d.ts +5 -0
  22. package/dist/lexicons/com/atiproto/cart.defs.d.ts +277 -112
  23. package/dist/lexicons/com/atiproto/item.defs.d.ts +97 -202
  24. package/dist/lexicons/com/atiproto/payment/cart/checkout.d.ts +2 -0
  25. package/dist/lexicons/com/atiproto/payment/cart/checkout.defs.d.ts +69 -0
  26. package/dist/lexicons/com/atiproto/payment/cart/create.defs.d.ts +11 -21
  27. package/dist/lexicons/com/atiproto/payment/cart/get.defs.d.ts +7 -42
  28. package/dist/lexicons/com/atiproto/payment/cart/list.defs.d.ts +17 -20
  29. package/dist/lexicons/com/atiproto/payment/cart/put.defs.d.ts +3 -13
  30. package/dist/lexicons/com/atiproto/payment/cart.d.ts +1 -1
  31. package/dist/lexicons/com/atiproto/payment/item/create.defs.d.ts +19 -53
  32. package/dist/lexicons/com/atiproto/payment/item/get.defs.d.ts +5 -17
  33. package/dist/lexicons/com/atiproto/payment/item/list.defs.d.ts +1 -7
  34. package/dist/lexicons/com/atiproto/payment/item/put.defs.d.ts +1 -1
  35. package/dist/lexicons/com/atiproto/payment/item.d.ts +0 -1
  36. package/dist/lexicons/com/atiproto/payment/subscription/cancel.defs.d.ts +1 -7
  37. package/dist/lexicons/com/atiproto/payment/subscription/create.defs.d.ts +22 -45
  38. package/dist/lexicons/com/atiproto/payment/subscription/get.defs.d.ts +5 -11
  39. package/dist/lexicons/com/atiproto/payment/subscription/list.defs.d.ts +7 -1
  40. package/dist/lexicons/com/atiproto/payment/subscription/put.defs.d.ts +1 -1
  41. package/dist/lexicons/com/atiproto/payment/subscription.d.ts +0 -1
  42. package/dist/lexicons/com/atiproto/payment.d.ts +0 -1
  43. package/dist/lexicons/com/atiproto/profile.defs.d.ts +26 -143
  44. package/dist/lexicons/com/atiproto/recipient/payment/cart/get.defs.d.ts +7 -33
  45. package/dist/lexicons/com/atiproto/recipient/payment/cart/list.defs.d.ts +23 -20
  46. package/dist/lexicons/com/atiproto/recipient/payment/item/get.defs.d.ts +5 -17
  47. package/dist/lexicons/com/atiproto/recipient/payment/item/list.defs.d.ts +3 -3
  48. package/dist/lexicons/com/atiproto/recipient/payment/item.d.ts +0 -1
  49. package/dist/lexicons/com/atiproto/recipient/payment/subscription/get.defs.d.ts +5 -11
  50. package/dist/lexicons/com/atiproto/recipient/payment/subscription/list.defs.d.ts +13 -1
  51. package/dist/lexicons/com/atiproto/recipient/payment/subscription.d.ts +0 -1
  52. package/dist/lexicons/com/atiproto/recipient/profile/get.defs.d.ts +39 -19
  53. package/dist/lexicons/com/atiproto/repo/item/count.defs.d.ts +3 -9
  54. package/dist/lexicons/com/atiproto/repo/profile/get.defs.d.ts +6 -0
  55. package/dist/lexicons/com/atiproto/repo/subscription/count.defs.d.ts +5 -5
  56. package/dist/lexicons/com/atiproto/subscription.defs.d.ts +90 -157
  57. package/dist/lexicons/com/atiproto.d.ts +8 -2
  58. package/dist/lexicons/com/atproto/repo/strongRef.d.ts +2 -0
  59. package/dist/lexicons/com/atproto/repo/strongRef.defs.d.ts +56 -0
  60. package/dist/lexicons/com/atproto/repo.d.ts +1 -0
  61. package/dist/lexicons/com/atproto.d.ts +1 -0
  62. package/dist/lexicons/com.d.ts +1 -0
  63. package/dist/lexicons/index.d.ts +1 -0
  64. package/dist/lexicons/network/attested/entitlement.d.ts +2 -0
  65. package/dist/lexicons/network/attested/entitlement.defs.d.ts +185 -0
  66. package/dist/lexicons/network/attested/payment/initiate.d.ts +2 -0
  67. package/dist/lexicons/network/attested/payment/initiate.defs.d.ts +102 -0
  68. package/dist/lexicons/network/attested/payment/status.d.ts +2 -0
  69. package/dist/lexicons/network/attested/payment/status.defs.d.ts +56 -0
  70. package/dist/lexicons/network/attested/payment.d.ts +4 -0
  71. package/dist/lexicons/network/attested/payment.defs.d.ts +156 -0
  72. package/dist/lexicons/network/attested/proof.d.ts +2 -0
  73. package/dist/lexicons/network/attested/proof.defs.d.ts +172 -0
  74. package/dist/lexicons/network/attested/signature.d.ts +2 -0
  75. package/dist/lexicons/network/attested/signature.defs.d.ts +230 -0
  76. package/dist/lexicons/network/attested/verify.d.ts +2 -0
  77. package/dist/lexicons/network/attested/verify.defs.d.ts +41 -0
  78. package/dist/lexicons/network/attested.d.ts +5 -0
  79. package/dist/lexicons/network.d.ts +1 -0
  80. package/dist/schemas.d.ts +2 -0
  81. package/package.json +6 -2
  82. package/dist/lexicons/com/atiproto/payment/cart/clone.d.ts +0 -2
  83. package/dist/lexicons/com/atiproto/payment/cart/clone.defs.d.ts +0 -54
  84. package/dist/lexicons/com/atiproto/payment/item/validate.d.ts +0 -2
  85. package/dist/lexicons/com/atiproto/payment/item/validate.defs.d.ts +0 -50
  86. package/dist/lexicons/com/atiproto/payment/list.d.ts +0 -2
  87. package/dist/lexicons/com/atiproto/payment/list.defs.d.ts +0 -32
  88. package/dist/lexicons/com/atiproto/payment/subscription/validate.d.ts +0 -2
  89. package/dist/lexicons/com/atiproto/payment/subscription/validate.defs.d.ts +0 -44
  90. package/dist/lexicons/com/atiproto/recipient/payment/item/validate.d.ts +0 -2
  91. package/dist/lexicons/com/atiproto/recipient/payment/item/validate.defs.d.ts +0 -50
  92. package/dist/lexicons/com/atiproto/recipient/payment/subscription/validate.d.ts +0 -2
  93. package/dist/lexicons/com/atiproto/recipient/payment/subscription/validate.defs.d.ts +0 -44
@@ -0,0 +1,2 @@
1
+ export * from './authCreateCart.defs.js';
2
+ export * as $defs from './authCreateCart.defs.js';
@@ -0,0 +1,5 @@
1
+ import { l } from '@atproto/lex';
2
+ declare const $nsid = "com.atiproto.authCreateCart";
3
+ export { $nsid };
4
+ declare const main: l.PermissionSet<"com.atiproto.authCreateCart", readonly [l.Permission<"repo", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>, l.Permission<"rpc", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>]>;
5
+ export { main };
@@ -0,0 +1,2 @@
1
+ export * from './authCreatePayment.defs.js';
2
+ export * as $defs from './authCreatePayment.defs.js';
@@ -0,0 +1,5 @@
1
+ import { l } from '@atproto/lex';
2
+ declare const $nsid = "com.atiproto.authCreatePayment";
3
+ export { $nsid };
4
+ declare const main: l.PermissionSet<"com.atiproto.authCreatePayment", readonly [l.Permission<"repo", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>, l.Permission<"rpc", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>]>;
5
+ export { main };
@@ -0,0 +1,2 @@
1
+ export * from './authReadCart.defs.js';
2
+ export * as $defs from './authReadCart.defs.js';
@@ -0,0 +1,5 @@
1
+ import { l } from '@atproto/lex';
2
+ declare const $nsid = "com.atiproto.authReadCart";
3
+ export { $nsid };
4
+ declare const main: l.PermissionSet<"com.atiproto.authReadCart", readonly [l.Permission<"repo", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>, l.Permission<"rpc", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>]>;
5
+ export { main };
@@ -0,0 +1,2 @@
1
+ export * from './authReadEntitlements.defs.js';
2
+ export * as $defs from './authReadEntitlements.defs.js';
@@ -0,0 +1,5 @@
1
+ import { l } from '@atproto/lex';
2
+ declare const $nsid = "com.atiproto.authReadEntitlements";
3
+ export { $nsid };
4
+ declare const main: l.PermissionSet<"com.atiproto.authReadEntitlements", readonly [l.Permission<"rpc", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>]>;
5
+ export { main };
@@ -0,0 +1,2 @@
1
+ export * from './authReadPayments.defs.js';
2
+ export * as $defs from './authReadPayments.defs.js';
@@ -0,0 +1,5 @@
1
+ import { l } from '@atproto/lex';
2
+ declare const $nsid = "com.atiproto.authReadPayments";
3
+ export { $nsid };
4
+ declare const main: l.PermissionSet<"com.atiproto.authReadPayments", readonly [l.Permission<"rpc", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>]>;
5
+ export { main };
@@ -0,0 +1,2 @@
1
+ export * from './authReadPublic.defs.js';
2
+ export * as $defs from './authReadPublic.defs.js';
@@ -0,0 +1,5 @@
1
+ import { l } from '@atproto/lex';
2
+ declare const $nsid = "com.atiproto.authReadPublic";
3
+ export { $nsid };
4
+ declare const main: l.PermissionSet<"com.atiproto.authReadPublic", readonly [l.Permission<"rpc", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>]>;
5
+ export { main };
@@ -0,0 +1,2 @@
1
+ export * from './authReadRecipient.defs.js';
2
+ export * as $defs from './authReadRecipient.defs.js';
@@ -0,0 +1,5 @@
1
+ import { l } from '@atproto/lex';
2
+ declare const $nsid = "com.atiproto.authReadRecipient";
3
+ export { $nsid };
4
+ declare const main: l.PermissionSet<"com.atiproto.authReadRecipient", readonly [l.Permission<"rpc", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>]>;
5
+ export { main };
@@ -0,0 +1,2 @@
1
+ export * from './authWriteProfile.defs.js';
2
+ export * as $defs from './authWriteProfile.defs.js';
@@ -0,0 +1,5 @@
1
+ import { l } from '@atproto/lex';
2
+ declare const $nsid = "com.atiproto.authWriteProfile";
3
+ export { $nsid };
4
+ declare const main: l.PermissionSet<"com.atiproto.authWriteProfile", readonly [l.Permission<"repo", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>, l.Permission<"rpc", Record<string, string | number | boolean | boolean[] | number[] | string[] | undefined>>]>;
5
+ export { main };
@@ -1,184 +1,349 @@
1
1
  import { l } from '@atproto/lex';
2
+ import * as RepoStrongRef from '../atproto/repo/strongRef.defs.js';
3
+ import * as AttestedSignature from '../../network/attested/signature.defs.js';
2
4
  declare const $nsid = "com.atiproto.cart";
3
5
  export { $nsid };
4
- /** A record representing a shopping cart for items/subscriptions */
5
6
  type Main = {
6
7
  $type: 'com.atiproto.cart';
7
- items: CartItem[];
8
8
  /**
9
- * ISO 4217 currency code
9
+ * DID of the recipient. Absent (null) when marked as private.
10
10
  */
11
- currency: string;
11
+ subject?: l.DidString;
12
12
  /**
13
- * Total amount in cents
13
+ * Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
14
14
  */
15
- total: number;
15
+ items: RepoStrongRef.Main[];
16
16
  /**
17
- * Cart status
17
+ * ISO 4217 currency code.
18
18
  */
19
- status: 'open' | 'completed' | 'expired' | 'abandoned';
19
+ currency: string;
20
20
  /**
21
- * Creation timestamp
21
+ * Total amount in the smallest unit of `currency`.
22
22
  */
23
- createdAt: l.DatetimeString;
23
+ total?: number;
24
24
  /**
25
- * Expiration timestamp
25
+ * Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
26
26
  */
27
- expiresAt: l.DatetimeString;
27
+ status: 'open' | 'expired' | 'abandoned' | 'pending' | 'completed' | 'failed' | 'refunded' | 'cancelled' | 'fulfilled' | l.UnknownString;
28
+ createdAt?: l.DatetimeString;
29
+ expiresAt?: l.DatetimeString;
30
+ completedAt?: l.DatetimeString;
28
31
  /**
29
- * Completion timestamp
32
+ * StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
30
33
  */
31
- completedAt?: l.DatetimeString;
34
+ payment?: RepoStrongRef.Main;
35
+ /**
36
+ * Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
37
+ */
38
+ signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
32
39
  };
33
40
  export type { Main };
34
- /** A record representing a shopping cart for items/subscriptions */
35
41
  declare const main: l.RecordSchema<"any", "com.atiproto.cart", l.Validator<Omit<Main, "$type">, Omit<Main, "$type">>>;
36
42
  export { main };
37
43
  export declare const $isTypeOf: <TValue extends {
38
44
  $type?: unknown;
39
45
  }>(value: TValue) => value is l.TypedRecord<"com.atiproto.cart", TValue>, $build: {
40
46
  (input: Omit<Omit<Main, "$type">, "$type">): {
41
- items: CartItem[];
47
+ subject?: l.DidString
48
+ /**
49
+ * Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
50
+ */
51
+ | undefined;
52
+ items: RepoStrongRef.Main[];
42
53
  currency: string;
43
- total: number;
44
- status: "open" | "completed" | "expired" | "abandoned";
45
- createdAt: l.DatetimeString;
46
- expiresAt: l.DatetimeString;
47
- completedAt?: l.DatetimeString | undefined;
54
+ total?: number
55
+ /**
56
+ * Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
57
+ */
58
+ | undefined;
59
+ status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
60
+ createdAt?: l.DatetimeString | undefined;
61
+ expiresAt?: l.DatetimeString | undefined;
62
+ completedAt?: l.DatetimeString
63
+ /**
64
+ * StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
65
+ */
66
+ | undefined;
67
+ payment?: RepoStrongRef.Main
68
+ /**
69
+ * Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
70
+ */
71
+ | undefined;
72
+ signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
48
73
  $type: "com.atiproto.cart";
49
74
  };
50
75
  (input: Omit<Omit<Main, "$type">, "$type">): {
51
- items: CartItem[];
76
+ subject?: l.DidString
77
+ /**
78
+ * Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
79
+ */
80
+ | undefined;
81
+ items: RepoStrongRef.Main[];
52
82
  currency: string;
53
- total: number;
54
- status: "open" | "completed" | "expired" | "abandoned";
55
- createdAt: l.DatetimeString;
56
- expiresAt: l.DatetimeString;
57
- completedAt?: l.DatetimeString | undefined;
83
+ total?: number
84
+ /**
85
+ * Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
86
+ */
87
+ | undefined;
88
+ status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
89
+ createdAt?: l.DatetimeString | undefined;
90
+ expiresAt?: l.DatetimeString | undefined;
91
+ completedAt?: l.DatetimeString
92
+ /**
93
+ * StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
94
+ */
95
+ | undefined;
96
+ payment?: RepoStrongRef.Main
97
+ /**
98
+ * Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
99
+ */
100
+ | undefined;
101
+ signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
58
102
  $type: "com.atiproto.cart";
59
103
  };
60
104
  }, $type: "com.atiproto.cart";
61
105
  export declare const $assert: (input: unknown, options?: l.ValidateOptions) => asserts input is {
62
- items: CartItem[];
106
+ subject?: l.DidString
107
+ /**
108
+ * Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
109
+ */
110
+ | undefined;
111
+ items: RepoStrongRef.Main[];
63
112
  currency: string;
64
- total: number;
65
- status: "open" | "completed" | "expired" | "abandoned";
66
- createdAt: l.DatetimeString;
67
- expiresAt: l.DatetimeString;
68
- completedAt?: l.DatetimeString | undefined;
113
+ total?: number
114
+ /**
115
+ * Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
116
+ */
117
+ | undefined;
118
+ status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
119
+ createdAt?: l.DatetimeString | undefined;
120
+ expiresAt?: l.DatetimeString | undefined;
121
+ completedAt?: l.DatetimeString
122
+ /**
123
+ * StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
124
+ */
125
+ | undefined;
126
+ payment?: RepoStrongRef.Main
127
+ /**
128
+ * Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
129
+ */
130
+ | undefined;
131
+ signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
69
132
  $type: "com.atiproto.cart";
70
133
  }, $check: (input: unknown, options?: l.ValidateOptions) => void, $cast: <I>(input: I, options?: l.ValidateOptions) => I & {
71
- items: CartItem[];
134
+ subject?: l.DidString
135
+ /**
136
+ * Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
137
+ */
138
+ | undefined;
139
+ items: RepoStrongRef.Main[];
72
140
  currency: string;
73
- total: number;
74
- status: "open" | "completed" | "expired" | "abandoned";
75
- createdAt: l.DatetimeString;
76
- expiresAt: l.DatetimeString;
77
- completedAt?: l.DatetimeString | undefined;
141
+ total?: number
142
+ /**
143
+ * Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
144
+ */
145
+ | undefined;
146
+ status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
147
+ createdAt?: l.DatetimeString | undefined;
148
+ expiresAt?: l.DatetimeString | undefined;
149
+ completedAt?: l.DatetimeString
150
+ /**
151
+ * StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
152
+ */
153
+ | undefined;
154
+ payment?: RepoStrongRef.Main
155
+ /**
156
+ * Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
157
+ */
158
+ | undefined;
159
+ signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
78
160
  $type: "com.atiproto.cart";
79
161
  }, $ifMatches: <I>(input: I, options?: l.ValidateOptions) => (I & {
80
- items: CartItem[];
162
+ subject?: l.DidString
163
+ /**
164
+ * Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
165
+ */
166
+ | undefined;
167
+ items: RepoStrongRef.Main[];
81
168
  currency: string;
82
- total: number;
83
- status: "open" | "completed" | "expired" | "abandoned";
84
- createdAt: l.DatetimeString;
85
- expiresAt: l.DatetimeString;
86
- completedAt?: l.DatetimeString | undefined;
169
+ total?: number
170
+ /**
171
+ * Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
172
+ */
173
+ | undefined;
174
+ status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
175
+ createdAt?: l.DatetimeString | undefined;
176
+ expiresAt?: l.DatetimeString | undefined;
177
+ completedAt?: l.DatetimeString
178
+ /**
179
+ * StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
180
+ */
181
+ | undefined;
182
+ payment?: RepoStrongRef.Main
183
+ /**
184
+ * Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
185
+ */
186
+ | undefined;
187
+ signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
87
188
  $type: "com.atiproto.cart";
88
189
  }) | undefined, $matches: <I>(input: I, options?: l.ValidateOptions) => input is I & {
89
- items: CartItem[];
190
+ subject?: l.DidString
191
+ /**
192
+ * Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
193
+ */
194
+ | undefined;
195
+ items: RepoStrongRef.Main[];
90
196
  currency: string;
91
- total: number;
92
- status: "open" | "completed" | "expired" | "abandoned";
93
- createdAt: l.DatetimeString;
94
- expiresAt: l.DatetimeString;
95
- completedAt?: l.DatetimeString | undefined;
197
+ total?: number
198
+ /**
199
+ * Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
200
+ */
201
+ | undefined;
202
+ status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
203
+ createdAt?: l.DatetimeString | undefined;
204
+ expiresAt?: l.DatetimeString | undefined;
205
+ completedAt?: l.DatetimeString
206
+ /**
207
+ * StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
208
+ */
209
+ | undefined;
210
+ payment?: RepoStrongRef.Main
211
+ /**
212
+ * Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
213
+ */
214
+ | undefined;
215
+ signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
96
216
  $type: "com.atiproto.cart";
97
217
  }, $parse: (input: unknown, options?: l.ParseOptions) => {
98
- items: CartItem[];
218
+ subject?: l.DidString
219
+ /**
220
+ * Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
221
+ */
222
+ | undefined;
223
+ items: RepoStrongRef.Main[];
99
224
  currency: string;
100
- total: number;
101
- status: "open" | "completed" | "expired" | "abandoned";
102
- createdAt: l.DatetimeString;
103
- expiresAt: l.DatetimeString;
104
- completedAt?: l.DatetimeString | undefined;
225
+ total?: number
226
+ /**
227
+ * Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
228
+ */
229
+ | undefined;
230
+ status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
231
+ createdAt?: l.DatetimeString | undefined;
232
+ expiresAt?: l.DatetimeString | undefined;
233
+ completedAt?: l.DatetimeString
234
+ /**
235
+ * StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
236
+ */
237
+ | undefined;
238
+ payment?: RepoStrongRef.Main
239
+ /**
240
+ * Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
241
+ */
242
+ | undefined;
243
+ signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
105
244
  $type: "com.atiproto.cart";
106
245
  }, $safeParse: (input: unknown, options?: l.ParseOptions) => l.ValidationResult<{
107
- items: CartItem[];
246
+ subject?: l.DidString
247
+ /**
248
+ * Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
249
+ */
250
+ | undefined;
251
+ items: RepoStrongRef.Main[];
108
252
  currency: string;
109
- total: number;
110
- status: "open" | "completed" | "expired" | "abandoned";
111
- createdAt: l.DatetimeString;
112
- expiresAt: l.DatetimeString;
113
- completedAt?: l.DatetimeString | undefined;
253
+ total?: number
254
+ /**
255
+ * Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
256
+ */
257
+ | undefined;
258
+ status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
259
+ createdAt?: l.DatetimeString | undefined;
260
+ expiresAt?: l.DatetimeString | undefined;
261
+ completedAt?: l.DatetimeString
262
+ /**
263
+ * StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
264
+ */
265
+ | undefined;
266
+ payment?: RepoStrongRef.Main
267
+ /**
268
+ * Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
269
+ */
270
+ | undefined;
271
+ signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
114
272
  $type: "com.atiproto.cart";
115
273
  }>, $validate: <I>(input: I, options?: l.ValidateOptions) => I & {
116
- items: CartItem[];
117
- currency: string;
118
- total: number;
119
- status: "open" | "completed" | "expired" | "abandoned";
120
- createdAt: l.DatetimeString;
121
- expiresAt: l.DatetimeString;
122
- completedAt?: l.DatetimeString | undefined;
123
- $type: "com.atiproto.cart";
124
- }, $safeValidate: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
125
- items: CartItem[];
274
+ subject?: l.DidString
275
+ /**
276
+ * Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
277
+ */
278
+ | undefined;
279
+ items: RepoStrongRef.Main[];
126
280
  currency: string;
127
- total: number;
128
- status: "open" | "completed" | "expired" | "abandoned";
129
- createdAt: l.DatetimeString;
130
- expiresAt: l.DatetimeString;
131
- completedAt?: l.DatetimeString | undefined;
132
- $type: "com.atiproto.cart";
133
- }>;
134
- /** View of a cart record for use in API responses */
135
- type View = {
136
- $type?: 'com.atiproto.cart#view';
281
+ total?: number
137
282
  /**
138
- * AT-URI of the cart record
283
+ * Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
139
284
  */
140
- uri: l.AtUriString;
141
- items: CartItem[];
285
+ | undefined;
286
+ status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
287
+ createdAt?: l.DatetimeString | undefined;
288
+ expiresAt?: l.DatetimeString | undefined;
289
+ completedAt?: l.DatetimeString
142
290
  /**
143
- * ISO 4217 currency code
291
+ * StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
144
292
  */
145
- currency: string;
293
+ | undefined;
294
+ payment?: RepoStrongRef.Main
146
295
  /**
147
- * Total amount in cents
296
+ * Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
148
297
  */
149
- total: number;
298
+ | undefined;
299
+ signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
300
+ $type: "com.atiproto.cart";
301
+ }, $safeValidate: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
302
+ subject?: l.DidString
150
303
  /**
151
- * Cart status
304
+ * Cart line items. Each is a strongRef to a `com.atiproto.item` or `com.atiproto.subscription` record (the at-uri's collection segment identifies which). Empty (or absent) when marked as private.
152
305
  */
153
- status: 'open' | 'completed' | 'expired' | 'abandoned';
306
+ | undefined;
307
+ items: RepoStrongRef.Main[];
308
+ currency: string;
309
+ total?: number
154
310
  /**
155
- * Creation timestamp
311
+ * Lifecycle state of the cart. When `payment` is present, the AppView snapshots the broker payment's status here (pending / completed / failed / refunded / cancelled). Before a payment is attached the cart's own lifecycle states apply (open / expired / abandoned). After fulfillment, the AppView (or merchant integration) advances to `fulfilled` to mark delivery. Open to extension via `knownValues` rather than a hard enum.
156
312
  */
157
- createdAt: l.DatetimeString;
313
+ | undefined;
314
+ status: "open" | "expired" | "abandoned" | "pending" | "completed" | "failed" | "refunded" | "cancelled" | "fulfilled" | l.UnknownString;
315
+ createdAt?: l.DatetimeString | undefined;
316
+ expiresAt?: l.DatetimeString | undefined;
317
+ completedAt?: l.DatetimeString
158
318
  /**
159
- * Expiration timestamp
319
+ * StrongRef to the `network.attested.payment` record settling this cart. Set during checkout (or attached after the fact via `payment.cart.put`). Only the PoS can validate this field, so it is not writable via `com.atproto.repo.putRecord`.
160
320
  */
161
- expiresAt: l.DatetimeString;
321
+ | undefined;
322
+ payment?: RepoStrongRef.Main
162
323
  /**
163
- * Completion timestamp
324
+ * Recipient AppView attestation(s). The AppView writes and updates its own cart records directly and signs them so the PoS can trust the validated state. Each entry is either an inline `network.attested.signature` or a `com.atproto.repo.strongRef` pointing at a remote `network.attested.proof` record. The canonical signing payload covers `items`, `currency`, `status`, plus `subject`, `total`, `createdAt`, `expiresAt`, `completedAt`, and `payment` when present. Mutating any of those fields invalidates every signature in this array.
164
325
  */
326
+ | undefined;
327
+ signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[] | undefined;
328
+ $type: "com.atiproto.cart";
329
+ }>;
330
+ /** Hydrated cart view returned by PoS get endpoints. */
331
+ type View = {
332
+ $type?: 'com.atiproto.cart#view';
333
+ uri: l.AtUriString;
334
+ cid?: l.CidString;
335
+ subject?: l.DidString;
336
+ items: RepoStrongRef.Main[];
337
+ currency: string;
338
+ total?: number;
339
+ status: 'open' | 'expired' | 'abandoned' | 'pending' | 'completed' | 'failed' | 'refunded' | 'cancelled' | 'fulfilled' | l.UnknownString;
340
+ createdAt?: l.DatetimeString;
341
+ expiresAt?: l.DatetimeString;
165
342
  completedAt?: l.DatetimeString;
343
+ payment?: RepoStrongRef.Main;
344
+ signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
166
345
  };
167
346
  export type { View };
168
- /** View of a cart record for use in API responses */
347
+ /** Hydrated cart view returned by PoS get endpoints. */
169
348
  declare const view: l.TypedObjectSchema<"com.atiproto.cart#view", l.Validator<View, View>>;
170
349
  export { view };
171
- type CartItem = {
172
- $type?: 'com.atiproto.cart#cartItem';
173
- /**
174
- * Type of cart item: item or subscription
175
- */
176
- type: 'com.atiproto.item' | 'com.atiproto.subscription';
177
- /**
178
- * AT-URI for item on record
179
- */
180
- recordUri: l.AtUriString;
181
- };
182
- export type { CartItem };
183
- declare const cartItem: l.TypedObjectSchema<"com.atiproto.cart#cartItem", l.Validator<CartItem, CartItem>>;
184
- export { cartItem };