@happyvertical/smrt-sales 0.40.8 → 0.40.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/AGENTS.md +5 -3
  2. package/dist/agreements.js +1 -1
  3. package/dist/chunks/__smrt-register__-CZE4Gm8_.js +6 -0
  4. package/dist/chunks/{__smrt-register__-ITgv3u9E.js.map → __smrt-register__-CZE4Gm8_.js.map} +1 -1
  5. package/dist/chunks/{commissions-pI_MmBxN.js → commissions-CelWwvjZ.js} +354 -74
  6. package/dist/chunks/commissions-CelWwvjZ.js.map +1 -0
  7. package/dist/chunks/{referrals-cYYg4YZw.js → referrals-CJUOZxpa.js} +430 -75
  8. package/dist/chunks/referrals-CJUOZxpa.js.map +1 -0
  9. package/dist/commissions/collections/CommissionAdjustmentOperationCollection.d.ts +24 -0
  10. package/dist/commissions/collections/CommissionAdjustmentOperationCollection.d.ts.map +1 -0
  11. package/dist/commissions/models/CommissionAdjustment.d.ts.map +1 -1
  12. package/dist/commissions/models/CommissionAdjustmentOperation.d.ts +23 -0
  13. package/dist/commissions/models/CommissionAdjustmentOperation.d.ts.map +1 -0
  14. package/dist/commissions/services/CommissionAdjustmentService.d.ts +68 -0
  15. package/dist/commissions/services/CommissionAdjustmentService.d.ts.map +1 -0
  16. package/dist/commissions/services/index.d.ts +1 -0
  17. package/dist/commissions/services/index.d.ts.map +1 -1
  18. package/dist/commissions.js +3 -3
  19. package/dist/crm.js +1 -1
  20. package/dist/index.js +4 -4
  21. package/dist/manifest.json +548 -2
  22. package/dist/referrals/collections/ReferralClickOperationCollection.d.ts +29 -0
  23. package/dist/referrals/collections/ReferralClickOperationCollection.d.ts.map +1 -0
  24. package/dist/referrals/collections/ReferralLinkCollection.d.ts +56 -5
  25. package/dist/referrals/collections/ReferralLinkCollection.d.ts.map +1 -1
  26. package/dist/referrals/index.d.ts +1 -1
  27. package/dist/referrals/index.d.ts.map +1 -1
  28. package/dist/referrals/models/ReferralClickOperation.d.ts +39 -0
  29. package/dist/referrals/models/ReferralClickOperation.d.ts.map +1 -0
  30. package/dist/referrals/models/ReferralLink.d.ts +3 -2
  31. package/dist/referrals/models/ReferralLink.d.ts.map +1 -1
  32. package/dist/referrals.js +3 -3
  33. package/dist/smrt-knowledge.json +139 -7
  34. package/package.json +6 -6
  35. package/dist/chunks/__smrt-register__-ITgv3u9E.js +0 -6
  36. package/dist/chunks/commissions-pI_MmBxN.js.map +0 -1
  37. package/dist/chunks/referrals-cYYg4YZw.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "timestamp": 1784314476618,
3
+ "timestamp": 1784332657038,
4
4
  "packageName": "@happyvertical/smrt-sales",
5
- "packageVersion": "0.40.8",
5
+ "packageVersion": "0.40.10",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-sales:AgreementExecutionCollection": {
8
8
  "name": "agreementexecutioncollection",
@@ -1936,6 +1936,98 @@
1936
1936
  "version": "1739b6be"
1937
1937
  }
1938
1938
  },
1939
+ "@happyvertical/smrt-sales:CommissionAdjustmentOperationCollection": {
1940
+ "name": "commissionadjustmentoperationcollection",
1941
+ "className": "CommissionAdjustmentOperationCollection",
1942
+ "qualifiedName": "@happyvertical/smrt-sales:CommissionAdjustmentOperationCollection",
1943
+ "collection": "commissionadjustmentoperations",
1944
+ "filePath": "/home/runner/_work/smrt/smrt/packages/sales/src/commissions/collections/CommissionAdjustmentOperationCollection.ts",
1945
+ "packageName": "@happyvertical/smrt-sales",
1946
+ "fields": {},
1947
+ "methods": {
1948
+ "findByOperationId": {
1949
+ "name": "findByOperationId",
1950
+ "async": true,
1951
+ "parameters": [
1952
+ {
1953
+ "name": "operationId",
1954
+ "type": "string",
1955
+ "optional": false
1956
+ }
1957
+ ],
1958
+ "returnType": "Promise<CommissionAdjustmentOperation | null>",
1959
+ "isStatic": false,
1960
+ "isPublic": true
1961
+ },
1962
+ "claim": {
1963
+ "name": "claim",
1964
+ "async": true,
1965
+ "parameters": [
1966
+ {
1967
+ "name": "input",
1968
+ "type": "ClaimCommissionAdjustmentOperationInput",
1969
+ "optional": false
1970
+ }
1971
+ ],
1972
+ "returnType": "Promise<ClaimCommissionAdjustmentOperationResult>",
1973
+ "isStatic": false,
1974
+ "isPublic": true
1975
+ }
1976
+ },
1977
+ "decoratorConfig": {},
1978
+ "extends": "SmrtCollection",
1979
+ "extendsTypeArg": "CommissionAdjustmentOperation",
1980
+ "exportName": "CommissionAdjustmentOperationCollection",
1981
+ "collectionExportName": "CommissionAdjustmentOperationCollectionCollection",
1982
+ "schema": {
1983
+ "tableName": "commission_adjustment_operation_collections",
1984
+ "ddl": "CREATE TABLE IF NOT EXISTS \"commission_adjustment_operation_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);",
1985
+ "columns": {
1986
+ "id": {
1987
+ "type": "UUID",
1988
+ "primaryKey": true,
1989
+ "referenceKind": "id",
1990
+ "notNull": true
1991
+ },
1992
+ "slug": {
1993
+ "type": "TEXT",
1994
+ "notNull": true
1995
+ },
1996
+ "context": {
1997
+ "type": "TEXT",
1998
+ "notNull": true,
1999
+ "default": ""
2000
+ },
2001
+ "created_at": {
2002
+ "type": "TIMESTAMP",
2003
+ "notNull": true,
2004
+ "default": "current_timestamp"
2005
+ },
2006
+ "updated_at": {
2007
+ "type": "TIMESTAMP",
2008
+ "notNull": true,
2009
+ "default": "current_timestamp"
2010
+ }
2011
+ },
2012
+ "indexes": [
2013
+ {
2014
+ "name": "commission_adjustment_operation_collections_id_idx",
2015
+ "columns": [
2016
+ "id"
2017
+ ]
2018
+ },
2019
+ {
2020
+ "name": "commission_adjustment_operation_collections_slug_context_idx",
2021
+ "columns": [
2022
+ "slug",
2023
+ "context"
2024
+ ],
2025
+ "unique": true
2026
+ }
2027
+ ],
2028
+ "version": "b5449b28"
2029
+ }
2030
+ },
1939
2031
  "@happyvertical/smrt-sales:CommissionCollection": {
1940
2032
  "name": "commissioncollection",
1941
2033
  "className": "CommissionCollection",
@@ -3614,6 +3706,133 @@
3614
3706
  "version": "98ce4ad1"
3615
3707
  }
3616
3708
  },
