@happyvertical/smrt-affiliates 0.39.2 → 0.39.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.
@@ -1,1968 +1,11 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "timestamp": 1783741823928,
3
+ "timestamp": 1783786943421,
4
4
  "packageName": "@happyvertical/smrt-affiliates",
5
- "packageVersion": "0.39.2",
6
- "objects": {
7
- "@happyvertical/smrt-affiliates:CommissionCollection": {
8
- "name": "commissioncollection",
9
- "className": "CommissionCollection",
10
- "qualifiedName": "@happyvertical/smrt-affiliates:CommissionCollection",
11
- "collection": "commissions",
12
- "filePath": "/home/runner/_work/smrt/smrt/packages/affiliates/src/collections/CommissionCollection.ts",
13
- "packageName": "@happyvertical/smrt-affiliates",
14
- "fields": {},
15
- "methods": {
16
- "findByPartner": {
17
- "name": "findByPartner",
18
- "async": true,
19
- "parameters": [
20
- {
21
- "name": "partnerId",
22
- "type": "string",
23
- "optional": false
24
- }
25
- ],
26
- "returnType": "Promise<Commission[]>",
27
- "isStatic": false,
28
- "isPublic": true
29
- },
30
- "findByEvent": {
31
- "name": "findByEvent",
32
- "async": true,
33
- "parameters": [
34
- {
35
- "name": "eventId",
36
- "type": "string",
37
- "optional": false
38
- }
39
- ],
40
- "returnType": "Promise<Commission[]>",
41
- "isStatic": false,
42
- "isPublic": true
43
- },
44
- "findByPayout": {
45
- "name": "findByPayout",
46
- "async": true,
47
- "parameters": [
48
- {
49
- "name": "payoutId",
50
- "type": "string",
51
- "optional": false
52
- }
53
- ],
54
- "returnType": "Promise<Commission[]>",
55
- "isStatic": false,
56
- "isPublic": true
57
- },
58
- "findByStatus": {
59
- "name": "findByStatus",
60
- "async": true,
61
- "parameters": [
62
- {
63
- "name": "status",
64
- "type": "CommissionStatus",
65
- "optional": false
66
- }
67
- ],
68
- "returnType": "Promise<Commission[]>",
69
- "isStatic": false,
70
- "isPublic": true
71
- },
72
- "findPending": {
73
- "name": "findPending",
74
- "async": true,
75
- "parameters": [],
76
- "returnType": "Promise<Commission[]>",
77
- "isStatic": false,
78
- "isPublic": true
79
- },
80
- "findPendingByPartner": {
81
- "name": "findPendingByPartner",
82
- "async": true,
83
- "parameters": [
84
- {
85
- "name": "partnerId",
86
- "type": "string",
87
- "optional": false
88
- }
89
- ],
90
- "returnType": "Promise<Commission[]>",
91
- "isStatic": false,
92
- "isPublic": true
93
- },
94
- "findByType": {
95
- "name": "findByType",
96
- "async": true,
97
- "parameters": [
98
- {
99
- "name": "commissionType",
100
- "type": "CommissionType",
101
- "optional": false
102
- }
103
- ],
104
- "returnType": "Promise<Commission[]>",
105
- "isStatic": false,
106
- "isPublic": true
107
- },
108
- "findByDateRange": {
109
- "name": "findByDateRange",
110
- "async": true,
111
- "parameters": [
112
- {
113
- "name": "start",
114
- "type": "Date",
115
- "optional": false
116
- },
117
- {
118
- "name": "end",
119
- "type": "Date",
120
- "optional": false
121
- }
122
- ],
123
- "returnType": "Promise<Commission[]>",
124
- "isStatic": false,
125
- "isPublic": true
126
- },
127
- "findByPartnerAndDateRange": {
128
- "name": "findByPartnerAndDateRange",
129
- "async": true,
130
- "parameters": [
131
- {
132
- "name": "partnerId",
133
- "type": "string",
134
- "optional": false
135
- },
136
- {
137
- "name": "start",
138
- "type": "Date",
139
- "optional": false
140
- },
141
- {
142
- "name": "end",
143
- "type": "Date",
144
- "optional": false
145
- }
146
- ],
147
- "returnType": "Promise<Commission[]>",
148
- "isStatic": false,
149
- "isPublic": true
150
- },
151
- "findByNetwork": {
152
- "name": "findByNetwork",
153
- "async": true,
154
- "parameters": [
155
- {
156
- "name": "networkId",
157
- "type": "string",
158
- "optional": false
159
- }
160
- ],
161
- "returnType": "Promise<Commission[]>",
162
- "isStatic": false,
163
- "isPublic": true
164
- },
165
- "findByNetworkAndType": {
166
- "name": "findByNetworkAndType",
167
- "async": true,
168
- "parameters": [
169
- {
170
- "name": "networkId",
171
- "type": "string",
172
- "optional": false
173
- },
174
- {
175
- "name": "commissionType",
176
- "type": "CommissionType",
177
- "optional": false
178
- }
179
- ],
180
- "returnType": "Promise<Commission[]>",
181
- "isStatic": false,
182
- "isPublic": true
183
- },
184
- "findPendingByNetwork": {
185
- "name": "findPendingByNetwork",
186
- "async": true,
187
- "parameters": [
188
- {
189
- "name": "networkId",
190
- "type": "string",
191
- "optional": false
192
- }
193
- ],
194
- "returnType": "Promise<Commission[]>",
195
- "isStatic": false,
196
- "isPublic": true
197
- },
198
- "getSummaryByNetwork": {
199
- "name": "getSummaryByNetwork",
200
- "async": true,
201
- "parameters": [
202
- {
203
- "name": "networkId",
204
- "type": "string",
205
- "optional": false
206
- },
207
- {
208
- "name": "options",
209
- "type": "object",
210
- "optional": true
211
- }
212
- ],
213
- "returnType": "Promise<object>",
214
- "isStatic": false,
215
- "isPublic": true
216
- },
217
- "getPendingPayoutsByNetwork": {
218
- "name": "getPendingPayoutsByNetwork",
219
- "async": true,
220
- "parameters": [
221
- {
222
- "name": "networkId",
223
- "type": "string",
224
- "optional": false
225
- }
226
- ],
227
- "returnType": "Promise<Array<object>>",
228
- "isStatic": false,
229
- "isPublic": true
230
- },
231
- "sumPendingByPartner": {
232
- "name": "sumPendingByPartner",
233
- "async": true,
234
- "parameters": [
235
- {
236
- "name": "partnerId",
237
- "type": "string",
238
- "optional": false
239
- }
240
- ],
241
- "returnType": "Promise<number>",
242
- "isStatic": false,
243
- "isPublic": true
244
- },
245
- "sumByPartnerAndType": {
246
- "name": "sumByPartnerAndType",
247
- "async": true,
248
- "parameters": [
249
- {
250
- "name": "partnerId",
251
- "type": "string",
252
- "optional": false
253
- },
254
- {
255
- "name": "commissionType",
256
- "type": "CommissionType",
257
- "optional": false
258
- }
259
- ],
260
- "returnType": "Promise<number>",
261
- "isStatic": false,
262
- "isPublic": true
263
- },
264
- "getEarningsBreakdown": {
265
- "name": "getEarningsBreakdown",
266
- "async": true,
267
- "parameters": [
268
- {
269
- "name": "partnerId",
270
- "type": "string",
271
- "optional": false
272
- }
273
- ],
274
- "returnType": "Promise<object>",
275
- "isStatic": false,
276
- "isPublic": true
277
- },
278
- "getPendingBreakdown": {
279
- "name": "getPendingBreakdown",
280
- "async": true,
281
- "parameters": [
282
- {
283
- "name": "partnerId",
284
- "type": "string",
285
- "optional": false
286
- }
287
- ],
288
- "returnType": "Promise<object>",
289
- "isStatic": false,
290
- "isPublic": true
291
- }
292
- },
293
- "decoratorConfig": {},
294
- "extends": "SmrtCollection",
295
- "extendsTypeArg": "Commission",
296
- "exportName": "CommissionCollection",
297
- "collectionExportName": "CommissionCollectionCollection",
298
- "schema": {
299
- "tableName": "commission_collections",
300
- "ddl": "CREATE TABLE IF NOT EXISTS \"commission_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
301
- "columns": {
302
- "id": {
303
- "type": "UUID",
304
- "primaryKey": true,
305
- "referenceKind": "id",
306
- "notNull": true
307
- },
308
- "slug": {
309
- "type": "TEXT",
310
- "notNull": true
311
- },
312
- "context": {
313
- "type": "TEXT",
314
- "notNull": true,
315
- "default": ""
316
- },
317
- "created_at": {
318
- "type": "TIMESTAMP",
319
- "notNull": true,
320
- "default": "current_timestamp"
321
- },
322
- "updated_at": {
323
- "type": "TIMESTAMP",
324
- "notNull": true,
325
- "default": "current_timestamp"
326
- }
327
- },
328
- "indexes": [
329
- {
330
- "name": "commission_collections_id_idx",
331
- "columns": [
332
- "id"
333
- ]
334
- },
335
- {
336
- "name": "commission_collections_slug_context_idx",
337
- "columns": [
338
- "slug",
339
- "context"
340
- ],
341
- "unique": true
342
- }
343
- ],
344
- "version": "0ebca899"
345
- }
346
- },
347
- "@happyvertical/smrt-affiliates:PartnerCollection": {
348
- "name": "partnercollection",
349
- "className": "PartnerCollection",
350
- "qualifiedName": "@happyvertical/smrt-affiliates:PartnerCollection",
351
- "collection": "partners",
352
- "filePath": "/home/runner/_work/smrt/smrt/packages/affiliates/src/collections/PartnerCollection.ts",
353
- "packageName": "@happyvertical/smrt-affiliates",
354
- "fields": {},
355
- "methods": {
356
- "findByProfile": {
357
- "name": "findByProfile",
358
- "async": true,
359
- "parameters": [
360
- {
361
- "name": "profileId",
362
- "type": "string",
363
- "optional": false
364
- }
365
- ],
366
- "returnType": "Promise<Partner[]>",
367
- "isStatic": false,
368
- "isPublic": true
369
- },
370
- "findByProperty": {
371
- "name": "findByProperty",
372
- "async": true,
373
- "parameters": [
374
- {
375
- "name": "propertyId",
376
- "type": "string",
377
- "optional": false
378
- }
379
- ],
380
- "returnType": "Promise<Partner | null>",
381
- "isStatic": false,
382
- "isPublic": true
383
- },
384
- "findByParent": {
385
- "name": "findByParent",
386
- "async": true,
387
- "parameters": [
388
- {
389
- "name": "parentPartnerId",
390
- "type": "string",
391
- "optional": false
392
- }
393
- ],
394
- "returnType": "Promise<Partner[]>",
395
- "isStatic": false,
396
- "isPublic": true
397
- },
398
- "findByReferrer": {
399
- "name": "findByReferrer",
400
- "async": true,
401
- "parameters": [
402
- {
403
- "name": "referredById",
404
- "type": "string",
405
- "optional": false
406
- }
407
- ],
408
- "returnType": "Promise<Partner[]>",
409
- "isStatic": false,
410
- "isPublic": true
411
- },
412
- "findByStatus": {
413
- "name": "findByStatus",
414
- "async": true,
415
- "parameters": [
416
- {
417
- "name": "status",
418
- "type": "PartnerStatus",
419
- "optional": false
420
- }
421
- ],
422
- "returnType": "Promise<Partner[]>",
423
- "isStatic": false,
424
- "isPublic": true
425
- },
426
- "findActive": {
427
- "name": "findActive",
428
- "async": true,
429
- "parameters": [],
430
- "returnType": "Promise<Partner[]>",
431
- "isStatic": false,
432
- "isPublic": true
433
- },
434
- "findPending": {
435
- "name": "findPending",
436
- "async": true,
437
- "parameters": [],
438
- "returnType": "Promise<Partner[]>",
439
- "isStatic": false,
440
- "isPublic": true
441
- },
442
- "findSuspended": {
443
- "name": "findSuspended",
444
- "async": true,
445
- "parameters": [],
446
- "returnType": "Promise<Partner[]>",
447
- "isStatic": false,
448
- "isPublic": true
449
- },
450
- "findByType": {
451
- "name": "findByType",
452
- "async": true,
453
- "parameters": [
454
- {
455
- "name": "type",
456
- "type": "PartnerType",
457
- "optional": false
458
- }
459
- ],
460
- "returnType": "Promise<Partner[]>",
461
- "isStatic": false,
462
- "isPublic": true
463
- },
464
- "findPublishers": {
465
- "name": "findPublishers",
466
- "async": true,
467
- "parameters": [],
468
- "returnType": "Promise<Partner[]>",
469
- "isStatic": false,
470
- "isPublic": true
471
- },
472
- "findSalespeople": {
473
- "name": "findSalespeople",
474
- "async": true,
475
- "parameters": [],
476
- "returnType": "Promise<Partner[]>",
477
- "isStatic": false,
478
- "isPublic": true
479
- },
480
- "findReferrers": {
481
- "name": "findReferrers",
482
- "async": true,
483
- "parameters": [],
484
- "returnType": "Promise<Partner[]>",
485
- "isStatic": false,
486
- "isPublic": true
487
- },
488
- "findActivePublishers": {
489
- "name": "findActivePublishers",
490
- "async": true,
491
- "parameters": [],
492
- "returnType": "Promise<Partner[]>",
493
- "isStatic": false,
494
- "isPublic": true
495
- },
496
- "findActiveByProperty": {
497
- "name": "findActiveByProperty",
498
- "async": true,
499
- "parameters": [
500
- {
501
- "name": "propertyId",
502
- "type": "string",
503
- "optional": false
504
- }
505
- ],
506
- "returnType": "Promise<Partner | null>",
507
- "isStatic": false,
508
- "isPublic": true
509
- },
510
- "findEligibleForPayout": {
511
- "name": "findEligibleForPayout",
512
- "async": true,
513
- "parameters": [],
514
- "returnType": "Promise<Partner[]>",
515
- "isStatic": false,
516
- "isPublic": true
517
- }
518
- },
519
- "decoratorConfig": {},
520
- "extends": "SmrtCollection",
521
- "extendsTypeArg": "Partner",
522
- "exportName": "PartnerCollection",
523
- "collectionExportName": "PartnerCollectionCollection",
524
- "schema": {
525
- "tableName": "partner_collections",
526
- "ddl": "CREATE TABLE IF NOT EXISTS \"partner_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
527
- "columns": {
528
- "id": {
529
- "type": "UUID",
530
- "primaryKey": true,
531
- "referenceKind": "id",
532
- "notNull": true
533
- },
534
- "slug": {
535
- "type": "TEXT",
536
- "notNull": true
537
- },
538
- "context": {
539
- "type": "TEXT",
540
- "notNull": true,
541
- "default": ""
542
- },
543
- "created_at": {
544
- "type": "TIMESTAMP",
545
- "notNull": true,
546
- "default": "current_timestamp"
547
- },
548
- "updated_at": {
549
- "type": "TIMESTAMP",
550
- "notNull": true,
551
- "default": "current_timestamp"
552
- }
553
- },
554
- "indexes": [
555
- {
556
- "name": "partner_collections_id_idx",
557
- "columns": [
558
- "id"
559
- ]
560
- },
561
- {
562
- "name": "partner_collections_slug_context_idx",
563
- "columns": [
564
- "slug",
565
- "context"
566
- ],
567
- "unique": true
568
- }
569
- ],
570
- "version": "d0bfd8cf"
571
- }
572
- },
573
- "@happyvertical/smrt-affiliates:PayoutCollection": {
574
- "name": "payoutcollection",
575
- "className": "PayoutCollection",
576
- "qualifiedName": "@happyvertical/smrt-affiliates:PayoutCollection",
577
- "collection": "payouts",
578
- "filePath": "/home/runner/_work/smrt/smrt/packages/affiliates/src/collections/PayoutCollection.ts",
579
- "packageName": "@happyvertical/smrt-affiliates",
580
- "fields": {},
581
- "methods": {
582
- "findByPartner": {
583
- "name": "findByPartner",
584
- "async": true,
585
- "parameters": [
586
- {
587
- "name": "partnerId",
588
- "type": "string",
589
- "optional": false
590
- }
591
- ],
592
- "returnType": "Promise<Payout[]>",
593
- "isStatic": false,
594
- "isPublic": true
595
- },
596
- "findByStatus": {
597
- "name": "findByStatus",
598
- "async": true,
599
- "parameters": [
600
- {
601
- "name": "status",
602
- "type": "PayoutStatus",
603
- "optional": false
604
- }
605
- ],
606
- "returnType": "Promise<Payout[]>",
607
- "isStatic": false,
608
- "isPublic": true
609
- },
610
- "findPending": {
611
- "name": "findPending",
612
- "async": true,
613
- "parameters": [],
614
- "returnType": "Promise<Payout[]>",
615
- "isStatic": false,
616
- "isPublic": true
617
- },
618
- "findApproved": {
619
- "name": "findApproved",
620
- "async": true,
621
- "parameters": [],
622
- "returnType": "Promise<Payout[]>",
623
- "isStatic": false,
624
- "isPublic": true
625
- },
626
- "findProcessing": {
627
- "name": "findProcessing",
628
- "async": true,
629
- "parameters": [],
630
- "returnType": "Promise<Payout[]>",
631
- "isStatic": false,
632
- "isPublic": true
633
- },
634
- "findCompleted": {
635
- "name": "findCompleted",
636
- "async": true,
637
- "parameters": [],
638
- "returnType": "Promise<Payout[]>",
639
- "isStatic": false,
640
- "isPublic": true
641
- },
642
- "findFailed": {
643
- "name": "findFailed",
644
- "async": true,
645
- "parameters": [],
646
- "returnType": "Promise<Payout[]>",
647
- "isStatic": false,
648
- "isPublic": true
649
- },
650
- "findByInvoice": {
651
- "name": "findByInvoice",
652
- "async": true,
653
- "parameters": [
654
- {
655
- "name": "invoiceId",
656
- "type": "string",
657
- "optional": false
658
- }
659
- ],
660
- "returnType": "Promise<Payout[]>",
661
- "isStatic": false,
662
- "isPublic": true
663
- },
664
- "findByPeriod": {
665
- "name": "findByPeriod",
666
- "async": true,
667
- "parameters": [
668
- {
669
- "name": "start",
670
- "type": "Date",
671
- "optional": false
672
- },
673
- {
674
- "name": "end",
675
- "type": "Date",
676
- "optional": false
677
- }
678
- ],
679
- "returnType": "Promise<Payout[]>",
680
- "isStatic": false,
681
- "isPublic": true
682
- },
683
- "findByPartnerAndStatus": {
684
- "name": "findByPartnerAndStatus",
685
- "async": true,
686
- "parameters": [
687
- {
688
- "name": "partnerId",
689
- "type": "string",
690
- "optional": false
691
- },
692
- {
693
- "name": "status",
694
- "type": "PayoutStatus",
695
- "optional": false
696
- }
697
- ],
698
- "returnType": "Promise<Payout[]>",
699
- "isStatic": false,
700
- "isPublic": true
701
- },
702
- "findPendingByPartner": {
703
- "name": "findPendingByPartner",
704
- "async": true,
705
- "parameters": [
706
- {
707
- "name": "partnerId",
708
- "type": "string",
709
- "optional": false
710
- }
711
- ],
712
- "returnType": "Promise<Payout[]>",
713
- "isStatic": false,
714
- "isPublic": true
715
- },
716
- "findCompletedByPartner": {
717
- "name": "findCompletedByPartner",
718
- "async": true,
719
- "parameters": [
720
- {
721
- "name": "partnerId",
722
- "type": "string",
723
- "optional": false
724
- }
725
- ],
726
- "returnType": "Promise<Payout[]>",
727
- "isStatic": false,
728
- "isPublic": true
729
- },
730
- "sumPaidByPartner": {
731
- "name": "sumPaidByPartner",
732
- "async": true,
733
- "parameters": [
734
- {
735
- "name": "partnerId",
736
- "type": "string",
737
- "optional": false
738
- }
739
- ],
740
- "returnType": "Promise<number>",
741
- "isStatic": false,
742
- "isPublic": true
743
- },
744
- "sumPendingByPartner": {
745
- "name": "sumPendingByPartner",
746
- "async": true,
747
- "parameters": [
748
- {
749
- "name": "partnerId",
750
- "type": "string",
751
- "optional": false
752
- }
753
- ],
754
- "returnType": "Promise<number>",
755
- "isStatic": false,
756
- "isPublic": true
757
- },
758
- "findLatestByPartner": {
759
- "name": "findLatestByPartner",
760
- "async": true,
761
- "parameters": [
762
- {
763
- "name": "partnerId",
764
- "type": "string",
765
- "optional": false
766
- }
767
- ],
768
- "returnType": "Promise<Payout | null>",
769
- "isStatic": false,
770
- "isPublic": true
771
- },
772
- "getStats": {
773
- "name": "getStats",
774
- "async": true,
775
- "parameters": [],
776
- "returnType": "Promise<object>",
777
- "isStatic": false,
778
- "isPublic": true
779
- }
780
- },
781
- "decoratorConfig": {},
782
- "extends": "SmrtCollection",
783
- "extendsTypeArg": "Payout",
784
- "exportName": "PayoutCollection",
785
- "collectionExportName": "PayoutCollectionCollection",
786
- "schema": {
787
- "tableName": "payout_collections",
788
- "ddl": "CREATE TABLE IF NOT EXISTS \"payout_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
789
- "columns": {
790
- "id": {
791
- "type": "UUID",
792
- "primaryKey": true,
793
- "referenceKind": "id",
794
- "notNull": true
795
- },
796
- "slug": {
797
- "type": "TEXT",
798
- "notNull": true
799
- },
800
- "context": {
801
- "type": "TEXT",
802
- "notNull": true,
803
- "default": ""
804
- },
805
- "created_at": {
806
- "type": "TIMESTAMP",
807
- "notNull": true,
808
- "default": "current_timestamp"
809
- },
810
- "updated_at": {
811
- "type": "TIMESTAMP",
812
- "notNull": true,
813
- "default": "current_timestamp"
814
- }
815
- },
816
- "indexes": [
817
- {
818
- "name": "payout_collections_id_idx",
819
- "columns": [
820
- "id"
821
- ]
822
- },
823
- {
824
- "name": "payout_collections_slug_context_idx",
825
- "columns": [
826
- "slug",
827
- "context"
828
- ],
829
- "unique": true
830
- }
831
- ],
832
- "version": "79c6b841"
833
- }
834
- },
835
- "@happyvertical/smrt-affiliates:Commission": {
836
- "name": "commission",
837
- "className": "Commission",
838
- "qualifiedName": "@happyvertical/smrt-affiliates:Commission",
839
- "collection": "commissions",
840
- "filePath": "/home/runner/_work/smrt/smrt/packages/affiliates/src/models/Commission.ts",
841
- "packageName": "@happyvertical/smrt-affiliates",
842
- "fields": {
843
- "eventId": {
844
- "type": "crossPackageRef",
845
- "required": false,
846
- "related": "@happyvertical/smrt-ads:AdEvent"
847
- },
848
- "partnerId": {
849
- "type": "foreignKey",
850
- "required": false,
851
- "related": "Partner"
852
- },
853
- "commissionType": {
854
- "type": "text",
855
- "required": false
856
- },
857
- "grossRevenue": {
858
- "type": "integer",
859
- "required": false,
860
- "default": 0
861
- },
862
- "commissionRate": {
863
- "type": "integer",
864
- "required": false,
865
- "default": 0
866
- },
867
- "commissionAmount": {
868
- "type": "integer",
869
- "required": false,
870
- "default": 0
871
- },
872
- "currency": {
873
- "type": "text",
874
- "required": false,
875
- "default": "CAD"
876
- },
877
- "payoutId": {
878
- "type": "foreignKey",
879
- "required": false,
880
- "related": "Payout"
881
- },
882
- "status": {
883
- "type": "text",
884
- "required": false
885
- },
886
- "eventTimestamp": {
887
- "type": "datetime",
888
- "required": false
889
- },
890
- "networkId": {
891
- "type": "text",
892
- "required": false,
893
- "default": ""
894
- },
895
- "siteId": {
896
- "type": "text",
897
- "required": false,
898
- "default": ""
899
- },
900
- "campaignId": {
901
- "type": "text",
902
- "required": false,
903
- "default": ""
904
- },
905
- "metadata": {
906
- "type": "text",
907
- "required": false,
908
- "default": ""
909
- }
910
- },
911
- "methods": {
912
- "calculateAmount": {
913
- "name": "calculateAmount",
914
- "async": false,
915
- "parameters": [
916
- {
917
- "name": "grossRevenue",
918
- "type": "number",
919
- "optional": false
920
- },
921
- {
922
- "name": "rate",
923
- "type": "number",
924
- "optional": false
925
- }
926
- ],
927
- "returnType": "number",
928
- "isStatic": true,
929
- "isPublic": true
930
- },
931
- "isPending": {
932
- "name": "isPending",
933
- "async": false,
934
- "parameters": [],
935
- "returnType": "boolean",
936
- "isStatic": false,
937
- "isPublic": true
938
- },
939
- "isIncluded": {
940
- "name": "isIncluded",
941
- "async": false,
942
- "parameters": [],
943
- "returnType": "boolean",
944
- "isStatic": false,
945
- "isPublic": true
946
- },
947
- "isPaid": {
948
- "name": "isPaid",
949
- "async": false,
950
- "parameters": [],
951
- "returnType": "boolean",
952
- "isStatic": false,
953
- "isPublic": true
954
- },
955
- "isDisplay": {
956
- "name": "isDisplay",
957
- "async": false,
958
- "parameters": [],
959
- "returnType": "boolean",
960
- "isStatic": false,
961
- "isPublic": true
962
- },
963
- "isReferral": {
964
- "name": "isReferral",
965
- "async": false,
966
- "parameters": [],
967
- "returnType": "boolean",
968
- "isStatic": false,
969
- "isPublic": true
970
- },
971
- "isSales": {
972
- "name": "isSales",
973
- "async": false,
974
- "parameters": [],
975
- "returnType": "boolean",
976
- "isStatic": false,
977
- "isPublic": true
978
- },
979
- "isParent": {
980
- "name": "isParent",
981
- "async": false,
982
- "parameters": [],
983
- "returnType": "boolean",
984
- "isStatic": false,
985
- "isPublic": true
986
- },
987
- "isOverhead": {
988
- "name": "isOverhead",
989
- "async": false,
990
- "parameters": [],
991
- "returnType": "boolean",
992
- "isStatic": false,
993
- "isPublic": true
994
- },
995
- "getAmountInDollars": {
996
- "name": "getAmountInDollars",
997
- "async": false,
998
- "parameters": [],
999
- "returnType": "number",
1000
- "isStatic": false,
1001
- "isPublic": true
1002
- },
1003
- "getGrossRevenueInDollars": {
1004
- "name": "getGrossRevenueInDollars",
1005
- "async": false,
1006
- "parameters": [],
1007
- "returnType": "number",
1008
- "isStatic": false,
1009
- "isPublic": true
1010
- },
1011
- "getMetadata": {
1012
- "name": "getMetadata",
1013
- "async": false,
1014
- "parameters": [],
1015
- "returnType": "Record<string>",
1016
- "isStatic": false,
1017
- "isPublic": true
1018
- },
1019
- "setMetadata": {
1020
- "name": "setMetadata",
1021
- "async": false,
1022
- "parameters": [
1023
- {
1024
- "name": "data",
1025
- "type": "Record<string>",
1026
- "optional": false
1027
- }
1028
- ],
1029
- "returnType": "void",
1030
- "isStatic": false,
1031
- "isPublic": true
1032
- }
1033
- },
1034
- "decoratorConfig": {
1035
- "api": {
1036
- "include": [
1037
- "create",
1038
- "list",
1039
- "get"
1040
- ]
1041
- },
1042
- "mcp": {
1043
- "include": [
1044
- "create",
1045
- "list"
1046
- ]
1047
- },
1048
- "cli": false
1049
- },
1050
- "extends": "SmrtObject",
1051
- "exportName": "Commission",
1052
- "collectionExportName": "CommissionCollection",
1053
- "schema": {
1054
- "tableName": "commissions",
1055
- "ddl": "CREATE TABLE IF NOT EXISTS \"commissions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"event_id\" UUID,\n \"partner_id\" UUID,\n \"commission_type\" TEXT,\n \"gross_revenue\" INTEGER DEFAULT 0,\n \"commission_rate\" INTEGER DEFAULT 0,\n \"commission_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'CAD',\n \"payout_id\" UUID,\n \"status\" TEXT,\n \"event_timestamp\" TIMESTAMP,\n \"network_id\" TEXT DEFAULT '',\n \"site_id\" TEXT DEFAULT '',\n \"campaign_id\" TEXT DEFAULT '',\n \"metadata\" TEXT DEFAULT ''\n);",
1056
- "columns": {
1057
- "id": {
1058
- "type": "UUID",
1059
- "primaryKey": true,
1060
- "referenceKind": "id",
1061
- "notNull": true
1062
- },
1063
- "slug": {
1064
- "type": "TEXT",
1065
- "notNull": true
1066
- },
1067
- "context": {
1068
- "type": "TEXT",
1069
- "notNull": true,
1070
- "default": ""
1071
- },
1072
- "created_at": {
1073
- "type": "TIMESTAMP",
1074
- "notNull": true,
1075
- "default": "current_timestamp"
1076
- },
1077
- "updated_at": {
1078
- "type": "TIMESTAMP",
1079
- "notNull": true,
1080
- "default": "current_timestamp"
1081
- },
1082
- "event_id": {
1083
- "type": "UUID",
1084
- "referenceKind": "crossPackageRef",
1085
- "notNull": false,
1086
- "unique": false
1087
- },
1088
- "partner_id": {
1089
- "type": "UUID",
1090
- "referenceKind": "foreignKey",
1091
- "notNull": false,
1092
- "unique": false
1093
- },
1094
- "commission_type": {
1095
- "type": "TEXT",
1096
- "notNull": false,
1097
- "unique": false
1098
- },
1099
- "gross_revenue": {
1100
- "type": "INTEGER",
1101
- "notNull": false,
1102
- "unique": false,
1103
- "default": 0
1104
- },
1105
- "commission_rate": {
1106
- "type": "INTEGER",
1107
- "notNull": false,
1108
- "unique": false,
1109
- "default": 0
1110
- },
1111
- "commission_amount": {
1112
- "type": "INTEGER",
1113
- "notNull": false,
1114
- "unique": false,
1115
- "default": 0
1116
- },
1117
- "currency": {
1118
- "type": "TEXT",
1119
- "notNull": false,
1120
- "unique": false,
1121
- "default": "CAD"
1122
- },
1123
- "payout_id": {
1124
- "type": "UUID",
1125
- "referenceKind": "foreignKey",
1126
- "notNull": false,
1127
- "unique": false
1128
- },
1129
- "status": {
1130
- "type": "TEXT",
1131
- "notNull": false,
1132
- "unique": false
1133
- },
1134
- "event_timestamp": {
1135
- "type": "TIMESTAMP",
1136
- "notNull": false,
1137
- "unique": false
1138
- },
1139
- "network_id": {
1140
- "type": "TEXT",
1141
- "notNull": false,
1142
- "unique": false,
1143
- "default": ""
1144
- },
1145
- "site_id": {
1146
- "type": "TEXT",
1147
- "notNull": false,
1148
- "unique": false,
1149
- "default": ""
1150
- },
1151
- "campaign_id": {
1152
- "type": "TEXT",
1153
- "notNull": false,
1154
- "unique": false,
1155
- "default": ""
1156
- },
1157
- "metadata": {
1158
- "type": "TEXT",
1159
- "notNull": false,
1160
- "unique": false,
1161
- "default": ""
1162
- }
1163
- },
1164
- "indexes": [
1165
- {
1166
- "name": "commissions_id_idx",
1167
- "columns": [
1168
- "id"
1169
- ]
1170
- },
1171
- {
1172
- "name": "commissions_slug_context_idx",
1173
- "columns": [
1174
- "slug",
1175
- "context"
1176
- ],
1177
- "unique": true
1178
- }
1179
- ],
1180
- "version": "c5446ec3"
1181
- }
1182
- },
1183
- "@happyvertical/smrt-affiliates:Partner": {
1184
- "name": "partner",
1185
- "className": "Partner",
1186
- "qualifiedName": "@happyvertical/smrt-affiliates:Partner",
1187
- "collection": "partners",
1188
- "filePath": "/home/runner/_work/smrt/smrt/packages/affiliates/src/models/Partner.ts",
1189
- "packageName": "@happyvertical/smrt-affiliates",
1190
- "fields": {
1191
- "profileId": {
1192
- "type": "crossPackageRef",
1193
- "required": false,
1194
- "related": "@happyvertical/smrt-profiles:Profile"
1195
- },
1196
- "propertyId": {
1197
- "type": "crossPackageRef",
1198
- "required": false,
1199
- "related": "@happyvertical/smrt-properties:Property"
1200
- },
1201
- "partnerTypes": {
1202
- "type": "text",
1203
- "required": false,
1204
- "default": "[]"
1205
- },
1206
- "parentPartnerId": {
1207
- "type": "foreignKey",
1208
- "required": false,
1209
- "related": "Partner"
1210
- },
1211
- "referredById": {
1212
- "type": "foreignKey",
1213
- "required": false,
1214
- "related": "Partner"
1215
- },
1216
- "parentCommissionShare": {
1217
- "type": "integer",
1218
- "required": false,
1219
- "default": 0
1220
- },
1221
- "displayCommissionRate": {
1222
- "type": "decimal",
1223
- "required": false,
1224
- "default": 0.5
1225
- },
1226
- "referralCommissionRate": {
1227
- "type": "decimal",
1228
- "required": false,
1229
- "default": 0.05
1230
- },
1231
- "salesCommissionRate": {
1232
- "type": "decimal",
1233
- "required": false,
1234
- "default": 0.1
1235
- },
1236
- "payoutThreshold": {
1237
- "type": "integer",
1238
- "required": false,
1239
- "default": 5000
1240
- },
1241
- "payoutMethod": {
1242
- "type": "text",
1243
- "required": false
1244
- },
1245
- "currency": {
1246
- "type": "text",
1247
- "required": false,
1248
- "default": "CAD"
1249
- },
1250
- "status": {
1251
- "type": "text",
1252
- "required": false
1253
- },
1254
- "metadata": {
1255
- "type": "text",
1256
- "required": false,
1257
- "default": ""
1258
- }
1259
- },
1260
- "methods": {
1261
- "getPartnerTypes": {
1262
- "name": "getPartnerTypes",
1263
- "async": false,
1264
- "parameters": [],
1265
- "returnType": "PartnerType[]",
1266
- "isStatic": false,
1267
- "isPublic": true
1268
- },
1269
- "setPartnerTypes": {
1270
- "name": "setPartnerTypes",
1271
- "async": false,
1272
- "parameters": [
1273
- {
1274
- "name": "types",
1275
- "type": "PartnerType[]",
1276
- "optional": false
1277
- }
1278
- ],
1279
- "returnType": "void",
1280
- "isStatic": false,
1281
- "isPublic": true
1282
- },
1283
- "hasType": {
1284
- "name": "hasType",
1285
- "async": false,
1286
- "parameters": [
1287
- {
1288
- "name": "type",
1289
- "type": "PartnerType",
1290
- "optional": false
1291
- }
1292
- ],
1293
- "returnType": "boolean",
1294
- "isStatic": false,
1295
- "isPublic": true
1296
- },
1297
- "isPublisher": {
1298
- "name": "isPublisher",
1299
- "async": false,
1300
- "parameters": [],
1301
- "returnType": "boolean",
1302
- "isStatic": false,
1303
- "isPublic": true
1304
- },
1305
- "isSalesperson": {
1306
- "name": "isSalesperson",
1307
- "async": false,
1308
- "parameters": [],
1309
- "returnType": "boolean",
1310
- "isStatic": false,
1311
- "isPublic": true
1312
- },
1313
- "isReferrer": {
1314
- "name": "isReferrer",
1315
- "async": false,
1316
- "parameters": [],
1317
- "returnType": "boolean",
1318
- "isStatic": false,
1319
- "isPublic": true
1320
- },
1321
- "isActive": {
1322
- "name": "isActive",
1323
- "async": false,
1324
- "parameters": [],
1325
- "returnType": "boolean",
1326
- "isStatic": false,
1327
- "isPublic": true
1328
- },
1329
- "isPending": {
1330
- "name": "isPending",
1331
- "async": false,
1332
- "parameters": [],
1333
- "returnType": "boolean",
1334
- "isStatic": false,
1335
- "isPublic": true
1336
- },
1337
- "isSuspended": {
1338
- "name": "isSuspended",
1339
- "async": false,
1340
- "parameters": [],
1341
- "returnType": "boolean",
1342
- "isStatic": false,
1343
- "isPublic": true
1344
- },
1345
- "hasParent": {
1346
- "name": "hasParent",
1347
- "async": false,
1348
- "parameters": [],
1349
- "returnType": "boolean",
1350
- "isStatic": false,
1351
- "isPublic": true
1352
- },
1353
- "wasReferred": {
1354
- "name": "wasReferred",
1355
- "async": false,
1356
- "parameters": [],
1357
- "returnType": "boolean",
1358
- "isStatic": false,
1359
- "isPublic": true
1360
- },
1361
- "getMetadata": {
1362
- "name": "getMetadata",
1363
- "async": false,
1364
- "parameters": [],
1365
- "returnType": "Record<string>",
1366
- "isStatic": false,
1367
- "isPublic": true
1368
- },
1369
- "setMetadata": {
1370
- "name": "setMetadata",
1371
- "async": false,
1372
- "parameters": [
1373
- {
1374
- "name": "data",
1375
- "type": "Record<string>",
1376
- "optional": false
1377
- }
1378
- ],
1379
- "returnType": "void",
1380
- "isStatic": false,
1381
- "isPublic": true
1382
- },
1383
- "getEffectiveSalesRate": {
1384
- "name": "getEffectiveSalesRate",
1385
- "async": false,
1386
- "parameters": [],
1387
- "returnType": "number",
1388
- "isStatic": false,
1389
- "isPublic": true
1390
- }
1391
- },
1392
- "decoratorConfig": {
1393
- "api": {
1394
- "include": [
1395
- "list",
1396
- "get",
1397
- "create",
1398
- "update"
1399
- ]
1400
- },
1401
- "mcp": {
1402
- "include": [
1403
- "list",
1404
- "get",
1405
- "create"
1406
- ]
1407
- },
1408
- "cli": true
1409
- },
1410
- "extends": "SmrtObject",
1411
- "exportName": "Partner",
1412
- "collectionExportName": "PartnerCollection",
1413
- "schema": {
1414
- "tableName": "partners",
1415
- "ddl": "CREATE TABLE IF NOT EXISTS \"partners\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"profile_id\" UUID,\n \"property_id\" UUID,\n \"partner_types\" TEXT DEFAULT '[]',\n \"parent_partner_id\" UUID,\n \"referred_by_id\" UUID,\n \"parent_commission_share\" INTEGER DEFAULT 0,\n \"display_commission_rate\" REAL DEFAULT 0.5,\n \"referral_commission_rate\" REAL DEFAULT 0.05,\n \"sales_commission_rate\" REAL DEFAULT 0.1,\n \"payout_threshold\" INTEGER DEFAULT 5000,\n \"payout_method\" TEXT,\n \"currency\" TEXT DEFAULT 'CAD',\n \"status\" TEXT,\n \"metadata\" TEXT DEFAULT ''\n);",
1416
- "columns": {
1417
- "id": {
1418
- "type": "UUID",
1419
- "primaryKey": true,
1420
- "referenceKind": "id",
1421
- "notNull": true
1422
- },
1423
- "slug": {
1424
- "type": "TEXT",
1425
- "notNull": true
1426
- },
1427
- "context": {
1428
- "type": "TEXT",
1429
- "notNull": true,
1430
- "default": ""
1431
- },
1432
- "created_at": {
1433
- "type": "TIMESTAMP",
1434
- "notNull": true,
1435
- "default": "current_timestamp"
1436
- },
1437
- "updated_at": {
1438
- "type": "TIMESTAMP",
1439
- "notNull": true,
1440
- "default": "current_timestamp"
1441
- },
1442
- "profile_id": {
1443
- "type": "UUID",
1444
- "referenceKind": "crossPackageRef",
1445
- "notNull": false,
1446
- "unique": false
1447
- },
1448
- "property_id": {
1449
- "type": "UUID",
1450
- "referenceKind": "crossPackageRef",
1451
- "notNull": false,
1452
- "unique": false
1453
- },
1454
- "partner_types": {
1455
- "type": "TEXT",
1456
- "notNull": false,
1457
- "unique": false,
1458
- "default": "[]"
1459
- },
1460
- "parent_partner_id": {
1461
- "type": "UUID",
1462
- "referenceKind": "foreignKey",
1463
- "notNull": false,
1464
- "unique": false
1465
- },
1466
- "referred_by_id": {
1467
- "type": "UUID",
1468
- "referenceKind": "foreignKey",
1469
- "notNull": false,
1470
- "unique": false
1471
- },
1472
- "parent_commission_share": {
1473
- "type": "INTEGER",
1474
- "notNull": false,
1475
- "unique": false,
1476
- "default": 0
1477
- },
1478
- "display_commission_rate": {
1479
- "type": "REAL",
1480
- "notNull": false,
1481
- "unique": false,
1482
- "default": 0.5
1483
- },
1484
- "referral_commission_rate": {
1485
- "type": "REAL",
1486
- "notNull": false,
1487
- "unique": false,
1488
- "default": 0.05
1489
- },
1490
- "sales_commission_rate": {
1491
- "type": "REAL",
1492
- "notNull": false,
1493
- "unique": false,
1494
- "default": 0.1
1495
- },
1496
- "payout_threshold": {
1497
- "type": "INTEGER",
1498
- "notNull": false,
1499
- "unique": false,
1500
- "default": 5000
1501
- },
1502
- "payout_method": {
1503
- "type": "TEXT",
1504
- "notNull": false,
1505
- "unique": false
1506
- },
1507
- "currency": {
1508
- "type": "TEXT",
1509
- "notNull": false,
1510
- "unique": false,
1511
- "default": "CAD"
1512
- },
1513
- "status": {
1514
- "type": "TEXT",
1515
- "notNull": false,
1516
- "unique": false
1517
- },
1518
- "metadata": {
1519
- "type": "TEXT",
1520
- "notNull": false,
1521
- "unique": false,
1522
- "default": ""
1523
- }
1524
- },
1525
- "indexes": [
1526
- {
1527
- "name": "partners_id_idx",
1528
- "columns": [
1529
- "id"
1530
- ]
1531
- },
1532
- {
1533
- "name": "partners_slug_context_idx",
1534
- "columns": [
1535
- "slug",
1536
- "context"
1537
- ],
1538
- "unique": true
1539
- }
1540
- ],
1541
- "version": "af1bf156"
1542
- }
1543
- },
1544
- "@happyvertical/smrt-affiliates:Payout": {
1545
- "name": "payout",
1546
- "className": "Payout",
1547
- "qualifiedName": "@happyvertical/smrt-affiliates:Payout",
1548
- "collection": "payouts",
1549
- "filePath": "/home/runner/_work/smrt/smrt/packages/affiliates/src/models/Payout.ts",
1550
- "packageName": "@happyvertical/smrt-affiliates",
1551
- "fields": {
1552
- "partnerId": {
1553
- "type": "foreignKey",
1554
- "required": false,
1555
- "related": "Partner"
1556
- },
1557
- "periodStart": {
1558
- "type": "datetime",
1559
- "required": false
1560
- },
1561
- "periodEnd": {
1562
- "type": "datetime",
1563
- "required": false
1564
- },
1565
- "displayEarnings": {
1566
- "type": "integer",
1567
- "required": false,
1568
- "default": 0
1569
- },
1570
- "referralEarnings": {
1571
- "type": "integer",
1572
- "required": false,
1573
- "default": 0
1574
- },
1575
- "salesEarnings": {
1576
- "type": "integer",
1577
- "required": false,
1578
- "default": 0
1579
- },
1580
- "parentEarnings": {
1581
- "type": "integer",
1582
- "required": false,
1583
- "default": 0
1584
- },
1585
- "overheadEarnings": {
1586
- "type": "integer",
1587
- "required": false,
1588
- "default": 0
1589
- },
1590
- "totalAmount": {
1591
- "type": "integer",
1592
- "required": false,
1593
- "default": 0
1594
- },
1595
- "currency": {
1596
- "type": "text",
1597
- "required": false,
1598
- "default": "CAD"
1599
- },
1600
- "invoiceId": {
1601
- "type": "crossPackageRef",
1602
- "required": false,
1603
- "related": "@happyvertical/smrt-commerce:Invoice"
1604
- },
1605
- "status": {
1606
- "type": "text",
1607
- "required": false
1608
- },
1609
- "paymentReference": {
1610
- "type": "text",
1611
- "required": false,
1612
- "default": ""
1613
- },
1614
- "paidAt": {
1615
- "type": "datetime",
1616
- "required": false
1617
- },
1618
- "notes": {
1619
- "type": "text",
1620
- "required": false,
1621
- "default": ""
1622
- },
1623
- "metadata": {
1624
- "type": "text",
1625
- "required": false,
1626
- "default": ""
1627
- }
1628
- },
1629
- "methods": {
1630
- "isPending": {
1631
- "name": "isPending",
1632
- "async": false,
1633
- "parameters": [],
1634
- "returnType": "boolean",
1635
- "isStatic": false,
1636
- "isPublic": true
1637
- },
1638
- "isApproved": {
1639
- "name": "isApproved",
1640
- "async": false,
1641
- "parameters": [],
1642
- "returnType": "boolean",
1643
- "isStatic": false,
1644
- "isPublic": true
1645
- },
1646
- "isProcessing": {
1647
- "name": "isProcessing",
1648
- "async": false,
1649
- "parameters": [],
1650
- "returnType": "boolean",
1651
- "isStatic": false,
1652
- "isPublic": true
1653
- },
1654
- "isCompleted": {
1655
- "name": "isCompleted",
1656
- "async": false,
1657
- "parameters": [],
1658
- "returnType": "boolean",
1659
- "isStatic": false,
1660
- "isPublic": true
1661
- },
1662
- "isFailed": {
1663
- "name": "isFailed",
1664
- "async": false,
1665
- "parameters": [],
1666
- "returnType": "boolean",
1667
- "isStatic": false,
1668
- "isPublic": true
1669
- },
1670
- "getTotalInDollars": {
1671
- "name": "getTotalInDollars",
1672
- "async": false,
1673
- "parameters": [],
1674
- "returnType": "number",
1675
- "isStatic": false,
1676
- "isPublic": true
1677
- },
1678
- "getDisplayEarningsInDollars": {
1679
- "name": "getDisplayEarningsInDollars",
1680
- "async": false,
1681
- "parameters": [],
1682
- "returnType": "number",
1683
- "isStatic": false,
1684
- "isPublic": true
1685
- },
1686
- "getReferralEarningsInDollars": {
1687
- "name": "getReferralEarningsInDollars",
1688
- "async": false,
1689
- "parameters": [],
1690
- "returnType": "number",
1691
- "isStatic": false,
1692
- "isPublic": true
1693
- },
1694
- "getSalesEarningsInDollars": {
1695
- "name": "getSalesEarningsInDollars",
1696
- "async": false,
1697
- "parameters": [],
1698
- "returnType": "number",
1699
- "isStatic": false,
1700
- "isPublic": true
1701
- },
1702
- "getParentEarningsInDollars": {
1703
- "name": "getParentEarningsInDollars",
1704
- "async": false,
1705
- "parameters": [],
1706
- "returnType": "number",
1707
- "isStatic": false,
1708
- "isPublic": true
1709
- },
1710
- "getOverheadEarningsInDollars": {
1711
- "name": "getOverheadEarningsInDollars",
1712
- "async": false,
1713
- "parameters": [],
1714
- "returnType": "number",
1715
- "isStatic": false,
1716
- "isPublic": true
1717
- },
1718
- "calculateTotal": {
1719
- "name": "calculateTotal",
1720
- "async": false,
1721
- "parameters": [],
1722
- "returnType": "number",
1723
- "isStatic": false,
1724
- "isPublic": true
1725
- },
1726
- "getPeriodString": {
1727
- "name": "getPeriodString",
1728
- "async": false,
1729
- "parameters": [],
1730
- "returnType": "string",
1731
- "isStatic": false,
1732
- "isPublic": true
1733
- },
1734
- "getMetadata": {
1735
- "name": "getMetadata",
1736
- "async": false,
1737
- "parameters": [],
1738
- "returnType": "Record<string>",
1739
- "isStatic": false,
1740
- "isPublic": true
1741
- },
1742
- "setMetadata": {
1743
- "name": "setMetadata",
1744
- "async": false,
1745
- "parameters": [
1746
- {
1747
- "name": "data",
1748
- "type": "Record<string>",
1749
- "optional": false
1750
- }
1751
- ],
1752
- "returnType": "void",
1753
- "isStatic": false,
1754
- "isPublic": true
1755
- },
1756
- "approve": {
1757
- "name": "approve",
1758
- "async": false,
1759
- "parameters": [],
1760
- "returnType": "void",
1761
- "isStatic": false,
1762
- "isPublic": true
1763
- },
1764
- "markProcessing": {
1765
- "name": "markProcessing",
1766
- "async": false,
1767
- "parameters": [],
1768
- "returnType": "void",
1769
- "isStatic": false,
1770
- "isPublic": true
1771
- },
1772
- "complete": {
1773
- "name": "complete",
1774
- "async": false,
1775
- "parameters": [
1776
- {
1777
- "name": "paymentReference",
1778
- "type": "string",
1779
- "optional": false
1780
- }
1781
- ],
1782
- "returnType": "void",
1783
- "isStatic": false,
1784
- "isPublic": true
1785
- },
1786
- "fail": {
1787
- "name": "fail",
1788
- "async": false,
1789
- "parameters": [
1790
- {
1791
- "name": "reason",
1792
- "type": "string",
1793
- "optional": false
1794
- }
1795
- ],
1796
- "returnType": "void",
1797
- "isStatic": false,
1798
- "isPublic": true
1799
- }
1800
- },
1801
- "decoratorConfig": {
1802
- "api": {
1803
- "include": [
1804
- "list",
1805
- "get",
1806
- "create",
1807
- "update"
1808
- ]
1809
- },
1810
- "mcp": {
1811
- "include": [
1812
- "list",
1813
- "get",
1814
- "create"
1815
- ]
1816
- },
1817
- "cli": true
1818
- },
1819
- "extends": "SmrtObject",
1820
- "exportName": "Payout",
1821
- "collectionExportName": "PayoutCollection",
1822
- "schema": {
1823
- "tableName": "payouts",
1824
- "ddl": "CREATE TABLE IF NOT EXISTS \"payouts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"partner_id\" UUID,\n \"period_start\" TIMESTAMP,\n \"period_end\" TIMESTAMP,\n \"display_earnings\" INTEGER DEFAULT 0,\n \"referral_earnings\" INTEGER DEFAULT 0,\n \"sales_earnings\" INTEGER DEFAULT 0,\n \"parent_earnings\" INTEGER DEFAULT 0,\n \"overhead_earnings\" INTEGER DEFAULT 0,\n \"total_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'CAD',\n \"invoice_id\" UUID,\n \"status\" TEXT,\n \"payment_reference\" TEXT DEFAULT '',\n \"paid_at\" TIMESTAMP,\n \"notes\" TEXT DEFAULT '',\n \"metadata\" TEXT DEFAULT ''\n);",
1825
- "columns": {
1826
- "id": {
1827
- "type": "UUID",
1828
- "primaryKey": true,
1829
- "referenceKind": "id",
1830
- "notNull": true
1831
- },
1832
- "slug": {
1833
- "type": "TEXT",
1834
- "notNull": true
1835
- },
1836
- "context": {
1837
- "type": "TEXT",
1838
- "notNull": true,
1839
- "default": ""
1840
- },
1841
- "created_at": {
1842
- "type": "TIMESTAMP",
1843
- "notNull": true,
1844
- "default": "current_timestamp"
1845
- },
1846
- "updated_at": {
1847
- "type": "TIMESTAMP",
1848
- "notNull": true,
1849
- "default": "current_timestamp"
1850
- },
1851
- "partner_id": {
1852
- "type": "UUID",
1853
- "referenceKind": "foreignKey",
1854
- "notNull": false,
1855
- "unique": false
1856
- },
1857
- "period_start": {
1858
- "type": "TIMESTAMP",
1859
- "notNull": false,
1860
- "unique": false
1861
- },
1862
- "period_end": {
1863
- "type": "TIMESTAMP",
1864
- "notNull": false,
1865
- "unique": false
1866
- },
1867
- "display_earnings": {
1868
- "type": "INTEGER",
1869
- "notNull": false,
1870
- "unique": false,
1871
- "default": 0
1872
- },
1873
- "referral_earnings": {
1874
- "type": "INTEGER",
1875
- "notNull": false,
1876
- "unique": false,
1877
- "default": 0
1878
- },
1879
- "sales_earnings": {
1880
- "type": "INTEGER",
1881
- "notNull": false,
1882
- "unique": false,
1883
- "default": 0
1884
- },
1885
- "parent_earnings": {
1886
- "type": "INTEGER",
1887
- "notNull": false,
1888
- "unique": false,
1889
- "default": 0
1890
- },
1891
- "overhead_earnings": {
1892
- "type": "INTEGER",
1893
- "notNull": false,
1894
- "unique": false,
1895
- "default": 0
1896
- },
1897
- "total_amount": {
1898
- "type": "INTEGER",
1899
- "notNull": false,
1900
- "unique": false,
1901
- "default": 0
1902
- },
1903
- "currency": {
1904
- "type": "TEXT",
1905
- "notNull": false,
1906
- "unique": false,
1907
- "default": "CAD"
1908
- },
1909
- "invoice_id": {
1910
- "type": "UUID",
1911
- "referenceKind": "crossPackageRef",
1912
- "notNull": false,
1913
- "unique": false
1914
- },
1915
- "status": {
1916
- "type": "TEXT",
1917
- "notNull": false,
1918
- "unique": false
1919
- },
1920
- "payment_reference": {
1921
- "type": "TEXT",
1922
- "notNull": false,
1923
- "unique": false,
1924
- "default": ""
1925
- },
1926
- "paid_at": {
1927
- "type": "TIMESTAMP",
1928
- "notNull": false,
1929
- "unique": false
1930
- },
1931
- "notes": {
1932
- "type": "TEXT",
1933
- "notNull": false,
1934
- "unique": false,
1935
- "default": ""
1936
- },
1937
- "metadata": {
1938
- "type": "TEXT",
1939
- "notNull": false,
1940
- "unique": false,
1941
- "default": ""
1942
- }
1943
- },
1944
- "indexes": [
1945
- {
1946
- "name": "payouts_id_idx",
1947
- "columns": [
1948
- "id"
1949
- ]
1950
- },
1951
- {
1952
- "name": "payouts_slug_context_idx",
1953
- "columns": [
1954
- "slug",
1955
- "context"
1956
- ],
1957
- "unique": true
1958
- }
1959
- ],
1960
- "version": "e94f3029"
1961
- }
1962
- }
1963
- },
5
+ "packageVersion": "0.39.3",
6
+ "objects": {},
1964
7
  "moduleType": "smrt",
1965
8
  "smrtDependencies": [
1966
- "@happyvertical/smrt-core"
9
+ "@happyvertical/smrt-sales"
1967
10
  ]
1968
11
  }