@@ -41,6 +41,12 @@ const patchSchema = {
41
41
maxResolution : { type : 'number' , nullable : true } ,
42
42
} ,
43
43
} ,
44
+ purgeCache : {
45
+ type : 'object' ,
46
+ properties : {
47
+ enabled : { type : 'boolean' } ,
48
+ } ,
49
+ } ,
44
50
s3Protocol : {
45
51
type : 'object' ,
46
52
properties : {
@@ -88,6 +94,7 @@ interface tenantDBInterface {
88
94
service_key : string
89
95
file_size_limit ?: number
90
96
feature_s3_protocol ?: boolean
97
+ feature_purge_cache ?: boolean
91
98
feature_image_transformation ?: boolean
92
99
image_transformation_max_resolution ?: number
93
100
}
@@ -108,6 +115,7 @@ export default async function routes(fastify: FastifyInstance) {
108
115
jwt_secret,
109
116
jwks,
110
117
service_key,
118
+ feature_purge_cache,
111
119
feature_image_transformation,
112
120
feature_s3_protocol,
113
121
image_transformation_max_resolution,
@@ -133,6 +141,9 @@ export default async function routes(fastify: FastifyInstance) {
133
141
enabled : feature_image_transformation ,
134
142
maxResolution : image_transformation_max_resolution ,
135
143
} ,
144
+ purgeCache : {
145
+ enabled : feature_purge_cache ,
146
+ } ,
136
147
s3Protocol : {
137
148
enabled : feature_s3_protocol ,
138
149
} ,
@@ -156,6 +167,7 @@ export default async function routes(fastify: FastifyInstance) {
156
167
jwt_secret,
157
168
jwks,
158
169
service_key,
170
+ feature_purge_cache,
159
171
feature_s3_protocol,
160
172
feature_image_transformation,
161
173
image_transformation_max_resolution,
@@ -184,6 +196,9 @@ export default async function routes(fastify: FastifyInstance) {
184
196
enabled : feature_image_transformation ,
185
197
maxResolution : image_transformation_max_resolution ,
186
198
} ,
199
+ purgeCache : {
200
+ enabled : feature_purge_cache ,
201
+ } ,
187
202
s3Protocol : {
188
203
enabled : feature_s3_protocol ,
189
204
} ,
@@ -222,6 +237,7 @@ export default async function routes(fastify: FastifyInstance) {
222
237
jwks,
223
238
service_key : encrypt ( serviceKey ) ,
224
239
feature_image_transformation : features ?. imageTransformation ?. enabled ?? false ,
240
+ feature_purge_cache : features ?. purgeCache ?. enabled ?? false ,
225
241
feature_s3_protocol : features ?. s3Protocol ?. enabled ?? true ,
226
242
migrations_version : null ,
227
243
migrations_status : null ,
@@ -277,6 +293,7 @@ export default async function routes(fastify: FastifyInstance) {
277
293
jwks,
278
294
service_key : serviceKey !== undefined ? encrypt ( serviceKey ) : undefined ,
279
295
feature_image_transformation : features ?. imageTransformation ?. enabled ,
296
+ feature_purge_cache : features ?. purgeCache ?. enabled ,
280
297
feature_s3_protocol : features ?. s3Protocol ?. enabled ,
281
298
image_transformation_max_resolution :
282
299
features ?. imageTransformation ?. maxResolution === null
@@ -342,6 +359,10 @@ export default async function routes(fastify: FastifyInstance) {
342
359
tenantInfo . feature_image_transformation = features ?. imageTransformation ?. enabled
343
360
}
344
361
362
+ if ( typeof features ?. purgeCache ?. enabled !== 'undefined' ) {
363
+ tenantInfo . feature_purge_cache = features ?. purgeCache ?. enabled
364
+ }
365
+
345
366
if ( typeof features ?. imageTransformation ?. maxResolution !== 'undefined' ) {
346
367
tenantInfo . image_transformation_max_resolution = features ?. imageTransformation
347
368
?. image_transformation_max_resolution as number | undefined
0 commit comments