@proveanything/smartlinks 1.15.3 → 1.15.5
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/dist/api/appConfiguration.d.ts +90 -1
- package/dist/api/appConfiguration.js +117 -0
- package/dist/api/collection.d.ts +6 -2
- package/dist/api/collection.js +6 -2
- package/dist/cache.d.ts +19 -0
- package/dist/cache.js +25 -0
- package/dist/docs/API_SUMMARY.md +157 -11
- package/dist/docs/app-data-storage.md +2 -0
- package/dist/docs/appConfig.md +483 -0
- package/dist/docs/overview.md +20 -0
- package/dist/docs/proof-product-data-scoping.md +459 -0
- package/dist/openapi.yaml +222 -4
- package/dist/types/appConfiguration.d.ts +83 -0
- package/dist/types/collection.d.ts +11 -2
- package/dist/types/product.d.ts +37 -0
- package/dist/types/proof.d.ts +39 -3
- package/docs/API_SUMMARY.md +157 -11
- package/docs/app-data-storage.md +2 -0
- package/docs/appConfig.md +483 -0
- package/docs/overview.md +20 -0
- package/docs/proof-product-data-scoping.md +459 -0
- package/openapi.yaml +222 -4
- package/package.json +1 -1
package/dist/openapi.yaml
CHANGED
|
@@ -9602,7 +9602,7 @@ paths:
|
|
|
9602
9602
|
get:
|
|
9603
9603
|
tags:
|
|
9604
9604
|
- collection
|
|
9605
|
-
summary: Retrieve all configured app module definitions for a collection (public endpoint).
|
|
9605
|
+
summary: "Retrieve all configured app module definitions for a collection (public endpoint), plus the collection's `appConfig` entitlements data (`system.features`, `system.meters`, `entitledAppGroups`, `itemRecordMode`, etc.) in the same response."
|
|
9606
9606
|
operationId: collection_getAppsConfig
|
|
9607
9607
|
security: []
|
|
9608
9608
|
parameters:
|
|
@@ -15592,6 +15592,140 @@ components:
|
|
|
15592
15592
|
required:
|
|
15593
15593
|
- id
|
|
15594
15594
|
- name
|
|
15595
|
+
AppEntry:
|
|
15596
|
+
type: object
|
|
15597
|
+
properties:
|
|
15598
|
+
id:
|
|
15599
|
+
type: string
|
|
15600
|
+
uniqueName:
|
|
15601
|
+
type: string
|
|
15602
|
+
customName:
|
|
15603
|
+
type: string
|
|
15604
|
+
active:
|
|
15605
|
+
type: boolean
|
|
15606
|
+
all:
|
|
15607
|
+
type: boolean
|
|
15608
|
+
live:
|
|
15609
|
+
type: boolean
|
|
15610
|
+
faIcon:
|
|
15611
|
+
type: string
|
|
15612
|
+
versionChannel:
|
|
15613
|
+
type: string
|
|
15614
|
+
enum:
|
|
15615
|
+
- stable
|
|
15616
|
+
- beta
|
|
15617
|
+
- dev
|
|
15618
|
+
reason:
|
|
15619
|
+
type: string
|
|
15620
|
+
enum:
|
|
15621
|
+
- not_entitled
|
|
15622
|
+
required:
|
|
15623
|
+
- id
|
|
15624
|
+
- uniqueName
|
|
15625
|
+
- active
|
|
15626
|
+
MeterEntry:
|
|
15627
|
+
type: object
|
|
15628
|
+
properties:
|
|
15629
|
+
included:
|
|
15630
|
+
type: number
|
|
15631
|
+
stripePriceId:
|
|
15632
|
+
type: string
|
|
15633
|
+
stripeMeterId:
|
|
15634
|
+
type: string
|
|
15635
|
+
required:
|
|
15636
|
+
- included
|
|
15637
|
+
AppliedOverridesSummary:
|
|
15638
|
+
type: object
|
|
15639
|
+
properties:
|
|
15640
|
+
features:
|
|
15641
|
+
type: array
|
|
15642
|
+
items:
|
|
15643
|
+
type: string
|
|
15644
|
+
meters:
|
|
15645
|
+
type: array
|
|
15646
|
+
items:
|
|
15647
|
+
type: string
|
|
15648
|
+
entitledAppGroups:
|
|
15649
|
+
type: array
|
|
15650
|
+
items:
|
|
15651
|
+
type: string
|
|
15652
|
+
addOnKeys:
|
|
15653
|
+
type: array
|
|
15654
|
+
items:
|
|
15655
|
+
type: string
|
|
15656
|
+
apps:
|
|
15657
|
+
type: array
|
|
15658
|
+
items:
|
|
15659
|
+
type: string
|
|
15660
|
+
accountType:
|
|
15661
|
+
type: boolean
|
|
15662
|
+
note:
|
|
15663
|
+
type: string
|
|
15664
|
+
SystemBlock:
|
|
15665
|
+
type: object
|
|
15666
|
+
properties:
|
|
15667
|
+
basePlanId:
|
|
15668
|
+
type: string
|
|
15669
|
+
addOnKeys:
|
|
15670
|
+
type: array
|
|
15671
|
+
items:
|
|
15672
|
+
type: string
|
|
15673
|
+
apps:
|
|
15674
|
+
type: array
|
|
15675
|
+
items:
|
|
15676
|
+
type: string
|
|
15677
|
+
features:
|
|
15678
|
+
type: object
|
|
15679
|
+
additionalProperties:
|
|
15680
|
+
type: boolean
|
|
15681
|
+
meters:
|
|
15682
|
+
type: object
|
|
15683
|
+
additionalProperties:
|
|
15684
|
+
$ref: "#/components/schemas/MeterEntry"
|
|
15685
|
+
entitledAppGroups:
|
|
15686
|
+
type: array
|
|
15687
|
+
items:
|
|
15688
|
+
type: string
|
|
15689
|
+
accountType:
|
|
15690
|
+
type: string
|
|
15691
|
+
enum:
|
|
15692
|
+
- enterprise
|
|
15693
|
+
- standard
|
|
15694
|
+
syncedAt:
|
|
15695
|
+
type: string
|
|
15696
|
+
syncedFromSubscriptionId:
|
|
15697
|
+
type: string
|
|
15698
|
+
appliedOverrides:
|
|
15699
|
+
$ref: "#/components/schemas/AppliedOverridesSummary"
|
|
15700
|
+
AppConfigSettings:
|
|
15701
|
+
type: object
|
|
15702
|
+
properties:
|
|
15703
|
+
id:
|
|
15704
|
+
type: string
|
|
15705
|
+
enum:
|
|
15706
|
+
- appConfig
|
|
15707
|
+
apps:
|
|
15708
|
+
type: array
|
|
15709
|
+
items:
|
|
15710
|
+
$ref: "#/components/schemas/AppEntry"
|
|
15711
|
+
addOns:
|
|
15712
|
+
type: array
|
|
15713
|
+
items:
|
|
15714
|
+
type: string
|
|
15715
|
+
requestedBasePlanId:
|
|
15716
|
+
type: string
|
|
15717
|
+
itemRecordMode:
|
|
15718
|
+
type: string
|
|
15719
|
+
enum:
|
|
15720
|
+
- registered
|
|
15721
|
+
- owned
|
|
15722
|
+
virtualItemsEnabled:
|
|
15723
|
+
type: boolean
|
|
15724
|
+
system:
|
|
15725
|
+
$ref: "#/components/schemas/SystemBlock"
|
|
15726
|
+
required:
|
|
15727
|
+
- id
|
|
15728
|
+
- apps
|
|
15595
15729
|
AppBundle:
|
|
15596
15730
|
type: object
|
|
15597
15731
|
properties:
|
|
@@ -24084,6 +24218,67 @@ components:
|
|
|
24084
24218
|
$ref: "#/components/schemas/JsonValue"
|
|
24085
24219
|
required:
|
|
24086
24220
|
- claimId
|
|
24221
|
+
ScopedFieldOption:
|
|
24222
|
+
type: object
|
|
24223
|
+
properties:
|
|
24224
|
+
value:
|
|
24225
|
+
type: string
|
|
24226
|
+
label:
|
|
24227
|
+
type: string
|
|
24228
|
+
required:
|
|
24229
|
+
- value
|
|
24230
|
+
- label
|
|
24231
|
+
ScopedFieldDef:
|
|
24232
|
+
type: object
|
|
24233
|
+
properties:
|
|
24234
|
+
key:
|
|
24235
|
+
type: string
|
|
24236
|
+
label:
|
|
24237
|
+
type: string
|
|
24238
|
+
type:
|
|
24239
|
+
$ref: "#/components/schemas/ScopedFieldType"
|
|
24240
|
+
required:
|
|
24241
|
+
type: boolean
|
|
24242
|
+
placeholder:
|
|
24243
|
+
type: string
|
|
24244
|
+
help:
|
|
24245
|
+
type: string
|
|
24246
|
+
options:
|
|
24247
|
+
type: array
|
|
24248
|
+
items:
|
|
24249
|
+
$ref: "#/components/schemas/ScopedFieldOption"
|
|
24250
|
+
defaultValue:
|
|
24251
|
+
$ref: "#/components/schemas/JsonValue"
|
|
24252
|
+
showInTable:
|
|
24253
|
+
type: boolean
|
|
24254
|
+
showInDetail:
|
|
24255
|
+
type: boolean
|
|
24256
|
+
required:
|
|
24257
|
+
- key
|
|
24258
|
+
- label
|
|
24259
|
+
- type
|
|
24260
|
+
ProductFieldsConfig:
|
|
24261
|
+
type: object
|
|
24262
|
+
properties:
|
|
24263
|
+
fields:
|
|
24264
|
+
type: array
|
|
24265
|
+
items:
|
|
24266
|
+
$ref: "#/components/schemas/ProductFieldDef"
|
|
24267
|
+
required:
|
|
24268
|
+
- fields
|
|
24269
|
+
ProofValues:
|
|
24270
|
+
type: object
|
|
24271
|
+
properties:
|
|
24272
|
+
owner:
|
|
24273
|
+
type: object
|
|
24274
|
+
additionalProperties:
|
|
24275
|
+
$ref: "#/components/schemas/JsonValue"
|
|
24276
|
+
personal:
|
|
24277
|
+
type: object
|
|
24278
|
+
additionalProperties:
|
|
24279
|
+
type: object
|
|
24280
|
+
additionalProperties:
|
|
24281
|
+
$ref: "#/components/schemas/JsonValue"
|
|
24087
24282
|
Proof:
|
|
24088
24283
|
type: object
|
|
24089
24284
|
properties:
|
|
@@ -24103,9 +24298,16 @@ components:
|
|
|
24103
24298
|
type: boolean
|
|
24104
24299
|
virtual:
|
|
24105
24300
|
type: boolean
|
|
24106
|
-
|
|
24301
|
+
data:
|
|
24107
24302
|
type: object
|
|
24108
|
-
additionalProperties:
|
|
24303
|
+
additionalProperties:
|
|
24304
|
+
$ref: "#/components/schemas/JsonValue"
|
|
24305
|
+
admin:
|
|
24306
|
+
type: object
|
|
24307
|
+
additionalProperties:
|
|
24308
|
+
$ref: "#/components/schemas/JsonValue"
|
|
24309
|
+
values:
|
|
24310
|
+
$ref: "#/components/schemas/ProofValues"
|
|
24109
24311
|
required:
|
|
24110
24312
|
- collectionId
|
|
24111
24313
|
- createdAt
|
|
@@ -24118,14 +24320,30 @@ components:
|
|
|
24118
24320
|
type: object
|
|
24119
24321
|
properties:
|
|
24120
24322
|
values:
|
|
24323
|
+
$ref: "#/components/schemas/ProofValues"
|
|
24324
|
+
data:
|
|
24121
24325
|
type: object
|
|
24122
|
-
additionalProperties:
|
|
24326
|
+
additionalProperties:
|
|
24327
|
+
$ref: "#/components/schemas/JsonValue"
|
|
24328
|
+
admin:
|
|
24329
|
+
type: object
|
|
24330
|
+
additionalProperties:
|
|
24331
|
+
$ref: "#/components/schemas/JsonValue"
|
|
24123
24332
|
claimable:
|
|
24124
24333
|
type: boolean
|
|
24125
24334
|
virtual:
|
|
24126
24335
|
type: boolean
|
|
24127
24336
|
required:
|
|
24128
24337
|
- values
|
|
24338
|
+
ProofFieldsConfig:
|
|
24339
|
+
type: object
|
|
24340
|
+
properties:
|
|
24341
|
+
fields:
|
|
24342
|
+
type: array
|
|
24343
|
+
items:
|
|
24344
|
+
$ref: "#/components/schemas/ProofFieldDef"
|
|
24345
|
+
required:
|
|
24346
|
+
- fields
|
|
24129
24347
|
ProofResponse:
|
|
24130
24348
|
type: object
|
|
24131
24349
|
additionalProperties: true
|
|
@@ -33,3 +33,86 @@ export interface WidgetInstanceSummary {
|
|
|
33
33
|
type?: string;
|
|
34
34
|
[key: string]: any;
|
|
35
35
|
}
|
|
36
|
+
/** One installed module instance on a collection. */
|
|
37
|
+
export interface AppEntry {
|
|
38
|
+
/** Instance id (typically === uniqueName). */
|
|
39
|
+
id: string;
|
|
40
|
+
/** Module id from the module catalog. */
|
|
41
|
+
uniqueName: string;
|
|
42
|
+
/** Display name, overrideable. */
|
|
43
|
+
customName?: string;
|
|
44
|
+
/** User toggle. */
|
|
45
|
+
active: boolean;
|
|
46
|
+
/** Legacy scope flag. */
|
|
47
|
+
all?: boolean;
|
|
48
|
+
/** Legacy flag. */
|
|
49
|
+
live?: boolean;
|
|
50
|
+
/** Optional FA icon override. */
|
|
51
|
+
faIcon?: string;
|
|
52
|
+
versionChannel?: 'stable' | 'beta' | 'dev';
|
|
53
|
+
/** Set by reconcile when app category is outside entitledAppGroups. */
|
|
54
|
+
reason?: 'not_entitled';
|
|
55
|
+
/** Per-module inline settings preserved verbatim. */
|
|
56
|
+
[key: string]: unknown;
|
|
57
|
+
}
|
|
58
|
+
export interface MeterEntry {
|
|
59
|
+
included: number;
|
|
60
|
+
stripePriceId?: string;
|
|
61
|
+
stripeMeterId?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface AppliedOverridesSummary {
|
|
64
|
+
features?: string[];
|
|
65
|
+
meters?: string[];
|
|
66
|
+
entitledAppGroups?: string[];
|
|
67
|
+
addOnKeys?: string[];
|
|
68
|
+
apps?: string[];
|
|
69
|
+
accountType?: boolean;
|
|
70
|
+
note?: string;
|
|
71
|
+
}
|
|
72
|
+
/** Resolved entitlements — written only by `entitlements-reconcile`, safe for every client to read. */
|
|
73
|
+
export interface SystemBlock {
|
|
74
|
+
basePlanId?: string;
|
|
75
|
+
addOnKeys?: string[];
|
|
76
|
+
/** Apps unlocked by add-ons. */
|
|
77
|
+
apps?: string[];
|
|
78
|
+
/**
|
|
79
|
+
* Explicit overrides only — an absent key is NOT "off". Resolve with
|
|
80
|
+
* `resolveFeature()` / `isFeatureEnabled()`, which apply the accountType
|
|
81
|
+
* default: `enterprise` defaults every flag to on unless explicitly
|
|
82
|
+
* `false` here; `standard` defaults every flag to off unless explicitly
|
|
83
|
+
* `true` here.
|
|
84
|
+
*/
|
|
85
|
+
features?: Record<string, boolean>;
|
|
86
|
+
meters?: Record<string, MeterEntry>;
|
|
87
|
+
/** Lowercased category names. */
|
|
88
|
+
entitledAppGroups?: string[];
|
|
89
|
+
/**
|
|
90
|
+
* Explicit account tier. `'enterprise'` flips the default for every
|
|
91
|
+
* feature flag to on (see `features`), not just an "unlimited baseline" —
|
|
92
|
+
* absence of a flag no longer means disabled for enterprise accounts.
|
|
93
|
+
*/
|
|
94
|
+
accountType?: 'enterprise' | 'standard';
|
|
95
|
+
/** ISO-8601 UTC. */
|
|
96
|
+
syncedAt?: string;
|
|
97
|
+
syncedFromSubscriptionId?: string;
|
|
98
|
+
/** Diagnostic: which override keys reconcile applied on this pass. */
|
|
99
|
+
appliedOverrides?: AppliedOverridesSummary;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Full `appConfig` settings document for a SmartLinks collection.
|
|
103
|
+
* Fetch with `appConfiguration.getAppConfig(collectionId)`.
|
|
104
|
+
*/
|
|
105
|
+
export interface AppConfigSettings {
|
|
106
|
+
id: 'appConfig';
|
|
107
|
+
/** Installed modules — the customer's chosen surface. */
|
|
108
|
+
apps: AppEntry[];
|
|
109
|
+
/** Optional mirror of add-on keys the customer has toggled. */
|
|
110
|
+
addOns?: string[];
|
|
111
|
+
/** Wizard hint — which base plan the customer picked pre-checkout. */
|
|
112
|
+
requestedBasePlanId?: string;
|
|
113
|
+
/** How the account handles individual physical items. */
|
|
114
|
+
itemRecordMode?: 'registered' | 'owned' | null;
|
|
115
|
+
virtualItemsEnabled?: boolean;
|
|
116
|
+
/** Resolved entitlement truth. Read this to gate features. */
|
|
117
|
+
system?: SystemBlock;
|
|
118
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AssetRef } from "./asset";
|
|
2
|
+
import type { AppConfigSettings } from "./appConfiguration";
|
|
2
3
|
/**
|
|
3
4
|
* Represents a Collection object.
|
|
4
5
|
*/
|
|
@@ -118,8 +119,16 @@ export interface AppConfig {
|
|
|
118
119
|
}
|
|
119
120
|
/**
|
|
120
121
|
* Response containing app configurations for a collection.
|
|
122
|
+
*
|
|
123
|
+
* As of 2026-07-18 this endpoint (`/public/collection/:id/app/config`) also
|
|
124
|
+
* carries the `appConfig` settings-group entitlements data (`system`,
|
|
125
|
+
* `addOns`, `itemRecordMode`, etc.) alongside the app catalog — the same
|
|
126
|
+
* dataset documented in docs/appConfig.md, delivered by this endpoint
|
|
127
|
+
* instead of a separate `appConfiguration.getConfig({ appId: 'appConfig' })`
|
|
128
|
+
* call. Admin-only overrides are never included here since this is a
|
|
129
|
+
* public-only endpoint.
|
|
121
130
|
*/
|
|
122
|
-
export interface AppsConfigResponse {
|
|
123
|
-
/** Array of app
|
|
131
|
+
export interface AppsConfigResponse extends Omit<AppConfigSettings, 'id' | 'apps'> {
|
|
132
|
+
/** Array of app catalog definitions for this collection. */
|
|
124
133
|
apps: AppConfig[];
|
|
125
134
|
}
|
package/dist/types/product.d.ts
CHANGED
|
@@ -85,7 +85,9 @@ export interface Product extends ProductKey {
|
|
|
85
85
|
facets?: ProductFacetMap;
|
|
86
86
|
/** Tag keys where value is true */
|
|
87
87
|
tags?: Record<string, boolean>;
|
|
88
|
+
/** Public custom data — readable by everyone, writable by business admins only. */
|
|
88
89
|
data?: Record<string, JsonValue>;
|
|
90
|
+
/** Business-only custom data — stripped from public/non-admin reads. See docs/proof-product-data-scoping.md. */
|
|
89
91
|
admin?: Record<string, JsonValue>;
|
|
90
92
|
extra?: Record<string, JsonValue>;
|
|
91
93
|
validCollections?: string[] | null;
|
|
@@ -161,3 +163,38 @@ export type ProductClaimCreateRequestBody = Omit<ProductClaimCreateInput, 'colle
|
|
|
161
163
|
export type ProductResponse = Product;
|
|
162
164
|
export type ProductCreateRequest = ProductWriteInput;
|
|
163
165
|
export type ProductUpdateRequest = Partial<Omit<ProductWriteInput, 'id'>>;
|
|
166
|
+
export type ScopedFieldType = 'text' | 'textarea' | 'number' | 'date' | 'select' | 'switch' | 'url';
|
|
167
|
+
export interface ScopedFieldOption {
|
|
168
|
+
value: string;
|
|
169
|
+
label: string;
|
|
170
|
+
}
|
|
171
|
+
export interface ScopedFieldDef {
|
|
172
|
+
/** Stable key. Written into the resolved bag at this name. */
|
|
173
|
+
key: string;
|
|
174
|
+
/** Human label for editors and read-only renderers. */
|
|
175
|
+
label: string;
|
|
176
|
+
type: ScopedFieldType;
|
|
177
|
+
required?: boolean;
|
|
178
|
+
placeholder?: string;
|
|
179
|
+
help?: string;
|
|
180
|
+
/** Required when type === 'select'. */
|
|
181
|
+
options?: ScopedFieldOption[];
|
|
182
|
+
/** Default value applied when creating a new record. */
|
|
183
|
+
defaultValue?: JsonValue;
|
|
184
|
+
/** Show as a column in the default items table. */
|
|
185
|
+
showInTable?: boolean;
|
|
186
|
+
/** Show on the inline detail / edit view. */
|
|
187
|
+
showInDetail?: boolean;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* `'public'` (default, omitted) reads/writes `product.data[key]`.
|
|
191
|
+
* `'admin'` reads/writes `product.admin[key]` (admin only).
|
|
192
|
+
*/
|
|
193
|
+
export type ProductFieldScope = 'public' | 'admin';
|
|
194
|
+
export type ProductFieldDef = ScopedFieldDef & {
|
|
195
|
+
scope?: ProductFieldScope;
|
|
196
|
+
};
|
|
197
|
+
/** Shape of the `productFields` collection settings group. */
|
|
198
|
+
export interface ProductFieldsConfig {
|
|
199
|
+
fields: ProductFieldDef[];
|
|
200
|
+
}
|
package/dist/types/proof.d.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
import { JsonValue, ScopedFieldDef } from './product';
|
|
2
|
+
/**
|
|
3
|
+
* `proof.values` — the owner + business-writable bag.
|
|
4
|
+
* Public keys sit at the root (business + current owner can write, everyone
|
|
5
|
+
* can read); `owner` and `personal` are reserved sub-keys with their own
|
|
6
|
+
* read/write rules. See docs/proof-product-data-scoping.md.
|
|
7
|
+
*/
|
|
8
|
+
export interface ProofValues {
|
|
9
|
+
[key: string]: JsonValue | Record<string, JsonValue> | Record<string, Record<string, JsonValue>> | undefined;
|
|
10
|
+
/** Owner-scoped: read/write by business + current owner; transfers with ownership. */
|
|
11
|
+
owner?: Record<string, JsonValue>;
|
|
12
|
+
/** Per-user: read/write only by the matching userId; not visible to the next owner, not even business admins. */
|
|
13
|
+
personal?: Record<string, Record<string, JsonValue>>;
|
|
14
|
+
}
|
|
1
15
|
/**
|
|
2
16
|
* Represents a Proof object.
|
|
3
17
|
*/
|
|
@@ -18,14 +32,36 @@ export interface Proof {
|
|
|
18
32
|
claimable?: boolean;
|
|
19
33
|
/** Is this proof virtual */
|
|
20
34
|
virtual?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
|
|
35
|
+
/** Public, business-writable spec data — readable by everyone. */
|
|
36
|
+
data?: Record<string, JsonValue>;
|
|
37
|
+
/** Business-only spec data — stripped from public/non-admin reads. */
|
|
38
|
+
admin?: Record<string, JsonValue>;
|
|
39
|
+
/** Owner + business-writable consumer data. See ProofValues. */
|
|
40
|
+
values: ProofValues;
|
|
23
41
|
}
|
|
24
42
|
export type ProofResponse = Proof;
|
|
25
43
|
export interface ProofCreateRequest {
|
|
26
|
-
values:
|
|
44
|
+
values: ProofValues;
|
|
45
|
+
/** Business-writable public spec data. */
|
|
46
|
+
data?: Record<string, JsonValue>;
|
|
47
|
+
/** Business-only spec data. */
|
|
48
|
+
admin?: Record<string, JsonValue>;
|
|
27
49
|
claimable?: boolean;
|
|
28
50
|
virtual?: boolean;
|
|
29
51
|
}
|
|
30
52
|
export type ProofUpdateRequest = Partial<ProofCreateRequest>;
|
|
31
53
|
export type ProofClaimRequest = Record<string, any>;
|
|
54
|
+
/**
|
|
55
|
+
* `'public'` (default, omitted) reads/writes `proof.values[key]`.
|
|
56
|
+
* `'owner'` reads/writes `proof.values.owner[key]`.
|
|
57
|
+
* `'personal'` reads/writes `proof.values.personal[userId][key]`.
|
|
58
|
+
* `'admin'` reads/writes `proof.admin[key]` (admin only).
|
|
59
|
+
*/
|
|
60
|
+
export type ProofFieldScope = 'public' | 'owner' | 'personal' | 'admin';
|
|
61
|
+
export type ProofFieldDef = ScopedFieldDef & {
|
|
62
|
+
scope?: ProofFieldScope;
|
|
63
|
+
};
|
|
64
|
+
/** Shape of the `proofFields` collection settings group. */
|
|
65
|
+
export interface ProofFieldsConfig {
|
|
66
|
+
fields: ProofFieldDef[];
|
|
67
|
+
}
|