@quickpipeaiab/domain 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/billing.ttl CHANGED
@@ -12,8 +12,8 @@
12
12
  @prefix sh: <http://www.w3.org/ns/shacl#> .
13
13
 
14
14
  <https://id.quickpipe.ai/domain/billing> a owl:Ontology ;
15
- owl:versionIRI <https://id.quickpipe.ai/domain/0.11.0/billing> ;
16
- owl:versionInfo "0.11.0" ;
15
+ owl:versionIRI <https://id.quickpipe.ai/domain/0.12.0/billing> ;
16
+ owl:versionInfo "0.12.0" ;
17
17
  core:title "QuickPipe domain model: billing"@en ;
18
18
  core:preferred-prefix "billing" ;
19
19
  core:preferred-namespace "https://id.quickpipe.ai/domain/billing#" ;
@@ -669,7 +669,7 @@ billing:dispute-opened a owl:Class ;
669
669
  owl:members ( billing:balance-low billing:balance-recovered billing:limit-threshold billing:credits-expiring billing:top-up-completed billing:top-up-failed billing:plan-changed billing:dispute-opened ) .
670
670
 
671
671
  [] a owl:AllDisjointClasses ;
672
- owl:members ( billing:balance billing:entry billing:work billing:source billing:unit-cost billing:charge billing:quote billing:hold billing:requester billing:tag billing:setting billing:plan billing:pack billing:price billing:quota billing:subscription billing:subscription-period billing:grant-period billing:plan-change billing:cancel billing:checkout billing:portal billing:top-up billing:audit-row billing:statement billing:webhook billing:discount billing:dispute billing:outbox-row billing:pre-signup-cost ) .
672
+ owl:members ( billing:balance billing:entry billing:work billing:source billing:unit-cost billing:charge billing:quote billing:hold billing:requester billing:tag billing:setting billing:plan billing:pack billing:price billing:quota billing:subscription billing:subscription-period billing:grant-period billing:plan-change billing:cancel billing:checkout billing:portal billing:top-up billing:audit-row billing:statement billing:webhook billing:discount billing:refund billing:dispute billing:outbox-row billing:pre-signup-cost billing:withdrawal-waiver ) .
673
673
 
674
674
  billing:plan-version a owl:Class ;
675
675
  owl:equivalentClass [ a owl:Class ; owl:intersectionOf ( billing:plan [ a owl:Restriction ; owl:onProperty billing:replaces-plan ; owl:someValuesFrom billing:plan ] ) ] ;
@@ -696,6 +696,14 @@ billing:discount-redemption a owl:Class ;
696
696
  core:defined-by <https://id.quickpipe.ai/domain/billing> ;
697
697
  core:owner core:billing .
698
698
 
699
+ billing:refund a owl:Class ;
700
+ rdfs:subClassOf core:entity ;
701
+ core:label "refund"@en ;
702
+ core:definition "A return of money of one payment to the buyer. Only a staff user with the access-role `finance` starts it."@en ;
703
+ core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Plans and payments" ;
704
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
705
+ core:owner core:billing .
706
+
699
707
  billing:dispute a owl:Class ;
700
708
  rdfs:subClassOf core:entity ;
701
709
  core:label "dispute"@en ;
@@ -868,6 +876,16 @@ billing:has-expiry a owl:DatatypeProperty , owl:FunctionalProperty ;
868
876
  core:owner core:billing ;
869
877
  core:gdpr-category core-vocab:gdpr-category-non-personal .
870
878
 
879
+ billing:has-plan-expiry a owl:DatatypeProperty , owl:FunctionalProperty ;
880
+ rdfs:domain billing:hold ;
881
+ rdfs:range xsd:dateTime ;
882
+ core:label "plan expiry"@en ;
883
+ core:definition "The expiry of the grant period of the credits of the part `plan` that the hold took. A hold that takes no plan credits has none."@en ;
884
+ core:source "docs/specs/billing/docs/internal/decisions/0006-holds.md#Decision" ;
885
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
886
+ core:owner core:billing ;
887
+ core:gdpr-category core-vocab:gdpr-category-non-personal .
888
+
871
889
  billing:has-stripe-customer-id a owl:DatatypeProperty , owl:FunctionalProperty ;
872
890
  rdfs:domain billing:balance ;
873
891
  rdfs:range xsd:string ;
@@ -1003,7 +1021,7 @@ billing:of-spender a owl:ObjectProperty , owl:FunctionalProperty ;
1003
1021
  billing:has-cost a owl:DatatypeProperty , owl:FunctionalProperty ;
1004
1022
  rdfs:domain [ a owl:Class ; owl:unionOf ( core:entity core:activity ) ] ;
1005
1023
  rdfs:range xsd:long ;
1006
- core:label "has cost"@en ;
1024
+ core:label "cost"@en ;
1007
1025
  core:definition "The cost of the record in micro-USD: what the paid work of the record cost QuickPipe, for example one attempt, one call, one spend entry, one unit of a unit cost or the sum that a spender settles on a hold."@en ;
1008
1026
  core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Spenders and holds" ;
1009
1027
  core:defined-by <https://id.quickpipe.ai/domain/billing> ;
@@ -1746,7 +1764,7 @@ billing:of-discount a owl:ObjectProperty , owl:FunctionalProperty ;
1746
1764
  billing:has-usage-discount a owl:DatatypeProperty , owl:FunctionalProperty ;
1747
1765
  rdfs:domain [ a owl:Class ; owl:unionOf ( billing:hold billing:quote ) ] ;
