@proveanything/smartlinks 1.9.21 → 1.9.23

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/openapi.yaml CHANGED
@@ -12287,6 +12287,94 @@ paths:
12287
12287
  application/json:
12288
12288
  schema:
12289
12289
  $ref: "#/components/schemas/CreateCaseInput"
12290
+ /{zone}/collection/{collectionId}/app/{appId}/recordse)}/bulk-delete:
12291
+ post:
12292
+ tags:
12293
+ - records
12294
+ summary: Soft-delete records in bulk.
12295
+ operationId: records_bulkDelete
12296
+ security: []
12297
+ parameters:
12298
+ - name: zone
12299
+ in: path
12300
+ required: true
12301
+ schema:
12302
+ type: string
12303
+ - name: collectionId
12304
+ in: path
12305
+ required: true
12306
+ schema:
12307
+ type: string
12308
+ - name: appId
12309
+ in: path
12310
+ required: true
12311
+ schema:
12312
+ type: string
12313
+ responses:
12314
+ 200:
12315
+ description: Success
12316
+ content:
12317
+ application/json:
12318
+ schema:
12319
+ $ref: "#/components/schemas/BulkDeleteResult"
12320
+ 400:
12321
+ description: Bad request
12322
+ 401:
12323
+ description: Unauthorized
12324
+ 404:
12325
+ description: Not found
12326
+ requestBody:
12327
+ required: true
12328
+ content:
12329
+ application/json:
12330
+ schema:
12331
+ type: string
12332
+ enum:
12333
+ - facets
12334
+ /{zone}/collection/{collectionId}/app/{appId}/recordse)}/bulk-upsert:
12335
+ post:
12336
+ tags:
12337
+ - records
12338
+ summary: Upsert up to 500 records in a single transaction.
12339
+ operationId: records_bulkUpsert
12340
+ security: []
12341
+ parameters:
12342
+ - name: zone
12343
+ in: path
12344
+ required: true
12345
+ schema:
12346
+ type: string
12347
+ - name: collectionId
12348
+ in: path
12349
+ required: true
12350
+ schema:
12351
+ type: string
12352
+ - name: appId
12353
+ in: path
12354
+ required: true
12355
+ schema:
12356
+ type: string
12357
+ responses:
12358
+ 200:
12359
+ description: Success
12360
+ content:
12361
+ application/json:
12362
+ schema:
12363
+ $ref: "#/components/schemas/BulkUpsertResult"
12364
+ 400:
12365
+ description: Bad request
12366
+ 401:
12367
+ description: Unauthorized
12368
+ 404:
12369
+ description: Not found
12370
+ requestBody:
12371
+ required: true
12372
+ content:
12373
+ application/json:
12374
+ schema:
12375
+ type: array
12376
+ items:
12377
+ $ref: "#/components/schemas/BulkUpsertItem"
12290
12378
  /{zone}/collection/{collectionId}/app/{appId}/recordse)}/summary:
12291
12379
  post:
12292
12380
  tags:
@@ -12329,6 +12417,48 @@ paths:
12329
12417
  application/json:
12330
12418
  schema:
12331
12419
  $ref: "#/components/schemas/CaseSummaryRequest"
12420
+ /{zone}/collection/{collectionId}/app/{appId}/recordse)}/upsert:
12421
+ post:
12422
+ tags:
12423
+ - records
12424
+ summary: "Get aggregate statistics for records POST /records/aggregate / export async function aggregate( collectionId: string, appId: string, request: AggregateRequest, admin: boolean = false ): Promise<AggregateResponse> { const path = `${basePath(collectionId, appId, admin)}/aggregate` return post<AggregateResponse>(path, request) } /** Restore a soft-deleted record."
12425
+ operationId: records_upsert
12426
+ security: []
12427
+ parameters:
12428
+ - name: zone
12429
+ in: path
12430
+ required: true
12431
+ schema:
12432
+ type: string
12433
+ - name: collectionId
12434
+ in: path
12435
+ required: true
12436
+ schema:
12437
+ type: string
12438
+ - name: appId
12439
+ in: path
12440
+ required: true
12441
+ schema:
12442
+ type: string
12443
+ responses:
12444
+ 200:
12445
+ description: Success
12446
+ content:
12447
+ application/json:
12448
+ schema:
12449
+ $ref: "#/components/schemas/UpsertRecordResponse"
12450
+ 400:
12451
+ description: Bad request
12452
+ 401:
12453
+ description: Unauthorized
12454
+ 404:
12455
+ description: Not found
12456
+ requestBody:
12457
+ required: true
12458
+ content:
12459
+ application/json:
12460
+ schema:
12461
+ $ref: "#/components/schemas/UpsertRecordInput"
12332
12462
  /{zone}/collection/{collectionId}/app/{appId}/recordse)}/{caseId}/history:
