@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
@@ -12,6 +12,9 @@ declare const main: l.Query<"com.atiproto.repo.profile.get", l.ParamsSchema<{
12
12
  readonly format: "did";
13
13
  }>;
14
14
  profile: l.RefSchema<l.Validator<AtiprotoProfile.View, AtiprotoProfile.View>>;
15
+ brokers: l.OptionalSchema<l.ArraySchema<l.StringSchema<{
16
+ readonly format: "did";
17
+ }>>>;
15
18
  }>>, undefined>;
16
19
  export { main };
17
20
  export type $Params = l.InferMethodParams<typeof main>;
@@ -26,4 +29,7 @@ export declare const $lxm: "com.atiproto.repo.profile.get", $params: l.ParamsSch
26
29
  readonly format: "did";
27
30
  }>;
28
31
  profile: l.RefSchema<l.Validator<AtiprotoProfile.View, AtiprotoProfile.View>>;
32
+ brokers: l.OptionalSchema<l.ArraySchema<l.StringSchema<{
33
+ readonly format: "did";
34
+ }>>>;
29
35
  }>>;
@@ -1,10 +1,10 @@
1
1
  import { l } from '@atproto/lex';
2
2
  declare const $nsid = "com.atiproto.repo.subscription.count";
3
3
  export { $nsid };
