@proveanything/smartlinks 1.12.0 → 1.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/openapi.yaml CHANGED
@@ -105,6 +105,144 @@ paths:
105
105
  application/json:
106
106
  schema:
107
107
  $ref: "#/components/schemas/CollectionCreateRequest"
108
+ /admin/collection/assets:
109
+ get:
110
+ tags:
111
+ - asset
112
+ summary: List assets for a collection with full filtering options.
113
+ operationId: asset_listAdmin
114
+ security:
115
+ - bearerAuth: []
116
+ parameters:
117
+ - name: productId
118
+ in: query
119
+ required: false
120
+ schema:
121
+ type: string
122
+ - name: proofId
123
+ in: query
124
+ required: false
125
+ schema:
126
+ type: string
127
+ - name: appId
128
+ in: query
129
+ required: false
130
+ schema:
131
+ type: string
132
+ - name: assetType
133
+ in: query
134
+ required: false
135
+ schema:
136
+ type: string
137
+ enum:
138
+ - Image
139
+ - Video
140
+ - Audio
141
+ - Document
142
+ - name: labels
143
+ in: query
144
+ required: false
145
+ schema:
146
+ type: string
147
+ - name: sort
148
+ in: query
149
+ required: false
150
+ schema:
151
+ type: string
152
+ enum:
153
+ - createdAt
154
+ - name
155
+ - size
156
+ - assetType
157
+ - name: order
158
+ in: query
159
+ required: false
160
+ schema:
161
+ type: string
162
+ enum:
163
+ - asc
164
+ - desc
165
+ - name: limit
166
+ in: query
167
+ required: false
168
+ schema:
169
+ type: number
170
+ - name: offset
171
+ in: query
172
+ required: false
173
+ schema:
174
+ type: number
175
+ - name: collectionId
176
+ in: query
177
+ required: false
178
+ schema:
179
+ type: string
180
+ responses:
181
+ 200:
182
+ description: Success
183
+ content:
184
+ application/json:
185
+ schema:
186
+ $ref: "#/components/schemas/AdminListAssetsResponse"
187
+ 400:
188
+ description: Bad request
189
+ 401:
190
+ description: Unauthorized
191
+ 404:
192
+ description: Not found
193
+ put:
194
+ tags:
195
+ - asset
196
+ summary: Update asset metadata (admin).
197
+ operationId: asset_updateAdmin
198
+ security:
199
+ - bearerAuth: []
200
+ responses:
201
+ 200:
202
+ description: Success
203
+ content:
204
+ application/json:
205
+ schema:
206
+ $ref: "#/components/schemas/Asset"
207
+ 400:
208
+ description: Bad request
209
+ 401:
210
+ description: Unauthorized
211
+ 404:
212
+ description: Not found
213
+ requestBody:
214
+ required: true
215
+ content:
216
+ application/json:
217
+ schema:
218
+ $ref: "#/components/schemas/UpdateAssetOptions"
219
+ /admin/collection/assets/replace:
220
+ post:
221
+ tags:
222
+ - asset
223
+ summary: Replace the file of an existing asset.
224
+ operationId: asset_replaceFile
225
+ security:
226
+ - bearerAuth: []
227
+ responses:
228
+ 200:
229
+ description: Success
230
+ content:
231
+ application/json:
232
+ schema:
233
+ $ref: "#/components/schemas/Asset"
234
+ 400:
235
+ description: Bad request
236
+ 401:
237
+ description: Unauthorized
238
+ 404:
239
+ description: Not found
240
+ requestBody:
241
+ required: true
242
+ content:
243
+ application/json:
244
+ schema:
245
+ $ref: "#/components/schemas/ReplaceAssetFileOptions"
108
246
  /admin/collection/product/batch/{batchId}:
109
247
  get:
110
248
  tags:
@@ -912,6 +1050,70 @@ paths:
912
1050
  application/json:
913
1051
  schema:
914
1052
  $ref: "#/components/schemas/ResponsesRequest"
