@typeship-ax/mcp 0.9.1 → 0.19.0

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.
Files changed (68) hide show
  1. package/AGENTS.md +10 -4
  2. package/README.md +16 -5
  3. package/api.json +6055 -645
  4. package/api.md +5225 -567
  5. package/dist/core/http.d.ts +3 -2
  6. package/dist/core/http.d.ts.map +1 -1
  7. package/dist/core/http.js +18 -6
  8. package/dist/errors.d.ts +17 -10
  9. package/dist/errors.d.ts.map +1 -1
  10. package/dist/errors.js +24 -15
  11. package/dist/index.d.ts +7 -3
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +9 -5
  14. package/dist/mcp-protocol.d.ts +10 -6
  15. package/dist/mcp-protocol.d.ts.map +1 -1
  16. package/dist/mcp-protocol.js +108 -37
  17. package/dist/mcp.d.ts.map +1 -1
  18. package/dist/mcp.js +36 -17
  19. package/dist/ops.d.ts +4 -0
  20. package/dist/ops.d.ts.map +1 -1
  21. package/dist/ops.js +45 -31
  22. package/dist/resources/account.d.ts +4 -4
  23. package/dist/resources/account.d.ts.map +1 -1
  24. package/dist/resources/account.js +10 -5
  25. package/dist/resources/api-keys.d.ts +40 -14
  26. package/dist/resources/api-keys.d.ts.map +1 -1
  27. package/dist/resources/api-keys.js +45 -13
  28. package/dist/resources/definition-revisions.d.ts +35 -18
  29. package/dist/resources/definition-revisions.d.ts.map +1 -1
  30. package/dist/resources/definition-revisions.js +43 -15
  31. package/dist/resources/definitions.d.ts +21 -6
  32. package/dist/resources/definitions.d.ts.map +1 -1
  33. package/dist/resources/definitions.js +16 -3
  34. package/dist/resources/generate.d.ts +44 -15
  35. package/dist/resources/generate.d.ts.map +1 -1
  36. package/dist/resources/generate.js +55 -13
  37. package/dist/resources/generations.d.ts +14 -6
  38. package/dist/resources/generations.d.ts.map +1 -1
  39. package/dist/resources/generations.js +26 -5
  40. package/dist/resources/projects.d.ts +106 -53
  41. package/dist/resources/projects.d.ts.map +1 -1
  42. package/dist/resources/projects.js +78 -31
  43. package/dist/resources/targets.d.ts +285 -22
  44. package/dist/resources/targets.d.ts.map +1 -1
  45. package/dist/resources/targets.js +408 -10
  46. package/dist/schemas.d.ts.map +1 -1
  47. package/dist/schemas.js +138 -73
  48. package/dist/types.d.ts +2162 -134
  49. package/dist/types.d.ts.map +1 -1
  50. package/dist/types.js +99 -2
  51. package/package.json +3 -3
  52. package/server.json +3 -3
  53. package/src/core/http.ts +17 -6
  54. package/src/errors.ts +25 -15
  55. package/src/index.ts +9 -5
  56. package/src/mcp-protocol.ts +93 -36
  57. package/src/mcp.ts +32 -15
  58. package/src/ops.ts +49 -31
  59. package/src/resources/account.ts +11 -4
  60. package/src/resources/api-keys.ts +84 -13
  61. package/src/resources/definition-revisions.ts +74 -16
  62. package/src/resources/definitions.ts +28 -4
  63. package/src/resources/generate.ts +78 -13
  64. package/src/resources/generations.ts +31 -4
  65. package/src/resources/projects.ts +141 -39
  66. package/src/resources/targets.ts +756 -13
  67. package/src/schemas.ts +138 -73
  68. package/src/types.ts +2372 -189
@@ -1,36 +1,65 @@
1
1
  import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
2
- import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, ApiResponseError, BadRequestError, ConflictError, ForbiddenError, PayloadTooLargeError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
2
+ import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, ApiResponseError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PayloadTooLargeError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
3
3
  import type { GenerateRequest, GenerationResultRead } from "../types.js";