4
- /** Count active subscriptions. If subject is provided, counts subscriptions received by that DID. If omitted, counts subscriptions the authenticated user has active (as the subscriber). Optionally filtered by a start/end datetime window (matching billingStartDate). When the authenticated user is the subject/owner of the target, the response also includes the sum of amounts. */
4
+ /** Count active subscriptions. When `record` is provided, counts subscriptions targeting that at-uri (either a specific record or, when the at-uri is repo-level like `at://did:plc:...`, all subscriptions the named user receives). When omitted, counts subscriptions the authenticated user has active as the subscriber. Optionally filtered by a start/end datetime window (matching `billingStartDate`). When the authenticated caller is the subject/owner of the target (or counting their own active subscriptions), the response also includes the sum of amounts. */
5
5
  declare const main: l.Query<"com.atiproto.repo.subscription.count", l.ParamsSchema<{
6
- readonly subject: l.OptionalSchema<l.StringSchema<{
7
- readonly format: "did";
6
+ readonly record: l.OptionalSchema<l.StringSchema<{
7
+ readonly format: "at-uri";
8
8
  }>>;
9
9
  readonly startDate: l.OptionalSchema<l.StringSchema<{
10
10
  readonly format: "datetime";
@@ -24,8 +24,8 @@ export type $Params = l.InferMethodParams<typeof main>;
24
24
  export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
25
25
  export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
26
26
  export declare const $lxm: "com.atiproto.repo.subscription.count", $params: l.ParamsSchema<{
27
- readonly subject: l.OptionalSchema<l.StringSchema<{
28
- readonly format: "did";
27
+ readonly record: l.OptionalSchema<l.StringSchema<{
28
+ readonly format: "at-uri";
29
29
  }>>;
30
30
  readonly startDate: l.OptionalSchema<l.StringSchema<{
31
31
  readonly format: "datetime";
@@ -1,296 +1,229 @@
1
1
  import { l } from '@atproto/lex';
2
+ import * as RepoStrongRef from '../atproto/repo/strongRef.defs.js';
3
+ import * as PaymentInitiate from '../../network/attested/payment/initiate.defs.js';
4
+ import * as AttestedSignature from '../../network/attested/signature.defs.js';
2
5
  declare const $nsid = "com.atiproto.subscription";
3
6
  export { $nsid };
4
- /** A record representing a subscription from one user to another */
5
7
  type Main = {
6
8
  $type: 'com.atiproto.subscription';
7
9
  /**
8
- * DID of the user being subscribed to
10
+ * Reference to the entity being subscribed to. Either a `com.atproto.repo.strongRef` (a specific record, e.g. a paid feed) or a `#userRef` (a thin wrapper carrying a did string for the user being subscribed to). Absent when marked as private.
9
11
  */
10
- subject: l.DidString;
12
+ subject?: l.$Typed<RepoStrongRef.Main> | l.$Typed<UserRef> | l.Unknown$TypedObject;
11
13
  /**
12
- * Subscription amount in cents (0 for free subscriptions)
14
+ * Per-period subscription amount in the smallest unit of the cart's `currency` (0 for free).
13
15
  */
14
16
  amount: number;
15
17
  /**
16
- * ISO 4217 currency code
18
+ * Billing cadence. Mirrors `network.attested.payment.initiate#interval`: either `network.attested.payment.initiate#namedInterval` (weekly / monthly / yearly) or `network.attested.payment.initiate#customInterval` (`{ days: integer >= 1 }`).
17
19
  */
18
- currency: string;
20
+ interval: l.$Typed<PaymentInitiate.NamedInterval> | l.$Typed<PaymentInitiate.CustomInterval> | l.Unknown$TypedObject;
19
21
  /**
20
- * Billing interval
22
+ * Subscription lifecycle state. Open to extension via `knownValues`; PoS continues to interpret these values for subscription-specific flows (renewal, dunning, etc.).
21
23
  */
22
- interval: 'monthly' | 'yearly';
24
+ status: 'pending' | 'active' | 'past_due' | 'cancelled' | 'expired' | l.UnknownString;
23
25
  /**
24
- * Subscription status
25
- */
26
- status: 'pending' | 'active' | 'past_due' | 'cancelled' | 'expired';
27
- /**
28
- * First billing period, can be used to determine recurrence
26
+ * First billing period; can be used to derive recurrence.
29
27
  */
30
28
  billingStartDate: l.DatetimeString;
31
- /**
32
- * Cancellation timestamp
33
- */
34
29
  cancelledAt?: l.DatetimeString;
35
30
  /**
36
- * Date until which the subscriber retains access after cancellation
31
+ * Date until which the subscriber retains access after cancellation.
37
32
  */
38
33
  accessUntil?: l.DatetimeString;
34
+ createdAt: l.DatetimeString;
39
35
  /**
40
- * Creation timestamp
36
+ * PoS + recipient AppView attestations. 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 `amount`, `interval`, `status`, `billingStartDate`, `createdAt`, plus `subject`, `cancelledAt`, and `accessUntil` when present. Mutating any of those fields invalidates every signature in this array.
41
37
  */
42
- createdAt: l.DatetimeString;
38
+ signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
43
39
  };
44
40
  export type { Main };
45
- /** A record representing a subscription from one user to another */
46
41
  declare const main: l.RecordSchema<"any", "com.atiproto.subscription", l.Validator<Omit<Main, "$type">, Omit<Main, "$type">>>;
47
42
  export { main };
48
43
  export declare const $isTypeOf: <TValue extends {
49
44
  $type?: unknown;
50
45
  }>(value: TValue) => value is l.TypedRecord<"com.atiproto.subscription", TValue>, $build: {
51
46
  (input: Omit<Omit<Main, "$type">, "$type">): {
52
- currency: string;
53
- status: "pending" | "active" | "past_due" | "cancelled" | "expired";
47
+ subject?: (l.$Typed<RepoStrongRef.Main> | l.$Typed<UserRef> | l.Unknown$TypedObject) | undefined;
48
+ status: "pending" | "active" | "past_due" | "cancelled" | "expired" | l.UnknownString;
54
49
  createdAt: l.DatetimeString;
55
- subject: l.DidString;
50
+ signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
56
51
  amount: number;
57
- interval: "monthly" | "yearly";
52
+ interval: l.$Typed<PaymentInitiate.NamedInterval> | l.$Typed<PaymentInitiate.CustomInterval> | l.Unknown$TypedObject;
58
53
  billingStartDate: l.DatetimeString;
59
54
  cancelledAt?: l.DatetimeString
60
55
  /**
61
- * Date until which the subscriber retains access after cancellation
62
- */
63
- | undefined;
64
- accessUntil?: l.DatetimeString
65
- /**
66
- * Creation timestamp
56
+ * Date until which the subscriber retains access after cancellation.
67
57
  */
68
58
  | undefined;
59
+ accessUntil?: l.DatetimeString | undefined;
69
60
  $type: "com.atiproto.subscription";
70
61
  };
71
62
  (input: Omit<Omit<Main, "$type">, "$type">): {
72
- currency: string;
73
- status: "pending" | "active" | "past_due" | "cancelled" | "expired";
63
+ subject?: (l.$Typed<RepoStrongRef.Main> | l.$Typed<UserRef> | l.Unknown$TypedObject) | undefined;
64
+ status: "pending" | "active" | "past_due" | "cancelled" | "expired" | l.UnknownString;
74
65
  createdAt: l.DatetimeString;
75
- subject: l.DidString;
66
+ signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
76
67
  amount: number;
77
- interval: "monthly" | "yearly";
68
+ interval: l.$Typed<PaymentInitiate.NamedInterval> | l.$Typed<PaymentInitiate.CustomInterval> | l.Unknown$TypedObject;
78
69
  billingStartDate: l.DatetimeString;
79
70
  cancelledAt?: l.DatetimeString
80
71
  /**
81
- * Date until which the subscriber retains access after cancellation
82
- */
83
- | undefined;
84
- accessUntil?: l.DatetimeString
85
- /**
86
- * Creation timestamp
72
+ * Date until which the subscriber retains access after cancellation.
87
73
  */
88
74
  | undefined;
75
+ accessUntil?: l.DatetimeString | undefined;
89
76
  $type: "com.atiproto.subscription";
90
77
  };
91
78
  }, $type: "com.atiproto.subscription";
92
79
  export declare const $assert: (input: unknown, options?: l.ValidateOptions) => asserts input is {
93
- currency: string;
94
- status: "pending" | "active" | "past_due" | "cancelled" | "expired";
80
+ subject?: (l.$Typed<RepoStrongRef.Main> | l.$Typed<UserRef> | l.Unknown$TypedObject) | undefined;
81
+ status: "pending" | "active" | "past_due" | "cancelled" | "expired" | l.UnknownString;
95
82
  createdAt: l.DatetimeString;
96
- subject: l.DidString;
83
+ signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
97
84
  amount: number;
98
- interval: "monthly" | "yearly";
85
+ interval: l.$Typed<PaymentInitiate.NamedInterval> | l.$Typed<PaymentInitiate.CustomInterval> | l.Unknown$TypedObject;
99
86
  billingStartDate: l.DatetimeString;
100
87
  cancelledAt?: l.DatetimeString
101
88
  /**
102
- * Date until which the subscriber retains access after cancellation
103
- */
104
- | undefined;
105
- accessUntil?: l.DatetimeString
106
- /**
107
- * Creation timestamp
89
+ * Date until which the subscriber retains access after cancellation.
108
90
  */
109
91
  | undefined;
92
+ accessUntil?: l.DatetimeString | undefined;
110
93
  $type: "com.atiproto.subscription";
111
94
  }, $check: (input: unknown, options?: l.ValidateOptions) => void, $cast: <I>(input: I, options?: l.ValidateOptions) => I & {
112
- currency: string;
113
- status: "pending" | "active" | "past_due" | "cancelled" | "expired";
95
+ subject?: (l.$Typed<RepoStrongRef.Main> | l.$Typed<UserRef> | l.Unknown$TypedObject) | undefined;
96
+ status: "pending" | "active" | "past_due" | "cancelled" | "expired" | l.UnknownString;
114
97
  createdAt: l.DatetimeString;
115
- subject: l.DidString;
98
+ signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
116
99
  amount: number;
117
- interval: "monthly" | "yearly";
100
+ interval: l.$Typed<PaymentInitiate.NamedInterval> | l.$Typed<PaymentInitiate.CustomInterval> | l.Unknown$TypedObject;
118
101
  billingStartDate: l.DatetimeString;
119
102
  cancelledAt?: l.DatetimeString
120
103
  /**
121
- * Date until which the subscriber retains access after cancellation
122
- */
123
- | undefined;
124
- accessUntil?: l.DatetimeString
125
- /**
126
- * Creation timestamp
104
+ * Date until which the subscriber retains access after cancellation.
127
105
  */
128
106
  | undefined;
107
+ accessUntil?: l.DatetimeString | undefined;
129
108
  $type: "com.atiproto.subscription";
130
109
  }, $ifMatches: <I>(input: I, options?: l.ValidateOptions) => (I & {
131
- currency: string;
132
- status: "pending" | "active" | "past_due" | "cancelled" | "expired";
110
+ subject?: (l.$Typed<RepoStrongRef.Main> | l.$Typed<UserRef> | l.Unknown$TypedObject) | undefined;
111
+ status: "pending" | "active" | "past_due" | "cancelled" | "expired" | l.UnknownString;
133
112
  createdAt: l.DatetimeString;
134
- subject: l.DidString;
113
+ signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
135
114
  amount: number;
136
- interval: "monthly" | "yearly";
115
+ interval: l.$Typed<PaymentInitiate.NamedInterval> | l.$Typed<PaymentInitiate.CustomInterval> | l.Unknown$TypedObject;
137
116
  billingStartDate: l.DatetimeString;
138
117
  cancelledAt?: l.DatetimeString
139
118
  /**
140
- * Date until which the subscriber retains access after cancellation
141
- */
142
- | undefined;
143
- accessUntil?: l.DatetimeString
144
- /**
145
- * Creation timestamp
119
+ * Date until which the subscriber retains access after cancellation.
146
120
  */
147
121
  | undefined;
122
+ accessUntil?: l.DatetimeString | undefined;
148
123
  $type: "com.atiproto.subscription";
149
124
  }) | undefined, $matches: <I>(input: I, options?: l.ValidateOptions) => input is I & {
150
- currency: string;
151
- status: "pending" | "active" | "past_due" | "cancelled" | "expired";
125
+ subject?: (l.$Typed<RepoStrongRef.Main> | l.$Typed<UserRef> | l.Unknown$TypedObject) | undefined;
126
+ status: "pending" | "active" | "past_due" | "cancelled" | "expired" | l.UnknownString;
152
127
  createdAt: l.DatetimeString;
153
- subject: l.DidString;
128
+ signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
154
129
  amount: number;
155
- interval: "monthly" | "yearly";
130
+ interval: l.$Typed<PaymentInitiate.NamedInterval> | l.$Typed<PaymentInitiate.CustomInterval> | l.Unknown$TypedObject;
156
131
  billingStartDate: l.DatetimeString;
157
132
  cancelledAt?: l.DatetimeString
158
133
  /**
159
- * Date until which the subscriber retains access after cancellation
160
- */
161
- | undefined;
162
- accessUntil?: l.DatetimeString
163
- /**
164
- * Creation timestamp
134
+ * Date until which the subscriber retains access after cancellation.
165
135
  */
166
136
  | undefined;
137
+ accessUntil?: l.DatetimeString | undefined;
167
138
  $type: "com.atiproto.subscription";
168
139
  }, $parse: (input: unknown, options?: l.ParseOptions) => {
169
- currency: string;
170
- status: "pending" | "active" | "past_due" | "cancelled" | "expired";
140
+ subject?: (l.$Typed<RepoStrongRef.Main> | l.$Typed<UserRef> | l.Unknown$TypedObject) | undefined;
141
+ status: "pending" | "active" | "past_due" | "cancelled" | "expired" | l.UnknownString;
171
142
  createdAt: l.DatetimeString;
172
- subject: l.DidString;
143
+ signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
173
144
  amount: number;
174
- interval: "monthly" | "yearly";
145
+ interval: l.$Typed<PaymentInitiate.NamedInterval> | l.$Typed<PaymentInitiate.CustomInterval> | l.Unknown$TypedObject;
175
146
  billingStartDate: l.DatetimeString;
176
147
  cancelledAt?: l.DatetimeString
177
148
  /**
178
- * Date until which the subscriber retains access after cancellation
179
- */
180
- | undefined;
181
- accessUntil?: l.DatetimeString
182
- /**
183
- * Creation timestamp
149
+ * Date until which the subscriber retains access after cancellation.
184
150
  */
185
151
  | undefined;
152
+ accessUntil?: l.DatetimeString | undefined;
186
153
  $type: "com.atiproto.subscription";
187
154
  }, $safeParse: (input: unknown, options?: l.ParseOptions) => l.ValidationResult<{
188
- currency: string;
189
- status: "pending" | "active" | "past_due" | "cancelled" | "expired";
155
+ subject?: (l.$Typed<RepoStrongRef.Main> | l.$Typed<UserRef> | l.Unknown$TypedObject) | undefined;
156
+ status: "pending" | "active" | "past_due" | "cancelled" | "expired" | l.UnknownString;
190
157
  createdAt: l.DatetimeString;
191
- subject: l.DidString;
158
+ signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
192
159
  amount: number;
193
- interval: "monthly" | "yearly";
160
+ interval: l.$Typed<PaymentInitiate.NamedInterval> | l.$Typed<PaymentInitiate.CustomInterval> | l.Unknown$TypedObject;
194
161
  billingStartDate: l.DatetimeString;
195
162
  cancelledAt?: l.DatetimeString
196
163
  /**
197
- * Date until which the subscriber retains access after cancellation
198
- */
199
- | undefined;
200
- accessUntil?: l.DatetimeString
201
- /**
202
- * Creation timestamp
164
+ * Date until which the subscriber retains access after cancellation.
203
165
  */
204
166
  | undefined;
167
+ accessUntil?: l.DatetimeString | undefined;
205
168
  $type: "com.atiproto.subscription";
206
169
  }>, $validate: <I>(input: I, options?: l.ValidateOptions) => I & {
207
- currency: string;
208
- status: "pending" | "active" | "past_due" | "cancelled" | "expired";
170
+ subject?: (l.$Typed<RepoStrongRef.Main> | l.$Typed<UserRef> | l.Unknown$TypedObject) | undefined;
171
+ status: "pending" | "active" | "past_due" | "cancelled" | "expired" | l.UnknownString;
209
172
  createdAt: l.DatetimeString;
210
- subject: l.DidString;
173
+ signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
211
174
  amount: number;
212
- interval: "monthly" | "yearly";
175
+ interval: l.$Typed<PaymentInitiate.NamedInterval> | l.$Typed<PaymentInitiate.CustomInterval> | l.Unknown$TypedObject;
213
176
  billingStartDate: l.DatetimeString;
214
177
  cancelledAt?: l.DatetimeString
215
178
  /**
216
- * Date until which the subscriber retains access after cancellation
217
- */
218
- | undefined;
219
- accessUntil?: l.DatetimeString
220
- /**
221
- * Creation timestamp
179
+ * Date until which the subscriber retains access after cancellation.
222
180
  */
223
181
  | undefined;
182
+ accessUntil?: l.DatetimeString | undefined;
224
183
  $type: "com.atiproto.subscription";
225
184
  }, $safeValidate: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
226
- currency: string;
227
- status: "pending" | "active" | "past_due" | "cancelled" | "expired";
185
+ subject?: (l.$Typed<RepoStrongRef.Main> | l.$Typed<UserRef> | l.Unknown$TypedObject) | undefined;
186
+ status: "pending" | "active" | "past_due" | "cancelled" | "expired" | l.UnknownString;
228
187
  createdAt: l.DatetimeString;
229
- subject: l.DidString;
188
+ signatures: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
230
189
  amount: number;
231
- interval: "monthly" | "yearly";
190
+ interval: l.$Typed<PaymentInitiate.NamedInterval> | l.$Typed<PaymentInitiate.CustomInterval> | l.Unknown$TypedObject;
232
191
  billingStartDate: l.DatetimeString;
233
192
  cancelledAt?: l.DatetimeString
234
193
  /**
235
- * Date until which the subscriber retains access after cancellation
236
- */
237
- | undefined;
238
- accessUntil?: l.DatetimeString
239
- /**
240
- * Creation timestamp
194
+ * Date until which the subscriber retains access after cancellation.
241
195
  */
242
196
  | undefined;
197
+ accessUntil?: l.DatetimeString | undefined;
243
198
  $type: "com.atiproto.subscription";
244
199
  }>;
245
- /** View of a subscription record for use in API responses */
246
200
  type View = {
247
201
  $type?: 'com.atiproto.subscription#view';
248
- /**
249
- * AT-URI of the subscription record
250
- */
251
202
  uri: l.AtUriString;
252
- /**
253
- * DID of the user being subscribed to
254
- */
255
- subject?: l.DidString;
256
- /**
257
- * Subscription amount in cents (0 for free subscriptions)
258
- */
203
+ cid?: l.CidString;
204
+ subject?: l.$Typed<RepoStrongRef.Main> | l.$Typed<UserRef> | l.Unknown$TypedObject;
259
205
  amount: number;
260
- /**
261
- * ISO 4217 currency code
262
- */
263
- currency: string;
264
- /**
265
- * Billing interval
266
- */
267
- interval: 'monthly' | 'yearly';
268
- /**
269
- * Subscription status
270
- */
271
- status: 'pending' | 'active' | 'past_due' | 'cancelled' | 'expired';
272
- /**
273
- * First billing period, can be used to determine recurrence
274
- */
206
+ interval: l.$Typed<PaymentInitiate.NamedInterval> | l.$Typed<PaymentInitiate.CustomInterval> | l.Unknown$TypedObject;
207
+ status: 'pending' | 'active' | 'past_due' | 'cancelled' | 'expired' | l.UnknownString;
275
208
  billingStartDate: l.DatetimeString;
276
209
  /**
277
- * Next scheduled renewal/billing date. Server-derived from the billing schedule; not stored in PDS. Omitted when not applicable (e.g. cancelled or unauthenticated views).
210
+ * Next scheduled renewal/billing date. Server-derived from the billing schedule; not stored on the record.
278
211
  */
279
212
  renewalDate?: l.DatetimeString;
280
- /**
281
- * Cancellation timestamp
282
- */
283
213
  cancelledAt?: l.DatetimeString;
284
- /**
285
- * Date until which the subscriber retains access after cancellation
286
- */
287
214
  accessUntil?: l.DatetimeString;
288
- /**
289
- * Creation timestamp
290
- */
291
215
  createdAt: l.DatetimeString;
216
+ signatures?: (l.$Typed<AttestedSignature.Main> | l.$Typed<RepoStrongRef.Main> | l.Unknown$TypedObject)[];
292
217
  };
293
218
  export type { View };
294
- /** View of a subscription record for use in API responses */
295
219
  declare const view: l.TypedObjectSchema<"com.atiproto.subscription#view", l.Validator<View, View>>;
296
220
  export { view };
221
+ /** Thin wrapper that carries a bare did string for the user being subscribed to. The wire shape is `{ "$type": "com.atiproto.subscription#userRef", "did": "did:plc:..." }`; pair with `com.atproto.repo.strongRef` in a `subject` union to express either-or. */
222
+ type UserRef = {
223
+ $type?: 'com.atiproto.subscription#userRef';
224
+ did: l.DidString;
225
+ };
226
+ export type { UserRef };
227
+ /** Thin wrapper that carries a bare did string for the user being subscribed to. The wire shape is `{ "$type": "com.atiproto.subscription#userRef", "did": "did:plc:..." }`; pair with `com.atproto.repo.strongRef` in a `subject` union to express either-or. */
228
+ declare const userRef: l.TypedObjectSchema<"com.atiproto.subscription#userRef", l.Validator<UserRef, UserRef>>;
229
+ export { userRef };
@@ -1,6 +1,12 @@
1
1
  export * as actions from './atiproto/actions.js';
2
- export * as authEnhanced from './atiproto/authEnhanced.js';
3
- export * as authGeneral from './atiproto/authGeneral.js';
2
+ export * as authCreateCart from './atiproto/authCreateCart.js';
3
+ export * as authCreatePayment from './atiproto/authCreatePayment.js';
4
+ export * as authReadCart from './atiproto/authReadCart.js';
5
+ export * as authReadEntitlements from './atiproto/authReadEntitlements.js';
6
+ export * as authReadPayments from './atiproto/authReadPayments.js';
7
+ export * as authReadPublic from './atiproto/authReadPublic.js';
8
+ export * as authReadRecipient from './atiproto/authReadRecipient.js';
9
+ export * as authWriteProfile from './atiproto/authWriteProfile.js';
4
10
  export * as cart from './atiproto/cart.js';
5
11
  export * as item from './atiproto/item.js';
6
12
  export * as payment from './atiproto/payment.js';
@@ -0,0 +1,2 @@
1
+ export * from './strongRef.defs.js';
2
+ export * as $defs from './strongRef.defs.js';
@@ -0,0 +1,56 @@
1
+ import { l } from '@atproto/lex';
2
+ declare const $nsid = "com.atproto.repo.strongRef";
3
+ export { $nsid };
4
+ type Main = {
5
+ $type?: 'com.atproto.repo.strongRef';
6
+ cid: l.CidString;
7
+ uri: l.AtUriString;
8
+ };
9
+ export type { Main };
10
+ declare const main: l.TypedObjectSchema<"com.atproto.repo.strongRef", l.Validator<Main, Main>>;
11
+ export { main };
12
+ export declare const $isTypeOf: <TValue extends Record<string, unknown>>(value: TValue) => value is l.MaybeTypedObject<"com.atproto.repo.strongRef", TValue>, $build: {
13
+ (input: Omit<Main, "$type">): {
14
+ $type: "com.atproto.repo.strongRef";
15
+ cid: l.CidString;
16
+ uri: l.AtUriString;
17
+ };
18
+ (input: Omit<Main, "$type">): {
19
+ $type: "com.atproto.repo.strongRef";
20
+ cid: l.CidString;
21
+ uri: l.AtUriString;
22
+ };
23
+ }, $type: "com.atproto.repo.strongRef";
24
+ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => asserts input is {
25
+ $type?: "com.atproto.repo.strongRef" | undefined;
26
+ cid: l.CidString;
27
+ uri: l.AtUriString;
28
+ }, $check: (input: unknown, options?: l.ValidateOptions) => void, $cast: <I>(input: I, options?: l.ValidateOptions) => I & {
29
+ $type?: "com.atproto.repo.strongRef" | undefined;
30
+ cid: l.CidString;
31
+ uri: l.AtUriString;
32
+ }, $ifMatches: <I>(input: I, options?: l.ValidateOptions) => (I & {
33
+ $type?: "com.atproto.repo.strongRef" | undefined;
34
+ cid: l.CidString;
35
+ uri: l.AtUriString;
36
+ }) | undefined, $matches: <I>(input: I, options?: l.ValidateOptions) => input is I & {
37
+ $type?: "com.atproto.repo.strongRef" | undefined;
38
+ cid: l.CidString;
39
+ uri: l.AtUriString;
40
+ }, $parse: (input: unknown, options?: l.ParseOptions) => {
41
+ $type?: "com.atproto.repo.strongRef" | undefined;
42
+ cid: l.CidString;
43
+ uri: l.AtUriString;
44
+ }, $safeParse: (input: unknown, options?: l.ParseOptions) => l.ValidationResult<{
45
+ $type?: "com.atproto.repo.strongRef" | undefined;
46
+ cid: l.CidString;
47
+ uri: l.AtUriString;
48
+ }>, $validate: <I>(input: I, options?: l.ValidateOptions) => I & {
49
+ $type?: "com.atproto.repo.strongRef" | undefined;
50
+ cid: l.CidString;
51
+ uri: l.AtUriString;
52
+ }, $safeValidate: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
53
+ $type?: "com.atproto.repo.strongRef" | undefined;
54
+ cid: l.CidString;
55
+ uri: l.AtUriString;
56
+ }>;
@@ -0,0 +1 @@
1
+ export * as strongRef from './repo/strongRef.js';
@@ -0,0 +1 @@
1
+ export * as repo from './atproto/repo.js';
@@ -1 +1,2 @@
1
1
  export * as atiproto from './com/atiproto.js';
2
+ export * as atproto from './com/atproto.js';
@@ -1 +1,2 @@
1
1
  export * as com from './com.js';
2
+ export * as network from './network.js';
@@ -0,0 +1,2 @@
1
+ export * from './entitlement.defs.js';
2
+ export * as $defs from './entitlement.defs.js';