12333
12463
  post:
12334
12464
  tags:
@@ -12465,6 +12595,47 @@ paths:
12465
12595
  schema:
12466
12596
  type: object
12467
12597
  additionalProperties: true
12598
+ /{zone}/collection/{collectionId}/app/{appId}/recordse)}/{recordId}/restore:
12599
+ post:
12600
+ tags:
12601
+ - records
12602
+ summary: "Soft delete a record DELETE /records/:recordId / export async function remove( collectionId: string, appId: string, recordId: string, admin: boolean = false ): Promise<{ success: boolean }> { const path = `${basePath(collectionId, appId, admin)}/${encodeURIComponent(recordId)}` return del<{ success: boolean }>(path) } /** Get aggregate statistics for records POST /records/aggregate / export async function aggregate( collectionId: string, appId: string, request: AggregateRequest, admin: boolean = false ): Promise<AggregateResponse> { const path = `${basePath(collectionId, appId, admin)}/aggregate` return post<AggregateResponse>(path, request) } /** Restore a soft-deleted record."
12603
+ operationId: records_restore
12604
+ security: []
12605
+ parameters:
12606
+ - name: zone
12607
+ in: path
12608
+ required: true
12609
+ schema:
12610
+ type: string
12611
+ - name: collectionId
12612
+ in: path
12613
+ required: true
12614
+ schema:
12615
+ type: string
12616
+ - name: appId
12617
+ in: path
12618
+ required: true
12619
+ schema:
12620
+ type: string
12621
+ - name: recordId
12622
+ in: path
12623
+ required: true
12624
+ schema:
12625
+ type: string
12626
+ responses:
12627
+ 200:
12628
+ description: Success
12629
+ content:
12630
+ application/json:
12631
+ schema:
12632
+ $ref: "#/components/schemas/AppRecord"
12633
+ 400:
12634
+ description: Bad request
12635
+ 401:
12636
+ description: Unauthorized
12637
+ 404:
12638
+ description: Not found
12468
12639
  /{zone}/collection/{collectionId}/app/{appId}/recordsn)}/aggregate:
12469
12640
  post:
12470
12641
  tags:
@@ -12507,6 +12678,48 @@ paths:
12507
12678
  application/json:
12508
12679
  schema:
12509
12680
  $ref: "#/components/schemas/AggregateRequest"
12681
+ /{zone}/collection/{collectionId}/app/{appId}/recordsn)}/match:
12682
+ post:
12683
+ tags:
12684
+ - records
12685
+ summary: Match records against a runtime target scope.
12686
+ operationId: records_match
12687
+ security: []
12688
+ parameters:
12689
+ - name: zone
12690
+ in: path
12691
+ required: true
12692
+ schema:
12693
+ type: string
12694
+ - name: collectionId
12695
+ in: path
12696
+ required: true
12697
+ schema:
12698
+ type: string
12699
+ - name: appId
12700
+ in: path
12701
+ required: true
12702
+ schema:
12703
+ type: string
12704
+ responses:
12705
+ 200:
12706
+ description: Success
12707
+ content:
12708
+ application/json:
12709
+ schema:
12710
+ $ref: "#/components/schemas/MatchResult"
12711
+ 400:
12712
+ description: Bad request
12713
+ 401:
12714
+ description: Unauthorized
12715
+ 404:
12716
+ description: Not found
12717
+ requestBody:
12718
+ required: true
12719
+ content:
12720
+ application/json:
12721
+ schema:
12722
+ $ref: "#/components/schemas/MatchRecordsInput"
12510
12723
  /{zone}/collection/{collectionId}/app/{appId}/recordsn)}/{caseId}:
12511
12724
  get:
12512
12725
  tags:
