@ng-openapi/http-resource 0.0.4 → 0.0.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/README.md CHANGED
@@ -39,7 +39,7 @@ npm install @ng-openapi/http-resource ng-openapi --save-dev
39
39
  ```typescript
40
40
  // openapi.config.ts
41
41
  import { GeneratorConfig } from 'ng-openapi';
42
- import { HttpResourceGenerator } from '@ng-openapi/http-resource';
42
+ import { HttpResourcePlugin } from '@ng-openapi/http-resource';
43
43
 
44
44
  export default {
45
45
  input: './swagger.json',
package/index.cjs CHANGED
@@ -31,10 +31,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  // src/index.ts
32
32
  var index_exports = {};
33
33
  __export(index_exports, {
34
- HttpResourceIndexGenerator: () => HttpResourceIndexGenerator,
35
- HttpResourceMethodBodyGenerator: () => HttpResourceMethodBodyGenerator,
36
- HttpResourceMethodGenerator: () => HttpResourceMethodGenerator,
37
- HttpResourceMethodParamsGenerator: () => HttpResourceMethodParamsGenerator,
38
34
  HttpResourcePlugin: () => HttpResourceGenerator
39
35
  });
40
36
  module.exports = __toCommonJS(index_exports);
@@ -3774,10 +3770,6 @@ return context.set(this.clientContextToken, '${this.config.clientName || "defaul
3774
3770
  };
3775
3771
  // Annotate the CommonJS export names for ESM import in node:
3776
3772
  0 && (module.exports = {
3777
- HttpResourceIndexGenerator,
3778
- HttpResourceMethodBodyGenerator,
3779
- HttpResourceMethodGenerator,
3780
- HttpResourceMethodParamsGenerator,
3781
3773
  HttpResourcePlugin
3782
3774
  });
3783
3775
  /*! Bundled license information:
package/index.d.ts CHANGED
@@ -1,32 +1,6 @@
1
- import { ScriptTarget, ModuleKind, Project, ClassDeclaration, OptionalKind, ParameterDeclarationStructure, MethodDeclarationOverloadStructure } from 'ts-morph';
1
+ import { ScriptTarget, ModuleKind, Project } from 'ts-morph';
2
2
  import { Info, ExternalDocs, Path, ParameterType, XML, BodyParameter, QueryParameter, Security, Tag } from 'swagger-schema-official';
3
3
 
4
- interface Parameter {
5
- name: string;
6
- in: "query" | "path" | "header" | "cookie";
7
- required?: boolean;
8
- schema?: any;
9
- type?: string;
10
- format?: string;
11
- description?: string;
12
- }
13
- interface PathInfo {
14
- path: string;
15
- method: string;
16
- operationId?: string;
17
- summary?: string;
18
- description?: string;
19
- tags?: string[];
20
- parameters?: Parameter[];
21
- requestBody?: RequestBody;
22
- responses?: Record<string, SwaggerResponse>;
23
- }
24
- interface RequestBody {
25
- required?: boolean;
26
- content?: Record<string, {
27
- schema?: SwaggerDefinition;
28
- }>;
29
- }
30
4
  interface SwaggerResponse {
31
5
  description?: string;
32
6
  content?: Record<string, {
@@ -177,45 +151,4 @@ declare class HttpResourceGenerator implements IPluginGenerator {
177
151
  private addServiceClass;
178
152
  }
179
153
 
180
- declare class HttpResourceMethodGenerator {
181
- #private;
182
- private config;
183
- private bodyGenerator;
184
- private paramsGenerator;
185
- constructor(config: GeneratorConfig);
186
- addResourceMethod(serviceClass: ClassDeclaration, operation: PathInfo): void;
187
- generateMethodName(operation: PathInfo): string;
188
- generateReturnType(operation: PathInfo): string;
189
- generateMethodOverload(methodParams: OptionalKind<ParameterDeclarationStructure>[]): OptionalKind<MethodDeclarationOverloadStructure>[];
190
- }
191
-
192
- declare class HttpResourceIndexGenerator {
193
- private project;
194
- constructor(project: Project);
195
- generateIndex(outputRoot: string): void;
196
- }
197
-
198
- declare class HttpResourceMethodBodyGenerator {
199
- private config;
200
- constructor(config: GeneratorConfig);
201
- generateMethodBody(operation: PathInfo): string;
202
- private createGenerationContext;
203
- private generateUrl;
204
- private generateQueryParams;
205
- private generateHeaders;
206
- private generateRequestOptions;
207
- private generateHttpResource;
208
- private determineResponseType;
209
- }
210
-
211
- declare class HttpResourceMethodParamsGenerator {
212
- private config;
213
- constructor(config: GeneratorConfig);
214
- generateMethodParameters(operation: PathInfo): OptionalKind<ParameterDeclarationStructure>[];
215
- generateApiParameters(operation: PathInfo): OptionalKind<ParameterDeclarationStructure>[];
216
- addOptionsParameter(responseType: string): OptionalKind<ParameterDeclarationStructure>[];
217
- private getApiReturnType;
218
- private getResourceRawDataType;
219
- }
220
-
221
- export { HttpResourceIndexGenerator, HttpResourceMethodBodyGenerator, HttpResourceMethodGenerator, HttpResourceMethodParamsGenerator, HttpResourceGenerator as HttpResourcePlugin };
154
+ export { HttpResourceGenerator as HttpResourcePlugin };
package/index.js CHANGED
@@ -3735,10 +3735,6 @@ return context.set(this.clientContextToken, '${this.config.clientName || "defaul
3735
3735
  }
3736
3736
  };
3737
3737
  export {
3738
- HttpResourceIndexGenerator,
3739
- HttpResourceMethodBodyGenerator,
3740
- HttpResourceMethodGenerator,
3741
- HttpResourceMethodParamsGenerator,
3742
3738
  HttpResourceGenerator as HttpResourcePlugin
3743
3739
  };
3744
3740
  /*! Bundled license information:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-openapi/http-resource",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "HTTP Resource plugin for ng-openapi - Angular HTTP utilities with caching and state management",
5
5
  "keywords": [
6
6
  "angular",
@@ -10,7 +10,10 @@
10
10
  "resource",
11
11
  "cache",
12
12
  "state-management",
13
- "typescript"
13
+ "typescript",
14
+ "signal",
15
+ "ng",
16
+ "openapi"
14
17
  ],
15
18
  "author": {
16
19
  "name": "Tareq Jami",