@atiproto/lexicons 0.7.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/index.js +3223 -2409
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +3223 -2409
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/lexicons/com/atiproto/actions.d.ts +2 -0
  6. package/dist/lexicons/com/atiproto/actions.defs.d.ts +120 -0
  7. package/dist/lexicons/com/atiproto/authEnhanced.defs.d.ts +1 -1
  8. package/dist/lexicons/com/atiproto/authGeneral.defs.d.ts +1 -1
  9. package/dist/lexicons/com/atiproto/cart.defs.d.ts +5 -5
  10. package/dist/lexicons/com/atiproto/item.d.ts +2 -0
  11. package/dist/lexicons/com/atiproto/{tip.defs.d.ts → item.defs.d.ts} +55 -55
  12. package/dist/lexicons/com/atiproto/payment/cart/clone.defs.d.ts +54 -0
  13. package/dist/lexicons/com/atiproto/{account → payment}/cart/create.defs.d.ts +18 -13
  14. package/dist/lexicons/com/atiproto/{account → payment}/cart/get.defs.d.ts +23 -11
  15. package/dist/lexicons/com/atiproto/{account → payment}/cart/list.defs.d.ts +12 -6
  16. package/dist/lexicons/com/atiproto/{account → payment}/cart/put.defs.d.ts +16 -11
  17. package/dist/lexicons/com/atiproto/{feed/tip → payment/item}/create.defs.d.ts +16 -11
  18. package/dist/lexicons/com/atiproto/{feed/tip → payment/item}/get.defs.d.ts +7 -7
  19. package/dist/lexicons/com/atiproto/{feed/tip → payment/item}/list.defs.d.ts +7 -7
  20. package/dist/lexicons/com/atiproto/payment/item/put.defs.d.ts +42 -0
  21. package/dist/lexicons/com/atiproto/{feed/tip → payment/item}/validate.defs.d.ts +6 -6
  22. package/dist/lexicons/com/atiproto/payment/item.d.ts +5 -0
  23. package/dist/lexicons/com/atiproto/{feed → payment}/list.defs.d.ts +7 -7
  24. package/dist/lexicons/com/atiproto/payment/subscription/cancel.defs.d.ts +42 -0
  25. package/dist/lexicons/com/atiproto/{feed → payment}/subscription/create.defs.d.ts +14 -9
  26. package/dist/lexicons/com/atiproto/{feed → payment}/subscription/get.defs.d.ts +3 -3
  27. package/dist/lexicons/com/atiproto/{feed → payment}/subscription/list.defs.d.ts +3 -3
  28. package/dist/lexicons/com/atiproto/{feed → payment}/subscription/put.defs.d.ts +16 -11
  29. package/dist/lexicons/com/atiproto/{feed → payment}/subscription/validate.defs.d.ts +3 -3
  30. package/dist/lexicons/com/atiproto/payment.d.ts +4 -0
  31. package/dist/lexicons/com/atiproto/profile.defs.d.ts +14 -14
  32. package/dist/lexicons/com/atiproto/recipient/payment/cart/get.defs.d.ts +53 -0
  33. package/dist/lexicons/com/atiproto/recipient/payment/cart/list.defs.d.ts +54 -0
  34. package/dist/lexicons/com/atiproto/recipient/payment/cart.d.ts +2 -0
  35. package/dist/lexicons/com/atiproto/{account/tip → recipient/payment/item}/get.defs.d.ts +7 -7
  36. package/dist/lexicons/com/atiproto/{account/tip → recipient/payment/item}/list.defs.d.ts +7 -7
  37. package/dist/lexicons/com/atiproto/{account/tip → recipient/payment/item}/validate.defs.d.ts +6 -6
  38. package/dist/lexicons/com/atiproto/recipient/payment/item.d.ts +3 -0
  39. package/dist/lexicons/com/atiproto/{account → recipient/payment}/subscription/get.defs.d.ts +4 -4
  40. package/dist/lexicons/com/atiproto/recipient/payment/subscription/list.d.ts +2 -0
  41. package/dist/lexicons/com/atiproto/{account → recipient/payment}/subscription/list.defs.d.ts +4 -4
  42. package/dist/lexicons/com/atiproto/{account → recipient/payment}/subscription/validate.defs.d.ts +3 -3
  43. package/dist/lexicons/com/atiproto/recipient/payment.d.ts +3 -0
  44. package/dist/lexicons/com/atiproto/recipient/profile/get.d.ts +2 -0
  45. package/dist/lexicons/com/atiproto/{account → recipient}/profile/get.defs.d.ts +3 -3
  46. package/dist/lexicons/com/atiproto/recipient/profile/put.defs.d.ts +46 -0
  47. package/dist/lexicons/com/atiproto/recipient.d.ts +2 -0
  48. package/dist/lexicons/com/atiproto/repo/{tip → item}/count.defs.d.ts +4 -4
  49. package/dist/lexicons/com/atiproto/repo/item.d.ts +1 -0
  50. package/dist/lexicons/com/atiproto/repo.d.ts +1 -1
  51. package/dist/lexicons/com/atiproto/subscription.defs.d.ts +4 -0
  52. package/dist/lexicons/com/atiproto.d.ts +4 -3
  53. package/package.json +1 -1
  54. package/dist/lexicons/com/atiproto/account/cart/clone.defs.d.ts +0 -49
  55. package/dist/lexicons/com/atiproto/account/profile/put.defs.d.ts +0 -41
  56. package/dist/lexicons/com/atiproto/account/tip.d.ts +0 -3
  57. package/dist/lexicons/com/atiproto/account.d.ts +0 -4
  58. package/dist/lexicons/com/atiproto/feed/subscription/cancel.defs.d.ts +0 -37
  59. package/dist/lexicons/com/atiproto/feed/tip/put.defs.d.ts +0 -37
  60. package/dist/lexicons/com/atiproto/feed/tip.d.ts +0 -5
  61. package/dist/lexicons/com/atiproto/feed.d.ts +0 -3
  62. package/dist/lexicons/com/atiproto/repo/subscription/search.d.ts +0 -2
  63. package/dist/lexicons/com/atiproto/repo/subscription/search.defs.d.ts +0 -48
  64. package/dist/lexicons/com/atiproto/repo/subscription/validate.d.ts +0 -2
  65. package/dist/lexicons/com/atiproto/repo/subscription/validate.defs.d.ts +0 -50
  66. package/dist/lexicons/com/atiproto/repo/tip/search.d.ts +0 -2
  67. package/dist/lexicons/com/atiproto/repo/tip/search.defs.d.ts +0 -48
  68. package/dist/lexicons/com/atiproto/repo/tip/validate.d.ts +0 -2
  69. package/dist/lexicons/com/atiproto/repo/tip/validate.defs.d.ts +0 -56
  70. package/dist/lexicons/com/atiproto/repo/tip.d.ts +0 -1
  71. package/dist/lexicons/com/atiproto/tip.d.ts +0 -2
  72. /package/dist/lexicons/com/atiproto/{account → payment}/cart/clone.d.ts +0 -0
  73. /package/dist/lexicons/com/atiproto/{account → payment}/cart/create.d.ts +0 -0
  74. /package/dist/lexicons/com/atiproto/{account → payment}/cart/get.d.ts +0 -0
  75. /package/dist/lexicons/com/atiproto/{account → payment}/cart/list.d.ts +0 -0
  76. /package/dist/lexicons/com/atiproto/{account → payment}/cart/put.d.ts +0 -0
  77. /package/dist/lexicons/com/atiproto/{account → payment}/cart.d.ts +0 -0
  78. /package/dist/lexicons/com/atiproto/{feed/subscription → payment/item}/create.d.ts +0 -0
  79. /package/dist/lexicons/com/atiproto/{account/profile → payment/item}/get.d.ts +0 -0
  80. /package/dist/lexicons/com/atiproto/{account/subscription → payment/item}/list.d.ts +0 -0
  81. /package/dist/lexicons/com/atiproto/{account/profile → payment/item}/put.d.ts +0 -0
  82. /package/dist/lexicons/com/atiproto/{account/subscription → payment/item}/validate.d.ts +0 -0
  83. /package/dist/lexicons/com/atiproto/{account/tip → payment}/list.d.ts +0 -0
  84. /package/dist/lexicons/com/atiproto/{feed → payment}/subscription/cancel.d.ts +0 -0
  85. /package/dist/lexicons/com/atiproto/{feed/tip → payment/subscription}/create.d.ts +0 -0
  86. /package/dist/lexicons/com/atiproto/{account → payment}/subscription/get.d.ts +0 -0
  87. /package/dist/lexicons/com/atiproto/{feed → payment/subscription}/list.d.ts +0 -0
  88. /package/dist/lexicons/com/atiproto/{feed → payment}/subscription/put.d.ts +0 -0
  89. /package/dist/lexicons/com/atiproto/{account/tip → payment/subscription}/validate.d.ts +0 -0
  90. /package/dist/lexicons/com/atiproto/{feed → payment}/subscription.d.ts +0 -0
  91. /package/dist/lexicons/com/atiproto/{account/tip → recipient/payment/cart}/get.d.ts +0 -0
  92. /package/dist/lexicons/com/atiproto/{feed/subscription → recipient/payment/cart}/list.d.ts +0 -0
  93. /package/dist/lexicons/com/atiproto/{feed/subscription → recipient/payment/item}/get.d.ts +0 -0
  94. /package/dist/lexicons/com/atiproto/{feed/tip → recipient/payment/item}/list.d.ts +0 -0
  95. /package/dist/lexicons/com/atiproto/{feed/subscription → recipient/payment/item}/validate.d.ts +0 -0
  96. /package/dist/lexicons/com/atiproto/{feed/tip → recipient/payment/subscription}/get.d.ts +0 -0
  97. /package/dist/lexicons/com/atiproto/{feed/tip → recipient/payment/subscription}/validate.d.ts +0 -0
  98. /package/dist/lexicons/com/atiproto/{account → recipient/payment}/subscription.d.ts +0 -0
  99. /package/dist/lexicons/com/atiproto/{feed/tip → recipient/profile}/put.d.ts +0 -0
  100. /package/dist/lexicons/com/atiproto/{account → recipient}/profile.d.ts +0 -0
  101. /package/dist/lexicons/com/atiproto/repo/{tip → item}/count.d.ts +0 -0
