@atiproto/lexicons 1.0.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 +3459 -2459
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +3456 -2459
  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 -39
  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
@@ -2,18 +2,24 @@ import { l } from '@atproto/lex';
2
2
  import * as AtiprotoCart from '../../cart.defs.js';
3
3
  declare const $nsid = "com.atiproto.payment.cart.list";
4
4
  export { $nsid };
5
- /** List carts created by the authenticated user. */
5
+ /** List carts created by the authenticated user. Supports filtering by recipient subject, a specific record (an item / subscription line, or the subject the line points at), and cart status (cart and broker payment statuses are unified on the cart's `status` field). */
6
6
  declare const main: l.Query<"com.atiproto.payment.cart.list", l.ParamsSchema<{
7
7
  readonly subject: l.OptionalSchema<l.StringSchema<{
8
8
  readonly format: "did";
9
9
  }>>;
10
- readonly status: l.OptionalSchema<l.EnumSchema<"open" | "completed" | "expired" | "abandoned">>;
10
+ readonly record: l.OptionalSchema<l.StringSchema<{
11
+ readonly format: "at-uri";
12
+ }>>;
13
+ readonly status: l.OptionalSchema<l.StringSchema<{
14
+ maxLength: 64;
15
+ knownValues: ["open", "expired", "abandoned", "pending", "completed", "failed", "refunded", "cancelled", "fulfilled"];
16
+ }>>;
11
17
  readonly cursor: l.OptionalSchema<l.StringSchema<{
12
18
  readonly maxLength: 512;
13
19
  }>>;
14
20
  readonly limit: l.OptionalSchema<l.WithDefaultSchema<l.IntegerSchema>>;
15
21
  }>, l.Payload<"application/json", l.ObjectSchema<{
16
- carts: l.ArraySchema<l.RefSchema<l.Validator<CartResponse, CartResponse>>>;
22
+ carts: l.ArraySchema<l.RefSchema<l.Validator<AtiprotoCart.View, AtiprotoCart.View>>>;
17
23
  cursor: l.OptionalSchema<l.StringSchema<{
18
24
  readonly maxLength: 512;
19
25
  }>>;
@@ -26,29 +32,20 @@ export declare const $lxm: "com.atiproto.payment.cart.list", $params: l.ParamsSc
26
32
  readonly subject: l.OptionalSchema<l.StringSchema<{
27
33
  readonly format: "did";
28
34
  }>>;
29
- readonly status: l.OptionalSchema<l.EnumSchema<"open" | "completed" | "expired" | "abandoned">>;
35
+ readonly record: l.OptionalSchema<l.StringSchema<{
36
+ readonly format: "at-uri";
37
+ }>>;
38
+ readonly status: l.OptionalSchema<l.StringSchema<{
39
+ maxLength: 64;
40
+ knownValues: ["open", "expired", "abandoned", "pending", "completed", "failed", "refunded", "cancelled", "fulfilled"];
41
+ }>>;
30
42
  readonly cursor: l.OptionalSchema<l.StringSchema<{
31
43
  readonly maxLength: 512;
32
44
  }>>;
33
45
  readonly limit: l.OptionalSchema<l.WithDefaultSchema<l.IntegerSchema>>;
34
46
  }>, $output: l.Payload<"application/json", l.ObjectSchema<{
35
- carts: l.ArraySchema<l.RefSchema<l.Validator<CartResponse, CartResponse>>>;
47
+ carts: l.ArraySchema<l.RefSchema<l.Validator<AtiprotoCart.View, AtiprotoCart.View>>>;
36
48
  cursor: l.OptionalSchema<l.StringSchema<{
37
49
  readonly maxLength: 512;
38
50
  }>>;
39
51
  }>>;