1053
+ /admin/collection/{collectionId}/assets/{assetId}:
1054
+ get:
1055
+ tags:
1056
+ - asset
1057
+ summary: Get a single asset by ID (admin).
1058
+ operationId: asset_getAdmin
1059
+ security:
1060
+ - bearerAuth: []
1061
+ parameters:
1062
+ - name: collectionId
1063
+ in: path
1064
+ required: true
1065
+ schema:
1066
+ type: string
1067
+ - name: assetId
1068
+ in: path
1069
+ required: true
1070
+ schema:
1071
+ type: string
1072
+ responses:
1073
+ 200:
1074
+ description: Success
1075
+ content:
1076
+ application/json:
1077
+ schema:
1078
+ $ref: "#/components/schemas/Asset"
1079
+ 400:
1080
+ description: Bad request
1081
+ 401:
1082
+ description: Unauthorized
1083
+ 404:
1084
+ description: Not found
1085
+ /admin/collection/{collectionId}/assets/{assetId}/restore:
1086
+ post:
1087
+ tags:
1088
+ - asset
1089
+ summary: "Restore a soft-deleted asset (clears `deletedAt`)."
1090
+ operationId: asset_restoreAdmin
1091
+ security:
1092
+ - bearerAuth: []
1093
+ parameters:
1094
+ - name: collectionId
1095
+ in: path
1096
+ required: true
1097
+ schema:
1098
+ type: string
1099
+ - name: assetId
1100
+ in: path
1101
+ required: true
1102
+ schema:
1103
+ type: string
1104
+ responses:
1105
+ 200:
1106
+ description: Success
1107
+ content:
1108
+ application/json:
1109
+ schema:
1110
+ $ref: "#/components/schemas/Asset"
1111
+ 400:
1112
+ description: Bad request
1113
+ 401:
1114
+ description: Unauthorized
1115
+ 404:
1116
+ description: Not found
915
1117
  /admin/collection/{collectionId}/assignSN/{codeId}:
916
1118
  post:
917
1119
  tags:
@@ -8623,6 +8825,32 @@ paths:
8623
8825
  description: Unauthorized
8624
8826
  404:
8625
8827
  description: Not found
8828
+ /public/collection/asset/token:
8829
+ post:
8830
+ tags:
8831
+ - asset
8832
+ summary: Request a single-use upload token for a public (unauthenticated) upload.
8833
+ operationId: asset_requestUploadToken
8834
+ security: []
8835
+ responses:
8836
+ 200:
8837
+ description: Success
8838
+ content:
8839
+ application/json:
8840
+ schema:
8841
+ $ref: "#/components/schemas/UploadTokenResponse"
8842
+ 400:
8843
+ description: Bad request
8844
+ 401:
8845
+ description: Unauthorized
8846
+ 404:
8847
+ description: Not found
8848
+ requestBody:
8849
+ required: true
8850
+ content:
8851
+ application/json:
8852
+ schema:
8853
+ $ref: "#/components/schemas/RequestUploadTokenOptions"
8626
8854
  /public/collection/getShortId/{shortId}:
8627
8855
  get:
8628
8856
  tags:
@@ -16257,75 +16485,190 @@ components:
16257
16485
  properties:
16258
16486
  editToken:
16259
16487
  type: string
16260
- Asset:
16488
+ AssetRef:
16261
16489
  type: object
16262
16490
  properties:
16263
16491
  id:
16264
16492
  type: string
16265
16493
  url:
16266
16494
  type: string
16267
- name:
16495
+ thumbnail:
16496
+ type: string
16497
+ required:
16498
+ - id
16499
+ - url
16500
+ - thumbnail
16501
+ AssetVersion:
16502
+ type: object
16503
+ properties:
16504
+ url:
16268
16505
  type: string
16269
16506
  mimeType:
16270
16507
  type: string
16508
+ fileType:
16509
+ type: string
16271
16510
  size:
16272
16511
  type: number
16273
- createdAt:
16512
+ hash:
16274
16513
  type: string
