@classytic/revenue 2.0.1 → 2.1.3
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/CHANGELOG.md +66 -0
- package/README.md +33 -10
- package/dist/bank-feed-BlQeq2rK.mjs +133 -0
- package/dist/bank-feed.enums-BadqNJTC.d.mts +118 -0
- package/dist/bank-feed.enums-kYTLTTbe.mjs +165 -0
- package/dist/bridges/index.d.mts +1 -1
- package/dist/core/state-machines.d.mts +25 -2
- package/dist/core/state-machines.mjs +43 -3
- package/dist/engine-types-Jctrbasz.d.mts +1160 -0
- package/dist/enums/index.d.mts +4 -3
- package/dist/enums/index.mjs +4 -3
- package/dist/{errors-DHa8JVQ-.mjs → errors-LYYg9wcs.mjs} +23 -1
- package/dist/{escrow.schema-D5X32LwX.d.mts → escrow.schema-YuBgjL-I.d.mts} +27 -27
- package/dist/{event-constants-CEMitnIV.mjs → event-constants-Dn1TKahe.mjs} +6 -0
- package/dist/events/index.d.mts +2 -2
- package/dist/events/index.mjs +3 -3
- package/dist/index.d.mts +32 -13
- package/dist/index.mjs +142 -19
- package/dist/providers/index.d.mts +2 -2
- package/dist/providers/index.mjs +2 -2
- package/dist/registry-h8sasoLh.d.mts +145 -0
- package/dist/repositories/create-repositories.d.mts +1 -1
- package/dist/repositories/create-repositories.mjs +1 -1
- package/dist/{revenue-bridges-sdlrR85c.d.mts → revenue-bridges-BtkWFsJu.d.mts} +107 -1
- package/dist/{revenue-event-catalog-LqxPnsU_.mjs → revenue-event-catalog-BvjNVnPd.mjs} +77 -3
- package/dist/{revenue-event-catalog-BX3g7RUi.d.mts → revenue-event-catalog-JpJcyK1E.d.mts} +198 -2
- package/dist/settlement.repository-BAdc9qGl.mjs +1444 -0
- package/dist/shared/index.d.mts +1 -1
- package/dist/shared/index.mjs +2 -2
- package/dist/{subscription.enums-tfoAgsTv.mjs → subscription.enums-95othr0i.mjs} +1 -40
- package/dist/{transaction.enums-u4MshXcL.d.mts → subscription.enums-k24kLpF7.d.mts} +1 -36
- package/dist/validators/index.d.mts +158 -2
- package/dist/validators/index.mjs +95 -2
- package/package.json +7 -7
- package/dist/engine-types-CcjIb4Fy.d.mts +0 -611
- package/dist/registry-DhFMsSn5.mjs +0 -150
- package/dist/registry-SvIGPAx_.d.mts +0 -143
- package/dist/settlement.repository-DHIPx5S4.mjs +0 -771
- /package/dist/{audit-B39B0Sdq.mjs → audit-Ba2XB2C4.mjs} +0 -0
- /package/dist/{audit-DZ0eTr9g.d.mts → audit-DRKuLBFO.d.mts} +0 -0
- /package/dist/{context-DRqSeTPM.d.mts → context-pjP1QeE3.d.mts} +0 -0
- /package/dist/{escrow.schema-BBv9oVEW.mjs → escrow.schema-C-b41z_G.mjs} +0 -0
- /package/dist/{monetization.enums-BtiU3t8o.mjs → monetization.enums-B9HBOecd.mjs} +0 -0
- /package/dist/{monetization.enums-D2xbxXJM.d.mts → monetization.enums-DzAI4sT7.d.mts} +0 -0
- /package/dist/{splits-BAfY-a9P.mjs → splits-CNfQj92L.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as REVENUE_EVENTS } from "./event-constants-
|
|
1
|
+
import { t as REVENUE_EVENTS } from "./event-constants-Dn1TKahe.mjs";
|
|
2
2
|
import { createEvent, matchEventPattern } from "@classytic/primitives/events";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
@@ -225,6 +225,44 @@ const webhookProcessedSchema = z.object({
|
|
|
225
225
|
event: z.record(z.string(), z.unknown()),
|
|
226
226
|
transaction: transactionRef.optional()
|
|
227
227
|
});
|
|
228
|
+
const transactionImportedSchema = z.object({
|
|
229
|
+
transaction: transactionRef,
|
|
230
|
+
source: z.string(),
|
|
231
|
+
bankAccountId: z.string(),
|
|
232
|
+
externalId: z.string()
|
|
233
|
+
});
|
|
234
|
+
const transactionMatchedSchema = z.object({
|
|
235
|
+
transaction: transactionRef,
|
|
236
|
+
mapping: z.object({
|
|
237
|
+
debitAccount: z.string().optional(),
|
|
238
|
+
creditAccount: z.string().optional(),
|
|
239
|
+
notes: z.string().optional()
|
|
240
|
+
}).passthrough(),
|
|
241
|
+
relatedTransactionId: z.string().optional(),
|
|
242
|
+
matchedBy: z.string().optional()
|
|
243
|
+
});
|
|
244
|
+
const transactionUnmatchedSchema = z.object({
|
|
245
|
+
transaction: transactionRef,
|
|
246
|
+
unmatchedBy: z.string().optional()
|
|
247
|
+
});
|
|
248
|
+
const transactionJournalizedSchema = z.object({
|
|
249
|
+
transaction: transactionRef,
|
|
250
|
+
journalEntryRef: z.object({
|
|
251
|
+
type: z.string(),
|
|
252
|
+
id: z.string()
|
|
253
|
+
}),
|
|
254
|
+
journalizedBy: z.string().optional()
|
|
255
|
+
});
|
|
256
|
+
const transactionRejectedSchema = z.object({
|
|
257
|
+
transaction: transactionRef,
|
|
258
|
+
reason: z.string().min(1),
|
|
259
|
+
rejectedBy: z.string().optional()
|
|
260
|
+
});
|
|
261
|
+
const transactionRemovedByFeedSchema = z.object({
|
|
262
|
+
transaction: transactionRef,
|
|
263
|
+
source: z.string(),
|
|
264
|
+
externalId: z.string()
|
|
265
|
+
});
|
|
228
266
|
const PaymentVerified = defineRevenueEvent({
|
|
229
267
|
name: REVENUE_EVENTS.PAYMENT_VERIFIED,
|
|
230
268
|
description: "A payment transaction was verified by its provider.",
|
|
@@ -350,6 +388,36 @@ const WebhookProcessed = defineRevenueEvent({
|
|
|
350
388
|
description: "A provider webhook was processed by the revenue engine.",
|
|
351
389
|
zodSchema: webhookProcessedSchema
|
|
352
390
|
});
|
|
391
|
+
const TransactionImported = defineRevenueEvent({
|
|
392
|
+
name: REVENUE_EVENTS.TRANSACTION_IMPORTED,
|
|
393
|
+
description: "A bank-feed / accounting-feed row was imported.",
|
|
394
|
+
zodSchema: transactionImportedSchema
|
|
395
|
+
});
|
|
396
|
+
const TransactionMatched = defineRevenueEvent({
|
|
397
|
+
name: REVENUE_EVENTS.TRANSACTION_MATCHED,
|
|
398
|
+
description: "A bank-feed / manual transaction was matched to GL accounts (and optionally to an upstream payment-flow row).",
|
|
399
|
+
zodSchema: transactionMatchedSchema
|
|
400
|
+
});
|
|
401
|
+
const TransactionUnmatched = defineRevenueEvent({
|
|
402
|
+
name: REVENUE_EVENTS.TRANSACTION_UNMATCHED,
|
|
403
|
+
description: "A previously-matched bank-feed transaction was reverted to the imported state.",
|
|
404
|
+
zodSchema: transactionUnmatchedSchema
|
|
405
|
+
});
|
|
406
|
+
const TransactionJournalized = defineRevenueEvent({
|
|
407
|
+
name: REVENUE_EVENTS.TRANSACTION_JOURNALIZED,
|
|
408
|
+
description: "A bank-feed / manual transaction was journalized — the host LedgerBridge produced a journal entry.",
|
|
409
|
+
zodSchema: transactionJournalizedSchema
|
|
410
|
+
});
|
|
411
|
+
const TransactionRejected = defineRevenueEvent({
|
|
412
|
+
name: REVENUE_EVENTS.TRANSACTION_REJECTED,
|
|
413
|
+
description: "A bank-feed / manual transaction was rejected (operator skip — typically a duplicate / non-cash entry).",
|
|
414
|
+
zodSchema: transactionRejectedSchema
|
|
415
|
+
});
|
|
416
|
+
const TransactionRemovedByFeed = defineRevenueEvent({
|
|
417
|
+
name: REVENUE_EVENTS.TRANSACTION_REMOVED_BY_FEED,
|
|
418
|
+
description: "The upstream feed retracted a previously-imported row (Plaid `removed[]`, OFX correction). The row is soft-deleted.",
|
|
419
|
+
zodSchema: transactionRemovedByFeedSchema
|
|
420
|
+
});
|
|
353
421
|
/**
|
|
354
422
|
* Every revenue event defined in the package — pass to Arc's
|
|
355
423
|
* `EventRegistry`. Hosts wire ONE array; the whole `revenue:*` namespace
|
|
@@ -381,8 +449,14 @@ const revenueEventDefinitions = [
|
|
|
381
449
|
SettlementProcessing,
|
|
382
450
|
SettlementCompleted,
|
|
383
451
|
SettlementFailed,
|
|
384
|
-
WebhookProcessed
|
|
452
|
+
WebhookProcessed,
|
|
453
|
+
TransactionImported,
|
|
454
|
+
TransactionMatched,
|
|
455
|
+
TransactionUnmatched,
|
|
456
|
+
TransactionJournalized,
|
|
457
|
+
TransactionRejected,
|
|
458
|
+
TransactionRemovedByFeed
|
|
385
459
|
];
|
|
386
460
|
|
|
387
461
|
//#endregion
|
|
388
|
-
export { SubscriptionResumed as C,
|
|
462
|
+
export { TransactionUpdated as A, SubscriptionResumed as C, TransactionRejected as D, TransactionMatched as E, revenueEventDefinitions as M, InProcessRevenueBus as N, TransactionRemovedByFeed as O, SubscriptionRenewed as S, TransactionJournalized as T, SettlementScheduled as _, FreeCreated as a, SubscriptionCreated as b, PaymentProcessing as c, PaymentVerified as d, PurchaseCreated as f, SettlementProcessing as g, SettlementFailed as h, EscrowSplit as i, WebhookProcessed as j, TransactionUnmatched as k, PaymentRefunded as l, SettlementCreated as m, EscrowHeld as n, MonetizationCreated as o, SettlementCompleted as p, EscrowReleased as r, PaymentFailed as s, EscrowCancelled as t, PaymentRequiresAction as u, SubscriptionActivated as v, TransactionImported as w, SubscriptionPaused as x, SubscriptionCancelled as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as RevenueContext } from "./context-
|
|
1
|
+
import { t as RevenueContext } from "./context-pjP1QeE3.mjs";
|
|
2
2
|
import { DomainEvent, EventHandler, EventMeta, EventTransport } from "@classytic/primitives/events";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
@@ -39,6 +39,12 @@ declare const REVENUE_EVENTS: {
|
|
|
39
39
|
readonly SUBSCRIPTION_PAUSED: "revenue:subscription.paused";
|
|
40
40
|
readonly SUBSCRIPTION_RESUMED: "revenue:subscription.resumed";
|
|
41
41
|
readonly TRANSACTION_UPDATED: "revenue:transaction.updated";
|
|
42
|
+
readonly TRANSACTION_IMPORTED: "revenue:transaction.imported";
|
|
43
|
+
readonly TRANSACTION_MATCHED: "revenue:transaction.matched";
|
|
44
|
+
readonly TRANSACTION_UNMATCHED: "revenue:transaction.unmatched";
|
|
45
|
+
readonly TRANSACTION_JOURNALIZED: "revenue:transaction.journalized";
|
|
46
|
+
readonly TRANSACTION_REJECTED: "revenue:transaction.rejected";
|
|
47
|
+
readonly TRANSACTION_REMOVED_BY_FEED: "revenue:transaction.removed_by_feed";
|
|
42
48
|
readonly ESCROW_HELD: "revenue:escrow.held";
|
|
43
49
|
readonly ESCROW_RELEASED: "revenue:escrow.released";
|
|
44
50
|
readonly ESCROW_CANCELLED: "revenue:escrow.cancelled";
|
|
@@ -430,6 +436,98 @@ declare const webhookProcessedSchema: z.ZodObject<{
|
|
|
430
436
|
}, z.core.$strip>>;
|
|
431
437
|
}, z.core.$loose>>;
|
|
432
438
|
}, z.core.$strip>;
|
|
439
|
+
declare const transactionImportedSchema: z.ZodObject<{
|
|
440
|
+
transaction: z.ZodObject<{
|
|
441
|
+
_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodAny]>>;
|
|
442
|
+
publicId: z.ZodOptional<z.ZodString>;
|
|
443
|
+
status: z.ZodOptional<z.ZodString>;
|
|
444
|
+
monetizationType: z.ZodOptional<z.ZodString>;
|
|
445
|
+
amount: z.ZodOptional<z.ZodObject<{
|
|
446
|
+
amount: z.ZodNumber;
|
|
447
|
+
currency: z.ZodString;
|
|
448
|
+
}, z.core.$strip>>;
|
|
449
|
+
}, z.core.$loose>;
|
|
450
|
+
source: z.ZodString;
|
|
451
|
+
bankAccountId: z.ZodString;
|
|
452
|
+
externalId: z.ZodString;
|
|
453
|
+
}, z.core.$strip>;
|
|
454
|
+
declare const transactionMatchedSchema: z.ZodObject<{
|
|
455
|
+
transaction: z.ZodObject<{
|
|
456
|
+
_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodAny]>>;
|
|
457
|
+
publicId: z.ZodOptional<z.ZodString>;
|
|
458
|
+
status: z.ZodOptional<z.ZodString>;
|
|
459
|
+
monetizationType: z.ZodOptional<z.ZodString>;
|
|
460
|
+
amount: z.ZodOptional<z.ZodObject<{
|
|
461
|
+
amount: z.ZodNumber;
|
|
462
|
+
currency: z.ZodString;
|
|
463
|
+
}, z.core.$strip>>;
|
|
464
|
+
}, z.core.$loose>;
|
|
465
|
+
mapping: z.ZodObject<{
|
|
466
|
+
debitAccount: z.ZodOptional<z.ZodString>;
|
|
467
|
+
creditAccount: z.ZodOptional<z.ZodString>;
|
|
468
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
469
|
+
}, z.core.$loose>;
|
|
470
|
+
relatedTransactionId: z.ZodOptional<z.ZodString>;
|
|
471
|
+
matchedBy: z.ZodOptional<z.ZodString>;
|
|
472
|
+
}, z.core.$strip>;
|
|
473
|
+
declare const transactionUnmatchedSchema: z.ZodObject<{
|
|
474
|
+
transaction: z.ZodObject<{
|
|
475
|
+
_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodAny]>>;
|
|
476
|
+
publicId: z.ZodOptional<z.ZodString>;
|
|
477
|
+
status: z.ZodOptional<z.ZodString>;
|
|
478
|
+
monetizationType: z.ZodOptional<z.ZodString>;
|
|
479
|
+
amount: z.ZodOptional<z.ZodObject<{
|
|
480
|
+
amount: z.ZodNumber;
|
|
481
|
+
currency: z.ZodString;
|
|
482
|
+
}, z.core.$strip>>;
|
|
483
|
+
}, z.core.$loose>;
|
|
484
|
+
unmatchedBy: z.ZodOptional<z.ZodString>;
|
|
485
|
+
}, z.core.$strip>;
|
|
486
|
+
declare const transactionJournalizedSchema: z.ZodObject<{
|
|
487
|
+
transaction: z.ZodObject<{
|
|
488
|
+
_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodAny]>>;
|
|
489
|
+
publicId: z.ZodOptional<z.ZodString>;
|
|
490
|
+
status: z.ZodOptional<z.ZodString>;
|
|
491
|
+
monetizationType: z.ZodOptional<z.ZodString>;
|
|
492
|
+
amount: z.ZodOptional<z.ZodObject<{
|
|
493
|
+
amount: z.ZodNumber;
|
|
494
|
+
currency: z.ZodString;
|
|
495
|
+
}, z.core.$strip>>;
|
|
496
|
+
}, z.core.$loose>;
|
|
497
|
+
journalEntryRef: z.ZodObject<{
|
|
498
|
+
type: z.ZodString;
|
|
499
|
+
id: z.ZodString;
|
|
500
|
+
}, z.core.$strip>;
|
|
501
|
+
journalizedBy: z.ZodOptional<z.ZodString>;
|
|
502
|
+
}, z.core.$strip>;
|
|
503
|
+
declare const transactionRejectedSchema: z.ZodObject<{
|
|
504
|
+
transaction: z.ZodObject<{
|
|
505
|
+
_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodAny]>>;
|
|
506
|
+
publicId: z.ZodOptional<z.ZodString>;
|
|
507
|
+
status: z.ZodOptional<z.ZodString>;
|
|
508
|
+
monetizationType: z.ZodOptional<z.ZodString>;
|
|
509
|
+
amount: z.ZodOptional<z.ZodObject<{
|
|
510
|
+
amount: z.ZodNumber;
|
|
511
|
+
currency: z.ZodString;
|
|
512
|
+
}, z.core.$strip>>;
|
|
513
|
+
}, z.core.$loose>;
|
|
514
|
+
reason: z.ZodString;
|
|
515
|
+
rejectedBy: z.ZodOptional<z.ZodString>;
|
|
516
|
+
}, z.core.$strip>;
|
|
517
|
+
declare const transactionRemovedByFeedSchema: z.ZodObject<{
|
|
518
|
+
transaction: z.ZodObject<{
|
|
519
|
+
_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodAny]>>;
|
|
520
|
+
publicId: z.ZodOptional<z.ZodString>;
|
|
521
|
+
status: z.ZodOptional<z.ZodString>;
|
|
522
|
+
monetizationType: z.ZodOptional<z.ZodString>;
|
|
523
|
+
amount: z.ZodOptional<z.ZodObject<{
|
|
524
|
+
amount: z.ZodNumber;
|
|
525
|
+
currency: z.ZodString;
|
|
526
|
+
}, z.core.$strip>>;
|
|
527
|
+
}, z.core.$loose>;
|
|
528
|
+
source: z.ZodString;
|
|
529
|
+
externalId: z.ZodString;
|
|
530
|
+
}, z.core.$strip>;
|
|
433
531
|
type PaymentVerifiedPayload = z.infer<typeof paymentVerifiedSchema>;
|
|
434
532
|
type PaymentFailedPayload = z.infer<typeof paymentFailedSchema>;
|
|
435
533
|
type PaymentProcessingPayload = z.infer<typeof paymentProcessingSchema>;
|
|
@@ -455,6 +553,12 @@ type SettlementProcessingPayload = z.infer<typeof settlementProcessingSchema>;
|
|
|
455
553
|
type SettlementCompletedPayload = z.infer<typeof settlementCompletedSchema>;
|
|
456
554
|
type SettlementFailedPayload = z.infer<typeof settlementFailedSchema>;
|
|
457
555
|
type WebhookProcessedPayload = z.infer<typeof webhookProcessedSchema>;
|
|
556
|
+
type TransactionImportedPayload = z.infer<typeof transactionImportedSchema>;
|
|
557
|
+
type TransactionMatchedPayload = z.infer<typeof transactionMatchedSchema>;
|
|
558
|
+
type TransactionUnmatchedPayload = z.infer<typeof transactionUnmatchedSchema>;
|
|
559
|
+
type TransactionJournalizedPayload = z.infer<typeof transactionJournalizedSchema>;
|
|
560
|
+
type TransactionRejectedPayload = z.infer<typeof transactionRejectedSchema>;
|
|
561
|
+
type TransactionRemovedByFeedPayload = z.infer<typeof transactionRemovedByFeedSchema>;
|
|
458
562
|
declare const PaymentVerified: RevenueEventDefinition<z.ZodObject<{
|
|
459
563
|
transaction: z.ZodObject<{
|
|
460
564
|
_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodAny]>>;
|
|
@@ -812,6 +916,98 @@ declare const WebhookProcessed: RevenueEventDefinition<z.ZodObject<{
|
|
|
812
916
|
}, z.core.$strip>>;
|
|
813
917
|
}, z.core.$loose>>;
|
|
814
918
|
}, z.core.$strip>>;
|
|
919
|
+
declare const TransactionImported: RevenueEventDefinition<z.ZodObject<{
|
|
920
|
+
transaction: z.ZodObject<{
|
|
921
|
+
_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodAny]>>;
|
|
922
|
+
publicId: z.ZodOptional<z.ZodString>;
|
|
923
|
+
status: z.ZodOptional<z.ZodString>;
|
|
924
|
+
monetizationType: z.ZodOptional<z.ZodString>;
|
|
925
|
+
amount: z.ZodOptional<z.ZodObject<{
|
|
926
|
+
amount: z.ZodNumber;
|
|
927
|
+
currency: z.ZodString;
|
|
928
|
+
}, z.core.$strip>>;
|
|
929
|
+
}, z.core.$loose>;
|
|
930
|
+
source: z.ZodString;
|
|
931
|
+
bankAccountId: z.ZodString;
|
|
932
|
+
externalId: z.ZodString;
|
|
933
|
+
}, z.core.$strip>>;
|
|
934
|
+
declare const TransactionMatched: RevenueEventDefinition<z.ZodObject<{
|
|
935
|
+
transaction: z.ZodObject<{
|
|
936
|
+
_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodAny]>>;
|
|
937
|
+
publicId: z.ZodOptional<z.ZodString>;
|
|
938
|
+
status: z.ZodOptional<z.ZodString>;
|
|
939
|
+
monetizationType: z.ZodOptional<z.ZodString>;
|
|
940
|
+
amount: z.ZodOptional<z.ZodObject<{
|
|
941
|
+
amount: z.ZodNumber;
|
|
942
|
+
currency: z.ZodString;
|
|
943
|
+
}, z.core.$strip>>;
|
|
944
|
+
}, z.core.$loose>;
|
|
945
|
+
mapping: z.ZodObject<{
|
|
946
|
+
debitAccount: z.ZodOptional<z.ZodString>;
|
|
947
|
+
creditAccount: z.ZodOptional<z.ZodString>;
|
|
948
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
949
|
+
}, z.core.$loose>;
|
|
950
|
+
relatedTransactionId: z.ZodOptional<z.ZodString>;
|
|
951
|
+
matchedBy: z.ZodOptional<z.ZodString>;
|
|
952
|
+
}, z.core.$strip>>;
|
|
953
|
+
declare const TransactionUnmatched: RevenueEventDefinition<z.ZodObject<{
|
|
954
|
+
transaction: z.ZodObject<{
|
|
955
|
+
_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodAny]>>;
|
|
956
|
+
publicId: z.ZodOptional<z.ZodString>;
|
|
957
|
+
status: z.ZodOptional<z.ZodString>;
|
|
958
|
+
monetizationType: z.ZodOptional<z.ZodString>;
|
|
959
|
+
amount: z.ZodOptional<z.ZodObject<{
|
|
960
|
+
amount: z.ZodNumber;
|
|
961
|
+
currency: z.ZodString;
|
|
962
|
+
}, z.core.$strip>>;
|
|
963
|
+
}, z.core.$loose>;
|
|
964
|
+
unmatchedBy: z.ZodOptional<z.ZodString>;
|
|
965
|
+
}, z.core.$strip>>;
|
|
966
|
+
declare const TransactionJournalized: RevenueEventDefinition<z.ZodObject<{
|
|
967
|
+
transaction: z.ZodObject<{
|
|
968
|
+
_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodAny]>>;
|
|
969
|
+
publicId: z.ZodOptional<z.ZodString>;
|
|
970
|
+
status: z.ZodOptional<z.ZodString>;
|
|
971
|
+
monetizationType: z.ZodOptional<z.ZodString>;
|
|
972
|
+
amount: z.ZodOptional<z.ZodObject<{
|
|
973
|
+
amount: z.ZodNumber;
|
|
974
|
+
currency: z.ZodString;
|
|
975
|
+
}, z.core.$strip>>;
|
|
976
|
+
}, z.core.$loose>;
|
|
977
|
+
journalEntryRef: z.ZodObject<{
|
|
978
|
+
type: z.ZodString;
|
|
979
|
+
id: z.ZodString;
|
|
980
|
+
}, z.core.$strip>;
|
|
981
|
+
journalizedBy: z.ZodOptional<z.ZodString>;
|
|
982
|
+
}, z.core.$strip>>;
|
|
983
|
+
declare const TransactionRejected: RevenueEventDefinition<z.ZodObject<{
|
|
984
|
+
transaction: z.ZodObject<{
|
|
985
|
+
_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodAny]>>;
|
|
986
|
+
publicId: z.ZodOptional<z.ZodString>;
|
|
987
|
+
status: z.ZodOptional<z.ZodString>;
|
|
988
|
+
monetizationType: z.ZodOptional<z.ZodString>;
|
|
989
|
+
amount: z.ZodOptional<z.ZodObject<{
|
|
990
|
+
amount: z.ZodNumber;
|
|
991
|
+
currency: z.ZodString;
|
|
992
|
+
}, z.core.$strip>>;
|
|
993
|
+
}, z.core.$loose>;
|
|
994
|
+
reason: z.ZodString;
|
|
995
|
+
rejectedBy: z.ZodOptional<z.ZodString>;
|
|
996
|
+
}, z.core.$strip>>;
|
|
997
|
+
declare const TransactionRemovedByFeed: RevenueEventDefinition<z.ZodObject<{
|
|
998
|
+
transaction: z.ZodObject<{
|
|
999
|
+
_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodAny]>>;
|
|
1000
|
+
publicId: z.ZodOptional<z.ZodString>;
|
|
1001
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1002
|
+
monetizationType: z.ZodOptional<z.ZodString>;
|
|
1003
|
+
amount: z.ZodOptional<z.ZodObject<{
|
|
1004
|
+
amount: z.ZodNumber;
|
|
1005
|
+
currency: z.ZodString;
|
|
1006
|
+
}, z.core.$strip>>;
|
|
1007
|
+
}, z.core.$loose>;
|
|
1008
|
+
source: z.ZodString;
|
|
1009
|
+
externalId: z.ZodString;
|
|
1010
|
+
}, z.core.$strip>>;
|
|
815
1011
|
/**
|
|
816
1012
|
* Every revenue event defined in the package — pass to Arc's
|
|
817
1013
|
* `EventRegistry`. Hosts wire ONE array; the whole `revenue:*` namespace
|
|
@@ -820,4 +1016,4 @@ declare const WebhookProcessed: RevenueEventDefinition<z.ZodObject<{
|
|
|
820
1016
|
*/
|
|
821
1017
|
declare const revenueEventDefinitions: ReadonlyArray<RevenueEventDefinition>;
|
|
822
1018
|
//#endregion
|
|
823
|
-
export {
|
|
1019
|
+
export { TransactionJournalizedPayload as $, SettlementCreated as A, SubscriptionCancelled as B, PurchaseCreated as C, RevenueEventSchema as D, RevenueEventPayloadOf as E, SettlementProcessingPayload as F, SubscriptionPausedPayload as G, SubscriptionCreated as H, SettlementScheduled as I, SubscriptionResumed as J, SubscriptionRenewed as K, SettlementScheduledPayload as L, SettlementFailed as M, SettlementFailedPayload as N, SettlementCompleted as O, SettlementProcessing as P, TransactionJournalized as Q, SubscriptionActivated as R, PaymentVerifiedPayload as S, RevenueEventDefinition as T, SubscriptionCreatedPayload as U, SubscriptionCancelledPayload as V, SubscriptionPaused as W, TransactionImported as X, SubscriptionResumedPayload as Y, TransactionImportedPayload as Z, PaymentRefunded as _, InProcessRevenueBusOptions as _t, EscrowReleased as a, TransactionRemovedByFeedPayload as at, PaymentRequiresActionPayload as b, EscrowSplitPayload as c, TransactionUpdated as ct, MonetizationCreated as d, WebhookProcessedPayload as dt, TransactionMatched as et, MonetizationCreatedPayload as f, revenueEventDefinitions as ft, PaymentProcessingPayload as g, InProcessRevenueBus as gt, PaymentProcessing as h, createEvent$1 as ht, EscrowHeldPayload as i, TransactionRemovedByFeed as it, SettlementCreatedPayload as j, SettlementCompletedPayload as k, FreeCreated as l, TransactionUpdatedPayload as lt, PaymentFailedPayload as m, RevenueEventName as mt, EscrowCancelledPayload as n, TransactionRejected as nt, EscrowReleasedPayload as o, TransactionUnmatched as ot, PaymentFailed as p, REVENUE_EVENTS as pt, SubscriptionRenewedPayload as q, EscrowHeld as r, TransactionRejectedPayload as rt, EscrowSplit as s, TransactionUnmatchedPayload as st, EscrowCancelled as t, TransactionMatchedPayload as tt, FreeCreatedPayload as u, WebhookProcessed as ut, PaymentRefundedPayload as v, PurchaseCreatedPayload as w, PaymentVerified as x, PaymentRequiresAction as y, SubscriptionActivatedPayload as z };
|