@@ -15471,6 +15684,167 @@ components:
15471
15684
  type: string
15472
15685
  contactId:
15473
15686
  type: string
15687
+ ScopeFacetClause:
15688
+ type: object
15689
+ properties:
15690
+ key:
15691
+ type: string
15692
+ valueKeys:
15693
+ type: array
15694
+ items:
15695
+ type: string
15696
+ required:
15697
+ - key
15698
+ - valueKeys
15699
+ RecordScope:
15700
+ type: object
15701
+ properties:
15702
+ productId:
15703
+ type: string
15704
+ variantId:
15705
+ type: string
15706
+ proofId:
15707
+ type: string
15708
+ batchId:
15709
+ type: string
15710
+ facets:
15711
+ type: array
15712
+ items:
15713
+ $ref: "#/components/schemas/ScopeFacetClause"
15714
+ RecordTarget:
15715
+ type: object
15716
+ properties:
15717
+ productId:
15718
+ type: string
15719
+ variantId:
15720
+ type: string
15721
+ proofId:
15722
+ type: string
15723
+ batchId:
15724
+ type: string
15725
+ facets:
15726
+ type: object
15727
+ additionalProperties:
15728
+ type: array
15729
+ items:
15730
+ type: string
15731
+ BulkUpsertItem:
15732
+ type: object
15733
+ properties:
15734
+ ref:
15735
+ type: string
15736
+ recordType:
15737
+ type: string
15738
+ customId:
15739
+ type: string
15740
+ sourceSystem:
15741
+ type: string
15742
+ startsAt:
15743
+ type: string
15744
+ expiresAt:
15745
+ type: string
15746
+ status:
15747
+ type: string
15748
+ scope:
15749
+ $ref: "#/components/schemas/RecordScope"
15750
+ data:
15751
+ type: object
15752
+ additionalProperties: true
15753
+ metadata:
15754
+ type: object
15755
+ additionalProperties: true
15756
+ required:
15757
+ - ref
15758
+ BulkUpsertResult:
15759
+ type: object
15760
+ properties:
15761
+ saved:
15762
+ type: number
15763
+ failed:
15764
+ type: number
15765
+ results:
15766
+ type: object
15767
+ additionalProperties: true
15768
+ required:
15769
+ - saved
15770
+ - failed
15771
+ - results
15772
+ BulkDeleteResult:
15773
+ type: object
15774
+ properties:
15775
+ deleted:
15776
+ type: number
15777
+ required:
15778
+ - deleted
15779
+ MatchResult:
15780
+ type: object
15781
+ properties:
15782
+ records:
15783
+ type: array
15784
+ items:
15785
+ $ref: "#/components/schemas/AppRecord"
15786
+ best:
15787
+ type: object
15788
+ additionalProperties:
15789
+ $ref: "#/components/schemas/AppRecord"
15790
+ required:
15791
+ - records
15792
+ UpsertRecordInput:
15793
+ type: object
15794
+ properties:
15795
+ ref:
15796
+ type: string
15797
+ recordType:
15798
+ type: string
15799
+ customId:
15800
+ type: string
15801
+ sourceSystem:
15802
+ type: string
15803
+ startsAt:
15804
+ type: string
15805
+ expiresAt:
15806
+ type: string
15807
+ status:
15808
+ type: string
15809
+ scope:
15810
+ $ref: "#/components/schemas/RecordScope"
15811
+ data:
15812
+ type: object
15813
+ additionalProperties: true
15814
+ metadata:
15815
+ type: object
15816
+ additionalProperties: true
15817
+ required:
15818
+ - ref
15819
+ UpsertRecordResponse:
15820
+ type: object
15821
+ properties:
15822
+ created:
15823
+ type: boolean
15824
+ required:
15825
+ - created
15826
+ MatchRecordsInput:
15827
+ type: object
15828
+ properties:
15829
+ target:
15830
+ $ref: "#/components/schemas/RecordTarget"
15831
+ strategy:
15832
+ type: string
15833
+ enum:
15834
+ - all
15835
+ - best
15836
+ recordType:
15837
+ type: string
15838
+ limit:
15839
+ type: number
15840
+ includeScheduled:
15841
+ type: boolean
15842
+ includeExpired:
15843
+ type: boolean
15844
+ at:
15845
+ type: string
15846
+ required:
15847
+ - target
15474
15848
  AppRecord:
15475
15849
  type: object
15476
15850
  properties:
@@ -15488,6 +15862,10 @@ components:
15488
15862
  type: string
15489
15863
  ref:
15490
15864
  type: string
15865
+ customId:
15866
+ type: string
15867
+ sourceSystem:
15868
+ type: string
15491
15869
  status:
15492
15870
  type: string
15493
15871
  productId:
@@ -15514,6 +15892,10 @@ components:
15514
15892
  type: string
15515
15893
  deletedAt:
15516
15894
  type: string
15895
+ scope:
15896
+ $ref: "#/components/schemas/RecordScope"
15897
+ specificity:
15898
+ type: number
15517
15899
  data:
15518
15900
  type: object
15519
15901
  additionalProperties: true
@@ -15523,6 +15905,9 @@ components:
15523
15905
  admin:
15524
15906
  type: object
15525
15907
  additionalProperties: true
15908
+ metadata:
15909
+ type: object
15910
+ additionalProperties: true
15526
15911
  required:
15527
15912
  - id
15528
15913
  - orgId
@@ -15531,6 +15916,8 @@ components:
15531
15916
  - visibility
15532
15917
  - recordType
15533
15918
  - ref
15919
+ - customId
15920
+ - sourceSystem
15534
15921
  - status
15535
15922
  - productId
15536
15923
  - proofId
@@ -15544,9 +15931,12 @@ components:
15544
15931
  - startsAt
15545
15932
  - expiresAt
15546
15933
  - deletedAt
15934
+ - scope
15935
+ - specificity
15547
15936
  - data
15548
15937
  - owner
15549
15938
  - admin
15939
+ - metadata
15550
15940
  CreateRecordInput:
15551
15941
  type: object
15552
15942
  properties:
@@ -15576,6 +15966,12 @@ components:
15576
15966
  type: string
15577
15967
  expiresAt:
15578
15968
  type: string
15969
+ scope:
15970
+ $ref: "#/components/schemas/RecordScope"
15971
+ customId:
15972
+ type: string
15973
+ sourceSystem:
15974
+ type: string
15579
15975
  data:
15580
15976
  type: object
15581
15977
  additionalProperties: true
@@ -15585,6 +15981,9 @@ components:
15585
15981
  admin:
15586
15982
  type: object
15587
15983
  additionalProperties: true
15984
+ metadata:
15985
+ type: object
15986
+ additionalProperties: true
15588
15987
  required:
15589
15988
  - recordType
15590
15989
  UpdateRecordInput:
@@ -15611,6 +16010,15 @@ components:
15611
16010
  type: string
15612
16011
  expiresAt:
15613
16012
  type: string
16013
+ scope:
16014
+ $ref: "#/components/schemas/RecordScope"
16015
+ customId:
16016
+ type: string
16017
+ sourceSystem:
16018
+ type: string
16019
+ metadata:
16020
+ type: object
16021
+ additionalProperties: true
15614
16022
  RecordListQueryParams:
15615
16023
  type: object
15616
16024
  properties:
@@ -15618,8 +16026,24 @@ components:
15618
16026
  type: string
15619
16027
  ref:
15620
16028
  type: string
16029
+ refPrefix:
16030
+ type: string
16031
+ customId:
16032
+ type: string
16033
+ sourceSystem:
16034
+ type: string
16035
+ status:
16036
+ type: string
15621
16037
  proofId:
15622
16038
  type: string
16039
+ productId:
16040
+ type: string
16041
+ variantId:
16042
+ type: string
16043
+ batchId:
16044
+ type: string
16045
+ q:
16046
+ type: string
15623
16047
  authorId:
15624
16048
  type: string
15625
16049
  parentType:
@@ -15630,6 +16054,12 @@ components:
15630
16054
  type: string
15631
16055
  expiresAt:
15632
16056
  type: string
16057
+ includeScheduled:
16058
+ type: boolean
16059
+ includeExpired:
16060
+ type: boolean
16061
+ at:
16062
+ type: string
15633
16063
  contactId:
15634
16064
  type: string
15635
16065
  RelatedResponse:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "1.9.21",
3
+ "version": "1.9.23",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",