@@ -0,0 +1,2 @@
1
+ export * from './actions.defs.js';
2
+ export * as $defs from './actions.defs.js';
@@ -0,0 +1,120 @@
1
+ import { l } from '@atproto/lex';
2
+ declare const $nsid = "com.atiproto.actions";
3
+ export { $nsid };
4
+ /** Instructs the agent to call com.atproto.repo.createRecord on the user's PDS. */
5
+ type Create = {
6
+ $type?: 'com.atiproto.actions#create';
7
+ /**
8
+ * DID of the repo to write to. The PDS auth check is the source of truth for whether the write is allowed.
9
+ */
10
+ repo: l.DidString;
11
+ /**
12
+ * Server-assigned name for this action; echoed back on the corresponding response so the server can correlate.
13
+ */
14
+ name: string;
15
+ collection: l.NsidString;
16
+ /**
17
+ * Optional. When omitted (the default), the PDS generates the rkey and returns the resulting URI on the response. Server-assigned rkeys are reserved for fixed-rkey records like com.atiproto.profile/self.
18
+ */
19
+ rkey?: string;
20
+ record: l.LexMap;
21
+ };
22
+ export type { Create };
23
+ /** Instructs the agent to call com.atproto.repo.createRecord on the user's PDS. */
24
+ declare const create: l.TypedObjectSchema<"com.atiproto.actions#create", l.Validator<Create, Create>>;
25
+ export { create };
26
+ /** Instructs the agent to call com.atproto.repo.putRecord on the user's PDS. */
27
+ type Update = {
28
+ $type?: 'com.atiproto.actions#update';
29
+ repo: l.DidString;
30
+ name: string;
31
+ collection: l.NsidString;
32
+ rkey: string;
33
+ record: l.LexMap;
34
+ swapCommit?: l.CidString;
35
+ };
36
+ export type { Update };
37
+ /** Instructs the agent to call com.atproto.repo.putRecord on the user's PDS. */
38
+ declare const update: l.TypedObjectSchema<"com.atiproto.actions#update", l.Validator<Update, Update>>;
39
+ export { update };
40
+ /** Instructs the agent to call com.atproto.repo.deleteRecord on the user's PDS. */
41
+ type Delete$0 = {
42
+ $type?: 'com.atiproto.actions#delete';
43
+ repo: l.DidString;
44
+ name: string;
45
+ collection: l.NsidString;
46
+ rkey: string;
47
+ swapCommit?: l.CidString;
48
+ };
49
+ export type { Delete$0 as Delete };
50
+ /** Instructs the agent to call com.atproto.repo.deleteRecord on the user's PDS. */
51
+ declare const delete$0: l.TypedObjectSchema<"com.atiproto.actions#delete", l.Validator<Delete$0, Delete$0>>;
52
+ export { delete$0 as 'delete' };
53
+ /** Terminal action: the agent throws a WorkflowRaisedError carrying message and code. Subsequent actions in the same batch are not executed. */
54
+ type Raise = {
55
+ $type?: 'com.atiproto.actions#raise';
56
+ message: string;
57
+ code?: string;
58
+ };
59
+ export type { Raise };
60
+ /** Terminal action: the agent throws a WorkflowRaisedError carrying message and code. Subsequent actions in the same batch are not executed. */
61
+ declare const raise: l.TypedObjectSchema<"com.atiproto.actions#raise", l.Validator<Raise, Raise>>;
62
+ export { raise };
63
+ /** Result of executing one action. Carries the verb (so the server can branch without inspecting result shape) plus the action name and the resulting record reference. */
64
+ type Response = {
65
+ $type?: 'com.atiproto.actions#response';
66
+ action: 'create' | 'update' | 'delete' | l.UnknownString;
67
+ name: string;
68
+ result: RecordResult;
69
+ };
70
+ export type { Response };
71
+ /** Result of executing one action. Carries the verb (so the server can branch without inspecting result shape) plus the action name and the resulting record reference. */
72
+ declare const response: l.TypedObjectSchema<"com.atiproto.actions#response", l.Validator<Response, Response>>;
73
+ export { response };
74
+ type RecordResult = {
75
+ $type?: 'com.atiproto.actions#recordResult';
76
+ uri: l.AtUriString;
77
+ /**
78
+ * Present on create/update responses; absent on delete (the record is gone).
79
+ */
80
+ cid?: l.CidString;
81
+ };
82
+ export type { RecordResult };
83
+ declare const recordResult: l.TypedObjectSchema<"com.atiproto.actions#recordResult", l.Validator<RecordResult, RecordResult>>;
84
+ export { recordResult };
85
+ /** Populated by the agent when an action fails. The server's error branch uses this to construct compensating actions and a final raise. */
86
+ type Error = {
87
+ $type?: 'com.atiproto.actions#error';
88
+ /**
89
+ * The verb of the action that failed (create/update/delete).
90
+ */
91
+ action: string;
92
+ name?: string;
93
+ message: string;
94
+ code?: string;
95
+ };
96
+ export type { Error };
97
+ /** Populated by the agent when an action fails. The server's error branch uses this to construct compensating actions and a final raise. */
98
+ declare const error: l.TypedObjectSchema<"com.atiproto.actions#error", l.Validator<Error, Error>>;
99
+ export { error };
100
+ /** Agent → server callback envelope. Echoes the server's intent verbatim, except when the agent overrides to "error" after an action failure. */
101
+ type InboundWorkflow = {
102
+ $type?: 'com.atiproto.actions#inboundWorkflow';
103
+ intent: string;
104
+ responses: Response[];
105
+ error?: Error;
106
+ };
107
+ export type { InboundWorkflow };
108
+ /** Agent → server callback envelope. Echoes the server's intent verbatim, except when the agent overrides to "error" after an action failure. */
109
+ declare const inboundWorkflow: l.TypedObjectSchema<"com.atiproto.actions#inboundWorkflow", l.Validator<InboundWorkflow, InboundWorkflow>>;
110
+ export { inboundWorkflow };
111
+ /** Server → agent envelope. Server-defined intent string acts as a phase marker; the agent treats it as opaque. Each item in `actions` is discriminated by `$type` against `#create` / `#update` / `#delete` / `#raise`. */
112
+ type OutboundWorkflow = {
113
+ $type?: 'com.atiproto.actions#outboundWorkflow';
114
+ intent: string;
115
+ actions: (l.$Typed<Create> | l.$Typed<Update> | l.$Typed<Delete$0> | l.$Typed<Raise> | l.Unknown$TypedObject)[];
116
+ };
117
+ export type { OutboundWorkflow };
118
+ /** Server → agent envelope. Server-defined intent string acts as a phase marker; the agent treats it as opaque. Each item in `actions` is discriminated by `$type` against `#create` / `#update` / `#delete` / `#raise`. */
119
+ declare const outboundWorkflow: l.TypedObjectSchema<"com.atiproto.actions#outboundWorkflow", l.Validator<OutboundWorkflow, OutboundWorkflow>>;
120
+ export { outboundWorkflow };
@@ -1,5 +1,5 @@
1
1
  import { l } from '@atproto/lex';
