@thirdweb-dev/service-utils 0.9.14-nightly-6be945936195e6ba41dbdd3a90a28f097e81dbee-20250620000408 → 0.10.0-nightly-c5f9921dc9cf6c62d754f12ce6171d95bd87a590-20250625053652

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 (86) hide show
  1. package/dist/cjs/cf-worker/index.js +25 -25
  2. package/dist/cjs/cf-worker/index.js.map +1 -1
  3. package/dist/cjs/cf-worker/usage.js +7 -7
  4. package/dist/cjs/cf-worker/usage.js.map +1 -1
  5. package/dist/cjs/cf-worker/usageV2.js +2 -2
  6. package/dist/cjs/cf-worker/usageV2.js.map +1 -1
  7. package/dist/cjs/core/api.js +1 -1
  8. package/dist/cjs/core/api.js.map +1 -1
  9. package/dist/cjs/core/authorize/client.js +6 -6
  10. package/dist/cjs/core/authorize/client.js.map +1 -1
  11. package/dist/cjs/core/authorize/index.js +12 -12
  12. package/dist/cjs/core/authorize/index.js.map +1 -1
  13. package/dist/cjs/core/authorize/service.js +7 -7
  14. package/dist/cjs/core/authorize/service.js.map +1 -1
  15. package/dist/cjs/core/rateLimit/index.js +7 -7
  16. package/dist/cjs/core/rateLimit/index.js.map +1 -1
  17. package/dist/cjs/core/rateLimit/strategies/sliding-window.js +3 -3
  18. package/dist/cjs/core/rateLimit/strategies/sliding-window.js.map +1 -1
  19. package/dist/cjs/core/services.js +51 -51
  20. package/dist/cjs/core/services.js.map +1 -1
  21. package/dist/cjs/core/usage.js +53 -52
  22. package/dist/cjs/core/usage.js.map +1 -1
  23. package/dist/cjs/index.js +5 -5
  24. package/dist/cjs/index.js.map +1 -1
  25. package/dist/cjs/mocks.js +60 -60
  26. package/dist/cjs/mocks.js.map +1 -1
  27. package/dist/cjs/node/index.js +26 -25
  28. package/dist/cjs/node/index.js.map +1 -1
  29. package/dist/cjs/node/kafka.js +6 -6
  30. package/dist/cjs/node/kafka.js.map +1 -1
  31. package/dist/cjs/node/usageV2.js +24 -30
  32. package/dist/cjs/node/usageV2.js.map +1 -1
  33. package/dist/cjs/node/webhookProducer.js +49 -0
  34. package/dist/cjs/node/webhookProducer.js.map +1 -0
  35. package/dist/esm/cf-worker/index.js +25 -25
  36. package/dist/esm/cf-worker/index.js.map +1 -1
  37. package/dist/esm/cf-worker/usage.js +7 -7
  38. package/dist/esm/cf-worker/usage.js.map +1 -1
  39. package/dist/esm/cf-worker/usageV2.js +2 -2
  40. package/dist/esm/cf-worker/usageV2.js.map +1 -1
  41. package/dist/esm/core/api.js +1 -1
  42. package/dist/esm/core/api.js.map +1 -1
  43. package/dist/esm/core/authorize/client.js +6 -6
  44. package/dist/esm/core/authorize/client.js.map +1 -1
  45. package/dist/esm/core/authorize/index.js +12 -12
  46. package/dist/esm/core/authorize/index.js.map +1 -1
  47. package/dist/esm/core/authorize/service.js +7 -7
  48. package/dist/esm/core/authorize/service.js.map +1 -1
  49. package/dist/esm/core/rateLimit/index.js +7 -7
  50. package/dist/esm/core/rateLimit/index.js.map +1 -1
  51. package/dist/esm/core/rateLimit/strategies/sliding-window.js +3 -3
  52. package/dist/esm/core/rateLimit/strategies/sliding-window.js.map +1 -1
  53. package/dist/esm/core/services.js +51 -51
  54. package/dist/esm/core/services.js.map +1 -1
  55. package/dist/esm/core/usage.js +53 -52
  56. package/dist/esm/core/usage.js.map +1 -1
  57. package/dist/esm/index.js +2 -2
  58. package/dist/esm/index.js.map +1 -1
  59. package/dist/esm/mocks.js +60 -60
  60. package/dist/esm/mocks.js.map +1 -1
  61. package/dist/esm/node/index.js +26 -25
  62. package/dist/esm/node/index.js.map +1 -1
  63. package/dist/esm/node/kafka.js +6 -6
  64. package/dist/esm/node/kafka.js.map +1 -1
  65. package/dist/esm/node/usageV2.js +24 -30
  66. package/dist/esm/node/usageV2.js.map +1 -1
  67. package/dist/esm/node/webhookProducer.js +45 -0
  68. package/dist/esm/node/webhookProducer.js.map +1 -0
  69. package/dist/types/cf-worker/index.d.ts +3 -3
  70. package/dist/types/cf-worker/index.d.ts.map +1 -1
  71. package/dist/types/cf-worker/usage.d.ts.map +1 -1
  72. package/dist/types/core/authorize/client.d.ts.map +1 -1
  73. package/dist/types/core/authorize/index.d.ts.map +1 -1
  74. package/dist/types/core/services.d.ts +122 -122
  75. package/dist/types/core/services.d.ts.map +1 -1
  76. package/dist/types/core/usage.d.ts +143 -141
  77. package/dist/types/core/usage.d.ts.map +1 -1
  78. package/dist/types/index.d.ts +3 -3
  79. package/dist/types/index.d.ts.map +1 -1
  80. package/dist/types/node/index.d.ts +5 -4
  81. package/dist/types/node/index.d.ts.map +1 -1
  82. package/dist/types/node/usageV2.d.ts +15 -11
  83. package/dist/types/node/usageV2.d.ts.map +1 -1
  84. package/dist/types/node/webhookProducer.d.ts +37 -0
  85. package/dist/types/node/webhookProducer.d.ts.map +1 -0
  86. package/package.json +45 -43
