@quickpipeaiab/domain 0.11.0 → 0.13.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/auth.ttl CHANGED
@@ -8,8 +8,8 @@
8
8
 
9
9
  <https://id.quickpipe.ai/domain/auth>
10
10
  a owl:Ontology ;
11
- owl:versionIRI <https://id.quickpipe.ai/domain/0.11.0/auth> ;
12
- owl:versionInfo "0.11.0" ;
11
+ owl:versionIRI <https://id.quickpipe.ai/domain/0.13.0/auth> ;
12
+ owl:versionInfo "0.13.0" ;
13
13
  core:title "QuickPipe domain model: auth"@en ;
14
14
  core:preferred-prefix "auth" ;
15
15
  core:preferred-namespace "https://id.quickpipe.ai/domain/auth#" ;
@@ -31,7 +31,7 @@ auth:machine-client a owl:Class ;
31
31
  auth:session a owl:Class ;
32
32
  rdfs:subClassOf core:entity ;
33
33
  core:label "session"@en ;
34
- core:definition "The sign-in of one user in one browser. It starts at sign-in and has one refresh token."@en ;
34
+ core:definition "The sign-in of one user in one browser, or the grant of one OAuth client to one user, as 0010 tells. It starts at sign-in and has one refresh token."@en ;
35
35
  core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Sessions and tokens" ;
36
36
  core:defined-by <https://id.quickpipe.ai/domain/auth> ;
37
37
  core:owner core:auth ;
@@ -57,7 +57,7 @@ auth:exchanged-token a owl:Class ;
57
57
  core:owner core:auth .
58
58
 
59
59
  [] a owl:AllDisjointClasses ;
60
- owl:members ( auth:session auth:access-token auth:machine-scope auth:oauth-client auth:signature-key ) .
60
+ owl:members ( auth:session auth:access-token auth:machine-scope auth:oauth-client auth:signature-key auth:agent-key-credential auth:refresh-token auth:id-token ) .
61
61
 
62
62
  # Properties.
63
63
 
@@ -121,3 +121,181 @@ auth:has-client-trust a owl:ObjectProperty , owl:FunctionalProperty ;
121
121
  core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Clients and credentials" ;
122
122
  core:defined-by <https://id.quickpipe.ai/domain/auth> ;
123
123
  core:owner core:auth .
