@postmcp/presets 0.1.16 → 0.1.18

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/index.d.mts CHANGED
@@ -4,6 +4,58 @@ export { EndpointDef } from '@postmcp/types';
4
4
 
5
5
  declare function buildPresetAuthConfig(preset: Preset, env?: Record<string, string | undefined>): AuthConfig;
6
6
 
7
+ interface OpenAPIOperation {
8
+ operationId: string;
9
+ summary: string;
10
+ description: string;
11
+ parameters: Array<{
12
+ name: string;
13
+ in: string;
14
+ required: boolean;
15
+ schema: {
16
+ type: string;
17
+ format?: string;
18
+ default?: unknown;
19
+ };
20
+ description?: string;
21
+ }>;
22
+ responses: Record<string, {
23
+ description: string;
24
+ content?: Record<string, {
25
+ schema: unknown;
26
+ }>;
27
+ }>;
28
+ requestBody?: {
29
+ required: boolean;
30
+ content: Record<string, {
31
+ schema: {
32
+ type: string;
33
+ properties: Record<string, unknown>;
34
+ };
35
+ }>;
36
+ };
37
+ security?: Array<Record<string, string[]>>;
38
+ }
39
+ interface OpenAPISpecDoc {
40
+ openapi: string;
41
+ info: {
42
+ title: string;
43
+ version: string;
44
+ description: string;
45
+ };
46
+ servers: Array<{
47
+ url: string;
48
+ }>;
49
+ paths: Record<string, Record<string, OpenAPIOperation>>;
50
+ components?: {
51
+ securitySchemes: Record<string, {
52
+ type: string;
53
+ scheme?: string;
54
+ in?: string;
55
+ name?: string;
56
+ }>;
57
+ };
58
+ }
7
59
  declare function buildOpenAPISpec(opts: {
8
60
  title: string;
9
61
  version?: string;
@@ -17,7 +69,7 @@ declare function buildOpenAPISpec(opts: {
17
69
  in?: 'header' | 'query';
18
70
  headerName?: string;
19
71
  };
20
- }): object;
72
+ }): OpenAPISpecDoc;
21
73
 
22
74
  declare const DEVELOPER_TOOLS_PRESETS: Preset[];
23
75
 
@@ -39,4 +91,4 @@ declare function getPresetsByCategory(category: PresetCategory): Preset[];
39
91
  declare function searchPresets(query: string): Preset[];
40
92
  declare function getAllCategories(): PresetCategory[];
41
93
 
42
- export { ALL_PRESETS, CLOUD_DATABASES_PRESETS, COMMUNICATION_AI_PRESETS, DEVELOPER_TOOLS_PRESETS, MEDIA_SOCIAL_PRESETS, PAYMENTS_COMMERCE_PRESETS, PRESETS_BY_ID, PRODUCTIVITY_SUPPORT_PRESETS, buildOpenAPISpec, buildPresetAuthConfig, getAllCategories, getAllPresets, getPreset, getPresetsByCategory, searchPresets };
94
+ export { ALL_PRESETS, CLOUD_DATABASES_PRESETS, COMMUNICATION_AI_PRESETS, DEVELOPER_TOOLS_PRESETS, MEDIA_SOCIAL_PRESETS, type OpenAPIOperation, type OpenAPISpecDoc, PAYMENTS_COMMERCE_PRESETS, PRESETS_BY_ID, PRODUCTIVITY_SUPPORT_PRESETS, buildOpenAPISpec, buildPresetAuthConfig, getAllCategories, getAllPresets, getPreset, getPresetsByCategory, searchPresets };
package/dist/index.d.ts CHANGED
@@ -4,6 +4,58 @@ export { EndpointDef } from '@postmcp/types';
4
4
 
5
5
  declare function buildPresetAuthConfig(preset: Preset, env?: Record<string, string | undefined>): AuthConfig;
6
6
 
7
+ interface OpenAPIOperation {
8
+ operationId: string;
9
+ summary: string;
10
+ description: string;
11
+ parameters: Array<{
12
+ name: string;
13
+ in: string;
14
+ required: boolean;
15
+ schema: {
16
+ type: string;
17
+ format?: string;
18
+ default?: unknown;
19
+ };
20
+ description?: string;
21
+ }>;
22
+ responses: Record<string, {
23
+ description: string;
24
+ content?: Record<string, {
25
+ schema: unknown;
26
+ }>;
27
+ }>;
28
+ requestBody?: {
29
+ required: boolean;
30
+ content: Record<string, {
31
+ schema: {
32
+ type: string;
33
+ properties: Record<string, unknown>;
34
+ };
35
+ }>;
36
+ };
37
+ security?: Array<Record<string, string[]>>;
38
+ }
39
+ interface OpenAPISpecDoc {
40
+ openapi: string;
41
+ info: {
42
+ title: string;
43
+ version: string;
44
+ description: string;
45
+ };
46
+ servers: Array<{
47
+ url: string;
48
+ }>;
49
+ paths: Record<string, Record<string, OpenAPIOperation>>;
50
+ components?: {
51
+ securitySchemes: Record<string, {
52
+ type: string;
53
+ scheme?: string;
54
+ in?: string;
55
+ name?: string;
56
+ }>;
57
+ };
58
+ }
7
59
  declare function buildOpenAPISpec(opts: {
8
60
  title: string;
9
61
  version?: string;
@@ -17,7 +69,7 @@ declare function buildOpenAPISpec(opts: {
17
69
  in?: 'header' | 'query';
18
70
  headerName?: string;
19
71
  };
20
- }): object;
72
+ }): OpenAPISpecDoc;
21
73
 
22
74
  declare const DEVELOPER_TOOLS_PRESETS: Preset[];
23
75
 
@@ -39,4 +91,4 @@ declare function getPresetsByCategory(category: PresetCategory): Preset[];
39
91
  declare function searchPresets(query: string): Preset[];
40
92
  declare function getAllCategories(): PresetCategory[];
41
93
 
42
- export { ALL_PRESETS, CLOUD_DATABASES_PRESETS, COMMUNICATION_AI_PRESETS, DEVELOPER_TOOLS_PRESETS, MEDIA_SOCIAL_PRESETS, PAYMENTS_COMMERCE_PRESETS, PRESETS_BY_ID, PRODUCTIVITY_SUPPORT_PRESETS, buildOpenAPISpec, buildPresetAuthConfig, getAllCategories, getAllPresets, getPreset, getPresetsByCategory, searchPresets };
94
+ export { ALL_PRESETS, CLOUD_DATABASES_PRESETS, COMMUNICATION_AI_PRESETS, DEVELOPER_TOOLS_PRESETS, MEDIA_SOCIAL_PRESETS, type OpenAPIOperation, type OpenAPISpecDoc, PAYMENTS_COMMERCE_PRESETS, PRESETS_BY_ID, PRODUCTIVITY_SUPPORT_PRESETS, buildOpenAPISpec, buildPresetAuthConfig, getAllCategories, getAllPresets, getPreset, getPresetsByCategory, searchPresets };