@@ -808,6 +808,169 @@ const docTemplate = `{
808
808
}
809
809
}
810
810
},
811
+ "/templates/{id}/daus": {
812
+ "get": {
813
+ "security": [
814
+ {
815
+ "CoderSessionToken": []
816
+ }
817
+ ],
818
+ "produces": [
819
+ "application/json"
820
+ ],
821
+ "tags": [
822
+ "Templates"
823
+ ],
824
+ "summary": "Get template DAUs by ID",
825
+ "operationId": "get-template-daus-by-id",
826
+ "parameters": [
827
+ {
828
+ "type": "string",
829
+ "format": "uuid",
830
+ "description": "Template ID",
831
+ "name": "id",
832
+ "in": "path",
833
+ "required": true
834
+ }
835
+ ],
836
+ "responses": {
837
+ "200": {
838
+ "description": "OK",
839
+ "schema": {
840
+ "$ref": "#/definitions/codersdk.TemplateDAUsResponse"
841
+ }
842
+ }
843
+ }
844
+ }
845
+ },
846
+ "/templates/{id}/versions": {
847
+ "get": {
848
+ "security": [
849
+ {
850
+ "CoderSessionToken": []
851
+ }
852
+ ],
853
+ "produces": [
854
+ "application/json"
855
+ ],
856
+ "tags": [
857
+ "Templates"
858
+ ],
859
+ "summary": "List template versions by template ID",
860
+ "operationId": "list-template-versions-by-template-ID",
861
+ "parameters": [
862
+ {
863
+ "type": "string",
864
+ "format": "uuid",
865
+ "description": "Template ID",
866
+ "name": "id",
867
+ "in": "path",
868
+ "required": true
869
+ }
870
+ ],
871
+ "responses": {
872
+ "200": {
873
+ "description": "OK",
874
+ "schema": {
875
+ "type": "array",
876
+ "items": {
877
+ "$ref": "#/definitions/codersdk.TemplateVersion"
878
+ }
879
+ }
880
+ }
881
+ }
882
+ },
883
+ "patch": {
884
+ "security": [
885
+ {
886
+ "CoderSessionToken": []
887
+ }
888
+ ],
889
+ "consumes": [
890
+ "application/json"
891
+ ],
892
+ "produces": [
893
+ "application/json"
894
+ ],
895
+ "tags": [
896
+ "Templates"
897
+ ],
898
+ "summary": "Update active template version by template ID",
899
+ "operationId": "update-active-template-version-by-template-ID",
900
+ "parameters": [
901
+ {
902
+ "description": "Modified template version",
903
+ "name": "request",
904
+ "in": "body",
905
+ "required": true,
906
+ "schema": {
907
+ "$ref": "#/definitions/codersdk.UpdateActiveTemplateVersion"
908
+ }
909
+ },
910
+ {
911
+ "type": "string",
912
+ "format": "uuid",
913
+ "description": "Template ID",
914
+ "name": "id",
915
+ "in": "path",
916
+ "required": true
917
+ }
918
+ ],
919
+ "responses": {
920
+ "200": {
921
+ "description": "OK",
922
+ "schema": {
923
+ "$ref": "#/definitions/codersdk.Response"
924
+ }
925
+ }
926
+ }
927
+ }
928
+ },
929
+ "/templates/{id}/versions/{name}": {
930
+ "get": {
931
+ "security": [
932
+ {
933
+ "CoderSessionToken": []
934
+ }
935
+ ],
936
+ "produces": [
937
+ "application/json"
938
+ ],
939
+ "tags": [
940
+ "Templates"
941
+ ],
942
+ "summary": "Get template version by template ID and name",
943
+ "operationId": "get-template-version-by-template-id-and-name",
944
+ "parameters": [
945
+ {
946
+ "type": "string",
947
+ "format": "uuid",
948
+ "description": "Template ID",
949
+ "name": "id",
950
+ "in": "path",
951
+ "required": true
952
+ },
953
+ {
954
+ "type": "string",
955
+ "description": "Template name",
956
+ "name": "name",
957
+ "in": "path",
958
+ "required": true
959
+ }
960
+ ],
961
+ "responses": {
962
+ "200": {
963
+ "description": "OK",
964
+ "schema": {
965
+ "type": "array",
966
+ "items": {
967
+ "$ref": "#/definitions/codersdk.TemplateVersion"
968
+ }
969
+ }
970
+ }
971
+ }
972
+ }
973
+ },
811
974
"/updatecheck": {
812
975
"get": {
813
976
"produces": [
@@ -2250,6 +2413,17 @@ const docTemplate = `{
2250
2413
}
2251
2414
}
2252
2415
},
2416
+ "codersdk.DAUEntry": {
2417
+ "type": "object",
2418
+ "properties": {
2419
+ "amount": {
2420
+ "type": "integer"
2421
+ },
2422
+ "date": {
2423
+ "type": "string"
2424
+ }
2425
+ }
2426
+ },
2253
2427
"codersdk.DERP": {
2254
2428
"type": "object",
2255
2429
"properties": {
@@ -3100,6 +3274,54 @@ const docTemplate = `{
3100
3274
"$ref": "#/definitions/codersdk.TransitionStats"
3101
3275
}
3102
3276
},
3277
+ "codersdk.TemplateDAUsResponse": {
3278
+ "type": "object",
3279
+ "properties": {
3280
+ "entries": {
3281
+ "type": "array",
3282
+ "items": {
3283
+ "$ref": "#/definitions/codersdk.DAUEntry"
3284
+ }
3285
+ }
3286
+ }
3287
+ },
3288
+ "codersdk.TemplateVersion": {
3289
+ "type": "object",
3290
+ "properties": {
3291
+ "created_at": {
3292
+ "type": "string",
3293
+ "format": "date-time"
3294
+ },
3295
+ "created_by": {
3296
+ "$ref": "#/definitions/codersdk.User"
3297
+ },
3298
+ "id": {
3299
+ "type": "string",
3300
+ "format": "uuid"
3301
+ },
3302
+ "job": {
3303
+ "$ref": "#/definitions/codersdk.ProvisionerJob"
3304
+ },
3305
+ "name": {
3306
+ "type": "string"
3307
+ },
3308
+ "organization_id": {
3309
+ "type": "string",
3310
+ "format": "uuid"
3311
+ },
3312
+ "readme": {
3313
+ "type": "string"
3314
+ },
3315
+ "template_id": {
3316
+ "type": "string",
3317
+ "format": "uuid"
3318
+ },
3319
+ "updated_at": {
3320
+ "type": "string",
3321
+ "format": "date-time"
3322
+ }
3323
+ }
3324
+ },
3103
3325
"codersdk.TraceConfig": {
3104
3326
"type": "object",
3105
3327
"properties": {
@@ -3127,6 +3349,17 @@ const docTemplate = `{
3127
3349
}
3128
3350
}
3129
3351
},
3352
+ "codersdk.UpdateActiveTemplateVersion": {
3353
+ "type": "object",
3354
+ "required": [
3355
+ "id"
3356
+ ],
3357
+ "properties": {
3358
+ "id": {
3359
+ "type": "string"
3360
+ }
3361
+ }
3362
+ },
3130
3363
"codersdk.UpdateCheckResponse": {
3131
3364
"type": "object",
3132
3365
"properties": {
@@ -3186,24 +3419,29 @@ const docTemplate = `{
3186
3419
],
3187
3420
"properties": {
3188
3421
"avatar_url": {
3189
- "type": "string"
3422
+ "type": "string",
3423
+ "format": "uri"
3190
3424
},
3191
3425
"created_at": {
3192
- "type": "string"
3426
+ "type": "string",
3427
+ "format": "date-time"
3193
3428
},
3194
3429
"email": {
3195
3430
"type": "string"
3196
3431
},
3197
3432
"id": {
3198
- "type": "string"
3433
+ "type": "string",
3434
+ "format": "uuid"
3199
3435
},
3200
3436
"last_seen_at": {
3201
- "type": "string"
3437
+ "type": "string",
3438
+ "format": "date-time"
3202
3439
},
3203
3440
"organization_ids": {
3204
3441
"type": "array",
3205
3442
"items": {
3206
- "type": "string"
3443
+ "type": "string",
3444
+ "format": "uuid"
3207
3445
}
3208
3446
},
3209
3447
"roles": {
@@ -3213,7 +3451,11 @@ const docTemplate = `{
3213
3451
}
3214
3452
},
3215
3453
"status": {
3216
- "type": "string"
3454
+ "type": "string",
3455
+ "enum": [
3456
+ "active",
3457
+ "suspended"
3458
+ ]
3217
3459
},
3218
3460
"username": {
3219
3461
"type": "string"
0 commit comments