@privy-io/api-types 0.9.0 → 0.11.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 (180) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/client.d.mts +40 -43
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +40 -43
  5. package/client.d.ts.map +1 -1
  6. package/client.js +28 -20
  7. package/client.js.map +1 -1
  8. package/client.mjs +29 -21
  9. package/client.mjs.map +1 -1
  10. package/internal/types.d.mts +6 -6
  11. package/internal/types.d.mts.map +1 -1
  12. package/internal/types.d.ts +6 -6
  13. package/internal/types.d.ts.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/accounts.d.mts +128 -86
  16. package/resources/accounts.d.mts.map +1 -1
  17. package/resources/accounts.d.ts +128 -86
  18. package/resources/accounts.d.ts.map +1 -1
  19. package/resources/aggregations.d.mts +43 -43
  20. package/resources/aggregations.d.mts.map +1 -1
  21. package/resources/aggregations.d.ts +43 -43
  22. package/resources/aggregations.d.ts.map +1 -1
  23. package/resources/apps.d.mts +169 -135
  24. package/resources/apps.d.mts.map +1 -1
  25. package/resources/apps.d.ts +169 -135
  26. package/resources/apps.d.ts.map +1 -1
  27. package/resources/client-auth.d.mts +931 -947
  28. package/resources/client-auth.d.mts.map +1 -1
  29. package/resources/client-auth.d.ts +931 -947
  30. package/resources/client-auth.d.ts.map +1 -1
  31. package/resources/client-auth.js.map +1 -1
  32. package/resources/client-auth.mjs.map +1 -1
  33. package/resources/embedded-wallets.d.mts +122 -122
  34. package/resources/embedded-wallets.d.mts.map +1 -1
  35. package/resources/embedded-wallets.d.ts +122 -122
  36. package/resources/embedded-wallets.d.ts.map +1 -1
  37. package/resources/fiat.d.mts +110 -0
  38. package/resources/fiat.d.mts.map +1 -0
  39. package/resources/fiat.d.ts +110 -0
  40. package/resources/fiat.d.ts.map +1 -0
  41. package/resources/fiat.js +9 -0
  42. package/resources/fiat.js.map +1 -0
  43. package/resources/fiat.mjs +5 -0
  44. package/resources/fiat.mjs.map +1 -0
  45. package/resources/funding.d.mts +86 -86
  46. package/resources/funding.d.mts.map +1 -1
  47. package/resources/funding.d.ts +86 -86
  48. package/resources/funding.d.ts.map +1 -1
  49. package/resources/index.d.mts +20 -18
  50. package/resources/index.d.mts.map +1 -1
  51. package/resources/index.d.ts +20 -18
  52. package/resources/index.d.ts.map +1 -1
  53. package/resources/index.js +5 -1
  54. package/resources/index.js.map +1 -1
  55. package/resources/index.mjs +3 -1
  56. package/resources/index.mjs.map +1 -1
  57. package/resources/intents.d.mts +269 -265
  58. package/resources/intents.d.mts.map +1 -1
  59. package/resources/intents.d.ts +269 -265
  60. package/resources/intents.d.ts.map +1 -1
  61. package/resources/key-quorums.d.mts +15 -146
  62. package/resources/key-quorums.d.mts.map +1 -1
  63. package/resources/key-quorums.d.ts +15 -146
  64. package/resources/key-quorums.d.ts.map +1 -1
  65. package/resources/key-quorums.js +0 -92
  66. package/resources/key-quorums.js.map +1 -1
  67. package/resources/key-quorums.mjs +0 -92
  68. package/resources/key-quorums.mjs.map +1 -1
  69. package/resources/kraken-embed.d.mts +12 -20
  70. package/resources/kraken-embed.d.mts.map +1 -1
  71. package/resources/kraken-embed.d.ts +12 -20
  72. package/resources/kraken-embed.d.ts.map +1 -1
  73. package/resources/organizations.d.mts +65 -0
  74. package/resources/organizations.d.mts.map +1 -0
  75. package/resources/organizations.d.ts +65 -0
  76. package/resources/organizations.d.ts.map +1 -0
  77. package/resources/organizations.js +9 -0
  78. package/resources/organizations.js.map +1 -0
  79. package/resources/organizations.mjs +5 -0
  80. package/resources/organizations.mjs.map +1 -0
  81. package/resources/policies.d.mts +261 -553
  82. package/resources/policies.d.mts.map +1 -1
  83. package/resources/policies.d.ts +261 -553
  84. package/resources/policies.d.ts.map +1 -1
  85. package/resources/policies.js +0 -229
  86. package/resources/policies.js.map +1 -1
  87. package/resources/policies.mjs +0 -229
  88. package/resources/policies.mjs.map +1 -1
  89. package/resources/shared.d.mts +28 -28
  90. package/resources/shared.d.mts.map +1 -1
  91. package/resources/shared.d.ts +28 -28
  92. package/resources/shared.d.ts.map +1 -1
  93. package/resources/swaps.d.mts +6 -9
  94. package/resources/swaps.d.mts.map +1 -1
  95. package/resources/swaps.d.ts +6 -9
  96. package/resources/swaps.d.ts.map +1 -1
  97. package/resources/swaps.js.map +1 -1
  98. package/resources/swaps.mjs.map +1 -1
  99. package/resources/transactions.d.mts +80 -96
  100. package/resources/transactions.d.mts.map +1 -1
  101. package/resources/transactions.d.ts +80 -96
  102. package/resources/transactions.d.ts.map +1 -1
  103. package/resources/transactions.js +0 -17
  104. package/resources/transactions.js.map +1 -1
  105. package/resources/transactions.mjs +0 -17
  106. package/resources/transactions.mjs.map +1 -1
  107. package/resources/users.d.mts +480 -815
  108. package/resources/users.d.mts.map +1 -1
  109. package/resources/users.d.ts +480 -815
  110. package/resources/users.d.ts.map +1 -1
  111. package/resources/users.js +0 -272
  112. package/resources/users.js.map +1 -1
  113. package/resources/users.mjs +0 -272
  114. package/resources/users.mjs.map +1 -1
  115. package/resources/wallet-actions.d.mts +302 -145
  116. package/resources/wallet-actions.d.mts.map +1 -1
  117. package/resources/wallet-actions.d.ts +302 -145
  118. package/resources/wallet-actions.d.ts.map +1 -1
  119. package/resources/wallets/index.d.mts +1 -1
  120. package/resources/wallets/index.d.mts.map +1 -1
  121. package/resources/wallets/index.d.ts +1 -1
  122. package/resources/wallets/index.d.ts.map +1 -1
  123. package/resources/wallets/index.js.map +1 -1
  124. package/resources/wallets/index.mjs.map +1 -1
  125. package/resources/wallets/transactions.d.mts +7 -2
  126. package/resources/wallets/transactions.d.mts.map +1 -1
  127. package/resources/wallets/transactions.d.ts +7 -2
  128. package/resources/wallets/transactions.d.ts.map +1 -1
  129. package/resources/wallets/transactions.js +1 -1
  130. package/resources/wallets/transactions.mjs +1 -1
  131. package/resources/wallets/wallets.d.mts +1592 -1580
  132. package/resources/wallets/wallets.d.mts.map +1 -1
  133. package/resources/wallets/wallets.d.ts +1592 -1580
  134. package/resources/wallets/wallets.d.ts.map +1 -1
  135. package/resources/wallets/wallets.js +45 -103
  136. package/resources/wallets/wallets.js.map +1 -1
  137. package/resources/wallets/wallets.mjs +45 -103
  138. package/resources/wallets/wallets.mjs.map +1 -1
  139. package/resources/webhooks.d.mts +935 -877
  140. package/resources/webhooks.d.mts.map +1 -1
  141. package/resources/webhooks.d.ts +935 -877
  142. package/resources/webhooks.d.ts.map +1 -1
  143. package/resources/yield.d.mts +157 -157
  144. package/resources/yield.d.mts.map +1 -1
  145. package/resources/yield.d.ts +157 -157
  146. package/resources/yield.d.ts.map +1 -1
  147. package/src/client.ts +650 -618
  148. package/src/internal/types.ts +6 -8
  149. package/src/resources/accounts.ts +157 -103
  150. package/src/resources/aggregations.ts +55 -55
  151. package/src/resources/apps.ts +221 -178
  152. package/src/resources/client-auth.ts +1271 -1315
  153. package/src/resources/embedded-wallets.ts +160 -160
  154. package/src/resources/fiat.ts +177 -0
  155. package/src/resources/funding.ts +130 -130
  156. package/src/resources/index.ts +551 -542
  157. package/src/resources/intents.ts +326 -322
  158. package/src/resources/key-quorums.ts +16 -218
  159. package/src/resources/kraken-embed.ts +14 -22
  160. package/src/resources/organizations.ts +82 -0
  161. package/src/resources/policies.ts +383 -848
  162. package/src/resources/shared.ts +34 -34
  163. package/src/resources/swaps.ts +5 -10
  164. package/src/resources/transactions.ts +116 -136
  165. package/src/resources/users.ts +693 -1160
  166. package/src/resources/wallet-actions.ts +392 -185
  167. package/src/resources/wallets/index.ts +160 -156
  168. package/src/resources/wallets/transactions.ts +18 -3
  169. package/src/resources/wallets/wallets.ts +2123 -2113
  170. package/src/resources/webhooks.ts +1172 -1100
  171. package/src/resources/yield.ts +188 -188
  172. package/src/version.ts +1 -1
  173. package/version.d.mts +1 -1
  174. package/version.d.mts.map +1 -1
  175. package/version.d.ts +1 -1
  176. package/version.d.ts.map +1 -1
  177. package/version.js +1 -1
  178. package/version.js.map +1 -1
  179. package/version.mjs +1 -1
  180. package/version.mjs.map +1 -1