40
- type CartResponse = {
41
- $type?: 'com.atiproto.payment.cart.list#cartResponse';
42
- /**
43
- * AT-URI of the cart record
44
- */
45
- uri: l.AtUriString;
46
- /**
47
- * CID of the cart record
48
- */
49
- cid: l.CidString;
50
- record: AtiprotoCart.View;
51
- };
52
- export type { CartResponse };
53
- declare const cartResponse: l.TypedObjectSchema<"com.atiproto.payment.cart.list#cartResponse", l.Validator<CartResponse, CartResponse>>;
54
- export { cartResponse };
@@ -3,7 +3,7 @@ import * as AtiprotoCart from '../../cart.defs.js';
3
3
  import * as AtiprotoActions from '../../actions.defs.js';
4
4
  declare const $nsid = "com.atiproto.payment.cart.put";
5
5
  export { $nsid };
6
- /** Update a cart. Only open carts can be updated. */
6
+ /** Update a cart. */
7
7
  declare const main: l.Procedure<"com.atiproto.payment.cart.put", l.ParamsSchema<{}>, l.Payload<"application/json", l.ObjectSchema<{
8
8
  uri: l.StringSchema<{
9
9
  readonly format: "at-uri";
@@ -12,12 +12,7 @@ declare const main: l.Procedure<"com.atiproto.payment.cart.put", l.ParamsSchema<
12
12
  workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.InboundWorkflow, AtiprotoActions.InboundWorkflow>>>;
13
13
  }>>, l.Payload<"application/json", l.ObjectSchema<{
14
14
  workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.OutboundWorkflow, AtiprotoActions.OutboundWorkflow>>>;
15
- uri: l.OptionalSchema<l.StringSchema<{
16
- readonly format: "at-uri";
17
- }>>;
18
- cid: l.OptionalSchema<l.StringSchema<{
19
- readonly format: "cid";
20
- }>>;
15
+ cart: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoCart.View, AtiprotoCart.View>>>;
21
16
  }>>, undefined>;
22
17
  export { main };
23
18
  export type $Params = l.InferMethodParams<typeof main>;
@@ -33,10 +28,5 @@ export declare const $lxm: "com.atiproto.payment.cart.put", $params: l.ParamsSch
33
28
  workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.InboundWorkflow, AtiprotoActions.InboundWorkflow>>>;
34
29
  }>>, $output: l.Payload<"application/json", l.ObjectSchema<{
35
30
  workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.OutboundWorkflow, AtiprotoActions.OutboundWorkflow>>>;
36
- uri: l.OptionalSchema<l.StringSchema<{
37
- readonly format: "at-uri";
38
- }>>;
39
- cid: l.OptionalSchema<l.StringSchema<{
40
- readonly format: "cid";
41
- }>>;
31
+ cart: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoCart.View, AtiprotoCart.View>>>;
42
32
  }>>;
@@ -1,4 +1,4 @@
1
- export * as clone from './cart/clone.js';
1
+ export * as checkout from './cart/checkout.js';
2
2
  export * as create from './cart/create.js';
3
3
  export * as 'get' from './cart/get.js';
4
4
  export * as list from './cart/list.js';
@@ -1,46 +1,29 @@
1
1
  import { l } from '@atproto/lex';
2
- import * as AtiprotoActions from '../../actions.defs.js';
2
+ import * as RepoStrongRef from '../../../atproto/repo/strongRef.defs.js';
3
3
  import * as AtiprotoItem from '../../item.defs.js';
4
- import * as AtiprotoCart from '../../cart.defs.js';
4
+ import * as AtiprotoActions from '../../actions.defs.js';
5
5
  declare const $nsid = "com.atiproto.payment.item.create";
6
6
  export { $nsid };
