@openhi/constructs 0.0.17 → 0.0.19

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.
package/lib/index.d.mts CHANGED
@@ -885,4 +885,25 @@ declare class OpenHiDataService extends OpenHiService {
885
885
  protected createDataStore(): ITable;
886
886
  }
887
887
 
888
- export { type BuildParameterNameProps, ChildHostedZone, type ChildHostedZoneProps, CognitoUserPool, CognitoUserPoolClient, CognitoUserPoolDomain, CognitoUserPoolKmsKey, DataEventBus, DiscoverableStringParameter, type DiscoverableStringParameterProps, DynamoDbDataStore, type DynamoDbDataStoreProps, OpenHiApp, type OpenHiAppProps, OpenHiAuthService, type OpenHiAuthServiceProps, OpenHiDataService, type OpenHiDataServiceProps, OpenHiEnvironment, type OpenHiEnvironmentProps, OpenHiGlobalService, type OpenHiGlobalServiceProps, OpenHiRestApiService, type OpenHiRestApiServiceProps, OpenHiService, type OpenHiServiceProps, type OpenHiServiceType, OpenHiStage, type OpenHiStageProps, OpsEventBus, PreTokenGenerationLambda, REST_API_BASE_URL_SSM_NAME, type RestApiCorsOptions, RootGraphqlApi, type RootGraphqlApiProps, RootHostedZone, RootHttpApi, RootWildcardCertificate, getDynamoDbDataStoreTableName };
888
+ interface OpenHiGraphqlServiceProps extends OpenHiServiceProps {
889
+ }
890
+ /**
891
+ * GraphQL API service stack: creates the AppSync API via {@link RootGraphqlApi}
892
+ * and exports its ID via SSM. Look up from other stacks via
893
+ * {@link OpenHiGraphqlService.graphqlApiFromConstruct}.
894
+ */
895
+ declare class OpenHiGraphqlService extends OpenHiService {
896
+ static readonly SERVICE_TYPE = "graphql-api";
897
+ /**
898
+ * Returns the GraphQL API by looking up the GraphQL stack's API ID from SSM.
899
+ * Use from other stacks to obtain an IGraphqlApi reference.
900
+ */
901
+ static graphqlApiFromConstruct(scope: Construct): IGraphqlApi;
902
+ get serviceType(): string;
903
+ props: OpenHiGraphqlServiceProps;
904
+ readonly rootGraphqlApi: RootGraphqlApi;
905
+ constructor(ohEnv: OpenHiEnvironment, props?: OpenHiGraphqlServiceProps);
906
+ protected createRootGraphqlApi(): RootGraphqlApi;
907
+ }
908
+
909
+ export { type BuildParameterNameProps, ChildHostedZone, type ChildHostedZoneProps, CognitoUserPool, CognitoUserPoolClient, CognitoUserPoolDomain, CognitoUserPoolKmsKey, DataEventBus, DiscoverableStringParameter, type DiscoverableStringParameterProps, DynamoDbDataStore, type DynamoDbDataStoreProps, OpenHiApp, type OpenHiAppProps, OpenHiAuthService, type OpenHiAuthServiceProps, OpenHiDataService, type OpenHiDataServiceProps, OpenHiEnvironment, type OpenHiEnvironmentProps, OpenHiGlobalService, type OpenHiGlobalServiceProps, OpenHiGraphqlService, type OpenHiGraphqlServiceProps, OpenHiRestApiService, type OpenHiRestApiServiceProps, OpenHiService, type OpenHiServiceProps, type OpenHiServiceType, OpenHiStage, type OpenHiStageProps, OpsEventBus, PreTokenGenerationLambda, REST_API_BASE_URL_SSM_NAME, type RestApiCorsOptions, RootGraphqlApi, type RootGraphqlApiProps, RootHostedZone, RootHttpApi, RootWildcardCertificate, getDynamoDbDataStoreTableName };
package/lib/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { RemovalPolicy, App, AppProps, Stage, StageProps, Stack, StackProps } fr
2
2
  import { Construct, IConstruct } from 'constructs';
3
3
  import { ICertificate, Certificate, CertificateProps } from 'aws-cdk-lib/aws-certificatemanager';
4
4
  import { IHttpApi, CorsHttpMethod, HttpApi, HttpApiProps, DomainName } from 'aws-cdk-lib/aws-apigatewayv2';
5
- import { GraphqlApi, IGraphqlApi, GraphqlApiProps } from 'aws-cdk-lib/aws-appsync';
5
+ import { IGraphqlApi, GraphqlApi, GraphqlApiProps } from 'aws-cdk-lib/aws-appsync';
6
6
  import { UserPool, UserPoolProps, UserPoolClient, UserPoolClientProps, UserPoolDomain, UserPoolDomainProps, IUserPool, IUserPoolClient, IUserPoolDomain } from 'aws-cdk-lib/aws-cognito';
7
7
  import { Key, KeyProps, IKey } from 'aws-cdk-lib/aws-kms';
