@3sixty/engine-server-types 0.20.0-next.4 → 0.20.0-next.5
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/dist/es/components/authentication.js +41 -7
- package/dist/es/components/authentication.js.map +1 -1
- package/dist/es/components/authenticationAccount.js +85 -0
- package/dist/es/components/authenticationAccount.js.map +1 -0
- package/dist/es/components/authenticationAccountAdmin.js +46 -0
- package/dist/es/components/authenticationAccountAdmin.js.map +1 -0
- package/dist/es/components/authenticationAdmin.js +11 -9
- package/dist/es/components/authenticationAdmin.js.map +1 -1
- package/dist/es/components/authenticationProvider.js +41 -0
- package/dist/es/components/authenticationProvider.js.map +1 -0
- package/dist/es/components/oauth.js +32 -0
- package/dist/es/components/oauth.js.map +1 -0
- package/dist/es/components/organization.js +43 -0
- package/dist/es/components/organization.js.map +1 -0
- package/dist/es/components/organizationRequestAdmin.js +41 -0
- package/dist/es/components/organizationRequestAdmin.js.map +1 -0
- package/dist/es/components/restRouteProcessor.js +19 -9
- package/dist/es/components/restRouteProcessor.js.map +1 -1
- package/dist/es/components/socketRouteProcessor.js +19 -9
- package/dist/es/components/socketRouteProcessor.js.map +1 -1
- package/dist/es/index.js +18 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IEngineServerConfig.js.map +1 -1
- package/dist/es/models/config/authenticationAccountAdminComponentConfig.js +2 -0
- package/dist/es/models/config/authenticationAccountAdminComponentConfig.js.map +1 -0
- package/dist/es/models/config/authenticationAccountComponentConfig.js +2 -0
- package/dist/es/models/config/authenticationAccountComponentConfig.js.map +1 -0
- package/dist/es/models/config/authenticationProviderConfig.js +2 -0
- package/dist/es/models/config/authenticationProviderConfig.js.map +1 -0
- package/dist/es/models/config/oauthComponentConfig.js +2 -0
- package/dist/es/models/config/oauthComponentConfig.js.map +1 -0
- package/dist/es/models/config/organizationComponentConfig.js +2 -0
- package/dist/es/models/config/organizationComponentConfig.js.map +1 -0
- package/dist/es/models/config/organizationRequestAdminComponentConfig.js +2 -0
- package/dist/es/models/config/organizationRequestAdminComponentConfig.js.map +1 -0
- package/dist/es/models/config/restRouteProcessorConfig.js.map +1 -1
- package/dist/es/models/config/socketRouteProcessorConfig.js.map +1 -1
- package/dist/es/models/types/authenticationAccountAdminComponentType.js +17 -0
- package/dist/es/models/types/authenticationAccountAdminComponentType.js.map +1 -0
- package/dist/es/models/types/authenticationAccountComponentType.js +17 -0
- package/dist/es/models/types/authenticationAccountComponentType.js.map +1 -0
- package/dist/es/models/types/authenticationProviderType.js +21 -0
- package/dist/es/models/types/authenticationProviderType.js.map +1 -0
- package/dist/es/models/types/oauthComponentType.js +13 -0
- package/dist/es/models/types/oauthComponentType.js.map +1 -0
- package/dist/es/models/types/organizationComponentType.js +17 -0
- package/dist/es/models/types/organizationComponentType.js.map +1 -0
- package/dist/es/models/types/organizationRequestAdminComponentType.js +17 -0
- package/dist/es/models/types/organizationRequestAdminComponentType.js.map +1 -0
- package/dist/es/models/types/restRouteProcessorType.js +10 -1
- package/dist/es/models/types/restRouteProcessorType.js.map +1 -1
- package/dist/es/models/types/socketRouteProcessorType.js +10 -1
- package/dist/es/models/types/socketRouteProcessorType.js.map +1 -1
- package/dist/types/components/authentication.d.ts +16 -0
- package/dist/types/components/authenticationAccount.d.ts +37 -0
- package/dist/types/components/authenticationAccountAdmin.d.ts +12 -0
- package/dist/types/components/authenticationProvider.d.ts +12 -0
- package/dist/types/components/oauth.d.ts +12 -0
- package/dist/types/components/organization.d.ts +12 -0
- package/dist/types/components/organizationRequestAdmin.d.ts +12 -0
- package/dist/types/index.d.ts +18 -0
- package/dist/types/models/IEngineServerConfig.d.ts +30 -0
- package/dist/types/models/config/authenticationAccountAdminComponentConfig.d.ts +13 -0
- package/dist/types/models/config/authenticationAccountComponentConfig.d.ts +13 -0
- package/dist/types/models/config/authenticationProviderConfig.d.ts +17 -0
- package/dist/types/models/config/oauthComponentConfig.d.ts +9 -0
- package/dist/types/models/config/organizationComponentConfig.d.ts +13 -0
- package/dist/types/models/config/organizationRequestAdminComponentConfig.d.ts +13 -0
- package/dist/types/models/config/restRouteProcessorConfig.d.ts +8 -1
- package/dist/types/models/config/socketRouteProcessorConfig.d.ts +8 -1
- package/dist/types/models/types/authenticationAccountAdminComponentType.d.ts +17 -0
- package/dist/types/models/types/authenticationAccountComponentType.d.ts +17 -0
- package/dist/types/models/types/authenticationProviderType.d.ts +21 -0
- package/dist/types/models/types/oauthComponentType.d.ts +13 -0
- package/dist/types/models/types/organizationComponentType.d.ts +17 -0
- package/dist/types/models/types/organizationRequestAdminComponentType.d.ts +17 -0
- package/dist/types/models/types/restRouteProcessorType.d.ts +8 -0
- package/dist/types/models/types/socketRouteProcessorType.d.ts +8 -0
- package/docs/changelog.md +15 -0
- package/docs/examples.md +91 -0
- package/docs/reference/functions/initialiseAccountDataEntityStorage.md +30 -0
- package/docs/reference/functions/initialiseAuthenticationAccountAdminComponent.md +31 -0
- package/docs/reference/functions/initialiseAuthenticationAccountComponent.md +31 -0
- package/docs/reference/functions/initialiseAuthenticationPasswordResetEntityStorage.md +30 -0
- package/docs/reference/functions/initialiseAuthenticationProvider.md +31 -0
- package/docs/reference/functions/initialiseAuthenticationUserEntityStorage.md +30 -0
- package/docs/reference/functions/initialiseOAuthComponent.md +31 -0
- package/docs/reference/functions/initialiseOrganizationComponent.md +31 -0
- package/docs/reference/functions/initialiseOrganizationEntityStorage.md +31 -0
- package/docs/reference/functions/initialiseOrganizationRequestAdminComponent.md +31 -0
- package/docs/reference/functions/initialiseOrganizationRequestEntityStorage.md +30 -0
- package/docs/reference/index.md +29 -0
- package/docs/reference/interfaces/IEngineServerConfig.md +36 -0
- package/docs/reference/type-aliases/AuthenticationAccountAdminComponentConfig.md +5 -0
- package/docs/reference/type-aliases/AuthenticationAccountAdminComponentType.md +5 -0
- package/docs/reference/type-aliases/AuthenticationAccountComponentConfig.md +5 -0
- package/docs/reference/type-aliases/AuthenticationAccountComponentType.md +5 -0
- package/docs/reference/type-aliases/AuthenticationProviderConfig.md +5 -0
- package/docs/reference/type-aliases/AuthenticationProviderType.md +5 -0
- package/docs/reference/type-aliases/OAuthComponentConfig.md +17 -0
- package/docs/reference/type-aliases/OAuthComponentType.md +5 -0
- package/docs/reference/type-aliases/OrganizationComponentConfig.md +5 -0
- package/docs/reference/type-aliases/OrganizationComponentType.md +5 -0
- package/docs/reference/type-aliases/OrganizationRequestAdminComponentConfig.md +5 -0
- package/docs/reference/type-aliases/OrganizationRequestAdminComponentType.md +5 -0
- package/docs/reference/type-aliases/RestRouteProcessorConfig.md +1 -1
- package/docs/reference/type-aliases/SocketRouteProcessorConfig.md +1 -1
- package/docs/reference/variables/AuthenticationAccountAdminComponentType.md +19 -0
- package/docs/reference/variables/AuthenticationAccountComponentType.md +19 -0
- package/docs/reference/variables/AuthenticationProviderType.md +25 -0
- package/docs/reference/variables/OAuthComponentType.md +13 -0
- package/docs/reference/variables/OrganizationComponentType.md +19 -0
- package/docs/reference/variables/OrganizationRequestAdminComponentType.md +19 -0
- package/docs/reference/variables/RestRouteProcessorType.md +12 -0
- package/docs/reference/variables/SocketRouteProcessorType.md +12 -0
- package/package.json +10 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restRouteProcessor.js","sources":["../../../src/components/restRouteProcessor.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EACN,mBAAmB,EACnB,UAAU,IAAI,2BAA2B,EAEzC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EACN,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACtF,OAAO,EAAE,2BAA2B,EAAE,MAAM,+B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,sBAAsB,EAAE,UAAU,CAAC,yBAAyB,CAC3D,WAAW,EACX,uBAAuB,CACvB;YACD,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CACzD,SAAS,EACT,uBAAuB,CACvB;SACD,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,GAAG,yBAAyB,CAAC;IAC9C,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,sBAAsB,CAAC,OAAO,EAAE,CAAC;QACnE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,qBAAqB,CACxB,gBAAgB,CAAC,WAAW,CAC3B;YACC,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CACzD,SAAS,EACT,uBAAuB,CACvB;YACD,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CACzD,SAAS,EACT,uBAAuB,CACvB;SACD,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,GAAG,yBAAyB,CAAC;IAC9C,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,sBAAsB,CAAC,aAAa,EAAE,CAAC;QACzE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,2BAA2B,CAC9B,gBAAgB,CAAC,WAAW,CAC3B;YACC,0BAA0B,EACzB,UAAU,CAAC,yBAAyB,CAAC,wBAAwB,CAAC;YAC/D,MAAM,EAAE;gBACP,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK;aACvC;SACD,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,GAAG,+BAA+B,CAAC;IACpD,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,yBAAyB;KAClC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport {\n\tAuthHeaderProcessor,\n\tinitSchema as initSchemaAuthEntityStorage,\n\ttype AuthenticationUser\n} from \"@3sixty/api-auth-entity-storage-service\";\nimport { TenantOverrideProcessor } from \"@3sixty/api-auth-service\";\nimport { RestRouteProcessorFactory } from \"@3sixty/api-models\";\nimport {\n\tContextIdProcessor,\n\tLoggingProcessor,\n\tRestRouteProcessor,\n\tStaticContextIdProcessor\n} from \"@3sixty/api-processors\";\nimport { TenantProcessor, SingleTenantProcessor } from \"@3sixty/api-tenant-processor\";\nimport { AuthorizationRouteProcessor } from \"@3sixty/authorization-service\";\nimport { ContextIdHelper, ContextIdKeys } from \"@3sixty/context\";\nimport type { IComponent } from \"@3sixty/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@3sixty/engine-models\";\nimport { EngineTypeHelper, initialiseEntityStorageConnector } from \"@3sixty/engine-types\";\n\nimport { MetricsRouteProcessor } from \"@3sixty/telemetry-processors\";\nimport { TracingRouteProcessor } from \"@3sixty/tracing-processors\";\nimport type { RestRouteProcessorConfig } from \"../models/config/restRouteProcessorConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { RestRouteProcessorType } from \"../models/types/restRouteProcessorType.js\";\n\n/**\n * Initialise the rest route processor.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseRestRouteProcessorComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: RestRouteProcessorConfig\n): EngineTypeInitialiserReturn<RestRouteProcessorConfig, typeof RestRouteProcessorFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === RestRouteProcessorType.AuthHeader) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaAuthEntityStorage();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.userEntityStorageType,\n\t\t\t\t\"AuthenticationUser\",\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\t\tContextIdKeys.Node,\n\t\t\t\t\tContextIdKeys.Tenant\n\t\t\t\t])\n\t\t\t);\n\n\t\t\treturn new AuthHeaderProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\t\t\t\ttenantAdminComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\")\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = \"auth-header-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.Logging) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew LoggingProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredSilencedType(\n\t\t\t\t\t\t\t\"logging\",\n\t\t\t\t\t\t\t\"LoggingProcessor\"\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"logging-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.ContextId) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew ContextIdProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = \"context-id-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.StaticContextId) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew StaticContextIdProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = \"static-context-id-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.RestRoute) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew RestRouteProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"rest-route-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.Tenant) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew TenantProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\ttenantAdminComponentType: engineCore.getRegisteredInstanceType(\"tenantAdminComponent\"),\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"tenant-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.SingleTenant) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew SingleTenantProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"single-tenant-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.TenantOverride) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew TenantOverrideProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\ttenantAdminComponentType: engineCore.getRegisteredInstanceType(\"tenantAdminComponent\"),\n\t\t\t\t\t\tauthorizationComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"authorizationComponent\"),\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"tenant-override-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.Metrics) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew MetricsRouteProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\ttelemetryComponentType: engineCore.getRegisteredSilencedType(\n\t\t\t\t\t\t\t\"telemetry\",\n\t\t\t\t\t\t\t\"MetricsRouteProcessor\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredSilencedType(\n\t\t\t\t\t\t\t\"logging\",\n\t\t\t\t\t\t\t\"MetricsRouteProcessor\"\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"metrics-route-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.Tracing) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew TracingRouteProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\ttracingComponentType: engineCore.getRegisteredSilencedType(\n\t\t\t\t\t\t\t\"tracing\",\n\t\t\t\t\t\t\t\"TracingRouteProcessor\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredSilencedType(\n\t\t\t\t\t\t\t\"logging\",\n\t\t\t\t\t\t\t\"TracingRouteProcessor\"\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"tracing-route-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.Authorization) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew AuthorizationRouteProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tauthorizationComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"authorizationComponent\"),\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"authorization-route-processor\";\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: RestRouteProcessorFactory\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"restRouteProcessor.js","sources":["../../../src/components/restRouteProcessor.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,mCAAmC;AACnC,uCAAuC;AACvC,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,M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,CAAC,aAAa,EAAE,CAAC;QACzE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,2BAA2B,CAC9B,gBAAgB,CAAC,WAAW,CAC3B;YACC,0BAA0B,EACzB,UAAU,CAAC,yBAAyB,CAAC,wBAAwB,CAAC;YAC/D,MAAM,EAAE;gBACP,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK;aACvC;SACD,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,GAAG,+BAA+B,CAAC;IACpD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,sBAAsB,CAAC,WAAW,EAAE,CAAC;QACvE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,oBAAoB,CACvB,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,GAAG,wBAAwB,CAAC;IAC7C,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,yBAAyB;KAClC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport { AuthenticationAccountProcessor } from \"@3sixty/api-auth-account-service\";\nimport { AuthHeaderProcessor } from \"@3sixty/api-auth-entity-storage-service\";\nimport { TenantOverrideProcessor } from \"@3sixty/api-auth-service\";\nimport { RestRouteProcessorFactory } from \"@3sixty/api-models\";\nimport {\n\tContextIdProcessor,\n\tLoggingProcessor,\n\tOriginCheckProcessor,\n\tRestRouteProcessor,\n\tStaticContextIdProcessor\n} from \"@3sixty/api-processors\";\nimport { TenantProcessor, SingleTenantProcessor } from \"@3sixty/api-tenant-processor\";\nimport { AuthorizationRouteProcessor } from \"@3sixty/authorization-service\";\nimport type { IComponent } from \"@3sixty/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@3sixty/engine-models\";\nimport { EngineTypeHelper } from \"@3sixty/engine-types\";\n\nimport { MetricsRouteProcessor } from \"@3sixty/telemetry-processors\";\nimport { TracingRouteProcessor } from \"@3sixty/tracing-processors\";\nimport { initialiseAuthenticationUserEntityStorage } from \"./authentication.js\";\nimport { initialiseAccountDataEntityStorage } from \"./authenticationAccount.js\";\nimport type { RestRouteProcessorConfig } from \"../models/config/restRouteProcessorConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { RestRouteProcessorType } from \"../models/types/restRouteProcessorType.js\";\n\n/**\n * Initialise the rest route processor.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseRestRouteProcessorComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: RestRouteProcessorConfig\n): EngineTypeInitialiserReturn<RestRouteProcessorConfig, typeof RestRouteProcessorFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === RestRouteProcessorType.AuthHeader) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitialiseAuthenticationUserEntityStorage(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.userEntityStorageType\n\t\t\t);\n\n\t\t\treturn new AuthHeaderProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\t\t\t\ttenantAdminComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\")\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = \"auth-header-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.AuthenticationAccount) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitialiseAccountDataEntityStorage(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.accountDataEntityStorageType\n\t\t\t);\n\t\t\treturn new AuthenticationAccountProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = \"authentication-account-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.Logging) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew LoggingProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredSilencedType(\n\t\t\t\t\t\t\t\"logging\",\n\t\t\t\t\t\t\t\"LoggingProcessor\"\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"logging-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.ContextId) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew ContextIdProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = \"context-id-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.StaticContextId) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew StaticContextIdProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = \"static-context-id-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.RestRoute) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew RestRouteProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"rest-route-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.Tenant) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew TenantProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\ttenantAdminComponentType: engineCore.getRegisteredInstanceType(\"tenantAdminComponent\"),\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"tenant-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.SingleTenant) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew SingleTenantProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"single-tenant-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.TenantOverride) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew TenantOverrideProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\ttenantAdminComponentType: engineCore.getRegisteredInstanceType(\"tenantAdminComponent\"),\n\t\t\t\t\t\tauthorizationComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"authorizationComponent\"),\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"tenant-override-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.Metrics) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew MetricsRouteProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\ttelemetryComponentType: engineCore.getRegisteredSilencedType(\n\t\t\t\t\t\t\t\"telemetry\",\n\t\t\t\t\t\t\t\"MetricsRouteProcessor\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredSilencedType(\n\t\t\t\t\t\t\t\"logging\",\n\t\t\t\t\t\t\t\"MetricsRouteProcessor\"\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"metrics-route-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.Tracing) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew TracingRouteProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\ttracingComponentType: engineCore.getRegisteredSilencedType(\n\t\t\t\t\t\t\t\"tracing\",\n\t\t\t\t\t\t\t\"TracingRouteProcessor\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredSilencedType(\n\t\t\t\t\t\t\t\"logging\",\n\t\t\t\t\t\t\t\"TracingRouteProcessor\"\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"tracing-route-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.Authorization) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew AuthorizationRouteProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tauthorizationComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"authorizationComponent\"),\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"authorization-route-processor\";\n\t} else if (instanceConfig.type === RestRouteProcessorType.OriginCheck) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew OriginCheckProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = \"origin-check-processor\";\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: RestRouteProcessorFactory\n\t};\n}\n"]}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// Copyright 2026 3Sixty Trade Ltd.
|
|
2
3
|
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
-
import {
|
|
4
|
+
import { AuthenticationAccountProcessor } from "@3sixty/api-auth-account-service";
|
|
5
|
+
import { AuthHeaderProcessor } from "@3sixty/api-auth-entity-storage-service";
|
|
4
6
|
import { TenantOverrideProcessor } from "@3sixty/api-auth-service";
|
|
5
7
|
import { SocketRouteProcessorFactory } from "@3sixty/api-models";
|
|
6
|
-
import { ContextIdProcessor, LoggingProcessor, SocketRouteProcessor, StaticContextIdProcessor } from "@3sixty/api-processors";
|
|
8
|
+
import { ContextIdProcessor, LoggingProcessor, OriginCheckProcessor, SocketRouteProcessor, StaticContextIdProcessor } from "@3sixty/api-processors";
|
|
7
9
|
import { SingleTenantProcessor, TenantProcessor } from "@3sixty/api-tenant-processor";
|
|
8
10
|
import { AuthorizationRouteProcessor } from "@3sixty/authorization-service";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
+
import { EngineTypeHelper } from "@3sixty/engine-types";
|
|
12
|
+
import { initialiseAuthenticationUserEntityStorage } from "./authentication.js";
|
|
13
|
+
import { initialiseAccountDataEntityStorage } from "./authenticationAccount.js";
|
|
11
14
|
import { SocketRouteProcessorType } from "../models/types/socketRouteProcessorType.js";
|
|
12
15
|
/**
|
|
13
16
|
* Initialise the socket route processor.
|
|
@@ -21,11 +24,7 @@ export function initialiseSocketRouteProcessorComponent(engineCore, context, ins
|
|
|
21
24
|
let instanceTypeName;
|
|
22
25
|
if (instanceConfig.type === SocketRouteProcessorType.AuthHeader) {
|
|
23
26
|
createComponent = (createConfig) => {
|
|
24
|
-
|
|
25
|
-
initialiseEntityStorageConnector(engineCore, context, createConfig.options?.userEntityStorageType, "AuthenticationUser", ContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [
|
|
26
|
-
ContextIdKeys.Node,
|
|
27
|
-
ContextIdKeys.Tenant
|
|
28
|
-
]));
|
|
27
|
+
initialiseAuthenticationUserEntityStorage(engineCore, context, createConfig.options?.userEntityStorageType);
|
|
29
28
|
return new AuthHeaderProcessor(EngineTypeHelper.mergeConfig({
|
|
30
29
|
vaultConnectorType: engineCore.getRegisteredInstanceType("vaultConnector"),
|
|
31
30
|
tenantAdminComponentType: engineCore.getRegisteredInstanceTypeOptional("tenantAdminComponent")
|
|
@@ -37,6 +36,13 @@ export function initialiseSocketRouteProcessorComponent(engineCore, context, ins
|
|
|
37
36
|
};
|
|
38
37
|
instanceTypeName = "auth-header-processor";
|
|
39
38
|
}
|
|
39
|
+
else if (instanceConfig.type === SocketRouteProcessorType.AuthenticationAccount) {
|
|
40
|
+
createComponent = (createConfig) => {
|
|
41
|
+
initialiseAccountDataEntityStorage(engineCore, context, createConfig.options?.accountDataEntityStorageType);
|
|
42
|
+
return new AuthenticationAccountProcessor(EngineTypeHelper.mergeConfig(createConfig.options));
|
|
43
|
+
};
|
|
44
|
+
instanceTypeName = "authentication-account-processor";
|
|
45
|
+
}
|
|
40
46
|
else if (instanceConfig.type === SocketRouteProcessorType.Logging) {
|
|
41
47
|
createComponent = (createConfig) => new LoggingProcessor(EngineTypeHelper.mergeConfig({
|
|
42
48
|
loggingComponentType: engineCore.getRegisteredSilencedType("logging", "LoggingProcessor")
|
|
@@ -95,6 +101,10 @@ export function initialiseSocketRouteProcessorComponent(engineCore, context, ins
|
|
|
95
101
|
}, createConfig.options));
|
|
96
102
|
instanceTypeName = "authorization-route-processor";
|
|
97
103
|
}
|
|
104
|
+
else if (instanceConfig.type === SocketRouteProcessorType.OriginCheck) {
|
|
105
|
+
createComponent = (createConfig) => new OriginCheckProcessor(EngineTypeHelper.mergeConfig(createConfig.options));
|
|
106
|
+
instanceTypeName = "origin-check-processor";
|
|
107
|
+
}
|
|
98
108
|
return {
|
|
99
109
|
createComponent: createComponent,
|
|
100
110
|
instanceTypeName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socketRouteProcessor.js","sources":["../../../src/components/socketRouteProcessor.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EACN,mBAAmB,EACnB,UAAU,IAAI,2BAA2B,EAEzC,MAAM,y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ACH,gBAAgB,GAAG,2BAA2B,CAAC;IAChD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,aAAa,EAAE,CAAC;QAC3E,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,2BAA2B,CAC9B,gBAAgB,CAAC,WAAW,CAC3B;YACC,0BAA0B,EACzB,UAAU,CAAC,yBAAyB,CAAC,wBAAwB,CAAC;YAC/D,MAAM,EAAE;gBACP,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK;aACvC;SACD,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,GAAG,+BAA+B,CAAC;IACpD,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,2BAA2B;KACpC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport {\n\tAuthHeaderProcessor,\n\tinitSchema as initSchemaAuthEntityStorage,\n\ttype AuthenticationUser\n} from \"@3sixty/api-auth-entity-storage-service\";\nimport { TenantOverrideProcessor } from \"@3sixty/api-auth-service\";\nimport { SocketRouteProcessorFactory } from \"@3sixty/api-models\";\nimport {\n\tContextIdProcessor,\n\tLoggingProcessor,\n\tSocketRouteProcessor,\n\tStaticContextIdProcessor\n} from \"@3sixty/api-processors\";\nimport { SingleTenantProcessor, TenantProcessor } from \"@3sixty/api-tenant-processor\";\nimport { AuthorizationRouteProcessor } from \"@3sixty/authorization-service\";\nimport { ContextIdHelper, ContextIdKeys } from \"@3sixty/context\";\nimport type { IComponent } from \"@3sixty/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@3sixty/engine-models\";\nimport { EngineTypeHelper, initialiseEntityStorageConnector } from \"@3sixty/engine-types\";\n\nimport type { SocketRouteProcessorConfig } from \"../models/config/socketRouteProcessorConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { SocketRouteProcessorType } from \"../models/types/socketRouteProcessorType.js\";\n\n/**\n * Initialise the socket route processor.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseSocketRouteProcessorComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: SocketRouteProcessorConfig\n): EngineTypeInitialiserReturn<SocketRouteProcessorConfig, typeof SocketRouteProcessorFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === SocketRouteProcessorType.AuthHeader) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaAuthEntityStorage();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.userEntityStorageType,\n\t\t\t\t\"AuthenticationUser\",\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\t\tContextIdKeys.Node,\n\t\t\t\t\tContextIdKeys.Tenant\n\t\t\t\t])\n\t\t\t);\n\n\t\t\treturn new AuthHeaderProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\t\t\t\ttenantAdminComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\")\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = \"auth-header-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.Logging) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew LoggingProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredSilencedType(\n\t\t\t\t\t\t\t\"logging\",\n\t\t\t\t\t\t\t\"LoggingProcessor\"\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"logging-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.ContextId) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew ContextIdProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = \"context-id-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.StaticContextId) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew StaticContextIdProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = \"static-context-id-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.SocketRoute) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew SocketRouteProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"socket-route-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.Tenant) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew TenantProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\ttenantAdminComponentType: engineCore.getRegisteredInstanceType(\"tenantAdminComponent\"),\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"tenant-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.SingleTenant) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew SingleTenantProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"single-tenant-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.TenantOverride) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew TenantOverrideProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\ttenantAdminComponentType: engineCore.getRegisteredInstanceType(\"tenantAdminComponent\"),\n\t\t\t\t\t\tauthorizationComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"authorizationComponent\"),\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"tenant-override-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.Authorization) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew AuthorizationRouteProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tauthorizationComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"authorizationComponent\"),\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"authorization-route-processor\";\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: SocketRouteProcessorFactory\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"socketRouteProcessor.js","sources":["../../../src/components/socketRouteProcessor.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,mCAAmC;AACnC,uCAAuC;AACvC,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EACN,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACtF,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAO5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,yCAAyC,EAAE,MAAM,qBAAqB,CAAC;AAChF,OA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,UAAU,CAAC,yBAAyB,CAAC,wBAAwB,CAAC;YAC/D,MAAM,EAAE;gBACP,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK;aACvC;SACD,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,GAAG,+BAA+B,CAAC;IACpD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,WAAW,EAAE,CAAC;QACzE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,oBAAoB,CACvB,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,GAAG,wBAAwB,CAAC;IAC7C,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,2BAA2B;KACpC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport { AuthenticationAccountProcessor } from \"@3sixty/api-auth-account-service\";\nimport { AuthHeaderProcessor } from \"@3sixty/api-auth-entity-storage-service\";\nimport { TenantOverrideProcessor } from \"@3sixty/api-auth-service\";\nimport { SocketRouteProcessorFactory } from \"@3sixty/api-models\";\nimport {\n\tContextIdProcessor,\n\tLoggingProcessor,\n\tOriginCheckProcessor,\n\tSocketRouteProcessor,\n\tStaticContextIdProcessor\n} from \"@3sixty/api-processors\";\nimport { SingleTenantProcessor, TenantProcessor } from \"@3sixty/api-tenant-processor\";\nimport { AuthorizationRouteProcessor } from \"@3sixty/authorization-service\";\nimport type { IComponent } from \"@3sixty/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@3sixty/engine-models\";\nimport { EngineTypeHelper } from \"@3sixty/engine-types\";\n\nimport { initialiseAuthenticationUserEntityStorage } from \"./authentication.js\";\nimport { initialiseAccountDataEntityStorage } from \"./authenticationAccount.js\";\nimport type { SocketRouteProcessorConfig } from \"../models/config/socketRouteProcessorConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { SocketRouteProcessorType } from \"../models/types/socketRouteProcessorType.js\";\n\n/**\n * Initialise the socket route processor.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseSocketRouteProcessorComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: SocketRouteProcessorConfig\n): EngineTypeInitialiserReturn<SocketRouteProcessorConfig, typeof SocketRouteProcessorFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === SocketRouteProcessorType.AuthHeader) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitialiseAuthenticationUserEntityStorage(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.userEntityStorageType\n\t\t\t);\n\n\t\t\treturn new AuthHeaderProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\t\t\t\ttenantAdminComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\")\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = \"auth-header-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.AuthenticationAccount) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitialiseAccountDataEntityStorage(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.accountDataEntityStorageType\n\t\t\t);\n\t\t\treturn new AuthenticationAccountProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = \"authentication-account-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.Logging) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew LoggingProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredSilencedType(\n\t\t\t\t\t\t\t\"logging\",\n\t\t\t\t\t\t\t\"LoggingProcessor\"\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"logging-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.ContextId) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew ContextIdProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = \"context-id-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.StaticContextId) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew StaticContextIdProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = \"static-context-id-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.SocketRoute) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew SocketRouteProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"socket-route-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.Tenant) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew TenantProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\ttenantAdminComponentType: engineCore.getRegisteredInstanceType(\"tenantAdminComponent\"),\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"tenant-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.SingleTenant) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew SingleTenantProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"single-tenant-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.TenantOverride) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew TenantOverrideProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\ttenantAdminComponentType: engineCore.getRegisteredInstanceType(\"tenantAdminComponent\"),\n\t\t\t\t\t\tauthorizationComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"authorizationComponent\"),\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"tenant-override-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.Authorization) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew AuthorizationRouteProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tauthorizationComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"authorizationComponent\"),\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tincludeErrorStack: context.config.debug\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = \"authorization-route-processor\";\n\t} else if (instanceConfig.type === SocketRouteProcessorType.OriginCheck) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew OriginCheckProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = \"origin-check-processor\";\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: SocketRouteProcessorFactory\n\t};\n}\n"]}
|
package/dist/es/index.js
CHANGED
|
@@ -2,28 +2,46 @@
|
|
|
2
2
|
// Copyright 2026 3Sixty Trade Ltd.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0.
|
|
4
4
|
export * from "./components/authentication.js";
|
|
5
|
+
export * from "./components/authenticationAccount.js";
|
|
6
|
+
export * from "./components/authenticationAccountAdmin.js";
|
|
5
7
|
export * from "./components/authenticationAdmin.js";
|
|
6
8
|
export * from "./components/authenticationAudit.js";
|
|
9
|
+
export * from "./components/authenticationProvider.js";
|
|
7
10
|
export * from "./components/authenticationRate.js";
|
|
8
11
|
export * from "./components/information.js";
|
|
9
12
|
export * from "./components/mimeTypeProcessor.js";
|
|
13
|
+
export * from "./components/oauth.js";
|
|
14
|
+
export * from "./components/organization.js";
|
|
15
|
+
export * from "./components/organizationRequestAdmin.js";
|
|
10
16
|
export * from "./components/restRouteProcessor.js";
|
|
11
17
|
export * from "./components/socketRouteProcessor.js";
|
|
18
|
+
export * from "./models/config/authenticationAccountAdminComponentConfig.js";
|
|
19
|
+
export * from "./models/config/authenticationAccountComponentConfig.js";
|
|
12
20
|
export * from "./models/config/authenticationAdminComponentConfig.js";
|
|
13
21
|
export * from "./models/config/authenticationAuditComponentConfig.js";
|
|
14
22
|
export * from "./models/config/authenticationComponentConfig.js";
|
|
23
|
+
export * from "./models/config/authenticationProviderConfig.js";
|
|
15
24
|
export * from "./models/config/authenticationRateComponentConfig.js";
|
|
16
25
|
export * from "./models/config/informationComponentConfig.js";
|
|
17
26
|
export * from "./models/config/mimeTypeProcessorConfig.js";
|
|
27
|
+
export * from "./models/config/oauthComponentConfig.js";
|
|
28
|
+
export * from "./models/config/organizationComponentConfig.js";
|
|
29
|
+
export * from "./models/config/organizationRequestAdminComponentConfig.js";
|
|
18
30
|
export * from "./models/config/restRouteProcessorConfig.js";
|
|
19
31
|
export * from "./models/config/socketRouteProcessorConfig.js";
|
|
20
32
|
export * from "./models/IEngineServerConfig.js";
|
|
33
|
+
export * from "./models/types/authenticationAccountAdminComponentType.js";
|
|
34
|
+
export * from "./models/types/authenticationAccountComponentType.js";
|
|
21
35
|
export * from "./models/types/authenticationAdminComponentType.js";
|
|
22
36
|
export * from "./models/types/authenticationAuditComponentType.js";
|
|
23
37
|
export * from "./models/types/authenticationComponentType.js";
|
|
38
|
+
export * from "./models/types/authenticationProviderType.js";
|
|
24
39
|
export * from "./models/types/authenticationRateComponentType.js";
|
|
25
40
|
export * from "./models/types/informationComponentType.js";
|
|
26
41
|
export * from "./models/types/mimeTypeProcessorType.js";
|
|
42
|
+
export * from "./models/types/oauthComponentType.js";
|
|
43
|
+
export * from "./models/types/organizationComponentType.js";
|
|
44
|
+
export * from "./models/types/organizationRequestAdminComponentType.js";
|
|
27
45
|
export * from "./models/types/restRouteProcessorType.js";
|
|
28
46
|
export * from "./models/types/socketRouteProcessorType.js";
|
|
29
47
|
export * from "./models/types/webServerType.js";
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,mCAAmC;AACnC,uCAAuC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,kDAAkD,CAAC;AACjE,cAAc,sDAAsD,CAAC;AACrE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iCAAiC,CAAC;AAChD,cAAc,oDAAoD,CAAC;AACnE,cAAc,oDAAoD,CAAC;AACnE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mDAAmD,CAAC;AAClE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,iCAAiC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./components/authentication.js\";\nexport * from \"./components/authenticationAdmin.js\";\nexport * from \"./components/authenticationAudit.js\";\nexport * from \"./components/authenticationRate.js\";\nexport * from \"./components/information.js\";\nexport * from \"./components/mimeTypeProcessor.js\";\nexport * from \"./components/restRouteProcessor.js\";\nexport * from \"./components/socketRouteProcessor.js\";\nexport * from \"./models/config/authenticationAdminComponentConfig.js\";\nexport * from \"./models/config/authenticationAuditComponentConfig.js\";\nexport * from \"./models/config/authenticationComponentConfig.js\";\nexport * from \"./models/config/authenticationRateComponentConfig.js\";\nexport * from \"./models/config/informationComponentConfig.js\";\nexport * from \"./models/config/mimeTypeProcessorConfig.js\";\nexport * from \"./models/config/restRouteProcessorConfig.js\";\nexport * from \"./models/config/socketRouteProcessorConfig.js\";\nexport * from \"./models/IEngineServerConfig.js\";\nexport * from \"./models/types/authenticationAdminComponentType.js\";\nexport * from \"./models/types/authenticationAuditComponentType.js\";\nexport * from \"./models/types/authenticationComponentType.js\";\nexport * from \"./models/types/authenticationRateComponentType.js\";\nexport * from \"./models/types/informationComponentType.js\";\nexport * from \"./models/types/mimeTypeProcessorType.js\";\nexport * from \"./models/types/restRouteProcessorType.js\";\nexport * from \"./models/types/socketRouteProcessorType.js\";\nexport * from \"./models/types/webServerType.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,mCAAmC;AACnC,uCAAuC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8DAA8D,CAAC;AAC7E,cAAc,yDAAyD,CAAC;AACxE,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,kDAAkD,CAAC;AACjE,cAAc,iDAAiD,CAAC;AAChE,cAAc,sDAAsD,CAAC;AACrE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,yCAAyC,CAAC;AACxD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,4DAA4D,CAAC;AAC3E,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iCAAiC,CAAC;AAChD,cAAc,2DAA2D,CAAC;AAC1E,cAAc,sDAAsD,CAAC;AACrE,cAAc,oDAAoD,CAAC;AACnE,cAAc,oDAAoD,CAAC;AACnE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAClE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,yDAAyD,CAAC;AACxE,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,iCAAiC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./components/authentication.js\";\nexport * from \"./components/authenticationAccount.js\";\nexport * from \"./components/authenticationAccountAdmin.js\";\nexport * from \"./components/authenticationAdmin.js\";\nexport * from \"./components/authenticationAudit.js\";\nexport * from \"./components/authenticationProvider.js\";\nexport * from \"./components/authenticationRate.js\";\nexport * from \"./components/information.js\";\nexport * from \"./components/mimeTypeProcessor.js\";\nexport * from \"./components/oauth.js\";\nexport * from \"./components/organization.js\";\nexport * from \"./components/organizationRequestAdmin.js\";\nexport * from \"./components/restRouteProcessor.js\";\nexport * from \"./components/socketRouteProcessor.js\";\nexport * from \"./models/config/authenticationAccountAdminComponentConfig.js\";\nexport * from \"./models/config/authenticationAccountComponentConfig.js\";\nexport * from \"./models/config/authenticationAdminComponentConfig.js\";\nexport * from \"./models/config/authenticationAuditComponentConfig.js\";\nexport * from \"./models/config/authenticationComponentConfig.js\";\nexport * from \"./models/config/authenticationProviderConfig.js\";\nexport * from \"./models/config/authenticationRateComponentConfig.js\";\nexport * from \"./models/config/informationComponentConfig.js\";\nexport * from \"./models/config/mimeTypeProcessorConfig.js\";\nexport * from \"./models/config/oauthComponentConfig.js\";\nexport * from \"./models/config/organizationComponentConfig.js\";\nexport * from \"./models/config/organizationRequestAdminComponentConfig.js\";\nexport * from \"./models/config/restRouteProcessorConfig.js\";\nexport * from \"./models/config/socketRouteProcessorConfig.js\";\nexport * from \"./models/IEngineServerConfig.js\";\nexport * from \"./models/types/authenticationAccountAdminComponentType.js\";\nexport * from \"./models/types/authenticationAccountComponentType.js\";\nexport * from \"./models/types/authenticationAdminComponentType.js\";\nexport * from \"./models/types/authenticationAuditComponentType.js\";\nexport * from \"./models/types/authenticationComponentType.js\";\nexport * from \"./models/types/authenticationProviderType.js\";\nexport * from \"./models/types/authenticationRateComponentType.js\";\nexport * from \"./models/types/informationComponentType.js\";\nexport * from \"./models/types/mimeTypeProcessorType.js\";\nexport * from \"./models/types/oauthComponentType.js\";\nexport * from \"./models/types/organizationComponentType.js\";\nexport * from \"./models/types/organizationRequestAdminComponentType.js\";\nexport * from \"./models/types/restRouteProcessorType.js\";\nexport * from \"./models/types/socketRouteProcessorType.js\";\nexport * from \"./models/types/webServerType.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IEngineServerConfig.js","sources":["../../../src/models/IEngineServerConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IWebServerOptions } from \"@3sixty/api-models\";\nimport type { IEngineCoreTypeConfig } from \"@3sixty/engine-models\";\nimport type { IEngineConfig } from \"@3sixty/engine-types\";\nimport type { AuthenticationAdminComponentConfig } from \"./config/authenticationAdminComponentConfig.js\";\nimport type { AuthenticationAuditComponentConfig } from \"./config/authenticationAuditComponentConfig.js\";\nimport type { AuthenticationComponentConfig } from \"./config/authenticationComponentConfig.js\";\nimport type { AuthenticationRateComponentConfig } from \"./config/authenticationRateComponentConfig.js\";\nimport type { InformationComponentConfig } from \"./config/informationComponentConfig.js\";\nimport type { MimeTypeProcessorConfig } from \"./config/mimeTypeProcessorConfig.js\";\nimport type { RestRouteProcessorConfig } from \"./config/restRouteProcessorConfig.js\";\nimport type { SocketRouteProcessorConfig } from \"./config/socketRouteProcessorConfig.js\";\nimport type { WebServerType } from \"./types/webServerType.js\";\n\n/**\n * Extended engine server config with known types.\n */\nexport interface IEngineServerConfig extends IEngineConfig {\n\t/**\n\t * The type of web server to use.\n\t * @default fastify\n\t */\n\twebServerType?: WebServerType;\n\n\t/**\n\t * Configuration for the web server.\n\t */\n\tweb?: IWebServerOptions;\n\n\t/**\n\t * The types to initialise in the engine.\n\t */\n\ttypes: IEngineConfig[\"types\"] & {\n\t\t[type: string]: IEngineCoreTypeConfig[] | undefined;\n\n\t\t/**\n\t\t * Information component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tinformationComponent?: IEngineCoreTypeConfig<InformationComponentConfig>[];\n\n\t\t/**\n\t\t * REST route processors options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trestRouteProcessor?: IEngineCoreTypeConfig<RestRouteProcessorConfig>[];\n\n\t\t/**\n\t\t * Socket route processors options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tsocketRouteProcessor?: IEngineCoreTypeConfig<SocketRouteProcessorConfig>[];\n\n\t\t/**\n\t\t * Mime type processors options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tmimeTypeProcessor?: IEngineCoreTypeConfig<MimeTypeProcessorConfig>[];\n\n\t\t/**\n\t\t * Authentication audit component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tauthenticationAuditComponent?: IEngineCoreTypeConfig<AuthenticationAuditComponentConfig>[];\n\n\t\t/**\n\t\t * Authentication rate component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tauthenticationRateComponent?: IEngineCoreTypeConfig<AuthenticationRateComponentConfig>[];\n\n\t\t/**\n\t\t * Authentication component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tauthenticationComponent?: IEngineCoreTypeConfig<AuthenticationComponentConfig>[];\n\n\t\t/**\n\t\t * Authentication admin component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tauthenticationAdminComponent?: IEngineCoreTypeConfig<AuthenticationAdminComponentConfig>[];\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IEngineServerConfig.js","sources":["../../../src/models/IEngineServerConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IWebServerOptions } from \"@3sixty/api-models\";\nimport type { IEngineCoreTypeConfig } from \"@3sixty/engine-models\";\nimport type { IEngineConfig } from \"@3sixty/engine-types\";\nimport type { AuthenticationAccountAdminComponentConfig } from \"./config/authenticationAccountAdminComponentConfig.js\";\nimport type { AuthenticationAccountComponentConfig } from \"./config/authenticationAccountComponentConfig.js\";\nimport type { AuthenticationAdminComponentConfig } from \"./config/authenticationAdminComponentConfig.js\";\nimport type { AuthenticationAuditComponentConfig } from \"./config/authenticationAuditComponentConfig.js\";\nimport type { AuthenticationComponentConfig } from \"./config/authenticationComponentConfig.js\";\nimport type { AuthenticationProviderConfig } from \"./config/authenticationProviderConfig.js\";\nimport type { AuthenticationRateComponentConfig } from \"./config/authenticationRateComponentConfig.js\";\nimport type { InformationComponentConfig } from \"./config/informationComponentConfig.js\";\nimport type { MimeTypeProcessorConfig } from \"./config/mimeTypeProcessorConfig.js\";\nimport type { OAuthComponentConfig } from \"./config/oauthComponentConfig.js\";\nimport type { OrganizationComponentConfig } from \"./config/organizationComponentConfig.js\";\nimport type { OrganizationRequestAdminComponentConfig } from \"./config/organizationRequestAdminComponentConfig.js\";\nimport type { RestRouteProcessorConfig } from \"./config/restRouteProcessorConfig.js\";\nimport type { SocketRouteProcessorConfig } from \"./config/socketRouteProcessorConfig.js\";\nimport type { WebServerType } from \"./types/webServerType.js\";\n\n/**\n * Extended engine server config with known types.\n */\nexport interface IEngineServerConfig extends IEngineConfig {\n\t/**\n\t * The type of web server to use.\n\t * @default fastify\n\t */\n\twebServerType?: WebServerType;\n\n\t/**\n\t * Configuration for the web server.\n\t */\n\tweb?: IWebServerOptions;\n\n\t/**\n\t * The types to initialise in the engine.\n\t */\n\ttypes: IEngineConfig[\"types\"] & {\n\t\t[type: string]: IEngineCoreTypeConfig[] | undefined;\n\n\t\t/**\n\t\t * Information component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tinformationComponent?: IEngineCoreTypeConfig<InformationComponentConfig>[];\n\n\t\t/**\n\t\t * REST route processors options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trestRouteProcessor?: IEngineCoreTypeConfig<RestRouteProcessorConfig>[];\n\n\t\t/**\n\t\t * Socket route processors options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tsocketRouteProcessor?: IEngineCoreTypeConfig<SocketRouteProcessorConfig>[];\n\n\t\t/**\n\t\t * Mime type processors options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tmimeTypeProcessor?: IEngineCoreTypeConfig<MimeTypeProcessorConfig>[];\n\n\t\t/**\n\t\t * Authentication audit component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tauthenticationAuditComponent?: IEngineCoreTypeConfig<AuthenticationAuditComponentConfig>[];\n\n\t\t/**\n\t\t * Authentication rate component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tauthenticationRateComponent?: IEngineCoreTypeConfig<AuthenticationRateComponentConfig>[];\n\n\t\t/**\n\t\t * Authentication component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tauthenticationComponent?: IEngineCoreTypeConfig<AuthenticationComponentConfig>[];\n\n\t\t/**\n\t\t * Authentication admin component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tauthenticationAdminComponent?: IEngineCoreTypeConfig<AuthenticationAdminComponentConfig>[];\n\n\t\t/**\n\t\t * Authentication providers, each registered under its authentication provider id.\n\t\t */\n\t\tauthenticationProvider?: IEngineCoreTypeConfig<AuthenticationProviderConfig>[];\n\n\t\t/**\n\t\t * Authentication account component options, for the data stored against the signed in account.\n\t\t */\n\t\tauthenticationAccountComponent?: IEngineCoreTypeConfig<AuthenticationAccountComponentConfig>[];\n\n\t\t/**\n\t\t * Authentication account admin component options, for the data stored against any account.\n\t\t */\n\t\tauthenticationAccountAdminComponent?: IEngineCoreTypeConfig<AuthenticationAccountAdminComponentConfig>[];\n\n\t\t/**\n\t\t * Organization request admin component options, for reviewing the requests to join an organization.\n\t\t */\n\t\torganizationRequestAdminComponent?: IEngineCoreTypeConfig<OrganizationRequestAdminComponentConfig>[];\n\n\t\t/**\n\t\t * Organization component options, for the organizations registered on the node and their profiles.\n\t\t */\n\t\torganizationComponent?: IEngineCoreTypeConfig<OrganizationComponentConfig>[];\n\n\t\t/**\n\t\t * OAuth sign in component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\toauthComponent?: IEngineCoreTypeConfig<OAuthComponentConfig>[];\n\t};\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticationAccountAdminComponentConfig.js","sources":["../../../../src/models/config/authenticationAccountAdminComponentConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEntityStorageAuthenticationAccountAdminServiceConstructorOptions } from \"@3sixty/api-auth-account-service\";\nimport type { IBaseRestClientConfig } from \"@3sixty/api-models\";\nimport type { AuthenticationAccountAdminComponentType } from \"../types/authenticationAccountAdminComponentType.js\";\n\n/**\n * Authentication account admin component config types.\n */\nexport type AuthenticationAccountAdminComponentConfig =\n\t| {\n\t\t\ttype: typeof AuthenticationAccountAdminComponentType.EntityStorage;\n\t\t\toptions?: IEntityStorageAuthenticationAccountAdminServiceConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof AuthenticationAccountAdminComponentType.RestClient;\n\t\t\toptions: IBaseRestClientConfig;\n\t };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticationAccountComponentConfig.js","sources":["../../../../src/models/config/authenticationAccountComponentConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEntityStorageAuthenticationAccountServiceConstructorOptions } from \"@3sixty/api-auth-account-service\";\nimport type { IBaseRestClientConfig } from \"@3sixty/api-models\";\nimport type { AuthenticationAccountComponentType } from \"../types/authenticationAccountComponentType.js\";\n\n/**\n * Authentication account component config types.\n */\nexport type AuthenticationAccountComponentConfig =\n\t| {\n\t\t\ttype: typeof AuthenticationAccountComponentType.EntityStorage;\n\t\t\toptions?: IEntityStorageAuthenticationAccountServiceConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof AuthenticationAccountComponentType.RestClient;\n\t\t\toptions: IBaseRestClientConfig;\n\t };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticationProviderConfig.js","sources":["../../../../src/models/config/authenticationProviderConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEntityStorageAuthenticationProviderConnectorConstructorOptions } from \"@3sixty/api-auth-connector-entity-storage\";\nimport type { IGoogleOAuthProviderConnectorConstructorOptions } from \"@3sixty/api-auth-oauth-connector-google\";\nimport type { IMicrosoftOAuthProviderConnectorConstructorOptions } from \"@3sixty/api-auth-oauth-connector-microsoft\";\nimport type { AuthenticationProviderType } from \"../types/authenticationProviderType.js\";\n\n/**\n * Authentication provider config types.\n */\nexport type AuthenticationProviderConfig =\n\t| {\n\t\t\ttype: typeof AuthenticationProviderType.EntityStorage;\n\t\t\toptions?: IEntityStorageAuthenticationProviderConnectorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof AuthenticationProviderType.Google;\n\t\t\toptions: IGoogleOAuthProviderConnectorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof AuthenticationProviderType.Microsoft;\n\t\t\toptions: IMicrosoftOAuthProviderConnectorConstructorOptions;\n\t };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauthComponentConfig.js","sources":["../../../../src/models/config/oauthComponentConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOAuthServiceConstructorOptions } from \"@3sixty/api-auth-oauth-service\";\nimport type { OAuthComponentType } from \"../types/oauthComponentType.js\";\n\n/**\n * OAuth component config types.\n */\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type OAuthComponentConfig = {\n\ttype: typeof OAuthComponentType.Service;\n\toptions: IOAuthServiceConstructorOptions;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizationComponentConfig.js","sources":["../../../../src/models/config/organizationComponentConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEntityStorageOrganizationServiceConstructorOptions } from \"@3sixty/api-auth-account-service\";\nimport type { IBaseRestClientConfig } from \"@3sixty/api-models\";\nimport type { OrganizationComponentType } from \"../types/organizationComponentType.js\";\n\n/**\n * Organization component config types.\n */\nexport type OrganizationComponentConfig =\n\t| {\n\t\t\ttype: typeof OrganizationComponentType.EntityStorage;\n\t\t\toptions?: IEntityStorageOrganizationServiceConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof OrganizationComponentType.RestClient;\n\t\t\toptions: IBaseRestClientConfig;\n\t };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizationRequestAdminComponentConfig.js","sources":["../../../../src/models/config/organizationRequestAdminComponentConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEntityStorageOrganizationRequestAdminServiceConstructorOptions } from \"@3sixty/api-auth-account-service\";\nimport type { IBaseRestClientConfig } from \"@3sixty/api-models\";\nimport type { OrganizationRequestAdminComponentType } from \"../types/organizationRequestAdminComponentType.js\";\n\n/**\n * Organization request admin component config types.\n */\nexport type OrganizationRequestAdminComponentConfig =\n\t| {\n\t\t\ttype: typeof OrganizationRequestAdminComponentType.EntityStorage;\n\t\t\toptions?: IEntityStorageOrganizationRequestAdminServiceConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof OrganizationRequestAdminComponentType.RestClient;\n\t\t\toptions: IBaseRestClientConfig;\n\t };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restRouteProcessorConfig.js","sources":["../../../../src/models/config/restRouteProcessorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthHeaderProcessorConstructorOptions } from \"@3sixty/api-auth-entity-storage-service\";\nimport type { ITenantOverrideProcessorConstructorOptions } from \"@3sixty/api-auth-service\";\nimport type {\n\tIContextIdProcessorConstructorOptions,\n\tILoggingProcessorConstructorOptions,\n\tIRestRouteProcessorConstructorOptions,\n\tIStaticContextIdProcessorConstructorOptions\n} from \"@3sixty/api-processors\";\nimport type {\n\tISingleTenantProcessorConstructorOptions,\n\tITenantProcessorConstructorOptions\n} from \"@3sixty/api-tenant-processor\";\nimport type { IAuthorizationRouteProcessorConstructorOptions } from \"@3sixty/authorization-service\";\nimport type { IMetricsRouteProcessorConstructorOptions } from \"@3sixty/telemetry-processors\";\nimport type { ITracingRouteProcessorConstructorOptions } from \"@3sixty/tracing-processors\";\nimport type { RestRouteProcessorType } from \"../types/restRouteProcessorType.js\";\n\n/**\n * REST route processor config types.\n */\nexport type RestRouteProcessorConfig =\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.AuthHeader;\n\t\t\toptions?: IAuthHeaderProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.Logging;\n\t\t\toptions?: ILoggingProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.ContextId;\n\t\t\toptions: IContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.StaticContextId;\n\t\t\toptions: IStaticContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.Tenant;\n\t\t\toptions?: ITenantProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.SingleTenant;\n\t\t\toptions?: ISingleTenantProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.TenantOverride;\n\t\t\toptions?: ITenantOverrideProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.Metrics;\n\t\t\toptions?: IMetricsRouteProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.RestRoute;\n\t\t\toptions?: IRestRouteProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.Tracing;\n\t\t\toptions?: ITracingRouteProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.Authorization;\n\t\t\toptions?: IAuthorizationRouteProcessorConstructorOptions;\n\t };\n"]}
|
|
1
|
+
{"version":3,"file":"restRouteProcessorConfig.js","sources":["../../../../src/models/config/restRouteProcessorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthenticationAccountProcessorConstructorOptions } from \"@3sixty/api-auth-account-service\";\nimport type { IAuthHeaderProcessorConstructorOptions } from \"@3sixty/api-auth-entity-storage-service\";\nimport type { ITenantOverrideProcessorConstructorOptions } from \"@3sixty/api-auth-service\";\nimport type {\n\tIContextIdProcessorConstructorOptions,\n\tILoggingProcessorConstructorOptions,\n\tIOriginCheckProcessorConstructorOptions,\n\tIRestRouteProcessorConstructorOptions,\n\tIStaticContextIdProcessorConstructorOptions\n} from \"@3sixty/api-processors\";\nimport type {\n\tISingleTenantProcessorConstructorOptions,\n\tITenantProcessorConstructorOptions\n} from \"@3sixty/api-tenant-processor\";\nimport type { IAuthorizationRouteProcessorConstructorOptions } from \"@3sixty/authorization-service\";\nimport type { IMetricsRouteProcessorConstructorOptions } from \"@3sixty/telemetry-processors\";\nimport type { ITracingRouteProcessorConstructorOptions } from \"@3sixty/tracing-processors\";\nimport type { RestRouteProcessorType } from \"../types/restRouteProcessorType.js\";\n\n/**\n * REST route processor config types.\n */\nexport type RestRouteProcessorConfig =\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.AuthHeader;\n\t\t\toptions?: IAuthHeaderProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.AuthenticationAccount;\n\t\t\toptions?: IAuthenticationAccountProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.Logging;\n\t\t\toptions?: ILoggingProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.ContextId;\n\t\t\toptions: IContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.StaticContextId;\n\t\t\toptions: IStaticContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.Tenant;\n\t\t\toptions?: ITenantProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.SingleTenant;\n\t\t\toptions?: ISingleTenantProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.TenantOverride;\n\t\t\toptions?: ITenantOverrideProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.Metrics;\n\t\t\toptions?: IMetricsRouteProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.RestRoute;\n\t\t\toptions?: IRestRouteProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.Tracing;\n\t\t\toptions?: ITracingRouteProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.Authorization;\n\t\t\toptions?: IAuthorizationRouteProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.OriginCheck;\n\t\t\toptions?: IOriginCheckProcessorConstructorOptions;\n\t };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socketRouteProcessorConfig.js","sources":["../../../../src/models/config/socketRouteProcessorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthHeaderProcessorConstructorOptions } from \"@3sixty/api-auth-entity-storage-service\";\nimport type { ITenantOverrideProcessorConstructorOptions } from \"@3sixty/api-auth-service\";\nimport type {\n\tIContextIdProcessorConstructorOptions,\n\tILoggingProcessorConstructorOptions,\n\tISocketRouteProcessorConstructorOptions,\n\tIStaticContextIdProcessorConstructorOptions\n} from \"@3sixty/api-processors\";\nimport type {\n\tISingleTenantProcessorConstructorOptions,\n\tITenantProcessorConstructorOptions\n} from \"@3sixty/api-tenant-processor\";\nimport type { IAuthorizationRouteProcessorConstructorOptions } from \"@3sixty/authorization-service\";\nimport type { SocketRouteProcessorType } from \"../types/socketRouteProcessorType.js\";\n\n/**\n * Socket route processor config types.\n */\nexport type SocketRouteProcessorConfig =\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.AuthHeader;\n\t\t\toptions?: IAuthHeaderProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.Logging;\n\t\t\toptions?: ILoggingProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.ContextId;\n\t\t\toptions: IContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.StaticContextId;\n\t\t\toptions: IStaticContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.Tenant;\n\t\t\toptions?: ITenantProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.SingleTenant;\n\t\t\toptions?: ISingleTenantProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.TenantOverride;\n\t\t\toptions?: ITenantOverrideProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.SocketRoute;\n\t\t\toptions?: ISocketRouteProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.Authorization;\n\t\t\toptions?: IAuthorizationRouteProcessorConstructorOptions;\n\t };\n"]}
|
|
1
|
+
{"version":3,"file":"socketRouteProcessorConfig.js","sources":["../../../../src/models/config/socketRouteProcessorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthenticationAccountProcessorConstructorOptions } from \"@3sixty/api-auth-account-service\";\nimport type { IAuthHeaderProcessorConstructorOptions } from \"@3sixty/api-auth-entity-storage-service\";\nimport type { ITenantOverrideProcessorConstructorOptions } from \"@3sixty/api-auth-service\";\nimport type {\n\tIContextIdProcessorConstructorOptions,\n\tILoggingProcessorConstructorOptions,\n\tIOriginCheckProcessorConstructorOptions,\n\tISocketRouteProcessorConstructorOptions,\n\tIStaticContextIdProcessorConstructorOptions\n} from \"@3sixty/api-processors\";\nimport type {\n\tISingleTenantProcessorConstructorOptions,\n\tITenantProcessorConstructorOptions\n} from \"@3sixty/api-tenant-processor\";\nimport type { IAuthorizationRouteProcessorConstructorOptions } from \"@3sixty/authorization-service\";\nimport type { SocketRouteProcessorType } from \"../types/socketRouteProcessorType.js\";\n\n/**\n * Socket route processor config types.\n */\nexport type SocketRouteProcessorConfig =\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.AuthHeader;\n\t\t\toptions?: IAuthHeaderProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.AuthenticationAccount;\n\t\t\toptions?: IAuthenticationAccountProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.Logging;\n\t\t\toptions?: ILoggingProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.ContextId;\n\t\t\toptions: IContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.StaticContextId;\n\t\t\toptions: IStaticContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.Tenant;\n\t\t\toptions?: ITenantProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.SingleTenant;\n\t\t\toptions?: ISingleTenantProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.TenantOverride;\n\t\t\toptions?: ITenantOverrideProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.SocketRoute;\n\t\t\toptions?: ISocketRouteProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.Authorization;\n\t\t\toptions?: IAuthorizationRouteProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.OriginCheck;\n\t\t\toptions?: IOriginCheckProcessorConstructorOptions;\n\t };\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright 2026 3Sixty Trade Ltd.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* Authentication account admin component types.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const AuthenticationAccountAdminComponentType = {
|
|
8
|
+
/**
|
|
9
|
+
* Entity storage.
|
|
10
|
+
*/
|
|
11
|
+
EntityStorage: "entity-storage",
|
|
12
|
+
/**
|
|
13
|
+
* REST client.
|
|
14
|
+
*/
|
|
15
|
+
RestClient: "rest-client"
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=authenticationAccountAdminComponentType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticationAccountAdminComponentType.js","sources":["../../../../src/models/types/authenticationAccountAdminComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,uCAAuC,GAAG;IACtD;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,UAAU,EAAE,aAAa;CAChB,CAAC","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Authentication account admin component types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const AuthenticationAccountAdminComponentType = {\n\t/**\n\t * Entity storage.\n\t */\n\tEntityStorage: \"entity-storage\",\n\n\t/**\n\t * REST client.\n\t */\n\tRestClient: \"rest-client\"\n} as const;\n\n/**\n * Authentication account admin component types.\n */\nexport type AuthenticationAccountAdminComponentType =\n\t(typeof AuthenticationAccountAdminComponentType)[keyof typeof AuthenticationAccountAdminComponentType];\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright 2026 3Sixty Trade Ltd.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* Authentication account component types.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const AuthenticationAccountComponentType = {
|
|
8
|
+
/**
|
|
9
|
+
* Entity storage.
|
|
10
|
+
*/
|
|
11
|
+
EntityStorage: "entity-storage",
|
|
12
|
+
/**
|
|
13
|
+
* REST client.
|
|
14
|
+
*/
|
|
15
|
+
RestClient: "rest-client"
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=authenticationAccountComponentType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticationAccountComponentType.js","sources":["../../../../src/models/types/authenticationAccountComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,kCAAkC,GAAG;IACjD;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,UAAU,EAAE,aAAa;CAChB,CAAC","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Authentication account component types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const AuthenticationAccountComponentType = {\n\t/**\n\t * Entity storage.\n\t */\n\tEntityStorage: \"entity-storage\",\n\n\t/**\n\t * REST client.\n\t */\n\tRestClient: \"rest-client\"\n} as const;\n\n/**\n * Authentication account component types.\n */\nexport type AuthenticationAccountComponentType =\n\t(typeof AuthenticationAccountComponentType)[keyof typeof AuthenticationAccountComponentType];\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Copyright 2026 3Sixty Trade Ltd.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* Authentication provider types.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const AuthenticationProviderType = {
|
|
8
|
+
/**
|
|
9
|
+
* Passwords for accounts held in entity storage.
|
|
10
|
+
*/
|
|
11
|
+
EntityStorage: "entity-storage",
|
|
12
|
+
/**
|
|
13
|
+
* Google.
|
|
14
|
+
*/
|
|
15
|
+
Google: "google",
|
|
16
|
+
/**
|
|
17
|
+
* Microsoft.
|
|
18
|
+
*/
|
|
19
|
+
Microsoft: "microsoft"
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=authenticationProviderType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticationProviderType.js","sources":["../../../../src/models/types/authenticationProviderType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACzC;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,SAAS,EAAE,WAAW;CACb,CAAC","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Authentication provider types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const AuthenticationProviderType = {\n\t/**\n\t * Passwords for accounts held in entity storage.\n\t */\n\tEntityStorage: \"entity-storage\",\n\n\t/**\n\t * Google.\n\t */\n\tGoogle: \"google\",\n\n\t/**\n\t * Microsoft.\n\t */\n\tMicrosoft: \"microsoft\"\n} as const;\n\n/**\n * Authentication provider types.\n */\nexport type AuthenticationProviderType =\n\t(typeof AuthenticationProviderType)[keyof typeof AuthenticationProviderType];\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright 2026 3Sixty Trade Ltd.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* OAuth component types.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const OAuthComponentType = {
|
|
8
|
+
/**
|
|
9
|
+
* Service.
|
|
10
|
+
*/
|
|
11
|
+
Service: "service"
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=oauthComponentType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauthComponentType.js","sources":["../../../../src/models/types/oauthComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,kBAAkB,GAAG;IACjC;;OAEG;IACH,OAAO,EAAE,SAAS;CACT,CAAC","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * OAuth component types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const OAuthComponentType = {\n\t/**\n\t * Service.\n\t */\n\tService: \"service\"\n} as const;\n\n/**\n * OAuth component types.\n */\nexport type OAuthComponentType = (typeof OAuthComponentType)[keyof typeof OAuthComponentType];\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright 2026 3Sixty Trade Ltd.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* Organization component types.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const OrganizationComponentType = {
|
|
8
|
+
/**
|
|
9
|
+
* Entity storage.
|
|
10
|
+
*/
|
|
11
|
+
EntityStorage: "entity-storage",
|
|
12
|
+
/**
|
|
13
|
+
* REST client.
|
|
14
|
+
*/
|
|
15
|
+
RestClient: "rest-client"
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=organizationComponentType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizationComponentType.js","sources":["../../../../src/models/types/organizationComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,UAAU,EAAE,aAAa;CAChB,CAAC","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Organization component types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const OrganizationComponentType = {\n\t/**\n\t * Entity storage.\n\t */\n\tEntityStorage: \"entity-storage\",\n\n\t/**\n\t * REST client.\n\t */\n\tRestClient: \"rest-client\"\n} as const;\n\n/**\n * Organization component types.\n */\nexport type OrganizationComponentType =\n\t(typeof OrganizationComponentType)[keyof typeof OrganizationComponentType];\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright 2026 3Sixty Trade Ltd.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* Organization request admin component types.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const OrganizationRequestAdminComponentType = {
|
|
8
|
+
/**
|
|
9
|
+
* Entity storage.
|
|
10
|
+
*/
|
|
11
|
+
EntityStorage: "entity-storage",
|
|
12
|
+
/**
|
|
13
|
+
* REST client.
|
|
14
|
+
*/
|
|
15
|
+
RestClient: "rest-client"
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=organizationRequestAdminComponentType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizationRequestAdminComponentType.js","sources":["../../../../src/models/types/organizationRequestAdminComponentType.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACpD;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,UAAU,EAAE,aAAa;CAChB,CAAC","sourcesContent":["// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Organization request admin component types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const OrganizationRequestAdminComponentType = {\n\t/**\n\t * Entity storage.\n\t */\n\tEntityStorage: \"entity-storage\",\n\n\t/**\n\t * REST client.\n\t */\n\tRestClient: \"rest-client\"\n} as const;\n\n/**\n * Organization request admin component types.\n */\nexport type OrganizationRequestAdminComponentType =\n\t(typeof OrganizationRequestAdminComponentType)[keyof typeof OrganizationRequestAdminComponentType];\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// Copyright 2026 3Sixty Trade Ltd.
|
|
2
3
|
// SPDX-License-Identifier: Apache-2.0.
|
|
3
4
|
/**
|
|
4
5
|
* REST route processor types.
|
|
@@ -9,6 +10,10 @@ export const RestRouteProcessorType = {
|
|
|
9
10
|
* Auth header.
|
|
10
11
|
*/
|
|
11
12
|
AuthHeader: "auth-header",
|
|
13
|
+
/**
|
|
14
|
+
* Authentication account, sets the identity and organization of the signed in account.
|
|
15
|
+
*/
|
|
16
|
+
AuthenticationAccount: "authentication-account",
|
|
12
17
|
/**
|
|
13
18
|
* Logging.
|
|
14
19
|
*/
|
|
@@ -48,6 +53,10 @@ export const RestRouteProcessorType = {
|
|
|
48
53
|
/**
|
|
49
54
|
* Authorization.
|
|
50
55
|
*/
|
|
51
|
-
Authorization: "authorization"
|
|
56
|
+
Authorization: "authorization",
|
|
57
|
+
/**
|
|
58
|
+
* Origin check, rejects cookie authenticated state changing requests from other origins.
|
|
59
|
+
*/
|
|
60
|
+
OriginCheck: "origin-check"
|
|
52
61
|
};
|
|
53
62
|
//# sourceMappingURL=restRouteProcessorType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restRouteProcessorType.js","sources":["../../../../src/models/types/restRouteProcessorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC;;OAEG;IACH,UAAU,EAAE,aAAa;IAEzB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,eAAe,EAAE,mBAAmB;IAEpC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,YAAY,EAAE,eAAe;IAE7B;;OAEG;IACH,cAAc,EAAE,iBAAiB;IAEjC;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,aAAa,EAAE,eAAe;
|
|
1
|
+
{"version":3,"file":"restRouteProcessorType.js","sources":["../../../../src/models/types/restRouteProcessorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,mCAAmC;AACnC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC;;OAEG;IACH,UAAU,EAAE,aAAa;IAEzB;;OAEG;IACH,qBAAqB,EAAE,wBAAwB;IAE/C;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,eAAe,EAAE,mBAAmB;IAEpC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,YAAY,EAAE,eAAe;IAE7B;;OAEG;IACH,cAAc,EAAE,iBAAiB;IAEjC;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,aAAa,EAAE,eAAe;IAE9B;;OAEG;IACH,WAAW,EAAE,cAAc;CAClB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// Copyright 2026 3Sixty Trade Ltd.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * REST route processor types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const RestRouteProcessorType = {\n\t/**\n\t * Auth header.\n\t */\n\tAuthHeader: \"auth-header\",\n\n\t/**\n\t * Authentication account, sets the identity and organization of the signed in account.\n\t */\n\tAuthenticationAccount: \"authentication-account\",\n\n\t/**\n\t * Logging.\n\t */\n\tLogging: \"logging\",\n\n\t/**\n\t * Context ID.\n\t */\n\tContextId: \"context-id\",\n\n\t/**\n\t * Static Context ID.\n\t */\n\tStaticContextId: \"static-context-id\",\n\n\t/**\n\t * Tenant.\n\t */\n\tTenant: \"tenant\",\n\n\t/**\n\t * Single Tenant.\n\t */\n\tSingleTenant: \"single-tenant\",\n\n\t/**\n\t * Tenant override.\n\t */\n\tTenantOverride: \"tenant-override\",\n\n\t/**\n\t * REST Route.\n\t */\n\tRestRoute: \"rest-route\",\n\n\t/**\n\t * Metrics.\n\t */\n\tMetrics: \"metrics\",\n\n\t/**\n\t * Tracing.\n\t */\n\tTracing: \"tracing\",\n\n\t/**\n\t * Authorization.\n\t */\n\tAuthorization: \"authorization\",\n\n\t/**\n\t * Origin check, rejects cookie authenticated state changing requests from other origins.\n\t */\n\tOriginCheck: \"origin-check\"\n} as const;\n\n/**\n * REST route processor types.\n */\nexport type RestRouteProcessorType =\n\t(typeof RestRouteProcessorType)[keyof typeof RestRouteProcessorType];\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// Copyright 2026 3Sixty Trade Ltd.
|
|
2
3
|
// SPDX-License-Identifier: Apache-2.0.
|
|
3
4
|
/**
|
|
4
5
|
* Socket route processor types.
|
|
@@ -9,6 +10,10 @@ export const SocketRouteProcessorType = {
|
|
|
9
10
|
* Auth header.
|
|
10
11
|
*/
|
|
11
12
|
AuthHeader: "auth-header",
|
|
13
|
+
/**
|
|
14
|
+
* Authentication account, sets the identity and organization of the signed in account.
|
|
15
|
+
*/
|
|
16
|
+
AuthenticationAccount: "authentication-account",
|
|
12
17
|
/**
|
|
13
18
|
* Logging.
|
|
14
19
|
*/
|
|
@@ -40,6 +45,10 @@ export const SocketRouteProcessorType = {
|
|
|
40
45
|
/**
|
|
41
46
|
* Authorization.
|
|
42
47
|
*/
|
|
43
|
-
Authorization: "authorization"
|
|
48
|
+
Authorization: "authorization",
|
|
49
|
+
/**
|
|
50
|
+
* Origin check, rejects cookie authenticated socket connections from other origins.
|
|
51
|
+
*/
|
|
52
|
+
OriginCheck: "origin-check"
|
|
44
53
|
};
|
|
45
54
|
//# sourceMappingURL=socketRouteProcessorType.js.map
|