3709
+ "@happyvertical/smrt-sales:CommissionAdjustmentOperation": {
3710
+ "name": "commissionadjustmentoperation",
3711
+ "className": "CommissionAdjustmentOperation",
3712
+ "qualifiedName": "@happyvertical/smrt-sales:CommissionAdjustmentOperation",
3713
+ "collection": "commissionadjustmentoperations",
3714
+ "filePath": "/home/runner/_work/smrt/smrt/packages/sales/src/commissions/models/CommissionAdjustmentOperation.ts",
3715
+ "packageName": "@happyvertical/smrt-sales",
3716
+ "fields": {
3717
+ "tenantId": {
3718
+ "type": "text",
3719
+ "required": true,
3720
+ "_meta": {
3721
+ "sqlType": "UUID",
3722
+ "__tenancy": {
3723
+ "isTenantIdField": true,
3724
+ "autoFilter": true,
3725
+ "required": true,
3726
+ "autoPopulate": true,
3727
+ "nullable": false,
3728
+ "mode": "required",
3729
+ "field": "tenantId",
3730
+ "allowSuperAdminBypass": false
3731
+ }
3732
+ }
3733
+ },
3734
+ "adjustmentId": {
3735
+ "type": "text",
3736
+ "required": true,
3737
+ "_meta": {
3738
+ "sqlType": "UUID",
3739
+ "required": true,
3740
+ "readonly": true,
3741
+ "indexed": true
3742
+ },
3743
+ "readonly": true
3744
+ }
3745
+ },
3746
+ "methods": {},
3747
+ "decoratorConfig": {
3748
+ "api": false,
3749
+ "mcp": false,
3750
+ "cli": false,
3751
+ "tenantScoped": {
3752
+ "mode": "required"
3753
+ }
3754
+ },
3755
+ "extends": "SmrtObject",
3756
+ "exportName": "CommissionAdjustmentOperation",
3757
+ "collectionExportName": "CommissionAdjustmentOperationCollection",
3758
+ "validationRules": [
3759
+ {
3760
+ "field": "tenantId",
3761
+ "rule": "required",
3762
+ "fieldType": "text"
3763
+ },
3764
+ {
3765
+ "field": "adjustmentId",
3766
+ "rule": "required",
3767
+ "fieldType": "text"
3768
+ }
3769
+ ],
3770
+ "schema": {
3771
+ "tableName": "commission_adjustment_operations",
3772
+ "ddl": "CREATE TABLE IF NOT EXISTS \"commission_adjustment_operations\" (\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 \"tenant_id\" UUID NOT NULL,\n \"adjustment_id\" UUID NOT NULL\n);",
3773
+ "columns": {
3774
+ "id": {
3775
+ "type": "UUID",
3776
+ "primaryKey": true,
3777
+ "referenceKind": "id",
3778
+ "notNull": true
3779
+ },
3780
+ "slug": {
3781
+ "type": "TEXT",
3782
+ "notNull": true
3783
+ },
3784
+ "context": {
3785
+ "type": "TEXT",
3786
+ "notNull": true,
3787
+ "default": ""
3788
+ },
3789
+ "created_at": {
3790
+ "type": "TIMESTAMP",
3791
+ "notNull": true,
3792
+ "default": "current_timestamp"
3793
+ },
3794
+ "updated_at": {
3795
+ "type": "TIMESTAMP",
3796
+ "notNull": true,
3797
+ "default": "current_timestamp"
3798
+ },
3799
+ "tenant_id": {
3800
+ "type": "UUID",
3801
+ "referenceKind": "tenantId",
3802
+ "notNull": true,
3803
+ "unique": false
3804
+ },
3805
+ "adjustment_id": {
3806
+ "type": "UUID",
3807
+ "notNull": true,
3808
+ "unique": false
3809
+ }
3810
+ },
3811
+ "indexes": [
3812
+ {
3813
+ "name": "commission_adjustment_operations_id_idx",
3814
+ "columns": [
3815
+ "id"
3816
+ ]
3817
+ },
3818
+ {
3819
+ "name": "commission_adjustment_operations_slug_context_idx",
3820
+ "columns": [
3821
+ "slug",
3822
+ "context"
3823
+ ],
3824
+ "unique": true
3825
+ },
3826
+ {
3827
+ "name": "commission_adjustment_operations_adjustment_id_idx",
3828
+ "columns": [
3829
+ "adjustment_id"
3830
+ ]
3831
+ }
3832
+ ],
3833
+ "version": "a8aae269"
3834
+ }
3835
+ },
3617
3836
  "@happyvertical/smrt-sales:CommissionPayout": {
3618
3837
  "name": "commissionpayout",
3619
3838
  "className": "CommissionPayout",
@@ -8133,6 +8352,98 @@
8133
8352
  "version": "f4832104"
8134
8353
  }
8135
8354
  },