2
2
  declare const $nsid = "com.atiproto.authEnhanced";
3
3
  export { $nsid };
4
- declare const main: l.PermissionSet<"com.atiproto.authEnhanced", readonly [l.Permission<"repo", Record<string, string | number | boolean | number[] | string[] | boolean[] | undefined>>, l.Permission<"rpc", Record<string, string | number | boolean | number[] | string[] | boolean[] | undefined>>]>;
4
+ declare const main: l.PermissionSet<"com.atiproto.authEnhanced", 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
5
  export { main };
@@ -1,5 +1,5 @@
1
1
  import { l } from '@atproto/lex';
2
2
  declare const $nsid = "com.atiproto.authGeneral";
3
3
  export { $nsid };
4
- declare const main: l.PermissionSet<"com.atiproto.authGeneral", readonly [l.Permission<"repo", Record<string, string | number | boolean | number[] | string[] | boolean[] | undefined>>, l.Permission<"rpc", Record<string, string | number | boolean | number[] | string[] | boolean[] | undefined>>]>;
4
+ declare const main: l.PermissionSet<"com.atiproto.authGeneral", 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
5
  export { main };
@@ -1,7 +1,7 @@
1
1
  import { l } from '@atproto/lex';
2
2
  declare const $nsid = "com.atiproto.cart";
