@decohere/create 0.0.1-dev.36 → 0.0.1-dev.38

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.
@@ -0,0 +1,17 @@
1
+ import { type Auth0Env, type PostmanCollection } from "./openapi-to-postman.js";
2
+ /** Local View / Native Git environment (YAML). */
3
+ export declare function buildEnvironmentYaml(name: string, auth: Auth0Env | undefined, options: {
4
+ callbacks: readonly string[];
5
+ scopes: string;
6
+ }): string;
7
+ /**
8
+ * Build Postman Local View multi-file YAML from a v2.1 collection (routes)
9
+ * plus hand-authored Auth0 overlay.
10
+ */
11
+ export declare function buildLocalViewFilesFromCollection(collection: PostmanCollection, projectName: string, auth: Auth0Env | undefined, options: {
12
+ callbacks: readonly string[];
13
+ scopes: string;
14
+ }): Array<{
15
+ filePath: string;
16
+ content: string;
17
+ }>;
@@ -0,0 +1,62 @@
1
+ import type { ScaffoldOpenApiDocument } from "./hello-openapi.js";
2
+ export type PostmanCollection = {
3
+ info: {
4
+ _postman_id?: string;
5
+ name: string;
6
+ schema: string;
7
+ description?: string;
8
+ };
9
+ auth?: unknown;
10
+ item?: PostmanItem[];
11
+ variable?: Array<{
12
+ key: string;
13
+ value: string;
14
+ }>;
15
+ [key: string]: unknown;
16
+ };
17
+ export type PostmanItem = {
18
+ name?: string;
19
+ item?: PostmanItem[];
20
+ request?: PostmanRequest;
21
+ [key: string]: unknown;
22
+ };
23
+ export type PostmanRequest = {
24
+ method?: string;
25
+ header?: Array<{
26
+ key: string;
27
+ value: string;
28
+ }>;
29
+ body?: {
30
+ mode?: string;
31
+ raw?: string;
32
+ };
33
+ url?: string | {
34
+ raw?: string;
35
+ host?: string[];
36
+ path?: string[];
37
+ variable?: unknown[];
38
+ };
39
+ auth?: {
40
+ type: string;
41
+ [key: string]: unknown;
42
+ };
43
+ [key: string]: unknown;
44
+ };
45
+ export type Auth0Env = {
46
+ auth0Domain?: string;
47
+ auth0Audience?: string;
48
+ auth0ClientId?: string;
49
+ };
50
+ /** Convert an OpenAPI document to a Postman Collection v2.1 via openapi-to-postmanv2. */
51
+ export declare function openApiToPostmanCollection(document: ScaffoldOpenApiDocument): Promise<PostmanCollection>;
52
+ /**
53
+ * Overlay Auth0 OAuth2 (PKCE) collection auth and fix Local View-friendly URLs.
54
+ * Route items come from OpenAPI; auth/env remain hand-authored.
55
+ */
56
+ export declare function applyPostmanAuthOverlay(collection: PostmanCollection, projectName: string, auth: Auth0Env | undefined, options: {
57
+ callbacks: readonly string[];
58
+ scopes: string;
59
+ description: string;
60
+ }): PostmanCollection;
61
+ /** OpenAPI `{id}` → Postman `:id`, without touching `{{variables}}`. */
62
+ export declare function openApiPathParamsToColon(url: string): string;