8355
+ "@happyvertical/smrt-sales:ReferralClickOperationCollection": {
8356
+ "name": "referralclickoperationcollection",
8357
+ "className": "ReferralClickOperationCollection",
8358
+ "qualifiedName": "@happyvertical/smrt-sales:ReferralClickOperationCollection",
8359
+ "collection": "referralclickoperations",
8360
+ "filePath": "/home/runner/_work/smrt/smrt/packages/sales/src/referrals/collections/ReferralClickOperationCollection.ts",
8361
+ "packageName": "@happyvertical/smrt-sales",
8362
+ "fields": {},
8363
+ "methods": {
8364
+ "findByOperationId": {
8365
+ "name": "findByOperationId",
8366
+ "async": true,
8367
+ "parameters": [
8368
+ {
8369
+ "name": "operationId",
8370
+ "type": "string",
8371
+ "optional": false
8372
+ }
8373
+ ],
8374
+ "returnType": "Promise<ReferralClickOperation | null>",
8375
+ "isStatic": false,
8376
+ "isPublic": true
8377
+ },
8378
+ "claim": {
8379
+ "name": "claim",
8380
+ "async": true,
8381
+ "parameters": [
8382
+ {
8383
+ "name": "input",
8384
+ "type": "ClaimReferralClickOperationInput",
8385
+ "optional": false
8386
+ }
8387
+ ],
8388
+ "returnType": "Promise<ClaimReferralClickOperationResult>",
8389
+ "isStatic": false,
8390
+ "isPublic": true
8391
+ }
8392
+ },
8393
+ "decoratorConfig": {},
8394
+ "extends": "SmrtCollection",
8395
+ "extendsTypeArg": "ReferralClickOperation",
8396
+ "exportName": "ReferralClickOperationCollection",
8397
+ "collectionExportName": "ReferralClickOperationCollectionCollection",
8398
+ "schema": {
8399
+ "tableName": "referral_click_operation_collections",
8400
+ "ddl": "CREATE TABLE IF NOT EXISTS \"referral_click_operation_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);",
8401
+ "columns": {
8402
+ "id": {
8403
+ "type": "UUID",
8404
+ "primaryKey": true,
8405
+ "referenceKind": "id",
8406
+ "notNull": true
8407
+ },
8408
+ "slug": {
8409
+ "type": "TEXT",
8410
+ "notNull": true
8411
+ },
8412
+ "context": {
8413
+ "type": "TEXT",
8414
+ "notNull": true,
8415
+ "default": ""
8416
+ },
8417
+ "created_at": {
8418
+ "type": "TIMESTAMP",
8419
+ "notNull": true,
8420
+ "default": "current_timestamp"
8421
+ },
8422
+ "updated_at": {
8423
+ "type": "TIMESTAMP",
8424
+ "notNull": true,
8425
+ "default": "current_timestamp"
8426
+ }
8427
+ },
8428
+ "indexes": [
8429
+ {
8430
+ "name": "referral_click_operation_collections_id_idx",
8431
+ "columns": [
8432
+ "id"
8433
+ ]
8434
+ },
8435
+ {
8436
+ "name": "referral_click_operation_collections_slug_context_idx",
8437
+ "columns": [
8438
+ "slug",
8439
+ "context"
8440
+ ],
8441
+ "unique": true
8442
+ }
8443
+ ],
8444
+ "version": "1e78a70b"
8445
+ }
8446
+ },
8136
8447
  "@happyvertical/smrt-sales:ReferralCollection": {
8137
8448
  "name": "referralcollection",
8138
8449
  "className": "ReferralCollection",
@@ -10314,6 +10625,241 @@
10314
10625
  "version": "aadbced2"
10315
10626
  }
10316
10627
  },