3
3
  export { $nsid };
4
- /** A record representing a shopping cart for tips/subscriptions */
4
+ /** A record representing a shopping cart for items/subscriptions */
5
5
  type Main = {
6
6
  $type: 'com.atiproto.cart';
7
7
  items: CartItem[];
@@ -31,7 +31,7 @@ type Main = {
31
31
  completedAt?: l.DatetimeString;
32
32
  };
33
33
  export type { Main };
34
- /** A record representing a shopping cart for tips/subscriptions */
34
+ /** A record representing a shopping cart for items/subscriptions */
35
35
  declare const main: l.RecordSchema<"any", "com.atiproto.cart", l.Validator<Omit<Main, "$type">, Omit<Main, "$type">>>;
36
36
  export { main };
37
37
  export declare const $isTypeOf: <TValue extends {
@@ -171,11 +171,11 @@ export { view };
171
171
  type CartItem = {
172
172
  $type?: 'com.atiproto.cart#cartItem';
173
173
  /**
174
- * Item type: tip or subscription
174
+ * Type of cart item: item or subscription
175
175
  */
176
- type: 'com.atiproto.tip' | 'com.atiproto.subscription';
176
+ type: 'com.atiproto.item' | 'com.atiproto.subscription';
177
177
  /**
178
- * AT-URI for tip on record
178
+ * AT-URI for item on record
179
179
  */
180
180
  recordUri: l.AtUriString;
181
181
  };
@@ -0,0 +1,2 @@
1
+ export * from './item.defs.js';
2
+ export * as $defs from './item.defs.js';
@@ -1,11 +1,11 @@
1
1
  import { l } from '@atproto/lex';
2
- declare const $nsid = "com.atiproto.tip";
2
+ declare const $nsid = "com.atiproto.item";
3
3
  export { $nsid };
4
- /** A record representing a tip given by one user to another */
4
+ /** A record representing a item given by one user to another */
5
5
  type Main = {
6
- $type: 'com.atiproto.tip';
6
+ $type: 'com.atiproto.item';
7
7
  /**
8
- * DID of the user receiving the tip
8
+ * DID of the user receiving the item
9
9
  */
10
10
  subject?: l.DidString;
11
11
  /**
@@ -13,7 +13,7 @@ type Main = {
13
13
  */
14
14
  recordUri?: l.AtUriString;
15
15
  /**
16
- * Tip amount in cents (0 when recipient allows zero tips)
16
+ * Tip amount in cents (0 when recipient allows zero items)
17
17
  */
18
18
  amount: number;
19
19
  /**
@@ -38,16 +38,21 @@ type Main = {
38
38
  completedAt?: l.DatetimeString;
39
39
  };
40
40
  export type { Main };
41
- /** A record representing a tip given by one user to another */
42
- declare const main: l.RecordSchema<"any", "com.atiproto.tip", l.Validator<Omit<Main, "$type">, Omit<Main, "$type">>>;
41
+ /** A record representing a item given by one user to another */
42
+ declare const main: l.RecordSchema<"any", "com.atiproto.item", l.Validator<Omit<Main, "$type">, Omit<Main, "$type">>>;
43
43
  export { main };
44
44
  export declare const $isTypeOf: <TValue extends {
45
45
  $type?: unknown;
46
- }>(value: TValue) => value is l.TypedRecord<"com.atiproto.tip", TValue>, $build: {
46
+ }>(value: TValue) => value is l.TypedRecord<"com.atiproto.item", TValue>, $build: {
47
47
  (input: Omit<Omit<Main, "$type">, "$type">): {
48
+ message?: string
49
+ /**
50
+ * Creation timestamp
51
+ */
52
+ | undefined;
48
53
  recordUri?: l.AtUriString
49
54
  /**
50
- * Tip amount in cents (0 when recipient allows zero tips)
55
+ * Tip amount in cents (0 when recipient allows zero items)
51
56
  */
52
57
  | undefined;
53
58
  currency: string;
@@ -60,17 +65,17 @@ export declare const $isTypeOf: <TValue extends {
60
65
  */
61
66
  | undefined;
62
67
  amount: number;
68
+ $type: "com.atiproto.item";
69
+ };
70
+ (input: Omit<Omit<Main, "$type">, "$type">): {
63
71
  message?: string
64
72
  /**
65
73
  * Creation timestamp
66
74
  */
67
75
  | undefined;
68
- $type: "com.atiproto.tip";
69
- };
70
- (input: Omit<Omit<Main, "$type">, "$type">): {
71
76
  recordUri?: l.AtUriString
72
77
  /**
73
- * Tip amount in cents (0 when recipient allows zero tips)
78
+ * Tip amount in cents (0 when recipient allows zero items)
74
79
  */
75
80
  | undefined;
76
81
  currency: string;
@@ -83,18 +88,18 @@ export declare const $isTypeOf: <TValue extends {
83
88
  */
84
89
  | undefined;
85
90
  amount: number;
86
- message?: string
87
- /**
88
- * Creation timestamp
89
- */
90
- | undefined;
91
- $type: "com.atiproto.tip";
91
+ $type: "com.atiproto.item";
92
92
  };
93
- }, $type: "com.atiproto.tip";
93
+ }, $type: "com.atiproto.item";
94
94
  export declare const $assert: (input: unknown, options?: l.ValidateOptions) => asserts input is {
95
+ message?: string
96
+ /**
97
+ * Creation timestamp
98
+ */
99
+ | undefined;
95
100
  recordUri?: l.AtUriString
96
101
  /**
97
- * Tip amount in cents (0 when recipient allows zero tips)
102
+ * Tip amount in cents (0 when recipient allows zero items)
98
103
  */
99
104
  | undefined;
100
105
  currency: string;
@@ -107,16 +112,16 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
107
112
  */
108
113
  | undefined;
109
114
  amount: number;
115
+ $type: "com.atiproto.item";
116
+ }, $check: (input: unknown, options?: l.ValidateOptions) => void, $cast: <I>(input: I, options?: l.ValidateOptions) => I & {
110
117
  message?: string
111
118
  /**
112
119
  * Creation timestamp
113
120
  */
114
121
  | undefined;
115
- $type: "com.atiproto.tip";
116
- }, $check: (input: unknown, options?: l.ValidateOptions) => void, $cast: <I>(input: I, options?: l.ValidateOptions) => I & {
117
122
  recordUri?: l.AtUriString
118
123
  /**
119
- * Tip amount in cents (0 when recipient allows zero tips)
124
+ * Tip amount in cents (0 when recipient allows zero items)
120
125
  */
121
126
  | undefined;
122
127
  currency: string;
@@ -129,16 +134,16 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
129
134
  */
130
135
  | undefined;
131
136
  amount: number;
137
+ $type: "com.atiproto.item";
138
+ }, $ifMatches: <I>(input: I, options?: l.ValidateOptions) => (I & {
132
139
  message?: string
133
140
  /**
134
141
  * Creation timestamp
135
142
  */
136
143
  | undefined;
137
- $type: "com.atiproto.tip";
138
- }, $ifMatches: <I>(input: I, options?: l.ValidateOptions) => (I & {
139
144
  recordUri?: l.AtUriString
140
145
  /**
141
- * Tip amount in cents (0 when recipient allows zero tips)
146
+ * Tip amount in cents (0 when recipient allows zero items)
142
147
  */
143
148
  | undefined;
144
149
  currency: string;
@@ -151,16 +156,16 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
151
156
  */
152
157
  | undefined;
153
158
  amount: number;
159
+ $type: "com.atiproto.item";
160
+ }) | undefined, $matches: <I>(input: I, options?: l.ValidateOptions) => input is I & {
154
161
  message?: string
155
162
  /**
156
163
  * Creation timestamp
157
164
  */
158
165
  | undefined;
159
- $type: "com.atiproto.tip";
160
- }) | undefined, $matches: <I>(input: I, options?: l.ValidateOptions) => input is I & {
161
166
  recordUri?: l.AtUriString
162
167
  /**
163
- * Tip amount in cents (0 when recipient allows zero tips)
168
+ * Tip amount in cents (0 when recipient allows zero items)
164
169
  */
165
170
  | undefined;
166
171
  currency: string;
@@ -173,16 +178,16 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
173
178
  */
174
179
  | undefined;
175
180
  amount: number;
181
+ $type: "com.atiproto.item";
182
+ }, $parse: (input: unknown, options?: l.ParseOptions) => {
176
183
  message?: string
177
184
  /**
178
185
  * Creation timestamp
179
186
  */
180
187
  | undefined;
181
- $type: "com.atiproto.tip";
182
- }, $parse: (input: unknown, options?: l.ParseOptions) => {
183
188
  recordUri?: l.AtUriString
184
189
  /**
185
- * Tip amount in cents (0 when recipient allows zero tips)
190
+ * Tip amount in cents (0 when recipient allows zero items)
186
191
  */
187
192
  | undefined;
188
193
  currency: string;
@@ -195,16 +200,16 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
195
200
  */
196
201
  | undefined;
197
202
  amount: number;
203
+ $type: "com.atiproto.item";
204
+ }, $safeParse: (input: unknown, options?: l.ParseOptions) => l.ValidationResult<{
198
205
  message?: string
199
206
  /**
200
207
  * Creation timestamp
201
208
  */
202
209
  | undefined;
203
- $type: "com.atiproto.tip";
204
- }, $safeParse: (input: unknown, options?: l.ParseOptions) => l.ValidationResult<{
205
210
  recordUri?: l.AtUriString
206
211
  /**
207
- * Tip amount in cents (0 when recipient allows zero tips)
212
+ * Tip amount in cents (0 when recipient allows zero items)
208
213
  */
209
214
  | undefined;
210
215
  currency: string;
@@ -217,16 +222,16 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
217
222
  */
218
223
  | undefined;
219
224
  amount: number;
225
+ $type: "com.atiproto.item";
226
+ }>, $validate: <I>(input: I, options?: l.ValidateOptions) => I & {
220
227
  message?: string
221
228
  /**
222
229
  * Creation timestamp
223
230
  */
224
231
  | undefined;
225
- $type: "com.atiproto.tip";
226
- }>, $validate: <I>(input: I, options?: l.ValidateOptions) => I & {
227
232
  recordUri?: l.AtUriString
228
233
  /**
229
- * Tip amount in cents (0 when recipient allows zero tips)
234
+ * Tip amount in cents (0 when recipient allows zero items)
230
235
  */
231
236
  | undefined;
232
237
  currency: string;
@@ -239,16 +244,16 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
239
244
  */
240
245
  | undefined;
241
246
  amount: number;
247
+ $type: "com.atiproto.item";
248
+ }, $safeValidate: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
242
249
  message?: string
243
250
  /**
244
251
  * Creation timestamp
245
252
  */
246
253
  | undefined;
247
- $type: "com.atiproto.tip";
248
- }, $safeValidate: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
249
254
  recordUri?: l.AtUriString
250
255
  /**
251
- * Tip amount in cents (0 when recipient allows zero tips)
256
+ * Tip amount in cents (0 when recipient allows zero items)
252
257
  */
253
258
  | undefined;
254
259
  currency: string;
@@ -261,22 +266,17 @@ export declare const $assert: (input: unknown, options?: l.ValidateOptions) => a
261
266
  */
262
267
  | undefined;
263
268
  amount: number;
264
- message?: string
265
- /**
266
- * Creation timestamp
267
- */
268
- | undefined;
269
- $type: "com.atiproto.tip";
269
+ $type: "com.atiproto.item";
270
270
  }>;
271
- /** View of a tip record for use in API responses */
271
+ /** View of a item record for use in API responses */
272
272
  type View = {
273
- $type?: 'com.atiproto.tip#view';
273
+ $type?: 'com.atiproto.item#view';
274
274
  /**
275
- * AT-URI of the tip record
275
+ * AT-URI of the item record
276
276
  */
277
277
  uri: l.AtUriString;
278
278
  /**
279
- * DID of the user receiving the tip
279
+ * DID of the user receiving the item
280
280
  */
281
281
  subject?: l.DidString;
282
282
  /**
@@ -284,7 +284,7 @@ type View = {
284
284
  */
285
285
  recordUri?: l.AtUriString;
286
286
  /**
287
- * Tip amount in cents (0 when recipient allows zero tips)
287
+ * Tip amount in cents (0 when recipient allows zero items)
288
288
  */
289
289
  amount: number;
290
290
  /**
@@ -309,6 +309,6 @@ type View = {
309
309
  completedAt?: l.DatetimeString;
310
310
  };
311
311
  export type { View };
312
- /** View of a tip record for use in API responses */
313
- declare const view: l.TypedObjectSchema<"com.atiproto.tip#view", l.Validator<View, View>>;
312
+ /** View of a item record for use in API responses */
313
+ declare const view: l.TypedObjectSchema<"com.atiproto.item#view", l.Validator<View, View>>;
314
314
  export { view };
@@ -0,0 +1,54 @@
1
+ import { l } from '@atproto/lex';
2
+ import * as AtiprotoActions from '../../actions.defs.js';
3
+ import * as AtiprotoCart from '../../cart.defs.js';
4
+ import * as AtiprotoItem from '../../item.defs.js';
5
+ import * as AtiprotoSubscription from '../../subscription.defs.js';
6
+ declare const $nsid = "com.atiproto.payment.cart.clone";
7
+ export { $nsid };
8
+ /** Clone an existing cart, creating new item and subscription records. Useful for reopening expired carts or repeating payments. */
9
+ declare const main: l.Procedure<"com.atiproto.payment.cart.clone", l.ParamsSchema<{}>, l.Payload<"application/json", l.ObjectSchema<{
10
+ uri: l.StringSchema<{
11
+ readonly format: "at-uri";
12
+ }>;
13
+ redirectUrl: l.OptionalSchema<l.StringSchema<{
14
+ readonly format: "uri";
15
+ }>>;
16
+ workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.InboundWorkflow, AtiprotoActions.InboundWorkflow>>>;
17
+ }>>, l.Payload<"application/json", l.ObjectSchema<{
18
+ workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.OutboundWorkflow, AtiprotoActions.OutboundWorkflow>>>;
19
+ cart: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoCart.View, AtiprotoCart.View>>>;
20
+ cartUri: l.OptionalSchema<l.StringSchema<{
21
+ readonly format: "at-uri";
22
+ }>>;
23
+ checkoutUrl: l.OptionalSchema<l.StringSchema<{
24
+ readonly format: "uri";
25
+ }>>;
26
+ items: l.OptionalSchema<l.ArraySchema<l.RefSchema<l.Validator<AtiprotoItem.View, AtiprotoItem.View>>>>;
27
+ subscriptions: l.OptionalSchema<l.ArraySchema<l.RefSchema<l.Validator<AtiprotoSubscription.View, AtiprotoSubscription.View>>>>;
28
+ }>>, undefined>;
29
+ export { main };
30
+ export type $Params = l.InferMethodParams<typeof main>;
31
+ export type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>;
32
+ export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<typeof main, B>;
33
+ export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
34
+ export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
35
+ export declare const $lxm: "com.atiproto.payment.cart.clone", $params: l.ParamsSchema<{}>, $input: l.Payload<"application/json", l.ObjectSchema<{
36
+ uri: l.StringSchema<{
37
+ readonly format: "at-uri";
38
+ }>;
39
+ redirectUrl: l.OptionalSchema<l.StringSchema<{
40
+ readonly format: "uri";
41
+ }>>;
42
+ workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.InboundWorkflow, AtiprotoActions.InboundWorkflow>>>;
43
+ }>>, $output: l.Payload<"application/json", l.ObjectSchema<{
44
+ workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.OutboundWorkflow, AtiprotoActions.OutboundWorkflow>>>;
45
+ cart: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoCart.View, AtiprotoCart.View>>>;
46
+ cartUri: l.OptionalSchema<l.StringSchema<{
47
+ readonly format: "at-uri";
48
+ }>>;
49
+ checkoutUrl: l.OptionalSchema<l.StringSchema<{
50
+ readonly format: "uri";
51
+ }>>;
52
+ items: l.OptionalSchema<l.ArraySchema<l.RefSchema<l.Validator<AtiprotoItem.View, AtiprotoItem.View>>>>;
53
+ subscriptions: l.OptionalSchema<l.ArraySchema<l.RefSchema<l.Validator<AtiprotoSubscription.View, AtiprotoSubscription.View>>>>;
54
+ }>>;
@@ -1,23 +1,26 @@
1
1
  import { l } from '@atproto/lex';
2
+ import * as AtiprotoActions from '../../actions.defs.js';
2
3
  import * as AtiprotoCart from '../../cart.defs.js';
3
- declare const $nsid = "com.atiproto.account.cart.create";
4
+ declare const $nsid = "com.atiproto.payment.cart.create";
4
5
  export { $nsid };
5
6
  /** Create a new empty cart */
6
- declare const main: l.Procedure<"com.atiproto.account.cart.create", l.ParamsSchema<{}>, l.Payload<"application/json", l.ObjectSchema<{
7
+ declare const main: l.Procedure<"com.atiproto.payment.cart.create", l.ParamsSchema<{}>, l.Payload<"application/json", l.ObjectSchema<{
7
8
  currency: l.StringSchema<{
8
9
  readonly maxLength: 3;
9
10
  }>;
10
11
  redirectUrl: l.OptionalSchema<l.StringSchema<{
11
12
  readonly format: "uri";
12
13
  }>>;
14
+ workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.InboundWorkflow, AtiprotoActions.InboundWorkflow>>>;
13
15
  }>>, l.Payload<"application/json", l.ObjectSchema<{
14
- cart: l.RefSchema<l.Validator<AtiprotoCart.View, AtiprotoCart.View>>;
15
- cartUri: l.StringSchema<{
16
+ workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.OutboundWorkflow, AtiprotoActions.OutboundWorkflow>>>;
17
+ cart: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoCart.View, AtiprotoCart.View>>>;
18
+ cartUri: l.OptionalSchema<l.StringSchema<{
16
19
  readonly format: "at-uri";
17
- }>;
18
- checkoutUrl: l.StringSchema<{
20
+ }>>;
21
+ checkoutUrl: l.OptionalSchema<l.StringSchema<{
19
22
  readonly format: "uri";
20
- }>;
23
+ }>>;
21
24
  }>>, undefined>;
22
25
  export { main };
23
26
  export type $Params = l.InferMethodParams<typeof main>;
@@ -25,19 +28,21 @@ export type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>;
25
28
  export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<typeof main, B>;
26
29
  export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
27
30
  export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
28
- export declare const $lxm: "com.atiproto.account.cart.create", $params: l.ParamsSchema<{}>, $input: l.Payload<"application/json", l.ObjectSchema<{
31
+ export declare const $lxm: "com.atiproto.payment.cart.create", $params: l.ParamsSchema<{}>, $input: l.Payload<"application/json", l.ObjectSchema<{
29
32
  currency: l.StringSchema<{
30
33
  readonly maxLength: 3;
31
34
  }>;
32
35
  redirectUrl: l.OptionalSchema<l.StringSchema<{
33
36
  readonly format: "uri";
34
37
  }>>;
38
+ workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.InboundWorkflow, AtiprotoActions.InboundWorkflow>>>;
35
39
  }>>, $output: l.Payload<"application/json", l.ObjectSchema<{
36
- cart: l.RefSchema<l.Validator<AtiprotoCart.View, AtiprotoCart.View>>;
37
- cartUri: l.StringSchema<{
40
+ workflow: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoActions.OutboundWorkflow, AtiprotoActions.OutboundWorkflow>>>;
41
+ cart: l.OptionalSchema<l.RefSchema<l.Validator<AtiprotoCart.View, AtiprotoCart.View>>>;
42
+ cartUri: l.OptionalSchema<l.StringSchema<{
38
43
  readonly format: "at-uri";
39
- }>;
40
- checkoutUrl: l.StringSchema<{
44
+ }>>;
45
+ checkoutUrl: l.OptionalSchema<l.StringSchema<{
41
46
  readonly format: "uri";
42
- }>;
47
+ }>>;
43
48
  }>>;
@@ -1,14 +1,20 @@
1
1
  import { l } from '@atproto/lex';
2
2
  import * as AtiprotoCart from '../../cart.defs.js';
3
- import * as AtiprotoTip from '../../tip.defs.js';
3
+ import * as AtiprotoItem from '../../item.defs.js';
4
4
  import * as AtiprotoSubscription from '../../subscription.defs.js';
5
- declare const $nsid = "com.atiproto.account.cart.get";
5
+ declare const $nsid = "com.atiproto.payment.cart.get";
6
6
  export { $nsid };
7
- /** Get a specific cart by URI, including resolved tip and subscription records */
8
- declare const main: l.Query<"com.atiproto.account.cart.get", l.ParamsSchema<{
9
- readonly uri: l.StringSchema<{
7
+ /** Get a specific cart sent by the authenticated user, including resolved item and subscription records. One of `uri`, `itemUri`, or `subscriptionUri` is required. */
8
+ declare const main: l.Query<"com.atiproto.payment.cart.get", l.ParamsSchema<{
9
+ readonly uri: l.OptionalSchema<l.StringSchema<{
10
10
  readonly format: "at-uri";
11
- }>;
11
+ }>>;
12
+ readonly itemUri: l.OptionalSchema<l.StringSchema<{
13
+ readonly format: "at-uri";
14
+ }>>;
15
+ readonly subscriptionUri: l.OptionalSchema<l.StringSchema<{
16
+ readonly format: "at-uri";
17
+ }>>;
12
18
  }>, l.Payload<"application/json", l.ObjectSchema<{
13
19
  uri: l.StringSchema<{
14
20
  readonly format: "at-uri";
@@ -20,17 +26,23 @@ declare const main: l.Query<"com.atiproto.account.cart.get", l.ParamsSchema<{
20
26
  checkoutUrl: l.OptionalSchema<l.StringSchema<{
21
27
  readonly format: "uri";
22
28
  }>>;
23
- tips: l.ArraySchema<l.RefSchema<l.Validator<AtiprotoTip.View, AtiprotoTip.View>>>;
29
+ items: l.ArraySchema<l.RefSchema<l.Validator<AtiprotoItem.View, AtiprotoItem.View>>>;
24
30
  subscriptions: l.ArraySchema<l.RefSchema<l.Validator<AtiprotoSubscription.View, AtiprotoSubscription.View>>>;
25
31
  }>>, undefined>;
26
32
  export { main };
27
33
  export type $Params = l.InferMethodParams<typeof main>;
28
34
  export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
29
35
  export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
30
- export declare const $lxm: "com.atiproto.account.cart.get", $params: l.ParamsSchema<{
31
- readonly uri: l.StringSchema<{
36
+ export declare const $lxm: "com.atiproto.payment.cart.get", $params: l.ParamsSchema<{
37
+ readonly uri: l.OptionalSchema<l.StringSchema<{
32
38
  readonly format: "at-uri";
33
- }>;
39
+ }>>;
40
+ readonly itemUri: l.OptionalSchema<l.StringSchema<{
41
+ readonly format: "at-uri";
42
+ }>>;
43
+ readonly subscriptionUri: l.OptionalSchema<l.StringSchema<{
44
+ readonly format: "at-uri";
45
+ }>>;
34
46
  }>, $output: l.Payload<"application/json", l.ObjectSchema<{
35
47
  uri: l.StringSchema<{
36
48
  readonly format: "at-uri";
@@ -42,6 +54,6 @@ export declare const $lxm: "com.atiproto.account.cart.get", $params: l.ParamsSch
42
54
  checkoutUrl: l.OptionalSchema<l.StringSchema<{
43
55
  readonly format: "uri";
44
56
  }>>;
45
- tips: l.ArraySchema<l.RefSchema<l.Validator<AtiprotoTip.View, AtiprotoTip.View>>>;
57
+ items: l.ArraySchema<l.RefSchema<l.Validator<AtiprotoItem.View, AtiprotoItem.View>>>;
46
58
  subscriptions: l.ArraySchema<l.RefSchema<l.Validator<AtiprotoSubscription.View, AtiprotoSubscription.View>>>;
47
59
  }>>;