refreshFeatureFlags method
Future<TRefreshFeatureFlagsResponse>
refreshFeatureFlags({
- required TRefreshFeatureFlagsBody input,
Refresh feature flags by triggering a DB read to flush the in-memory cache.
Sign the provided TRefreshFeatureFlagsBody with the client's stamp function and submit the request (POST /tkhq/api/v1/refresh_feature_flags).
See also: stampRefreshFeatureFlags.
Implementation
Future<TRefreshFeatureFlagsResponse> refreshFeatureFlags({
required TRefreshFeatureFlagsBody input,
}) async {
final body = packActivityBody(
bodyJson: input.toJson(),
fallbackOrganizationId: input.organizationId ??
config.organizationId ??
(throw Exception(
"Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
activityType: 'ACTIVITY_TYPE_REFRESH_FEATURE_FLAGS',
);
return await request<Map<String, dynamic>, TRefreshFeatureFlagsResponse>(
"/tkhq/api/v1/refresh_feature_flags",
body,
(json) => TRefreshFeatureFlagsResponse.fromJson(
transformActivityResponse(json, 'RefreshFeatureFlags')));
}