@wevion/cli 1.0.2602 → 1.0.2609

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.
Files changed (2) hide show
  1. package/openapi.json +3381 -159
  2. package/package.json +1 -1
package/openapi.json CHANGED
@@ -15049,6 +15049,7 @@
15049
15049
  "content": {
15050
15050
  "application/json": {
15051
15051
  "schema": {
15052
+ "additionalProperties": false,
15052
15053
  "type": "object",
15053
15054
  "required": [
15054
15055
  "statusCode",
@@ -15085,6 +15086,7 @@
15085
15086
  "content": {
15086
15087
  "application/json": {
15087
15088
  "schema": {
15089
+ "additionalProperties": false,
15088
15090
  "type": "object",
15089
15091
  "required": [
15090
15092
  "statusCode",
@@ -15111,6 +15113,7 @@
15111
15113
  "content": {
15112
15114
  "application/json": {
15113
15115
  "schema": {
15116
+ "additionalProperties": false,
15114
15117
  "type": "object",
15115
15118
  "required": [
15116
15119
  "statusCode",
@@ -15369,6 +15372,7 @@
15369
15372
  "content": {
15370
15373
  "application/json": {
15371
15374
  "schema": {
15375
+ "additionalProperties": false,
15372
15376
  "type": "object",
15373
15377
  "required": [
15374
15378
  "statusCode",
@@ -15395,6 +15399,7 @@
15395
15399
  "content": {
15396
15400
  "application/json": {
15397
15401
  "schema": {
15402
+ "additionalProperties": false,
15398
15403
  "type": "object",
15399
15404
  "required": [
15400
15405
  "statusCode",
@@ -90979,6 +90984,15 @@
90979
90984
  "in": "query",
90980
90985
  "name": "cursor",
90981
90986
  "required": false
90987
+ },
90988
+ {
90989
+ "schema": {
90990
+ "format": "uuid",
90991
+ "type": "string"
90992
+ },
90993
+ "in": "query",
90994
+ "name": "workspace_id",
90995
+ "required": false
90982
90996
  }
90983
90997
  ],
90984
90998
  "security": [
@@ -91007,6 +91021,8 @@
91007
91021
  "required": [
91008
91022
  "id",
91009
91023
  "owner_id",
91024
+ "organization_id",
91025
+ "workspace_id",
91010
91026
  "type",
91011
91027
  "amount",
91012
91028
  "balance_after",
@@ -91025,6 +91041,28 @@
91025
91041
  "format": "uuid",
91026
91042
  "type": "string"
91027
91043
  },
91044
+ "organization_id": {
91045
+ "anyOf": [
91046
+ {
91047
+ "format": "uuid",
91048
+ "type": "string"
91049
+ },
91050
+ {
91051
+ "type": "null"
91052
+ }
91053
+ ]
91054
+ },
91055
+ "workspace_id": {
91056
+ "anyOf": [
91057
+ {
91058
+ "format": "uuid",
91059
+ "type": "string"
91060
+ },
91061
+ {
91062
+ "type": "null"
91063
+ }
91064
+ ]
91065
+ },
91028
91066
  "type": {
91029
91067
  "type": "string"
91030
91068
  },
@@ -108903,6 +108941,9 @@
108903
108941
  },
108904
108942
  "error": {
108905
108943
  "type": "string"
108944
+ },
108945
+ "message": {
108946
+ "type": "string"
108906
108947
  }
108907
108948
  }
108908
108949
  }
@@ -108914,7 +108955,22 @@
108914
108955
  "content": {
108915
108956
  "application/json": {
108916
108957
  "schema": {
108917
- "$ref": "#/components/schemas/ErrorResponse"
108958
+ "additionalProperties": false,
108959
+ "type": "object",
108960
+ "required": [
108961
+ "error"
108962
+ ],
108963
+ "properties": {
108964
+ "code": {
108965
+ "type": "string"
108966
+ },
108967
+ "error": {
108968
+ "type": "string"
108969
+ },
108970
+ "message": {
108971
+ "type": "string"
108972
+ }
108973
+ }
108918
108974
  }
108919
108975
  }
108920
108976
  }
@@ -108935,6 +108991,59 @@
108935
108991
  },
108936
108992
  "error": {
108937
108993
  "type": "string"
108994
+ },
108995
+ "message": {
108996
+ "type": "string"
108997
+ }
108998
+ }
108999
+ }
109000
+ }
109001
+ }
109002
+ },
109003
+ "403": {
109004
+ "description": "Forbidden - caller lacks the required role/permission",
109005
+ "content": {
109006
+ "application/json": {
109007
+ "schema": {
109008
+ "additionalProperties": false,
109009
+ "type": "object",
109010
+ "required": [
109011
+ "error"
109012
+ ],
109013
+ "properties": {
109014
+ "code": {
109015
+ "type": "string"
109016
+ },
109017
+ "error": {
109018
+ "type": "string"
109019
+ },
109020
+ "message": {
109021
+ "type": "string"
109022
+ }
109023
+ }
109024
+ }
109025
+ }
109026
+ }
109027
+ },
109028
+ "404": {
109029
+ "description": "Resource not found",
109030
+ "content": {
109031
+ "application/json": {
109032
+ "schema": {
109033
+ "additionalProperties": false,
109034
+ "type": "object",
109035
+ "required": [
109036
+ "error"
109037
+ ],
109038
+ "properties": {
109039
+ "code": {
109040
+ "type": "string"
109041
+ },
109042
+ "error": {
109043
+ "type": "string"
109044
+ },
109045
+ "message": {
109046
+ "type": "string"
108938
109047
  }
108939
109048
  }
108940
109049
  }
@@ -109029,6 +109138,9 @@
109029
109138
  },
109030
109139
  "error": {
109031
109140
  "type": "string"
109141
+ },
109142
+ "message": {
109143
+ "type": "string"
109032
109144
  }
109033
109145
  }
109034
109146
  }
@@ -110000,6 +110112,9 @@
110000
110112
  },
110001
110113
  "error": {
110002
110114
  "type": "string"
110115
+ },
110116
+ "message": {
110117
+ "type": "string"
110003
110118
  }
110004
110119
  }
110005
110120
  }
@@ -110084,6 +110199,9 @@
110084
110199
  },
110085
110200
  "error": {
110086
110201
  "type": "string"
110202
+ },
110203
+ "message": {
110204
+ "type": "string"
110087
110205
  }
110088
110206
  }
110089
110207
  }
@@ -110106,6 +110224,9 @@
110106
110224
  },
110107
110225
  "error": {
110108
110226
  "type": "string"
110227
+ },
110228
+ "message": {
110229
+ "type": "string"
110109
110230
  }
110110
110231
  }
110111
110232
  }
@@ -110192,6 +110313,9 @@
110192
110313
  },
110193
110314
  "error": {
110194
110315
  "type": "string"
110316
+ },
110317
+ "message": {
110318
+ "type": "string"
110195
110319
  }
110196
110320
  }
110197
110321
  }
@@ -110407,6 +110531,9 @@
110407
110531
  },
110408
110532
  "error": {
110409
110533
  "type": "string"
110534
+ },
110535
+ "message": {
110536
+ "type": "string"
110410
110537
  }
110411
110538
  }
110412
110539
  }
@@ -110418,7 +110545,22 @@
110418
110545
  "content": {
110419
110546
  "application/json": {
110420
110547
  "schema": {
110421
- "$ref": "#/components/schemas/ErrorResponse"
110548
+ "additionalProperties": false,
110549
+ "type": "object",
110550
+ "required": [
110551
+ "error"
110552
+ ],
110553
+ "properties": {
110554
+ "code": {
110555
+ "type": "string"
110556
+ },
110557
+ "error": {
110558
+ "type": "string"
110559
+ },
110560
+ "message": {
110561
+ "type": "string"
110562
+ }
110563
+ }
110422
110564
  }
110423
110565
  }
110424
110566
  }
@@ -110439,6 +110581,59 @@
110439
110581
  },
110440
110582
  "error": {
110441
110583
  "type": "string"
110584
+ },
110585
+ "message": {
110586
+ "type": "string"
110587
+ }
110588
+ }
110589
+ }
110590
+ }
110591
+ }
110592
+ },
110593
+ "403": {
110594
+ "description": "Forbidden - caller lacks the required role/permission",
110595
+ "content": {
110596
+ "application/json": {
110597
+ "schema": {
110598
+ "additionalProperties": false,
110599
+ "type": "object",
110600
+ "required": [
110601
+ "error"
110602
+ ],
110603
+ "properties": {
110604
+ "code": {
110605
+ "type": "string"
110606
+ },
110607
+ "error": {
110608
+ "type": "string"
110609
+ },
110610
+ "message": {
110611
+ "type": "string"
110612
+ }
110613
+ }
110614
+ }
110615
+ }
110616
+ }
110617
+ },
110618
+ "404": {
110619
+ "description": "Resource not found",
110620
+ "content": {
110621
+ "application/json": {
110622
+ "schema": {
110623
+ "additionalProperties": false,
110624
+ "type": "object",
110625
+ "required": [
110626
+ "error"
110627
+ ],
110628
+ "properties": {
110629
+ "code": {
110630
+ "type": "string"
110631
+ },
110632
+ "error": {
110633
+ "type": "string"
110634
+ },
110635
+ "message": {
110636
+ "type": "string"
110442
110637
  }
110443
110638
  }
110444
110639
  }
@@ -111243,6 +111438,9 @@
111243
111438
  },
111244
111439
  "error": {
111245
111440
  "type": "string"
111441
+ },
111442
+ "message": {
111443
+ "type": "string"
111246
111444
  }
111247
111445
  }
111248
111446
  }
@@ -112075,6 +112273,42 @@
112075
112273
  }
112076
112274
  }
112077
112275
  },
112276
+ "403": {
112277
+ "description": "Forbidden - caller lacks the required role/permission",
112278
+ "content": {
112279
+ "application/json": {
112280
+ "schema": {
112281
+ "type": "object",
112282
+ "required": [
112283
+ "error"
112284
+ ],
112285
+ "properties": {
112286
+ "error": {
112287
+ "type": "string"
112288
+ }
112289
+ }
112290
+ }
112291
+ }
112292
+ }
112293
+ },
112294
+ "404": {
112295
+ "description": "Resource not found",
112296
+ "content": {
112297
+ "application/json": {
112298
+ "schema": {
112299
+ "type": "object",
112300
+ "required": [
112301
+ "error"
112302
+ ],
112303
+ "properties": {
112304
+ "error": {
112305
+ "type": "string"
112306
+ }
112307
+ }
112308
+ }
112309
+ }
112310
+ }
112311
+ },
112078
112312
  "413": {
112079
112313
  "description": "Payload too large",
112080
112314
  "content": {
@@ -112587,6 +112821,24 @@
112587
112821
  }
112588
112822
  }
112589
112823
  }
112824
+ },
112825
+ "404": {
112826
+ "description": "Resource not found",
112827
+ "content": {
112828
+ "application/json": {
112829
+ "schema": {
112830
+ "type": "object",
112831
+ "required": [
112832
+ "error"
112833
+ ],
112834
+ "properties": {
112835
+ "error": {
112836
+ "type": "string"
112837
+ }
112838
+ }
112839
+ }
112840
+ }
112841
+ }
112590
112842
  }
112591
112843
  }
112592
112844
  }
@@ -116358,6 +116610,9 @@
116358
116610
  },
116359
116611
  "error": {
116360
116612
  "type": "string"
116613
+ },
116614
+ "message": {
116615
+ "type": "string"
116361
116616
  }
116362
116617
  }
116363
116618
  }
@@ -116390,6 +116645,9 @@
116390
116645
  },
116391
116646
  "error": {
116392
116647
  "type": "string"
116648
+ },
116649
+ "message": {
116650
+ "type": "string"
116393
116651
  }
116394
116652
  }
116395
116653
  }
@@ -116412,6 +116670,9 @@
116412
116670
  },
116413
116671
  "error": {
116414
116672
  "type": "string"
116673
+ },
116674
+ "message": {
116675
+ "type": "string"
116415
116676
  }
116416
116677
  }
116417
116678
  }
@@ -116434,6 +116695,9 @@
116434
116695
  },
116435
116696
  "error": {
116436
116697
  "type": "string"
116698
+ },
116699
+ "message": {
116700
+ "type": "string"
116437
116701
  }
116438
116702
  }
116439
116703
  }
@@ -116456,6 +116720,9 @@
116456
116720
  },
116457
116721
  "error": {
116458
116722
  "type": "string"
116723
+ },
116724
+ "message": {
116725
+ "type": "string"
116459
116726
  }
116460
116727
  }
116461
116728
  }
@@ -116542,6 +116809,9 @@
116542
116809
  },
116543
116810
  "error": {
116544
116811
  "type": "string"
116812
+ },
116813
+ "message": {
116814
+ "type": "string"
116545
116815
  }
116546
116816
  }
116547
116817
  }
@@ -116574,6 +116844,9 @@
116574
116844
  },
116575
116845
  "error": {
116576
116846
  "type": "string"
116847
+ },
116848
+ "message": {
116849
+ "type": "string"
116577
116850
  }
116578
116851
  }
116579
116852
  }
@@ -116596,6 +116869,9 @@
116596
116869
  },
116597
116870
  "error": {
116598
116871
  "type": "string"
116872
+ },
116873
+ "message": {
116874
+ "type": "string"
116599
116875
  }
116600
116876
  }
116601
116877
  }
@@ -116618,6 +116894,9 @@
116618
116894
  },
116619
116895
  "error": {
116620
116896
  "type": "string"
116897
+ },
116898
+ "message": {
116899
+ "type": "string"
116621
116900
  }
116622
116901
  }
116623
116902
  }
@@ -116640,6 +116919,9 @@
116640
116919
  },
116641
116920
  "error": {
116642
116921
  "type": "string"
116922
+ },
116923
+ "message": {
116924
+ "type": "string"
116643
116925
  }
116644
116926
  }
116645
116927
  }
@@ -117013,7 +117295,22 @@
117013
117295
  "content": {
117014
117296
  "application/json": {
117015
117297
  "schema": {
117016
- "$ref": "#/components/schemas/ErrorResponse"
117298
+ "additionalProperties": false,
117299
+ "type": "object",
117300
+ "required": [
117301
+ "error"
117302
+ ],
117303
+ "properties": {
117304
+ "code": {
117305
+ "type": "string"
117306
+ },
117307
+ "error": {
117308
+ "type": "string"
117309
+ },
117310
+ "message": {
117311
+ "type": "string"
117312
+ }
117313
+ }
117017
117314
  }
117018
117315
  }
117019
117316
  }
@@ -117042,6 +117339,56 @@
117042
117339
  }
117043
117340
  }
117044
117341
  }
117342
+ },
117343
+ "403": {
117344
+ "description": "Forbidden - caller lacks the required role/permission",
117345
+ "content": {
117346
+ "application/json": {
117347
+ "schema": {
117348
+ "additionalProperties": false,
117349
+ "type": "object",
117350
+ "required": [
117351
+ "error"
117352
+ ],
117353
+ "properties": {
117354
+ "code": {
117355
+ "type": "string"
117356
+ },
117357
+ "error": {
117358
+ "type": "string"
117359
+ },
117360
+ "message": {
117361
+ "type": "string"
117362
+ }
117363
+ }
117364
+ }
117365
+ }
117366
+ }
117367
+ },
117368
+ "404": {
117369
+ "description": "Resource not found",
117370
+ "content": {
117371
+ "application/json": {
117372
+ "schema": {
117373
+ "additionalProperties": false,
117374
+ "type": "object",
117375
+ "required": [
117376
+ "error"
117377
+ ],
117378
+ "properties": {
117379
+ "code": {
117380
+ "type": "string"
117381
+ },
117382
+ "error": {
117383
+ "type": "string"
117384
+ },
117385
+ "message": {
117386
+ "type": "string"
117387
+ }
117388
+ }
117389
+ }
117390
+ }
117391
+ }
117045
117392
  }
117046
117393
  }
117047
117394
  }
@@ -117603,6 +117950,9 @@
117603
117950
  },
117604
117951
  "error": {
117605
117952
  "type": "string"
117953
+ },
117954
+ "message": {
117955
+ "type": "string"
117606
117956
  }
117607
117957
  }
117608
117958
  }
@@ -117687,6 +118037,9 @@
117687
118037
  },
117688
118038
  "error": {
117689
118039
  "type": "string"
118040
+ },
118041
+ "message": {
118042
+ "type": "string"
117690
118043
  }
117691
118044
  }
117692
118045
  }
@@ -117709,6 +118062,9 @@
117709
118062
  },
117710
118063
  "error": {
117711
118064
  "type": "string"
118065
+ },
118066
+ "message": {
118067
+ "type": "string"
117712
118068
  }
117713
118069
  }
117714
118070
  }
@@ -118357,6 +118713,9 @@
118357
118713
  },
118358
118714
  "error": {
118359
118715
  "type": "string"
118716
+ },
118717
+ "message": {
118718
+ "type": "string"
118360
118719
  }
118361
118720
  }
118362
118721
  }
@@ -118368,7 +118727,22 @@
118368
118727
  "content": {
118369
118728
  "application/json": {
118370
118729
  "schema": {
118371
- "$ref": "#/components/schemas/ErrorResponse"
118730
+ "additionalProperties": false,
118731
+ "type": "object",
118732
+ "required": [
118733
+ "error"
118734
+ ],
118735
+ "properties": {
118736
+ "code": {
118737
+ "type": "string"
118738
+ },
118739
+ "error": {
118740
+ "type": "string"
118741
+ },
118742
+ "message": {
118743
+ "type": "string"
118744
+ }
118745
+ }
118372
118746
  }
118373
118747
  }
118374
118748
  }
@@ -118389,6 +118763,59 @@
118389
118763
  },
118390
118764
  "error": {
118391
118765
  "type": "string"
118766
+ },
118767
+ "message": {
118768
+ "type": "string"
118769
+ }
118770
+ }
118771
+ }
118772
+ }
118773
+ }
118774
+ },
118775
+ "403": {
118776
+ "description": "Forbidden - caller lacks the required role/permission",
118777
+ "content": {
118778
+ "application/json": {
118779
+ "schema": {
118780
+ "additionalProperties": false,
118781
+ "type": "object",
118782
+ "required": [
118783
+ "error"
118784
+ ],
118785
+ "properties": {
118786
+ "code": {
118787
+ "type": "string"
118788
+ },
118789
+ "error": {
118790
+ "type": "string"
118791
+ },
118792
+ "message": {
118793
+ "type": "string"
118794
+ }
118795
+ }
118796
+ }
118797
+ }
118798
+ }
118799
+ },
118800
+ "404": {
118801
+ "description": "Resource not found",
118802
+ "content": {
118803
+ "application/json": {
118804
+ "schema": {
118805
+ "additionalProperties": false,
118806
+ "type": "object",
118807
+ "required": [
118808
+ "error"
118809
+ ],
118810
+ "properties": {
118811
+ "code": {
118812
+ "type": "string"
118813
+ },
118814
+ "error": {
118815
+ "type": "string"
118816
+ },
118817
+ "message": {
118818
+ "type": "string"
118392
118819
  }
118393
118820
  }
118394
118821
  }
@@ -119071,6 +119498,9 @@
119071
119498
  },
119072
119499
  "error": {
119073
119500
  "type": "string"
119501
+ },
119502
+ "message": {
119503
+ "type": "string"
119074
119504
  }
119075
119505
  }
119076
119506
  }
@@ -134739,6 +135169,7 @@
134739
135169
  "content": {
134740
135170
  "application/json": {
134741
135171
  "schema": {
135172
+ "additionalProperties": false,
134742
135173
  "type": "object",
134743
135174
  "required": [
134744
135175
  "id",
@@ -134836,6 +135267,7 @@
134836
135267
  "content": {
134837
135268
  "application/json": {
134838
135269
  "schema": {
135270
+ "additionalProperties": false,
134839
135271
  "type": "object",
134840
135272
  "required": [
134841
135273
  "statusCode",
@@ -134862,6 +135294,7 @@
134862
135294
  "content": {
134863
135295
  "application/json": {
134864
135296
  "schema": {
135297
+ "additionalProperties": false,
134865
135298
  "type": "object",
134866
135299
  "required": [
134867
135300
  "statusCode",
@@ -134888,6 +135321,7 @@
134888
135321
  "content": {
134889
135322
  "application/json": {
134890
135323
  "schema": {
135324
+ "additionalProperties": false,
134891
135325
  "type": "object",
134892
135326
  "required": [
134893
135327
  "statusCode",
@@ -134914,6 +135348,7 @@
134914
135348
  "content": {
134915
135349
  "application/json": {
134916
135350
  "schema": {
135351
+ "additionalProperties": false,
134917
135352
  "type": "object",
134918
135353
  "required": [
134919
135354
  "statusCode",
@@ -134941,11 +135376,11 @@
134941
135376
  "/api/v1/jobs": {
134942
135377
  "get": {
134943
135378
  "operationId": "listJobs",
134944
- "summary": "List jobs for the authenticated user",
135379
+ "summary": "List jobs visible to the authenticated user",
134945
135380
  "tags": [
134946
135381
  "jobs"
134947
135382
  ],
134948
- "description": "Returns a paginated list of async jobs for the current user. Supports filtering by job_type and status.",
135383
+ "description": "Returns a paginated list of async jobs owned by the current user or scoped to teams the user can access. Supports filtering by job_type and status.",
134949
135384
  "parameters": [
134950
135385
  {
134951
135386
  "schema": {
@@ -135023,6 +135458,7 @@
135023
135458
  "content": {
135024
135459
  "application/json": {
135025
135460
  "schema": {
135461
+ "additionalProperties": false,
135026
135462
  "type": "object",
135027
135463
  "required": [
135028
135464
  "items",
@@ -135032,6 +135468,7 @@
135032
135468
  "items": {
135033
135469
  "type": "array",
135034
135470
  "items": {
135471
+ "additionalProperties": false,
135035
135472
  "type": "object",
135036
135473
  "required": [
135037
135474
  "id",
@@ -135143,6 +135580,7 @@
135143
135580
  "content": {
135144
135581
  "application/json": {
135145
135582
  "schema": {
135583
+ "additionalProperties": false,
135146
135584
  "type": "object",
135147
135585
  "required": [
135148
135586
  "statusCode",
@@ -135169,6 +135607,7 @@
135169
135607
  "content": {
135170
135608
  "application/json": {
135171
135609
  "schema": {
135610
+ "additionalProperties": false,
135172
135611
  "type": "object",
135173
135612
  "required": [
135174
135613
  "statusCode",
@@ -135367,6 +135806,7 @@
135367
135806
  "content": {
135368
135807
  "application/json": {
135369
135808
  "schema": {
135809
+ "additionalProperties": false,
135370
135810
  "type": "object",
135371
135811
  "required": [
135372
135812
  "items",
@@ -135377,6 +135817,7 @@
135377
135817
  "items": {
135378
135818
  "type": "array",
135379
135819
  "items": {
135820
+ "additionalProperties": false,
135380
135821
  "type": "object",
135381
135822
  "required": [
135382
135823
  "id",
@@ -135471,6 +135912,7 @@
135471
135912
  "type": "integer"
135472
135913
  },
135473
135914
  "counts": {
135915
+ "additionalProperties": false,
135474
135916
  "type": "object",
135475
135917
  "required": [
135476
135918
  "PENDING",
@@ -135503,6 +135945,7 @@
135503
135945
  "content": {
135504
135946
  "application/json": {
135505
135947
  "schema": {
135948
+ "additionalProperties": false,
135506
135949
  "type": "object",
135507
135950
  "required": [
135508
135951
  "statusCode",
@@ -135529,6 +135972,7 @@
135529
135972
  "content": {
135530
135973
  "application/json": {
135531
135974
  "schema": {
135975
+ "additionalProperties": false,
135532
135976
  "type": "object",
135533
135977
  "required": [
135534
135978
  "statusCode",
@@ -135572,6 +136016,7 @@
135572
136016
  "content": {
135573
136017
  "application/json": {
135574
136018
  "schema": {
136019
+ "additionalProperties": false,
135575
136020
  "type": "object",
135576
136021
  "required": [
135577
136022
  "items"
@@ -135593,6 +136038,7 @@
135593
136038
  "content": {
135594
136039
  "application/json": {
135595
136040
  "schema": {
136041
+ "additionalProperties": false,
135596
136042
  "type": "object",
135597
136043
  "required": [
135598
136044
  "statusCode",
@@ -135619,6 +136065,7 @@
135619
136065
  "content": {
135620
136066
  "application/json": {
135621
136067
  "schema": {
136068
+ "additionalProperties": false,
135622
136069
  "type": "object",
135623
136070
  "required": [
135624
136071
  "statusCode",
@@ -142679,6 +143126,7 @@
142679
143126
  "application/json": {
142680
143127
  "schema": {
142681
143128
  "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
143129
+ "additionalProperties": false,
142682
143130
  "type": "object",
142683
143131
  "required": [
142684
143132
  "statusCode",
@@ -156744,14 +157192,14 @@
156744
157192
  }
156745
157193
  }
156746
157194
  },
156747
- "/api/v1/rbac/legal-entities": {
157195
+ "/api/v1/rbac/access-groups": {
156748
157196
  "get": {
156749
- "operationId": "getApiV1RbacLegalEntities",
156750
- "summary": "List legal entities accessible to the current user",
157197
+ "operationId": "getApiV1RbacAccessGroups",
157198
+ "summary": "List access groups",
156751
157199
  "tags": [
156752
157200
  "rbac"
156753
157201
  ],
156754
- "description": "Returns legal entities visible to the authenticated user, optionally filtered by workspace id and scoped through RBAC access.",
157202
+ "description": "Lists product Teams (access groups) visible to the caller. Organization owners/admins see all groups in their organization; members see groups they belong to.",
156755
157203
  "parameters": [
156756
157204
  {
156757
157205
  "schema": {
@@ -156759,7 +157207,7 @@
156759
157207
  "type": "string"
156760
157208
  },
156761
157209
  "in": "query",
156762
- "name": "workspace_id",
157210
+ "name": "organization_id",
156763
157211
  "required": false
156764
157212
  }
156765
157213
  ],
@@ -156774,6 +157222,7 @@
156774
157222
  "content": {
156775
157223
  "application/json": {
156776
157224
  "schema": {
157225
+ "additionalProperties": false,
156777
157226
  "type": "object",
156778
157227
  "required": [
156779
157228
  "items"
@@ -156782,18 +157231,15 @@
156782
157231
  "items": {
156783
157232
  "type": "array",
156784
157233
  "items": {
157234
+ "additionalProperties": false,
156785
157235
  "type": "object",
156786
157236
  "required": [
156787
157237
  "id",
156788
- "workspace_id",
156789
- "legal_name",
156790
- "vat_number",
156791
- "billing_email",
156792
- "billing_address",
156793
- "billing_city",
156794
- "billing_zip",
156795
- "billing_country",
156796
- "stripe_customer_id",
157238
+ "organization_id",
157239
+ "name",
157240
+ "slug",
157241
+ "member_count",
157242
+ "workspace_count",
156797
157243
  "created_at",
156798
157244
  "updated_at"
156799
157245
  ],
@@ -156802,82 +157248,2315 @@
156802
157248
  "format": "uuid",
156803
157249
  "type": "string"
156804
157250
  },
156805
- "workspace_id": {
157251
+ "organization_id": {
156806
157252
  "format": "uuid",
156807
157253
  "type": "string"
156808
157254
  },
156809
- "legal_name": {
157255
+ "name": {
156810
157256
  "type": "string"
156811
157257
  },
156812
- "vat_number": {
156813
- "anyOf": [
156814
- {
156815
- "type": "string"
156816
- },
156817
- {
156818
- "type": "null"
156819
- }
156820
- ]
156821
- },
156822
- "billing_email": {
156823
- "anyOf": [
156824
- {
156825
- "type": "string"
156826
- },
156827
- {
156828
- "type": "null"
156829
- }
156830
- ]
156831
- },
156832
- "billing_address": {
156833
- "anyOf": [
156834
- {
156835
- "type": "string"
156836
- },
156837
- {
156838
- "type": "null"
156839
- }
156840
- ]
156841
- },
156842
- "billing_city": {
156843
- "anyOf": [
156844
- {
156845
- "type": "string"
156846
- },
156847
- {
156848
- "type": "null"
156849
- }
156850
- ]
156851
- },
156852
- "billing_zip": {
156853
- "anyOf": [
156854
- {
156855
- "type": "string"
156856
- },
156857
- {
156858
- "type": "null"
156859
- }
156860
- ]
157258
+ "slug": {
157259
+ "type": "string"
156861
157260
  },
156862
- "billing_country": {
156863
- "anyOf": [
156864
- {
156865
- "type": "string"
156866
- },
156867
- {
156868
- "type": "null"
156869
- }
156870
- ]
157261
+ "member_count": {
157262
+ "type": "number"
156871
157263
  },
156872
- "stripe_customer_id": {
156873
- "anyOf": [
156874
- {
156875
- "type": "string"
156876
- },
156877
- {
156878
- "type": "null"
156879
- }
156880
- ]
157264
+ "workspace_count": {
157265
+ "type": "number"
157266
+ },
157267
+ "created_at": {
157268
+ "format": "date-time",
157269
+ "type": "string"
157270
+ },
157271
+ "updated_at": {
157272
+ "format": "date-time",
157273
+ "type": "string"
157274
+ }
157275
+ }
157276
+ }
157277
+ }
157278
+ }
157279
+ }
157280
+ }
157281
+ }
157282
+ },
157283
+ "401": {
157284
+ "description": "Unauthorized - missing or invalid bearer token",
157285
+ "content": {
157286
+ "application/json": {
157287
+ "schema": {
157288
+ "$ref": "#/components/schemas/ErrorResponse"
157289
+ }
157290
+ }
157291
+ }
157292
+ },
157293
+ "500": {
157294
+ "description": "Internal server error",
157295
+ "content": {
157296
+ "application/json": {
157297
+ "schema": {
157298
+ "additionalProperties": false,
157299
+ "type": "object",
157300
+ "required": [
157301
+ "statusCode",
157302
+ "error",
157303
+ "message"
157304
+ ],
157305
+ "properties": {
157306
+ "statusCode": {
157307
+ "type": "number"
157308
+ },
157309
+ "error": {
157310
+ "type": "string"
157311
+ },
157312
+ "message": {
157313
+ "type": "string"
157314
+ }
157315
+ }
157316
+ }
157317
+ }
157318
+ }
157319
+ }
157320
+ }
157321
+ },
157322
+ "post": {
157323
+ "operationId": "postApiV1RbacAccessGroups",
157324
+ "summary": "Create an access group",
157325
+ "tags": [
157326
+ "rbac"
157327
+ ],
157328
+ "description": "Creates a product Team under an organization. The caller must hold owner/admin-level access on the organization.",
157329
+ "requestBody": {
157330
+ "required": true,
157331
+ "content": {
157332
+ "application/json": {
157333
+ "schema": {
157334
+ "additionalProperties": false,
157335
+ "type": "object",
157336
+ "required": [
157337
+ "organization_id",
157338
+ "name"
157339
+ ],
157340
+ "properties": {
157341
+ "organization_id": {
157342
+ "format": "uuid",
157343
+ "type": "string"
157344
+ },
157345
+ "name": {
157346
+ "minLength": 1,
157347
+ "maxLength": 255,
157348
+ "type": "string"
157349
+ },
157350
+ "slug": {
157351
+ "minLength": 1,
157352
+ "maxLength": 100,
157353
+ "pattern": "^[a-z0-9-]+$",
157354
+ "type": "string"
157355
+ }
157356
+ }
157357
+ }
157358
+ }
157359
+ }
157360
+ },
157361
+ "security": [
157362
+ {
157363
+ "bearerAuth": []
157364
+ }
157365
+ ],
157366
+ "responses": {
157367
+ "201": {
157368
+ "description": "Resource created",
157369
+ "content": {
157370
+ "application/json": {
157371
+ "schema": {
157372
+ "additionalProperties": false,
157373
+ "type": "object",
157374
+ "required": [
157375
+ "id",
157376
+ "organization_id",
157377
+ "name",
157378
+ "slug",
157379
+ "member_count",
157380
+ "workspace_count",
157381
+ "created_at",
157382
+ "updated_at"
157383
+ ],
157384
+ "properties": {
157385
+ "id": {
157386
+ "format": "uuid",
157387
+ "type": "string"
157388
+ },
157389
+ "organization_id": {
157390
+ "format": "uuid",
157391
+ "type": "string"
157392
+ },
157393
+ "name": {
157394
+ "type": "string"
157395
+ },
157396
+ "slug": {
157397
+ "type": "string"
157398
+ },
157399
+ "member_count": {
157400
+ "type": "number"
157401
+ },
157402
+ "workspace_count": {
157403
+ "type": "number"
157404
+ },
157405
+ "created_at": {
157406
+ "format": "date-time",
157407
+ "type": "string"
157408
+ },
157409
+ "updated_at": {
157410
+ "format": "date-time",
157411
+ "type": "string"
157412
+ }
157413
+ }
157414
+ }
157415
+ }
157416
+ }
157417
+ },
157418
+ "400": {
157419
+ "description": "Invalid request - schema validation failed",
157420
+ "content": {
157421
+ "application/json": {
157422
+ "schema": {
157423
+ "additionalProperties": false,
157424
+ "type": "object",
157425
+ "required": [
157426
+ "statusCode",
157427
+ "error",
157428
+ "message"
157429
+ ],
157430
+ "properties": {
157431
+ "statusCode": {
157432
+ "type": "number"
157433
+ },
157434
+ "error": {
157435
+ "type": "string"
157436
+ },
157437
+ "message": {
157438
+ "type": "string"
157439
+ }
157440
+ }
157441
+ }
157442
+ }
157443
+ }
157444
+ },
157445
+ "401": {
157446
+ "description": "Unauthorized - missing or invalid bearer token",
157447
+ "content": {
157448
+ "application/json": {
157449
+ "schema": {
157450
+ "$ref": "#/components/schemas/ErrorResponse"
157451
+ }
157452
+ }
157453
+ }
157454
+ },
157455
+ "403": {
157456
+ "description": "Forbidden - caller lacks the required role/permission",
157457
+ "content": {
157458
+ "application/json": {
157459
+ "schema": {
157460
+ "additionalProperties": false,
157461
+ "type": "object",
157462
+ "required": [
157463
+ "statusCode",
157464
+ "error",
157465
+ "message"
157466
+ ],
157467
+ "properties": {
157468
+ "statusCode": {
157469
+ "type": "number"
157470
+ },
157471
+ "error": {
157472
+ "type": "string"
157473
+ },
157474
+ "message": {
157475
+ "type": "string"
157476
+ }
157477
+ }
157478
+ }
157479
+ }
157480
+ }
157481
+ },
157482
+ "409": {
157483
+ "description": "Conflict - resource state prevents the operation",
157484
+ "content": {
157485
+ "application/json": {
157486
+ "schema": {
157487
+ "additionalProperties": false,
157488
+ "type": "object",
157489
+ "required": [
157490
+ "statusCode",
157491
+ "error",
157492
+ "message"
157493
+ ],
157494
+ "properties": {
157495
+ "statusCode": {
157496
+ "type": "number"
157497
+ },
157498
+ "error": {
157499
+ "type": "string"
157500
+ },
157501
+ "message": {
157502
+ "type": "string"
157503
+ }
157504
+ }
157505
+ }
157506
+ }
157507
+ }
157508
+ },
157509
+ "500": {
157510
+ "description": "Internal server error",
157511
+ "content": {
157512
+ "application/json": {
157513
+ "schema": {
157514
+ "additionalProperties": false,
157515
+ "type": "object",
157516
+ "required": [
157517
+ "statusCode",
157518
+ "error",
157519
+ "message"
157520
+ ],
157521
+ "properties": {
157522
+ "statusCode": {
157523
+ "type": "number"
157524
+ },
157525
+ "error": {
157526
+ "type": "string"
157527
+ },
157528
+ "message": {
157529
+ "type": "string"
157530
+ }
157531
+ }
157532
+ }
157533
+ }
157534
+ }
157535
+ }
157536
+ }
157537
+ }
157538
+ },
157539
+ "/api/v1/rbac/access-groups/{id}": {
157540
+ "patch": {
157541
+ "operationId": "patchApiV1RbacAccessGroupsById",
157542
+ "summary": "Update an access group",
157543
+ "tags": [
157544
+ "rbac"
157545
+ ],
157546
+ "description": "Updates a product Team name or slug. The caller must hold owner/admin-level access on the organization.",
157547
+ "requestBody": {
157548
+ "required": true,
157549
+ "content": {
157550
+ "application/json": {
157551
+ "schema": {
157552
+ "additionalProperties": false,
157553
+ "type": "object",
157554
+ "properties": {
157555
+ "name": {
157556
+ "minLength": 1,
157557
+ "maxLength": 255,
157558
+ "type": "string"
157559
+ },
157560
+ "slug": {
157561
+ "minLength": 1,
157562
+ "maxLength": 100,
157563
+ "pattern": "^[a-z0-9-]+$",
157564
+ "type": "string"
157565
+ }
157566
+ }
157567
+ }
157568
+ }
157569
+ }
157570
+ },
157571
+ "parameters": [
157572
+ {
157573
+ "schema": {
157574
+ "format": "uuid",
157575
+ "type": "string"
157576
+ },
157577
+ "in": "path",
157578
+ "name": "id",
157579
+ "required": true
157580
+ }
157581
+ ],
157582
+ "security": [
157583
+ {
157584
+ "bearerAuth": []
157585
+ }
157586
+ ],
157587
+ "responses": {
157588
+ "200": {
157589
+ "description": "Successful response",
157590
+ "content": {
157591
+ "application/json": {
157592
+ "schema": {
157593
+ "additionalProperties": false,
157594
+ "type": "object",
157595
+ "required": [
157596
+ "id",
157597
+ "organization_id",
157598
+ "name",
157599
+ "slug",
157600
+ "member_count",
157601
+ "workspace_count",
157602
+ "created_at",
157603
+ "updated_at"
157604
+ ],
157605
+ "properties": {
157606
+ "id": {
157607
+ "format": "uuid",
157608
+ "type": "string"
157609
+ },
157610
+ "organization_id": {
157611
+ "format": "uuid",
157612
+ "type": "string"
157613
+ },
157614
+ "name": {
157615
+ "type": "string"
157616
+ },
157617
+ "slug": {
157618
+ "type": "string"
157619
+ },
157620
+ "member_count": {
157621
+ "type": "number"
157622
+ },
157623
+ "workspace_count": {
157624
+ "type": "number"
157625
+ },
157626
+ "created_at": {
157627
+ "format": "date-time",
157628
+ "type": "string"
157629
+ },
157630
+ "updated_at": {
157631
+ "format": "date-time",
157632
+ "type": "string"
157633
+ }
157634
+ }
157635
+ }
157636
+ }
157637
+ }
157638
+ },
157639
+ "400": {
157640
+ "description": "Invalid request - schema validation failed",
157641
+ "content": {
157642
+ "application/json": {
157643
+ "schema": {
157644
+ "additionalProperties": false,
157645
+ "type": "object",
157646
+ "required": [
157647
+ "statusCode",
157648
+ "error",
157649
+ "message"
157650
+ ],
157651
+ "properties": {
157652
+ "statusCode": {
157653
+ "type": "number"
157654
+ },
157655
+ "error": {
157656
+ "type": "string"
157657
+ },
157658
+ "message": {
157659
+ "type": "string"
157660
+ }
157661
+ }
157662
+ }
157663
+ }
157664
+ }
157665
+ },
157666
+ "401": {
157667
+ "description": "Unauthorized - missing or invalid bearer token",
157668
+ "content": {
157669
+ "application/json": {
157670
+ "schema": {
157671
+ "$ref": "#/components/schemas/ErrorResponse"
157672
+ }
157673
+ }
157674
+ }
157675
+ },
157676
+ "403": {
157677
+ "description": "Forbidden - caller lacks the required role/permission",
157678
+ "content": {
157679
+ "application/json": {
157680
+ "schema": {
157681
+ "additionalProperties": false,
157682
+ "type": "object",
157683
+ "required": [
157684
+ "statusCode",
157685
+ "error",
157686
+ "message"
157687
+ ],
157688
+ "properties": {
157689
+ "statusCode": {
157690
+ "type": "number"
157691
+ },
157692
+ "error": {
157693
+ "type": "string"
157694
+ },
157695
+ "message": {
157696
+ "type": "string"
157697
+ }
157698
+ }
157699
+ }
157700
+ }
157701
+ }
157702
+ },
157703
+ "404": {
157704
+ "description": "Resource not found",
157705
+ "content": {
157706
+ "application/json": {
157707
+ "schema": {
157708
+ "additionalProperties": false,
157709
+ "type": "object",
157710
+ "required": [
157711
+ "statusCode",
157712
+ "error",
157713
+ "message"
157714
+ ],
157715
+ "properties": {
157716
+ "statusCode": {
157717
+ "type": "number"
157718
+ },
157719
+ "error": {
157720
+ "type": "string"
157721
+ },
157722
+ "message": {
157723
+ "type": "string"
157724
+ }
157725
+ }
157726
+ }
157727
+ }
157728
+ }
157729
+ },
157730
+ "409": {
157731
+ "description": "Conflict - resource state prevents the operation",
157732
+ "content": {
157733
+ "application/json": {
157734
+ "schema": {
157735
+ "additionalProperties": false,
157736
+ "type": "object",
157737
+ "required": [
157738
+ "statusCode",
157739
+ "error",
157740
+ "message"
157741
+ ],
157742
+ "properties": {
157743
+ "statusCode": {
157744
+ "type": "number"
157745
+ },
157746
+ "error": {
157747
+ "type": "string"
157748
+ },
157749
+ "message": {
157750
+ "type": "string"
157751
+ }
157752
+ }
157753
+ }
157754
+ }
157755
+ }
157756
+ },
157757
+ "500": {
157758
+ "description": "Internal server error",
157759
+ "content": {
157760
+ "application/json": {
157761
+ "schema": {
157762
+ "additionalProperties": false,
157763
+ "type": "object",
157764
+ "required": [
157765
+ "statusCode",
157766
+ "error",
157767
+ "message"
157768
+ ],
157769
+ "properties": {
157770
+ "statusCode": {
157771
+ "type": "number"
157772
+ },
157773
+ "error": {
157774
+ "type": "string"
157775
+ },
157776
+ "message": {
157777
+ "type": "string"
157778
+ }
157779
+ }
157780
+ }
157781
+ }
157782
+ }
157783
+ }
157784
+ }
157785
+ },
157786
+ "delete": {
157787
+ "operationId": "deleteApiV1RbacAccessGroupsById",
157788
+ "summary": "Soft-delete an access group",
157789
+ "tags": [
157790
+ "rbac"
157791
+ ],
157792
+ "description": "Soft-deletes a product Team and its active memberships/workspace grants. The caller must hold owner/admin-level access on the organization.",
157793
+ "parameters": [
157794
+ {
157795
+ "schema": {
157796
+ "format": "uuid",
157797
+ "type": "string"
157798
+ },
157799
+ "in": "path",
157800
+ "name": "id",
157801
+ "required": true
157802
+ }
157803
+ ],
157804
+ "security": [
157805
+ {
157806
+ "bearerAuth": []
157807
+ }
157808
+ ],
157809
+ "responses": {
157810
+ "200": {
157811
+ "description": "Successful response",
157812
+ "content": {
157813
+ "application/json": {
157814
+ "schema": {
157815
+ "additionalProperties": false,
157816
+ "type": "object",
157817
+ "required": [
157818
+ "message"
157819
+ ],
157820
+ "properties": {
157821
+ "message": {
157822
+ "type": "string"
157823
+ }
157824
+ }
157825
+ }
157826
+ }
157827
+ }
157828
+ },
157829
+ "401": {
157830
+ "description": "Unauthorized - missing or invalid bearer token",
157831
+ "content": {
157832
+ "application/json": {
157833
+ "schema": {
157834
+ "$ref": "#/components/schemas/ErrorResponse"
157835
+ }
157836
+ }
157837
+ }
157838
+ },
157839
+ "403": {
157840
+ "description": "Forbidden - caller lacks the required role/permission",
157841
+ "content": {
157842
+ "application/json": {
157843
+ "schema": {
157844
+ "additionalProperties": false,
157845
+ "type": "object",
157846
+ "required": [
157847
+ "statusCode",
157848
+ "error",
157849
+ "message"
157850
+ ],
157851
+ "properties": {
157852
+ "statusCode": {
157853
+ "type": "number"
157854
+ },
157855
+ "error": {
157856
+ "type": "string"
157857
+ },
157858
+ "message": {
157859
+ "type": "string"
157860
+ }
157861
+ }
157862
+ }
157863
+ }
157864
+ }
157865
+ },
157866
+ "404": {
157867
+ "description": "Resource not found",
157868
+ "content": {
157869
+ "application/json": {
157870
+ "schema": {
157871
+ "additionalProperties": false,
157872
+ "type": "object",
157873
+ "required": [
157874
+ "statusCode",
157875
+ "error",
157876
+ "message"
157877
+ ],
157878
+ "properties": {
157879
+ "statusCode": {
157880
+ "type": "number"
157881
+ },
157882
+ "error": {
157883
+ "type": "string"
157884
+ },
157885
+ "message": {
157886
+ "type": "string"
157887
+ }
157888
+ }
157889
+ }
157890
+ }
157891
+ }
157892
+ },
157893
+ "500": {
157894
+ "description": "Internal server error",
157895
+ "content": {
157896
+ "application/json": {
157897
+ "schema": {
157898
+ "additionalProperties": false,
157899
+ "type": "object",
157900
+ "required": [
157901
+ "statusCode",
157902
+ "error",
157903
+ "message"
157904
+ ],
157905
+ "properties": {
157906
+ "statusCode": {
157907
+ "type": "number"
157908
+ },
157909
+ "error": {
157910
+ "type": "string"
157911
+ },
157912
+ "message": {
157913
+ "type": "string"
157914
+ }
157915
+ }
157916
+ }
157917
+ }
157918
+ }
157919
+ }
157920
+ }
157921
+ }
157922
+ },
157923
+ "/api/v1/rbac/access-groups/{id}/members": {
157924
+ "get": {
157925
+ "operationId": "getApiV1RbacAccessGroupsByIdMembers",
157926
+ "summary": "List access group members",
157927
+ "tags": [
157928
+ "rbac"
157929
+ ],
157930
+ "description": "Lists members of a product Team. Organization owners/admins and members of the group can read this list.",
157931
+ "parameters": [
157932
+ {
157933
+ "schema": {
157934
+ "format": "uuid",
157935
+ "type": "string"
157936
+ },
157937
+ "in": "path",
157938
+ "name": "id",
157939
+ "required": true
157940
+ }
157941
+ ],
157942
+ "security": [
157943
+ {
157944
+ "bearerAuth": []
157945
+ }
157946
+ ],
157947
+ "responses": {
157948
+ "200": {
157949
+ "description": "Successful response",
157950
+ "content": {
157951
+ "application/json": {
157952
+ "schema": {
157953
+ "additionalProperties": false,
157954
+ "type": "object",
157955
+ "required": [
157956
+ "items"
157957
+ ],
157958
+ "properties": {
157959
+ "items": {
157960
+ "type": "array",
157961
+ "items": {
157962
+ "additionalProperties": false,
157963
+ "type": "object",
157964
+ "required": [
157965
+ "id",
157966
+ "access_group_id",
157967
+ "user_id",
157968
+ "role",
157969
+ "user_email",
157970
+ "user_name",
157971
+ "created_at"
157972
+ ],
157973
+ "properties": {
157974
+ "id": {
157975
+ "format": "uuid",
157976
+ "type": "string"
157977
+ },
157978
+ "access_group_id": {
157979
+ "format": "uuid",
157980
+ "type": "string"
157981
+ },
157982
+ "user_id": {
157983
+ "format": "uuid",
157984
+ "type": "string"
157985
+ },
157986
+ "role": {
157987
+ "anyOf": [
157988
+ {
157989
+ "type": "string",
157990
+ "enum": [
157991
+ "lead"
157992
+ ]
157993
+ },
157994
+ {
157995
+ "type": "string",
157996
+ "enum": [
157997
+ "member"
157998
+ ]
157999
+ }
158000
+ ]
158001
+ },
158002
+ "user_email": {
158003
+ "anyOf": [
158004
+ {
158005
+ "type": "string"
158006
+ },
158007
+ {
158008
+ "type": "null"
158009
+ }
158010
+ ]
158011
+ },
158012
+ "user_name": {
158013
+ "anyOf": [
158014
+ {
158015
+ "type": "string"
158016
+ },
158017
+ {
158018
+ "type": "null"
158019
+ }
158020
+ ]
158021
+ },
158022
+ "created_at": {
158023
+ "format": "date-time",
158024
+ "type": "string"
158025
+ }
158026
+ }
158027
+ }
158028
+ }
158029
+ }
158030
+ }
158031
+ }
158032
+ }
158033
+ },
158034
+ "401": {
158035
+ "description": "Unauthorized - missing or invalid bearer token",
158036
+ "content": {
158037
+ "application/json": {
158038
+ "schema": {
158039
+ "$ref": "#/components/schemas/ErrorResponse"
158040
+ }
158041
+ }
158042
+ }
158043
+ },
158044
+ "403": {
158045
+ "description": "Forbidden - caller lacks the required role/permission",
158046
+ "content": {
158047
+ "application/json": {
158048
+ "schema": {
158049
+ "additionalProperties": false,
158050
+ "type": "object",
158051
+ "required": [
158052
+ "statusCode",
158053
+ "error",
158054
+ "message"
158055
+ ],
158056
+ "properties": {
158057
+ "statusCode": {
158058
+ "type": "number"
158059
+ },
158060
+ "error": {
158061
+ "type": "string"
158062
+ },
158063
+ "message": {
158064
+ "type": "string"
158065
+ }
158066
+ }
158067
+ }
158068
+ }
158069
+ }
158070
+ },
158071
+ "404": {
158072
+ "description": "Resource not found",
158073
+ "content": {
158074
+ "application/json": {
158075
+ "schema": {
158076
+ "additionalProperties": false,
158077
+ "type": "object",
158078
+ "required": [
158079
+ "statusCode",
158080
+ "error",
158081
+ "message"
158082
+ ],
158083
+ "properties": {
158084
+ "statusCode": {
158085
+ "type": "number"
158086
+ },
158087
+ "error": {
158088
+ "type": "string"
158089
+ },
158090
+ "message": {
158091
+ "type": "string"
158092
+ }
158093
+ }
158094
+ }
158095
+ }
158096
+ }
158097
+ },
158098
+ "500": {
158099
+ "description": "Internal server error",
158100
+ "content": {
158101
+ "application/json": {
158102
+ "schema": {
158103
+ "additionalProperties": false,
158104
+ "type": "object",
158105
+ "required": [
158106
+ "statusCode",
158107
+ "error",
158108
+ "message"
158109
+ ],
158110
+ "properties": {
158111
+ "statusCode": {
158112
+ "type": "number"
158113
+ },
158114
+ "error": {
158115
+ "type": "string"
158116
+ },
158117
+ "message": {
158118
+ "type": "string"
158119
+ }
158120
+ }
158121
+ }
158122
+ }
158123
+ }
158124
+ }
158125
+ }
158126
+ },
158127
+ "post": {
158128
+ "operationId": "postApiV1RbacAccessGroupsByIdMembers",
158129
+ "summary": "Add an access group member",
158130
+ "tags": [
158131
+ "rbac"
158132
+ ],
158133
+ "description": "Adds an existing organization member to a product Team. Organization owners/admins can add leads or members; team leads can add regular members only.",
158134
+ "requestBody": {
158135
+ "required": true,
158136
+ "content": {
158137
+ "application/json": {
158138
+ "schema": {
158139
+ "additionalProperties": false,
158140
+ "type": "object",
158141
+ "required": [
158142
+ "user_id"
158143
+ ],
158144
+ "properties": {
158145
+ "user_id": {
158146
+ "format": "uuid",
158147
+ "type": "string"
158148
+ },
158149
+ "role": {
158150
+ "anyOf": [
158151
+ {
158152
+ "type": "string",
158153
+ "enum": [
158154
+ "lead"
158155
+ ]
158156
+ },
158157
+ {
158158
+ "type": "string",
158159
+ "enum": [
158160
+ "member"
158161
+ ]
158162
+ }
158163
+ ]
158164
+ }
158165
+ }
158166
+ }
158167
+ }
158168
+ }
158169
+ },
158170
+ "parameters": [
158171
+ {
158172
+ "schema": {
158173
+ "format": "uuid",
158174
+ "type": "string"
158175
+ },
158176
+ "in": "path",
158177
+ "name": "id",
158178
+ "required": true
158179
+ }
158180
+ ],
158181
+ "security": [
158182
+ {
158183
+ "bearerAuth": []
158184
+ }
158185
+ ],
158186
+ "responses": {
158187
+ "201": {
158188
+ "description": "Resource created",
158189
+ "content": {
158190
+ "application/json": {
158191
+ "schema": {
158192
+ "additionalProperties": false,
158193
+ "type": "object",
158194
+ "required": [
158195
+ "id",
158196
+ "access_group_id",
158197
+ "user_id",
158198
+ "role",
158199
+ "user_email",
158200
+ "user_name",
158201
+ "created_at"
158202
+ ],
158203
+ "properties": {
158204
+ "id": {
158205
+ "format": "uuid",
158206
+ "type": "string"
158207
+ },
158208
+ "access_group_id": {
158209
+ "format": "uuid",
158210
+ "type": "string"
158211
+ },
158212
+ "user_id": {
158213
+ "format": "uuid",
158214
+ "type": "string"
158215
+ },
158216
+ "role": {
158217
+ "anyOf": [
158218
+ {
158219
+ "type": "string",
158220
+ "enum": [
158221
+ "lead"
158222
+ ]
158223
+ },
158224
+ {
158225
+ "type": "string",
158226
+ "enum": [
158227
+ "member"
158228
+ ]
158229
+ }
158230
+ ]
158231
+ },
158232
+ "user_email": {
158233
+ "anyOf": [
158234
+ {
158235
+ "type": "string"
158236
+ },
158237
+ {
158238
+ "type": "null"
158239
+ }
158240
+ ]
158241
+ },
158242
+ "user_name": {
158243
+ "anyOf": [
158244
+ {
158245
+ "type": "string"
158246
+ },
158247
+ {
158248
+ "type": "null"
158249
+ }
158250
+ ]
158251
+ },
158252
+ "created_at": {
158253
+ "format": "date-time",
158254
+ "type": "string"
158255
+ }
158256
+ }
158257
+ }
158258
+ }
158259
+ }
158260
+ },
158261
+ "400": {
158262
+ "description": "Invalid request - schema validation failed",
158263
+ "content": {
158264
+ "application/json": {
158265
+ "schema": {
158266
+ "additionalProperties": false,
158267
+ "type": "object",
158268
+ "required": [
158269
+ "statusCode",
158270
+ "error",
158271
+ "message"
158272
+ ],
158273
+ "properties": {
158274
+ "statusCode": {
158275
+ "type": "number"
158276
+ },
158277
+ "error": {
158278
+ "type": "string"
158279
+ },
158280
+ "message": {
158281
+ "type": "string"
158282
+ }
158283
+ }
158284
+ }
158285
+ }
158286
+ }
158287
+ },
158288
+ "401": {
158289
+ "description": "Unauthorized - missing or invalid bearer token",
158290
+ "content": {
158291
+ "application/json": {
158292
+ "schema": {
158293
+ "$ref": "#/components/schemas/ErrorResponse"
158294
+ }
158295
+ }
158296
+ }
158297
+ },
158298
+ "403": {
158299
+ "description": "Forbidden - caller lacks the required role/permission",
158300
+ "content": {
158301
+ "application/json": {
158302
+ "schema": {
158303
+ "additionalProperties": false,
158304
+ "type": "object",
158305
+ "required": [
158306
+ "statusCode",
158307
+ "error",
158308
+ "message"
158309
+ ],
158310
+ "properties": {
158311
+ "statusCode": {
158312
+ "type": "number"
158313
+ },
158314
+ "error": {
158315
+ "type": "string"
158316
+ },
158317
+ "message": {
158318
+ "type": "string"
158319
+ }
158320
+ }
158321
+ }
158322
+ }
158323
+ }
158324
+ },
158325
+ "404": {
158326
+ "description": "Resource not found",
158327
+ "content": {
158328
+ "application/json": {
158329
+ "schema": {
158330
+ "additionalProperties": false,
158331
+ "type": "object",
158332
+ "required": [
158333
+ "statusCode",
158334
+ "error",
158335
+ "message"
158336
+ ],
158337
+ "properties": {
158338
+ "statusCode": {
158339
+ "type": "number"
158340
+ },
158341
+ "error": {
158342
+ "type": "string"
158343
+ },
158344
+ "message": {
158345
+ "type": "string"
158346
+ }
158347
+ }
158348
+ }
158349
+ }
158350
+ }
158351
+ },
158352
+ "409": {
158353
+ "description": "Conflict - resource state prevents the operation",
158354
+ "content": {
158355
+ "application/json": {
158356
+ "schema": {
158357
+ "additionalProperties": false,
158358
+ "type": "object",
158359
+ "required": [
158360
+ "statusCode",
158361
+ "error",
158362
+ "message"
158363
+ ],
158364
+ "properties": {
158365
+ "statusCode": {
158366
+ "type": "number"
158367
+ },
158368
+ "error": {
158369
+ "type": "string"
158370
+ },
158371
+ "message": {
158372
+ "type": "string"
158373
+ }
158374
+ }
158375
+ }
158376
+ }
158377
+ }
158378
+ },
158379
+ "500": {
158380
+ "description": "Internal server error",
158381
+ "content": {
158382
+ "application/json": {
158383
+ "schema": {
158384
+ "additionalProperties": false,
158385
+ "type": "object",
158386
+ "required": [
158387
+ "statusCode",
158388
+ "error",
158389
+ "message"
158390
+ ],
158391
+ "properties": {
158392
+ "statusCode": {
158393
+ "type": "number"
158394
+ },
158395
+ "error": {
158396
+ "type": "string"
158397
+ },
158398
+ "message": {
158399
+ "type": "string"
158400
+ }
158401
+ }
158402
+ }
158403
+ }
158404
+ }
158405
+ }
158406
+ }
158407
+ }
158408
+ },
158409
+ "/api/v1/rbac/access-groups/{id}/members/{membership_id}": {
158410
+ "patch": {
158411
+ "operationId": "patchApiV1RbacAccessGroupsByIdMembersByMembershipId",
158412
+ "summary": "Update an access group member role",
158413
+ "tags": [
158414
+ "rbac"
158415
+ ],
158416
+ "description": "Changes a product Team member between lead and member. Only organization owners/admins can appoint or demote team leads.",
158417
+ "requestBody": {
158418
+ "required": true,
158419
+ "content": {
158420
+ "application/json": {
158421
+ "schema": {
158422
+ "additionalProperties": false,
158423
+ "type": "object",
158424
+ "required": [
158425
+ "role"
158426
+ ],
158427
+ "properties": {
158428
+ "role": {
158429
+ "anyOf": [
158430
+ {
158431
+ "type": "string",
158432
+ "enum": [
158433
+ "lead"
158434
+ ]
158435
+ },
158436
+ {
158437
+ "type": "string",
158438
+ "enum": [
158439
+ "member"
158440
+ ]
158441
+ }
158442
+ ]
158443
+ }
158444
+ }
158445
+ }
158446
+ }
158447
+ }
158448
+ },
158449
+ "parameters": [
158450
+ {
158451
+ "schema": {
158452
+ "format": "uuid",
158453
+ "type": "string"
158454
+ },
158455
+ "in": "path",
158456
+ "name": "id",
158457
+ "required": true
158458
+ },
158459
+ {
158460
+ "schema": {
158461
+ "format": "uuid",
158462
+ "type": "string"
158463
+ },
158464
+ "in": "path",
158465
+ "name": "membership_id",
158466
+ "required": true
158467
+ }
158468
+ ],
158469
+ "security": [
158470
+ {
158471
+ "bearerAuth": []
158472
+ }
158473
+ ],
158474
+ "responses": {
158475
+ "200": {
158476
+ "description": "Successful response",
158477
+ "content": {
158478
+ "application/json": {
158479
+ "schema": {
158480
+ "additionalProperties": false,
158481
+ "type": "object",
158482
+ "required": [
158483
+ "id",
158484
+ "access_group_id",
158485
+ "user_id",
158486
+ "role",
158487
+ "user_email",
158488
+ "user_name",
158489
+ "created_at"
158490
+ ],
158491
+ "properties": {
158492
+ "id": {
158493
+ "format": "uuid",
158494
+ "type": "string"
158495
+ },
158496
+ "access_group_id": {
158497
+ "format": "uuid",
158498
+ "type": "string"
158499
+ },
158500
+ "user_id": {
158501
+ "format": "uuid",
158502
+ "type": "string"
158503
+ },
158504
+ "role": {
158505
+ "anyOf": [
158506
+ {
158507
+ "type": "string",
158508
+ "enum": [
158509
+ "lead"
158510
+ ]
158511
+ },
158512
+ {
158513
+ "type": "string",
158514
+ "enum": [
158515
+ "member"
158516
+ ]
158517
+ }
158518
+ ]
158519
+ },
158520
+ "user_email": {
158521
+ "anyOf": [
158522
+ {
158523
+ "type": "string"
158524
+ },
158525
+ {
158526
+ "type": "null"
158527
+ }
158528
+ ]
158529
+ },
158530
+ "user_name": {
158531
+ "anyOf": [
158532
+ {
158533
+ "type": "string"
158534
+ },
158535
+ {
158536
+ "type": "null"
158537
+ }
158538
+ ]
158539
+ },
158540
+ "created_at": {
158541
+ "format": "date-time",
158542
+ "type": "string"
158543
+ }
158544
+ }
158545
+ }
158546
+ }
158547
+ }
158548
+ },
158549
+ "400": {
158550
+ "description": "Invalid request - schema validation failed",
158551
+ "content": {
158552
+ "application/json": {
158553
+ "schema": {
158554
+ "additionalProperties": false,
158555
+ "type": "object",
158556
+ "required": [
158557
+ "statusCode",
158558
+ "error",
158559
+ "message"
158560
+ ],
158561
+ "properties": {
158562
+ "statusCode": {
158563
+ "type": "number"
158564
+ },
158565
+ "error": {
158566
+ "type": "string"
158567
+ },
158568
+ "message": {
158569
+ "type": "string"
158570
+ }
158571
+ }
158572
+ }
158573
+ }
158574
+ }
158575
+ },
158576
+ "401": {
158577
+ "description": "Unauthorized - missing or invalid bearer token",
158578
+ "content": {
158579
+ "application/json": {
158580
+ "schema": {
158581
+ "$ref": "#/components/schemas/ErrorResponse"
158582
+ }
158583
+ }
158584
+ }
158585
+ },
158586
+ "403": {
158587
+ "description": "Forbidden - caller lacks the required role/permission",
158588
+ "content": {
158589
+ "application/json": {
158590
+ "schema": {
158591
+ "additionalProperties": false,
158592
+ "type": "object",
158593
+ "required": [
158594
+ "statusCode",
158595
+ "error",
158596
+ "message"
158597
+ ],
158598
+ "properties": {
158599
+ "statusCode": {
158600
+ "type": "number"
158601
+ },
158602
+ "error": {
158603
+ "type": "string"
158604
+ },
158605
+ "message": {
158606
+ "type": "string"
158607
+ }
158608
+ }
158609
+ }
158610
+ }
158611
+ }
158612
+ },
158613
+ "404": {
158614
+ "description": "Resource not found",
158615
+ "content": {
158616
+ "application/json": {
158617
+ "schema": {
158618
+ "additionalProperties": false,
158619
+ "type": "object",
158620
+ "required": [
158621
+ "statusCode",
158622
+ "error",
158623
+ "message"
158624
+ ],
158625
+ "properties": {
158626
+ "statusCode": {
158627
+ "type": "number"
158628
+ },
158629
+ "error": {
158630
+ "type": "string"
158631
+ },
158632
+ "message": {
158633
+ "type": "string"
158634
+ }
158635
+ }
158636
+ }
158637
+ }
158638
+ }
158639
+ },
158640
+ "500": {
158641
+ "description": "Internal server error",
158642
+ "content": {
158643
+ "application/json": {
158644
+ "schema": {
158645
+ "additionalProperties": false,
158646
+ "type": "object",
158647
+ "required": [
158648
+ "statusCode",
158649
+ "error",
158650
+ "message"
158651
+ ],
158652
+ "properties": {
158653
+ "statusCode": {
158654
+ "type": "number"
158655
+ },
158656
+ "error": {
158657
+ "type": "string"
158658
+ },
158659
+ "message": {
158660
+ "type": "string"
158661
+ }
158662
+ }
158663
+ }
158664
+ }
158665
+ }
158666
+ }
158667
+ }
158668
+ },
158669
+ "delete": {
158670
+ "operationId": "deleteApiV1RbacAccessGroupsByIdMembersByMembershipId",
158671
+ "summary": "Remove an access group member",
158672
+ "tags": [
158673
+ "rbac"
158674
+ ],
158675
+ "description": "Removes a member from a product Team. Organization owners/admins can remove any member; team leads can remove regular members only.",
158676
+ "parameters": [
158677
+ {
158678
+ "schema": {
158679
+ "format": "uuid",
158680
+ "type": "string"
158681
+ },
158682
+ "in": "path",
158683
+ "name": "id",
158684
+ "required": true
158685
+ },
158686
+ {
158687
+ "schema": {
158688
+ "format": "uuid",
158689
+ "type": "string"
158690
+ },
158691
+ "in": "path",
158692
+ "name": "membership_id",
158693
+ "required": true
158694
+ }
158695
+ ],
158696
+ "security": [
158697
+ {
158698
+ "bearerAuth": []
158699
+ }
158700
+ ],
158701
+ "responses": {
158702
+ "200": {
158703
+ "description": "Successful response",
158704
+ "content": {
158705
+ "application/json": {
158706
+ "schema": {
158707
+ "additionalProperties": false,
158708
+ "type": "object",
158709
+ "required": [
158710
+ "message"
158711
+ ],
158712
+ "properties": {
158713
+ "message": {
158714
+ "type": "string"
158715
+ }
158716
+ }
158717
+ }
158718
+ }
158719
+ }
158720
+ },
158721
+ "401": {
158722
+ "description": "Unauthorized - missing or invalid bearer token",
158723
+ "content": {
158724
+ "application/json": {
158725
+ "schema": {
158726
+ "$ref": "#/components/schemas/ErrorResponse"
158727
+ }
158728
+ }
158729
+ }
158730
+ },
158731
+ "403": {
158732
+ "description": "Forbidden - caller lacks the required role/permission",
158733
+ "content": {
158734
+ "application/json": {
158735
+ "schema": {
158736
+ "additionalProperties": false,
158737
+ "type": "object",
158738
+ "required": [
158739
+ "statusCode",
158740
+ "error",
158741
+ "message"
158742
+ ],
158743
+ "properties": {
158744
+ "statusCode": {
158745
+ "type": "number"
158746
+ },
158747
+ "error": {
158748
+ "type": "string"
158749
+ },
158750
+ "message": {
158751
+ "type": "string"
158752
+ }
158753
+ }
158754
+ }
158755
+ }
158756
+ }
158757
+ },
158758
+ "404": {
158759
+ "description": "Resource not found",
158760
+ "content": {
158761
+ "application/json": {
158762
+ "schema": {
158763
+ "additionalProperties": false,
158764
+ "type": "object",
158765
+ "required": [
158766
+ "statusCode",
158767
+ "error",
158768
+ "message"
158769
+ ],
158770
+ "properties": {
158771
+ "statusCode": {
158772
+ "type": "number"
158773
+ },
158774
+ "error": {
158775
+ "type": "string"
158776
+ },
158777
+ "message": {
158778
+ "type": "string"
158779
+ }
158780
+ }
158781
+ }
158782
+ }
158783
+ }
158784
+ },
158785
+ "500": {
158786
+ "description": "Internal server error",
158787
+ "content": {
158788
+ "application/json": {
158789
+ "schema": {
158790
+ "additionalProperties": false,
158791
+ "type": "object",
158792
+ "required": [
158793
+ "statusCode",
158794
+ "error",
158795
+ "message"
158796
+ ],
158797
+ "properties": {
158798
+ "statusCode": {
158799
+ "type": "number"
158800
+ },
158801
+ "error": {
158802
+ "type": "string"
158803
+ },
158804
+ "message": {
158805
+ "type": "string"
158806
+ }
158807
+ }
158808
+ }
158809
+ }
158810
+ }
158811
+ }
158812
+ }
158813
+ }
158814
+ },
158815
+ "/api/v1/rbac/access-groups/{id}/workspaces": {
158816
+ "get": {
158817
+ "operationId": "getApiV1RbacAccessGroupsByIdWorkspaces",
158818
+ "summary": "List access group workspace grants",
158819
+ "tags": [
158820
+ "rbac"
158821
+ ],
158822
+ "description": "Lists Workspace grants assigned to a product Team. Organization owners/admins and members of the group can read this list.",
158823
+ "parameters": [
158824
+ {
158825
+ "schema": {
158826
+ "format": "uuid",
158827
+ "type": "string"
158828
+ },
158829
+ "in": "path",
158830
+ "name": "id",
158831
+ "required": true
158832
+ }
158833
+ ],
158834
+ "security": [
158835
+ {
158836
+ "bearerAuth": []
158837
+ }
158838
+ ],
158839
+ "responses": {
158840
+ "200": {
158841
+ "description": "Successful response",
158842
+ "content": {
158843
+ "application/json": {
158844
+ "schema": {
158845
+ "additionalProperties": false,
158846
+ "type": "object",
158847
+ "required": [
158848
+ "items"
158849
+ ],
158850
+ "properties": {
158851
+ "items": {
158852
+ "type": "array",
158853
+ "items": {
158854
+ "additionalProperties": false,
158855
+ "type": "object",
158856
+ "required": [
158857
+ "id",
158858
+ "access_group_id",
158859
+ "workspace_id",
158860
+ "workspace_name",
158861
+ "role",
158862
+ "created_at"
158863
+ ],
158864
+ "properties": {
158865
+ "id": {
158866
+ "format": "uuid",
158867
+ "type": "string"
158868
+ },
158869
+ "access_group_id": {
158870
+ "format": "uuid",
158871
+ "type": "string"
158872
+ },
158873
+ "workspace_id": {
158874
+ "format": "uuid",
158875
+ "type": "string"
158876
+ },
158877
+ "workspace_name": {
158878
+ "type": "string"
158879
+ },
158880
+ "role": {
158881
+ "anyOf": [
158882
+ {
158883
+ "type": "string",
158884
+ "enum": [
158885
+ "manager"
158886
+ ]
158887
+ },
158888
+ {
158889
+ "type": "string",
158890
+ "enum": [
158891
+ "mediabuyer"
158892
+ ]
158893
+ },
158894
+ {
158895
+ "type": "string",
158896
+ "enum": [
158897
+ "finance"
158898
+ ]
158899
+ },
158900
+ {
158901
+ "type": "string",
158902
+ "enum": [
158903
+ "viewer"
158904
+ ]
158905
+ }
158906
+ ]
158907
+ },
158908
+ "created_at": {
158909
+ "format": "date-time",
158910
+ "type": "string"
158911
+ }
158912
+ }
158913
+ }
158914
+ }
158915
+ }
158916
+ }
158917
+ }
158918
+ }
158919
+ },
158920
+ "401": {
158921
+ "description": "Unauthorized - missing or invalid bearer token",
158922
+ "content": {
158923
+ "application/json": {
158924
+ "schema": {
158925
+ "$ref": "#/components/schemas/ErrorResponse"
158926
+ }
158927
+ }
158928
+ }
158929
+ },
158930
+ "403": {
158931
+ "description": "Forbidden - caller lacks the required role/permission",
158932
+ "content": {
158933
+ "application/json": {
158934
+ "schema": {
158935
+ "additionalProperties": false,
158936
+ "type": "object",
158937
+ "required": [
158938
+ "statusCode",
158939
+ "error",
158940
+ "message"
158941
+ ],
158942
+ "properties": {
158943
+ "statusCode": {
158944
+ "type": "number"
158945
+ },
158946
+ "error": {
158947
+ "type": "string"
158948
+ },
158949
+ "message": {
158950
+ "type": "string"
158951
+ }
158952
+ }
158953
+ }
158954
+ }
158955
+ }
158956
+ },
158957
+ "404": {
158958
+ "description": "Resource not found",
158959
+ "content": {
158960
+ "application/json": {
158961
+ "schema": {
158962
+ "additionalProperties": false,
158963
+ "type": "object",
158964
+ "required": [
158965
+ "statusCode",
158966
+ "error",
158967
+ "message"
158968
+ ],
158969
+ "properties": {
158970
+ "statusCode": {
158971
+ "type": "number"
158972
+ },
158973
+ "error": {
158974
+ "type": "string"
158975
+ },
158976
+ "message": {
158977
+ "type": "string"
158978
+ }
158979
+ }
158980
+ }
158981
+ }
158982
+ }
158983
+ },
158984
+ "500": {
158985
+ "description": "Internal server error",
158986
+ "content": {
158987
+ "application/json": {
158988
+ "schema": {
158989
+ "additionalProperties": false,
158990
+ "type": "object",
158991
+ "required": [
158992
+ "statusCode",
158993
+ "error",
158994
+ "message"
158995
+ ],
158996
+ "properties": {
158997
+ "statusCode": {
158998
+ "type": "number"
158999
+ },
159000
+ "error": {
159001
+ "type": "string"
159002
+ },
159003
+ "message": {
159004
+ "type": "string"
159005
+ }
159006
+ }
159007
+ }
159008
+ }
159009
+ }
159010
+ }
159011
+ }
159012
+ }
159013
+ },
159014
+ "/api/v1/rbac/access-groups/{id}/workspaces/{workspace_id}": {
159015
+ "put": {
159016
+ "operationId": "putApiV1RbacAccessGroupsByIdWorkspacesByWorkspaceId",
159017
+ "summary": "Grant a workspace to an access group",
159018
+ "tags": [
159019
+ "rbac"
159020
+ ],
159021
+ "description": "Creates or updates the role a product Team has on a Workspace. Only organization owners/admins can manage workspace grants.",
159022
+ "requestBody": {
159023
+ "required": true,
159024
+ "content": {
159025
+ "application/json": {
159026
+ "schema": {
159027
+ "additionalProperties": false,
159028
+ "type": "object",
159029
+ "required": [
159030
+ "role"
159031
+ ],
159032
+ "properties": {
159033
+ "role": {
159034
+ "anyOf": [
159035
+ {
159036
+ "type": "string",
159037
+ "enum": [
159038
+ "manager"
159039
+ ]
159040
+ },
159041
+ {
159042
+ "type": "string",
159043
+ "enum": [
159044
+ "mediabuyer"
159045
+ ]
159046
+ },
159047
+ {
159048
+ "type": "string",
159049
+ "enum": [
159050
+ "finance"
159051
+ ]
159052
+ },
159053
+ {
159054
+ "type": "string",
159055
+ "enum": [
159056
+ "viewer"
159057
+ ]
159058
+ }
159059
+ ]
159060
+ }
159061
+ }
159062
+ }
159063
+ }
159064
+ }
159065
+ },
159066
+ "parameters": [
159067
+ {
159068
+ "schema": {
159069
+ "format": "uuid",
159070
+ "type": "string"
159071
+ },
159072
+ "in": "path",
159073
+ "name": "id",
159074
+ "required": true
159075
+ },
159076
+ {
159077
+ "schema": {
159078
+ "format": "uuid",
159079
+ "type": "string"
159080
+ },
159081
+ "in": "path",
159082
+ "name": "workspace_id",
159083
+ "required": true
159084
+ }
159085
+ ],
159086
+ "security": [
159087
+ {
159088
+ "bearerAuth": []
159089
+ }
159090
+ ],
159091
+ "responses": {
159092
+ "200": {
159093
+ "description": "Successful response",
159094
+ "content": {
159095
+ "application/json": {
159096
+ "schema": {
159097
+ "additionalProperties": false,
159098
+ "type": "object",
159099
+ "required": [
159100
+ "id",
159101
+ "access_group_id",
159102
+ "workspace_id",
159103
+ "workspace_name",
159104
+ "role",
159105
+ "created_at"
159106
+ ],
159107
+ "properties": {
159108
+ "id": {
159109
+ "format": "uuid",
159110
+ "type": "string"
159111
+ },
159112
+ "access_group_id": {
159113
+ "format": "uuid",
159114
+ "type": "string"
159115
+ },
159116
+ "workspace_id": {
159117
+ "format": "uuid",
159118
+ "type": "string"
159119
+ },
159120
+ "workspace_name": {
159121
+ "type": "string"
159122
+ },
159123
+ "role": {
159124
+ "anyOf": [
159125
+ {
159126
+ "type": "string",
159127
+ "enum": [
159128
+ "manager"
159129
+ ]
159130
+ },
159131
+ {
159132
+ "type": "string",
159133
+ "enum": [
159134
+ "mediabuyer"
159135
+ ]
159136
+ },
159137
+ {
159138
+ "type": "string",
159139
+ "enum": [
159140
+ "finance"
159141
+ ]
159142
+ },
159143
+ {
159144
+ "type": "string",
159145
+ "enum": [
159146
+ "viewer"
159147
+ ]
159148
+ }
159149
+ ]
159150
+ },
159151
+ "created_at": {
159152
+ "format": "date-time",
159153
+ "type": "string"
159154
+ }
159155
+ }
159156
+ }
159157
+ }
159158
+ }
159159
+ },
159160
+ "400": {
159161
+ "description": "Invalid request - schema validation failed",
159162
+ "content": {
159163
+ "application/json": {
159164
+ "schema": {
159165
+ "additionalProperties": false,
159166
+ "type": "object",
159167
+ "required": [
159168
+ "statusCode",
159169
+ "error",
159170
+ "message"
159171
+ ],
159172
+ "properties": {
159173
+ "statusCode": {
159174
+ "type": "number"
159175
+ },
159176
+ "error": {
159177
+ "type": "string"
159178
+ },
159179
+ "message": {
159180
+ "type": "string"
159181
+ }
159182
+ }
159183
+ }
159184
+ }
159185
+ }
159186
+ },
159187
+ "401": {
159188
+ "description": "Unauthorized - missing or invalid bearer token",
159189
+ "content": {
159190
+ "application/json": {
159191
+ "schema": {
159192
+ "$ref": "#/components/schemas/ErrorResponse"
159193
+ }
159194
+ }
159195
+ }
159196
+ },
159197
+ "403": {
159198
+ "description": "Forbidden - caller lacks the required role/permission",
159199
+ "content": {
159200
+ "application/json": {
159201
+ "schema": {
159202
+ "additionalProperties": false,
159203
+ "type": "object",
159204
+ "required": [
159205
+ "statusCode",
159206
+ "error",
159207
+ "message"
159208
+ ],
159209
+ "properties": {
159210
+ "statusCode": {
159211
+ "type": "number"
159212
+ },
159213
+ "error": {
159214
+ "type": "string"
159215
+ },
159216
+ "message": {
159217
+ "type": "string"
159218
+ }
159219
+ }
159220
+ }
159221
+ }
159222
+ }
159223
+ },
159224
+ "404": {
159225
+ "description": "Resource not found",
159226
+ "content": {
159227
+ "application/json": {
159228
+ "schema": {
159229
+ "additionalProperties": false,
159230
+ "type": "object",
159231
+ "required": [
159232
+ "statusCode",
159233
+ "error",
159234
+ "message"
159235
+ ],
159236
+ "properties": {
159237
+ "statusCode": {
159238
+ "type": "number"
159239
+ },
159240
+ "error": {
159241
+ "type": "string"
159242
+ },
159243
+ "message": {
159244
+ "type": "string"
159245
+ }
159246
+ }
159247
+ }
159248
+ }
159249
+ }
159250
+ },
159251
+ "500": {
159252
+ "description": "Internal server error",
159253
+ "content": {
159254
+ "application/json": {
159255
+ "schema": {
159256
+ "additionalProperties": false,
159257
+ "type": "object",
159258
+ "required": [
159259
+ "statusCode",
159260
+ "error",
159261
+ "message"
159262
+ ],
159263
+ "properties": {
159264
+ "statusCode": {
159265
+ "type": "number"
159266
+ },
159267
+ "error": {
159268
+ "type": "string"
159269
+ },
159270
+ "message": {
159271
+ "type": "string"
159272
+ }
159273
+ }
159274
+ }
159275
+ }
159276
+ }
159277
+ }
159278
+ }
159279
+ },
159280
+ "delete": {
159281
+ "operationId": "deleteApiV1RbacAccessGroupsByIdWorkspacesByWorkspaceId",
159282
+ "summary": "Revoke an access group workspace grant",
159283
+ "tags": [
159284
+ "rbac"
159285
+ ],
159286
+ "description": "Revokes a product Team grant from a Workspace. Only organization owners/admins can manage workspace grants.",
159287
+ "parameters": [
159288
+ {
159289
+ "schema": {
159290
+ "format": "uuid",
159291
+ "type": "string"
159292
+ },
159293
+ "in": "path",
159294
+ "name": "id",
159295
+ "required": true
159296
+ },
159297
+ {
159298
+ "schema": {
159299
+ "format": "uuid",
159300
+ "type": "string"
159301
+ },
159302
+ "in": "path",
159303
+ "name": "workspace_id",
159304
+ "required": true
159305
+ }
159306
+ ],
159307
+ "security": [
159308
+ {
159309
+ "bearerAuth": []
159310
+ }
159311
+ ],
159312
+ "responses": {
159313
+ "200": {
159314
+ "description": "Successful response",
159315
+ "content": {
159316
+ "application/json": {
159317
+ "schema": {
159318
+ "additionalProperties": false,
159319
+ "type": "object",
159320
+ "required": [
159321
+ "message"
159322
+ ],
159323
+ "properties": {
159324
+ "message": {
159325
+ "type": "string"
159326
+ }
159327
+ }
159328
+ }
159329
+ }
159330
+ }
159331
+ },
159332
+ "401": {
159333
+ "description": "Unauthorized - missing or invalid bearer token",
159334
+ "content": {
159335
+ "application/json": {
159336
+ "schema": {
159337
+ "$ref": "#/components/schemas/ErrorResponse"
159338
+ }
159339
+ }
159340
+ }
159341
+ },
159342
+ "403": {
159343
+ "description": "Forbidden - caller lacks the required role/permission",
159344
+ "content": {
159345
+ "application/json": {
159346
+ "schema": {
159347
+ "additionalProperties": false,
159348
+ "type": "object",
159349
+ "required": [
159350
+ "statusCode",
159351
+ "error",
159352
+ "message"
159353
+ ],
159354
+ "properties": {
159355
+ "statusCode": {
159356
+ "type": "number"
159357
+ },
159358
+ "error": {
159359
+ "type": "string"
159360
+ },
159361
+ "message": {
159362
+ "type": "string"
159363
+ }
159364
+ }
159365
+ }
159366
+ }
159367
+ }
159368
+ },
159369
+ "404": {
159370
+ "description": "Resource not found",
159371
+ "content": {
159372
+ "application/json": {
159373
+ "schema": {
159374
+ "additionalProperties": false,
159375
+ "type": "object",
159376
+ "required": [
159377
+ "statusCode",
159378
+ "error",
159379
+ "message"
159380
+ ],
159381
+ "properties": {
159382
+ "statusCode": {
159383
+ "type": "number"
159384
+ },
159385
+ "error": {
159386
+ "type": "string"
159387
+ },
159388
+ "message": {
159389
+ "type": "string"
159390
+ }
159391
+ }
159392
+ }
159393
+ }
159394
+ }
159395
+ },
159396
+ "500": {
159397
+ "description": "Internal server error",
159398
+ "content": {
159399
+ "application/json": {
159400
+ "schema": {
159401
+ "additionalProperties": false,
159402
+ "type": "object",
159403
+ "required": [
159404
+ "statusCode",
159405
+ "error",
159406
+ "message"
159407
+ ],
159408
+ "properties": {
159409
+ "statusCode": {
159410
+ "type": "number"
159411
+ },
159412
+ "error": {
159413
+ "type": "string"
159414
+ },
159415
+ "message": {
159416
+ "type": "string"
159417
+ }
159418
+ }
159419
+ }
159420
+ }
159421
+ }
159422
+ }
159423
+ }
159424
+ }
159425
+ },
159426
+ "/api/v1/rbac/legal-entities": {
159427
+ "get": {
159428
+ "operationId": "getApiV1RbacLegalEntities",
159429
+ "summary": "List legal entities accessible to the current user",
159430
+ "tags": [
159431
+ "rbac"
159432
+ ],
159433
+ "description": "Returns legal entities visible to the authenticated user, optionally filtered by workspace id and scoped through RBAC access.",
159434
+ "parameters": [
159435
+ {
159436
+ "schema": {
159437
+ "format": "uuid",
159438
+ "type": "string"
159439
+ },
159440
+ "in": "query",
159441
+ "name": "workspace_id",
159442
+ "required": false
159443
+ }
159444
+ ],
159445
+ "security": [
159446
+ {
159447
+ "bearerAuth": []
159448
+ }
159449
+ ],
159450
+ "responses": {
159451
+ "200": {
159452
+ "description": "Successful response",
159453
+ "content": {
159454
+ "application/json": {
159455
+ "schema": {
159456
+ "type": "object",
159457
+ "required": [
159458
+ "items"
159459
+ ],
159460
+ "properties": {
159461
+ "items": {
159462
+ "type": "array",
159463
+ "items": {
159464
+ "type": "object",
159465
+ "required": [
159466
+ "id",
159467
+ "workspace_id",
159468
+ "legal_name",
159469
+ "vat_number",
159470
+ "billing_email",
159471
+ "billing_address",
159472
+ "billing_city",
159473
+ "billing_zip",
159474
+ "billing_country",
159475
+ "stripe_customer_id",
159476
+ "created_at",
159477
+ "updated_at"
159478
+ ],
159479
+ "properties": {
159480
+ "id": {
159481
+ "format": "uuid",
159482
+ "type": "string"
159483
+ },
159484
+ "workspace_id": {
159485
+ "format": "uuid",
159486
+ "type": "string"
159487
+ },
159488
+ "legal_name": {
159489
+ "type": "string"
159490
+ },
159491
+ "vat_number": {
159492
+ "anyOf": [
159493
+ {
159494
+ "type": "string"
159495
+ },
159496
+ {
159497
+ "type": "null"
159498
+ }
159499
+ ]
159500
+ },
159501
+ "billing_email": {
159502
+ "anyOf": [
159503
+ {
159504
+ "type": "string"
159505
+ },
159506
+ {
159507
+ "type": "null"
159508
+ }
159509
+ ]
159510
+ },
159511
+ "billing_address": {
159512
+ "anyOf": [
159513
+ {
159514
+ "type": "string"
159515
+ },
159516
+ {
159517
+ "type": "null"
159518
+ }
159519
+ ]
159520
+ },
159521
+ "billing_city": {
159522
+ "anyOf": [
159523
+ {
159524
+ "type": "string"
159525
+ },
159526
+ {
159527
+ "type": "null"
159528
+ }
159529
+ ]
159530
+ },
159531
+ "billing_zip": {
159532
+ "anyOf": [
159533
+ {
159534
+ "type": "string"
159535
+ },
159536
+ {
159537
+ "type": "null"
159538
+ }
159539
+ ]
159540
+ },
159541
+ "billing_country": {
159542
+ "anyOf": [
159543
+ {
159544
+ "type": "string"
159545
+ },
159546
+ {
159547
+ "type": "null"
159548
+ }
159549
+ ]
159550
+ },
159551
+ "stripe_customer_id": {
159552
+ "anyOf": [
159553
+ {
159554
+ "type": "string"
159555
+ },
159556
+ {
159557
+ "type": "null"
159558
+ }
159559
+ ]
156881
159560
  },
156882
159561
  "created_at": {
156883
159562
  "format": "date-time",
@@ -161545,7 +164224,28 @@
161545
164224
  "tags": [
161546
164225
  "rbac"
161547
164226
  ],
161548
- "description": "Soft-deletes a workspace after validating the caller has owner-level or higher access to its organization scope.",
164227
+ "description": "Soft-deletes a workspace after exact name confirmation, owner-level or higher workspace access, and active campaign guard rails.",
164228
+ "requestBody": {
164229
+ "required": true,
164230
+ "content": {
164231
+ "application/json": {
164232
+ "schema": {
164233
+ "additionalProperties": false,
164234
+ "type": "object",
164235
+ "required": [
164236
+ "confirmation_name"
164237
+ ],
164238
+ "properties": {
164239
+ "confirmation_name": {
164240
+ "minLength": 1,
164241
+ "maxLength": 255,
164242
+ "type": "string"
164243
+ }
164244
+ }
164245
+ }
164246
+ }
164247
+ }
164248
+ },
161549
164249
  "parameters": [
161550
164250
  {
161551
164251
  "schema": {
@@ -161581,6 +164281,32 @@
161581
164281
  }
161582
164282
  }
161583
164283
  },
164284
+ "400": {
164285
+ "description": "Invalid request - schema validation failed",
164286
+ "content": {
164287
+ "application/json": {
164288
+ "schema": {
164289
+ "type": "object",
164290
+ "required": [
164291
+ "statusCode",
164292
+ "error",
164293
+ "message"
164294
+ ],
164295
+ "properties": {
164296
+ "statusCode": {
164297
+ "type": "number"
164298
+ },
164299
+ "error": {
164300
+ "type": "string"
164301
+ },
164302
+ "message": {
164303
+ "type": "string"
164304
+ }
164305
+ }
164306
+ }
164307
+ }
164308
+ }
164309
+ },
161584
164310
  "401": {
161585
164311
  "description": "Unauthorized - missing or invalid bearer token",
161586
164312
  "content": {
@@ -161617,8 +164343,34 @@
161617
164343
  }
161618
164344
  }
161619
164345
  },
161620
- "404": {
161621
- "description": "Resource not found",
164346
+ "404": {
164347
+ "description": "Resource not found",
164348
+ "content": {
164349
+ "application/json": {
164350
+ "schema": {
164351
+ "type": "object",
164352
+ "required": [
164353
+ "statusCode",
164354
+ "error",
164355
+ "message"
164356
+ ],
164357
+ "properties": {
164358
+ "statusCode": {
164359
+ "type": "number"
164360
+ },
164361
+ "error": {
164362
+ "type": "string"
164363
+ },
164364
+ "message": {
164365
+ "type": "string"
164366
+ }
164367
+ }
164368
+ }
164369
+ }
164370
+ }
164371
+ },
164372
+ "409": {
164373
+ "description": "Conflict - resource state prevents the operation",
161622
164374
  "content": {
161623
164375
  "application/json": {
161624
164376
  "schema": {
@@ -161626,7 +164378,10 @@
161626
164378
  "required": [
161627
164379
  "statusCode",
161628
164380
  "error",
161629
- "message"
164381
+ "message",
164382
+ "code",
164383
+ "active_campaign_count",
164384
+ "active_publish_job_count"
161630
164385
  ],
161631
164386
  "properties": {
161632
164387
  "statusCode": {
@@ -161637,6 +164392,15 @@
161637
164392
  },
161638
164393
  "message": {
161639
164394
  "type": "string"
164395
+ },
164396
+ "code": {
164397
+ "type": "string"
164398
+ },
164399
+ "active_campaign_count": {
164400
+ "type": "number"
164401
+ },
164402
+ "active_publish_job_count": {
164403
+ "type": "number"
161640
164404
  }
161641
164405
  }
161642
164406
  }
@@ -166120,7 +168884,7 @@
166120
168884
  "tags": [
166121
168885
  "reports"
166122
168886
  ],
166123
- "description": "Re-enqueues a previously failed report export using its original payload (stored on the enqueued worker_run_event). Only the original owner can retry. Returns the new worker_run as the canonical async-job envelope.",
168887
+ "description": "Re-enqueues a previously failed report export using its original payload (stored on the enqueued worker_run_event). Team-stamped runs follow current workspace access; legacy runs without a team stamp remain original-owner only. Returns the new worker_run as the canonical async-job envelope.",
166124
168888
  "parameters": [
166125
168889
  {
166126
168890
  "schema": {
@@ -166280,7 +169044,7 @@
166280
169044
  "tags": [
166281
169045
  "reports"
166282
169046
  ],
166283
- "description": "Returns the current job status and, when COMPLETED, a freshly signed S3 download URL with its `expires_at` timestamp (~7 days). The URL is regenerated on demand from the stored S3 key, so completed runs remain re-downloadable for the lifetime of the underlying object.",
169047
+ "description": "Returns the current job status and, when COMPLETED, a freshly signed S3 download URL with its `expires_at` timestamp (~7 days). Access follows the current workspace for team-stamped runs; legacy runs without a team stamp remain original-owner only. The URL is regenerated on demand from the stored S3 key, so completed runs remain re-downloadable for the lifetime of the underlying object.",
166284
169048
  "parameters": [
166285
169049
  {
166286
169050
  "schema": {
@@ -166413,11 +169177,11 @@
166413
169177
  "/api/v1/reports/exports": {
166414
169178
  "get": {
166415
169179
  "operationId": "listReportExports",
166416
- "summary": "List the current user's last N report exports",
169180
+ "summary": "List recent report exports visible in the current workspace scope",
166417
169181
  "tags": [
166418
169182
  "reports"
166419
169183
  ],
166420
- "description": "Persistent history of the authenticated user's recent PDF/CSV report exports, ordered newest first. Reads worker_run rows joined on the enqueued worker_run_event metadata so the Download Center UI can re-hydrate after a page refresh without losing track of completed exports whose presigned URLs have already expired.",
169184
+ "description": "Persistent history of recent PDF/CSV report exports visible to the authenticated caller, ordered newest first. Team-stamped runs follow current workspace access; legacy runs without a team stamp remain original-owner only. Reads worker_run rows joined on the enqueued worker_run_event metadata so the Download Center UI can re-hydrate after a page refresh without losing track of completed exports whose presigned URLs have already expired.",
166421
169185
  "parameters": [
166422
169186
  {
166423
169187
  "schema": {
@@ -166854,7 +169618,7 @@
166854
169618
  "tags": [
166855
169619
  "reports"
166856
169620
  ],
166857
- "description": "Creates a recurring report schedule stamped with the destination workspace (x-team-id header, active team scope, or the caller’s primary team as fallback). The cron loop picks it up at the configured cadence (daily/weekly/monthly + hour_utc) and enqueues GENERATE_SCHEDULED_REPORT jobs that email the artifact to the configured recipients. Optional `template_id` must reference a template visible in the same workspace scope.",
169621
+ "description": "Creates a recurring report schedule stamped with the explicit destination workspace/team resolved by x-team-id or the active team/workspace scope. Requests without a resolvable destination fail with 400 SCOPE_TEAM_REQUIRED; there is no silent primary-team fallback. The cron loop picks it up at the configured cadence (daily/weekly/monthly + hour_utc) and enqueues GENERATE_SCHEDULED_REPORT jobs that email the artifact to the configured recipients. Optional `template_id` must reference a template visible in the destination team scope.",
166858
169622
  "requestBody": {
166859
169623
  "required": true,
166860
169624
  "content": {
@@ -167179,15 +169943,47 @@
167179
169943
  "content": {
167180
169944
  "application/json": {
167181
169945
  "schema": {
167182
- "type": "object",
167183
- "required": [
167184
- "error"
167185
- ],
167186
- "properties": {
167187
- "error": {
167188
- "type": "string"
169946
+ "anyOf": [
169947
+ {
169948
+ "additionalProperties": false,
169949
+ "type": "object",
169950
+ "required": [
169951
+ "error"
169952
+ ],
169953
+ "properties": {
169954
+ "error": {
169955
+ "type": "string"
169956
+ }
169957
+ }
169958
+ },
169959
+ {
169960
+ "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
169961
+ "additionalProperties": false,
169962
+ "type": "object",
169963
+ "required": [
169964
+ "statusCode",
169965
+ "error",
169966
+ "message"
169967
+ ],
169968
+ "properties": {
169969
+ "statusCode": {
169970
+ "type": "number"
169971
+ },
169972
+ "error": {
169973
+ "type": "string"
169974
+ },
169975
+ "message": {
169976
+ "type": "string"
169977
+ },
169978
+ "code": {
169979
+ "type": "string",
169980
+ "enum": [
169981
+ "SCOPE_TEAM_REQUIRED"
169982
+ ]
169983
+ }
169984
+ }
167189
169985
  }
167190
- }
169986
+ ]
167191
169987
  }
167192
169988
  }
167193
169989
  }
@@ -167202,6 +169998,52 @@
167202
169998
  }
167203
169999
  }
167204
170000
  },
170001
+ "402": {
170002
+ "description": "Response 402",
170003
+ "content": {
170004
+ "application/json": {
170005
+ "schema": {
170006
+ "additionalProperties": false,
170007
+ "type": "object",
170008
+ "required": [
170009
+ "statusCode",
170010
+ "error",
170011
+ "message",
170012
+ "code",
170013
+ "resource",
170014
+ "current",
170015
+ "max"
170016
+ ],
170017
+ "properties": {
170018
+ "statusCode": {
170019
+ "type": "number"
170020
+ },
170021
+ "error": {
170022
+ "type": "string"
170023
+ },
170024
+ "message": {
170025
+ "type": "string"
170026
+ },
170027
+ "code": {
170028
+ "type": "string"
170029
+ },
170030
+ "resource": {
170031
+ "type": "string",
170032
+ "enum": [
170033
+ "scheduled_report"
170034
+ ]
170035
+ },
170036
+ "current": {
170037
+ "type": "number"
170038
+ },
170039
+ "max": {
170040
+ "type": "number"
170041
+ }
170042
+ }
170043
+ }
170044
+ }
170045
+ }
170046
+ },
167205
170047
  "403": {
167206
170048
  "description": "Forbidden - caller lacks the required role/permission",
167207
170049
  "content": {
@@ -167655,6 +170497,16 @@
167655
170497
  "in": "path",
167656
170498
  "name": "id",
167657
170499
  "required": true
170500
+ },
170501
+ {
170502
+ "schema": {
170503
+ "format": "uuid",
170504
+ "type": "string"
170505
+ },
170506
+ "in": "header",
170507
+ "name": "x-team-id",
170508
+ "required": false,
170509
+ "description": "Destination workspace team id."
167658
170510
  }
167659
170511
  ],
167660
170512
  "security": [
@@ -167839,15 +170691,46 @@
167839
170691
  "content": {
167840
170692
  "application/json": {
167841
170693
  "schema": {
167842
- "type": "object",
167843
- "required": [
167844
- "error"
167845
- ],
167846
- "properties": {
167847
- "error": {
167848
- "type": "string"
170694
+ "anyOf": [
170695
+ {
170696
+ "type": "object",
170697
+ "required": [
170698
+ "error"
170699
+ ],
170700
+ "properties": {
170701
+ "error": {
170702
+ "type": "string"
170703
+ }
170704
+ }
170705
+ },
170706
+ {
170707
+ "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
170708
+ "additionalProperties": false,
170709
+ "type": "object",
170710
+ "required": [
170711
+ "statusCode",
170712
+ "error",
170713
+ "message"
170714
+ ],
170715
+ "properties": {
170716
+ "statusCode": {
170717
+ "type": "number"
170718
+ },
170719
+ "error": {
170720
+ "type": "string"
170721
+ },
170722
+ "message": {
170723
+ "type": "string"
170724
+ },
170725
+ "code": {
170726
+ "type": "string",
170727
+ "enum": [
170728
+ "SCOPE_TEAM_REQUIRED"
170729
+ ]
170730
+ }
170731
+ }
167849
170732
  }
167850
- }
170733
+ ]
167851
170734
  }
167852
170735
  }
167853
170736
  }
@@ -167862,6 +170745,24 @@
167862
170745
  }
167863
170746
  }
167864
170747
  },
170748
+ "403": {
170749
+ "description": "Forbidden - caller lacks the required role/permission",
170750
+ "content": {
170751
+ "application/json": {
170752
+ "schema": {
170753
+ "type": "object",
170754
+ "required": [
170755
+ "error"
170756
+ ],
170757
+ "properties": {
170758
+ "error": {
170759
+ "type": "string"
170760
+ }
170761
+ }
170762
+ }
170763
+ }
170764
+ }
170765
+ },
167865
170766
  "404": {
167866
170767
  "description": "Resource not found",
167867
170768
  "content": {
@@ -167916,6 +170817,16 @@
167916
170817
  "in": "path",
167917
170818
  "name": "id",
167918
170819
  "required": true
170820
+ },
170821
+ {
170822
+ "schema": {
170823
+ "format": "uuid",
170824
+ "type": "string"
170825
+ },
170826
+ "in": "header",
170827
+ "name": "x-team-id",
170828
+ "required": false,
170829
+ "description": "Destination workspace team id."
167919
170830
  }
167920
170831
  ],
167921
170832
  "security": [
@@ -167930,6 +170841,40 @@
167930
170841
  "204": {
167931
170842
  "description": "No content"
167932
170843
  },
170844
+ "400": {
170845
+ "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
170846
+ "content": {
170847
+ "application/json": {
170848
+ "schema": {
170849
+ "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
170850
+ "additionalProperties": false,
170851
+ "type": "object",
170852
+ "required": [
170853
+ "statusCode",
170854
+ "error",
170855
+ "message"
170856
+ ],
170857
+ "properties": {
170858
+ "statusCode": {
170859
+ "type": "number"
170860
+ },
170861
+ "error": {
170862
+ "type": "string"
170863
+ },
170864
+ "message": {
170865
+ "type": "string"
170866
+ },
170867
+ "code": {
170868
+ "type": "string",
170869
+ "enum": [
170870
+ "SCOPE_TEAM_REQUIRED"
170871
+ ]
170872
+ }
170873
+ }
170874
+ }
170875
+ }
170876
+ }
170877
+ },
167933
170878
  "401": {
167934
170879
  "description": "Unauthorized - missing or invalid bearer token",
167935
170880
  "content": {
@@ -167940,6 +170885,24 @@
167940
170885
  }
167941
170886
  }
167942
170887
  },
170888
+ "403": {
170889
+ "description": "Forbidden - caller lacks the required role/permission",
170890
+ "content": {
170891
+ "application/json": {
170892
+ "schema": {
170893
+ "type": "object",
170894
+ "required": [
170895
+ "error"
170896
+ ],
170897
+ "properties": {
170898
+ "error": {
170899
+ "type": "string"
170900
+ }
170901
+ }
170902
+ }
170903
+ }
170904
+ }
170905
+ },
167943
170906
  "404": {
167944
170907
  "description": "Resource not found",
167945
170908
  "content": {
@@ -167996,6 +170959,16 @@
167996
170959
  "in": "path",
167997
170960
  "name": "id",
167998
170961
  "required": true
170962
+ },
170963
+ {
170964
+ "schema": {
170965
+ "format": "uuid",
170966
+ "type": "string"
170967
+ },
170968
+ "in": "header",
170969
+ "name": "x-team-id",
170970
+ "required": false,
170971
+ "description": "Destination workspace team id."
167999
170972
  }
168000
170973
  ],
168001
170974
  "security": [
@@ -168334,7 +171307,7 @@
168334
171307
  "tags": [
168335
171308
  "reports"
168336
171309
  ],
168337
- "description": "Creates a reusable report template stamped with the destination workspace (x-team-id header, active team scope, or the caller’s primary team as fallback). The optional `definition` block configures metrics, columns, group_by, period preset, output format, and whether charts are included.",
171310
+ "description": "Creates a reusable report template stamped with the explicit destination workspace/team resolved by x-team-id or the active team/workspace scope. Requests without a resolvable destination fail with 400 SCOPE_TEAM_REQUIRED; there is no silent primary-team fallback. The optional `definition` block configures metrics, columns, group_by, period preset, output format, and whether charts are included.",
168338
171311
  "requestBody": {
168339
171312
  "required": true,
168340
171313
  "content": {
@@ -168646,10 +171619,11 @@
168646
171619
  }
168647
171620
  },
168648
171621
  "400": {
168649
- "description": "Invalid request - schema validation failed",
171622
+ "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
168650
171623
  "content": {
168651
171624
  "application/json": {
168652
171625
  "schema": {
171626
+ "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
168653
171627
  "additionalProperties": false,
168654
171628
  "type": "object",
168655
171629
  "required": [
@@ -168668,7 +171642,10 @@
168668
171642
  "type": "string"
168669
171643
  },
168670
171644
  "code": {
168671
- "type": "string"
171645
+ "type": "string",
171646
+ "enum": [
171647
+ "SCOPE_TEAM_REQUIRED"
171648
+ ]
168672
171649
  }
168673
171650
  }
168674
171651
  }
@@ -169154,6 +172131,16 @@
169154
172131
  "in": "path",
169155
172132
  "name": "id",
169156
172133
  "required": true
172134
+ },
172135
+ {
172136
+ "schema": {
172137
+ "format": "uuid",
172138
+ "type": "string"
172139
+ },
172140
+ "in": "header",
172141
+ "name": "x-team-id",
172142
+ "required": false,
172143
+ "description": "Destination workspace team id."
169157
172144
  }
169158
172145
  ],
169159
172146
  "security": [
@@ -169320,6 +172307,40 @@
169320
172307
  }
169321
172308
  }
169322
172309
  },
172310
+ "400": {
172311
+ "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
172312
+ "content": {
172313
+ "application/json": {
172314
+ "schema": {
172315
+ "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
172316
+ "additionalProperties": false,
172317
+ "type": "object",
172318
+ "required": [
172319
+ "statusCode",
172320
+ "error",
172321
+ "message"
172322
+ ],
172323
+ "properties": {
172324
+ "statusCode": {
172325
+ "type": "number"
172326
+ },
172327
+ "error": {
172328
+ "type": "string"
172329
+ },
172330
+ "message": {
172331
+ "type": "string"
172332
+ },
172333
+ "code": {
172334
+ "type": "string",
172335
+ "enum": [
172336
+ "SCOPE_TEAM_REQUIRED"
172337
+ ]
172338
+ }
172339
+ }
172340
+ }
172341
+ }
172342
+ }
172343
+ },
169323
172344
  "401": {
169324
172345
  "description": "Unauthorized - missing or invalid bearer token",
169325
172346
  "content": {
@@ -169330,6 +172351,36 @@
169330
172351
  }
169331
172352
  }
169332
172353
  },
172354
+ "403": {
172355
+ "description": "Forbidden - caller lacks the required role/permission",
172356
+ "content": {
172357
+ "application/json": {
172358
+ "schema": {
172359
+ "additionalProperties": false,
172360
+ "type": "object",
172361
+ "required": [
172362
+ "statusCode",
172363
+ "error",
172364
+ "message"
172365
+ ],
172366
+ "properties": {
172367
+ "statusCode": {
172368
+ "type": "number"
172369
+ },
172370
+ "error": {
172371
+ "type": "string"
172372
+ },
172373
+ "message": {
172374
+ "type": "string"
172375
+ },
172376
+ "code": {
172377
+ "type": "string"
172378
+ }
172379
+ }
172380
+ }
172381
+ }
172382
+ }
172383
+ },
169333
172384
  "404": {
169334
172385
  "description": "Resource not found",
169335
172386
  "content": {
@@ -169384,6 +172435,16 @@
169384
172435
  "in": "path",
169385
172436
  "name": "id",
169386
172437
  "required": true
172438
+ },
172439
+ {
172440
+ "schema": {
172441
+ "format": "uuid",
172442
+ "type": "string"
172443
+ },
172444
+ "in": "header",
172445
+ "name": "x-team-id",
172446
+ "required": false,
172447
+ "description": "Destination workspace team id."
169387
172448
  }
169388
172449
  ],
169389
172450
  "security": [
@@ -169398,6 +172459,40 @@
169398
172459
  "204": {
169399
172460
  "description": "No content"
169400
172461
  },
172462
+ "400": {
172463
+ "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
172464
+ "content": {
172465
+ "application/json": {
172466
+ "schema": {
172467
+ "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
172468
+ "additionalProperties": false,
172469
+ "type": "object",
172470
+ "required": [
172471
+ "statusCode",
172472
+ "error",
172473
+ "message"
172474
+ ],
172475
+ "properties": {
172476
+ "statusCode": {
172477
+ "type": "number"
172478
+ },
172479
+ "error": {
172480
+ "type": "string"
172481
+ },
172482
+ "message": {
172483
+ "type": "string"
172484
+ },
172485
+ "code": {
172486
+ "type": "string",
172487
+ "enum": [
172488
+ "SCOPE_TEAM_REQUIRED"
172489
+ ]
172490
+ }
172491
+ }
172492
+ }
172493
+ }
172494
+ }
172495
+ },
169401
172496
  "401": {
169402
172497
  "description": "Unauthorized - missing or invalid bearer token",
169403
172498
  "content": {
@@ -169408,6 +172503,36 @@
169408
172503
  }
169409
172504
  }
169410
172505
  },
172506
+ "403": {
172507
+ "description": "Forbidden - caller lacks the required role/permission",
172508
+ "content": {
172509
+ "application/json": {
172510
+ "schema": {
172511
+ "additionalProperties": false,
172512
+ "type": "object",
172513
+ "required": [
172514
+ "statusCode",
172515
+ "error",
172516
+ "message"
172517
+ ],
172518
+ "properties": {
172519
+ "statusCode": {
172520
+ "type": "number"
172521
+ },
172522
+ "error": {
172523
+ "type": "string"
172524
+ },
172525
+ "message": {
172526
+ "type": "string"
172527
+ },
172528
+ "code": {
172529
+ "type": "string"
172530
+ }
172531
+ }
172532
+ }
172533
+ }
172534
+ }
172535
+ },
169411
172536
  "404": {
169412
172537
  "description": "Resource not found",
169413
172538
  "content": {
@@ -169464,6 +172589,16 @@
169464
172589
  "in": "path",
169465
172590
  "name": "id",
169466
172591
  "required": true
172592
+ },
172593
+ {
172594
+ "schema": {
172595
+ "format": "uuid",
172596
+ "type": "string"
172597
+ },
172598
+ "in": "header",
172599
+ "name": "x-team-id",
172600
+ "required": false,
172601
+ "description": "Destination workspace team id."
169467
172602
  }
169468
172603
  ],
169469
172604
  "security": [
@@ -235454,6 +238589,15 @@
235454
238589
  ],
235455
238590
  "description": "Redirects the user to the Meta login page for authentication. Uses the authenticated user session. The destination workspace team is signed into the OAuth state (active team scope, else primary team).",
235456
238591
  "parameters": [
238592
+ {
238593
+ "schema": {
238594
+ "type": "boolean"
238595
+ },
238596
+ "in": "query",
238597
+ "name": "confirm_move",
238598
+ "required": false,
238599
+ "description": "Confirm moving Meta ad accounts already assigned to another workspace of the organization into the active workspace. Without confirmation, the OAuth callback redirects with code=ACCOUNT_ALREADY_ASSIGNED."
238600
+ },
235457
238601
  {
235458
238602
  "schema": {
235459
238603
  "format": "uuid",
@@ -235480,6 +238624,7 @@
235480
238624
  "application/json": {
235481
238625
  "schema": {
235482
238626
  "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
238627
+ "additionalProperties": false,
235483
238628
  "type": "object",
235484
238629
  "required": [
235485
238630
  "statusCode",
@@ -235529,6 +238674,15 @@
235529
238674
  ],
235530
238675
  "description": "Returns the Meta OAuth login URL for the current user session. The destination workspace team (x-team-id header or active team scope) is signed into the OAuth state; requests without an explicit team get 400 SCOPE_TEAM_REQUIRED.",
235531
238676
  "parameters": [
238677
+ {
238678
+ "schema": {
238679
+ "type": "boolean"
238680
+ },
238681
+ "in": "query",
238682
+ "name": "confirm_move",
238683
+ "required": false,
238684
+ "description": "Confirm moving Meta ad accounts already assigned to another workspace of the organization into the active workspace. Without confirmation, the OAuth callback redirects with code=ACCOUNT_ALREADY_ASSIGNED."
238685
+ },
235532
238686
  {
235533
238687
  "schema": {
235534
238688
  "format": "uuid",
@@ -235551,6 +238705,7 @@
235551
238705
  "content": {
235552
238706
  "application/json": {
235553
238707
  "schema": {
238708
+ "additionalProperties": false,
235554
238709
  "type": "object",
235555
238710
  "required": [
235556
238711
  "url"
@@ -235570,6 +238725,7 @@
235570
238725
  "application/json": {
235571
238726
  "schema": {
235572
238727
  "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
238728
+ "additionalProperties": false,
235573
238729
  "type": "object",
235574
238730
  "required": [
235575
238731
  "statusCode",
@@ -235642,6 +238798,7 @@
235642
238798
  "application/json": {
235643
238799
  "schema": {
235644
238800
  "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
238801
+ "additionalProperties": false,
235645
238802
  "type": "object",
235646
238803
  "required": [
235647
238804
  "statusCode",
@@ -235675,6 +238832,7 @@
235675
238832
  "application/json": {
235676
238833
  "schema": {
235677
238834
  "description": "Unauthorized — a valid session is required.",
238835
+ "additionalProperties": false,
235678
238836
  "type": "object",
235679
238837
  "required": [
235680
238838
  "statusCode",
@@ -235706,7 +238864,7 @@
235706
238864
  "tags": [
235707
238865
  "meta"
235708
238866
  ],
235709
- "description": "Handles the OAuth callback from Meta. Exchanges code for long-lived token and stores it.",
238867
+ "description": "Handles the OAuth callback from Meta. Exchanges code for a long-lived token, stores it, checks discovered ad accounts for cross-workspace assignment conflicts, and starts post-login sync. If an account is already assigned to another workspace of the organization, the browser is redirected with code=ACCOUNT_ALREADY_ASSIGNED unless the signed OAuth state carried confirm_move=true.",
235710
238868
  "parameters": [
235711
238869
  {
235712
238870
  "schema": {
@@ -235750,6 +238908,7 @@
235750
238908
  "content": {
235751
238909
  "application/json": {
235752
238910
  "schema": {
238911
+ "additionalProperties": false,
235753
238912
  "type": "object",
235754
238913
  "required": [
235755
238914
  "statusCode",
@@ -236711,6 +239870,7 @@
236711
239870
  "application/json": {
236712
239871
  "schema": {
236713
239872
  "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
239873
+ "additionalProperties": false,
236714
239874
  "type": "object",
236715
239875
  "required": [
236716
239876
  "statusCode",
@@ -237421,6 +240581,15 @@
237421
240581
  ],
237422
240582
  "description": "Generates a signed Snapchat OAuth authorization URL for the authenticated user. The destination workspace team (x-team-id header or active team scope) is signed into the OAuth state; requests without an explicit team get 400 SCOPE_TEAM_REQUIRED.",
237423
240583
  "parameters": [
240584
+ {
240585
+ "schema": {
240586
+ "type": "boolean"
240587
+ },
240588
+ "in": "query",
240589
+ "name": "confirm_move",
240590
+ "required": false,
240591
+ "description": "Confirm moving Snapchat ad accounts already assigned to another workspace of the organization into the active workspace. Without confirmation, the OAuth callback reports ACCOUNT_ALREADY_ASSIGNED."
240592
+ },
237424
240593
  {
237425
240594
  "schema": {
237426
240595
  "format": "uuid",
@@ -237464,6 +240633,7 @@
237464
240633
  "application/json": {
237465
240634
  "schema": {
237466
240635
  "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
240636
+ "additionalProperties": false,
237467
240637
  "type": "object",
237468
240638
  "required": [
237469
240639
  "statusCode",
@@ -237496,20 +240666,22 @@
237496
240666
  "content": {
237497
240667
  "application/json": {
237498
240668
  "schema": {
237499
- "additionalProperties": true,
240669
+ "additionalProperties": false,
237500
240670
  "type": "object",
237501
240671
  "required": [
237502
- "error"
240672
+ "error",
240673
+ "message",
240674
+ "statusCode"
237503
240675
  ],
237504
240676
  "properties": {
237505
240677
  "error": {
237506
240678
  "type": "string"
237507
240679
  },
237508
- "statusCode": {
237509
- "type": "integer"
237510
- },
237511
240680
  "message": {
237512
240681
  "type": "string"
240682
+ },
240683
+ "statusCode": {
240684
+ "type": "integer"
237513
240685
  }
237514
240686
  }
237515
240687
  }
@@ -237521,20 +240693,22 @@
237521
240693
  "content": {
237522
240694
  "application/json": {
237523
240695
  "schema": {
237524
- "additionalProperties": true,
240696
+ "additionalProperties": false,
237525
240697
  "type": "object",
237526
240698
  "required": [
237527
- "error"
240699
+ "error",
240700
+ "message",
240701
+ "statusCode"
237528
240702
  ],
237529
240703
  "properties": {
237530
240704
  "error": {
237531
240705
  "type": "string"
237532
240706
  },
237533
- "statusCode": {
237534
- "type": "integer"
237535
- },
237536
240707
  "message": {
237537
240708
  "type": "string"
240709
+ },
240710
+ "statusCode": {
240711
+ "type": "integer"
237538
240712
  }
237539
240713
  }
237540
240714
  }
@@ -237546,20 +240720,22 @@
237546
240720
  "content": {
237547
240721
  "application/json": {
237548
240722
  "schema": {
237549
- "additionalProperties": true,
240723
+ "additionalProperties": false,
237550
240724
  "type": "object",
237551
240725
  "required": [
237552
- "error"
240726
+ "error",
240727
+ "message",
240728
+ "statusCode"
237553
240729
  ],
237554
240730
  "properties": {
237555
240731
  "error": {
237556
240732
  "type": "string"
237557
240733
  },
237558
- "statusCode": {
237559
- "type": "integer"
237560
- },
237561
240734
  "message": {
237562
240735
  "type": "string"
240736
+ },
240737
+ "statusCode": {
240738
+ "type": "integer"
237563
240739
  }
237564
240740
  }
237565
240741
  }
@@ -237578,6 +240754,15 @@
237578
240754
  ],
237579
240755
  "description": "Compatibility endpoint that returns the same signed Snapchat OAuth authorization URL. Requires an explicit destination team (x-team-id header or active team scope); 400 SCOPE_TEAM_REQUIRED otherwise.",
237580
240756
  "parameters": [
240757
+ {
240758
+ "schema": {
240759
+ "type": "boolean"
240760
+ },
240761
+ "in": "query",
240762
+ "name": "confirm_move",
240763
+ "required": false,
240764
+ "description": "Confirm moving Snapchat ad accounts already assigned to another workspace of the organization into the active workspace. Without confirmation, the OAuth callback reports ACCOUNT_ALREADY_ASSIGNED."
240765
+ },
237581
240766
  {
237582
240767
  "schema": {
237583
240768
  "format": "uuid",
@@ -237621,6 +240806,7 @@
237621
240806
  "application/json": {
237622
240807
  "schema": {
237623
240808
  "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
240809
+ "additionalProperties": false,
237624
240810
  "type": "object",
237625
240811
  "required": [
237626
240812
  "statusCode",
@@ -237653,20 +240839,22 @@
237653
240839
  "content": {
237654
240840
  "application/json": {
237655
240841
  "schema": {
237656
- "additionalProperties": true,
240842
+ "additionalProperties": false,
237657
240843
  "type": "object",
237658
240844
  "required": [
237659
- "error"
240845
+ "error",
240846
+ "message",
240847
+ "statusCode"
237660
240848
  ],
237661
240849
  "properties": {
237662
240850
  "error": {
237663
240851
  "type": "string"
237664
240852
  },
237665
- "statusCode": {
237666
- "type": "integer"
237667
- },
237668
240853
  "message": {
237669
240854
  "type": "string"
240855
+ },
240856
+ "statusCode": {
240857
+ "type": "integer"
237670
240858
  }
237671
240859
  }
237672
240860
  }
@@ -237678,20 +240866,22 @@
237678
240866
  "content": {
237679
240867
  "application/json": {
237680
240868
  "schema": {
237681
- "additionalProperties": true,
240869
+ "additionalProperties": false,
237682
240870
  "type": "object",
237683
240871
  "required": [
237684
- "error"
240872
+ "error",
240873
+ "message",
240874
+ "statusCode"
237685
240875
  ],
237686
240876
  "properties": {
237687
240877
  "error": {
237688
240878
  "type": "string"
237689
240879
  },
237690
- "statusCode": {
237691
- "type": "integer"
237692
- },
237693
240880
  "message": {
237694
240881
  "type": "string"
240882
+ },
240883
+ "statusCode": {
240884
+ "type": "integer"
237695
240885
  }
237696
240886
  }
237697
240887
  }
@@ -237703,20 +240893,22 @@
237703
240893
  "content": {
237704
240894
  "application/json": {
237705
240895
  "schema": {
237706
- "additionalProperties": true,
240896
+ "additionalProperties": false,
237707
240897
  "type": "object",
237708
240898
  "required": [
237709
- "error"
240899
+ "error",
240900
+ "message",
240901
+ "statusCode"
237710
240902
  ],
237711
240903
  "properties": {
237712
240904
  "error": {
237713
240905
  "type": "string"
237714
240906
  },
237715
- "statusCode": {
237716
- "type": "integer"
237717
- },
237718
240907
  "message": {
237719
240908
  "type": "string"
240909
+ },
240910
+ "statusCode": {
240911
+ "type": "integer"
237720
240912
  }
237721
240913
  }
237722
240914
  }
@@ -237733,7 +240925,33 @@
237733
240925
  "tags": [
237734
240926
  "snapchat"
237735
240927
  ],
237736
- "description": "Consumes the Snapchat OAuth callback, stores refreshed tokens, dispatches account sync, and returns the popup-closing HTML response.",
240928
+ "description": "Consumes the Snapchat OAuth callback, stores refreshed tokens, dispatches account sync, and returns the popup-closing HTML response. If discovered ad accounts belong to another workspace of the organization, the callback reports ACCOUNT_ALREADY_ASSIGNED unless the signed OAuth state carried confirm_move=true.",
240929
+ "parameters": [
240930
+ {
240931
+ "schema": {
240932
+ "type": "string"
240933
+ },
240934
+ "in": "query",
240935
+ "name": "code",
240936
+ "required": false
240937
+ },
240938
+ {
240939
+ "schema": {
240940
+ "type": "string"
240941
+ },
240942
+ "in": "query",
240943
+ "name": "state",
240944
+ "required": false
240945
+ },
240946
+ {
240947
+ "schema": {
240948
+ "type": "string"
240949
+ },
240950
+ "in": "query",
240951
+ "name": "error",
240952
+ "required": false
240953
+ }
240954
+ ],
237737
240955
  "responses": {
237738
240956
  "200": {
237739
240957
  "description": "Small HTML page that closes the OAuth popup after success or provider callback failure.",
@@ -237761,20 +240979,22 @@
237761
240979
  "content": {
237762
240980
  "application/json": {
237763
240981
  "schema": {
237764
- "additionalProperties": true,
240982
+ "additionalProperties": false,
237765
240983
  "type": "object",
237766
240984
  "required": [
237767
- "error"
240985
+ "error",
240986
+ "message",
240987
+ "statusCode"
237768
240988
  ],
237769
240989
  "properties": {
237770
240990
  "error": {
237771
240991
  "type": "string"
237772
240992
  },
237773
- "statusCode": {
237774
- "type": "integer"
237775
- },
237776
240993
  "message": {
237777
240994
  "type": "string"
240995
+ },
240996
+ "statusCode": {
240997
+ "type": "integer"
237778
240998
  }
237779
240999
  }
237780
241000
  }
@@ -237786,20 +241006,22 @@
237786
241006
  "content": {
237787
241007
  "application/json": {
237788
241008
  "schema": {
237789
- "additionalProperties": true,
241009
+ "additionalProperties": false,
237790
241010
  "type": "object",
237791
241011
  "required": [
237792
- "error"
241012
+ "error",
241013
+ "message",
241014
+ "statusCode"
237793
241015
  ],
237794
241016
  "properties": {
237795
241017
  "error": {
237796
241018
  "type": "string"
237797
241019
  },
237798
- "statusCode": {
237799
- "type": "integer"
237800
- },
237801
241020
  "message": {
237802
241021
  "type": "string"
241022
+ },
241023
+ "statusCode": {
241024
+ "type": "integer"
237803
241025
  }
237804
241026
  }
237805
241027
  }