8
8
  import { NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs';
@@ -965,5 +965,26 @@ declare class OpenHiDataService extends OpenHiService {
965
965
  protected createDataStore(): ITable;
966
966
  }
967
967
 
968
- export { ChildHostedZone, CognitoUserPool, CognitoUserPoolClient, CognitoUserPoolDomain, CognitoUserPoolKmsKey, DataEventBus, DiscoverableStringParameter, DynamoDbDataStore, OpenHiApp, OpenHiAuthService, OpenHiDataService, OpenHiEnvironment, OpenHiGlobalService, OpenHiRestApiService, OpenHiService, OpenHiStage, OpsEventBus, PreTokenGenerationLambda, REST_API_BASE_URL_SSM_NAME, RootGraphqlApi, RootHostedZone, RootHttpApi, RootWildcardCertificate, getDynamoDbDataStoreTableName };
969
- export type { BuildParameterNameProps, ChildHostedZoneProps, DiscoverableStringParameterProps, DynamoDbDataStoreProps, OpenHiAppProps, OpenHiAuthServiceProps, OpenHiDataServiceProps, OpenHiEnvironmentProps, OpenHiGlobalServiceProps, OpenHiRestApiServiceProps, OpenHiServiceProps, OpenHiServiceType, OpenHiStageProps, RestApiCorsOptions, RootGraphqlApiProps };
968
+ interface OpenHiGraphqlServiceProps extends OpenHiServiceProps {
969
+ }
970
+ /**
971
+ * GraphQL API service stack: creates the AppSync API via {@link RootGraphqlApi}
972
+ * and exports its ID via SSM. Look up from other stacks via
973
+ * {@link OpenHiGraphqlService.graphqlApiFromConstruct}.
974
+ */
975
+ declare class OpenHiGraphqlService extends OpenHiService {
976
+ static readonly SERVICE_TYPE = "graphql-api";
977
+ /**
978
+ * Returns the GraphQL API by looking up the GraphQL stack's API ID from SSM.
979
+ * Use from other stacks to obtain an IGraphqlApi reference.
980
+ */
981
+ static graphqlApiFromConstruct(scope: Construct): IGraphqlApi;
982
+ get serviceType(): string;
983
+ props: OpenHiGraphqlServiceProps;
984
+ readonly rootGraphqlApi: RootGraphqlApi;
985
+ constructor(ohEnv: OpenHiEnvironment, props?: OpenHiGraphqlServiceProps);
986
+ protected createRootGraphqlApi(): RootGraphqlApi;
987
+ }
988
+
989
+ export { ChildHostedZone, CognitoUserPool, CognitoUserPoolClient, CognitoUserPoolDomain, CognitoUserPoolKmsKey, DataEventBus, DiscoverableStringParameter, DynamoDbDataStore, OpenHiApp, OpenHiAuthService, OpenHiDataService, OpenHiEnvironment, OpenHiGlobalService, OpenHiGraphqlService, OpenHiRestApiService, OpenHiService, OpenHiStage, OpsEventBus, PreTokenGenerationLambda, REST_API_BASE_URL_SSM_NAME, RootGraphqlApi, RootHostedZone, RootHttpApi, RootWildcardCertificate, getDynamoDbDataStoreTableName };
990
+ export type { BuildParameterNameProps, ChildHostedZoneProps, DiscoverableStringParameterProps, DynamoDbDataStoreProps, OpenHiAppProps, OpenHiAuthServiceProps, OpenHiDataServiceProps, OpenHiEnvironmentProps, OpenHiGlobalServiceProps, OpenHiGraphqlServiceProps, OpenHiRestApiServiceProps, OpenHiServiceProps, OpenHiServiceType, OpenHiStageProps, RestApiCorsOptions, RootGraphqlApiProps };
package/lib/index.js CHANGED
@@ -106,6 +106,7 @@ __export(src_exports, {
106
106
  OpenHiDataService: () => OpenHiDataService,
107
107
  OpenHiEnvironment: () => OpenHiEnvironment,
108
108
  OpenHiGlobalService: () => OpenHiGlobalService,
109
+ OpenHiGraphqlService: () => OpenHiGraphqlService,
109
110
  OpenHiRestApiService: () => OpenHiRestApiService,
110
111
  OpenHiService: () => OpenHiService,
111
112
  OpenHiStage: () => OpenHiStage,
@@ -1401,6 +1402,31 @@ var _OpenHiRestApiService = class _OpenHiRestApiService extends OpenHiService {
1401
1402
  };
1402
1403
  _OpenHiRestApiService.SERVICE_TYPE = "rest-api";
1403
1404
  var OpenHiRestApiService = _OpenHiRestApiService;
1405
+
1406
+ // src/services/open-hi-graphql-service.ts
1407
+ var _OpenHiGraphqlService = class _OpenHiGraphqlService extends OpenHiService {
1408
+ /**
1409
+ * Returns the GraphQL API by looking up the GraphQL stack's API ID from SSM.
1410
+ * Use from other stacks to obtain an IGraphqlApi reference.
1411
+ */
1412
+ static graphqlApiFromConstruct(scope) {
1413
+ return RootGraphqlApi.fromConstruct(scope);
1414
+ }
1415
+ get serviceType() {
1416
+ return _OpenHiGraphqlService.SERVICE_TYPE;
1417
+ }
1418
+ constructor(ohEnv, props = {}) {
1419
+ super(ohEnv, _OpenHiGraphqlService.SERVICE_TYPE, props);
1420
+ this.props = props;
1421
+ this.rootGraphqlApi = this.createRootGraphqlApi();
1422
+ }
1423
+ /* Create the root GraphQL API */
1424
+ createRootGraphqlApi() {
1425
+ return new RootGraphqlApi(this);
1426
+ }
1427
+ };
1428
+ _OpenHiGraphqlService.SERVICE_TYPE = "graphql-api";
1429
+ var OpenHiGraphqlService = _OpenHiGraphqlService;
1404
1430
  // Annotate the CommonJS export names for ESM import in node:
1405
1431
  0 && (module.exports = {
1406
1432
  ChildHostedZone,
@@ -1416,6 +1442,7 @@ var OpenHiRestApiService = _OpenHiRestApiService;
1416
1442
  OpenHiDataService,
1417
1443
  OpenHiEnvironment,
1418
1444
  OpenHiGlobalService,
1445
+ OpenHiGraphqlService,
1419
1446
  OpenHiRestApiService,
1420
1447
  OpenHiService,
1421
1448
  OpenHiStage,