4
4
  export declare class GenerateResource {
5
5
  private readonly _core;
6
6
  constructor(_core: HttpCore);
7
7
  /**
8
- * Generate one Target from a Definition
9
- *
10
- * Stateless generation: nothing is stored. Returns the full generated
11
- * package as files. Works without an API key: anonymous calls generate
12
- * the first 25 operations, rate limited per IP address, and the
13
- * response's `limits` object says what was held back and where to lift
14
- * it; anonymous calls from a Definition URL also carry `claim.url`, a link
15
- * that turns the run into a project once a person signs in. With a key, the free plan generates
16
- * the first 25 operations and
17
- * paid plans generate the complete Definition. A present but invalid key is a
18
- * 401, not a downgrade to anonymous.
8
+ * Generate one package from a Definition
9
+ *
10
+ * Returns one generated package without creating a Project.
11
+ *
12
+ * Supports [idempotent retries](https://typeship.dev/docs/typeship-api/idempotency); keyed
13
+ * responses include generated files in the replay cache.
14
+ *
15
+ * Use `download.url` to save the complete ZIP, verify `download.sha256`, and extract it into an
16
+ * empty directory. The link expires at `download.expires_at` and grants access to anyone who has
17
+ * it. CLI, MCP, and SDK calls supply an idempotency key automatically. Agents should request
18
+ * `fields=["download","meta","warnings","limits","claim"]` to keep the MCP result compact; files
19
+ * can exceed the response limit. Download the ZIP instead of repeating generation to retrieve
20
+ * omitted files.
21
+ *
22
+ * Anonymous and Free requests include the first 25 operations. Paid plans include all operations.
23
+ * Anonymous requests are rate limited by IP address. Check `limits` for omitted operations; an
24
+ * invalid API key returns `401`.
25
+ *
26
+ * An anonymous URL request without source headers may return `claim.url`. Sign in through that
27
+ * link within seven days to save the recipe as a Project.
19
28
  *
20
29
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
21
30
  * `POST /generate`
22
31
  */
23
32
  run(body: GenerateRequest, params?: GenerateRunParams, options?: RequestOptions): Promise<ApiResult<GenerationResultRead, GenerateRunError>>;
33
+ /**
34
+ * Download a generated package
35
+ *
36
+ * Download the complete ZIP referenced by `generate_run`'s `download.url`. Pass the token from
37
+ * that URL. No API key is needed; the token grants access only to that exact package until its
38
+ * replay window expires. Keep the token private.
39
+ *
40
+ * The local MCP server saves this binary response to disk. On a hosted MCP connection, download
41
+ * the original URL directly to your workspace. Verify the ZIP against `download.sha256` before
42
+ * extracting it into an empty directory. Expired or invalid tokens return `404`; a new generation
43
+ * creates a new download.
44
+ * `GET /generate/download`
45
+ */
46
+ downloadPackage(params: GenerateDownloadPackageParams, options?: RequestOptions): Promise<ApiResult<Blob, GenerateDownloadPackageError>>;
24
47
  }
25
48
  export interface GenerateRunParams {
26
49
  /**
27
50
  * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
28
51
  * operation; account-less generation uses a hashed network identity. Retrying the same method,
29
- * path, query, and JSON body replays the original response. Reusing the key with changed intent
30
- * returns 409. After expiry the key starts a new write.
52
+ * path, query, If-Match header, and JSON body replays the original response. Reusing the key with
53
+ * changed intent returns 409. After expiry the key starts a new write.
31
54
  */
32
55
  idempotencyKey?: string;
33
56
  }
34
57
  /** Every error `run` can produce, as a discriminated union. */
35
- export type GenerateRunError = BadRequestError | UnauthorizedError | ForbiddenError | ConflictError | PayloadTooLargeError | UnprocessableEntityError | RateLimitedError | ApiResponseError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
58
+ export type GenerateRunError = BadRequestError | UnauthorizedError | ForbiddenError | ConflictError | PayloadTooLargeError | UnprocessableEntityError | RateLimitedError | InternalServerError | ApiResponseError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
59
+ export interface GenerateDownloadPackageParams {
60
+ /** Private download token from download.url in the generation result. */
61
+ token: string;
62
+ }
63
+ /** Every error `downloadPackage` can produce, as a discriminated union. */
64
+ export type GenerateDownloadPackageError = BadRequestError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
36
65
  //# sourceMappingURL=generate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/resources/generate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,eAAe,EAAoB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAE3F,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;;;;;;;;;;;OAeG;IACG,GAAG,CACP,IAAI,EAAE,eAAe,EACrB,MAAM,CAAC,EAAE,iBAAiB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;CAwB9D;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,+DAA+D;AAC/D,MAAM,MAAM,gBAAgB,GACxB,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,oBAAoB,GACpB,wBAAwB,GACxB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/resources/generate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,eAAe,EAAoB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAE3F,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,GAAG,CACP,IAAI,EAAE,eAAe,EACrB,MAAM,CAAC,EAAE,iBAAiB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;IA0B7D;;;;;;;;;;;;OAYG;IACG,eAAe,CACnB,MAAM,EAAE,6BAA6B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,4BAA4B,CAAC,CAAC;CAmB1D;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,+DAA+D;AAC/D,MAAM,MAAM,gBAAgB,GACxB,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,oBAAoB,GACpB,wBAAwB,GACxB,gBAAgB,GAChB,mBAAmB,GACnB,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,6BAA6B;IAC5C,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;CACf;AAED,2EAA2E;AAC3E,MAAM,MAAM,4BAA4B,GACpC,eAAe,GACf,aAAa,GACb,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
