@proveanything/smartlinks 1.10.0 → 1.10.2

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/openapi.yaml CHANGED
@@ -12404,6 +12404,90 @@ paths:
12404
12404
  application/json:
12405
12405
  schema:
12406
12406
  $ref: "#/components/schemas/MatchRecordsInput"
12407
+ /{zone}/collection/{collectionId}/app/{appId}/records/preview-rule:
12408
+ post:
12409
+ tags:
12410
+ - records
12411
+ summary: Preview which products in the collection match a given facetRule.
12412
+ operationId: records_previewRule
12413
+ security: []
12414
+ parameters:
12415
+ - name: zone
12416
+ in: path
12417
+ required: true
12418
+ schema:
12419
+ type: string
12420
+ - name: collectionId
12421
+ in: path
12422
+ required: true
12423
+ schema:
12424
+ type: string
12425
+ - name: appId
12426
+ in: path
12427
+ required: true
12428
+ schema:
12429
+ type: string
12430
+ responses:
12431
+ 200:
12432
+ description: Success
12433
+ content:
12434
+ application/json:
12435
+ schema:
12436
+ $ref: "#/components/schemas/PreviewRuleResult"
12437
+ 400:
12438
+ description: Bad request
12439
+ 401:
12440
+ description: Unauthorized
12441
+ 404:
12442
+ description: Not found
12443
+ requestBody:
12444
+ required: true
12445
+ content:
12446
+ application/json:
12447
+ schema:
12448
+ $ref: "#/components/schemas/PreviewRuleParams"
12449
+ /{zone}/collection/{collectionId}/app/{appId}/records/resolve-all:
12450
+ post:
12451
+ tags:
12452
+ - records
12453
+ summary: Resolve every applicable record for a product context in one call.
12454
+ operationId: records_resolveAll
12455
+ security: []
12456
+ parameters:
12457
+ - name: zone
12458
+ in: path
12459
+ required: true
12460
+ schema:
12461
+ type: string
12462
+ - name: collectionId
12463
+ in: path
12464
+ required: true
12465
+ schema:
12466
+ type: string
12467
+ - name: appId
12468
+ in: path
12469
+ required: true
12470
+ schema:
12471
+ type: string
12472
+ responses:
12473
+ 200:
12474
+ description: Success
12475
+ content:
12476
+ application/json:
12477
+ schema:
12478
+ $ref: "#/components/schemas/ResolveAllResult"
12479
+ 400:
12480
+ description: Bad request
12481
+ 401:
12482
+ description: Unauthorized
12483
+ 404:
12484
+ description: Not found
12485
+ requestBody:
12486
+ required: true
12487
+ content:
12488
+ application/json:
12489
+ schema:
12490
+ $ref: "#/components/schemas/ResolveAllParams"
12407
12491
  /{zone}/collection/{collectionId}/app/{appId}/records/upsert:
12408
12492
  post:
12409
12493
  tags:
@@ -15514,33 +15598,27 @@ components:
15514
15598
  type: string
15515
15599
  contactId:
15516
15600
  type: string
15517
- ScopeFacetClause:
15601
+ FacetRuleClause:
15518
15602
  type: object
15519
15603
  properties:
15520
- key:
15604
+ facetKey:
15521
15605
  type: string
15522
- valueKeys:
15606
+ anyOf:
15523
15607
  type: array
15524
15608
  items:
15525
15609
  type: string
15526
15610
  required:
15527
- - key
15528
- - valueKeys
15529
- RecordScope:
15611
+ - facetKey
15612
+ - anyOf
15613
+ FacetRule:
15530
15614
  type: object
15531
15615
  properties:
15532
- productId:
15533
- type: string
15534
- variantId:
15535
- type: string
15536
- proofId:
15537
- type: string
15538
- batchId:
15539
- type: string
15540
- facets:
15616
+ all:
15541
15617
  type: array
15542
15618
  items:
15543
- $ref: "#/components/schemas/ScopeFacetClause"
15619
+ $ref: "#/components/schemas/FacetRuleClause"
15620
+ required:
15621
+ - all
15544
15622
  RecordTarget:
15545
15623
  type: object
15546
15624
  properties:
@@ -15565,6 +15643,14 @@ components:
15565
15643
  type: string
15566
15644
  recordType:
15567
15645
  type: string
15646
+ productId:
15647
+ type: string
15648
+ variantId:
15649
+ type: string
15650
+ batchId:
15651
+ type: string
15652
+ proofId:
15653
+ type: string
15568
15654
  customId:
15569
15655
  type: string
15570
15656
  sourceSystem:
@@ -15575,14 +15661,14 @@ components:
15575
15661
  type: string
15576
15662
  status:
15577
15663
  type: string
15578
- scope:
15579
- $ref: "#/components/schemas/RecordScope"
15580
15664
  data:
15581
15665
  type: object
15582
15666
  additionalProperties: true
15583
15667
  metadata:
15584
15668
  type: object
15585
15669
  additionalProperties: true
15670
+ facetRule:
15671
+ $ref: "#/components/schemas/FacetRule"
15586
15672
  required:
15587
15673
  - ref
15588
15674
  BulkUpsertResult:
@@ -15606,26 +15692,35 @@ components:
15606
15692
  type: number
15607
15693
  required:
15608
15694
  - deleted
15609
- MatchedRecord:
15695
+ MatchEntry:
15610
15696
  type: object
15611
15697
  properties:
15612
15698
  matchedAt:
15613
- $ref: "#/components/schemas/MatchedAtLevel"
15699
+ $ref: "#/components/schemas/MatchedAt"
15700
+ matchedRule:
15701
+ $ref: "#/components/schemas/FacetRule"
15702
+ matchedClauseCount:
15703
+ type: number
15614
15704
  required:
15615
15705
  - matchedAt
15616
15706
  MatchResult:
15617
15707
  type: object
15618
15708
  properties:
15619
- records:
15709
+ data:
15620
15710
  type: array
15621
15711
  items:
15622
- $ref: "#/components/schemas/MatchedRecord"
15623
- best:
15624
- type: object
15625
- additionalProperties:
15626
- $ref: "#/components/schemas/MatchedRecord"
15712
+ $ref: "#/components/schemas/MatchEntry"
15713
+ total:
15714
+ type: number
15715
+ strategy:
15716
+ type: string
15717
+ enum:
15718
+ - all
15719
+ - best
15627
15720
  required:
15628
- - records
15721
+ - data
15722
+ - total
15723
+ - strategy
15629
15724
  UpsertRecordInput:
15630
15725
  type: object
15631
15726
  properties:
@@ -15633,6 +15728,14 @@ components:
15633
15728
  type: string
15634
15729
  recordType:
15635
15730
  type: string
15731
+ productId:
15732
+ type: string
15733
+ variantId:
15734
+ type: string
15735
+ batchId:
15736
+ type: string
15737
+ proofId:
15738
+ type: string
15636
15739
  customId:
15637
15740
  type: string
15638
15741
  sourceSystem:
@@ -15643,14 +15746,14 @@ components:
15643
15746
  type: string
15644
15747
  status:
15645
15748
  type: string
15646
- scope:
15647
- $ref: "#/components/schemas/RecordScope"
15648
15749
  data:
15649
15750
  type: object
15650
15751
  additionalProperties: true
15651
15752
  metadata:
15652
15753
  type: object
15653
15754
  additionalProperties: true
15755
+ facetRule:
15756
+ $ref: "#/components/schemas/FacetRule"
15654
15757
  required:
15655
15758
  - ref
15656
15759
  UpsertRecordResponse:
@@ -15699,14 +15802,24 @@ components:
15699
15802
  type: string
15700
15803
  ref:
15701
15804
  type: string