16275
- metadata:
16276
- type: object
16277
- additionalProperties: true
16278
- assetType:
16514
+ thumbnail:
16279
16515
  type: string
16280
- type:
16516
+ replacedAt:
16517
+ type: string
16518
+ replacedBy:
16519
+ type: string
16520
+ required:
16521
+ - url
16522
+ - mimeType
16523
+ - fileType
16524
+ - size
16525
+ - hash
16526
+ - thumbnail
16527
+ - replacedAt
16528
+ - replacedBy
16529
+ Asset:
16530
+ type: object
16531
+ properties:
16532
+ id:
16281
16533
  type: string
16282
16534
  collectionId:
16283
16535
  type: string
16284
- hash:
16536
+ site:
16285
16537
  type: string
16286
- thumbnails:
16287
- type: object
16288
- additionalProperties: true
16289
- x100:
16538
+ productId:
16290
16539
  type: string
16291
- x200:
16540
+ proofId:
16292
16541
  type: string
16293
- x512:
16542
+ app:
16294
16543
  type: string
16295
- site:
16544
+ url:
16296
16545
  type: string
16297
- cleanName:
16546
+ thumbnail:
16298
16547
  type: string
16299
- required:
16300
- - id
16301
- - url
16302
- - name
16303
- UploadAssetOptions:
16304
- type: object
16305
- properties:
16306
- file:
16307
- $ref: "#/components/schemas/File"
16308
16548
  name:
16309
16549
  type: string
16310
- metadata:
16311
- type: object
16312
- additionalProperties: true
16313
- appId:
16314
- type: string
16315
- admin:
16316
- type: boolean
16317
- required:
16318
- - file
16319
- UploadFromUrlOptions:
16320
- type: object
16321
- properties:
16322
- url:
16550
+ cleanName:
16323
16551
  type: string
16324
- folder:
16552
+ assetType:
16325
16553
  type: string
16326
16554
  enum:
16327
- - images
16328
- - videos
16555
+ - Image
16556
+ - Video
16557
+ - Audio
16558
+ - Document
16559
+ fileType:
16560
+ type: string
16561
+ type:
16562
+ type: string
16563
+ mimeType:
16564
+ type: string
16565
+ contentType:
16566
+ type: string
16567
+ size:
16568
+ type: number
16569
+ width:
16570
+ type: number
16571
+ height:
16572
+ type: number
16573
+ hash:
16574
+ type: string
16575
+ labels:
16576
+ type: array
16577
+ items:
16578
+ type: string
16579
+ metadata:
16580
+ type: object
16581
+ additionalProperties: true
16582
+ versions:
16583
+ type: array
16584
+ items:
16585
+ $ref: "#/components/schemas/AssetVersion"
16586
+ uploadedBy:
16587
+ type: string
16588
+ uploaderContactId:
16589
+ type: string
16590
+ uploadTokenId:
16591
+ type: string
16592
+ uploaderIp:
16593
+ type: string
16594
+ status:
16595
+ type: string
16596
+ enum:
16597
+ - active
16598
+ - pending_review
16599
+ - deleted
16600
+ createdAt:
16601
+ type: string
16602
+ updatedAt:
16603
+ type: string
16604
+ deletedAt:
16605
+ type: string
16606
+ thumbnails:
16607
+ type: object
16608
+ additionalProperties: true
16609
+ x100:
16610
+ type: string
16611
+ x200:
16612
+ type: string
16613
+ x512:
16614
+ type: string
16615
+ required:
16616
+ - id
16617
+ - collectionId
16618
+ - site
16619
+ - productId
16620
+ - proofId
16621
+ - app
16622
+ - url
16623
+ - thumbnail
16624
+ - name
16625
+ - cleanName
16626
+ - assetType
16627
+ - fileType
16628
+ - type
16629
+ - mimeType
16630
+ - contentType
16631
+ - size
16632
+ - width
16633
+ - height
16634
+ - hash
16635
+ - labels
16636
+ - metadata
16637
+ - versions
16638
+ - uploadedBy
16639
+ - uploaderContactId
16640
+ - uploadTokenId
16641
+ - uploaderIp
16642
+ - status
16643
+ - createdAt
16644
+ - updatedAt
16645
+ - deletedAt
16646
+ UploadAssetOptions:
16647
+ type: object
16648
+ properties:
16649
+ file:
16650
+ $ref: "#/components/schemas/File"
16651
+ name:
16652
+ type: string
16653
+ metadata:
16654
+ type: object
16655
+ additionalProperties: true
16656
+ appId:
16657
+ type: string
16658
+ admin:
16659
+ type: boolean
16660
+ required:
16661
+ - file
16662
+ UploadFromUrlOptions:
16663
+ type: object
16664
+ properties:
16665
+ url:
16666
+ type: string
16667
+ folder:
16668
+ type: string
16669
+ enum:
16670
+ - images
16671
+ - videos
16329
16672
  - documents