@@ -1,23 +1,32 @@
1
1
  // typeship — generate resource.
2
- // Generated by typeship — https://typeship.dev — do not edit by hand.
3
- import { ApiResponseError, BadRequestError, ConflictError, ForbiddenError, PayloadTooLargeError, RateLimitedError, UnauthorizedError, UnprocessableEntityError, } from "../errors.js";
2
+ // Generated by typeship — https://typeship.dev
3
+ import { ApiResponseError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PayloadTooLargeError, RateLimitedError, UnauthorizedError, UnprocessableEntityError, } from "../errors.js";
4
4
  export class GenerateResource {
5
5
  _core;
6
6
  constructor(_core) {
7
7
  this._core = _core;
8
8
  }
9
9
  /**
10
- * Generate one Target from a Definition
11
- *
12
- * Stateless generation: nothing is stored. Returns the full generated
13
- * package as files. Works without an API key: anonymous calls generate
14
- * the first 25 operations, rate limited per IP address, and the
15
- * response's `limits` object says what was held back and where to lift
16
- * it; anonymous calls from a Definition URL also carry `claim.url`, a link
17
- * that turns the run into a project once a person signs in. With a key, the free plan generates
18
- * the first 25 operations and
19
- * paid plans generate the complete Definition. A present but invalid key is a
20
- * 401, not a downgrade to anonymous.
10
+ * Generate one package from a Definition
11
+ *
12
+ * Returns one generated package without creating a Project.
13
+ *
14
+ * Supports [idempotent retries](https://typeship.dev/docs/typeship-api/idempotency); keyed
15
+ * responses include generated files in the replay cache.
16
+ *
17
+ * Use `download.url` to save the complete ZIP, verify `download.sha256`, and extract it into an
18
+ * empty directory. The link expires at `download.expires_at` and grants access to anyone who has
19
+ * it. CLI, MCP, and SDK calls supply an idempotency key automatically. Agents should request
20
+ * `fields=["download","meta","warnings","limits","claim"]` to keep the MCP result compact; files
21
+ * can exceed the response limit. Download the ZIP instead of repeating generation to retrieve
22
+ * omitted files.
23
+ *
24
+ * Anonymous and Free requests include the first 25 operations. Paid plans include all operations.
25
+ * Anonymous requests are rate limited by IP address. Check `limits` for omitted operations; an
26
+ * invalid API key returns `401`.
27
+ *
28
+ * An anonymous URL request without source headers may return `claim.url`. Sign in through that
29
+ * link within seven days to save the recipe as a Project.
21
30
  *
22
31
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
23
32
  * `POST /generate`
@@ -39,6 +48,7 @@ export class GenerateResource {
39
48
  "413": PayloadTooLargeError,
40
49
  "422": UnprocessableEntityError,
41
50
  "429": RateLimitedError,
51
+ "500": InternalServerError,
42
52
  default: ApiResponseError,
43
53
  },
44
54
  idempotencyKey: "Idempotency-Key",
@@ -46,4 +56,36 @@ export class GenerateResource {
46
56
  options,
47
57
  });
48
58
  }
59
+ /**
60
+ * Download a generated package
61
+ *
62
+ * Download the complete ZIP referenced by `generate_run`'s `download.url`. Pass the token from
63
+ * that URL. No API key is needed; the token grants access only to that exact package until its
64
+ * replay window expires. Keep the token private.
65
+ *
66
+ * The local MCP server saves this binary response to disk. On a hosted MCP connection, download
67
+ * the original URL directly to your workspace. Verify the ZIP against `download.sha256` before
68
+ * extracting it into an empty directory. Expired or invalid tokens return `404`; a new generation
69
+ * creates a new download.
70
+ * `GET /generate/download`
71
+ */
72
+ async downloadPackage(params, options) {
73
+ return this._core.request({
74
+ method: "GET",
75
+ path: "/generate/download",
76
+ security: [{}],
77
+ query: {
78
+ token: params.token,
79
+ },
80
+ errors: {
81
+ "400": BadRequestError,
82
+ "404": NotFoundError,
83
+ "429": RateLimitedError,
84
+ "500": InternalServerError,
85
+ },
86
+ idempotent: true,
87
+ schemaKey: "generate.downloadPackage",
88
+ options,
89
+ });
90
+ }
49
91
  }