124
+
125
+ # Concepts of clients and credentials.
126
+
127
+ auth:target-service a owl:Class ;
128
+ rdfs:subClassOf core:service ;
129
+ core:label "target service"@en ;
130
+ core:definition "A service that accepts access tokens of `auth`. It is one project of `Zitadel`."@en ;
131
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Clients and credentials" ;
132
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
133
+ core:owner core:auth .
134
+
135
+ auth:agent-key-credential a owl:Class ;
136
+ rdfs:subClassOf core:key ;
137
+ core:label "agent key credential"@en ;
138
+ core:definition "The credential in `auth` of one agent key of `desk`. It belongs to one user and one workspace. Its key id is unique. It has two parts: the key pair of the user in `Zitadel`, and a row of `quickpipe.agent_keys`. The row binds the key id to the workspace."@en ;
139
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Clients and credentials" ;
140
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
141
+ core:owner core:auth .
142
+
143
+ # Concepts of the operation of auth.
144
+
145
+ auth:instance-manager a owl:Class ;
146
+ rdfs:subClassOf core:person-agent ;
147
+ core:label "instance manager"@en ;
148
+ core:definition "A human user of the organization `quickpipe` with the manager role of `Zitadel` for the instance. It has no staff access-role and is not a staff user. It does the first start of an environment."@en ;
149
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Operation of `auth`" ;
150
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
151
+ core:owner core:auth .
152
+
153
+ auth:setup-client a owl:Class ;
154
+ rdfs:subClassOf core:key ;
155
+ core:label "setup client"@en ;
156
+ core:definition "The credential with which only the setup root `infra/tofu/auth` changes the setup of `auth`. It is not a machine client."@en ;
157
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Operation of `auth`" ;
158
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
159
+ core:owner core:auth .
160
+
161
+ auth:bootstrap-key a owl:Class ;
162
+ rdfs:subClassOf core:key ;
163
+ core:label "bootstrap key"@en ;
164
+ core:definition "The key pair with which `pnpm auth:up` makes the setup client at the first start. It exists only until the setup client exists."@en ;
165
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Operation of `auth`" ;
166
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
167
+ core:owner core:auth .
168
+
169
+ auth:login-client a owl:Class ;
170
+ rdfs:subClassOf core:key ;
171
+ core:label "login client"@en ;
172
+ core:definition "The credential with which only `auth-login` calls `auth-api`. It is not a machine client."@en ;
173
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Operation of `auth`" ;
174
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
175
+ core:owner core:auth .
176
+
177
+ auth:mail-relay a owl:Class ;
178
+ rdfs:subClassOf core:service ;
179
+ core:label "mail relay"@en ;
180
+ core:definition "The SMTP server through which `auth` and `desk` send emails."@en ;
181
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Operation of `auth`" ;
182
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
183
+ core:owner core:auth .
184
+
185
+ # Concepts of sessions and tokens.
186
+
187
+ auth:refresh-token a owl:Class ;
188
+ rdfs:subClassOf core:key ;
189
+ core:label "refresh token"@en ;
190
+ core:definition "The token of a session that gets new user tokens. It ends after 30 days with no use."@en ;
191
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Sessions and tokens" ;
192
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
193
+ core:owner core:auth ;
194
+ core:retention "P30D" ;
195
+ core:retention-clock core-vocab:retention-clock-since-last-activity ;
196
+ core:controller-role core-vocab:controller-role-controller .
197
+
198
+ auth:id-token a owl:Class ;
199
+ rdfs:subClassOf core:key ;
200
+ core:label "ID token"@en ;
201
+ core:definition "A JWT that `auth` signs at the sign-in of a session. It has the claims of the user. A client sends it as `id_token_hint` when it ends the session."@en ;
202
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Sessions and tokens" ;
203
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
204
+ core:owner core:auth .
205
+
206
+ auth:subject a owl:Class ;
207
+ rdfs:subClassOf core:role ;
208
+ core:label "Subject"@en ;
209
+ core:definition "The user or the machine client for whom the token acts. It is the claim `sub`."@en ;
210
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Sessions and tokens" ;
211
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
212
+ core:owner core:auth .
213
+
214
+ auth:actor a owl:Class ;
215
+ rdfs:subClassOf core:role ;
216
+ core:label "actor"@en ;
217
+ core:definition "The party that acts for the subject of an exchanged token. It is the claim `act`."@en ;
218
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Sessions and tokens" ;
219
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
220
+ core:owner core:auth .
221
+
222
+ auth:audience a owl:Class ;
223
+ rdfs:subClassOf core:role ;
224
+ core:label "audience"@en ;
225
+ core:definition "The target service that accepts a token. It is the claim `aud`."@en ;
226
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Sessions and tokens" ;
227
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
228
+ core:owner core:auth .
229
+
230
+ auth:workspace-claim a owl:Class ;
231
+ rdfs:subClassOf core:entity ;
232
+ core:label "workspace claim"@en ;
233
+ core:definition "The one workspace of a token. Its value is the workspace id."@en ;
234
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Sessions and tokens" ;
235
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
236
+ core:owner core:auth .
237
+
238
+ auth:live-check a owl:Class ;
239
+ rdfs:subClassOf core:activity ;
240
+ core:label "live check"@en ;
241
+ core:definition "A call of a target service to the introspection of `auth` at the time of the request. It gives the state of the token and the current access-role."@en ;
242
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Sessions and tokens" ;
243
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
244
+ core:owner core:auth .
245
+
246
+ # Relations of the new concepts.
247
+
248
+ auth:for-target-service a owl:ObjectProperty , owl:FunctionalProperty ;
249
+ rdfs:domain auth:machine-scope ;
250
+ rdfs:range auth:target-service ;
251
+ core:label "for target service"@en ;
252
+ core:definition "The target service where a machine scope is a project role."@en ;
253
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Clients and credentials" ;
254
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
255
+ core:owner core:auth .
256
+
257
+ auth:has-audience a owl:ObjectProperty , owl:FunctionalProperty ;
258
+ rdfs:domain auth:access-token ;
259
+ rdfs:range auth:target-service ;
260
+ core:label "has audience"@en ;
261
+ core:definition "The target service that accepts an access token. It is the claim `aud`."@en ;
262
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Sessions and tokens" ;
263
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
264
+ core:owner core:auth .
265
+
266
+ auth:has-token-subject a owl:ObjectProperty , owl:FunctionalProperty ;
267
+ rdfs:domain auth:access-token ;
268
+ rdfs:range core:agent ;
269
+ core:label "has token subject"@en ;
270
+ core:definition "The token subject of an access token, in its claim `sub`."@en ;
271
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Sessions and tokens" ;
272
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
273
+ core:owner core:auth .
274
+
275
+ auth:has-actor a owl:ObjectProperty ;
276
+ rdfs:domain auth:exchanged-token ;
277
+ rdfs:range core:agent ;
278
+ core:label "has actor"@en ;
279
+ core:definition "The actor of an exchanged token, in its claim `act`."@en ;
280
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Sessions and tokens" ;
281
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
282
+ core:owner core:auth .
283
+
284
+ auth:signed-with-key a owl:ObjectProperty , owl:FunctionalProperty ;
285
+ rdfs:domain auth:access-token ;
286
+ rdfs:range auth:signature-key ;
287
+ core:label "signed with key"@en ;
288
+ core:definition "The signature key with which `auth` signs an access token."@en ;
289
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Sessions and tokens" ;
290
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
291
+ core:owner core:auth .
292
+
293
+ auth:of-session a owl:ObjectProperty , owl:FunctionalProperty ;
294
+ rdfs:domain auth:refresh-token ;
295
+ rdfs:range auth:session ;
296
+ core:label "of session"@en ;
297
+ core:definition "The session that a refresh token belongs to. A session has one refresh token."@en ;
298
+ core:source "docs/specs/auth/docs/internal/decisions/0003-concepts.md#Sessions and tokens" ;
299
+ core:defined-by <https://id.quickpipe.ai/domain/auth> ;
300
+ core:owner core:auth .
301
+
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.13.0/billing> ;
16
+ owl:versionInfo "0.13.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#" ;
@@ -386,6 +386,15 @@ billing:sample-maximum a owl:Class ;
386
386
  core:owner core:billing ;