1748
1766
  rdfs:range xsd:long ;
1749
- core:label "has usage discount"@en ;
1767
+ core:label "usage discount"@en ;
1750
1768
  core:definition "The usage discount that a hold freezes or a quote uses: the percentage that `billing` removes from a charge for one spender, in basis points. It is 0 when the workspace has no active usage discount for the spender."@en ;
1751
1769
  core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Discounts" ;
1752
1770
  core:defined-by <https://id.quickpipe.ai/domain/billing> ;
@@ -2283,6 +2301,16 @@ billing:column-holds-expiry a owl:NamedIndividual , core:column ;
2283
2301
  core:defined-by <https://id.quickpipe.ai/domain/billing> ;
2284
2302
  core:owner core:billing .
2285
2303
 
2304
+ billing:column-holds-plan-expiry a owl:NamedIndividual , core:column ;
2305
+ core:of-table billing:table-money-holds ;
2306
+ core:has-name "plan_expiry" ;
2307
+ core:stores-property billing:has-plan-expiry ;
2308
+ core:label "money.holds.plan_expiry"@en ;
2309
+ core:definition "The expiry of the grant period of the plan credits of the hold. It is empty when the hold took no plan credits."@en ;
2310
+ core:source "docs/specs/billing/docs/internal/decisions/0010-storage.md#Decision" ;
2311
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
2312
+ core:owner core:billing .
2313
+
2286
2314
  billing:column-holds-charge a owl:NamedIndividual , core:column ;
2287
2315
  core:of-table billing:table-money-holds ;
2288
2316
  core:has-name "charge" ;
@@ -3741,3 +3769,145 @@ billing:column-pre-signup-costs-created-at a owl:NamedIndividual , core:column ;
3741
3769
  core:source "docs/specs/billing/docs/internal/decisions/0037-pre-signup-costs.md#Decision" ;
3742
3770
  core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3743
3771
  core:owner core:billing .