16330
16673
  metadata:
16331
16674
  type: object
@@ -16361,6 +16704,199 @@ components:
16361
16704
  type: string
16362
16705
  required:
16363
16706
  - assetId
16707
+ AdminListAssetsOptions:
16708
+ type: object
16709
+ properties:
16710
+ collectionId:
16711
+ type: string
16712
+ productId:
16713
+ type: string
16714
+ proofId:
16715
+ type: string
16716
+ appId:
16717
+ type: string
16718
+ assetType:
16719
+ type: string
16720
+ enum:
16721
+ - Image
16722
+ - Video
16723
+ - Audio
16724
+ - Document
16725
+ labels:
16726
+ type: string
16727
+ sort:
16728
+ type: string
16729
+ enum:
16730
+ - createdAt
16731
+ - name
16732
+ - size
16733
+ - assetType
16734
+ order:
16735
+ type: string
16736
+ enum:
16737
+ - asc
16738
+ - desc
16739
+ limit:
16740
+ type: number
16741
+ offset:
16742
+ type: number
16743
+ required:
16744
+ - collectionId
16745
+ AdminListAssetsResponse:
16746
+ type: object
16747
+ properties:
16748
+ data:
16749
+ type: array
16750
+ items:
16751
+ $ref: "#/components/schemas/Asset"
16752
+ total:
16753
+ type: number
16754
+ limit:
16755
+ type: number
16756
+ offset:
16757
+ type: number
16758
+ required:
16759
+ - data
16760
+ - total
16761
+ - limit
16762
+ - offset
16763
+ UpdateAssetOptions:
16764
+ type: object
16765
+ properties:
16766
+ collectionId:
16767
+ type: string
16768
+ assetId:
16769
+ type: string
16770
+ name:
16771
+ type: string
16772
+ app:
16773
+ type: string
16774
+ labels:
16775
+ type: array
16776
+ items:
16777
+ type: string
16778
+ metadata:
16779
+ type: object
16780
+ additionalProperties: true
16781
+ thumbnail:
16782
+ type: string
16783
+ required:
16784
+ - collectionId
16785
+ - assetId
16786
+ ReplaceAssetFileOptions:
16787
+ type: object
16788
+ properties:
16789
+ collectionId:
16790
+ type: string
16791
+ assetId:
16792
+ type: string
16793
+ file:
16794
+ $ref: "#/components/schemas/File"
16795
+ required:
16796
+ - collectionId
16797
+ - assetId
16798
+ - file
16799
+ DeleteAssetOptions:
16800
+ type: object
16801
+ properties:
16802
+ collectionId:
16803
+ type: string
16804
+ assetId:
16805
+ type: string
16806
+ graceDays:
16807
+ type: number
16808
+ required:
16809
+ - collectionId
16810
+ - assetId
16811
+ BulkDeleteAssetsOptions:
16812
+ type: object
16813
+ properties:
16814
+ collectionId:
16815
+ type: string
16816
+ assetIds:
16817
+ type: array
16818
+ items:
16819
+ type: string
16820
+ graceDays:
16821
+ type: number
16822
+ required:
16823
+ - collectionId
16824
+ - assetIds
16825
+ RequestUploadTokenOptions:
16826
+ type: object
16827
+ properties:
16828
+ collectionId:
16829
+ type: string
16830
+ appId:
16831
+ type: string
16832
+ contactId:
16833
+ type: string
16834
+ productId:
16835
+ type: string
16836
+ proofId:
16837
+ type: string
16838
+ required:
16839
+ - collectionId
16840
+ - appId
16841
+ UploadTokenPolicy:
16842
+ type: object
16843
+ properties:
16844
+ requireLevel:
16845
+ type: string
16846
+ enum:
16847
+ - anonymous
16848
+ - contact
16849
+ - owner
16850
+ allowedMimeTypes:
16851
+ type: array
16852
+ items:
16853
+ type: string
16854
+ maxFileSizeBytes:
16855
+ type: number
16856
+ reviewRequired:
16857
+ type: boolean
16858
+ productId:
16859
+ type: string
16860
+ proofId:
16861
+ type: string
16862
+ required:
16863
+ - requireLevel
16864
+ - allowedMimeTypes
16865
+ - maxFileSizeBytes
16866
+ - reviewRequired
16867
+ - productId
16868
+ - proofId
16869
+ UploadTokenResponse:
16870
+ type: object
16871
+ properties:
16872
+ tokenId:
16873
+ type: string
16874
+ expiresAt:
16875
+ type: string
16876
+ policy:
16877
+ $ref: "#/components/schemas/UploadTokenPolicy"
16878
+ required:
16879
+ - tokenId
16880
+ - expiresAt
16881
+ - policy
16882
+ PublicTokenUploadOptions:
16883
+ type: object
16884
+ properties:
16885
+ collectionId:
16886
+ type: string
16887
+ tokenId:
16888
+ type: string
16889
+ file:
16890
+ $ref: "#/components/schemas/File"
16891
+ name:
16892
+ type: string
16893
+ metadata:
16894
+ type: object
16895
+ additionalProperties: true
16896
+ required:
16897
+ - collectionId
16898
+ - tokenId
16899
+ - file
16364
16900
  AttestationResponse:
16365
16901
  type: object
16366
16902
  properties:
@@ -17646,22 +18182,9 @@ components:
17646
18182
  description:
17647
18183
  type: string
17648
18184
  headerImage:
17649
- type: object
17650
- additionalProperties: true
17651
- url:
17652
- type: string
17653
- thumbnails:
17654
- type: object
17655
- additionalProperties: true
17656
- x100:
17657
- type: string
17658
- x200:
17659
- type: string
17660
- x512:
17661
- type: string
18185
+ $ref: "#/components/schemas/AssetRef"
17662
18186
  logoImage:
17663
- type: object
17664
- additionalProperties: true
18187
+ $ref: "#/components/schemas/AssetRef"
17665
18188
  loaderImage:
17666
18189
  type: object
17667
18190
  additionalProperties: true
@@ -17671,6 +18194,8 @@ components:
17671
18194
  type: string
17672
18195
  type:
17673
18196
  type: string
18197
+ url:
18198
+ type: string
17674
18199
  languages:
17675
18200
  type: object
17676
18201
  additionalProperties: true
@@ -17711,16 +18236,6 @@ components:
17711
18236
  - id
17712
18237
  - title
17713
18238
  - description
17714
- - url
17715
- - thumbnails
17716
- - x100
17717
- - x200
17718
- - x512
17719
- - url
17720
- - thumbnails
17721
- - x100
17722
- - x200
17723
- - x512
17724
18239
  - overwriteName
17725
18240
  - name
17726
18241
  - type
@@ -22029,51 +22544,6 @@ components:
22029
22544
  required:
22030
22545
  - collectionId
22031
22546
  - id
22032
- ProductImageThumbnails:
22033
- type: object
22034
- properties:
22035
- x100:
22036
- type: string
22037
- x200:
22038
- type: string
22039
- x512:
22040
- type: string
22041
- ProductImage:
22042
- type: object
22043
- properties:
22044
- id:
22045
- type: string
22046
- collectionId:
22047
- type: string
22048
- productId:
22049
- type: string
22050
- site:
22051
- type: string
22052
- name:
22053
- type: string
22054
- cleanName:
22055
- type: string
22056
- assetType:
22057
- type: string
22058
- type:
22059
- type: string
22060
- url:
22061
- type: string
22062
- thumbnails:
22063
- $ref: "#/components/schemas/ProductImageThumbnails"
22064
- contentType:
22065
- type: string
22066
- size:
22067
- type: object
22068
- additionalProperties: true
22069
- hash:
22070
- type: string
22071
- createdAt:
22072
- $ref: "#/components/schemas/ISODateString"
22073
- updatedAt:
22074
- $ref: "#/components/schemas/ISODateString"
22075
- deletedAt:
22076
- $ref: "#/components/schemas/ISODateString"
22077
22547
  ProductImageUrlInput:
22078
22548
  type: object
22079
22549
  properties:
@@ -22183,23 +22653,40 @@ components:
22183
22653
  gtin:
22184
22654
  type: string
22185
22655
  ownGtin:
22186
- type: boolean
22656
+ type: string
22187
22657
  additionalGtins:
22188
22658
  type: array
22189
22659
  items:
22190
22660
  $ref: "#/components/schemas/AdditionalGtin"
22191
22661
  sku:
22192
22662
  type: string
22663
+ schemaType:
22664
+ type: string
22665
+ type:
22666
+ type: string
22667
+ category:
22668
+ type: string
22193
22669
  label:
22194
22670
  type: string
22195
22671
  status:
22196
22672
  type: string
22673
+ enum:
22674
+ - active
22675
+ - deleted
22197
22676
  sortOrder:
22198
22677
  type: number
22199
22678
  heroImage:
22200
- $ref: "#/components/schemas/ProductImage"
22679
+ $ref: "#/components/schemas/AssetRef"
22680
+ additionalImages:
22681
+ type: array
22682
+ items:
22683
+ $ref: "#/components/schemas/AssetRef"
22201
22684
  facets:
22202
22685
  $ref: "#/components/schemas/ProductFacetMap"
22686
+ tags:
22687
+ type: object
22688
+ additionalProperties:
22689
+ type: boolean
22203
22690
  data:
22204
22691
  type: object
22205
22692
  additionalProperties:
@@ -22218,6 +22705,8 @@ components:
22218
22705
  type: string
22219
22706
  group:
22220
22707
  type: boolean
22708
+ groupKey:
22709
+ type: string
22221
22710
  createdAt:
22222
22711
  $ref: "#/components/schemas/ISODateString"
22223
22712
  updatedAt:
@@ -22242,13 +22731,15 @@ components:
22242
22731
  gtin:
22243
22732
  type: string
22244
22733
  ownGtin:
22245
- type: boolean
22734
+ type: string
22246
22735
  additionalGtins:
22247
22736
  type: array
22248
22737
  items:
22249
22738
  $ref: "#/components/schemas/AdditionalGtin"
22250
22739
  sku:
22251
22740
  type: string
22741
+ schemaType:
22742
+ type: string
22252
22743
  label:
22253
22744
  type: string
22254
22745
  status:
@@ -22258,8 +22749,17 @@ components:
22258
22749
  heroImage:
22259
22750
  type: object
22260
22751
  additionalProperties: true
22752
+ additionalImages:
22753
+ type: array
22754
+ items:
22755
+ type: object
22756
+ additionalProperties: true
22261
22757
  facets:
22262
22758
  $ref: "#/components/schemas/ProductFacetMap"
22759
+ tags:
22760
+ type: object
22761
+ additionalProperties:
22762
+ type: boolean
22263
22763
  data:
22264
22764
  type: object
22265
22765
  additionalProperties: