@apifreaks/openapi-specs 0.3.1 → 0.3.2

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.cts CHANGED
@@ -21,6 +21,11 @@ interface OpenAPISpec {
21
21
 
22
22
  declare const SPECS: Record<string, OpenAPISpec>;
23
23
  declare const SPEC_SLUGS: string[];
24
+ /**
25
+ * YAML text for each spec, pre-rendered at build time so consumers never
26
+ * pay a runtime YAML-dump cost.
27
+ */
28
+ declare const SPECS_YAML: Record<string, string>;
24
29
  declare const SPEC_CATEGORIES: string[];
25
30
  declare const SPECS_BY_CATEGORY: Record<string, string[]>;
26
31
  /**
@@ -41,7 +46,6 @@ declare const SpecSlug: {
41
46
  readonly BULK_IP_LOOKUP: "bulk-ip-lookup";
42
47
  readonly BULK_IP_THREAT_INTELLIGENCE: "bulk-ip-threat-intelligence";
43
48
  readonly BULK_LIVE_WEATHER: "bulk-live-weather";
44
- readonly BULK_PDF_GENERATOR: "bulk-pdf-generator";
45
49
  readonly BULK_PHONE_NUMBER_VALIDATION: "bulk-phone-number-validation";
46
50
  readonly BULK_SCREENSHOT: "bulk-screenshot";
47
51
  readonly BULK_USER_AGENT_PARSER: "bulk-user-agent-parser";
@@ -94,20 +98,21 @@ declare const SpecSlug: {
94
98
  readonly PDF_FILE_STATUS: "pdf-file-status";
95
99
  readonly PDF_FILES: "pdf-files";
96
100
  readonly PDF_GENERATOR: "pdf-generator";
101
+ readonly PDF_GENERATOR_BULK: "pdf-generator-bulk";
97
102
  readonly PDF_RESOURCE_DOWNLOAD: "pdf-resource-download";
98
103
  readonly PDF_RESOURCE_UPLOAD: "pdf-resource-upload";
99
104
  readonly PDF_RESOURCE_UPLOAD_BINARY: "pdf-resource-upload-binary";
100
105
  readonly PDF_RESTRICT: "pdf-restrict";
101
- readonly PDF_SPLIT_PAGES: "pdf-split-pages";
102
106
  readonly PDF_TASK_STATUS: "pdf-task-status";
103
107
  readonly PDF_TO_IMAGE: "pdf-to-image";
104
108
  readonly PDF_UNRESTRICT: "pdf-unrestrict";
105
- readonly PHONE_NUMBER_VALIDATION: "phone-number-validation";
109
+ readonly PHONE_VALIDATION: "phone-validation";
106
110
  readonly REGIONS: "regions";
107
111
  readonly REVERSE_DNS_LOOKUP: "reverse-dns-lookup";
108
112
  readonly REVERSE_GEOCODING: "reverse-geocoding";
109
113
  readonly REVERSE_WHOIS: "reverse-whois";
110
114
  readonly ROTATE_PDF_PAGES: "rotate-pdf-pages";
115
+ readonly SPLIT_PDF: "split-pdf";
111
116
  readonly SSL_CERTIFICATE_CHAIN_LOOKUP: "ssl-certificate-chain-lookup";
112
117
  readonly SSL_CERTIFICATE_LOOKUP: "ssl-certificate-lookup";
113
118
  readonly SUBDOMAIN_LOOKUP: "subdomain-lookup";
@@ -150,7 +155,7 @@ declare const SpecCategory: {
150
155
  readonly GEOGRAPHY: "geography";
151
156
  readonly IP_INTELLIGENCE: "ip-intelligence";
152
157
  readonly PDF: "pdf";
153
- readonly PHONE_VALIDATION: "phone-validation";
158
+ readonly PHONE_NUMBER_VALIDATION: "phone-number-validation";
154
159
  readonly SCRAPER: "scraper";
155
160
  readonly SCREENSHOT: "screenshot";
156
161
  readonly SSL: "ssl";
@@ -162,7 +167,10 @@ declare const SpecCategory: {
162
167
  };
163
168
  type SpecCategoryValue = (typeof SpecCategory)[keyof typeof SpecCategory];
164
169
 
170
+ declare function getSpecJson(slug: SpecSlugValue | (string & {})): OpenAPISpec | undefined;
171
+ declare function getSpecYaml(slug: SpecSlugValue | (string & {})): string | undefined;
172
+ /** @deprecated Use {@link getSpecJson} instead. Removed in the next major version. */
165
173
  declare function getSpec(slug: SpecSlugValue | (string & {})): OpenAPISpec | undefined;
166
174
  declare function getSpecsByCategory(category: SpecCategoryValue | (string & {})): string[];
167
175
 
168
- export { type OpenAPISpec, SPECS, SPECS_BY_CATEGORY, SPEC_CATEGORIES, SPEC_SLUGS, SpecCategory, type SpecCategoryValue, SpecSlug, type SpecSlugValue, getSpec, getSpecsByCategory };
176
+ export { type OpenAPISpec, SPECS, SPECS_BY_CATEGORY, SPECS_YAML, SPEC_CATEGORIES, SPEC_SLUGS, SpecCategory, type SpecCategoryValue, SpecSlug, type SpecSlugValue, getSpec, getSpecJson, getSpecYaml, getSpecsByCategory };
package/dist/index.d.ts CHANGED
@@ -21,6 +21,11 @@ interface OpenAPISpec {
21
21
 
22
22
  declare const SPECS: Record<string, OpenAPISpec>;
23
23
  declare const SPEC_SLUGS: string[];
24
+ /**
25
+ * YAML text for each spec, pre-rendered at build time so consumers never
26
+ * pay a runtime YAML-dump cost.
27
+ */
28
+ declare const SPECS_YAML: Record<string, string>;
24
29
  declare const SPEC_CATEGORIES: string[];
25
30
  declare const SPECS_BY_CATEGORY: Record<string, string[]>;
26
31
  /**
@@ -41,7 +46,6 @@ declare const SpecSlug: {
41
46
  readonly BULK_IP_LOOKUP: "bulk-ip-lookup";
42
47
  readonly BULK_IP_THREAT_INTELLIGENCE: "bulk-ip-threat-intelligence";
43
48
  readonly BULK_LIVE_WEATHER: "bulk-live-weather";
44
- readonly BULK_PDF_GENERATOR: "bulk-pdf-generator";
45
49
  readonly BULK_PHONE_NUMBER_VALIDATION: "bulk-phone-number-validation";
46
50
  readonly BULK_SCREENSHOT: "bulk-screenshot";
47
51
  readonly BULK_USER_AGENT_PARSER: "bulk-user-agent-parser";
@@ -94,20 +98,21 @@ declare const SpecSlug: {
94
98
  readonly PDF_FILE_STATUS: "pdf-file-status";
95
99
  readonly PDF_FILES: "pdf-files";
96
100
  readonly PDF_GENERATOR: "pdf-generator";
101
+ readonly PDF_GENERATOR_BULK: "pdf-generator-bulk";
97
102
  readonly PDF_RESOURCE_DOWNLOAD: "pdf-resource-download";
98
103
  readonly PDF_RESOURCE_UPLOAD: "pdf-resource-upload";
99
104
  readonly PDF_RESOURCE_UPLOAD_BINARY: "pdf-resource-upload-binary";
100
105
  readonly PDF_RESTRICT: "pdf-restrict";
101
- readonly PDF_SPLIT_PAGES: "pdf-split-pages";
102
106
  readonly PDF_TASK_STATUS: "pdf-task-status";
103
107
  readonly PDF_TO_IMAGE: "pdf-to-image";
104
108
  readonly PDF_UNRESTRICT: "pdf-unrestrict";
105
- readonly PHONE_NUMBER_VALIDATION: "phone-number-validation";
109
+ readonly PHONE_VALIDATION: "phone-validation";
106
110
  readonly REGIONS: "regions";
107
111
  readonly REVERSE_DNS_LOOKUP: "reverse-dns-lookup";
108
112
  readonly REVERSE_GEOCODING: "reverse-geocoding";
109
113
  readonly REVERSE_WHOIS: "reverse-whois";
110
114
  readonly ROTATE_PDF_PAGES: "rotate-pdf-pages";
115
+ readonly SPLIT_PDF: "split-pdf";
111
116
  readonly SSL_CERTIFICATE_CHAIN_LOOKUP: "ssl-certificate-chain-lookup";
112
117
  readonly SSL_CERTIFICATE_LOOKUP: "ssl-certificate-lookup";
113
118
  readonly SUBDOMAIN_LOOKUP: "subdomain-lookup";
@@ -150,7 +155,7 @@ declare const SpecCategory: {
150
155
  readonly GEOGRAPHY: "geography";
151
156
  readonly IP_INTELLIGENCE: "ip-intelligence";
152
157
  readonly PDF: "pdf";
153
- readonly PHONE_VALIDATION: "phone-validation";
158
+ readonly PHONE_NUMBER_VALIDATION: "phone-number-validation";
154
159
  readonly SCRAPER: "scraper";
155
160
  readonly SCREENSHOT: "screenshot";
156
161
  readonly SSL: "ssl";
@@ -162,7 +167,10 @@ declare const SpecCategory: {
162
167
  };
163
168
  type SpecCategoryValue = (typeof SpecCategory)[keyof typeof SpecCategory];
164
169
 
170
+ declare function getSpecJson(slug: SpecSlugValue | (string & {})): OpenAPISpec | undefined;
171
+ declare function getSpecYaml(slug: SpecSlugValue | (string & {})): string | undefined;
172
+ /** @deprecated Use {@link getSpecJson} instead. Removed in the next major version. */
165
173
  declare function getSpec(slug: SpecSlugValue | (string & {})): OpenAPISpec | undefined;
166
174
  declare function getSpecsByCategory(category: SpecCategoryValue | (string & {})): string[];
167
175
 
168
- export { type OpenAPISpec, SPECS, SPECS_BY_CATEGORY, SPEC_CATEGORIES, SPEC_SLUGS, SpecCategory, type SpecCategoryValue, SpecSlug, type SpecSlugValue, getSpec, getSpecsByCategory };
176
+ export { type OpenAPISpec, SPECS, SPECS_BY_CATEGORY, SPECS_YAML, SPEC_CATEGORIES, SPEC_SLUGS, SpecCategory, type SpecCategoryValue, SpecSlug, type SpecSlugValue, getSpec, getSpecJson, getSpecYaml, getSpecsByCategory };