@@ -4,327 +4,91 @@ import { APIResource } from '../core/resource';
4
4
  import * as PoliciesAPI from './policies';
5
5
  import * as SharedAPI from './shared';
6
6
  import * as WalletsAPI from './wallets/wallets';
7
- import { APIPromise } from '../core/api-promise';
8
- import { buildHeaders } from '../internal/headers';
9
- import { RequestOptions } from '../internal/request-options';
10
- import { path } from '../internal/utils/path';
7
+
8
+ export class Policies extends APIResource {}
11
9
 
12
10
  /**
13
- * Operations related to policies
11
+ * A parameter in a Solidity ABI function or event definition.
14
12
  */
15
- export class Policies extends APIResource {
16
- /**
17
- * Create a new policy.
18
- *
19
- * @example
20
- * ```ts
21
- * const policy = await client.policies.create({
22
- * chain_type: 'ethereum',
23
- * name: 'x',
24
- * rules: [
25
- * {
26
- * action: 'ALLOW',
27
- * conditions: [
28
- * {
29
- * field: 'to',
30
- * field_source: 'ethereum_transaction',
31
- * operator: 'eq',
32
- * value: 'string',
33
- * },
34
- * ],
35
- * method: 'eth_sendTransaction',
36
- * name: 'x',
37
- * },
38
- * ],
39
- * version: '1.0',
40
- * });
41
- * ```
42
- */
43
- create(params: PolicyCreateParams, options?: RequestOptions): APIPromise<Policy> {
44
- const { 'privy-idempotency-key': privyIdempotencyKey, ...body } = params;
45
- return this._client.post('/v1/policies', {
46
- body,
47
- ...options,
48
- headers: buildHeaders([
49
- { ...(privyIdempotencyKey != null ? { 'privy-idempotency-key': privyIdempotencyKey } : undefined) },
50
- options?.headers,
51
- ]),
52
- });
53
- }
13
+ export interface AbiParameter {
14
+ type: string;
54
15
 
55
- /**
56
- * Create a new rule for a policy.
57
- *
58
- * @example
59
- * ```ts
60
- * const policyRuleResponse =
61
- * await client.policies._createRule(
62
- * 'xxxxxxxxxxxxxxxxxxxxxxxx',
63
- * {
64
- * action: 'ALLOW',
65
- * conditions: [
66
- * {
67
- * field: 'to',
68
- * field_source: 'ethereum_transaction',
69
- * operator: 'eq',
70
- * value: 'string',
71
- * },
72
- * ],
73
- * method: 'eth_sendTransaction',
74
- * name: 'x',
75
- * },
76
- * );
77
- * ```
78
- */
79
- _createRule(
80
- policyID: string,
81
- params: PolicyCreateRuleParams,
82
- options?: RequestOptions,
83
- ): APIPromise<PolicyRuleResponse> {
84
- const {
85
- 'privy-authorization-signature': privyAuthorizationSignature,
86
- 'privy-request-expiry': privyRequestExpiry,
87
- ...body
88
- } = params;
89
- return this._client.post(path`/v1/policies/${policyID}/rules`, {
90
- body,
91
- ...options,
92
- headers: buildHeaders([
93
- {
94
- ...(privyAuthorizationSignature != null ?
95
- { 'privy-authorization-signature': privyAuthorizationSignature }
96
- : undefined),
97
- ...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
98
- },
99
- options?.headers,
100
- ]),
101
- });
102
- }
16
+ components?: Array<{ [key: string]: unknown }>;
103
17
 
104
- /**
105
- * Delete a policy by policy ID.
106
- *
107
- * @example
108
- * ```ts
109
- * const successResponse = await client.policies._delete(
110
- * 'xxxxxxxxxxxxxxxxxxxxxxxx',
111
- * );
112
- * ```
113
- */
114
- _delete(
115
- policyID: string,
116
- params: PolicyDeleteParams | null | undefined = {},
117
- options?: RequestOptions,
118
- ): APIPromise<SharedAPI.SuccessResponse> {
119
- const {
120
- 'privy-authorization-signature': privyAuthorizationSignature,
121
- 'privy-request-expiry': privyRequestExpiry,
122
- } = params ?? {};
123
- return this._client.delete(path`/v1/policies/${policyID}`, {
124
- ...options,
125
- headers: buildHeaders([
126
- {
127
- ...(privyAuthorizationSignature != null ?
128
- { 'privy-authorization-signature': privyAuthorizationSignature }
129
- : undefined),
130
- ...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
131
- },
132
- options?.headers,
133
- ]),
134
- });
135
- }
18
+ indexed?: boolean;
136
19
 
137
- /**
138
- * Delete a rule by policy ID and rule ID.
139
- *
140
- * @example
141
- * ```ts
142
- * const successResponse = await client.policies._deleteRule(
143
- * 'xxxxxxxxxxxxxxxxxxxxxxxx',
144
- * { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
145
- * );
146
- * ```
147
- */
148
- _deleteRule(
149
- ruleID: string,
150
- params: PolicyDeleteRuleParams,
151
- options?: RequestOptions,
152
- ): APIPromise<SharedAPI.SuccessResponse> {
153
- const {
154
- policy_id,
155
- 'privy-authorization-signature': privyAuthorizationSignature,
156
- 'privy-request-expiry': privyRequestExpiry,
157
- } = params;
158
- return this._client.delete(path`/v1/policies/${policy_id}/rules/${ruleID}`, {
159
- ...options,
160
- headers: buildHeaders([
161
- {
162
- ...(privyAuthorizationSignature != null ?
163
- { 'privy-authorization-signature': privyAuthorizationSignature }
164
- : undefined),
165
- ...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
166
- },
167
- options?.headers,
168
- ]),
169
- });
170
- }
20
+ internalType?: string;
171
21
 
172
- /**
173
- * Update a policy by policy ID.
174
- *
175
- * @example
176
- * ```ts
177
- * const policy = await client.policies._update(
178
- * 'xxxxxxxxxxxxxxxxxxxxxxxx',
179
- * );
180
- * ```
181
- */
182
- _update(policyID: string, params: PolicyUpdateParams, options?: RequestOptions): APIPromise<Policy> {
183
- const {
184
- 'privy-authorization-signature': privyAuthorizationSignature,
185
- 'privy-request-expiry': privyRequestExpiry,
186
- ...body
187
- } = params;
188
- return this._client.patch(path`/v1/policies/${policyID}`, {
189
- body,
190
- ...options,
191
- headers: buildHeaders([
192
- {
193
- ...(privyAuthorizationSignature != null ?
194
- { 'privy-authorization-signature': privyAuthorizationSignature }
195
- : undefined),
196
- ...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
197
- },
198
- options?.headers,
199
- ]),
200
- });
201
- }
22
+ name?: string;
23
+ }
202
24
 
203
- /**
204
- * Update a rule by policy ID and rule ID.
205
- *
206
- * @example
207
- * ```ts
208
- * const policyRuleResponse =
209
- * await client.policies._updateRule(
210
- * 'xxxxxxxxxxxxxxxxxxxxxxxx',
211
- * {
212
- * policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx',
213
- * action: 'ALLOW',
214
- * conditions: [
215
- * {
216
- * field: 'to',
217
- * field_source: 'ethereum_transaction',
218
- * operator: 'eq',
219
- * value: 'string',
220
- * },
221
- * ],
222
- * method: 'eth_sendTransaction',
223
- * name: 'x',
224
- * },
225
- * );
226
- * ```
227
- */
228
- _updateRule(
229
- ruleID: string,
230
- params: PolicyUpdateRuleParams,
231
- options?: RequestOptions,
232
- ): APIPromise<PolicyRuleResponse> {
233
- const {
234
- policy_id,
235
- 'privy-authorization-signature': privyAuthorizationSignature,
236
- 'privy-request-expiry': privyRequestExpiry,
237
- ...body
238
- } = params;
239
- return this._client.patch(path`/v1/policies/${policy_id}/rules/${ruleID}`, {
240
- body,
241
- ...options,
242
- headers: buildHeaders([
243
- {
244
- ...(privyAuthorizationSignature != null ?
245
- { 'privy-authorization-signature': privyAuthorizationSignature }
246
- : undefined),
247
- ...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
248
- },
249
- options?.headers,
250
- ]),
251
- });
252
- }
25
+ /**
26
+ * A Solidity ABI definition for decoding smart contract calldata.
27
+ */
28
+ export type AbiSchema = Array<AbiSchema.AbiSchemaItem>;
253
29
 
254
- /**
255
- * Get a policy by policy ID.
256
- *
257
- * @example
258
- * ```ts
259
- * const policy = await client.policies.get(
260
- * 'xxxxxxxxxxxxxxxxxxxxxxxx',
261
- * );
262
- * ```
263
- */
264
- get(policyID: string, options?: RequestOptions): APIPromise<Policy> {
265
- return this._client.get(path`/v1/policies/${policyID}`, options);
266
- }
30
+ export namespace AbiSchema {
31
+ export interface AbiSchemaItem {
32
+ type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
267
33
 
268
- /**
269
- * Get a rule by policy ID and rule ID.
270
- *
271
- * @example
272
- * ```ts
273
- * const policyRuleResponse = await client.policies.getRule(
274
- * 'xxxxxxxxxxxxxxxxxxxxxxxx',
275
- * { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
276
- * );
277
- * ```
278
- */
279
- getRule(
280
- ruleID: string,
281
- params: PolicyGetRuleParams,
282
- options?: RequestOptions,
283
- ): APIPromise<PolicyRuleResponse> {
284
- const { policy_id } = params;
285
- return this._client.get(path`/v1/policies/${policy_id}/rules/${ruleID}`, options);
34
+ anonymous?: boolean;
35
+
36
+ inputs?: Array<PoliciesAPI.AbiParameter>;
37
+
38
+ name?: string;
39
+
40
+ outputs?: Array<PoliciesAPI.AbiParameter>;
41
+
42
+ stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
286
43
  }
287
44
  }
288
45
 
289
46
  /**
290
- * Unique ID of the condition set to take actions on.
47
+ * Condition on the original wallet action API request body fields.
291
48
  */
292
- export interface ConditionSetRequestParams {
293
- condition_set_id: string;
294
- }
49
+ export interface ActionRequestBodyCondition {
50
+ field: string;
295
51
 
296
- /**
297
- * Unique IDs of the condition set and the condition set item within the condition
298
- * set to take actions on.
299
- */
300
- export interface ConditionSetItemRequestParams {
301
- condition_set_id: string;
52
+ field_source: 'action_request_body';
302
53
 
303
- condition_set_item_id: string;
54
+ /**
55
+ * Operator to use for policy conditions.
56
+ */
57
+ operator: ConditionOperator;
58
+
59
+ /**
60
+ * Value to compare against in a policy condition. Can be a single string or an
61
+ * array of strings.
62
+ */
63
+ value: ConditionValue;
304
64
  }
305
65
 
306
66
  /**
307
- * Request body for creating a condition set.
67
+ * Condition referencing an aggregation value. The field must start with
68
+ * "aggregation." followed by the aggregation ID.
308
69
  */
309
- export interface ConditionSetRequestBody {
310
- /**
311
- * Name to assign to condition set.
312
- */
313
- name: string;
70
+ export interface AggregationCondition {
71
+ field: string;
72
+
73
+ field_source: 'reference';
314
74
 
315
75
  /**
316
- * The owner of the resource, specified as a Privy user ID, a P-256 public key, or
317
- * null to remove the current owner.
76
+ * Operator to use for policy conditions.
318
77
  */
319
- owner?: SharedAPI.OwnerInput | null;
78
+ operator: ConditionOperator;
320
79
 
321
80
  /**
322
- * The key quorum ID to set as the owner of the resource. If you provide this, do
323
- * not specify an owner.
81
+ * Value to compare against in a policy condition. Can be a single string or an
82
+ * array of strings.
324
83
  */
325
- owner_id?: SharedAPI.OwnerIDInput | null;
84
+ value: ConditionValue;
326
85
  }
327
86
 
87
+ /**
88
+ * Operator to use for policy conditions.
89
+ */
90
+ export type ConditionOperator = 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
91
+
328
92
  /**
329
93
  * A condition set for grouping related condition values.
330
94
  */
@@ -352,39 +116,27 @@ export interface ConditionSet {
352
116
  }
353
117
 
354
118
  /**
355
- * Request body for updating a condition set.
119
+ * Headers required to authorize modifications to condition sets.
356
120
  */
357
- export interface UpdateConditionSetRequestBody {
121
+ export interface ConditionSetAuthorizationHeaders {
358
122
  /**
359
- * Name to assign to condition set.
123
+ * ID of your Privy app.
360
124
  */
361
- name?: string;
125
+ 'privy-app-id': string;
362
126
 
363
127
  /**
364
- * The owner of the resource, specified as a Privy user ID, a P-256 public key, or
365
- * null to remove the current owner.
128
+ * Request authorization signature. If multiple signatures are required, they
129
+ * should be comma separated.
366
130
  */
367
- owner?: SharedAPI.OwnerInput | null;
131
+ 'privy-authorization-signature'?: string;
368
132
 
369
133
  /**
370
- * The key quorum ID to set as the owner of the resource. If you provide this, do
371
- * not specify an owner.
134
+ * Request expiry. Value is a Unix timestamp in milliseconds representing the
135
+ * deadline by which the request must be processed.
372
136
  */
373
- owner_id?: SharedAPI.OwnerIDInput | null;
374
- }
375
-
376
- /**
377
- * A single value to add to a condition set.
378
- */
379
- export interface ConditionSetItemValueInput {
380
- value: string;
137
+ 'privy-request-expiry'?: string;
381
138
  }
382
139
 
383
- /**
384
- * Array of values to add to the condition set. Maximum 100 items per request.
385
- */
386
- export type ConditionSetItemsRequestBody = Array<ConditionSetItemValueInput>;
387
-
388
140
  /**
389
141
  * A single item in a condition set.
390
142
  */
@@ -410,11 +162,33 @@ export interface ConditionSetItem {
410
162
  value: string;
411
163
  }
412
164
 
165
+ /**
166
+ * Unique IDs of the condition set and the condition set item within the condition
167
+ * set to take actions on.
168
+ */
169
+ export interface ConditionSetItemRequestParams {
170
+ condition_set_id: string;
171
+
172
+ condition_set_item_id: string;
173
+ }
174
+
175
+ /**
176
+ * A single value to add to a condition set.
177
+ */
178
+ export interface ConditionSetItemValueInput {
179
+ value: string;
180
+ }
181
+
413
182
  /**
414
183
  * Array of condition set items.
415
184
  */
416
185
  export type ConditionSetItems = Array<ConditionSetItem>;
417
186
 
187
+ /**
188
+ * Array of values to add to the condition set. Maximum 100 items per request.
189
+ */
190
+ export type ConditionSetItemsRequestBody = Array<ConditionSetItemValueInput>;
191
+
418
192
  /**
419
193
  * Paginated list of condition set items.
420
194
  */
@@ -431,51 +205,34 @@ export interface ConditionSetItemsResponse {
431
205
  }
432
206
 
433
207
  /**
434
- * The action to take when a policy rule matches.
435
- */
436
- export type PolicyAction = 'ALLOW' | 'DENY';
437
-
438
- /**
439
- * A parameter in a Solidity ABI function or event definition.
208
+ * Request body for creating a condition set.
440
209
  */
441
- export interface AbiParameter {
442
- type: string;
443
-
444
- components?: Array<unknown>;
445
-
446
- indexed?: boolean;
210
+ export interface ConditionSetRequestBody {
211
+ /**
212
+ * Name to assign to condition set.
213
+ */
214
+ name: string;
447
215
 
448
- internalType?: string;
216
+ /**
217
+ * The owner of the resource, specified as a Privy user ID, a P-256 public key, or
218
+ * null to remove the current owner.
219
+ */
220
+ owner?: SharedAPI.OwnerInput | null;
449
221
 
450
- name?: string;
222
+ /**
223
+ * The key quorum ID to set as the owner of the resource. If you provide this, do
224
+ * not specify an owner.
225
+ */
226
+ owner_id?: SharedAPI.OwnerIDInput | null;
451
227
  }
452
228
 
453
229
  /**
454
- * A Solidity ABI definition for decoding smart contract calldata.
230
+ * Unique ID of the condition set to take actions on.
455
231
  */
456
- export type AbiSchema = Array<AbiSchema.AbiSchemaItem>;
457
-
458
- export namespace AbiSchema {
459
- export interface AbiSchemaItem {
460
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
461
-
462
- anonymous?: boolean;
463
-
464
- inputs?: Array<PoliciesAPI.AbiParameter>;
465
-
466
- name?: string;
467
-
468
- outputs?: Array<PoliciesAPI.AbiParameter>;
469
-
470
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
471
- }
232
+ export interface ConditionSetRequestParams {
233
+ condition_set_id: string;
472
234
  }
473
235
 
474
- /**
475
- * Operator to use for policy conditions.
476
- */
477
- export type ConditionOperator = 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
478
-
479
236
  /**
480
237
  * Value to compare against in a policy condition. Can be a single string or an
481
238
  * array of strings.
@@ -483,25 +240,12 @@ export type ConditionOperator = 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_
483
240
  export type ConditionValue = string | Array<string>;
484
241
 
485
242
  /**
486
- * Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
487
- * supported for command names.
488
- */
489
- export type SuiTransactionCommandOperator = 'eq' | 'in';
490
-
491
- /**
492
- * Supported fields for SUI TransferObjects command conditions. Only 'recipient'
493
- * and 'amount' are supported.
494
- */
495
- export type SuiTransferObjectsCommandField = 'recipient' | 'amount';
496
-
497
- /**
498
- * The verbatim Ethereum transaction object in an eth_signTransaction or
499
- * eth_sendTransaction request.
243
+ * Allowed contract addresses for eth_sign7702Authorization requests.
500
244
  */
501
- export interface EthereumTransactionCondition {
502
- field: 'to' | 'value' | 'chain_id';
245
+ export interface Ethereum7702AuthorizationCondition {
246
+ field: 'contract';
503
247
 
504
- field_source: 'ethereum_transaction';
248
+ field_source: 'ethereum_7702_authorization';
505
249
 
506
250
  /**
507
251
  * Operator to use for policy conditions.
@@ -517,8 +261,8 @@ export interface EthereumTransactionCondition {
517
261
 
518
262
  /**
519
263
  * The decoded calldata in a smart contract interaction as the smart contract
520
- * method's parameters. Note that that 'ethereum_calldata' conditions must contain
521
- * an abi parameter with the JSON ABI of the smart contract.
264
+ * method's parameters. Note that 'ethereum_calldata' conditions must contain an
265
+ * abi parameter with the JSON ABI of the smart contract.
522
266
  */
523
267
  export interface EthereumCalldataCondition {
524
268
  /**
@@ -542,6 +286,27 @@ export interface EthereumCalldataCondition {
542
286
  value: ConditionValue;
543
287
  }
544
288
 
289
+ /**
290
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
291
+ * eth_sendTransaction request.
292
+ */
293
+ export interface EthereumTransactionCondition {
294
+ field: 'to' | 'value' | 'chain_id';
295
+
296
+ field_source: 'ethereum_transaction';
297
+
298
+ /**
299
+ * Operator to use for policy conditions.
300
+ */
301
+ operator: ConditionOperator;
302
+
303
+ /**
304
+ * Value to compare against in a policy condition. Can be a single string or an
305
+ * array of strings.
306
+ */
307
+ value: ConditionValue;
308
+ }
309
+
545
310
  /**
546
311
  * Attributes from the signing domain that will verify the signature.
547
312
  */
@@ -597,23 +362,167 @@ export namespace EthereumTypedDataMessageCondition {
597
362
  }
598
363
 
599
364
  /**
600
- * Allowed contract addresses for eth_sign7702Authorization requests.
365
+ * A policy for controlling wallet operations.
601
366
  */
602
- export interface Ethereum7702AuthorizationCondition {
603
- field: 'contract';
604
-
605
- field_source: 'ethereum_7702_authorization';
606
-
367
+ export interface Policy {
607
368
  /**
608
- * Operator to use for policy conditions.
369
+ * Unique ID of the created policy. This will be the primary identifier when using
370
+ * the policy in the future.
609
371
  */
610
- operator: ConditionOperator;
372
+ id: string;
611
373
 
612
374
  /**
613
- * Value to compare against in a policy condition. Can be a single string or an
614
- * array of strings.
375
+ * The wallet chain types.
615
376
  */
616
- value: ConditionValue;
377
+ chain_type: WalletsAPI.WalletChainType;
378
+
379
+ /**
380
+ * Unix timestamp of when the policy was created in milliseconds.
381
+ */
382
+ created_at: number;
383
+
384
+ /**
385
+ * Name to assign to policy.
386
+ */
387
+ name: string;
388
+
389
+ /**
390
+ * The key quorum ID of the owner of the policy.
391
+ */
392
+ owner_id: string | null;
393
+
394
+ rules: Array<PolicyRuleResponse>;
395
+
396
+ /**
397
+ * Version of the policy. Currently, 1.0 is the only version.
398
+ */
399
+ version: '1.0';
400
+ }
401
+
402
+ /**
403
+ * The action to take when a policy rule matches.
404
+ */
405
+ export type PolicyAction = 'ALLOW' | 'DENY';
406
+
407
+ /**
408
+ * Headers required to authorize modifications to policies.
409
+ */
410
+ export interface PolicyAuthorizationHeaders {
411
+ /**
412
+ * ID of your Privy app.
413
+ */
414
+ 'privy-app-id': string;
415
+
416
+ /**
417
+ * Request authorization signature. If multiple signatures are required, they
418
+ * should be comma separated.
419
+ */
420
+ 'privy-authorization-signature'?: string;
421
+
422
+ /**
423
+ * Request expiry. Value is a Unix timestamp in milliseconds representing the
424
+ * deadline by which the request must be processed.
425
+ */
426
+ 'privy-request-expiry'?: string;
427
+ }
428
+
429
+ /**
430
+ * A condition that must be true for the rule action to be applied.
431
+ */
432
+ export type PolicyCondition =
433
+ | EthereumTransactionCondition
434
+ | EthereumCalldataCondition
435
+ | EthereumTypedDataDomainCondition
436
+ | EthereumTypedDataMessageCondition
437
+ | Ethereum7702AuthorizationCondition
438
+ | SolanaProgramInstructionCondition
439
+ | SolanaSystemProgramInstructionCondition
440
+ | SolanaTokenProgramInstructionCondition
441
+ | SystemCondition
442
+ | TronTransactionCondition
443
+ | TronCalldataCondition
444
+ | SuiTransactionCommandCondition
445
+ | SuiTransferObjectsCommandCondition
446
+ | ActionRequestBodyCondition
447
+ | AggregationCondition;
448
+
449
+ /**
450
+ * Method the rule applies to.
451
+ */
452
+ export type PolicyMethod =
453
+ | 'eth_sendTransaction'
454
+ | 'eth_signTransaction'
455
+ | 'eth_signUserOperation'
456
+ | 'eth_signTypedData_v4'
457
+ | 'eth_sign7702Authorization'
458
+ | 'personal_sign'
459
+ | 'wallet_sendCalls'
460
+ | 'signTransaction'
461
+ | 'signAndSendTransaction'
462
+ | 'signMessage'
463
+ | 'exportPrivateKey'
464
+ | 'exportSeedPhrase'
465
+ | 'signTransactionBytes'
466
+ | 'earn_deposit'
467
+ | 'earn_withdraw'
468
+ | 'transfer'
469
+ | '*';
470
+
471
+ /**
472
+ * Unique ID of the policy to take actions on.
473
+ */
474
+ export interface PolicyRequestBody {
475
+ policy_id: string;
476
+ }
477
+
478
+ /**
479
+ * The rules that apply to each method the policy covers.
480
+ */
481
+ export interface PolicyRuleRequestBody {
482
+ /**
483
+ * The action to take when a policy rule matches.
484
+ */
485
+ action: PolicyAction;
486
+
487
+ conditions: Array<PolicyCondition>;
488
+
489
+ /**
490
+ * Method the rule applies to.
491
+ */
492
+ method: PolicyMethod;
493
+
494
+ name: string;
495
+ }
496
+
497
+ /**
498
+ * Unique IDs of the policy and the rule within the policy to take actions on.
499
+ */
500
+ export interface PolicyRuleRequestParams {
501
+ policy_id: string;
502
+
503
+ rule_id: string;
504
+ }
505
+
506
+ /**
507
+ * A rule that defines the conditions and action to take if the conditions are
508
+ * true.
509
+ */
510
+ export interface PolicyRuleResponse {
511
+ id: string;
512
+
513
+ /**
514
+ * The action to take when a policy rule matches.
515
+ */
516
+ action: PolicyAction;
517
+
518
+ conditions: Array<PolicyCondition>;
519
+
520
+ /**
521
+ * Method the rule applies to.
522
+ */
523
+ method: PolicyMethod;
524
+
525
+ name: string;
617
526
  }
618
527
 
619
528
  /**
@@ -703,42 +612,45 @@ export interface SolanaTokenProgramInstructionCondition {
703
612
  }
704
613
 
705
614
  /**
706
- * System attributes, including current unix timestamp (in seconds).
615
+ * SUI transaction command attributes, enables allowlisting specific command types.
616
+ * Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
617
+ * 'in' operators are supported.
707
618
  */
708
- export interface SystemCondition {
709
- field: 'current_unix_timestamp';
619
+ export interface SuiTransactionCommandCondition {
620
+ field: 'commandName';
710
621
 
711
- field_source: 'system';
622
+ field_source: 'sui_transaction_command';
712
623
 
713
624
  /**
714
- * Operator to use for policy conditions.
625
+ * Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
626
+ * supported for command names.
715
627
  */
716
- operator: ConditionOperator;
628
+ operator: SuiTransactionCommandOperator;
717
629
 
718
630
  /**
719
- * Value to compare against in a policy condition. Can be a single string or an
720
- * array of strings.
631
+ * Command name(s) to match. Must be one of: 'TransferObjects', 'SplitCoins',
632
+ * 'MergeCoins'
721
633
  */
722
- value: ConditionValue;
634
+ value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
723
635
  }
724
636
 
725
637
  /**
726
- * TRON transaction fields for TransferContract and TriggerSmartContract
727
- * transaction types.
638
+ * Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
639
+ * supported for command names.
728
640
  */
729
- export interface TronTransactionCondition {
641
+ export type SuiTransactionCommandOperator = 'eq' | 'in';
642
+
643
+ /**
644
+ * SUI TransferObjects command attributes, including recipient and amount fields.
645
+ */
646
+ export interface SuiTransferObjectsCommandCondition {
730
647
  /**
731
- * Supported TRON transaction fields in format "TransactionType.field_name"
648
+ * Supported fields for SUI TransferObjects command conditions. Only 'recipient'
649
+ * and 'amount' are supported.
732
650
  */
733
- field:
734
- | 'TransferContract.to_address'
735
- | 'TransferContract.amount'
736
- | 'TriggerSmartContract.contract_address'
737
- | 'TriggerSmartContract.call_value'
738
- | 'TriggerSmartContract.token_id'
739
- | 'TriggerSmartContract.call_token_value';
651
+ field: SuiTransferObjectsCommandField;
740
652
 
741
- field_source: 'tron_transaction';
653
+ field_source: 'sui_transfer_objects_command';
742
654
 
743
655
  /**
744
656
  * Operator to use for policy conditions.
@@ -753,17 +665,18 @@ export interface TronTransactionCondition {
753
665
  }
754
666
 
755
667
  /**
756
- * Decoded calldata from a TRON TriggerSmartContract interaction.
668
+ * Supported fields for SUI TransferObjects command conditions. Only 'recipient'
669
+ * and 'amount' are supported.
757
670
  */
758
- export interface TronCalldataCondition {
759
- /**
760
- * A Solidity ABI definition for decoding smart contract calldata.
761
- */
762
- abi: AbiSchema;
671
+ export type SuiTransferObjectsCommandField = 'recipient' | 'amount';
763
672
 
764
- field: string;
673
+ /**
674
+ * System attributes, including current unix timestamp (in seconds).
675
+ */
676
+ export interface SystemCondition {
677
+ field: 'current_unix_timestamp';
765
678
 
766
- field_source: 'tron_trigger_smart_contract_data';
679
+ field_source: 'system';
767
680
 
768
681
  /**
769
682
  * Operator to use for policy conditions.
@@ -778,39 +691,47 @@ export interface TronCalldataCondition {
778
691
  }
779
692
 
780
693
  /**
781
- * SUI transaction command attributes, enables allowlisting specific command types.
782
- * Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
783
- * 'in' operators are supported.
694
+ * Decoded calldata from a TRON TriggerSmartContract interaction.
784
695
  */
785
- export interface SuiTransactionCommandCondition {
786
- field: 'commandName';
696
+ export interface TronCalldataCondition {
697
+ /**
698
+ * A Solidity ABI definition for decoding smart contract calldata.
699
+ */
700
+ abi: AbiSchema;
787
701
 
788
- field_source: 'sui_transaction_command';
702
+ field: string;
703
+
704
+ field_source: 'tron_trigger_smart_contract_data';
789
705
 
790
706
  /**
791
- * Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
792
- * supported for command names.
707
+ * Operator to use for policy conditions.
793
708
  */
794
- operator: SuiTransactionCommandOperator;
709
+ operator: ConditionOperator;
795
710
 
796
711
  /**
797
- * Command name(s) to match. Must be one of: 'TransferObjects', 'SplitCoins',
798
- * 'MergeCoins'
712
+ * Value to compare against in a policy condition. Can be a single string or an
713
+ * array of strings.
799
714
  */
800
- value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
715
+ value: ConditionValue;
801
716
  }
802
717
 
803
718
  /**
804
- * SUI TransferObjects command attributes, including recipient and amount fields.
719
+ * TRON transaction fields for TransferContract and TriggerSmartContract
720
+ * transaction types.
805
721
  */
806
- export interface SuiTransferObjectsCommandCondition {
722
+ export interface TronTransactionCondition {
807
723
  /**
808
- * Supported fields for SUI TransferObjects command conditions. Only 'recipient'
809
- * and 'amount' are supported.
724
+ * Supported TRON transaction fields in format "TransactionType.field_name"
810
725
  */
811
- field: SuiTransferObjectsCommandField;
726
+ field:
727
+ | 'TransferContract.to_address'
728
+ | 'TransferContract.amount'
729
+ | 'TriggerSmartContract.contract_address'
730
+ | 'TriggerSmartContract.call_value'
731
+ | 'TriggerSmartContract.token_id'
732
+ | 'TriggerSmartContract.call_token_value';
812
733
 
813
- field_source: 'sui_transfer_objects_command';
734
+ field_source: 'tron_transaction';
814
735
 
815
736
  /**
816
737
  * Operator to use for policy conditions.
@@ -825,455 +746,69 @@ export interface SuiTransferObjectsCommandCondition {
825
746
  }
826
747
 
827
748
  /**
828
- * Condition referencing an aggregation value. The field must start with
829
- * "aggregation." followed by the aggregation ID.
749
+ * Request body for updating a condition set.
830
750
  */
831
- export interface AggregationCondition {
832
- field: string;
833
-
834
- field_source: 'reference';
835
-
836
- /**
837
- * Operator to use for policy conditions.
838
- */
839
- operator: ConditionOperator;
840
-
841
- /**
842
- * Value to compare against in a policy condition. Can be a single string or an
843
- * array of strings.
844
- */
845
- value: ConditionValue;
846
- }
847
-
848
- /**
849
- * A condition that must be true for the rule action to be applied.
850
- */
851
- export type PolicyCondition =
852
- | EthereumTransactionCondition
853
- | EthereumCalldataCondition
854
- | EthereumTypedDataDomainCondition
855
- | EthereumTypedDataMessageCondition
856
- | Ethereum7702AuthorizationCondition
857
- | SolanaProgramInstructionCondition
858
- | SolanaSystemProgramInstructionCondition
859
- | SolanaTokenProgramInstructionCondition
860
- | SystemCondition
861
- | TronTransactionCondition
862
- | TronCalldataCondition
863
- | SuiTransactionCommandCondition
864
- | SuiTransferObjectsCommandCondition
865
- | AggregationCondition;
866
-
867
- /**
868
- * Method the rule applies to.
869
- */
870
- export type PolicyMethod =
871
- | 'eth_sendTransaction'
872
- | 'eth_signTransaction'
873
- | 'eth_signUserOperation'
874
- | 'eth_signTypedData_v4'
875
- | 'eth_sign7702Authorization'
876
- | 'wallet_sendCalls'
877
- | 'signTransaction'
878
- | 'signAndSendTransaction'
879
- | 'exportPrivateKey'
880
- | 'exportSeedPhrase'
881
- | 'signTransactionBytes'
882
- | '*';
883
-
884
- /**
885
- * The rules that apply to each method the policy covers.
886
- */
887
- export interface PolicyRuleRequestBody {
888
- /**
889
- * The action to take when a policy rule matches.
890
- */
891
- action: PolicyAction;
892
-
893
- conditions: Array<PolicyCondition>;
894
-
895
- /**
896
- * Method the rule applies to.
897
- */
898
- method: PolicyMethod;
899
-
900
- name: string;
901
- }
902
-
903
- /**
904
- * A rule that defines the conditions and action to take if the conditions are
905
- * true.
906
- */
907
- export interface PolicyRuleResponse {
908
- id: string;
909
-
910
- /**
911
- * The action to take when a policy rule matches.
912
- */
913
- action: PolicyAction;
914
-
915
- conditions: Array<PolicyCondition>;
916
-
917
- /**
918
- * Method the rule applies to.
919
- */
920
- method: PolicyMethod;
921
-
922
- name: string;
923
- }
924
-
925
- /**
926
- * A policy for controlling wallet operations.
927
- */
928
- export interface Policy {
929
- /**
930
- * Unique ID of the created policy. This will be the primary identifier when using
931
- * the policy in the future.
932
- */
933
- id: string;
934
-
935
- /**
936
- * The wallet chain types.
937
- */
938
- chain_type: WalletsAPI.WalletChainType;
939
-
940
- /**
941
- * Unix timestamp of when the policy was created in milliseconds.
942
- */
943
- created_at: number;
944
-
945
- /**
946
- * Name to assign to policy.
947
- */
948
- name: string;
949
-
950
- /**
951
- * The key quorum ID of the owner of the policy.
952
- */
953
- owner_id: string | null;
954
-
955
- rules: Array<PolicyRuleResponse>;
956
-
957
- /**
958
- * Version of the policy. Currently, 1.0 is the only version.
959
- */
960
- version: '1.0';
961
- }
962
-
963
- /**
964
- * Unique ID of the policy to take actions on.
965
- */
966
- export interface PolicyRequestBody {
967
- policy_id: string;
968
- }
969
-
970
- /**
971
- * Unique IDs of the policy and the rule within the policy to take actions on.
972
- */
973
- export interface PolicyRuleRequestParams {
974
- policy_id: string;
975
-
976
- rule_id: string;
977
- }
978
-
979
- /**
980
- * Headers required to authorize modifications to policies.
981
- */
982
- export interface PolicyAuthorizationHeaders {
983
- /**
984
- * ID of your Privy app.
985
- */
986
- 'privy-app-id': string;
987
-
988
- /**
989
- * Request authorization signature. If multiple signatures are required, they
990
- * should be comma separated.
991
- */
992
- 'privy-authorization-signature'?: string;
993
-
994
- /**
995
- * Request expiry. Value is a Unix timestamp in milliseconds representing the
996
- * deadline by which the request must be processed.
997
- */
998
- 'privy-request-expiry'?: string;
999
- }
1000
-
1001
- /**
1002
- * Headers required to authorize modifications to condition sets.
1003
- */
1004
- export interface ConditionSetAuthorizationHeaders {
1005
- /**
1006
- * ID of your Privy app.
1007
- */
1008
- 'privy-app-id': string;
1009
-
1010
- /**
1011
- * Request authorization signature. If multiple signatures are required, they
1012
- * should be comma separated.
1013
- */
1014
- 'privy-authorization-signature'?: string;
1015
-
1016
- /**
1017
- * Request expiry. Value is a Unix timestamp in milliseconds representing the
1018
- * deadline by which the request must be processed.
1019
- */
1020
- 'privy-request-expiry'?: string;
1021
- }
1022
-
1023
- export interface PolicyCreateParams {
1024
- /**
1025
- * Body param: The wallet chain types.
1026
- */
1027
- chain_type: WalletsAPI.WalletChainType;
1028
-
1029
- /**
1030
- * Body param: Name to assign to policy.
1031
- */
1032
- name: string;
1033
-
1034
- /**
1035
- * Body param
1036
- */
1037
- rules: Array<PolicyCreateParams.Rule>;
1038
-
1039
- /**
1040
- * Body param: Version of the policy. Currently, 1.0 is the only version.
1041
- */
1042
- version: '1.0';
1043
-
1044
- /**
1045
- * Body param: The owner of the resource, specified as a Privy user ID, a P-256
1046
- * public key, or null to remove the current owner.
1047
- */
1048
- owner?: SharedAPI.OwnerInput | null;
1049
-
1050
- /**
1051
- * Body param: The key quorum ID to set as the owner of the resource. If you
1052
- * provide this, do not specify an owner.
1053
- */
1054
- owner_id?: SharedAPI.OwnerIDInput | null;
1055
-
1056
- /**
1057
- * Header param: Idempotency keys ensure API requests are executed only once within
1058
- * a 24-hour window.
1059
- */
1060
- 'privy-idempotency-key'?: string;
1061
- }
1062
-
1063
- export namespace PolicyCreateParams {
1064
- export interface Rule {
1065
- /**
1066
- * The action to take when a policy rule matches.
1067
- */
1068
- action: PoliciesAPI.PolicyAction;
1069
-
1070
- conditions: Array<PoliciesAPI.PolicyCondition>;
1071
-
1072
- /**
1073
- * Method the rule applies to.
1074
- */
1075
- method: PoliciesAPI.PolicyMethod;
1076
-
1077
- name: string;
1078
-
1079
- id?: string;
1080
- }
1081
- }
1082
-
1083
- export interface PolicyCreateRuleParams {
1084
- /**
1085
- * Body param: The action to take when a policy rule matches.
1086
- */
1087
- action: PolicyAction;
1088
-
1089
- /**
1090
- * Body param
1091
- */
1092
- conditions: Array<PolicyCondition>;
1093
-
1094
- /**
1095
- * Body param: Method the rule applies to.
1096
- */
1097
- method: PolicyMethod;
1098
-
1099
- /**
1100
- * Body param
1101
- */
1102
- name: string;
1103
-
1104
- /**
1105
- * Header param: Request authorization signature. If multiple signatures are
1106
- * required, they should be comma separated.
1107
- */
1108
- 'privy-authorization-signature'?: string;
1109
-
1110
- /**
1111
- * Header param: Request expiry. Value is a Unix timestamp in milliseconds
1112
- * representing the deadline by which the request must be processed.
1113
- */
1114
- 'privy-request-expiry'?: string;
1115
- }
1116
-
1117
- export interface PolicyDeleteParams {
1118
- /**
1119
- * Request authorization signature. If multiple signatures are required, they
1120
- * should be comma separated.
1121
- */
1122
- 'privy-authorization-signature'?: string;
1123
-
1124
- /**
1125
- * Request expiry. Value is a Unix timestamp in milliseconds representing the
1126
- * deadline by which the request must be processed.
1127
- */
1128
- 'privy-request-expiry'?: string;
1129
- }
1130
-
1131
- export interface PolicyDeleteRuleParams {
1132
- /**
1133
- * Path param
1134
- */
1135
- policy_id: string;
1136
-
1137
- /**
1138
- * Header param: Request authorization signature. If multiple signatures are
1139
- * required, they should be comma separated.
1140
- */
1141
- 'privy-authorization-signature'?: string;
1142
-
1143
- /**
1144
- * Header param: Request expiry. Value is a Unix timestamp in milliseconds
1145
- * representing the deadline by which the request must be processed.
1146
- */
1147
- 'privy-request-expiry'?: string;
1148
- }
1149
-
1150
- export interface PolicyUpdateParams {
751
+ export interface UpdateConditionSetRequestBody {
1151
752
  /**
1152
- * Body param: Name to assign to policy.
753
+ * Name to assign to condition set.
1153
754
  */
1154
755
  name?: string;
1155
756
 
1156
757
  /**
1157
- * Body param: The owner of the resource, specified as a Privy user ID, a P-256
1158
- * public key, or null to remove the current owner.
758
+ * The owner of the resource, specified as a Privy user ID, a P-256 public key, or
759
+ * null to remove the current owner.
1159
760
  */
1160
761
  owner?: SharedAPI.OwnerInput | null;
1161
762
 
1162
763
  /**
1163
- * Body param: The key quorum ID to set as the owner of the resource. If you
1164
- * provide this, do not specify an owner.
764
+ * The key quorum ID to set as the owner of the resource. If you provide this, do
765
+ * not specify an owner.
1165
766
  */
1166
767
  owner_id?: SharedAPI.OwnerIDInput | null;
1167
-
1168
- /**
1169
- * Body param
1170
- */
1171
- rules?: Array<PolicyRuleRequestBody>;
1172
-
1173
- /**
1174
- * Header param: Request authorization signature. If multiple signatures are
1175
- * required, they should be comma separated.
1176
- */
1177
- 'privy-authorization-signature'?: string;
1178
-
1179
- /**
1180
- * Header param: Request expiry. Value is a Unix timestamp in milliseconds
1181
- * representing the deadline by which the request must be processed.
1182
- */
1183
- 'privy-request-expiry'?: string;
1184
- }
1185
-
1186
- export interface PolicyUpdateRuleParams {
1187
- /**
1188
- * Path param
1189
- */
1190
- policy_id: string;
1191
-
1192
- /**
1193
- * Body param: The action to take when a policy rule matches.
1194
- */
1195
- action: PolicyAction;
1196
-
1197
- /**
1198
- * Body param
1199
- */
1200
- conditions: Array<PolicyCondition>;
1201
-
1202
- /**
1203
- * Body param: Method the rule applies to.
1204
- */
1205
- method: PolicyMethod;
1206
-
1207
- /**
1208
- * Body param
1209
- */
1210
- name: string;
1211
-
1212
- /**
1213
- * Header param: Request authorization signature. If multiple signatures are
1214
- * required, they should be comma separated.
1215
- */
1216
- 'privy-authorization-signature'?: string;
1217
-
1218
- /**
1219
- * Header param: Request expiry. Value is a Unix timestamp in milliseconds
1220
- * representing the deadline by which the request must be processed.
1221
- */
1222
- 'privy-request-expiry'?: string;
1223
- }
1224
-
1225
- export interface PolicyGetRuleParams {
1226
- policy_id: string;
1227
768
  }
1228
769
 
1229
770
  export declare namespace Policies {
1230
771
  export {
1231
- type ConditionSetRequestParams as ConditionSetRequestParams,
1232
- type ConditionSetItemRequestParams as ConditionSetItemRequestParams,
1233
- type ConditionSetRequestBody as ConditionSetRequestBody,
772
+ type AbiParameter as AbiParameter,
773
+ type AbiSchema as AbiSchema,
774
+ type ActionRequestBodyCondition as ActionRequestBodyCondition,
775
+ type AggregationCondition as AggregationCondition,
776
+ type ConditionOperator as ConditionOperator,
1234
777
  type ConditionSet as ConditionSet,
1235
- type UpdateConditionSetRequestBody as UpdateConditionSetRequestBody,
1236
- type ConditionSetItemValueInput as ConditionSetItemValueInput,
1237
- type ConditionSetItemsRequestBody as ConditionSetItemsRequestBody,
778
+ type ConditionSetAuthorizationHeaders as ConditionSetAuthorizationHeaders,
1238
779
  type ConditionSetItem as ConditionSetItem,
780
+ type ConditionSetItemRequestParams as ConditionSetItemRequestParams,
781
+ type ConditionSetItemValueInput as ConditionSetItemValueInput,
1239
782
  type ConditionSetItems as ConditionSetItems,
783
+ type ConditionSetItemsRequestBody as ConditionSetItemsRequestBody,
1240
784
  type ConditionSetItemsResponse as ConditionSetItemsResponse,
1241
- type PolicyAction as PolicyAction,
1242
- type AbiParameter as AbiParameter,
1243
- type AbiSchema as AbiSchema,
1244
- type ConditionOperator as ConditionOperator,
785
+ type ConditionSetRequestBody as ConditionSetRequestBody,
786
+ type ConditionSetRequestParams as ConditionSetRequestParams,
1245
787
  type ConditionValue as ConditionValue,
1246
- type SuiTransactionCommandOperator as SuiTransactionCommandOperator,
1247
- type SuiTransferObjectsCommandField as SuiTransferObjectsCommandField,
1248
- type EthereumTransactionCondition as EthereumTransactionCondition,
788
+ type Ethereum7702AuthorizationCondition as Ethereum7702AuthorizationCondition,
1249
789
  type EthereumCalldataCondition as EthereumCalldataCondition,
790
+ type EthereumTransactionCondition as EthereumTransactionCondition,
1250
791
  type EthereumTypedDataDomainCondition as EthereumTypedDataDomainCondition,
1251
792
  type EthereumTypedDataMessageCondition as EthereumTypedDataMessageCondition,
1252
- type Ethereum7702AuthorizationCondition as Ethereum7702AuthorizationCondition,
793
+ type Policy as Policy,
794
+ type PolicyAction as PolicyAction,
795
+ type PolicyAuthorizationHeaders as PolicyAuthorizationHeaders,
796
+ type PolicyCondition as PolicyCondition,
797
+ type PolicyMethod as PolicyMethod,
798
+ type PolicyRequestBody as PolicyRequestBody,
799
+ type PolicyRuleRequestBody as PolicyRuleRequestBody,
800
+ type PolicyRuleRequestParams as PolicyRuleRequestParams,
801
+ type PolicyRuleResponse as PolicyRuleResponse,
1253
802
  type SolanaProgramInstructionCondition as SolanaProgramInstructionCondition,
1254
803
  type SolanaSystemProgramInstructionCondition as SolanaSystemProgramInstructionCondition,
1255
804
  type SolanaTokenProgramInstructionCondition as SolanaTokenProgramInstructionCondition,
1256
- type SystemCondition as SystemCondition,
1257
- type TronTransactionCondition as TronTransactionCondition,
1258
- type TronCalldataCondition as TronCalldataCondition,
1259
805
  type SuiTransactionCommandCondition as SuiTransactionCommandCondition,
806
+ type SuiTransactionCommandOperator as SuiTransactionCommandOperator,
1260
807
  type SuiTransferObjectsCommandCondition as SuiTransferObjectsCommandCondition,
1261
- type AggregationCondition as AggregationCondition,
1262
- type PolicyCondition as PolicyCondition,
1263
- type PolicyMethod as PolicyMethod,
1264
- type PolicyRuleRequestBody as PolicyRuleRequestBody,
1265
- type PolicyRuleResponse as PolicyRuleResponse,
1266
- type Policy as Policy,
1267
- type PolicyRequestBody as PolicyRequestBody,
1268
- type PolicyRuleRequestParams as PolicyRuleRequestParams,
1269
- type PolicyAuthorizationHeaders as PolicyAuthorizationHeaders,
1270
- type ConditionSetAuthorizationHeaders as ConditionSetAuthorizationHeaders,
1271
- type PolicyCreateParams as PolicyCreateParams,
1272
- type PolicyCreateRuleParams as PolicyCreateRuleParams,
1273
- type PolicyDeleteParams as PolicyDeleteParams,
1274
- type PolicyDeleteRuleParams as PolicyDeleteRuleParams,
1275
- type PolicyUpdateParams as PolicyUpdateParams,
1276
- type PolicyUpdateRuleParams as PolicyUpdateRuleParams,
1277
- type PolicyGetRuleParams as PolicyGetRuleParams,
808
+ type SuiTransferObjectsCommandField as SuiTransferObjectsCommandField,
809
+ type SystemCondition as SystemCondition,
810
+ type TronCalldataCondition as TronCalldataCondition,
811
+ type TronTransactionCondition as TronTransactionCondition,
812
+ type UpdateConditionSetRequestBody as UpdateConditionSetRequestBody,
1278
813
  };
1279
814
  }