15805
+ scopeType:
15806
+ type: string
15807
+ scopeId:
15808
+ type: string
15702
15809
  customId:
15703
15810
  type: string
15811
+ customIdNormalized:
15812
+ type: string
15704
15813
  sourceSystem:
15705
15814
  type: string
15706
15815
  status:
15707
15816
  type: string
15708
15817
  productId:
15709
15818
  type: string
15819
+ variantId:
15820
+ type: string
15821
+ batchId:
15822
+ type: string
15710
15823
  proofId:
15711
15824
  type: string
15712
15825
  contactId:
@@ -15729,10 +15842,12 @@ components:
15729
15842
  type: string
15730
15843
  deletedAt:
15731
15844
  type: string
15732
- scope:
15733
- $ref: "#/components/schemas/RecordScope"
15734
15845
  specificity:
15735
15846
  type: number
15847
+ facetRule:
15848
+ $ref: "#/components/schemas/FacetRule"
15849
+ singletonKey:
15850
+ type: string
15736
15851
  data:
15737
15852
  type: object
15738
15853
  additionalProperties: true
@@ -15753,10 +15868,15 @@ components:
15753
15868
  - visibility
15754
15869
  - recordType
15755
15870
  - ref
15871
+ - scopeType
15872
+ - scopeId
15756
15873
  - customId
15874
+ - customIdNormalized
15757
15875
  - sourceSystem
15758
15876
  - status
15759
15877
  - productId
15878
+ - variantId
15879
+ - batchId
15760
15880
  - proofId
15761
15881
  - contactId
15762
15882
  - authorId
@@ -15768,8 +15888,9 @@ components:
15768
15888
  - startsAt
15769
15889
  - expiresAt
15770
15890
  - deletedAt
15771
- - scope
15772
15891
  - specificity
15892
+ - facetRule
15893
+ - singletonKey
15773
15894
  - data
15774
15895
  - owner
15775
15896
  - admin
@@ -15787,6 +15908,10 @@ components:
15787
15908
  type: string
15788
15909
  productId:
15789
15910
  type: string
15911
+ variantId:
15912
+ type: string
15913
+ batchId:
15914
+ type: string
15790
15915
  proofId:
15791
15916
  type: string
15792
15917
  contactId:
@@ -15803,12 +15928,16 @@ components:
15803
15928
  type: string
15804
15929
  expiresAt:
15805
15930
  type: string
15806
- scope:
15807
- $ref: "#/components/schemas/RecordScope"
15931
+ scopeType:
15932
+ type: string
15933
+ scopeId:
15934
+ type: string
15808
15935
  customId:
15809
15936
  type: string
15810
15937
  sourceSystem:
15811
15938
  type: string
15939
+ singletonPer:
15940
+ type: string
15812
15941
  data:
15813
15942
  type: object
15814
15943
  additionalProperties: true
@@ -15821,8 +15950,8 @@ components:
15821
15950
  metadata:
15822
15951
  type: object
15823
15952
  additionalProperties: true
15824
- required:
15825
- - recordType
15953
+ facetRule:
15954
+ $ref: "#/components/schemas/FacetRule"
15826
15955
  UpdateRecordInput:
15827
15956
  type: object
15828
15957
  properties:
@@ -15843,12 +15972,22 @@ components:
15843
15972
  type: string
15844
15973
  recordType:
15845
15974
  type: string
15975
+ productId:
15976
+ type: string
15977
+ variantId:
15978
+ type: string
15979
+ batchId:
15980
+ type: string
15981
+ proofId:
15982
+ type: string
15846
15983
  startsAt:
15847
15984
  type: string
15848
15985
  expiresAt:
15849
15986
  type: string
15850
- scope:
15851
- $ref: "#/components/schemas/RecordScope"
15987
+ scopeType:
15988
+ type: string
15989
+ scopeId:
15990
+ type: string
15852
15991
  customId:
15853
15992
  type: string
15854
15993
  sourceSystem:
@@ -15856,6 +15995,8 @@ components:
15856
15995
  metadata:
15857
15996
  type: object
15858
15997
  additionalProperties: true
15998
+ facetRule:
15999
+ $ref: "#/components/schemas/FacetRule"
15859
16000
  RecordListQueryParams:
15860
16001
  type: object
15861
16002
  properties:
@@ -15897,6 +16038,130 @@ components:
15897
16038
  type: string
15898
16039
  includeDeleted:
15899
16040
  type: boolean
16041
+ ResolveAllParams:
16042
+ type: object
16043
+ properties:
16044
+ context:
16045
+ type: object
16046
+ additionalProperties: true
16047
+ productId:
16048
+ type: string
16049
+ variantId:
16050
+ type: string
16051
+ batchId:
16052
+ type: string
16053
+ proofId:
16054
+ type: string
16055
+ facets:
16056
+ type: object
16057
+ additionalProperties:
16058
+ type: array
16059
+ items:
16060
+ type: object
16061
+ additionalProperties: true
16062
+ recordType:
16063
+ type: string
16064
+ tiers:
16065
+ type: array
16066
+ items:
16067
+ type: string
16068
+ enum:
16069
+ - proof
16070
+ - batch
16071
+ - variant
16072
+ - product
16073
+ - rule
16074
+ - facet
16075
+ - collection
16076
+ limit:
16077
+ type: number
16078
+ at:
16079
+ type: string
16080
+ includeScheduled:
16081
+ type: boolean
16082
+ includeExpired:
16083
+ type: boolean
16084
+ required:
16085
+ - context
16086
+ ResolveAllResult:
16087
+ type: object
16088
+ properties:
16089
+ records:
16090
+ type: array
16091
+ items:
16092
+ $ref: "#/components/schemas/ResolveAllEntry"
16093
+ total:
16094
+ type: number
16095
+ context:
16096
+ $ref: "#/components/schemas/ResolveAllContext"
16097
+ truncated:
16098
+ type: boolean
16099
+ required:
16100
+ - records
16101
+ - total
16102
+ - context
16103
+ - truncated
16104
+ ResolveAllEntry:
16105
+ type: object
16106
+ properties:
16107
+ record:
16108
+ $ref: "#/components/schemas/AppRecord"
16109
+ matchedAt:
16110
+ $ref: "#/components/schemas/MatchedAt"
16111
+ specificity:
16112
+ type: number
16113
+ matchedRule:
16114
+ $ref: "#/components/schemas/FacetRule"
16115
+ matchedClauseCount:
16116
+ type: number
16117
+ required:
16118
+ - record
16119
+ - matchedAt
16120
+ - specificity
16121
+ ResolveAllContext:
16122
+ type: object
16123
+ properties:
16124
+ productId:
16125
+ type: string
16126
+ variantId:
16127
+ type: string
16128
+ batchId:
16129
+ type: string
16130
+ proofId:
16131
+ type: string
16132
+ facets:
16133
+ type: object
16134
+ additionalProperties:
16135
+ type: array
16136
+ items:
16137
+ type: string
16138
+ PreviewRuleParams:
16139
+ type: object
16140
+ properties:
16141
+ facetRule:
16142
+ $ref: "#/components/schemas/FacetRule"
16143
+ recordType:
16144
+ type: string
16145
+ limit:
16146
+ type: number
16147
+ required:
16148
+ - facetRule
16149
+ PreviewRuleResult:
16150
+ type: object
16151
+ properties:
16152
+ matchingProducts:
16153
+ type: array
16154
+ items:
16155
+ type: object
16156
+ additionalProperties: true
16157
+ total:
16158
+ type: number
16159
+ rule:
16160
+ $ref: "#/components/schemas/FacetRule"
16161
+ required:
16162
+ - matchingProducts
16163
+ - total
16164
+ - rule
15900
16165
  RelatedResponse:
15901
16166
  type: object
15902
16167
  properties: