зеркало из https://github.com/mozilla/fxa.git
fix(payments-next): add StrapiClientConfig to nestapp config
This commit is contained in:
Родитель
d86419a683
Коммит
158beb4828
|
@ -52,6 +52,13 @@ CONTENTFUL_CLIENT_CONFIG__FIRESTORE_CACHE_COLLECTION_NAME=contentfulQueryCacheCo
|
|||
CONTENTFUL_CLIENT_CONFIG__MEM_CACHE_T_T_L=
|
||||
CONTENTFUL_CLIENT_CONFIG__FIRESTORE_CACHE_T_T_L=
|
||||
|
||||
# Strapi Config
|
||||
STRAPI_CLIENT_CONFIG__GRAPHQL_API_URI=https://example.com
|
||||
STRAPI_CLIENT_CONFIG__GRAPHQL_API_KEY=PLACEHOLDER
|
||||
STRAPI_CLIENT_CONFIG__MEM_CACHE_T_T_L=
|
||||
STRAPI_CLIENT_CONFIG__FIRESTORE_CACHE_COLLECTION_NAME=strapiClientQueryCacheCollection
|
||||
STRAPI_CLIENT_CONFIG__FIRESTORE_CACHE_T_T_L=
|
||||
|
||||
# CMS Config
|
||||
CMS_CONFIG__SUPPORTED_PRICE_IDS=plan_GqM9N6qyhvxaVk,price_1KbomlBVqmGyQTMaa0Tq7UaW,price_1Ivq4gBVqmGyQTMaplHcFEGO
|
||||
|
||||
|
|
|
@ -48,6 +48,13 @@ CONTENTFUL_CLIENT_CONFIG__FIRESTORE_CACHE_COLLECTION_NAME=contentfulQueryCacheCo
|
|||
CONTENTFUL_CLIENT_CONFIG__MEM_CACHE_T_T_L= 300
|
||||
CONTENTFUL_CLIENT_CONFIG__FIRESTORE_CACHE_T_T_L= 604800
|
||||
|
||||
# Strapi Config
|
||||
STRAPI_CLIENT_CONFIG__GRAPHQL_API_URI=https://example.com
|
||||
STRAPI_CLIENT_CONFIG__API_KEY=PLACEHOLDER
|
||||
STRAPI_CLIENT_CONFIG__MEM_CACHE_T_T_L=
|
||||
STRAPI_CLIENT_CONFIG__FIRESTORE_CACHE_COLLECTION_NAME=strapiClientQueryCacheCollection
|
||||
STRAPI_CLIENT_CONFIG__FIRESTORE_CACHE_T_T_L=
|
||||
|
||||
# CMS Config
|
||||
CMS_CONFIG__SUPPORTED_PRICE_IDS=
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import { MySQLConfig } from '@fxa/shared/db/mysql/core';
|
|||
import { GeoDBConfig, GeoDBManagerConfig } from '@fxa/shared/geodb';
|
||||
import { PaypalClientConfig } from 'libs/payments/paypal/src/lib/paypal.client.config';
|
||||
import { StripeConfig } from '@fxa/payments/stripe';
|
||||
import { CMSConfig, ContentfulClientConfig } from '@fxa/shared/cms';
|
||||
import { CMSConfig, StrapiClientConfig } from '@fxa/shared/cms';
|
||||
import { FirestoreConfig } from 'libs/shared/db/firestore/src/lib/firestore.config';
|
||||
import { StatsDConfig } from 'libs/shared/metrics/statsd/src/lib/statsd.config';
|
||||
|
||||
|
@ -38,10 +38,10 @@ export class RootConfig {
|
|||
@IsDefined()
|
||||
public readonly paypalClientConfig!: Partial<PaypalClientConfig>;
|
||||
|
||||
@Type(() => ContentfulClientConfig)
|
||||
@Type(() => StrapiClientConfig)
|
||||
@ValidateNested()
|
||||
@IsDefined()
|
||||
public readonly contentfulClientConfig!: Partial<ContentfulClientConfig>;
|
||||
public readonly strapiClientConfig!: Partial<StrapiClientConfig>;
|
||||
|
||||
@Type(() => CMSConfig)
|
||||
@ValidateNested()
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
export * from './lib/cms.config';
|
||||
export * from './lib/cms.error';
|
||||
export * from './lib/constants';
|
||||
export * from './lib/contentful.client.config';
|
||||
export * from './lib/factories';
|
||||
export * from './lib/product-configuration.manager';
|
||||
export * from './lib/queries/capability-service-by-plan-ids';
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import { IsNumber, IsString, IsUrl } from 'class-validator';
|
||||
|
||||
export class ContentfulClientConfig {
|
||||
@IsUrl()
|
||||
public readonly cdnApiUri!: string;
|
||||
|
||||
@IsUrl()
|
||||
public readonly graphqlApiUri!: string;
|
||||
|
||||
@IsString()
|
||||
public readonly graphqlApiKey!: string;
|
||||
|
||||
@IsString()
|
||||
public readonly graphqlSpaceId!: string;
|
||||
|
||||
@IsString()
|
||||
public readonly graphqlEnvironment!: string;
|
||||
|
||||
@IsString()
|
||||
public readonly firestoreCacheCollectionName!: string;
|
||||
|
||||
@IsNumber()
|
||||
public readonly memCacheTTL?: number;
|
||||
|
||||
@IsNumber()
|
||||
public readonly firestoreCacheTTL?: number;
|
||||
}
|
Загрузка…
Ссылка в новой задаче