3772
+
3773
+ billing:spender a owl:Class ;
3774
+ rdfs:subClassOf core:service ;
3775
+ core:label "spender"@en ;
3776
+ core:definition "A service of QuickPipe that does paid work for a workspace and pays for it with credits through holds. Each channel service is a spender."@en ;
3777
+ core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Spenders and holds" ;
3778
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3779
+ core:owner core:billing .
3780
+
3781
+ billing:withdrawal-waiver a owl:Class ;
3782
+ rdfs:subClassOf core:entity ;
3783
+ core:label "withdrawal waiver"@en ;
3784
+ core:definition "The consent of a consumer at checkout to start the use of credits at once and to lose the right of withdrawal for used credits. `billing` keeps it with the payment, with the time and the text version."@en ;
3785
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3786
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3787
+ core:owner core:billing ;
3788
+ core:retention "P7Y" ;
3789
+ core:retention-clock core-vocab:retention-clock-since-created ;
3790
+ core:controller-role core-vocab:controller-role-controller .
3791
+
3792
+ billing:has-waiver-text-version a owl:DatatypeProperty , owl:FunctionalProperty ;
3793
+ rdfs:domain billing:withdrawal-waiver ;
3794
+ rdfs:range xsd:string ;
3795
+ core:label "waiver text version"@en ;
3796
+ core:definition "The version of the text of the checkbox that the buyer accepted."@en ;
3797
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3798
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3799
+ core:owner core:billing ;
3800
+ core:gdpr-category core-vocab:gdpr-category-non-personal .
3801
+
3802
+ billing:accepted-by-user a owl:DatatypeProperty , owl:FunctionalProperty ;
3803
+ rdfs:domain billing:withdrawal-waiver ;
3804
+ rdfs:range xsd:string ;
3805
+ core:label "accepted by user"@en ;
3806
+ core:definition "The id of the user who ticked the checkbox of the withdrawal waiver."@en ;
3807
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3808
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3809
+ core:owner core:billing ;
3810
+ core:gdpr-category core-vocab:gdpr-category-personal ;
3811
+ core:lawful-basis core-vocab:lawful-basis-legal-obligation ;
3812
+ core:review-status core-vocab:review-status-draft .
3813
+
3814
+ billing:has-withdrawal-waiver a owl:ObjectProperty , owl:FunctionalProperty ;
3815
+ rdfs:domain billing:top-up ;
3816
+ rdfs:range billing:withdrawal-waiver ;
3817
+ core:label "has withdrawal waiver"@en ;
3818
+ core:definition "The withdrawal waiver of a payment. A payment has zero or one."@en ;
3819
+ core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Plans and payments" ;
3820
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3821
+ core:owner core:billing .
3822
+
3823
+ billing:has-hold-lifetime a owl:DatatypeProperty , owl:FunctionalProperty ;
3824
+ rdfs:domain billing:hold ;
3825
+ rdfs:range xsd:long ;
3826
+ core:label "hold lifetime"@en ;
3827
+ core:definition "The longest time in seconds from the open of a hold to its expiry, for the hold kind of the hold. It is 24 hours for the kind `run` and 15 minutes for the kind `call`."@en ;
3828
+ core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Spenders and holds" ;
3829
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3830
+ core:owner core:billing ;
3831
+ core:unit core-vocab:unit-second ;
3832
+ core:gdpr-category core-vocab:gdpr-category-non-personal .
3833
+
3834
+ billing:has-workspace-currency a owl:ObjectProperty , owl:FunctionalProperty ;
3835
+ rdfs:domain billing:balance ;
3836
+ rdfs:range core:concept ;
3837
+ core:label "workspace currency"@en ;
3838
+ core:definition "The one currency of all payments of a workspace, as an ISO 4217 code. The billing country of the first checkout sets it. One for each workspace."@en ;
3839
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Currency" ;
3840
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3841
+ core:owner core:billing .
3842
+
3843
+ billing:has-buyer-kind a owl:ObjectProperty , owl:FunctionalProperty ;
3844
+ rdfs:domain billing:balance ;
3845
+ rdfs:range core:concept ;
3846
+ core:label "has buyer kind"@en ;
3847
+ core:definition "The buyer kind of the payer of a workspace. A buyer with a VAT number is `business`. Each other buyer is `consumer`."@en ;
3848
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Buyers" ;
3849
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3850
+ core:owner core:billing .
3851
+
3852
+ # The withdrawal waivers of the payments (billing 0025).
3853
+
3854
+ billing:table-money-withdrawal-waivers a owl:NamedIndividual , core:table ;
3855
+ core:in-database-schema billing:schema-money ;
3856
+ core:has-name "withdrawal_waivers" ;
3857
+ core:has-row-class billing:withdrawal-waiver ;
3858
+ core:label "money.withdrawal_waivers"@en ;
3859
+ core:definition "The table of the withdrawal waivers of `billing`: one row for each payment that the buyer paid after the tick of the checkbox."@en ;
3860
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3861
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3862
+ core:owner core:billing .
3863
+
3864
+ billing:column-withdrawal-waivers-entry a owl:NamedIndividual , core:column ;
3865
+ core:of-table billing:table-money-withdrawal-waivers ;
3866
+ core:has-name "entry" ;
3867
+ core:stores-property core:id ;
3868
+ core:in-primary-key true ;
3869
+ core:label "money.withdrawal_waivers.entry"@en ;
3870
+ core:definition "The id of the entry of the top-up that the waiver belongs to. It is the primary key."@en ;
3871
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3872
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3873
+ core:owner core:billing .
3874
+
3875
+ billing:column-withdrawal-waivers-workspace a owl:NamedIndividual , core:column ;
3876
+ core:of-table billing:table-money-withdrawal-waivers ;
3877
+ core:has-name "workspace" ;
3878
+ core:stores-property core:in-workspace ;
3879
+ core:label "money.withdrawal_waivers.workspace"@en ;
3880
+ core:definition "The workspace that paid."@en ;
3881
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3882
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3883
+ core:owner core:billing .
3884
+
3885
+ billing:column-withdrawal-waivers-accepted-by a owl:NamedIndividual , core:column ;
3886
+ core:of-table billing:table-money-withdrawal-waivers ;
3887
+ core:has-name "accepted_by" ;
3888
+ core:stores-property billing:accepted-by-user ;
3889
+ core:label "money.withdrawal_waivers.accepted_by"@en ;
3890
+ core:definition "The id of the user who ticked the checkbox."@en ;
3891
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3892
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3893
+ core:owner core:billing .
3894
+
3895
+ billing:column-withdrawal-waivers-accepted-at a owl:NamedIndividual , core:column ;
3896
+ core:of-table billing:table-money-withdrawal-waivers ;
3897
+ core:has-name "accepted_at" ;
3898
+ core:stores-property core:generated-at ;
3899
+ core:label "money.withdrawal_waivers.accepted_at"@en ;
3900
+ core:definition "The time of the payment with the tick."@en ;
3901
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3902
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3903
+ core:owner core:billing .
3904
+
3905
+ billing:column-withdrawal-waivers-text-version a owl:NamedIndividual , core:column ;
3906
+ core:of-table billing:table-money-withdrawal-waivers ;
3907
+ core:has-name "text_version" ;
3908
+ core:stores-property billing:has-waiver-text-version ;
3909
+ core:label "money.withdrawal_waivers.text_version"@en ;
3910
+ core:definition "The version of the text of the checkbox."@en ;
3911
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3912
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3913
+ core:owner core:billing .
package/campaigns.ttl CHANGED
@@ -13,8 +13,8 @@
13
13
 
14
14
  <https://id.quickpipe.ai/domain/campaigns>
15
15
  a owl:Ontology ;
16
- owl:versionIRI <https://id.quickpipe.ai/domain/0.11.0/campaigns> ;
17
- owl:versionInfo "0.11.0" ;
16
+ owl:versionIRI <https://id.quickpipe.ai/domain/0.12.0/campaigns> ;
17
+ owl:versionInfo "0.12.0" ;
18
18
  owl:imports <https://id.quickpipe.ai/domain/core> ,
19
19
  <https://id.quickpipe.ai/domain/vocab/campaigns> ,
20
20
  <https://id.quickpipe.ai/domain/desk> ,