387
387
  core:has-contract true .
388
388
 
389
+ billing:discount-approvals a owl:Class ;
390
+ owl:equivalentClass [ a owl:Class ; owl:intersectionOf ( billing:setting [ a owl:Restriction ; owl:onProperty billing:has-setting-name ; owl:hasValue billing-vocab:setting-name-discount-approvals ] ) ] ;
391
+ core:label "discount approvals"@en ;
392
+ core:definition "The number of staff users with the access-role `finance` that must approve a discount, as [0035](0035-promotions.md) item 14 tells"@en ;
393
+ core:source "docs/specs/billing/docs/internal/decisions/0035-promotions.md#Decision" ;
394
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
395
+ core:owner core:billing ;
396
+ core:has-contract true .
397
+
389
398
  billing:default-plan-limits a owl:Class ;
390
399
  owl:equivalentClass [ a owl:Class ; owl:intersectionOf ( billing:setting [ a owl:Restriction ; owl:onProperty billing:has-setting-name ; owl:hasValue billing-vocab:setting-name-default-plan-limits ] ) ] ;
391
400
  core:label "default plan limits"@en ;
@@ -572,6 +581,24 @@ billing:statement a owl:Class ;
572
581
  core:owner core:billing ;
573
582
  core:has-contract true .
574
583
 
584
+ billing:credit-history a owl:Class ;
585
+ rdfs:subClassOf core:entity ;
586
+ core:label "credit history"@en ;
587
+ core:definition "The list of the entries of one workspace, in pages. `GET /entries` gives it."@en ;
588
+ core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Contract" ;
589
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
590
+ core:owner core:billing ;
591
+ core:has-contract true .
592
+
593
+ billing:signature a owl:Class ;
594
+ rdfs:subClassOf core:entity ;
595
+ core:label "signature"@en ;
596
+ core:definition "The header `X-Signature` of a webhook of `billing`, in the form `t=<unix seconds>,v1=<signature>`. The signature is the hex HMAC-SHA256 of `t.body`."@en ;
597
+ core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Contract" ;
598
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
599
+ core:owner core:billing ;
600
+ core:has-contract true .
601
+
575
602
  billing:webhook a owl:Class ;
576
603
  rdfs:subClassOf core:event ;
577
604
  core:label "webhook of billing"@en ;
@@ -669,7 +696,7 @@ billing:dispute-opened a owl:Class ;
669
696
  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
697
 
671
698
  [] 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 ) .
699
+ 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
700
 
674
701
  billing:plan-version a owl:Class ;
675
702
  owl:equivalentClass [ a owl:Class ; owl:intersectionOf ( billing:plan [ a owl:Restriction ; owl:onProperty billing:replaces-plan ; owl:someValuesFrom billing:plan ] ) ] ;
@@ -696,6 +723,14 @@ billing:discount-redemption a owl:Class ;
696
723
  core:defined-by <https://id.quickpipe.ai/domain/billing> ;
697
724
  core:owner core:billing .
698
725
 
726
+ billing:refund a owl:Class ;
727
+ rdfs:subClassOf core:entity ;
728
+ core:label "refund"@en ;
729
+ core:definition "A return of money of one payment to the buyer. Only a staff user with the access-role `finance` starts it."@en ;
730
+ core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Plans and payments" ;
731
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
732
+ core:owner core:billing .
733
+
699
734
  billing:dispute a owl:Class ;
700
735
  rdfs:subClassOf core:entity ;
701
736
  core:label "dispute"@en ;
@@ -709,7 +744,7 @@ billing:pre-signup-cost a owl:Class ;
709
744
  core:label "pre-signup cost"@en ;
710
745
  core:definition "The cost of one paid call that a person made before sign-up, on the account of the organization of the platform. `billing` keeps it with the id of the onboarding session, the step, the provider and the amount in micro-USD. At the complete step, it links the cost to the new workspace. It never charges the balance of the workspace."@en ;
711
746
  core:hint "A pre-signup cost is what a paid call cost before the person signed up."@en ;
712
- core:source "docs/decisions/0032-welcome-sign-up.md#Paid work before sign-in" ;
747
+ core:source "docs/specs/billing/docs/internal/decisions/0037-pre-signup-costs.md#Decision" ;
713
748
  core:defined-by <https://id.quickpipe.ai/domain/billing> ;
714
749
  core:owner core:billing ;
715
750
  core:has-contract true ;
@@ -722,7 +757,7 @@ billing:of-cost-source a owl:ObjectProperty , owl:FunctionalProperty ;
722
757
  rdfs:range core:concept ;
723
758
  core:label "of cost source"@en ;
724
759
  core:definition "The source of a pre-signup cost, from the scheme of cost sources. A pre-signup cost always has the source `pre-signup`."@en ;
725
- core:source "docs/decisions/0032-welcome-sign-up.md#Paid work before sign-in" ;
760
+ core:source "docs/specs/billing/docs/internal/decisions/0037-pre-signup-costs.md#Decision" ;
726
761
  core:defined-by <https://id.quickpipe.ai/domain/billing> ;
727
762
  core:owner core:billing .
728
763
 
@@ -731,7 +766,7 @@ billing:of-onboarding-session-id a owl:DatatypeProperty , owl:FunctionalProperty
731
766
  rdfs:range xsd:string ;
732
767
  core:label "of onboarding session id"@en ;
733
768
  core:definition "The id of the onboarding session of `desk` of a pre-signup cost. The id groups the costs of one visit of the external welcome front end."@en ;
734
- core:source "docs/decisions/0032-welcome-sign-up.md#Paid work before sign-in" ;
769
+ core:source "docs/specs/billing/docs/internal/decisions/0037-pre-signup-costs.md#Decision" ;
735
770
  core:defined-by <https://id.quickpipe.ai/domain/billing> ;
736
771
  core:owner core:billing ;
737
772
  core:gdpr-category core-vocab:gdpr-category-non-personal .
@@ -741,7 +776,7 @@ billing:has-onboarding-step a owl:DatatypeProperty , owl:FunctionalProperty ;
741
776
  rdfs:range xsd:string ;
742
777
  core:label "has onboarding step"@en ;
743
778
  core:definition "The step of the onboarding session that made the paid call: `company`, `icp`, `count` or `preview`."@en ;
744
- core:source "docs/decisions/0032-welcome-sign-up.md#Paid work before sign-in" ;
779
+ core:source "docs/specs/billing/docs/internal/decisions/0037-pre-signup-costs.md#Decision" ;
745
780
  core:defined-by <https://id.quickpipe.ai/domain/billing> ;
746
781
  core:owner core:billing ;
747
782
  core:gdpr-category core-vocab:gdpr-category-non-personal .
@@ -751,7 +786,7 @@ billing:has-provider a owl:DatatypeProperty , owl:FunctionalProperty ;
751
786
  rdfs:range xsd:string ;
752
787
  core:label "has provider"@en ;
753
788
  core:definition "The provider of the paid call of a pre-signup cost, for example `apollo` or `treg`, as an opaque name from the adapter of the spender."@en ;
754
- core:source "docs/decisions/0032-welcome-sign-up.md#Paid work before sign-in" ;
789
+ core:source "docs/specs/billing/docs/internal/decisions/0037-pre-signup-costs.md#Decision" ;
755
790
  core:defined-by <https://id.quickpipe.ai/domain/billing> ;
756
791
  core:owner core:billing ;
757
792
  core:gdpr-category core-vocab:gdpr-category-non-personal .
@@ -868,6 +903,16 @@ billing:has-expiry a owl:DatatypeProperty , owl:FunctionalProperty ;
868
903
  core:owner core:billing ;
869
904
  core:gdpr-category core-vocab:gdpr-category-non-personal .
870
905
 
906
+ billing:has-plan-expiry a owl:DatatypeProperty , owl:FunctionalProperty ;
907
+ rdfs:domain billing:hold ;
908
+ rdfs:range xsd:dateTime ;
909
+ core:label "plan expiry"@en ;
910
+ 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 ;
911
+ core:source "docs/specs/billing/docs/internal/decisions/0006-holds.md#Decision" ;
912
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
913
+ core:owner core:billing ;
914
+ core:gdpr-category core-vocab:gdpr-category-non-personal .
915
+
871
916
  billing:has-stripe-customer-id a owl:DatatypeProperty , owl:FunctionalProperty ;
872
917
  rdfs:domain billing:balance ;
873
918
  rdfs:range xsd:string ;
@@ -1003,7 +1048,7 @@ billing:of-spender a owl:ObjectProperty , owl:FunctionalProperty ;
1003
1048
  billing:has-cost a owl:DatatypeProperty , owl:FunctionalProperty ;
1004
1049
  rdfs:domain [ a owl:Class ; owl:unionOf ( core:entity core:activity ) ] ;
1005
1050
  rdfs:range xsd:long ;
1006
- core:label "has cost"@en ;
1051
+ core:label "cost"@en ;
1007
1052
  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
1053
  core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Spenders and holds" ;
1009
1054
  core:defined-by <https://id.quickpipe.ai/domain/billing> ;
@@ -1746,7 +1791,7 @@ billing:of-discount a owl:ObjectProperty , owl:FunctionalProperty ;
1746
1791
  billing:has-usage-discount a owl:DatatypeProperty , owl:FunctionalProperty ;
1747
1792
  rdfs:domain [ a owl:Class ; owl:unionOf ( billing:hold billing:quote ) ] ;
1748
1793
  rdfs:range xsd:long ;
1749
- core:label "has usage discount"@en ;
1794
+ core:label "usage discount"@en ;
1750
1795
  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
1796
  core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Discounts" ;
1752
1797
  core:defined-by <https://id.quickpipe.ai/domain/billing> ;
