{"id":26395640,"url":"https://github.com/elasticemail/elasticemail-ts-angular","last_synced_at":"2026-03-01T22:38:54.794Z","repository":{"id":57745616,"uuid":"366327550","full_name":"ElasticEmail/elasticemail-ts-angular","owner":"ElasticEmail","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-22T13:34:29.000Z","size":534,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-22T15:02:01.489Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ElasticEmail.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-05-11T09:30:31.000Z","updated_at":"2025-05-22T13:34:32.000Z","dependencies_parsed_at":"2025-05-22T14:46:43.680Z","dependency_job_id":"d24d8e32-2b09-4bbc-89c2-537ac81398d6","html_url":"https://github.com/ElasticEmail/elasticemail-ts-angular","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":0.5,"last_synced_commit":"0955ff03f7327556f39be09c3ca20347e9df011d"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ElasticEmail/elasticemail-ts-angular","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElasticEmail%2Felasticemail-ts-angular","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElasticEmail%2Felasticemail-ts-angular/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElasticEmail%2Felasticemail-ts-angular/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElasticEmail%2Felasticemail-ts-angular/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ElasticEmail","download_url":"https://codeload.github.com/ElasticEmail/elasticemail-ts-angular/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElasticEmail%2Felasticemail-ts-angular/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260818652,"owners_count":23067745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-17T11:18:52.076Z","updated_at":"2026-03-01T22:38:54.789Z","avatar_url":"https://github.com/ElasticEmail.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## elasticemail-angular@4.0.26\n\n### Building\n\nTo install the required dependencies and to build the typescript sources run:\n```\nnpm install\nnpm run build\n```\n\n### publishing\n\nFirst build the package then run ```npm publish dist``` (don't forget to specify the `dist` folder!)\n\n### consuming\n\nNavigate to the folder of your consuming project and run one of next commands.\n\n_published:_\n\n```\nnpm install elasticemail-angular@4.0.26 --save\n```\n\n_without publishing (not recommended):_\n\n```\nnpm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save\n```\n\n_It's important to take the tgz file, otherwise you'll get trouble with links on windows_\n\n_using `npm link`:_\n\nIn PATH_TO_GENERATED_PACKAGE/dist:\n```\nnpm link\n```\n\nIn your project:\n```\nnpm link elasticemail-angular\n```\n\n__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages.\nPlease refer to this issue https://github.com/angular/angular-cli/issues/8284 for a solution / workaround.\nPublished packages are not effected by this issue.\n\n\n#### General usage\n\nIn your Angular project:\n\n\n```\n// without configuring providers\nimport { ApiModule } from 'elasticemail-angular';\nimport { HttpClientModule } from '@angular/common/http';\n\n@NgModule({\n    imports: [\n        ApiModule,\n        // make sure to import the HttpClientModule in the AppModule only,\n        // see https://github.com/angular/angular/issues/20575\n        HttpClientModule\n    ],\n    declarations: [ AppComponent ],\n    providers: [],\n    bootstrap: [ AppComponent ]\n})\nexport class AppModule {}\n```\n\n```\n// configuring providers\nimport { ApiModule, Configuration, ConfigurationParameters } from 'elasticemail-angular';\n\nexport function apiConfigFactory (): Configuration {\n  const params: ConfigurationParameters = {\n    // set configuration parameters here.\n  }\n  return new Configuration(params);\n}\n\n@NgModule({\n    imports: [ ApiModule.forRoot(apiConfigFactory) ],\n    declarations: [ AppComponent ],\n    providers: [],\n    bootstrap: [ AppComponent ]\n})\nexport class AppModule {}\n```\n\n```\n// configuring providers with an authentication service that manages your access tokens\nimport { ApiModule, Configuration } from 'elasticemail-angular';\n\n@NgModule({\n    imports: [ ApiModule ],\n    declarations: [ AppComponent ],\n    providers: [\n      {\n        provide: Configuration,\n        useFactory: (authService: AuthService) =\u003e new Configuration(\n          {\n            basePath: environment.apiUrl,\n            accessToken: authService.getAccessToken.bind(authService)\n          }\n        ),\n        deps: [AuthService],\n        multi: false\n      }\n    ],\n    bootstrap: [ AppComponent ]\n})\nexport class AppModule {}\n```\n\n```\nimport { DefaultApi } from 'elasticemail-angular';\n\nexport class AppComponent {\n    constructor(private apiGateway: DefaultApi) { }\n}\n```\n\nNote: The ApiModule is restricted to being instantiated once app wide.\nThis is to ensure that all services are treated as singletons.\n\n#### Using multiple OpenAPI files / APIs / ApiModules\nIn order to use multiple `ApiModules` generated from different OpenAPI files,\nyou can create an alias name when importing the modules\nin order to avoid naming conflicts:\n```\nimport { ApiModule } from 'my-api-path';\nimport { ApiModule as OtherApiModule } from 'my-other-api-path';\nimport { HttpClientModule } from '@angular/common/http';\n\n@NgModule({\n  imports: [\n    ApiModule,\n    OtherApiModule,\n    // make sure to import the HttpClientModule in the AppModule only,\n    // see https://github.com/angular/angular/issues/20575\n    HttpClientModule\n  ]\n})\nexport class AppModule {\n\n}\n```\n\n\n### Set service base path\nIf different than the generated base path, during app bootstrap, you can provide the base path to your service.\n\n```\nimport { BASE_PATH } from 'elasticemail-angular';\n\nbootstrap(AppComponent, [\n    { provide: BASE_PATH, useValue: 'https://your-web-service.com' },\n]);\n```\nor\n\n```\nimport { BASE_PATH } from 'elasticemail-angular';\n\n@NgModule({\n    imports: [],\n    declarations: [ AppComponent ],\n    providers: [ provide: BASE_PATH, useValue: 'https://your-web-service.com' ],\n    bootstrap: [ AppComponent ]\n})\nexport class AppModule {}\n```\n\n\n#### Using @angular/cli\nFirst extend your `src/environments/*.ts` files by adding the corresponding base path:\n\n```\nexport const environment = {\n  production: false,\n  API_BASE_PATH: 'http://127.0.0.1:8080'\n};\n```\n\nIn the src/app/app.module.ts:\n```\nimport { BASE_PATH } from 'elasticemail-angular';\nimport { environment } from '../environments/environment';\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [ ],\n  providers: [{ provide: BASE_PATH, useValue: environment.API_BASE_PATH }],\n  bootstrap: [ AppComponent ]\n})\nexport class AppModule { }\n```\n\n### Customizing path parameter encoding\n\nWithout further customization, only [path-parameters][parameter-locations-url] of [style][style-values-url] 'simple'\nand Dates for format 'date-time' are encoded correctly.\n\nOther styles (e.g. \"matrix\") are not that easy to encode\nand thus are best delegated to other libraries (e.g.: [@honoluluhenk/http-param-expander]).\n\nTo implement your own parameter encoding (or call another library),\npass an arrow-function or method-reference to the `encodeParam` property of the Configuration-object\n(see [General Usage](#general-usage) above).\n\nExample value for use in your Configuration-Provider:\n```typescript\nnew Configuration({\n    encodeParam: (param: Param) =\u003e myFancyParamEncoder(param),\n})\n```\n\n[parameter-locations-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-locations\n[style-values-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values\n[@honoluluhenk/http-param-expander]: https://www.npmjs.com/package/@honoluluhenk/http-param-expander\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felasticemail%2Felasticemail-ts-angular","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felasticemail%2Felasticemail-ts-angular","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felasticemail%2Felasticemail-ts-angular/lists"}