@@ -1,5 +1,5 @@
1
1
  import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
2
- import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError } from "../errors.js";
2
+ import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError, InternalServerError, NotFoundError, RateLimitedError, UnauthorizedError } from "../errors.js";
3
3
  import type { GenerationId, GenerationResponseRead } from "../types.js";
4
4
  export declare class GenerationsResource {
5
5
  private readonly _core;
@@ -7,25 +7,33 @@ export declare class GenerationsResource {
7
7
  /**
8
8
  * Retrieve a generation
9
9
  *
10
- * Includes the generated files when the generation succeeded.
10
+ * Returns the current Generation status. `queued` and `running` mean generation is still in
11
+ * progress. `succeeded` means generated files are saved, not that repository delivery or a Draft
12
+ * is complete. Successful results include files, or a file index when the package is too large to
13
+ * inline.
11
14
  * `GET /generations/{generation_id}`
12
15
  */
13
16
  retrieve(generationId: GenerationId, options?: RequestOptions): Promise<ApiResult<GenerationResponseRead, GenerationsRetrieveError>>;
14
17
  /**
15
18
  * Fetch one file from a generation
16
19
  *
17
- * Raw file content, for generations whose target was too large to inline (files_omitted true).
18
- * The generation's files_index lists valid paths.
20
+ * Returns one file's raw content. Use a path from `files_index` when the Generation reports
21
+ * `files_omitted: true`.
19
22
  * `GET /generations/{generation_id}/file`
20
23
  */
21
24
  retrieveFile(generationId: GenerationId, params: GenerationsRetrieveFileParams, options?: RequestOptions): Promise<ApiResult<string, GenerationsRetrieveFileError>>;
25
+ /** Poll until files are generated or the Generation fails. */
26
+ wait(generationId: GenerationId, options?: RequestOptions & {
27
+ intervalMs?: number;
28
+ waitTimeoutMs?: number;
29
+ }): Promise<ApiResult<GenerationResponseRead, GenerationsRetrieveError>>;
22
30
  }
23
31
  /** Every error `retrieve` can produce, as a discriminated union. */
24
- export type GenerationsRetrieveError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
32
+ export type GenerationsRetrieveError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
25
33
  export interface GenerationsRetrieveFileParams {
26
34
  /** Repo-relative path inside the generated package. */
27
35
  path: string;
28
36
  }
29
37
  /** Every error `retrieveFile` can produce, as a discriminated union. */
30
- export type GenerationsRetrieveFileError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
38
+ export type GenerationsRetrieveFileError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
31
39
  //# sourceMappingURL=generations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generations.d.ts","sourceRoot":"","sources":["../../src/resources/generations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,YAAY,EAAsB,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE5F,qBAAa,mBAAmB;IAClB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;OAKG;IACG,QAAQ,CACZ,YAAY,EAAE,YAAY,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,sBAAsB,EAAE,wBAAwB,CAAC,CAAC;IAiBvE;;;;;;OAMG;IACG,YAAY,CAChB,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,6BAA6B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,4BAA4B,CAAC,CAAC;CAoB5D;AAED,oEAAoE;AACpE,MAAM,MAAM,wBAAwB,GAChC,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,6BAA6B;IAC5C,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wEAAwE;AACxE,MAAM,MAAM,4BAA4B,GACpC,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
1
+ {"version":3,"file":"generations.d.ts","sourceRoot":"","sources":["../../src/resources/generations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAA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GACd,eAAe,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // typeship — generations resource.
2
- // Generated by typeship — https://typeship.dev — do not edit by hand.
3
- import { BadRequestError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError, } from "../errors.js";
2
+ // Generated by typeship — https://typeship.dev
3
+ import { BadRequestError, ForbiddenError, InternalServerError, NotFoundError, RateLimitedError, UnauthorizedError, } from "../errors.js";
4
4
  export class GenerationsResource {
5
5
  _core;
6
6
  constructor(_core) {
@@ -9,7 +9,10 @@ export class GenerationsResource {
9
9
  /**
10
10
  * Retrieve a generation
11
11
  *
12
- * Includes the generated files when the generation succeeded.
12
+ * Returns the current Generation status. `queued` and `running` mean generation is still in
13
+ * progress. `succeeded` means generated files are saved, not that repository delivery or a Draft
14
+ * is complete. Successful results include files, or a file index when the package is too large to
15
+ * inline.
13
16
  * `GET /generations/{generation_id}`
14
17
  */
15
18
  async retrieve(generationId, options) {
@@ -22,6 +25,7 @@ export class GenerationsResource {
22
25
  "403": ForbiddenError,
23
26
  "404": NotFoundError,
24
27
  "429": RateLimitedError,
28
+ "500": InternalServerError,
25
29
  },
26
30
  idempotent: true,
27
31
  schemaKey: "generations.retrieve",
@@ -31,8 +35,8 @@ export class GenerationsResource {
31
35
  /**
32
36
  * Fetch one file from a generation
33
37
  *
34
- * Raw file content, for generations whose target was too large to inline (files_omitted true).
35
- * The generation's files_index lists valid paths.
38
+ * Returns one file's raw content. Use a path from `files_index` when the Generation reports
39
+ * `files_omitted: true`.
36
40
  * `GET /generations/{generation_id}/file`
37
41
  */
38
42
  async retrieveFile(generationId, params, options) {
@@ -49,10 +53,27 @@ export class GenerationsResource {
49
53
  "403": ForbiddenError,
50
54
  "404": NotFoundError,
51
55
  "429": RateLimitedError,
56
+ "500": InternalServerError,
52
57
  },
53
58
  idempotent: true,
54
59
  schemaKey: "generations.retrieveFile",
55
60
  options,
56
61
  });
57
62
  }
63
+ /** Poll until files are generated or the Generation fails. */
64
+ async wait(generationId, options = {}) {
65
+ const { intervalMs = 1_000, waitTimeoutMs = 600_000, ...requestOptions } = options;
66
+ const deadline = Date.now() + waitTimeoutMs;
67
+ while (true) {
68
+ if (requestOptions.signal?.aborted) {
69
+ throw requestOptions.signal.reason ?? new Error("Generation wait aborted.");
70
+ }
71
+ const result = await this.retrieve(generationId, requestOptions);
72
+ if (!result.ok || (result.data.status !== "queued" && result.data.status !== "running"))
73
+ return result;
74
+ if (Date.now() >= deadline)
75
+ throw new Error("Timed out waiting for Generation " + generationId + ".");
76
+ await new Promise((resolve) => setTimeout(resolve, Math.min(intervalMs, deadline - Date.now())));
77
+ }
78
+ }
58
79
  }
@@ -1,7 +1,7 @@
1
1
  import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
2
2
  import { PagePromise } from "../core/pagination.js";
3
- import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PaymentRequiredError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
4
- import type { CreateProjectRequest, DeletedProjectRead, DiagnosticRemediationRead, DiagnosticRemediationRequest, DiagnosticReportRead, GenerationBatchRead, GenerationSummaryRead, ProjectId, ProjectRead, ProjectSummaryRead, RepositoryIntegrationHealthRead, TargetId, UpdateProjectRequest } from "../types.js";
3
+ import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PayloadTooLargeError, PaymentRequiredError, PreconditionFailedError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
4
+ import type { CreateProjectRequest, DeletedProjectRead, DiagnosticRemediationRead, DiagnosticRemediationRequest, DiagnosticReportRead, GenerateProjectRequest, GenerationBatchRead, GenerationSummaryRead, ProjectId, ProjectRead, ProjectSummaryRead, RepositoryIntegrationHealthRead, TargetId, UpdateProjectRequest } from "../types.js";
5
5
  export declare class ProjectsResource {
6
6
  private readonly _core;
7
7
  constructor(_core: HttpCore);
@@ -15,10 +15,11 @@ export declare class ProjectsResource {
15
15
  /**
16
16
  * Create a project
17
17
  *
18
- * Stores a URL- or GitHub-sourced project. Free includes one stored project, every selected
19
- * target, and the first 25 operations, while keeping manual and automatic regeneration, history,
20
- * destination pull requests, and preview checks. Stateless POST /generate does not consume this
21
- * slot. Pro adds projects and generates every operation in the Definition.
18
+ * Creates a Project from a URL or GitHub Definition.
19
+ *
20
+ * Free includes one saved Project, all selected Targets, and the first 25 operations per Target,
21
+ * with regeneration, history, delivery pull requests, and previews. Pro supports additional
22
+ * Projects and all operations. One-shot generation does not use a Project slot.
22
23
  *
23
24
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
24
25
  * `POST /projects`
@@ -27,36 +28,54 @@ export declare class ProjectsResource {
27
28
  /**
28
29
  * Retrieve a project
29
30
  *
30
- * Returns Project-owned fields only. List Targets separately for Target and Delivery data.
31
+ * Returns the Project's settings and Definition ID. List its Targets separately to retrieve
32
+ * Target configuration and Deliveries.
31
33
  * `GET /projects/{project_id}`
32
34
  */
33
35
  retrieve(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<ProjectRead, ProjectsRetrieveError>>;
34
36
  /**
35
37
  * Delete a project
38
+ *
39
+ * A `502` response means the Project was not deleted because its release pull requests could not
40
+ * be retired. Retry deletion to finish retiring the remaining reviews. Repeating a completed
41
+ * deletion returns `404`.
42
+ * See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
43
+ * and If-Match.
36
44
  * `DELETE /projects/{project_id}`
37
45
  */
38
- delete(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<DeletedProjectRead, ProjectsDeleteError>>;
46
+ delete(projectId: ProjectId, params?: ProjectsDeleteParams, options?: RequestOptions): Promise<ApiResult<DeletedProjectRead, ProjectsDeleteError>>;
39
47
  /**
40
48
  * Update a project
49
+ *
50
+ * Omitted fields keep their current values. A supplied config replaces the entire stored object;
51
+ * null or an empty object clears it.
52
+ * Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag
53
+ * returns 412 precondition_failed without saving.
54
+ *
55
+ * A `409 target_busy` means a Target is publishing. Retrieve the Project, wait for publication to
56
+ * finish, reconcile your update, and retry.
57
+ * A `502` response means the Project was saved, but an obsolete release pull request could not be
58
+ * retired. Retrieve the Project and retry the same update to finish retiring reviews if that
59
+ * update is still desired.
60
+ * See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
61
+ * and If-Match.
41
62
  * `PATCH /projects/{project_id}`
42
63
  */
43
- update(projectId: ProjectId, body: UpdateProjectRequest, options?: RequestOptions): Promise<ApiResult<ProjectRead, ProjectsUpdateError>>;
64
+ update(projectId: ProjectId, body: UpdateProjectRequest, params?: ProjectsUpdateParams, options?: RequestOptions): Promise<ApiResult<ProjectRead, ProjectsUpdateError>>;
44
65
  /**
45
66
  * Analyze a project's latest Definition Revision
46
67
  *
47
- * Runs deterministic OpenAPI or GraphQL authorship checks against the latest observed immutable
48
- * Definition Revision after applying the Definition's existing patches. Diagnostics group every
49
- * affected location under a stable rule. Exact patches are included only when Typeship can derive
50
- * the change without inventing API behavior.
68
+ * Checks the latest Definition Revision after applying its saved patches. Each finding groups
69
+ * affected locations under a stable rule ID. A suggested patch is included only when the
70
+ * Definition provides enough information to determine the correction.
51
71
  * `GET /projects/{project_id}/diagnostics`
52
72
  */
53
73
  retrieveDiagnostics(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<DiagnosticReportRead, ProjectsRetrieveDiagnosticsError>>;
54
74
  /**
55
75
  * Refresh a project's Diagnostics from its configured source
56
76
  *
57
- * Fetches the complete configured source, records a new immutable revision only when content
58
- * changed, and returns its Diagnostics. This does not generate targets or consume a metered
59
- * generation.
77
+ * Fetches the configured source and returns updated Diagnostics. Creates a Definition Revision
78
+ * only when the content changes. Does not generate Targets or use a metered generation.
60
79
  *
61
80
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
62
81
  * `POST /projects/{project_id}/diagnostics`
@@ -65,9 +84,11 @@ export declare class ProjectsResource {
65
84
  /**
66
85
  * Apply exact, reviewed diagnostic remediations
67
86
  *
68
- * Applies only deterministic patches. Repository sources receive an updateable source pull
69
- * request; URL sources receive project overlays. Diagnostics that require API-owner intent return
70
- * 422 and include an authoring_brief in the Diagnostic instead.
87
+ * Applies reviewed patches from Diagnostics. For a repository source, opens or updates a source
88
+ * pull request. For a URL source, saves Definition patches.
89
+ *
90
+ * Findings that need an API-owner decision return `422`. Read the finding's `authoring_brief` and
91
+ * update the source instead.
71
92
  *
72
93
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
73
94
  * `POST /projects/{project_id}/diagnostics/remediations`
@@ -76,9 +97,8 @@ export declare class ProjectsResource {
76
97
  /**
77
98
  * Diagnose a project's repository integrations
78
99
  *
79
- * Returns provider-neutral, machine-actionable source and destination access, Definition
80
- * readability, source-approval label setup, required status names, and the latest durable webhook
81
- * delivery. The Console renders this same result.
100
+ * Checks repository access, Definition readability, source-approval labels, and required checks.
101
+ * Includes the latest webhook delivery so you can investigate missing updates.
82
102
  * `GET /projects/{project_id}/integration-health`
83
103
  */
84
104
  retrieveIntegrationHealth(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<RepositoryIntegrationHealthRead, ProjectsRetrieveIntegrationHealthError>>;
@@ -90,97 +110,130 @@ export declare class ProjectsResource {
90
110
  */
91
111
  listGenerations(projectId: ProjectId, params?: ProjectsListGenerationsParams, options?: RequestOptions): PagePromise<GenerationSummaryRead, ProjectsListGenerationsError>;
92
112
  /**
93
- * Generate targets and open pull requests
113
+ * Start generation for active Targets
114
+ *
115
+ * Queues one Generation per active Target and returns their IDs. Retrieve each Generation until
116
+ * its status moves from `queued` to `running` and then `succeeded` or `failed`. `succeeded` means
117
+ * generated files are saved; check Delivery and Draft status separately for repository delivery
118
+ * and pull requests. A Target already queued or running is returned without starting another
119
+ * Generation. A matching Idempotency-Key replay returns the same Generations with their current
120
+ * statuses.
94
121
  *
95
- * Resolves the project's URL or GitHub source, generates every
96
- * configured delivery package, stores each result in the project's history,
97
- * and attempts to open a pull request in every configured destination.
98
- * When the complete generated tree already matches a destination, no
99
- * commit, branch, or pull request is created and that generation reports
100
- * `pr_status: no_changes`. This is the same pipeline automatic
101
- * regeneration runs after a source change.
122
+ * If the package already matches a destination and no Draft is open, delivery reports `pr_status:
123
+ * no_changes` without creating a commit, branch, or pull request. An existing Draft stays open.
124
+ * Automatic generation uses the same workflow.
102
125
  *
103
126
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
104
127
  * `POST /projects/{project_id}/generations`
105
128
  */
106
- generate(projectId: ProjectId, params?: ProjectsGenerateParams, options?: RequestOptions): Promise<ApiResult<GenerationBatchRead, ProjectsGenerateError>>;
129
+ generate(projectId: ProjectId, body?: GenerateProjectRequest, params?: ProjectsGenerateParams, options?: RequestOptions): Promise<ApiResult<GenerationBatchRead, ProjectsGenerateError>>;
107
130
  }
108
131
  export interface ProjectsListParams {
109
- /** Maximum number of resources to return. */
132
+ /**
133
+ * Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
134
+ * representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
135
+ * invalid_request. List query parameters must appear only once; unrecognized parameters also
136
+ * return 400.
137
+ */
110
138
  limit?: number;
111
139
  /**
112
140
  * Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
113
- * operation, filters, and ordering that issued it.
141
+ * operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
142
+ * malformed, or repeated cursors return 400 invalid_request. The page limit may change between
143
+ * requests.
114
144
  */
115
145
  cursor?: string;
116
146
  }
117
147
  /** Every error `list` can produce, as a discriminated union. */
118
- export type ProjectsListError = BadRequestError | UnauthorizedError | ForbiddenError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
148
+ export type ProjectsListError = BadRequestError | UnauthorizedError | ForbiddenError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
119
149
  export interface ProjectsCreateParams {
120
150
  /**
121
151
  * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
122
152
  * operation; account-less generation uses a hashed network identity. Retrying the same method,
123
- * path, query, and JSON body replays the original response. Reusing the key with changed intent
124
- * returns 409. After expiry the key starts a new write.
153
+ * path, query, If-Match header, and JSON body replays the original response. Reusing the key with
154
+ * changed intent returns 409. After expiry the key starts a new write.
125
155
  */
126
156
  idempotencyKey?: string;
127
157
  }
128
158
  /** Every error `create` can produce, as a discriminated union. */
129
159
  export type ProjectsCreateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
130
160
  /** Every error `retrieve` can produce, as a discriminated union. */
131
- export type ProjectsRetrieveError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
161
+ export type ProjectsRetrieveError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
162
+ export interface ProjectsDeleteParams {
163
+ /**
164
+ * ETag from a preceding response. The write applies only if the resource still has that version;
165
+ * otherwise it returns 412 precondition_failed without changes. Omit to write the current
166
+ * version. See https://typeship.dev/docs/typeship-api#conditional-writes.
167
+ */
168
+ ifMatch?: string;
169
+ }
132
170
  /** Every error `delete` can produce, as a discriminated union. */
133
- export type ProjectsDeleteError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
171
+ export type ProjectsDeleteError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | PreconditionFailedError | RateLimitedError | InternalServerError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
172
+ export interface ProjectsUpdateParams {
173
+ /**
174
+ * ETag from a preceding response. The write applies only if the resource still has that version;
175
+ * otherwise it returns 412 precondition_failed without changes. Omit to write the current
176
+ * version. See https://typeship.dev/docs/typeship-api#conditional-writes.
177
+ */
178
+ ifMatch?: string;
179
+ }
134
180
  /** Every error `update` can produce, as a discriminated union. */
135
- export type ProjectsUpdateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
181
+ export type ProjectsUpdateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | PreconditionFailedError | UnprocessableEntityError | RateLimitedError | InternalServerError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
136
182
  /** Every error `retrieveDiagnostics` can produce, as a discriminated union. */
137
- export type ProjectsRetrieveDiagnosticsError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
183
+ export type ProjectsRetrieveDiagnosticsError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
138
184
  export interface ProjectsRefreshDiagnosticsParams {
139
185
  /**
140
186
  * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
141
187
  * operation; account-less generation uses a hashed network identity. Retrying the same method,
142
- * path, query, and JSON body replays the original response. Reusing the key with changed intent
143
- * returns 409. After expiry the key starts a new write.
188
+ * path, query, If-Match header, and JSON body replays the original response. Reusing the key with
189
+ * changed intent returns 409. After expiry the key starts a new write.
144
190
  */
145
191
  idempotencyKey?: string;
146
192
  }
147
193
  /** Every error `refreshDiagnostics` can produce, as a discriminated union. */
148
- export type ProjectsRefreshDiagnosticsError = UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
194
+ export type ProjectsRefreshDiagnosticsError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
149
195
  export interface ProjectsRemediateDiagnosticsParams {
150
196
  /**
151
197
  * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
152
198
  * operation; account-less generation uses a hashed network identity. Retrying the same method,
153
- * path, query, and JSON body replays the original response. Reusing the key with changed intent
154
- * returns 409. After expiry the key starts a new write.
199
+ * path, query, If-Match header, and JSON body replays the original response. Reusing the key with
200
+ * changed intent returns 409. After expiry the key starts a new write.
155
201
  */
156
202
  idempotencyKey?: string;
157
203
  }
158
204
  /** Every error `remediateDiagnostics` can produce, as a discriminated union. */
159
- export type ProjectsRemediateDiagnosticsError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
205
+ export type ProjectsRemediateDiagnosticsError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
160
206
  /** Every error `retrieveIntegrationHealth` can produce, as a discriminated union. */
161
- export type ProjectsRetrieveIntegrationHealthError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
207
+ export type ProjectsRetrieveIntegrationHealthError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
162
208
  export interface ProjectsListGenerationsParams {
163
- /** Maximum number of resources to return. */
209
+ /**
210
+ * Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
211
+ * representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
212
+ * invalid_request. List query parameters must appear only once; unrecognized parameters also
213
+ * return 400.
214
+ */
164
215
  limit?: number;
165
216
  /**
166
217
  * Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
167
- * operation, filters, and ordering that issued it.
218
+ * operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
219
+ * malformed, or repeated cursors return 400 invalid_request. The page limit may change between
220
+ * requests.
168
221
  */
169
222
  cursor?: string;
170
223
  /** Only generations for this persisted Target. */
171
224
  targetId?: TargetId;
172
225
  }
173
226
  /** Every error `listGenerations` can produce, as a discriminated union. */
174
- export type ProjectsListGenerationsError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
227
+ export type ProjectsListGenerationsError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
175
228
  export interface ProjectsGenerateParams {
176
229
  /**
177
230
  * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
178
231
  * operation; account-less generation uses a hashed network identity. Retrying the same method,
179
- * path, query, and JSON body replays the original response. Reusing the key with changed intent
180
- * returns 409. After expiry the key starts a new write.
232
+ * path, query, If-Match header, and JSON body replays the original response. Reusing the key with
233
+ * changed intent returns 409. After expiry the key starts a new write.
181
234
  */
182
235
  idempotencyKey?: string;
183
236
  }
184
237
  /** Every error `generate` can produce, as a discriminated union. */
185
- export type ProjectsGenerateError = UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
238
+ export type ProjectsGenerateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | PayloadTooLargeError | UnprocessableEntityError | RateLimitedError | InternalServerError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
186
239
  //# sourceMappingURL=projects.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/resources/projects.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,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a,GACb,wBAAwB,GACxB,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
1
+ {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/resources/projects.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EAElB,yBAAyB,EACzB,4BAA4B,EAE5B,oBAAoB,EACpB,sBAAsB,EAEtB,mBAAmB,EAInB,qBAAqB,EAErB,SAAS,EAGT,WAAW,EAEX,kBAAkB,EAElB,+BAA+B,EAC/B,QAAQ,EACR,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAErB,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;OAKG;IACH,IAAI,CACF,MAAM,CAAC,EAAE,kBAAkB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;IA6BrD;;;;;;;;;;;OAWG;IACG,MAAM,CACV,IAAI,EAAE,oBAAoB,EAC1B,MAAM,CAAC,EAAE,oBAAoB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;IAyBvD;;;;;;OAMG;I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