@@ -2283,6 +2328,16 @@ billing:column-holds-expiry a owl:NamedIndividual , core:column ;
2283
2328
  core:defined-by <https://id.quickpipe.ai/domain/billing> ;
2284
2329
  core:owner core:billing .
2285
2330
 
2331
+ billing:column-holds-plan-expiry a owl:NamedIndividual , core:column ;
2332
+ core:of-table billing:table-money-holds ;
2333
+ core:has-name "plan_expiry" ;
2334
+ core:stores-property billing:has-plan-expiry ;
2335
+ core:label "money.holds.plan_expiry"@en ;
2336
+ 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 ;
2337
+ core:source "docs/specs/billing/docs/internal/decisions/0010-storage.md#Decision" ;
2338
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
2339
+ core:owner core:billing .
2340
+
2286
2341
  billing:column-holds-charge a owl:NamedIndividual , core:column ;
2287
2342
  core:of-table billing:table-money-holds ;
2288
2343
  core:has-name "charge" ;
@@ -3741,3 +3796,212 @@ billing:column-pre-signup-costs-created-at a owl:NamedIndividual , core:column ;
3741
3796
  core:source "docs/specs/billing/docs/internal/decisions/0037-pre-signup-costs.md#Decision" ;
3742
3797
  core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3743
3798
  core:owner core:billing .