10628
+ "@happyvertical/smrt-sales:ReferralClickOperation": {
10629
+ "name": "referralclickoperation",
10630
+ "className": "ReferralClickOperation",
10631
+ "qualifiedName": "@happyvertical/smrt-sales:ReferralClickOperation",
10632
+ "collection": "referralclickoperations",
10633
+ "filePath": "/home/runner/_work/smrt/smrt/packages/sales/src/referrals/models/ReferralClickOperation.ts",
10634
+ "packageName": "@happyvertical/smrt-sales",
10635
+ "fields": {
10636
+ "tenantId": {
10637
+ "type": "text",
10638
+ "required": false,
10639
+ "_meta": {
10640
+ "sqlType": "UUID",
10641
+ "nullable": true,
10642
+ "__tenancy": {
10643
+ "isTenantIdField": true,
10644
+ "autoFilter": true,
10645
+ "required": false,
10646
+ "autoPopulate": true,
10647
+ "nullable": true,
10648
+ "mode": "optional",
10649
+ "field": "tenantId",
10650
+ "allowSuperAdminBypass": false
10651
+ }
10652
+ }
10653
+ },
10654
+ "keyHash": {
10655
+ "type": "text",
10656
+ "required": true,
10657
+ "_meta": {
10658
+ "required": true,
10659
+ "readonly": true
10660
+ },
10661
+ "readonly": true
10662
+ },
10663
+ "linkId": {
10664
+ "type": "text",
10665
+ "required": true,
10666
+ "_meta": {
10667
+ "sqlType": "UUID",
10668
+ "required": true,
10669
+ "readonly": true,
10670
+ "indexed": true
10671
+ },
10672
+ "readonly": true
10673
+ },
10674
+ "touchId": {
10675
+ "type": "text",
10676
+ "required": true,
10677
+ "_meta": {
10678
+ "sqlType": "UUID",
10679
+ "required": true,
10680
+ "readonly": true,
10681
+ "indexed": true
10682
+ },
10683
+ "readonly": true
10684
+ },
10685
+ "intentHash": {
10686
+ "type": "text",
10687
+ "required": true,
10688
+ "_meta": {
10689
+ "required": true,
10690
+ "readonly": true
10691
+ },
10692
+ "readonly": true
10693
+ },
10694
+ "callerEvidenceHash": {
10695
+ "type": "text",
10696
+ "required": true,
10697
+ "_meta": {
10698
+ "required": true,
10699
+ "readonly": true
10700
+ },
10701
+ "readonly": true
10702
+ },
10703
+ "requestedOccurredAt": {
10704
+ "type": "text",
10705
+ "required": true,
10706
+ "_meta": {
10707
+ "required": true,
10708
+ "readonly": true
10709
+ },
10710
+ "readonly": true
10711
+ }
10712
+ },
10713
+ "methods": {
10714
+ "initialize": {
10715
+ "name": "initialize",
10716
+ "async": true,
10717
+ "parameters": [],
10718
+ "returnType": "Promise",
10719
+ "isStatic": false,
10720
+ "isPublic": true
10721
+ }
10722
+ },
10723
+ "decoratorConfig": {
10724
+ "api": false,
10725
+ "mcp": false,
10726
+ "cli": false,
10727
+ "tenantScoped": {
10728
+ "mode": "optional"
10729
+ }
10730
+ },
10731
+ "extends": "SmrtObject",
10732
+ "exportName": "ReferralClickOperation",
10733
+ "collectionExportName": "ReferralClickOperationCollection",
10734
+ "validationRules": [
10735
+ {
10736
+ "field": "keyHash",
10737
+ "rule": "required",
10738
+ "fieldType": "text"
10739
+ },
10740
+ {
10741
+ "field": "linkId",
10742
+ "rule": "required",
10743
+ "fieldType": "text"
10744
+ },
10745
+ {
10746
+ "field": "touchId",
10747
+ "rule": "required",
10748
+ "fieldType": "text"
10749
+ },
10750
+ {
10751
+ "field": "intentHash",
10752
+ "rule": "required",
10753
+ "fieldType": "text"
10754
+ },
10755
+ {
10756
+ "field": "callerEvidenceHash",
10757
+ "rule": "required",
10758
+ "fieldType": "text"
10759
+ },
10760
+ {
10761
+ "field": "requestedOccurredAt",
10762
+ "rule": "required",
10763
+ "fieldType": "text"
10764
+ }
10765
+ ],
10766
+ "schema": {
10767
+ "tableName": "referral_click_operations",
10768
+ "ddl": "CREATE TABLE IF NOT EXISTS \"referral_click_operations\" (\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 \"tenant_id\" UUID,\n \"key_hash\" TEXT NOT NULL,\n \"link_id\" UUID NOT NULL,\n \"touch_id\" UUID NOT NULL,\n \"intent_hash\" TEXT NOT NULL,\n \"caller_evidence_hash\" TEXT NOT NULL,\n \"requested_occurred_at\" TEXT NOT NULL\n);",
10769
+ "columns": {
10770
+ "id": {
10771
+ "type": "UUID",
10772
+ "primaryKey": true,
10773
+ "referenceKind": "id",
10774
+ "notNull": true
10775
+ },
10776
+ "slug": {
10777
+ "type": "TEXT",
10778
+ "notNull": true
10779
+ },
10780
+ "context": {
10781
+ "type": "TEXT",
10782
+ "notNull": true,
10783
+ "default": ""
10784
+ },
10785
+ "created_at": {
10786
+ "type": "TIMESTAMP",
10787
+ "notNull": true,
10788
+ "default": "current_timestamp"
10789
+ },
10790
+ "updated_at": {
10791
+ "type": "TIMESTAMP",
10792
+ "notNull": true,
10793
+ "default": "current_timestamp"
10794
+ },
10795
+ "tenant_id": {
10796
+ "type": "UUID",
10797
+ "referenceKind": "tenantId",
10798
+ "notNull": false,
10799
+ "unique": false
10800
+ },
10801
+ "key_hash": {
10802
+ "type": "TEXT",
10803
+ "notNull": true,
10804
+ "unique": false
10805
+ },
10806
+ "link_id": {
10807
+ "type": "UUID",
10808
+ "notNull": true,
10809
+ "unique": false
10810
+ },
10811
+ "touch_id": {
10812
+ "type": "UUID",
10813
+ "notNull": true,
10814
+ "unique": false
10815
+ },
10816
+ "intent_hash": {
10817
+ "type": "TEXT",
10818
+ "notNull": true,
10819
+ "unique": false
10820
+ },
10821
+ "caller_evidence_hash": {
10822
+ "type": "TEXT",
10823
+ "notNull": true,
10824
+ "unique": false
10825
+ },
10826
+ "requested_occurred_at": {
10827
+ "type": "TEXT",
10828
+ "notNull": true,
10829
+ "unique": false
10830
+ }
10831
+ },
10832
+ "indexes": [
10833
+ {
10834
+ "name": "referral_click_operations_id_idx",
10835
+ "columns": [
10836
+ "id"
10837
+ ]
10838
+ },
10839
+ {
10840
+ "name": "referral_click_operations_slug_context_idx",
10841
+ "columns": [
10842
+ "slug",
10843
+ "context"
10844
+ ],
10845
+ "unique": true
10846
+ },
10847
+ {
10848
+ "name": "referral_click_operations_link_id_idx",
10849
+ "columns": [
10850
+ "link_id"
10851
+ ]
10852
+ },
10853
+ {
10854
+ "name": "referral_click_operations_touch_id_idx",
10855
+ "columns": [
10856
+ "touch_id"
10857
+ ]
10858
+ }
10859
+ ],
10860
+ "version": "f82840ee"
10861
+ }
10862
+ },
10317
10863
  "@happyvertical/smrt-sales:ReferralLink": {
10318
10864
  "name": "referrallink",
10319
10865
  "className": "ReferralLink",
@@ -0,0 +1,29 @@
1
+ import { SmrtCollection } from '@happyvertical/smrt-core';
2
+ import { ReferralClickOperation } from '../models/ReferralClickOperation.js';
3
+ export interface ClaimReferralClickOperationInput {
4
+ operationId: string;
5
+ tenantId: string | null;
6
+ keyHash: string;
7
+ linkId: string;
8
+ touchId: string;
9
+ intentHash: string;
10
+ callerEvidenceHash: string;
11
+ requestedOccurredAt: string;
12
+ }
13
+ export interface ClaimReferralClickOperationResult {
14
+ operation: ReferralClickOperation | null;
15
+ claimed: boolean;
16
+ }
17
+ export declare class ReferralClickOperationCollection extends SmrtCollection<ReferralClickOperation> {
18
+ static readonly _itemClass: typeof ReferralClickOperation;
19
+ /** Tenant-filtered lookup; a foreign operation payload remains invisible. */
20
+ findByOperationId(operationId: string): Promise<ReferralClickOperation | null>;
21
+ /**
22
+ * Claim the deterministic operation UUID without changing a winner.
23
+ * Must run in the transaction that creates the touch and increments the
24
+ * link counter.
25
+ */
26
+ claim(input: ClaimReferralClickOperationInput): Promise<ClaimReferralClickOperationResult>;
27
+ }
28
+ export default ReferralClickOperationCollection;
29
+ //# sourceMappingURL=ReferralClickOperationCollection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReferralClickOperationCollection.d.ts","sourceRoot":"","sources":["../../../src/referrals/collections/ReferralClickOperationCollection.ts"],"names":[],"mappings":"AAAA,uEAAuE;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,MAAM,WAAW,gCAAgC;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,iCAAiC;IAChD,SAAS,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACzC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,qBAAa,gCAAiC,SAAQ,cAAc,CAAC,sBAAsB,CAAC;IAC1F,MAAM,CAAC,QAAQ,CAAC,UAAU,gCAA0B;IAEpD,6EAA6E;IACvE,iBAAiB,CACrB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC;IAIzC;;;;OAIG;IACG,KAAK,CACT,KAAK,EAAE,gCAAgC,GACtC,OAAO,CAAC,iCAAiC,CAAC;CA0B9C;AAED,eAAe,gCAAgC,CAAC"}