@@ -246,10 +246,18 @@ campaigns:planned-enrollment owl:hasKey ( campaigns:of-campaign campaigns:of-lea
246
246
 
247
247
  campaigns:step-call owl:hasKey ( campaigns:in-enrollment campaigns:for-step campaigns:has-attempt ) .
248
248
 
249
+ campaigns:campaign-rule a owl:Class ;
250
+ rdfs:subClassOf core:entity ;
251
+ core:label "campaign rule"@en ;
252
+ core:definition "The reference of a campaign to its score rule: the decision draft of `lead-scoring` that holds the rule, and the event names that the campaign selects. A campaign has at most one rule. `outreach` keeps no copy of the rule."@en ;
253
+ core:source "docs/specs/outreach/docs/internal/decisions/0015-kai-creates-the-campaign.md#Decision" ;
254
+ core:defined-by <https://id.quickpipe.ai/domain/campaigns> ;
255
+ core:owner core:outreach .
256
+
249
257
  campaigns:kai-draft owl:hasKey ( campaigns:in-enrollment campaigns:for-step ) .
250
258
 
251
259
  [] a owl:AllDisjointClasses ;
252
- owl:members ( campaigns:campaign campaigns:cadence campaigns:step campaigns:step-map campaigns:attribution campaigns:enrollment campaigns:planned-enrollment campaigns:step-position campaigns:score campaigns:link-token campaigns:device campaigns:notice campaigns:channel-account campaigns:template-of-outreach campaigns:variable campaigns:kai-draft campaigns:send-window campaigns:step-call ) .
260
+ owl:members ( campaigns:campaign campaigns:cadence campaigns:step campaigns:step-map campaigns:attribution campaigns:enrollment campaigns:planned-enrollment campaigns:step-position campaigns:score campaigns:link-token campaigns:device campaigns:notice campaigns:channel-account campaigns:template-of-outreach campaigns:variable campaigns:kai-draft campaigns:send-window campaigns:step-call campaigns:campaign-rule ) .
253
261
 
254
262
  # Tables (docs/decisions/0003-modelling-patterns.md#Tables and columns).
255
263
 
@@ -1121,8 +1129,27 @@ campaigns:has-decision a owl:ObjectProperty , owl:FunctionalProperty ;
1121
1129
  core:defined-by <https://id.quickpipe.ai/domain/campaigns> ;
1122
1130
  core:owner core:lead-scoring .
1123
1131
 
1132
+ campaigns:has-rule-draft a owl:ObjectProperty , owl:FunctionalProperty ;
1133
+ rdfs:domain campaigns:campaign-rule ;
1134
+ rdfs:range scoring:decision ;
1135
+ core:label "has rule draft"@en ;
1136
+ core:definition "The decision draft of `lead-scoring` that holds the score rule of a campaign."@en ;
1137
+ core:source "docs/specs/outreach/docs/internal/decisions/0015-kai-creates-the-campaign.md#Decision" ;
1138
+ core:defined-by <https://id.quickpipe.ai/domain/campaigns> ;
1139
+ core:owner core:outreach .
1140
+
1141
+ campaigns:has-rule-draft-version a owl:DatatypeProperty , owl:FunctionalProperty ;
1142
+ rdfs:domain campaigns:campaign-rule ;
1143
+ rdfs:range xsd:string ;
1144
+ core:label "has rule draft version"@en ;
1145
+ core:definition "The version of the decision draft that the caller keeps when it puts the rule on the campaign."@en ;
1146
+ core:source "docs/specs/lead-scoring/docs/internal/decisions/0114-the-score-rule-of-a-campaign.md#Decision" ;
1147
+ core:defined-by <https://id.quickpipe.ai/domain/campaigns> ;
1148
+ core:owner core:outreach ;
1149
+ core:gdpr-category core-vocab:gdpr-category-non-personal .
1150
+
1124
1151
  campaigns:selects-event a owl:ObjectProperty ;
1125
- rdfs:domain campaigns:campaign ;
1152
+ rdfs:domain [ a owl:Class ; owl:unionOf ( campaigns:campaign campaigns:campaign-rule ) ] ;
1126
1153
  rdfs:range core:concept ;
1127
1154
  core:label "selects event"@en ;
1128
1155
  core:definition "An event name that the user selected for the campaign. The request of `PUT /campaigns/{campaignId}` has the template, the events that the user selected and `cadences`."@en ;
@@ -2832,7 +2859,7 @@ campaigns:column-public-link-token-uses-created-at a owl:NamedIndividual , core:
2832
2859
  campaigns:table-outreach-campaign-rules a owl:NamedIndividual , core:table ;
2833
2860
  core:in-database-schema campaigns:schema-outreach ;
2834
2861
  core:has-name "campaign_rules" ;
2835
- core:not-modelled-reason "The reference to the score rule of a campaign. The model has the events that the campaign selects (`campaigns:selects-event`) and no class for the reference to the decision draft of `lead-scoring`."@en ;
2862
+ core:has-row-class campaigns:campaign-rule ;
2836
2863
  core:label "outreach.campaign_rules"@en ;
2837
2864
  core:definition "The table of the score rules of `outreach`: one row for each campaign with a rule."@en ;
2838
2865
  core:source "docs/specs/outreach/docs/internal/decisions/0015-kai-creates-the-campaign.md#Decision" ;
@@ -2842,7 +2869,7 @@ campaigns:table-outreach-campaign-rules a owl:NamedIndividual , core:table ;
2842
2869
  campaigns:column-campaign-rules-campaign-id a owl:NamedIndividual , core:column ;
2843
2870
  core:of-table campaigns:table-outreach-campaign-rules ;
2844
2871
  core:has-name "campaign_id" ;
2845
- core:not-modelled-reason "The row is not in the model. The column gives the campaign of the rule."@en ;
2872
+ core:stores-property campaigns:of-campaign ;
2846
2873
  core:in-primary-key true ;
2847
2874
  core:label "outreach.campaign_rules.campaign_id"@en ;
2848
2875
  core:definition "The id of the campaign of the score rule. It is the primary key."@en ;
@@ -2853,7 +2880,7 @@ campaigns:column-campaign-rules-campaign-id a owl:NamedIndividual , core:column
2853
2880
  campaigns:column-campaign-rules-workspace a owl:NamedIndividual , core:column ;
2854
2881
  core:of-table campaigns:table-outreach-campaign-rules ;
2855
2882
  core:has-name "workspace" ;
2856
- core:not-modelled-reason "The row is not in the model. The column gives the workspace of the campaign."@en ;
2883
+ core:stores-property core:in-workspace ;
2857
2884
  core:label "outreach.campaign_rules.workspace"@en ;
2858
2885
  core:definition "The id of the workspace of the campaign of the rule."@en ;
2859
2886
  core:source "docs/specs/outreach/docs/internal/decisions/0015-kai-creates-the-campaign.md#Decision" ;
@@ -2863,7 +2890,7 @@ campaigns:column-campaign-rules-workspace a owl:NamedIndividual , core:column ;
2863
2890
  campaigns:column-campaign-rules-draft-id a owl:NamedIndividual , core:column ;
2864
2891
  core:of-table campaigns:table-outreach-campaign-rules ;
2865
2892
  core:has-name "draft_id" ;
2866
- core:not-modelled-reason "The row is not in the model. The column gives the decision draft of `lead-scoring`."@en ;
2893
+ core:stores-property campaigns:has-rule-draft ;
2867
2894
  core:label "outreach.campaign_rules.draft_id"@en ;
2868
2895
  core:definition "The id of the decision draft of `lead-scoring` that keeps the rule."@en ;
2869
2896
  core:source "docs/specs/outreach/docs/internal/decisions/0015-kai-creates-the-campaign.md#Decision" ;
@@ -2873,7 +2900,7 @@ campaigns:column-campaign-rules-draft-id a owl:NamedIndividual , core:column ;
2873
2900
  campaigns:column-campaign-rules-draft-version a owl:NamedIndividual , core:column ;
2874
2901
  core:of-table campaigns:table-outreach-campaign-rules ;
2875
2902
  core:has-name "draft_version" ;
2876
- core:not-modelled-reason "The row is not in the model. The column gives the version of the decision draft of `lead-scoring`."@en ;
2903
+ core:stores-property campaigns:has-rule-draft-version ;
2877
2904
  core:label "outreach.campaign_rules.draft_version"@en ;
2878
2905
  core:definition "The version of the decision draft of `lead-scoring`."@en ;
2879
2906
  core:source "docs/specs/outreach/docs/internal/decisions/0015-kai-creates-the-campaign.md#Decision" ;
@@ -2883,7 +2910,7 @@ campaigns:column-campaign-rules-draft-version a owl:NamedIndividual , core:colum
2883
2910
  campaigns:column-campaign-rules-events a owl:NamedIndividual , core:column ;
2884
2911
  core:of-table campaigns:table-outreach-campaign-rules ;
2885
2912
  core:has-name "events" ;
2886
- core:not-modelled-reason "The row is not in the model. The column gives the events that the campaign selects."@en ;
2913
+ core:stores-property campaigns:selects-event ;
2887
2914
  core:label "outreach.campaign_rules.events"@en ;
2888
2915
  core:definition "The names of the events that the campaign selects, as text."@en ;
2889
2916
  core:source "docs/specs/outreach/docs/internal/decisions/0015-kai-creates-the-campaign.md#Decision" ;
package/core.ttl CHANGED
@@ -13,8 +13,8 @@
13
13
 
14
14
  <https://id.quickpipe.ai/domain/core>
15
15
  a owl:Ontology ;
16
- owl:versionIRI <https://id.quickpipe.ai/domain/0.11.0/core> ;
17
- owl:versionInfo "0.11.0" ;
16
+ owl:versionIRI <https://id.quickpipe.ai/domain/0.12.0/core> ;
17
+ owl:versionInfo "0.12.0" ;
18
18
  core:title "QuickPipe domain model: core"@en ;
19
19
  core:preferred-prefix "core" ;
20
20
  core:preferred-namespace "https://id.quickpipe.ai/domain/core#".
package/crm.ttl CHANGED
@@ -9,8 +9,8 @@
9
9
 
10
10
  <https://id.quickpipe.ai/domain/crm>
11
11
  a owl:Ontology ;
12
- owl:versionIRI <https://id.quickpipe.ai/domain/0.11.0/crm> ;
13
- owl:versionInfo "0.11.0" ;
12
+ owl:versionIRI <https://id.quickpipe.ai/domain/0.12.0/crm> ;
13
+ owl:versionInfo "0.12.0" ;
14
14
  core:title "QuickPipe domain model: crm"@en ;
15
15
  core:preferred-prefix "crm" ;
16
16
  core:preferred-namespace "https://id.quickpipe.ai/domain/crm#" ;
@@ -79,6 +79,7 @@ crm:note a owl:Class ;
79
79
  core:source "docs/specs/crm/docs/internal/decisions/0003-concepts.md#Records" ;
80
80
  core:defined-by <https://id.quickpipe.ai/domain/crm> ;
81
81
  core:owner core:crm ;
82
+ core:has-contract true ;
82
83
  core:retention "P30D" ;
83
84
  core:retention-clock core-vocab:retention-clock-since-closed ;
84
85
  core:controller-role core-vocab:controller-role-processor .
@@ -144,11 +145,11 @@ crm:for-account-record a owl:ObjectProperty , owl:FunctionalProperty ;
144
145
  core:owner core:crm .
145
146
 
146
147
  crm:has-owner-seller a owl:ObjectProperty , owl:FunctionalProperty ;
147
- rdfs:domain [ a owl:Class ; owl:unionOf ( crm:lead-record crm:account-record ) ] ;
148
+ rdfs:domain [ a owl:Class ; owl:unionOf ( crm:lead-record crm:account-record crm:deal ) ] ;
148
149
  rdfs:range desk:teammate ;
149
150
  core:label "has owner seller"@en ;
150
- core:definition "The one teammate that owns a lead record or an account record."@en ;
151
- core:hint "The teammate who owns this record."@en ;
151
+ core:definition "The one teammate that owns a lead record, an account record or a deal."@en ;
152
+ core:hint "The teammate who owns this record or deal."@en ;
152
153
  core:source "docs/specs/crm/docs/internal/decisions/0003-concepts.md#Teammates and ownership" ;
153
154
  core:defined-by <https://id.quickpipe.ai/domain/crm> ;
154
155
  core:owner core:crm .
@@ -437,3 +438,56 @@ crm:at-deal-stage a owl:ObjectProperty , owl:FunctionalProperty ;
437
438
  core:source "docs/specs/crm/docs/internal/decisions/0003-concepts.md#Records" ;
438
439
  core:defined-by <https://id.quickpipe.ai/domain/crm> ;
439
440
  core:owner core:crm .
441
+
442
+ crm:has-amount a owl:DatatypeProperty , owl:FunctionalProperty ;
443
+ rdfs:domain crm:deal ;
444
+ rdfs:range xsd:long ;
445
+ core:label "has amount"@en ;
446
+ core:definition "The value of a deal, as an integer in micro units of the currency of the deal. It is the sale data of the client, not QuickPipe money. The event `deal.created` sends it as `amountMicros`."@en ;
447
+ core:hint "The value of this sale."@en ;
448
+ core:source "docs/specs/crm/docs/internal/decisions/0003-concepts.md#Records" , "docs/specs/crm/docs/internal/decisions/0015-events-to-lead-scoring.md#Decision" ;
449
+ core:defined-by <https://id.quickpipe.ai/domain/crm> ;
450
+ core:owner core:crm ;
451
+ core:gdpr-category core-vocab:gdpr-category-non-personal .
452
+
453
+ crm:has-currency-code a owl:DatatypeProperty , owl:FunctionalProperty ;
454
+ rdfs:domain crm:deal ;
455
+ rdfs:range xsd:string ;
456
+ core:label "has currency code"@en ;
457
+ core:definition "The ISO 4217 code of the currency of the amount of a deal. The event `deal.created` sends it as `currencyCode`."@en ;
458
+ core:hint "The currency of the value of this sale."@en ;
459
+ core:source "docs/specs/crm/docs/internal/decisions/0003-concepts.md#Records" , "docs/specs/crm/docs/internal/decisions/0015-events-to-lead-scoring.md#Decision" ;
460
+ core:defined-by <https://id.quickpipe.ai/domain/crm> ;
461
+ core:owner core:crm ;
462
+ core:gdpr-category core-vocab:gdpr-category-non-personal .
463
+
464
+ crm:due-at a owl:DatatypeProperty , owl:FunctionalProperty ;
465
+ rdfs:domain crm:follow-up ;
466
+ rdfs:range xsd:dateTime ;
467
+ core:label "due at"@en ;
468
+ core:definition "The date and time at which the teammate must do a follow-up."@en ;
469
+ core:hint "When the teammate must do this follow-up."@en ;
470
+ core:source "docs/specs/crm/docs/internal/decisions/0003-concepts.md#Records" ;
471
+ core:defined-by <https://id.quickpipe.ai/domain/crm> ;
472
+ core:owner core:crm ;
473
+ core:gdpr-category core-vocab:gdpr-category-non-personal .
474
+
475
+ crm:has-follow-up-status a owl:ObjectProperty , owl:FunctionalProperty ;
476
+ rdfs:domain crm:follow-up ;
477
+ rdfs:range core:concept ;
478
+ core:label "has follow-up status"@en ;
479
+ core:definition "The one state of a follow-up, from the scheme of follow-up statuses: `todo`, `in-progress` or `done`."@en ;
480
+ core:hint "Whether this follow-up is to do, in progress or done."@en ;
481
+ core:source "docs/specs/crm/docs/internal/decisions/0003-concepts.md#Records" ;
482
+ core:defined-by <https://id.quickpipe.ai/domain/crm> ;
483
+ core:owner core:crm .
484
+
485
+ crm:for-target a owl:ObjectProperty ;
486
+ rdfs:domain crm:follow-up ;
487
+ rdfs:range [ a owl:Class ; owl:unionOf ( crm:lead-record crm:account-record crm:deal ) ] ;
488
+ core:label "for target"@en ;
489
+ core:definition "A lead record, an account record or a deal that a follow-up is about (`followUpTarget`). A follow-up has one or more targets."@en ;
490
+ core:hint "The person, account or deal that this follow-up is about."@en ;
491
+ core:source "docs/specs/crm/docs/internal/decisions/0003-concepts.md#Records" ;
492
+ core:defined-by <https://id.quickpipe.ai/domain/crm> ;
493
+ core:owner core:crm .
package/desk.ttl CHANGED
@@ -12,8 +12,8 @@
12
12
 
13
13
  <https://id.quickpipe.ai/domain/desk>
14
14
  a owl:Ontology ;
15
- owl:versionIRI <https://id.quickpipe.ai/domain/0.11.0/desk> ;
16
- owl:versionInfo "0.11.0" ;
15
+ owl:versionIRI <https://id.quickpipe.ai/domain/0.12.0/desk> ;
16
+ owl:versionInfo "0.12.0" ;
17
17
  core:title "QuickPipe domain model: desk"@en ;
18
18
  core:preferred-prefix "desk" ;
19
19
  core:preferred-namespace "https://id.quickpipe.ai/domain/desk#" ;
@@ -4151,12 +4151,31 @@ desk:column-life-merges-undo-until a owl:NamedIndividual , core:column ;
4151
4151
  core:defined-by <https://id.quickpipe.ai/domain/desk> ;
4152
4152
  core:owner core:desk .
4153
4153
 
4154
+ desk:undone-by a owl:ObjectProperty , owl:FunctionalProperty ;
4155
+ rdfs:domain desk:merge ;
4156
+ rdfs:range core:user ;
4157
+ core:label "undone by"@en ;
4158
+ core:definition "The teammate who started the undo of a merge."@en ;
4159
+ core:source "docs/specs/desk/docs/internal/decisions/0008-crm-writes.md#Decision" ;
4160
+ core:defined-by <https://id.quickpipe.ai/domain/desk> ;
4161
+ core:owner core:desk .
4162
+
4163
+ desk:column-life-merges-undone-by a owl:NamedIndividual , core:column ;
4164
+ core:of-table desk:table-life-merges ;
4165
+ core:has-name "undone_by" ;
4166
+ core:stores-property desk:undone-by ;
4167
+ core:label "life.merges.undone_by"@en ;
4168
+ core:definition "The teammate who started the undo, set when the merge gets the state `undoing`."@en ;
4169
+ core:source "docs/specs/desk/docs/internal/decisions/0008-crm-writes.md#Decision" ;
4170
+ core:defined-by <https://id.quickpipe.ai/domain/desk> ;
4171
+ core:owner core:desk .
4172
+
4154
4173
  desk:column-life-merges-state a owl:NamedIndividual , core:column ;
4155
4174
  core:of-table desk:table-life-merges ;
4156
4175
  core:has-name "state" ;
4157
- core:not-modelled-reason "The state of the merge, `open`, `undone` or `final`. The model has no scheme for it."@en ;
4176
+ core:stores-property core:has-status ;
4158
4177
  core:label "life.merges.state"@en ;
4159
- core:definition "The state of the merge: `open` in the undo window, `undone` after an undo, or `final` after the worker synced it."@en ;
4178
+ core:definition "The state of the merge: `open` in the undo window, `undoing` while the services undo it, `undone` after an undo, or `final` after the worker synced it."@en ;
4160
4179
  core:source "docs/specs/desk/docs/internal/decisions/0008-crm-writes.md#Decision" ;
4161
4180
  core:defined-by <https://id.quickpipe.ai/domain/desk> ;
4162
4181
  core:owner core:desk .
@@ -4329,7 +4348,7 @@ desk:column-agenda-held-calls-fingerprint a owl:NamedIndividual , core:column ;
4329
4348
  desk:column-agenda-held-calls-status a owl:NamedIndividual , core:column ;
4330
4349
  core:of-table desk:table-agenda-held-calls ;
4331
4350
  core:has-name "status" ;
4332
- core:not-modelled-reason "The held call status, `held`, `running`, `done`, `failed`, `refused` or `expired`. The model has the scheme `held call answer status`, which merges `held` and `running` into `pending`."@en ;
4351
+ core:stores-property core:has-status ;
4333
4352
  core:label "agenda.held_calls.status"@en ;
4334
4353
  core:definition "The stored status of the held call: `held`, `running`, `done`, `failed`, `refused` or `expired`."@en ;
4335
4354
  core:source "docs/specs/desk/docs/internal/decisions/0027-held-calls.md#Store" ;
package/domain.ttl CHANGED
@@ -7,8 +7,8 @@
7
7
 
8
8
  <https://id.quickpipe.ai/domain>
9
9
  a owl:Ontology ;
10
- owl:versionIRI <https://id.quickpipe.ai/domain/0.11.0> ;
11
- owl:versionInfo "0.11.0" ;
10
+ owl:versionIRI <https://id.quickpipe.ai/domain/0.12.0> ;
11
+ owl:versionInfo "0.12.0" ;
12
12
  core:title "QuickPipe domain model"@en ;
13
13
  owl:imports <https://id.quickpipe.ai/domain/core> ,
14
14
  <https://id.quickpipe.ai/domain/identity> ,
package/email.ttl CHANGED
@@ -11,8 +11,8 @@
11
11
 
12
12
  <https://id.quickpipe.ai/domain/email>
13
13
  a owl:Ontology ;
14
- owl:versionIRI <https://id.quickpipe.ai/domain/0.11.0/email> ;
15
- owl:versionInfo "0.11.0" ;
14
+ owl:versionIRI <https://id.quickpipe.ai/domain/0.12.0/email> ;
15
+ owl:versionInfo "0.12.0" ;
16
16
  core:title "QuickPipe domain model: email"@en ;
17
17
  core:preferred-prefix "email" ;
18
18
  core:preferred-namespace "https://id.quickpipe.ai/domain/email#" ;
package/events.ttl CHANGED
@@ -12,8 +12,8 @@
12
12
 
13
13
  <https://id.quickpipe.ai/domain/events>
14
14
  a owl:Ontology ;
15
- owl:versionIRI <https://id.quickpipe.ai/domain/0.11.0/events> ;
16
- owl:versionInfo "0.11.0" ;
15
+ owl:versionIRI <https://id.quickpipe.ai/domain/0.12.0/events> ;
16
+ owl:versionInfo "0.12.0" ;
17
17
  core:title "QuickPipe domain model: events"@en ;
18
18
  core:preferred-prefix "events" ;
19
19
  core:preferred-namespace "https://id.quickpipe.ai/domain/events#" ;
package/identity.ttl CHANGED
@@ -8,8 +8,8 @@
8
8
 
9
9
  <https://id.quickpipe.ai/domain/identity>
10
10
  a owl:Ontology ;
11
- owl:versionIRI <https://id.quickpipe.ai/domain/0.11.0/identity> ;
12
- owl:versionInfo "0.11.0" ;
11
+ owl:versionIRI <https://id.quickpipe.ai/domain/0.12.0/identity> ;
12
+ owl:versionInfo "0.12.0" ;
13
13
  core:title "QuickPipe domain model: identity"@en ;
14
14
  core:preferred-prefix "identity" ;
15
15
  core:preferred-namespace "https://id.quickpipe.ai/domain/identity#" ;
@@ -8,7 +8,7 @@
8
8
 
9
9
  <https://id.quickpipe.ai/domain/imports/external>
10
10
  a owl:Ontology ;
11
- owl:versionIRI <https://id.quickpipe.ai/domain/0.11.0/imports/external> .
11
+ owl:versionIRI <https://id.quickpipe.ai/domain/0.12.0/imports/external> .
12
12
 
13
13
  prov:Entity a owl:Class .
14
14
  prov:Activity a owl:Class .
package/leads.ttl CHANGED
@@ -13,8 +13,8 @@
13
13
 
14
14
  <https://id.quickpipe.ai/domain/leads>
15
15
  a owl:Ontology ;
16
- owl:versionIRI <https://id.quickpipe.ai/domain/0.11.0/leads> ;
17
- owl:versionInfo "0.11.0" ;
16
+ owl:versionIRI <https://id.quickpipe.ai/domain/0.12.0/leads> ;
17
+ owl:versionInfo "0.12.0" ;
18
18
  core:title "QuickPipe domain model: leads"@en ;
19
19
  core:preferred-prefix "leads" ;
20
20
  core:preferred-namespace "https://id.quickpipe.ai/domain/leads#" ;
package/linkedin.ttl CHANGED
@@ -10,8 +10,8 @@
10
10
 
11
11
  <https://id.quickpipe.ai/domain/linkedin>
12
12
  a owl:Ontology ;
13
- owl:versionIRI <https://id.quickpipe.ai/domain/0.11.0/linkedin> ;
14
- owl:versionInfo "0.11.0" ;
13
+ owl:versionIRI <https://id.quickpipe.ai/domain/0.12.0/linkedin> ;
14
+ owl:versionInfo "0.12.0" ;
15
15
  core:title "QuickPipe domain model: linkedin"@en ;
16
16
  core:preferred-prefix "linkedin" ;
17
17
  core:preferred-namespace "https://id.quickpipe.ai/domain/linkedin#" ;
package/mcp-gateway.ttl CHANGED
@@ -8,8 +8,8 @@
8
8
 
9
9
  <https://id.quickpipe.ai/domain/mcp-gateway>
10
10
  a owl:Ontology ;
11
- owl:versionIRI <https://id.quickpipe.ai/domain/0.11.0/mcp-gateway> ;
12
- owl:versionInfo "0.11.0" ;
11
+ owl:versionIRI <https://id.quickpipe.ai/domain/0.12.0/mcp-gateway> ;
12
+ owl:versionInfo "0.12.0" ;
13
13
  core:title "QuickPipe domain model: mcp-gateway"@en ;
14
14
  core:preferred-prefix "mcp-gateway" ;
15
15
  core:preferred-namespace "https://id.quickpipe.ai/domain/mcp-gateway#" ;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quickpipeaiab/domain",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "QuickPipe domain model: OWL 2 modules, SKOS concept schemes and SHACL shapes",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -19,6 +19,7 @@
19
19
  "shapes": "../../tools/py.sh python scripts/shapes.py",
20
20
  "invalid": "../../tools/py.sh python scripts/invalid.py",
21
21
  "codes": "../../tools/py.sh python scripts/codes.py",
22
+ "behavior": "../../tools/py.sh python scripts/behavior.py",
22
23
  "tables": "QUICKPIPE_TOOLS_HOST=1 ../../tools/py.sh python scripts/tables.py",
23
24
  "metrics": "../../tools/py.sh python scripts/metrics.py",
24
25
  "competency": "../../tools/py.sh python scripts/competency.py",
@@ -27,7 +28,7 @@
27
28
  "drift": "../../tools/py.sh python scripts/drift.py",
28
29
  "docs": "../../tools/py.sh python scripts/docs.py",
29
30
  "docs:html": "../../tools/py.sh python scripts/docs.py --html",
30
- "test:hint": "cd scripts && ../../../tools/py.sh python -W ignore -m unittest test_hint test_keys test_codes test_tables test_metrics test_bundle test_reasoner",
31
+ "test:hint": "cd scripts && ../../../tools/py.sh python -W ignore -m unittest test_hint test_auth_terms test_billing_concepts test_keys test_codes test_desk_codes test_outreach_refusals test_desk_plan_items test_desk_merge_state test_mcp_catalog_terms test_behavior test_tables test_metrics test_bundle test_reasoner",
31
32
  "check:model": "python3 scripts/check_model.py"
32
33
  }
33
34
  }