3799
+
3800
+ billing:spender a owl:Class ;
3801
+ rdfs:subClassOf core:service ;
3802
+ core:label "spender"@en ;
3803
+ 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 ;
3804
+ core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Spenders and holds" ;
3805
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3806
+ core:owner core:billing .
3807
+
3808
+ billing:withdrawal-waiver a owl:Class ;
3809
+ rdfs:subClassOf core:entity ;
3810
+ core:label "withdrawal waiver"@en ;
3811
+ 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 ;
3812
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3813
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3814
+ core:owner core:billing ;
3815
+ core:retention "P7Y" ;
3816
+ core:retention-clock core-vocab:retention-clock-since-created ;
3817
+ core:controller-role core-vocab:controller-role-controller .
3818
+
3819
+ billing:has-waiver-text-version a owl:DatatypeProperty , owl:FunctionalProperty ;
3820
+ rdfs:domain billing:withdrawal-waiver ;
3821
+ rdfs:range xsd:string ;
3822
+ core:label "waiver text version"@en ;
3823
+ core:definition "The version of the text of the checkbox that the buyer accepted."@en ;
3824
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3825
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3826
+ core:owner core:billing ;
3827
+ core:gdpr-category core-vocab:gdpr-category-non-personal .
3828
+
3829
+ billing:accepted-by-user a owl:DatatypeProperty , owl:FunctionalProperty ;
3830
+ rdfs:domain billing:withdrawal-waiver ;
3831
+ rdfs:range xsd:string ;
3832
+ core:label "accepted by user"@en ;
3833
+ core:definition "The id of the user who ticked the checkbox of the withdrawal waiver."@en ;
3834
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3835
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3836
+ core:owner core:billing ;
3837
+ core:gdpr-category core-vocab:gdpr-category-personal ;
3838
+ core:lawful-basis core-vocab:lawful-basis-legal-obligation ;
3839
+ core:review-status core-vocab:review-status-draft .
3840
+
3841
+ billing:has-withdrawal-waiver a owl:ObjectProperty , owl:FunctionalProperty ;
3842
+ rdfs:domain billing:top-up ;
3843
+ rdfs:range billing:withdrawal-waiver ;
3844
+ core:label "has withdrawal waiver"@en ;
3845
+ core:definition "The withdrawal waiver of a payment. A payment has zero or one."@en ;
3846
+ core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Plans and payments" ;
3847
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3848
+ core:owner core:billing .
3849
+
3850
+ billing:has-hold-lifetime a owl:DatatypeProperty , owl:FunctionalProperty ;
3851
+ rdfs:domain billing:hold ;
3852
+ rdfs:range xsd:long ;
3853
+ core:label "hold lifetime"@en ;
3854
+ 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 ;
3855
+ core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Spenders and holds" ;
3856
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3857
+ core:owner core:billing ;
3858
+ core:unit core-vocab:unit-second ;
3859
+ core:gdpr-category core-vocab:gdpr-category-non-personal .
3860
+
3861
+ billing:has-workspace-currency a owl:ObjectProperty , owl:FunctionalProperty ;
3862
+ rdfs:domain billing:balance ;
3863
+ rdfs:range core:concept ;
3864
+ core:label "workspace currency"@en ;
3865
+ 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 ;
3866
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Currency" ;
3867
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3868
+ core:owner core:billing .
3869
+
3870
+ billing:has-buyer-kind a owl:ObjectProperty , owl:FunctionalProperty ;
3871
+ rdfs:domain billing:balance ;
3872
+ rdfs:range core:concept ;
3873
+ core:label "has buyer kind"@en ;
3874
+ 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 ;
3875
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Buyers" ;
3876
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3877
+ core:owner core:billing .
3878
+
3879
+ # Metric instruments (billing 0003 Metrics, planned in 0029).
3880
+
3881
+ billing:metric-attribute-error-code a owl:NamedIndividual , core:metric-attribute ;
3882
+ core:has-name "code" ;
3883
+ core:takes-values-from billing-vocab:error-code ;
3884
+ core:label "error code attribute of billing"@en ;
3885
+ core:definition "The metric attribute with the error code of a refused hold."@en ;
3886
+ core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Metrics" ;
3887
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3888
+ core:owner core:billing .
3889
+
3890
+ billing:metric-hold-latency a owl:NamedIndividual , core:metric-instrument ;
3891
+ core:has-name "hold.latency" ;
3892
+ core:has-instrument-type core-vocab:instrument-type-histogram ;
3893
+ core:in-unit core-vocab:unit-second ;
3894
+ core:planned-in "docs/specs/billing/docs/internal/decisions/0029-metrics-and-alerts.md#Decision" ;
3895
+ core:label "hold latency"@en ;
3896
+ core:definition "The time from the request to the response of `POST /holds`."@en ;
3897
+ core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Metrics" ;
3898
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3899
+ core:owner core:billing .
3900
+
3901
+ billing:metric-hold-refusal a owl:NamedIndividual , core:metric-instrument ;
3902
+ core:has-name "hold.refusal" ;
3903
+ core:has-instrument-type core-vocab:instrument-type-counter ;
3904
+ core:in-unit core-vocab:unit-one ;
3905
+ core:planned-in "docs/specs/billing/docs/internal/decisions/0029-metrics-and-alerts.md#Decision" ;
3906
+ core:has-metric-attribute billing:metric-attribute-error-code ;
3907
+ core:label "refusal count"@en ;
3908
+ core:definition "The number of refused holds, for each error code."@en ;
3909
+ core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Metrics" ;
3910
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3911
+ core:owner core:billing .
3912
+
3913
+ billing:metric-hold-expired a owl:NamedIndividual , core:metric-instrument ;
3914
+ core:has-name "hold.expired" ;
3915
+ core:has-instrument-type core-vocab:instrument-type-counter ;
3916
+ core:in-unit core-vocab:unit-one ;
3917
+ core:planned-in "docs/specs/billing/docs/internal/decisions/0029-metrics-and-alerts.md#Decision" ;
3918
+ core:label "expired hold count"@en ;
3919
+ core:definition "The number of holds that got the status `expired`."@en ;
3920
+ core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Metrics" ;
3921
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3922
+ core:owner core:billing .
3923
+
3924
+ billing:metric-payment-drift a owl:NamedIndividual , core:metric-instrument ;
3925
+ core:has-name "payment.drift" ;
3926
+ core:has-instrument-type core-vocab:instrument-type-counter ;
3927
+ core:in-unit core-vocab:unit-one ;
3928
+ core:planned-in "docs/specs/billing/docs/internal/decisions/0029-metrics-and-alerts.md#Decision" ;
3929
+ core:label "payment drift"@en ;
3930
+ core:definition "The number of payments, refunds and disputes of the payments port with no entry in `billing`, and of the entries with no record in the payments port."@en ;
3931
+ core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Metrics" ;
3932
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3933
+ core:owner core:billing .
3934
+
3935
+ billing:metric-webhook-failure a owl:NamedIndividual , core:metric-instrument ;
3936
+ core:has-name "webhook.failure" ;
3937
+ core:has-instrument-type core-vocab:instrument-type-counter ;
3938
+ core:in-unit core-vocab:unit-one ;
3939
+ core:planned-in "docs/specs/billing/docs/internal/decisions/0029-metrics-and-alerts.md#Decision" ;
3940
+ core:label "webhook failure count"@en ;
3941
+ core:definition "The number of webhooks that `desk` did not accept after all retries."@en ;
3942
+ core:source "docs/specs/billing/docs/internal/decisions/0003-concepts.md#Metrics" ;
3943
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3944
+ core:owner core:billing .
3945
+
3946
+ # The withdrawal waivers of the payments (billing 0025).
3947
+
3948
+ billing:table-money-withdrawal-waivers a owl:NamedIndividual , core:table ;
3949
+ core:in-database-schema billing:schema-money ;
3950
+ core:has-name "withdrawal_waivers" ;
3951
+ core:has-row-class billing:withdrawal-waiver ;
3952
+ core:label "money.withdrawal_waivers"@en ;
3953
+ 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 ;
3954
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3955
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3956
+ core:owner core:billing .
3957
+
3958
+ billing:column-withdrawal-waivers-entry a owl:NamedIndividual , core:column ;
3959
+ core:of-table billing:table-money-withdrawal-waivers ;
3960
+ core:has-name "entry" ;
3961
+ core:stores-property core:id ;
3962
+ core:in-primary-key true ;
3963
+ core:label "money.withdrawal_waivers.entry"@en ;
3964
+ core:definition "The id of the entry of the top-up that the waiver belongs to. It is the primary key."@en ;
3965
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3966
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3967
+ core:owner core:billing .
3968
+
3969
+ billing:column-withdrawal-waivers-workspace a owl:NamedIndividual , core:column ;
3970
+ core:of-table billing:table-money-withdrawal-waivers ;
3971
+ core:has-name "workspace" ;
3972
+ core:stores-property core:in-workspace ;
3973
+ core:label "money.withdrawal_waivers.workspace"@en ;
3974
+ core:definition "The workspace that paid."@en ;
3975
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3976
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3977
+ core:owner core:billing .
3978
+
3979
+ billing:column-withdrawal-waivers-accepted-by a owl:NamedIndividual , core:column ;
3980
+ core:of-table billing:table-money-withdrawal-waivers ;
3981
+ core:has-name "accepted_by" ;
3982
+ core:stores-property billing:accepted-by-user ;
3983
+ core:label "money.withdrawal_waivers.accepted_by"@en ;
3984
+ core:definition "The id of the user who ticked the checkbox."@en ;
3985
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3986
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3987
+ core:owner core:billing .
3988
+
3989
+ billing:column-withdrawal-waivers-accepted-at a owl:NamedIndividual , core:column ;
3990
+ core:of-table billing:table-money-withdrawal-waivers ;
3991
+ core:has-name "accepted_at" ;
3992
+ core:stores-property core:generated-at ;
3993
+ core:label "money.withdrawal_waivers.accepted_at"@en ;
3994
+ core:definition "The time of the payment with the tick."@en ;
3995
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
3996
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
3997
+ core:owner core:billing .
3998
+
3999
+ billing:column-withdrawal-waivers-text-version a owl:NamedIndividual , core:column ;
4000
+ core:of-table billing:table-money-withdrawal-waivers ;
4001
+ core:has-name "text_version" ;
4002
+ core:stores-property billing:has-waiver-text-version ;
4003
+ core:label "money.withdrawal_waivers.text_version"@en ;
4004
+ core:definition "The version of the text of the checkbox."@en ;
4005
+ core:source "docs/specs/billing/docs/internal/decisions/0025-currency-and-buyers.md#Withdrawal waiver" ;
4006
+ core:defined-by <https://id.quickpipe.ai/domain/billing> ;
4007
+ core:owner core:billing .