7
- /** Create a item on a DID or specific record. Creates or adds to a cart and returns a checkout URL. */
7
+ /** Create an item. */
8
8
  declare const main: l.Procedure<"com.atiproto.payment.item.create", l.ParamsSchema<{}>, l.Payload<"application/json", l.ObjectSchema<{
9
- subject: l.StringSchema<{
10
- readonly format: "did";
11
- }>;
12
- recordUri: l.OptionalSchema<l.StringSchema<{
13
- readonly format: "at-uri";
14
- }>>;
9
+ subject: l.TypedUnionSchema<readonly [l.TypedRefSchema<l.TypedObjectValidator<RepoStrongRef.Main, RepoStrongRef.Main>>, l.TypedRefSchema<l.TypedObjectValidator<AtiprotoItem.UserRef, AtiprotoItem.UserRef>>], false>;
15
10
  amount: l.IntegerSchema;
16
- currency: l.StringSchema<{
11
+ quantity: l.OptionalSchema<l.WithDefaultSchema<l.IntegerSchema>>;
12
+ currency: l.OptionalSchema<l.StringSchema<{
17
13
  readonly maxLength: 3;
18
- }>;
19
- cartUri: l.OptionalSchema<l.StringSchema<{
20
- readonly format: "at-uri";
21
- }>>;
22
- redirectUrl: l.OptionalSchema<l.StringSchema<{
23
- readonly format: "uri";
24
14
  }>>;
25
15
  message: l.OptionalSchema<l.StringSchema<{
26
16
  readonly maxGraphemes: 500;
27
17
  readonly maxLength: 5000;
28
18
  }>>;
29
- isPrivate: l.OptionalSchema<l.BooleanSchema>;
30
- workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.InboundWorkflow, AtiprotoActions.InboundWorkflow>>>;
31
- }>>, l.Payload<"application/json", l.ObjectSchema<{
32
- workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.OutboundWorkflow, AtiprotoActions.OutboundWorkflow>>>;
33
- itemUri: l.OptionalSchema<l.StringSchema<{
34
- readonly format: "at-uri";
35
- }>>;
36
- item: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoItem.View, AtiprotoItem.View>>>;
19
+ private: l.OptionalSchema<l.BooleanSchema>;
37
20
  cartUri: l.OptionalSchema<l.StringSchema<{
38
21
  readonly format: "at-uri";
39
22
  }>>;
40
- cart: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoCart.View, AtiprotoCart.View>>>;
41
- checkoutUrl: l.OptionalSchema<l.StringSchema<{
42
- readonly format: "uri";
43
- }>>;
23
+ workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.InboundWorkflow, AtiprotoActions.InboundWorkflow>>>;
24
+ }>>, l.Payload<"application/json", l.ObjectSchema<{
25
+ workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.OutboundWorkflow, AtiprotoActions.OutboundWorkflow>>>;
26
+ item: l.RefSchema<l.Validator<AtiprotoItem.View, AtiprotoItem.View>>;
44
27
  }>>, undefined>;
45
28
  export { main };
46
29
  export type $Params = l.InferMethodParams<typeof main>;
@@ -49,39 +32,22 @@ export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<typeof main, B
49
32
  export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
50
33
  export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
51
34
  export declare const $lxm: "com.atiproto.payment.item.create", $params: l.ParamsSchema<{}>, $input: l.Payload<"application/json", l.ObjectSchema<{
52
- subject: l.StringSchema<{
53
- readonly format: "did";
54
- }>;
55
- recordUri: l.OptionalSchema<l.StringSchema<{
56
- readonly format: "at-uri";
57
- }>>;
35
+ subject: l.TypedUnionSchema<readonly [l.TypedRefSchema<l.TypedObjectValidator<RepoStrongRef.Main, RepoStrongRef.Main>>, l.TypedRefSchema<l.TypedObjectValidator<AtiprotoItem.UserRef, AtiprotoItem.UserRef>>], false>;
58
36
  amount: l.IntegerSchema;
59
- currency: l.StringSchema<{
37
+ quantity: l.OptionalSchema<l.WithDefaultSchema<l.IntegerSchema>>;
38
+ currency: l.OptionalSchema<l.StringSchema<{
60
39
  readonly maxLength: 3;
61
- }>;
62
- cartUri: l.OptionalSchema<l.StringSchema<{
63
- readonly format: "at-uri";
64
- }>>;
65
- redirectUrl: l.OptionalSchema<l.StringSchema<{
66
- readonly format: "uri";
67
40
  }>>;
68
41
  message: l.OptionalSchema<l.StringSchema<{
69
42
  readonly maxGraphemes: 500;
70
43
  readonly maxLength: 5000;
71
44
  }>>;
72
- isPrivate: l.OptionalSchema<l.BooleanSchema>;
73
- workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.InboundWorkflow, AtiprotoActions.InboundWorkflow>>>;
74
- }>>, $output: l.Payload<"application/json", l.ObjectSchema<{
75
- workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.OutboundWorkflow, AtiprotoActions.OutboundWorkflow>>>;
76
- itemUri: l.OptionalSchema<l.StringSchema<{
77
- readonly format: "at-uri";
78
- }>>;
79
- item: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoItem.View, AtiprotoItem.View>>>;
45
+ private: l.OptionalSchema<l.BooleanSchema>;
80
46
  cartUri: l.OptionalSchema<l.StringSchema<{
81
47
  readonly format: "at-uri";
82
48
  }>>;
83
- cart: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoCart.View, AtiprotoCart.View>>>;
84
- checkoutUrl: l.OptionalSchema<l.StringSchema<{
85
- readonly format: "uri";
86
- }>>;
49
+ workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.InboundWorkflow, AtiprotoActions.InboundWorkflow>>>;
50
+ }>>, $output: l.Payload<"application/json", l.ObjectSchema<{
51
+ workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.OutboundWorkflow, AtiprotoActions.OutboundWorkflow>>>;
52
+ item: l.RefSchema<l.Validator<AtiprotoItem.View, AtiprotoItem.View>>;
87
53
  }>>;
@@ -2,17 +2,11 @@ import { l } from '@atproto/lex';
2
2
  import * as AtiprotoItem from '../../item.defs.js';
3
3
  declare const $nsid = "com.atiproto.payment.item.get";
4
4
  export { $nsid };
5
- /** Get a specific item sent by the authenticated user. Looks up by item record uri, subject (recipient) DID, or record uri. These are mutually exclusive and resolved in that order. */
5
+ /** Hydrate an item record by uri. The authenticated user must be the sender. Search filters that were previously on this endpoint live on `payment.item.list`. */
6
6
  declare const main: l.Query<"com.atiproto.payment.item.get", l.ParamsSchema<{
7
- readonly uri: l.OptionalSchema<l.StringSchema<{
7
+ readonly uri: l.StringSchema<{
8
8
  readonly format: "at-uri";
9
- }>>;
10
- readonly subject: l.OptionalSchema<l.StringSchema<{
11
- readonly format: "did";
12
- }>>;
13
- readonly recordUri: l.OptionalSchema<l.StringSchema<{
14
- readonly format: "at-uri";
15
- }>>;
9
+ }>;
16
10
  }>, l.Payload<"application/json", l.ObjectSchema<{
17
11
  item: l.RefSchema<l.Validator<AtiprotoItem.View, AtiprotoItem.View>>;
18
12
  }>>, undefined>;
@@ -21,15 +15,9 @@ export type $Params = l.InferMethodParams<typeof main>;
21
15
  export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
22
16
  export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
23
17
  export declare const $lxm: "com.atiproto.payment.item.get", $params: l.ParamsSchema<{
24
- readonly uri: l.OptionalSchema<l.StringSchema<{
25
- readonly format: "at-uri";
26
- }>>;
27
- readonly subject: l.OptionalSchema<l.StringSchema<{
28
- readonly format: "did";
29
- }>>;
30
- readonly recordUri: l.OptionalSchema<l.StringSchema<{
18
+ readonly uri: l.StringSchema<{
31
19
  readonly format: "at-uri";
32
- }>>;
20
+ }>;
33
21
  }>, $output: l.Payload<"application/json", l.ObjectSchema<{
34
22
  item: l.RefSchema<l.Validator<AtiprotoItem.View, AtiprotoItem.View>>;
35
23
  }>>;
@@ -2,12 +2,9 @@ import { l } from '@atproto/lex';
2
2
  import * as AtiprotoItem from '../../item.defs.js';
3
3
  declare const $nsid = "com.atiproto.payment.item.list";
4
4
  export { $nsid };
5
- /** List items sent by the authenticated user */
5
+ /** List items sent by the authenticated user. */
6
6
  declare const main: l.Query<"com.atiproto.payment.item.list", l.ParamsSchema<{
7
7
  readonly subject: l.OptionalSchema<l.StringSchema<{
8
- readonly format: "did";
9
- }>>;
10
- readonly recordUri: l.OptionalSchema<l.StringSchema<{
11
8
  readonly format: "at-uri";
12
9
  }>>;
13
10
  readonly cursor: l.OptionalSchema<l.StringSchema<{
@@ -26,9 +23,6 @@ export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
26
23
  export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
27
24
  export declare const $lxm: "com.atiproto.payment.item.list", $params: l.ParamsSchema<{
28
25
  readonly subject: l.OptionalSchema<l.StringSchema<{
29
- readonly format: "did";
30
- }>>;
31
- readonly recordUri: l.OptionalSchema<l.StringSchema<{
32
26
  readonly format: "at-uri";
33
27
  }>>;
34
28
  readonly cursor: l.OptionalSchema<l.StringSchema<{
@@ -3,7 +3,7 @@ import * as AtiprotoItem from '../../item.defs.js';
3
3
  import * as AtiprotoActions from '../../actions.defs.js';
4
4
  declare const $nsid = "com.atiproto.payment.item.put";
5
5
  export { $nsid };
6
- /** Update a pending item. Only pending items can be updated. */
6
+ /** Update an item. */
7
7
  declare const main: l.Procedure<"com.atiproto.payment.item.put", l.ParamsSchema<{}>, l.Payload<"application/json", l.ObjectSchema<{
8
8
  uri: l.StringSchema<{
9
9
  readonly format: "at-uri";
@@ -2,4 +2,3 @@ export * as create from './item/create.js';
2
2
  export * as 'get' from './item/get.js';
3
3
  export * as list from './item/list.js';
4
4
  export * as put from './item/put.js';
5
- export * as validate from './item/validate.js';
@@ -3,7 +3,7 @@ import * as AtiprotoActions from '../../actions.defs.js';
3
3
  import * as AtiprotoSubscription from '../../subscription.defs.js';
4
4
  declare const $nsid = "com.atiproto.payment.subscription.cancel";
5
5
  export { $nsid };
6
- /** Cancel an active subscription */
6
+ /** Cancel an active subscription. Should be implemented by broker. May be implemented by PoS to orchestrate with broker. */
7
7
  declare const main: l.Procedure<"com.atiproto.payment.subscription.cancel", l.ParamsSchema<{}>, l.Payload<"application/json", l.ObjectSchema<{
8
8
  subscriptionUri: l.StringSchema<{
9
9
  readonly format: "at-uri";
@@ -11,9 +11,6 @@ declare const main: l.Procedure<"com.atiproto.payment.subscription.cancel", l.Pa
11
11
  workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.InboundWorkflow, AtiprotoActions.InboundWorkflow>>>;
12
12
  }>>, l.Payload<"application/json", l.ObjectSchema<{
13
13
  workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.OutboundWorkflow, AtiprotoActions.OutboundWorkflow>>>;
14
- subscriptionUri: l.OptionalSchema<l.StringSchema<{
15
- readonly format: "at-uri";
16
- }>>;
17
14
  subscription: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoSubscription.View, AtiprotoSubscription.View>>>;
18
15
  accessUntil: l.OptionalSchema<l.StringSchema<{
19
16
  readonly format: "datetime";
@@ -32,9 +29,6 @@ export declare const $lxm: "com.atiproto.payment.subscription.cancel", $params:
32
29
  workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.InboundWorkflow, AtiprotoActions.InboundWorkflow>>>;
33
30
  }>>, $output: l.Payload<"application/json", l.ObjectSchema<{
34
31
  workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.OutboundWorkflow, AtiprotoActions.OutboundWorkflow>>>;
35
- subscriptionUri: l.OptionalSchema<l.StringSchema<{
36
- readonly format: "at-uri";
37
- }>>;
38
32
  subscription: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoSubscription.View, AtiprotoSubscription.View>>>;
39
33
  accessUntil: l.OptionalSchema<l.StringSchema<{
40
34
  readonly format: "datetime";
@@ -1,40 +1,29 @@
1
1
  import { l } from '@atproto/lex';
2
- import * as AtiprotoActions from '../../actions.defs.js';
2
+ import * as RepoStrongRef from '../../../atproto/repo/strongRef.defs.js';
3
3
  import * as AtiprotoSubscription from '../../subscription.defs.js';
4
- import * as AtiprotoCart from '../../cart.defs.js';
4
+ import * as PaymentInitiate from '../../../../network/attested/payment/initiate.defs.js';
5
+ import * as AtiprotoActions from '../../actions.defs.js';
5
6
  declare const $nsid = "com.atiproto.payment.subscription.create";
6
7
  export { $nsid };
7
- /** Create a subscription to a user. Returns a one-off cart with checkout URL. */
8
+ /** Create a subscription. */
8
9
  declare const main: l.Procedure<"com.atiproto.payment.subscription.create", l.ParamsSchema<{}>, l.Payload<"application/json", l.ObjectSchema<{
9
- subject: l.StringSchema<{
10
- readonly format: "did";
11
- }>;
10
+ subject: l.TypedUnionSchema<readonly [l.TypedRefSchema<l.TypedObjectValidator<RepoStrongRef.Main, RepoStrongRef.Main>>, l.TypedRefSchema<l.TypedObjectValidator<AtiprotoSubscription.UserRef, AtiprotoSubscription.UserRef>>], false>;
12
11
  amount: l.OptionalSchema<l.IntegerSchema>;
13
- currency: l.StringSchema<{
12
+ currency: l.OptionalSchema<l.StringSchema<{
14
13
  readonly maxLength: 3;
15
- }>;
16
- interval: l.EnumSchema<"monthly" | "yearly">;
14
+ }>>;
15
+ interval: l.TypedUnionSchema<readonly [l.TypedRefSchema<l.TypedObjectValidator<PaymentInitiate.NamedInterval, PaymentInitiate.NamedInterval>>, l.TypedRefSchema<l.TypedObjectValidator<PaymentInitiate.CustomInterval, PaymentInitiate.CustomInterval>>], false>;
16
+ billingStartDate: l.OptionalSchema<l.StringSchema<{
17
+ readonly format: "datetime";
18
+ }>>;
19
+ private: l.OptionalSchema<l.BooleanSchema>;
17
20
  cartUri: l.OptionalSchema<l.StringSchema<{
18
21
  readonly format: "at-uri";
19
22
  }>>;
20
- redirectUrl: l.OptionalSchema<l.StringSchema<{
21
- readonly format: "uri";
22
- }>>;
23
- isPrivate: l.OptionalSchema<l.BooleanSchema>;
24
23
  workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.InboundWorkflow, AtiprotoActions.InboundWorkflow>>>;
25
24
  }>>, l.Payload<"application/json", l.ObjectSchema<{
26
25
  workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.OutboundWorkflow, AtiprotoActions.OutboundWorkflow>>>;
27
- subscriptionUri: l.OptionalSchema<l.StringSchema<{
28
- readonly format: "at-uri";
29
- }>>;
30
- subscription: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoSubscription.View, AtiprotoSubscription.View>>>;
31
- cartUri: l.OptionalSchema<l.StringSchema<{
32
- readonly format: "at-uri";
33
- }>>;
34
- cart: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoCart.View, AtiprotoCart.View>>>;
35
- checkoutUrl: l.OptionalSchema<l.StringSchema<{
36
- readonly format: "uri";
37
- }>>;
26
+ subscription: l.RefSchema<l.Validator<AtiprotoSubscription.View, AtiprotoSubscription.View>>;
38
27
  }>>, undefined>;
39
28
  export { main };
40
29
  export type $Params = l.InferMethodParams<typeof main>;
@@ -43,33 +32,21 @@ export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<typeof main, B
43
32
  export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
44
33
  export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
45
34
  export declare const $lxm: "com.atiproto.payment.subscription.create", $params: l.ParamsSchema<{}>, $input: l.Payload<"application/json", l.ObjectSchema<{
46
- subject: l.StringSchema<{
47
- readonly format: "did";
48
- }>;
35
+ subject: l.TypedUnionSchema<readonly [l.TypedRefSchema<l.TypedObjectValidator<RepoStrongRef.Main, RepoStrongRef.Main>>, l.TypedRefSchema<l.TypedObjectValidator<AtiprotoSubscription.UserRef, AtiprotoSubscription.UserRef>>], false>;
49
36
  amount: l.OptionalSchema<l.IntegerSchema>;
50
- currency: l.StringSchema<{
37
+ currency: l.OptionalSchema<l.StringSchema<{
51
38
  readonly maxLength: 3;
52
- }>;
53
- interval: l.EnumSchema<"monthly" | "yearly">;
39
+ }>>;
40
+ interval: l.TypedUnionSchema<readonly [l.TypedRefSchema<l.TypedObjectValidator<PaymentInitiate.NamedInterval, PaymentInitiate.NamedInterval>>, l.TypedRefSchema<l.TypedObjectValidator<PaymentInitiate.CustomInterval, PaymentInitiate.CustomInterval>>], false>;
41
+ billingStartDate: l.OptionalSchema<l.StringSchema<{
42
+ readonly format: "datetime";
43
+ }>>;
44
+ private: l.OptionalSchema<l.BooleanSchema>;
54
45
  cartUri: l.OptionalSchema<l.StringSchema<{
55
46
  readonly format: "at-uri";
56
47
  }>>;
57
- redirectUrl: l.OptionalSchema<l.StringSchema<{
58
- readonly format: "uri";
59
- }>>;
60
- isPrivate: l.OptionalSchema<l.BooleanSchema>;
61
48
  workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.InboundWorkflow, AtiprotoActions.InboundWorkflow>>>;
62
49
  }>>, $output: l.Payload<"application/json", l.ObjectSchema<{
63
50
  workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.OutboundWorkflow, AtiprotoActions.OutboundWorkflow>>>;
64
- subscriptionUri: l.OptionalSchema<l.StringSchema<{
65
- readonly format: "at-uri";
66
- }>>;
67
- subscription: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoSubscription.View, AtiprotoSubscription.View>>>;
68
- cartUri: l.OptionalSchema<l.StringSchema<{
69
- readonly format: "at-uri";
70
- }>>;
71
- cart: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoCart.View, AtiprotoCart.View>>>;
72
- checkoutUrl: l.OptionalSchema<l.StringSchema<{
73
- readonly format: "uri";
74
- }>>;
51
+ subscription: l.RefSchema<l.Validator<AtiprotoSubscription.View, AtiprotoSubscription.View>>;
75
52
  }>>;
@@ -2,14 +2,11 @@ import { l } from '@atproto/lex';
2
2
  import * as AtiprotoSubscription from '../../subscription.defs.js';
3
3
  declare const $nsid = "com.atiproto.payment.subscription.get";
4
4
  export { $nsid };
5
- /** Get a specific subscription sent by the authenticated user. Looks up by subscription record uri or subject (recipient) DID. These are mutually exclusive; uri takes precedence. */
5
+ /** Hydrate a subscription record by uri. The authenticated user must be the sender. Search filters that were previously on this endpoint live on `payment.subscription.list`. */
6
6
  declare const main: l.Query<"com.atiproto.payment.subscription.get", l.ParamsSchema<{
7
- readonly uri: l.OptionalSchema<l.StringSchema<{
7
+ readonly uri: l.StringSchema<{
8
8
  readonly format: "at-uri";
9
- }>>;
10
- readonly subject: l.OptionalSchema<l.StringSchema<{
11
- readonly format: "did";
12
- }>>;
9
+ }>;
13
10
  }>, l.Payload<"application/json", l.ObjectSchema<{
14
11
  subscription: l.RefSchema<l.Validator<AtiprotoSubscription.View, AtiprotoSubscription.View>>;
15
12
  }>>, undefined>;
@@ -18,12 +15,9 @@ export type $Params = l.InferMethodParams<typeof main>;
18
15
  export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
19
16
  export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
20
17
  export declare const $lxm: "com.atiproto.payment.subscription.get", $params: l.ParamsSchema<{
21
- readonly uri: l.OptionalSchema<l.StringSchema<{
18
+ readonly uri: l.StringSchema<{
22
19
  readonly format: "at-uri";
23
- }>>;
24
- readonly subject: l.OptionalSchema<l.StringSchema<{
25
- readonly format: "did";
26
- }>>;
20
+ }>;
27
21
  }>, $output: l.Payload<"application/json", l.ObjectSchema<{
28
22
  subscription: l.RefSchema<l.Validator<AtiprotoSubscription.View, AtiprotoSubscription.View>>;
29
23
  }>>;
@@ -2,8 +2,11 @@ import { l } from '@atproto/lex';
2
2
  import * as AtiprotoSubscription from '../../subscription.defs.js';
3
3
  declare const $nsid = "com.atiproto.payment.subscription.list";
4
4
  export { $nsid };
5
- /** List subscriptions for the authenticated user */
5
+ /** List subscriptions sent by the authenticated user. */
6
6
  declare const main: l.Query<"com.atiproto.payment.subscription.list", l.ParamsSchema<{
7
+ readonly subject: l.OptionalSchema<l.StringSchema<{
8
+ readonly format: "at-uri";
9
+ }>>;
7
10
  readonly cursor: l.OptionalSchema<l.StringSchema<{
8
11
  readonly maxLength: 512;
9
12
  }>>;
@@ -19,6 +22,9 @@ export type $Params = l.InferMethodParams<typeof main>;
19
22
  export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
20
23
  export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
21
24
  export declare const $lxm: "com.atiproto.payment.subscription.list", $params: l.ParamsSchema<{
25
+ readonly subject: l.OptionalSchema<l.StringSchema<{
26
+ readonly format: "at-uri";
27
+ }>>;
22
28
  readonly cursor: l.OptionalSchema<l.StringSchema<{
23
29
  readonly maxLength: 512;
24
30
  }>>;
@@ -3,7 +3,7 @@ import * as AtiprotoSubscription from '../../subscription.defs.js';
3
3
  import * as AtiprotoActions from '../../actions.defs.js';
4
4
  declare const $nsid = "com.atiproto.payment.subscription.put";
5
5
  export { $nsid };
6
- /** Update a pending subscription. Only pending subscriptions can be updated. */
6
+ /** Update a subscription. */
7
7
  declare const main: l.Procedure<"com.atiproto.payment.subscription.put", l.ParamsSchema<{}>, l.Payload<"application/json", l.ObjectSchema<{
8
8
  uri: l.StringSchema<{
9
9
  readonly format: "at-uri";
@@ -3,4 +3,3 @@ export * as create from './subscription/create.js';
3
3
  export * as 'get' from './subscription/get.js';
4
4
  export * as list from './subscription/list.js';
5
5
  export * as put from './subscription/put.js';
6
- export * as validate from './subscription/validate.js';
@@ -1,4 +1,3 @@
1
1
  export * as cart from './payment/cart.js';
2
2
  export * as item from './payment/item.js';
3
- export * as list from './payment/list.js';
4
3
  export * as subscription from './payment/subscription.js';