@capxul/observability 3.1.0 → 4.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.
- package/README.md +7 -0
- package/dist/index.d.mts +642 -2
- package/dist/index.mjs +488 -4
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -71,6 +71,394 @@ Object.fromEntries(SUPPORTED_CURRENCIES.map((currency) => [currency.code, curren
|
|
|
71
71
|
const APP_ID_RE = /^app_[0-7][0-9A-HJKMNP-TV-Z]{25}$/;
|
|
72
72
|
Math.floor(Number.MAX_SAFE_INTEGER / 1e3);
|
|
73
73
|
//#endregion
|
|
74
|
+
//#region src/operations.ts
|
|
75
|
+
const CAPXUL_OPERATIONS = {
|
|
76
|
+
account: {
|
|
77
|
+
addressBook: {
|
|
78
|
+
add: "account.addressBook.add",
|
|
79
|
+
get: "account.addressBook.get",
|
|
80
|
+
hide: "account.addressBook.hide",
|
|
81
|
+
label: "account.addressBook.label",
|
|
82
|
+
list: "account.addressBook.list",
|
|
83
|
+
unhide: "account.addressBook.unhide"
|
|
84
|
+
},
|
|
85
|
+
balance: "account.balance",
|
|
86
|
+
faucetMint: "account.faucetMint",
|
|
87
|
+
getLifecycle: "account.getLifecycle",
|
|
88
|
+
readBalance: "account.readBalance",
|
|
89
|
+
retrySetup: "account.retrySetup",
|
|
90
|
+
status: "account.status",
|
|
91
|
+
profile: {
|
|
92
|
+
depositInstructions: "account.profile.depositInstructions",
|
|
93
|
+
get: "account.profile.get"
|
|
94
|
+
},
|
|
95
|
+
inbox: {
|
|
96
|
+
approve: "account.inbox.approve",
|
|
97
|
+
decline: "account.inbox.decline",
|
|
98
|
+
list: "account.inbox.list"
|
|
99
|
+
},
|
|
100
|
+
requests: {
|
|
101
|
+
cancel: "account.requests.cancel",
|
|
102
|
+
get: "account.requests.get",
|
|
103
|
+
issue: "account.requests.issue",
|
|
104
|
+
list: "account.requests.list"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
accounts: {
|
|
108
|
+
fund: "accounts.fund",
|
|
109
|
+
read: "accounts.read"
|
|
110
|
+
},
|
|
111
|
+
activity: {
|
|
112
|
+
annotate: "activity.annotate",
|
|
113
|
+
get: "activity.get",
|
|
114
|
+
list: "activity.list",
|
|
115
|
+
summary: "activity.summary"
|
|
116
|
+
},
|
|
117
|
+
addressBook: {
|
|
118
|
+
add: "addressBook.add",
|
|
119
|
+
get: "addressBook.get",
|
|
120
|
+
hide: "addressBook.hide",
|
|
121
|
+
label: "addressBook.label",
|
|
122
|
+
list: "addressBook.list",
|
|
123
|
+
unhide: "addressBook.unhide"
|
|
124
|
+
},
|
|
125
|
+
applications: { create: "applications.create" },
|
|
126
|
+
auth: {
|
|
127
|
+
canSendOtp: "auth.canSendOtp",
|
|
128
|
+
getSession: "auth.getSession",
|
|
129
|
+
signIn: "auth.signIn",
|
|
130
|
+
signOut: "auth.signOut",
|
|
131
|
+
sendVerificationOtp: "auth.sendVerificationOTP",
|
|
132
|
+
verifyOtp: "auth.verifyOtp"
|
|
133
|
+
},
|
|
134
|
+
client: {
|
|
135
|
+
createOrg: "createOrg",
|
|
136
|
+
orgs: "orgs"
|
|
137
|
+
},
|
|
138
|
+
credentials: {
|
|
139
|
+
bootstrapClient: "credentials.bootstrapClient",
|
|
140
|
+
mintQuickstartKey: "credentials.mintQuickstartKey"
|
|
141
|
+
},
|
|
142
|
+
currentUser: { get: "currentUser.get" },
|
|
143
|
+
devIdentity: { seedFinancialOpsOrg: "devIdentity.seedFinancialOpsOrg" },
|
|
144
|
+
dev: { browserSeed: "dev.browserSeed" },
|
|
145
|
+
destinations: {
|
|
146
|
+
add: "destinations.add",
|
|
147
|
+
list: "destinations.list",
|
|
148
|
+
remove: "destinations.remove"
|
|
149
|
+
},
|
|
150
|
+
faucetSafe: { deploy: "FaucetSafe.deploy" },
|
|
151
|
+
financialOps: {
|
|
152
|
+
addDestination: "financialOps.addDestination",
|
|
153
|
+
approveRequest: "financialOps.approveRequest",
|
|
154
|
+
cancelRequest: "financialOps.cancelRequest",
|
|
155
|
+
createPayee: "financialOps.createPayee",
|
|
156
|
+
declineRequest: "financialOps.declineRequest",
|
|
157
|
+
emitPaymentWriterTelemetry: "financialOps.emitPaymentWriterTelemetry",
|
|
158
|
+
issueRequest: "financialOps.issueRequest",
|
|
159
|
+
recoverSettlementVerification: "financialOps.recoverSettlementVerification",
|
|
160
|
+
removeDestination: "financialOps.removeDestination",
|
|
161
|
+
verifySettlement: "financialOps.verifySettlement"
|
|
162
|
+
},
|
|
163
|
+
holdings: {
|
|
164
|
+
current: "holdings.current",
|
|
165
|
+
primary: "holdings.primary"
|
|
166
|
+
},
|
|
167
|
+
identity: {
|
|
168
|
+
accountAt: "identity.AccountAt",
|
|
169
|
+
accountClaimed: "identity.AccountClaimed",
|
|
170
|
+
accountClaiming: "identity.AccountClaiming",
|
|
171
|
+
accountDerived: "identity.AccountDerived",
|
|
172
|
+
accountFailed: "identity.AccountFailed",
|
|
173
|
+
attachOrganization: "identity.AttachOrganization",
|
|
174
|
+
claimAccount: "identity.ClaimAccount",
|
|
175
|
+
completeOnboarding: "identity.completeOnboarding",
|
|
176
|
+
completeProfile: "identity.completeProfile",
|
|
177
|
+
create: "identity.create",
|
|
178
|
+
createOrganization: "identity.CreateOrganization",
|
|
179
|
+
ensureAccount: "identity.EnsureAccount",
|
|
180
|
+
leaveOrganization: "identity.LeaveOrganization",
|
|
181
|
+
loadCurrent: "identity.loadCurrent",
|
|
182
|
+
orgAt: "identity.OrgAt",
|
|
183
|
+
orgFailed: "identity.OrgFailed",
|
|
184
|
+
orgReady: "identity.OrgReady",
|
|
185
|
+
otpFailed: "identity.OtpFailed",
|
|
186
|
+
otpSent: "identity.OtpSent",
|
|
187
|
+
readSession: "identity.ReadSession",
|
|
188
|
+
requestOtp: "identity.RequestOtp",
|
|
189
|
+
reset: "identity.Reset",
|
|
190
|
+
restoreSession: "identity.RestoreSession",
|
|
191
|
+
resumeOtpEntry: "identity.ResumeOtpEntry",
|
|
192
|
+
retryAccount: "identity.RetryAccount",
|
|
193
|
+
retryOrganization: "identity.RetryOrganization",
|
|
194
|
+
sessionAbsent: "identity.SessionAbsent",
|
|
195
|
+
sessionRead: "identity.SessionRead",
|
|
196
|
+
sessionReadFailed: "identity.SessionReadFailed",
|
|
197
|
+
sessionRestored: "identity.SessionRestored",
|
|
198
|
+
signedOut: "identity.SignedOut",
|
|
199
|
+
signOut: "identity.SignOut",
|
|
200
|
+
signOutFailed: "identity.SignOutFailed",
|
|
201
|
+
update: "identity.update",
|
|
202
|
+
handleAvailable: "identity.handleAvailable",
|
|
203
|
+
verified: "identity.Verified",
|
|
204
|
+
verifyFailed: "identity.VerifyFailed",
|
|
205
|
+
verifyOtp: "identity.VerifyOtp"
|
|
206
|
+
},
|
|
207
|
+
media: {
|
|
208
|
+
generateUploadUrl: "media.generateUploadUrl",
|
|
209
|
+
setOrgLogo: "media.setOrgLogo",
|
|
210
|
+
setProfileImage: "media.setProfileImage",
|
|
211
|
+
uploadImage: "media.uploadImage"
|
|
212
|
+
},
|
|
213
|
+
me: {
|
|
214
|
+
depositInstructions: "me.depositInstructions",
|
|
215
|
+
get: "me.get"
|
|
216
|
+
},
|
|
217
|
+
moneyExecution: {
|
|
218
|
+
abandonPaymentExecution: "moneyExecution.abandonPaymentExecution",
|
|
219
|
+
prepareOrganizationPaymentExecution: "moneyExecution.prepareOrganizationPaymentExecution",
|
|
220
|
+
preparePaymentExecution: "moneyExecution.preparePaymentExecution",
|
|
221
|
+
preparePaymentLifecycleExecution: "moneyExecution.preparePaymentLifecycleExecution",
|
|
222
|
+
preparePermissionExecution: "moneyExecution.preparePermissionExecution",
|
|
223
|
+
recoverSubmissionClaims: "moneyExecution.recoverSubmissionClaims",
|
|
224
|
+
submit: "moneyExecution.submit",
|
|
225
|
+
submitPaymentCommandExecution: "moneyExecution.submitPaymentCommandExecution",
|
|
226
|
+
submitPaymentExecution: "moneyExecution.submitPaymentExecution",
|
|
227
|
+
submitPermissionExecution: "moneyExecution.submitPermissionExecution"
|
|
228
|
+
},
|
|
229
|
+
movement: {
|
|
230
|
+
emitDepositSettled: "movement.emitDepositSettled",
|
|
231
|
+
scan: "movement.scan"
|
|
232
|
+
},
|
|
233
|
+
inbox: {
|
|
234
|
+
approve: "inbox.approve",
|
|
235
|
+
decline: "inbox.decline",
|
|
236
|
+
list: "inbox.list"
|
|
237
|
+
},
|
|
238
|
+
offramp: {
|
|
239
|
+
quote: "offramp.quote",
|
|
240
|
+
status: "offramp.status"
|
|
241
|
+
},
|
|
242
|
+
onboarding: {
|
|
243
|
+
completeOrganization: "onboarding.completeOrganization",
|
|
244
|
+
completePerson: "onboarding.completePerson"
|
|
245
|
+
},
|
|
246
|
+
org: {
|
|
247
|
+
acceptInvitations: "org.acceptInvitations",
|
|
248
|
+
account: { get: "org.account.get" },
|
|
249
|
+
activateMember: "org.activateMember",
|
|
250
|
+
auditLog: "org.auditLog",
|
|
251
|
+
confirmBootstrap: "org.confirmBootstrap",
|
|
252
|
+
createOrg: "org.createOrg",
|
|
253
|
+
create: "org.create",
|
|
254
|
+
detectAndAcceptPendingInvitations: "org.detectAndAcceptPendingInvitations",
|
|
255
|
+
expireInvitations: "org.expireInvitations",
|
|
256
|
+
getLifecycle: "org.getLifecycle",
|
|
257
|
+
getProofReceipt: "org.getProofReceipt",
|
|
258
|
+
invite: "org.invite",
|
|
259
|
+
inviteMember: "org.inviteMember",
|
|
260
|
+
list: "org.list",
|
|
261
|
+
load: "org.load",
|
|
262
|
+
me: "org.me",
|
|
263
|
+
members: "org.members",
|
|
264
|
+
orgs: "org.orgs",
|
|
265
|
+
payment: "org.payment",
|
|
266
|
+
permissions: {
|
|
267
|
+
assign: "org.permissions.assign",
|
|
268
|
+
change: "org.permissions.change",
|
|
269
|
+
create: "org.permissions.create",
|
|
270
|
+
get: "org.permissions.get",
|
|
271
|
+
list: "org.permissions.list",
|
|
272
|
+
replace: "org.permissions.replace",
|
|
273
|
+
revoke: "org.permissions.revoke"
|
|
274
|
+
},
|
|
275
|
+
payments: {
|
|
276
|
+
pay: "org.payments.pay",
|
|
277
|
+
payBatch: "org.payments.payBatch"
|
|
278
|
+
},
|
|
279
|
+
payroll: {
|
|
280
|
+
authorizeRun: "org.payroll.authorizeRun",
|
|
281
|
+
groups: {
|
|
282
|
+
list: "org.payroll.groups.list",
|
|
283
|
+
remove: "org.payroll.groups.remove",
|
|
284
|
+
save: "org.payroll.groups.save"
|
|
285
|
+
},
|
|
286
|
+
runs: "org.payroll.runs",
|
|
287
|
+
terms: "org.payroll.terms"
|
|
288
|
+
},
|
|
289
|
+
addressBook: {
|
|
290
|
+
add: "org.addressBook.add",
|
|
291
|
+
get: "org.addressBook.get",
|
|
292
|
+
hide: "org.addressBook.hide",
|
|
293
|
+
label: "org.addressBook.label",
|
|
294
|
+
list: "org.addressBook.list",
|
|
295
|
+
unhide: "org.addressBook.unhide"
|
|
296
|
+
},
|
|
297
|
+
inbox: {
|
|
298
|
+
approve: "org.inbox.approve",
|
|
299
|
+
decline: "org.inbox.decline",
|
|
300
|
+
list: "org.inbox.list"
|
|
301
|
+
},
|
|
302
|
+
lifecycle: { startOrResume: "org.lifecycle.startOrResume" },
|
|
303
|
+
prepareBootstrap: "org.prepareBootstrap",
|
|
304
|
+
prepareFounderAccount: "org.prepareFounderAccount",
|
|
305
|
+
profile: {
|
|
306
|
+
depositInstructions: "org.profile.depositInstructions",
|
|
307
|
+
get: "org.profile.get"
|
|
308
|
+
},
|
|
309
|
+
readTreasury: "org.readTreasury",
|
|
310
|
+
requests: {
|
|
311
|
+
cancel: "org.requests.cancel",
|
|
312
|
+
get: "org.requests.get",
|
|
313
|
+
issue: "org.requests.issue",
|
|
314
|
+
list: "org.requests.list"
|
|
315
|
+
},
|
|
316
|
+
recordFailure: "org.recordFailure",
|
|
317
|
+
recordProgress: "org.recordProgress",
|
|
318
|
+
resendInviteToken: "org.resendInviteToken",
|
|
319
|
+
resumeBootstrapSubmission: "org.resumeBootstrapSubmission",
|
|
320
|
+
retry: "org.retry",
|
|
321
|
+
retrySetup: "org.retrySetup",
|
|
322
|
+
roles: "org.roles",
|
|
323
|
+
startOrResume: "org.startOrResume",
|
|
324
|
+
submitBootstrap: "org.submitBootstrap",
|
|
325
|
+
treasury: "org.treasury"
|
|
326
|
+
},
|
|
327
|
+
organization: { setup: "organization.setup" },
|
|
328
|
+
organizationPayments: {
|
|
329
|
+
pay: "organizationPayments.pay",
|
|
330
|
+
payBatch: "organizationPayments.payBatch",
|
|
331
|
+
prepareExecution: "organizationPayments.prepareExecution"
|
|
332
|
+
},
|
|
333
|
+
organizationSetup: { getProofReceipt: "organizationSetup.getProofReceipt" },
|
|
334
|
+
organizations: { detectAndAcceptPendingInvitations: "orgs.detectAndAcceptPendingInvitations" },
|
|
335
|
+
payments: {
|
|
336
|
+
cancel: "payments.cancel",
|
|
337
|
+
claim: "payments.claim",
|
|
338
|
+
createCommitment: "payments.createCommitment",
|
|
339
|
+
get: "payments.get",
|
|
340
|
+
ledger: "payments",
|
|
341
|
+
list: "payments.list",
|
|
342
|
+
pay: "payments.pay",
|
|
343
|
+
prepareExecution: "payments.prepareExecution",
|
|
344
|
+
prepareLifecycleExecution: "payments.prepareLifecycleExecution",
|
|
345
|
+
redirect: "payments.redirect",
|
|
346
|
+
submitCommandExecution: "payments.submitCommandExecution",
|
|
347
|
+
submitExecution: "payments.submitExecution"
|
|
348
|
+
},
|
|
349
|
+
paymentDocuments: {
|
|
350
|
+
render: "paymentDocuments.render",
|
|
351
|
+
verify: "paymentDocuments.verify"
|
|
352
|
+
},
|
|
353
|
+
recipient: { resolve: "recipient.resolve" },
|
|
354
|
+
payroll: {
|
|
355
|
+
authorizeRun: "payroll.authorizeRun",
|
|
356
|
+
groups: {
|
|
357
|
+
access: "payroll.groups",
|
|
358
|
+
list: "payroll.groups.list",
|
|
359
|
+
remove: "payroll.groups.remove",
|
|
360
|
+
save: "payroll.groups.save"
|
|
361
|
+
},
|
|
362
|
+
removeGroup: "payroll.removeGroup",
|
|
363
|
+
runs: "payroll.runs",
|
|
364
|
+
saveGroup: "payroll.saveGroup",
|
|
365
|
+
terms: "payroll.terms"
|
|
366
|
+
},
|
|
367
|
+
permission: {
|
|
368
|
+
command: "permission.command",
|
|
369
|
+
retryVerification: "permission.retryVerification",
|
|
370
|
+
verify: "permission.verify",
|
|
371
|
+
verifySubmitted: "permission.verifySubmitted"
|
|
372
|
+
},
|
|
373
|
+
permissions: {
|
|
374
|
+
assign: "permissions.assign",
|
|
375
|
+
change: "permissions.change",
|
|
376
|
+
create: "permissions.create",
|
|
377
|
+
get: "permissions.get",
|
|
378
|
+
list: "permissions.list",
|
|
379
|
+
prepareExecution: "permissions.prepareExecution",
|
|
380
|
+
replace: "permissions.replace",
|
|
381
|
+
revoke: "permissions.revoke",
|
|
382
|
+
submitExecution: "permissions.submitExecution"
|
|
383
|
+
},
|
|
384
|
+
publishableKeys: {
|
|
385
|
+
mint: "publishableKeys.mint",
|
|
386
|
+
revoke: "publishableKeys.revoke",
|
|
387
|
+
rotate: "publishableKeys.rotate"
|
|
388
|
+
},
|
|
389
|
+
requests: {
|
|
390
|
+
cancel: "requests.cancel",
|
|
391
|
+
get: "requests.get",
|
|
392
|
+
issue: "requests.issue",
|
|
393
|
+
list: "requests.list"
|
|
394
|
+
},
|
|
395
|
+
runtime: {
|
|
396
|
+
assign: "assign",
|
|
397
|
+
canSendOtp: "canSendOtp",
|
|
398
|
+
cancelCommitment: "cancel_commitment",
|
|
399
|
+
change: "change",
|
|
400
|
+
claimCommitment: "claim_commitment",
|
|
401
|
+
create: "create",
|
|
402
|
+
createCapxulClient: "createCapxulClient",
|
|
403
|
+
createCapxulClientWithOrgDeploymentSeams: "createCapxulClientWithOrgDeploymentSeams",
|
|
404
|
+
createCommitment: "create_commitment",
|
|
405
|
+
getConvexJwt: "getConvexJwt",
|
|
406
|
+
getSession: "getSession",
|
|
407
|
+
initialize: "initialize",
|
|
408
|
+
mutation: "mutation",
|
|
409
|
+
now: "now",
|
|
410
|
+
port: "port",
|
|
411
|
+
query: "query",
|
|
412
|
+
redirectCommitment: "redirect_commitment",
|
|
413
|
+
replace: "replace",
|
|
414
|
+
resolve: "resolve",
|
|
415
|
+
revoke: "revoke",
|
|
416
|
+
send: "send",
|
|
417
|
+
sendOtp: "sendOtp",
|
|
418
|
+
signIn: "signIn",
|
|
419
|
+
signOut: "signOut",
|
|
420
|
+
sleep: "sleep",
|
|
421
|
+
verifyOtp: "verifyOtp",
|
|
422
|
+
wallet: "wallet"
|
|
423
|
+
},
|
|
424
|
+
smartAccount: {
|
|
425
|
+
claim: "smartAccount.claim",
|
|
426
|
+
confirmDeployment: "smartAccount.confirmDeployment",
|
|
427
|
+
loadCurrent: "smartAccount.loadCurrent",
|
|
428
|
+
provision: "smartAccount.provision"
|
|
429
|
+
},
|
|
430
|
+
system: {
|
|
431
|
+
health: "system.health",
|
|
432
|
+
ping: "system.ping",
|
|
433
|
+
runtimeChain: "system.runtimeChain"
|
|
434
|
+
},
|
|
435
|
+
testUsdc: { mint: "TestUSDC.mint" },
|
|
436
|
+
_internal: {
|
|
437
|
+
accounts: { fund: "_internal.accounts.fund" },
|
|
438
|
+
close: "_internal.close",
|
|
439
|
+
identity: {
|
|
440
|
+
completeProfile: "_internal.identity.completeProfile",
|
|
441
|
+
runFacade: "_internal.identity.runFacade",
|
|
442
|
+
send: "_internal.identity.send"
|
|
443
|
+
},
|
|
444
|
+
organizationSetup: { getProofReceipt: "_internal.organizationSetup.getProofReceipt" }
|
|
445
|
+
},
|
|
446
|
+
tenancy: {
|
|
447
|
+
revokeBackendTenancyConsent: "tenancy.revokeBackendTenancyConsent",
|
|
448
|
+
seedBackendTenancy: "tenancy.seedBackendTenancy"
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
function collectOperations(tree) {
|
|
452
|
+
return Object.values(tree).flatMap((value) => typeof value === "string" ? [value] : collectOperations(value));
|
|
453
|
+
}
|
|
454
|
+
const operations = new Set(collectOperations(CAPXUL_OPERATIONS));
|
|
455
|
+
function isCapxulOperation(value) {
|
|
456
|
+
return typeof value === "string" && operations.has(value);
|
|
457
|
+
}
|
|
458
|
+
function normalizeCapxulOperation(value) {
|
|
459
|
+
return isCapxulOperation(value) ? value : "unknown";
|
|
460
|
+
}
|
|
461
|
+
//#endregion
|
|
74
462
|
//#region src/index.ts
|
|
75
463
|
const TELEMETRY_EVENT_NAMES = [
|
|
76
464
|
"auth_otp_requested",
|
|
@@ -115,6 +503,8 @@ const TELEMETRY_EVENT_NAMES = [
|
|
|
115
503
|
"payment_settled",
|
|
116
504
|
"payment_failed",
|
|
117
505
|
"payment_verification_retry",
|
|
506
|
+
"payment_lifecycle_transition",
|
|
507
|
+
"quick_pay_external_address_acknowledged",
|
|
118
508
|
"deposit_initiated",
|
|
119
509
|
"deposit_settled",
|
|
120
510
|
"permission_mirror_verification",
|
|
@@ -722,32 +1112,116 @@ const OrgInviteExpiredProps = Schema.Struct({
|
|
|
722
1112
|
role: OptionalString,
|
|
723
1113
|
status: OptionalString
|
|
724
1114
|
});
|
|
1115
|
+
const RecipientLocatorKindSchema = Schema.Literals([
|
|
1116
|
+
"handle",
|
|
1117
|
+
"email",
|
|
1118
|
+
"address",
|
|
1119
|
+
"party"
|
|
1120
|
+
]);
|
|
1121
|
+
const RecipientResolutionStatusSchema = Schema.Literals([
|
|
1122
|
+
"known_party",
|
|
1123
|
+
"new_email",
|
|
1124
|
+
"external_address"
|
|
1125
|
+
]);
|
|
1126
|
+
const RecipientPartyKindSchema = Schema.Literals([
|
|
1127
|
+
"person",
|
|
1128
|
+
"organization",
|
|
1129
|
+
"unresolved"
|
|
1130
|
+
]);
|
|
1131
|
+
const RecipientTelemetryProps = {
|
|
1132
|
+
recipient_locator_kind: Schema.optional(RecipientLocatorKindSchema),
|
|
1133
|
+
recipient_resolution_status: Schema.optional(RecipientResolutionStatusSchema),
|
|
1134
|
+
recipient_party_id: OptionalString,
|
|
1135
|
+
recipient_party_kind: Schema.optional(RecipientPartyKindSchema),
|
|
1136
|
+
recipient_is_capxul_account: Schema.optional(Schema.Boolean),
|
|
1137
|
+
recipient_handle: OptionalString,
|
|
1138
|
+
recipient_address: OptionalAddress,
|
|
1139
|
+
external_address_acknowledged: Schema.optional(Schema.Boolean)
|
|
1140
|
+
};
|
|
725
1141
|
const PaymentInitiatedProps = Schema.Struct({
|
|
1142
|
+
command_id: OptionalString,
|
|
1143
|
+
execution_id: OptionalString,
|
|
1144
|
+
payment_lifecycle_id: OptionalString,
|
|
726
1145
|
...TelemetryEnvelopeProps,
|
|
1146
|
+
...RecipientTelemetryProps,
|
|
727
1147
|
kind: Schema.String,
|
|
728
1148
|
payment_id: Schema.String
|
|
729
1149
|
});
|
|
1150
|
+
const PaymentLifecycleProps = {
|
|
1151
|
+
payment_state: OptionalString,
|
|
1152
|
+
execution_state: OptionalString,
|
|
1153
|
+
occurred_at: Schema.optional(Schema.Number),
|
|
1154
|
+
causal_sequence: Schema.optional(Schema.Number),
|
|
1155
|
+
sponsorship_valid_until: Schema.optional(Schema.Number),
|
|
1156
|
+
terminal_event_id: OptionalString
|
|
1157
|
+
};
|
|
730
1158
|
const PaymentSettledL2Props = Schema.Struct({
|
|
1159
|
+
...PaymentLifecycleProps,
|
|
731
1160
|
...TelemetryEnvelopeProps,
|
|
1161
|
+
...RecipientTelemetryProps,
|
|
732
1162
|
kind: Schema.String,
|
|
733
1163
|
chain_id: Schema.Number,
|
|
734
|
-
settlement_id: Schema.String
|
|
1164
|
+
settlement_id: Schema.String,
|
|
1165
|
+
payment_id: OptionalString,
|
|
1166
|
+
payment_ids: OptionalString,
|
|
1167
|
+
command_id: OptionalString,
|
|
1168
|
+
payment_lifecycle_id: OptionalString,
|
|
1169
|
+
execution_id: OptionalString,
|
|
1170
|
+
user_op_hash: OptionalString,
|
|
1171
|
+
transaction_hash: OptionalString
|
|
735
1172
|
});
|
|
736
1173
|
const PaymentFailedL2Props = Schema.Struct({
|
|
1174
|
+
...PaymentLifecycleProps,
|
|
737
1175
|
...TelemetryEnvelopeProps,
|
|
738
1176
|
...ChainCauseTelemetryProps,
|
|
1177
|
+
...RecipientTelemetryProps,
|
|
739
1178
|
kind: Schema.String,
|
|
740
1179
|
payment_id: Schema.String,
|
|
741
|
-
|
|
1180
|
+
payment_ids: OptionalString,
|
|
1181
|
+
reason_code: Schema.String,
|
|
1182
|
+
command_id: OptionalString,
|
|
1183
|
+
payment_lifecycle_id: OptionalString,
|
|
1184
|
+
execution_id: OptionalString,
|
|
1185
|
+
user_op_hash: OptionalString
|
|
742
1186
|
});
|
|
743
1187
|
const PaymentVerificationRetryProps = Schema.Struct({
|
|
1188
|
+
...PaymentLifecycleProps,
|
|
744
1189
|
...TelemetryEnvelopeProps,
|
|
1190
|
+
...RecipientTelemetryProps,
|
|
745
1191
|
command_id: Schema.String,
|
|
1192
|
+
payment_lifecycle_id: Schema.String,
|
|
746
1193
|
attempt: Schema.Number,
|
|
747
1194
|
reason_code: Schema.String,
|
|
748
1195
|
chain_id: Schema.Number,
|
|
749
1196
|
delay_ms: DurationMsSchema,
|
|
750
|
-
outcome: Schema.Literals(["scheduled", "unresolved"])
|
|
1197
|
+
outcome: Schema.Literals(["scheduled", "unresolved"]),
|
|
1198
|
+
payment_id: OptionalString,
|
|
1199
|
+
payment_ids: OptionalString,
|
|
1200
|
+
execution_id: OptionalString,
|
|
1201
|
+
user_op_hash: OptionalString
|
|
1202
|
+
});
|
|
1203
|
+
const PaymentLifecycleTransitionProps = Schema.Struct({
|
|
1204
|
+
...TelemetryEnvelopeProps,
|
|
1205
|
+
...RecipientTelemetryProps,
|
|
1206
|
+
payment_id: Schema.String,
|
|
1207
|
+
payment_lifecycle_id: Schema.String,
|
|
1208
|
+
command_id: Schema.String,
|
|
1209
|
+
payment_state: Schema.String,
|
|
1210
|
+
occurred_at: Schema.Number,
|
|
1211
|
+
causal_sequence: Schema.Number,
|
|
1212
|
+
execution_id: OptionalString,
|
|
1213
|
+
execution_state: OptionalString,
|
|
1214
|
+
user_op_hash: OptionalString,
|
|
1215
|
+
sponsorship_valid_until: Schema.optional(Schema.Number),
|
|
1216
|
+
reason_code: OptionalString
|
|
1217
|
+
});
|
|
1218
|
+
const QuickPayExternalAddressAcknowledgedProps = Schema.Struct({
|
|
1219
|
+
...TelemetryEnvelopeProps,
|
|
1220
|
+
recipient_locator_kind: Schema.Literal("address"),
|
|
1221
|
+
recipient_resolution_status: Schema.Literal("external_address"),
|
|
1222
|
+
recipient_address: AddressSchema,
|
|
1223
|
+
external_address_acknowledged: Schema.Literal(true),
|
|
1224
|
+
organization_id: OptionalOrgId
|
|
751
1225
|
});
|
|
752
1226
|
const DepositInitiatedProps = Schema.Struct({ ...TelemetryEnvelopeProps });
|
|
753
1227
|
const DepositSettledProps = Schema.Struct({
|
|
@@ -955,6 +1429,14 @@ const PaymentVerificationRetryTelemetryEventSchema = Schema.Struct({
|
|
|
955
1429
|
name: Schema.Literal("payment_verification_retry"),
|
|
956
1430
|
props: PaymentVerificationRetryProps
|
|
957
1431
|
});
|
|
1432
|
+
const PaymentLifecycleTransitionTelemetryEventSchema = Schema.Struct({
|
|
1433
|
+
name: Schema.Literal("payment_lifecycle_transition"),
|
|
1434
|
+
props: PaymentLifecycleTransitionProps
|
|
1435
|
+
});
|
|
1436
|
+
const QuickPayExternalAddressAcknowledgedTelemetryEventSchema = Schema.Struct({
|
|
1437
|
+
name: Schema.Literal("quick_pay_external_address_acknowledged"),
|
|
1438
|
+
props: QuickPayExternalAddressAcknowledgedProps
|
|
1439
|
+
});
|
|
958
1440
|
const DepositInitiatedTelemetryEventSchema = Schema.Struct({
|
|
959
1441
|
name: Schema.Literal("deposit_initiated"),
|
|
960
1442
|
props: DepositInitiatedProps
|
|
@@ -1022,6 +1504,8 @@ const TELEMETRY_EVENT_SCHEMAS = {
|
|
|
1022
1504
|
payment_settled: PaymentSettledTelemetryEventSchema,
|
|
1023
1505
|
payment_failed: PaymentFailedTelemetryEventSchema,
|
|
1024
1506
|
payment_verification_retry: PaymentVerificationRetryTelemetryEventSchema,
|
|
1507
|
+
payment_lifecycle_transition: PaymentLifecycleTransitionTelemetryEventSchema,
|
|
1508
|
+
quick_pay_external_address_acknowledged: QuickPayExternalAddressAcknowledgedTelemetryEventSchema,
|
|
1025
1509
|
deposit_initiated: DepositInitiatedTelemetryEventSchema,
|
|
1026
1510
|
deposit_settled: DepositSettledTelemetryEventSchema,
|
|
1027
1511
|
permission_mirror_verification: PermissionMirrorVerificationTelemetryEventSchema,
|
|
@@ -1618,4 +2102,4 @@ function rotr(value, bits) {
|
|
|
1618
2102
|
return value >>> bits | value << 32 - bits;
|
|
1619
2103
|
}
|
|
1620
2104
|
//#endregion
|
|
1621
|
-
export { AccountBalanceFailedTelemetryEventSchema, AccountBalanceReadTelemetryEventSchema, AuthFailedTelemetryEventSchema, AuthOtpDeliveredTelemetryEventSchema, AuthOtpExpiredTelemetryEventSchema, AuthOtpRequestedTelemetryEventSchema, AuthSignedOutTelemetryEventSchema, AuthVerifiedTelemetryEventSchema, BROWSER_GATED_TELEMETRY_EVENTS, BootstrapFailedTelemetryEventSchema, BootstrapResolvedTelemetryEventSchema, BundlerErrorTelemetryEventSchema, CAPXUL_ENVS, CONTRACT_FIRST_TELEMETRY_EVENTS, ChainAttemptSchema, ChainUpstreamFallbackTelemetryEventSchema, ChainUpstreamSchema, DepositInitiatedTelemetryEventSchema, DepositSettledTelemetryEventSchema, FINANCIAL_OPS_TARGET_TELEMETRY_PRODUCERS, FailureModeSchema, FaucetConfirmedTelemetryEventSchema, FaucetFailedTelemetryEventSchema, FaucetRequestedTelemetryEventSchema, InMemoryTelemetryBusAdapter, MemberActivationFailedTelemetryEventSchema, MemberActivationReadyTelemetryEventSchema, MemberActivationStartedTelemetryEventSchema, MovementScanCheckpointTelemetryEventSchema, MovementScanIncidentTelemetryEventSchema, MovementScanWindowTelemetryEventSchema, OnboardingDashboardReachedTelemetryEventSchema, OnboardingIntentSelectedTelemetryEventSchema, OnboardingOrganizationSubmittedTelemetryEventSchema, OnboardingProfileSubmittedTelemetryEventSchema, OperationRetriedTelemetryEventSchema, OrgCreateFailedTelemetryEventSchema, OrgCreateStartedTelemetryEventSchema, OrgCreatedTelemetryEventSchema, OrgInviteAcceptedTelemetryEventSchema, OrgInviteExpiredTelemetryEventSchema, OrgInviteSentTelemetryEventSchema, OrgRolesSeededTelemetryEventSchema, OrgSafeConfirmedTelemetryEventSchema, OrgSafeCreatedTelemetryEventSchema, OrganizationCreationFailedTelemetryEventSchema, OrganizationCreationReadyTelemetryEventSchema, OrganizationCreationStartedTelemetryEventSchema, PII, PRODUCT_MAPPER_GATED_TELEMETRY_EVENTS, PaymentFailedTelemetryEventSchema, PaymentInitiatedTelemetryEventSchema, PaymentSettledTelemetryEventSchema, PaymentVerificationRetryTelemetryEventSchema, PermissionMirrorVerificationTelemetryEventSchema, PostHogTelemetryAdapter, ProvisioningSafeConfirmedTelemetryEventSchema, ProvisioningSafeCreatedTelemetryEventSchema, ReceiptPendingTelemetryEventSchema, RecordingTelemetryAdapter, ResponseHeadersSchema, SYNCABLE_CAPXUL_ENVS, TELEMETRY_EVENT_NAMES, TELEMETRY_EVENT_SCHEMAS, TELEMETRY_JOURNEYS, TELEMETRY_PRODUCERS, createCapxulBeforeSend, createPostHogBrowserPageviewTracker, getTrackHandler, initializeCapxulBrowserAnalytics, initializePostHogBrowserAnalytics, maskCapturedNetworkRequest, productAppAnalytics, redactTelemetryEvent, redactTelemetryProps, sanitizePostHogBrowserEvent, setTrackHandler, stampTelemetryEnvelope, track, utilityAppAnalytics };
|
|
2105
|
+
export { AccountBalanceFailedTelemetryEventSchema, AccountBalanceReadTelemetryEventSchema, AuthFailedTelemetryEventSchema, AuthOtpDeliveredTelemetryEventSchema, AuthOtpExpiredTelemetryEventSchema, AuthOtpRequestedTelemetryEventSchema, AuthSignedOutTelemetryEventSchema, AuthVerifiedTelemetryEventSchema, BROWSER_GATED_TELEMETRY_EVENTS, BootstrapFailedTelemetryEventSchema, BootstrapResolvedTelemetryEventSchema, BundlerErrorTelemetryEventSchema, CAPXUL_ENVS, CAPXUL_OPERATIONS, CONTRACT_FIRST_TELEMETRY_EVENTS, ChainAttemptSchema, ChainUpstreamFallbackTelemetryEventSchema, ChainUpstreamSchema, DepositInitiatedTelemetryEventSchema, DepositSettledTelemetryEventSchema, FINANCIAL_OPS_TARGET_TELEMETRY_PRODUCERS, FailureModeSchema, FaucetConfirmedTelemetryEventSchema, FaucetFailedTelemetryEventSchema, FaucetRequestedTelemetryEventSchema, InMemoryTelemetryBusAdapter, MemberActivationFailedTelemetryEventSchema, MemberActivationReadyTelemetryEventSchema, MemberActivationStartedTelemetryEventSchema, MovementScanCheckpointTelemetryEventSchema, MovementScanIncidentTelemetryEventSchema, MovementScanWindowTelemetryEventSchema, OnboardingDashboardReachedTelemetryEventSchema, OnboardingIntentSelectedTelemetryEventSchema, OnboardingOrganizationSubmittedTelemetryEventSchema, OnboardingProfileSubmittedTelemetryEventSchema, OperationRetriedTelemetryEventSchema, OrgCreateFailedTelemetryEventSchema, OrgCreateStartedTelemetryEventSchema, OrgCreatedTelemetryEventSchema, OrgInviteAcceptedTelemetryEventSchema, OrgInviteExpiredTelemetryEventSchema, OrgInviteSentTelemetryEventSchema, OrgRolesSeededTelemetryEventSchema, OrgSafeConfirmedTelemetryEventSchema, OrgSafeCreatedTelemetryEventSchema, OrganizationCreationFailedTelemetryEventSchema, OrganizationCreationReadyTelemetryEventSchema, OrganizationCreationStartedTelemetryEventSchema, PII, PRODUCT_MAPPER_GATED_TELEMETRY_EVENTS, PaymentFailedTelemetryEventSchema, PaymentInitiatedTelemetryEventSchema, PaymentLifecycleTransitionTelemetryEventSchema, PaymentSettledTelemetryEventSchema, PaymentVerificationRetryTelemetryEventSchema, PermissionMirrorVerificationTelemetryEventSchema, PostHogTelemetryAdapter, ProvisioningSafeConfirmedTelemetryEventSchema, ProvisioningSafeCreatedTelemetryEventSchema, QuickPayExternalAddressAcknowledgedTelemetryEventSchema, ReceiptPendingTelemetryEventSchema, RecordingTelemetryAdapter, ResponseHeadersSchema, SYNCABLE_CAPXUL_ENVS, TELEMETRY_EVENT_NAMES, TELEMETRY_EVENT_SCHEMAS, TELEMETRY_JOURNEYS, TELEMETRY_PRODUCERS, createCapxulBeforeSend, createPostHogBrowserPageviewTracker, getTrackHandler, initializeCapxulBrowserAnalytics, initializePostHogBrowserAnalytics, isCapxulOperation, maskCapturedNetworkRequest, normalizeCapxulOperation, productAppAnalytics, redactTelemetryEvent, redactTelemetryProps, sanitizePostHogBrowserEvent, setTrackHandler, stampTelemetryEnvelope, track, utilityAppAnalytics };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capxul/observability",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.0",
|
|
38
38
|
"vite-plus": "0.3.0",
|
|
39
39
|
"vitest": "4.1.11",
|
|
40
|
-
"@capxul/errors": "0.
|
|
41
|
-
"@capxul/types": "0.
|
|
40
|
+
"@capxul/errors": "0.3.0",
|
|
41
|
+
"@capxul/types": "0.3.0",
|
|
42
42
|
"@capxul/typescript-config": "0.0.0"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|