@@ -1,132 +1,132 @@
1
1
  export declare const SERVICE_DEFINITIONS: {
2
- readonly storage: {
3
- readonly name: "storage";
4
- readonly title: "Storage";
5
- readonly description: "IPFS Upload and Download";
6
- readonly actions: readonly [{
7
- readonly name: "read";
8
- readonly title: "Download";
9
- readonly description: "Download a file from Storage";
10
- }, {
11
- readonly name: "write";
12
- readonly title: "Upload";
13
- readonly description: "Upload a file to Storage";
14
- }];
15
- };
16
- readonly rpc: {
17
- readonly name: "rpc";
18
- readonly title: "RPC";
19
- readonly description: "Accelerated RPC Edge";
20
- readonly actions: readonly [];
21
- };
22
2
  readonly bundler: {
3
+ readonly actions: readonly [];
4
+ readonly description: "Bundler & Paymaster services";
23
5
  readonly name: "bundler";
24
6
  readonly title: "Account Abstraction";
25
- readonly description: "Bundler & Paymaster services";
26
- readonly actions: readonly [];
27
7
  };
28
- readonly relayer: {
29
- readonly name: "relayer";
30
- readonly title: "Gasless Relayer";
31
- readonly description: "Enable gasless transactions";
8
+ readonly chainsaw: {
32
9
  readonly actions: readonly [];
10
+ readonly description: "Indexed data for any EVM chain";
11
+ readonly name: "chainsaw";
12
+ readonly title: "Chainsaw";
33
13
  };
34
14
  readonly embeddedWallets: {
35
- readonly name: "embeddedWallets";
36
- readonly title: "In-App Wallets";
37
- readonly description: "E-mail and social login wallets for easy web3 onboarding";
38
- readonly actions: readonly [];
39
- };
40
- readonly pay: {
41
- readonly name: "pay";
42
- readonly title: "Universal Bridge";
43
- readonly description: "Bridge, swap, and purchase cryptocurrencies and execute transactions with any fiat or tokens via cross-chain routing";
44
15
  readonly actions: readonly [];
16
+ readonly description: "E-mail and social login wallets for easy web3 onboarding";
17
+ readonly name: "embeddedWallets";
18
+ readonly title: "Wallets";
45
19
  };
46
- readonly chainsaw: {
47
- readonly name: "chainsaw";
48
- readonly title: "Chainsaw";
49
- readonly description: "Indexed data for any EVM chain";
20
+ readonly engineCloud: {
50
21
  readonly actions: readonly [];
22
+ readonly description: "Transaction API and Server wallets with high transaction throughput and low latency";
23
+ readonly name: "engineCloud";
24
+ readonly title: "Transactions";
51
25
  };
52
26
  readonly insight: {
27
+ readonly actions: readonly [];
28
+ readonly description: "Indexed data for any EVM chain";
53
29
  readonly name: "insight";
54
30
  readonly title: "Insight";
55
- readonly description: "Indexed data for any EVM chain";
56
- readonly actions: readonly [];
57
31
  };
58
32
  readonly nebula: {
33
+ readonly actions: readonly [];
34
+ readonly description: "Advanced blockchain reasoning and execution capabilities with AI";
59
35
  readonly name: "nebula";
60
36
  readonly title: "Nebula";
61
- readonly description: "Advanced blockchain reasoning and execution capabilities with AI";
37
+ };
38
+ readonly pay: {
62
39
  readonly actions: readonly [];
40
+ readonly description: "Bridge, swap, and purchase cryptocurrencies and execute transactions with any fiat or tokens via cross-chain routing";
41
+ readonly name: "pay";
42
+ readonly title: "Universal Bridge";
63
43
  };
64
- readonly engineCloud: {
65
- readonly name: "engineCloud";
66
- readonly title: "Engine Cloud";
67
- readonly description: "Transaction API and Server wallets with high transaction throughput and low latency";
44
+ readonly relayer: {
68
45
  readonly actions: readonly [];
46
+ readonly description: "Enable gasless transactions";
47
+ readonly name: "relayer";
48
+ readonly title: "Gasless Relayer";
49
+ };
50
+ readonly rpc: {
51
+ readonly actions: readonly [];
52
+ readonly description: "Accelerated RPC Edge";
53
+ readonly name: "rpc";
54
+ readonly title: "RPC";
55
+ };
56
+ readonly storage: {
57
+ readonly actions: readonly [{
58
+ readonly description: "Download a file from Storage";
59
+ readonly name: "read";
60
+ readonly title: "Download";
61
+ }, {
62
+ readonly description: "Upload a file to Storage";
63
+ readonly name: "write";
64
+ readonly title: "Upload";
65
+ }];
66
+ readonly description: "IPFS Upload and Download";
67
+ readonly name: "storage";
68
+ readonly title: "Storage";
69
69
  };
70
70
  };
71
71
  export declare const SERVICE_NAMES: (keyof typeof SERVICE_DEFINITIONS)[];
72
72
  export declare const SERVICES: ({
73
- readonly name: "storage";
74
- readonly title: "Storage";
75
- readonly description: "IPFS Upload and Download";
76
- readonly actions: readonly [{
77
- readonly name: "read";
78
- readonly title: "Download";
79
- readonly description: "Download a file from Storage";
80
- }, {
81
- readonly name: "write";
82
- readonly title: "Upload";
83
- readonly description: "Upload a file to Storage";
84
- }];
85
- } | {
86
- readonly name: "rpc";
87
- readonly title: "RPC";
88
- readonly description: "Accelerated RPC Edge";
89
73
  readonly actions: readonly [];
90
- } | {
74
+ readonly description: "Bundler & Paymaster services";
91
75
  readonly name: "bundler";
92
76
  readonly title: "Account Abstraction";
93
- readonly description: "Bundler & Paymaster services";
94
- readonly actions: readonly [];
95
77
  } | {
96
- readonly name: "relayer";
97
- readonly title: "Gasless Relayer";
98
- readonly description: "Enable gasless transactions";
99
78
  readonly actions: readonly [];
79
+ readonly description: "Indexed data for any EVM chain";
80
+ readonly name: "chainsaw";
81
+ readonly title: "Chainsaw";
100
82
  } | {
101
- readonly name: "embeddedWallets";
102
- readonly title: "In-App Wallets";
103
- readonly description: "E-mail and social login wallets for easy web3 onboarding";
104
83
  readonly actions: readonly [];
84
+ readonly description: "E-mail and social login wallets for easy web3 onboarding";
85
+ readonly name: "embeddedWallets";
86
+ readonly title: "Wallets";
105
87
  } | {
106
- readonly name: "pay";
107
- readonly title: "Universal Bridge";
108
- readonly description: "Bridge, swap, and purchase cryptocurrencies and execute transactions with any fiat or tokens via cross-chain routing";
109
88
  readonly actions: readonly [];
89
+ readonly description: "Transaction API and Server wallets with high transaction throughput and low latency";
90
+ readonly name: "engineCloud";
91
+ readonly title: "Transactions";
110
92
  } | {
111
- readonly name: "chainsaw";
112
- readonly title: "Chainsaw";
113
- readonly description: "Indexed data for any EVM chain";
114
93
  readonly actions: readonly [];
115
- } | {
94
+ readonly description: "Indexed data for any EVM chain";
116
95
  readonly name: "insight";
117
96
  readonly title: "Insight";
118
- readonly description: "Indexed data for any EVM chain";
119
- readonly actions: readonly [];
120
97
  } | {
98
+ readonly actions: readonly [];
99
+ readonly description: "Advanced blockchain reasoning and execution capabilities with AI";
121
100
  readonly name: "nebula";
122
101
  readonly title: "Nebula";
123
- readonly description: "Advanced blockchain reasoning and execution capabilities with AI";
102
+ } | {
124
103
  readonly actions: readonly [];
104
+ readonly description: "Bridge, swap, and purchase cryptocurrencies and execute transactions with any fiat or tokens via cross-chain routing";
105
+ readonly name: "pay";
106
+ readonly title: "Universal Bridge";
125
107
  } | {
126
- readonly name: "engineCloud";
127
- readonly title: "Engine Cloud";
128
- readonly description: "Transaction API and Server wallets with high transaction throughput and low latency";
129
108
  readonly actions: readonly [];
109
+ readonly description: "Enable gasless transactions";
110
+ readonly name: "relayer";
111
+ readonly title: "Gasless Relayer";
112
+ } | {
113
+ readonly actions: readonly [];
114
+ readonly description: "Accelerated RPC Edge";
115
+ readonly name: "rpc";
116
+ readonly title: "RPC";
117
+ } | {
118
+ readonly actions: readonly [{
119
+ readonly description: "Download a file from Storage";
120
+ readonly name: "read";
121
+ readonly title: "Download";
122
+ }, {
123
+ readonly description: "Upload a file to Storage";
124
+ readonly name: "write";
125
+ readonly title: "Upload";
126
+ }];
127
+ readonly description: "IPFS Upload and Download";
128
+ readonly name: "storage";
129
+ readonly title: "Storage";
130
130
  })[];
131
131
  export type ServiceName = (typeof SERVICE_NAMES)[number];
132
132
  export type ServiceAction = {
@@ -136,62 +136,62 @@ export type ServiceAction = {
136
136
  };
137
137
  export type Service = (typeof SERVICE_DEFINITIONS)[keyof typeof SERVICE_DEFINITIONS];
138
138
  export declare function getServiceByName(name: ServiceName): {
139
- readonly name: "storage";
140
- readonly title: "Storage";
141
- readonly description: "IPFS Upload and Download";
142
- readonly actions: readonly [{
143
- readonly name: "read";
144
- readonly title: "Download";
145
- readonly description: "Download a file from Storage";
146
- }, {
147
- readonly name: "write";
148
- readonly title: "Upload";
149
- readonly description: "Upload a file to Storage";
150
- }];
151
- } | {
152
- readonly name: "rpc";
153
- readonly title: "RPC";
154
- readonly description: "Accelerated RPC Edge";
155
139
  readonly actions: readonly [];
156
- } | {
140
+ readonly description: "Bundler & Paymaster services";
157
141
  readonly name: "bundler";
158
142
  readonly title: "Account Abstraction";
159
- readonly description: "Bundler & Paymaster services";
160
- readonly actions: readonly [];
161
143
  } | {
162
- readonly name: "relayer";
163
- readonly title: "Gasless Relayer";
164
- readonly description: "Enable gasless transactions";
165
144
  readonly actions: readonly [];
145
+ readonly description: "Indexed data for any EVM chain";
146
+ readonly name: "chainsaw";
147
+ readonly title: "Chainsaw";
166
148
  } | {
167
- readonly name: "embeddedWallets";
168
- readonly title: "In-App Wallets";
169
- readonly description: "E-mail and social login wallets for easy web3 onboarding";
170
149
  readonly actions: readonly [];
150
+ readonly description: "E-mail and social login wallets for easy web3 onboarding";
151
+ readonly name: "embeddedWallets";
152
+ readonly title: "Wallets";
171
153
  } | {
172
- readonly name: "pay";
173
- readonly title: "Universal Bridge";
174
- readonly description: "Bridge, swap, and purchase cryptocurrencies and execute transactions with any fiat or tokens via cross-chain routing";
175
154
  readonly actions: readonly [];
155
+ readonly description: "Transaction API and Server wallets with high transaction throughput and low latency";
156
+ readonly name: "engineCloud";
157
+ readonly title: "Transactions";
176
158
  } | {
177
- readonly name: "chainsaw";
178
- readonly title: "Chainsaw";
179
- readonly description: "Indexed data for any EVM chain";
180
159
  readonly actions: readonly [];
181
- } | {
160
+ readonly description: "Indexed data for any EVM chain";
182
161
  readonly name: "insight";
183
162
  readonly title: "Insight";
184
- readonly description: "Indexed data for any EVM chain";
185
- readonly actions: readonly [];
186
163
  } | {
164
+ readonly actions: readonly [];
165
+ readonly description: "Advanced blockchain reasoning and execution capabilities with AI";
187
166
  readonly name: "nebula";
188
167
  readonly title: "Nebula";
189
- readonly description: "Advanced blockchain reasoning and execution capabilities with AI";
168
+ } | {
190
169
  readonly actions: readonly [];
170
+ readonly description: "Bridge, swap, and purchase cryptocurrencies and execute transactions with any fiat or tokens via cross-chain routing";
171
+ readonly name: "pay";
172
+ readonly title: "Universal Bridge";
191
173
  } | {
192
- readonly name: "engineCloud";
193
- readonly title: "Engine Cloud";
194
- readonly description: "Transaction API and Server wallets with high transaction throughput and low latency";
195
174
  readonly actions: readonly [];
175
+ readonly description: "Enable gasless transactions";
176
+ readonly name: "relayer";
177
+ readonly title: "Gasless Relayer";
178
+ } | {
179
+ readonly actions: readonly [];
180
+ readonly description: "Accelerated RPC Edge";
181
+ readonly name: "rpc";
182
+ readonly title: "RPC";
183
+ } | {
184
+ readonly actions: readonly [{
185
+ readonly description: "Download a file from Storage";
186
+ readonly name: "read";
187
+ readonly title: "Download";
188
+ }, {
189
+ readonly description: "Upload a file to Storage";
190
+ readonly name: "write";
191
+ readonly title: "Upload";
192
+ }];
193
+ readonly description: "IPFS Upload and Download";
194
+ readonly name: "storage";
195
+ readonly title: "Storage";
196
196
  };
197
197
  //# sourceMappingURL=services.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../src/core/services.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFtB,CAAC;AAEX,eAAO,MAAM,aAAa,EAErB,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAAE,CAAC;AAE1C,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAqC,CAAC;AAE3D,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,OAAO,GACjB,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEjD"}
1
+ {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../src/core/services.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFtB,CAAC;AAEX,eAAO,MAAM,aAAa,EAErB,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAAE,CAAC;AAE1C,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAqC,CAAC;AAE3D,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,OAAO,GACjB,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEjD"}
@@ -1,196 +1,198 @@
1
1
  import { z } from "zod";
2
+ /** @deprecated - Use UsageV2Event instead */
2
3
  export declare const usageEventSchema: z.ZodObject<{
3
- source: z.ZodString;
4
- action: z.ZodString;
5
4
  /**
6
5
  * The following fields are optional.
7
6
  */
8
7
  accountId: z.ZodOptional<z.ZodString>;
9
- isClientEvent: z.ZodOptional<z.ZodBoolean>;
8
+ action: z.ZodString;
9
+ amountUSDCents: z.ZodOptional<z.ZodNumber>;
10
+ amountWei: z.ZodOptional<z.ZodString>;
10
11
  apiKeyId: z.ZodOptional<z.ZodString>;
11
- creatorWalletAddress: z.ZodOptional<z.ZodString>;
12
- clientId: z.ZodOptional<z.ZodString>;
13
- walletAddress: z.ZodOptional<z.ZodString>;
14
- walletType: z.ZodOptional<z.ZodString>;
12
+ authenticationMethod: z.ZodOptional<z.ZodString>;
15
13
  chainId: z.ZodOptional<z.ZodNumber>;
16
- provider: z.ZodOptional<z.ZodString>;
17
- mimeType: z.ZodOptional<z.ZodString>;
18
- fileSize: z.ZodOptional<z.ZodNumber>;
19
- fileCid: z.ZodOptional<z.ZodString>;
14
+ chainName: z.ZodOptional<z.ZodString>;
15
+ clientId: z.ZodOptional<z.ZodString>;
16
+ completionTokens: z.ZodOptional<z.ZodNumber>;
17
+ contractAddress: z.ZodOptional<z.ZodString>;
18
+ creatorWalletAddress: z.ZodOptional<z.ZodString>;
19
+ dstChainId: z.ZodOptional<z.ZodNumber>;
20
+ dstChainName: z.ZodOptional<z.ZodString>;
21
+ dstTokenAddress: z.ZodOptional<z.ZodString>;
22
+ dstTokenSymbol: z.ZodOptional<z.ZodString>;
23
+ ecosystemId: z.ZodOptional<z.ZodString>;
24
+ ecosystemPartnerId: z.ZodOptional<z.ZodString>;
25
+ errorCode: z.ZodOptional<z.ZodString>;
20
26
  evmMethod: z.ZodOptional<z.ZodString>;
21
- userOpHash: z.ZodOptional<z.ZodString>;
27
+ evmRequestParams: z.ZodOptional<z.ZodString>;
28
+ extension: z.ZodOptional<z.ZodString>;
29
+ fileCid: z.ZodOptional<z.ZodString>;
30
+ fileSize: z.ZodOptional<z.ZodNumber>;
31
+ functionName: z.ZodOptional<z.ZodString>;
22
32
  gasLimit: z.ZodOptional<z.ZodNumber>;
23
33
  gasPricePerUnit: z.ZodOptional<z.ZodString>;
24
- transactionFeeUsd: z.ZodOptional<z.ZodNumber>;
25
- transactionHash: z.ZodOptional<z.ZodString>;
26
- sdkName: z.ZodOptional<z.ZodString>;
27
- sdkVersion: z.ZodOptional<z.ZodString>;
28
- sdkPlatform: z.ZodOptional<z.ZodString>;
29
- sdkOS: z.ZodOptional<z.ZodString>;
30
- productName: z.ZodOptional<z.ZodString>;
31
- transactionValue: z.ZodOptional<z.ZodString>;
32
- pathname: z.ZodOptional<z.ZodString>;
33
- contractAddress: z.ZodOptional<z.ZodString>;
34
- errorCode: z.ZodOptional<z.ZodString>;
34
+ httpMethod: z.ZodOptional<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "CONNECT", "OPTIONS", "TRACE"]>>;
35
35
  httpStatusCode: z.ZodOptional<z.ZodNumber>;
36
- functionName: z.ZodOptional<z.ZodString>;
37
- extension: z.ZodOptional<z.ZodString>;
38
- retryCount: z.ZodOptional<z.ZodNumber>;
39
- policyId: z.ZodOptional<z.ZodString>;
36
+ isClientEvent: z.ZodOptional<z.ZodBoolean>;
37
+ mimeType: z.ZodOptional<z.ZodString>;
38
+ modelName: z.ZodOptional<z.ZodString>;
39
+ msLatency: z.ZodOptional<z.ZodNumber>;
40
40
  msSinceQueue: z.ZodOptional<z.ZodNumber>;
41
41
  msSinceSend: z.ZodOptional<z.ZodNumber>;
42
42
  msTotalDuration: z.ZodOptional<z.ZodNumber>;
43
- swapId: z.ZodOptional<z.ZodString>;
44
- tokenAddress: z.ZodOptional<z.ZodString>;
45
- amountWei: z.ZodOptional<z.ZodString>;
46
- amountUSDCents: z.ZodOptional<z.ZodNumber>;
47
- httpMethod: z.ZodOptional<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "CONNECT", "OPTIONS", "TRACE"]>>;
48
- ecosystemId: z.ZodOptional<z.ZodString>;
49
- ecosystemPartnerId: z.ZodOptional<z.ZodString>;
50
- authenticationMethod: z.ZodOptional<z.ZodString>;
51
- chainName: z.ZodOptional<z.ZodString>;
52
- tokenSymbol: z.ZodOptional<z.ZodString>;
53
- dstChainId: z.ZodOptional<z.ZodNumber>;
54
- dstTokenAddress: z.ZodOptional<z.ZodString>;
55
- dstChainName: z.ZodOptional<z.ZodString>;
56
- dstTokenSymbol: z.ZodOptional<z.ZodString>;
57
- msLatency: z.ZodOptional<z.ZodNumber>;
58
- toAmountUSDCents: z.ZodOptional<z.ZodNumber>;
59
- secondaryProvider: z.ZodOptional<z.ZodString>;
60
43
  onRampId: z.ZodOptional<z.ZodString>;
61
- evmRequestParams: z.ZodOptional<z.ZodString>;
62
- providerIp: z.ZodOptional<z.ZodString>;
44
+ pathname: z.ZodOptional<z.ZodString>;
45
+ policyId: z.ZodOptional<z.ZodString>;
46
+ productName: z.ZodOptional<z.ZodString>;
63
47
  promptTokens: z.ZodOptional<z.ZodNumber>;
64
- completionTokens: z.ZodOptional<z.ZodNumber>;
65
- modelName: z.ZodOptional<z.ZodString>;
66
- sessionId: z.ZodOptional<z.ZodString>;
48
+ provider: z.ZodOptional<z.ZodString>;
49
+ providerIp: z.ZodOptional<z.ZodString>;
67
50
  requestId: z.ZodOptional<z.ZodString>;
51
+ retryCount: z.ZodOptional<z.ZodNumber>;
52
+ sdkName: z.ZodOptional<z.ZodString>;
53
+ sdkOS: z.ZodOptional<z.ZodString>;
54
+ sdkPlatform: z.ZodOptional<z.ZodString>;
55
+ sdkVersion: z.ZodOptional<z.ZodString>;
56
+ secondaryProvider: z.ZodOptional<z.ZodString>;
57
+ sessionId: z.ZodOptional<z.ZodString>;
58
+ source: z.ZodString;
59
+ swapId: z.ZodOptional<z.ZodString>;
60
+ toAmountUSDCents: z.ZodOptional<z.ZodNumber>;
61
+ tokenAddress: z.ZodOptional<z.ZodString>;
62
+ tokenSymbol: z.ZodOptional<z.ZodString>;
63
+ transactionFeeUsd: z.ZodOptional<z.ZodNumber>;
64
+ transactionHash: z.ZodOptional<z.ZodString>;
65
+ transactionValue: z.ZodOptional<z.ZodString>;
66
+ userOpHash: z.ZodOptional<z.ZodString>;
67
+ walletAddress: z.ZodOptional<z.ZodString>;
68
+ walletType: z.ZodOptional<z.ZodString>;
68
69
  }, "strip", z.ZodTypeAny, {
69
- source: string;
70
70
  action: string;
71
+ source: string;
71
72
  errorCode?: string | undefined;
72
73
  clientId?: string | undefined;
73
74
  accountId?: string | undefined;
74
- isClientEvent?: boolean | undefined;
75
+ amountUSDCents?: number | undefined;
76
+ amountWei?: string | undefined;
75
77
  apiKeyId?: string | undefined;
76
- creatorWalletAddress?: string | undefined;
77
- walletAddress?: string | undefined;
78
- walletType?: string | undefined;
78
+ authenticationMethod?: string | undefined;
79
79
  chainId?: number | undefined;
80
- provider?: string | undefined;
81
- mimeType?: string | undefined;
82
- fileSize?: number | undefined;
83
- fileCid?: string | undefined;
80
+ chainName?: string | undefined;
81
+ completionTokens?: number | undefined;
82
+ contractAddress?: string | undefined;
83
+ creatorWalletAddress?: string | undefined;
84
+ dstChainId?: number | undefined;
85
+ dstChainName?: string | undefined;
86
+ dstTokenAddress?: string | undefined;
87
+ dstTokenSymbol?: string | undefined;
88
+ ecosystemId?: string | undefined;
89
+ ecosystemPartnerId?: string | undefined;
84
90
  evmMethod?: string | undefined;
85
- userOpHash?: string | undefined;
91
+ evmRequestParams?: string | undefined;
92
+ extension?: string | undefined;
93
+ fileCid?: string | undefined;
94
+ fileSize?: number | undefined;
95
+ functionName?: string | undefined;
86
96
  gasLimit?: number | undefined;
87
97
  gasPricePerUnit?: string | undefined;
88
- transactionFeeUsd?: number | undefined;
89
- transactionHash?: string | undefined;
90
- sdkName?: string | undefined;
91
- sdkVersion?: string | undefined;
92
- sdkPlatform?: string | undefined;
93
- sdkOS?: string | undefined;
94
- productName?: string | undefined;
95
- transactionValue?: string | undefined;
96
- pathname?: string | undefined;
97
- contractAddress?: string | undefined;
98
+ httpMethod?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "CONNECT" | "OPTIONS" | "TRACE" | undefined;
98
99
  httpStatusCode?: number | undefined;
99
- functionName?: string | undefined;
100
- extension?: string | undefined;
101
- retryCount?: number | undefined;
102
- policyId?: string | undefined;
100
+ isClientEvent?: boolean | undefined;
101
+ mimeType?: string | undefined;
102
+ modelName?: string | undefined;
103
+ msLatency?: number | undefined;
103
104
  msSinceQueue?: number | undefined;
104
105
  msSinceSend?: number | undefined;
105
106
  msTotalDuration?: number | undefined;
106
- swapId?: string | undefined;
107
- tokenAddress?: string | undefined;
108
- amountWei?: string | undefined;
109
- amountUSDCents?: number | undefined;
110
- httpMethod?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "CONNECT" | "OPTIONS" | "TRACE" | undefined;
111
- ecosystemId?: string | undefined;
112
- ecosystemPartnerId?: string | undefined;
113
- authenticationMethod?: string | undefined;
114
- chainName?: string | undefined;
115
- tokenSymbol?: string | undefined;
116
- dstChainId?: number | undefined;
117
- dstTokenAddress?: string | undefined;
118
- dstChainName?: string | undefined;
119
- dstTokenSymbol?: string | undefined;
120
- msLatency?: number | undefined;
121
- toAmountUSDCents?: number | undefined;
122
- secondaryProvider?: string | undefined;
123
107
  onRampId?: string | undefined;
124
- evmRequestParams?: string | undefined;
125
- providerIp?: string | undefined;
108
+ pathname?: string | undefined;
109
+ policyId?: string | undefined;
110
+ productName?: string | undefined;
126
111
  promptTokens?: number | undefined;
127
- completionTokens?: number | undefined;
128
- modelName?: string | undefined;
129
- sessionId?: string | undefined;
112
+ provider?: string | undefined;
113
+ providerIp?: string | undefined;
130
114
  requestId?: string | undefined;
115
+ retryCount?: number | undefined;
116
+ sdkName?: string | undefined;
117
+ sdkOS?: string | undefined;
118
+ sdkPlatform?: string | undefined;
119
+ sdkVersion?: string | undefined;
120
+ secondaryProvider?: string | undefined;
121
+ sessionId?: string | undefined;
122
+ swapId?: string | undefined;
123
+ toAmountUSDCents?: number | undefined;
124
+ tokenAddress?: string | undefined;
125
+ tokenSymbol?: string | undefined;
126
+ transactionFeeUsd?: number | undefined;
127
+ transactionHash?: string | undefined;
128
+ transactionValue?: string | undefined;
129
+ userOpHash?: string | undefined;
130
+ walletAddress?: string | undefined;
131
+ walletType?: string | undefined;
131
132
  }, {
132
- source: string;
133
133
  action: string;
134
+ source: string;
134
135
  errorCode?: string | undefined;
135
136
  clientId?: string | undefined;
136
137
  accountId?: string | undefined;
137
- isClientEvent?: boolean | undefined;
138
+ amountUSDCents?: number | undefined;
139
+ amountWei?: string | undefined;
138
140
  apiKeyId?: string | undefined;
139
- creatorWalletAddress?: string | undefined;
140
- walletAddress?: string | undefined;
141
- walletType?: string | undefined;
141
+ authenticationMethod?: string | undefined;
142
142
  chainId?: number | undefined;
143
- provider?: string | undefined;
144
- mimeType?: string | undefined;
145
- fileSize?: number | undefined;
146
- fileCid?: string | undefined;
143
+ chainName?: string | undefined;
144
+ completionTokens?: number | undefined;
145
+ contractAddress?: string | undefined;
146
+ creatorWalletAddress?: string | undefined;
147
+ dstChainId?: number | undefined;
148
+ dstChainName?: string | undefined;
149
+ dstTokenAddress?: string | undefined;
150
+ dstTokenSymbol?: string | undefined;
151
+ ecosystemId?: string | undefined;
152
+ ecosystemPartnerId?: string | undefined;
147
153
  evmMethod?: string | undefined;
148
- userOpHash?: string | undefined;
154
+ evmRequestParams?: string | undefined;
155
+ extension?: string | undefined;
156
+ fileCid?: string | undefined;
157
+ fileSize?: number | undefined;
158
+ functionName?: string | undefined;
149
159
  gasLimit?: number | undefined;
150
160
  gasPricePerUnit?: string | undefined;
151
- transactionFeeUsd?: number | undefined;
152
- transactionHash?: string | undefined;
153
- sdkName?: string | undefined;
154
- sdkVersion?: string | undefined;
155
- sdkPlatform?: string | undefined;
156
- sdkOS?: string | undefined;
157
- productName?: string | undefined;
158
- transactionValue?: string | undefined;
159
- pathname?: string | undefined;
160
- contractAddress?: string | undefined;
161
+ httpMethod?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "CONNECT" | "OPTIONS" | "TRACE" | undefined;
161
162
  httpStatusCode?: number | undefined;
162
- functionName?: string | undefined;
163
- extension?: string | undefined;
164
- retryCount?: number | undefined;
165
- policyId?: string | undefined;
163
+ isClientEvent?: boolean | undefined;
164
+ mimeType?: string | undefined;
165
+ modelName?: string | undefined;
166
+ msLatency?: number | undefined;
166
167
  msSinceQueue?: number | undefined;
167
168
  msSinceSend?: number | undefined;
168
169
  msTotalDuration?: number | undefined;
169
- swapId?: string | undefined;
170
- tokenAddress?: string | undefined;
171
- amountWei?: string | undefined;
172
- amountUSDCents?: number | undefined;
173
- httpMethod?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "CONNECT" | "OPTIONS" | "TRACE" | undefined;
174
- ecosystemId?: string | undefined;
175
- ecosystemPartnerId?: string | undefined;
176
- authenticationMethod?: string | undefined;
177
- chainName?: string | undefined;
178
- tokenSymbol?: string | undefined;
179
- dstChainId?: number | undefined;
180
- dstTokenAddress?: string | undefined;
181
- dstChainName?: string | undefined;
182
- dstTokenSymbol?: string | undefined;
183
- msLatency?: number | undefined;
184
- toAmountUSDCents?: number | undefined;
185
- secondaryProvider?: string | undefined;
186
170
  onRampId?: string | undefined;
187
- evmRequestParams?: string | undefined;
188
- providerIp?: string | undefined;
171
+ pathname?: string | undefined;
172
+ policyId?: string | undefined;
173
+ productName?: string | undefined;
189
174
  promptTokens?: number | undefined;
190
- completionTokens?: number | undefined;
191
- modelName?: string | undefined;
192
- sessionId?: string | undefined;
175
+ provider?: string | undefined;
176
+ providerIp?: string | undefined;
193
177
  requestId?: string | undefined;
178
+ retryCount?: number | undefined;
179
+ sdkName?: string | undefined;
180
+ sdkOS?: string | undefined;
181
+ sdkPlatform?: string | undefined;
182
+ sdkVersion?: string | undefined;
183
+ secondaryProvider?: string | undefined;
184
+ sessionId?: string | undefined;
185
+ swapId?: string | undefined;
186
+ toAmountUSDCents?: number | undefined;
187
+ tokenAddress?: string | undefined;
188
+ tokenSymbol?: string | undefined;
189
+ transactionFeeUsd?: number | undefined;
190
+ transactionHash?: string | undefined;
191
+ transactionValue?: string | undefined;
192
+ userOpHash?: string | undefined;
193
+ walletAddress?: string | undefined;
194
+ walletType?: string | undefined;
194
195
  }>;
196
+ /** @deprecated - Use UsageV2Event instead */
195
197
  export type UsageEvent = z.infer<typeof usageEventSchema>;
196
198
  //# sourceMappingURL=usage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../../src/core/usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;IAI3B;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2EH,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../../src/core/usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,6CAA6C;AAC7C,eAAO,MAAM,gBAAgB;IAC3B;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6EH,CAAC;AACH,6CAA6C;AAC7C,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}