@typeship-ax/cli 0.22.0 → 0.23.1

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 (138) hide show
  1. package/AGENTS.md +12 -8
  2. package/README.md +14 -27
  3. package/api.json +8898 -9026
  4. package/api.md +369 -327
  5. package/dist/arguments.d.ts +47 -0
  6. package/dist/arguments.d.ts.map +1 -0
  7. package/dist/arguments.js +254 -0
  8. package/dist/cli-agent.d.ts +31 -8
  9. package/dist/cli-agent.d.ts.map +1 -1
  10. package/dist/cli-agent.js +146 -28
  11. package/dist/cli.js +483 -237
  12. package/dist/core/http.d.ts +162 -19
  13. package/dist/core/http.d.ts.map +1 -1
  14. package/dist/core/http.js +381 -48
  15. package/dist/core/pagination.d.ts +42 -6
  16. package/dist/core/pagination.d.ts.map +1 -1
  17. package/dist/core/pagination.js +111 -17
  18. package/dist/credential-storage.d.ts +10 -3
  19. package/dist/credential-storage.d.ts.map +1 -1
  20. package/dist/credential-storage.js +15 -6
  21. package/dist/dates.d.ts +1 -1
  22. package/dist/dates.js +1 -1
  23. package/dist/errors.d.ts +20 -84
  24. package/dist/errors.d.ts.map +1 -1
  25. package/dist/errors.js +20 -108
  26. package/dist/fields.d.ts +29 -0
  27. package/dist/fields.d.ts.map +1 -0
  28. package/dist/fields.js +101 -0
  29. package/dist/index.d.ts +28 -18
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +35 -25
  32. package/dist/named-credentials.d.ts +19 -0
  33. package/dist/named-credentials.d.ts.map +1 -1
  34. package/dist/named-credentials.js +81 -1
  35. package/dist/oauth-login.d.ts +8 -2
  36. package/dist/oauth-login.d.ts.map +1 -1
  37. package/dist/oauth-login.js +31 -19
  38. package/dist/oauth-request.d.ts +7 -1
  39. package/dist/oauth-request.d.ts.map +1 -1
  40. package/dist/oauth-request.js +26 -4
  41. package/dist/oauth-session.d.ts +13 -1
  42. package/dist/oauth-session.d.ts.map +1 -1
  43. package/dist/oauth-session.js +34 -18
  44. package/dist/ops.d.ts +53 -5
  45. package/dist/ops.d.ts.map +1 -1
  46. package/dist/ops.js +49 -40
  47. package/dist/polling-login.d.ts +8 -2
  48. package/dist/polling-login.d.ts.map +1 -1
  49. package/dist/polling-login.js +25 -11
  50. package/dist/resources/api-keys.d.ts +10 -7
  51. package/dist/resources/api-keys.d.ts.map +1 -1
  52. package/dist/resources/api-keys.js +10 -31
  53. package/dist/resources/deliveries.d.ts +88 -4
  54. package/dist/resources/deliveries.d.ts.map +1 -1
  55. package/dist/resources/deliveries.js +95 -18
  56. package/dist/resources/drafts.d.ts +15 -15
  57. package/dist/resources/drafts.d.ts.map +1 -1
  58. package/dist/resources/drafts.js +11 -64
  59. package/dist/resources/files.d.ts +4 -4
  60. package/dist/resources/files.d.ts.map +1 -1
  61. package/dist/resources/files.js +3 -12
  62. package/dist/resources/generations.d.ts +14 -14
  63. package/dist/resources/generations.d.ts.map +1 -1
  64. package/dist/resources/generations.js +21 -45
  65. package/dist/resources/organization.d.ts +4 -4
  66. package/dist/resources/organization.d.ts.map +1 -1
  67. package/dist/resources/organization.js +3 -10
  68. package/dist/resources/{generate.d.ts → packages.d.ts} +16 -16
  69. package/dist/resources/packages.d.ts.map +1 -0
  70. package/dist/resources/{generate.js → packages.js} +13 -29
  71. package/dist/resources/projects.d.ts +50 -50
  72. package/dist/resources/projects.d.ts.map +1 -1
  73. package/dist/resources/projects.js +60 -116
  74. package/dist/resources/releases.d.ts +21 -16
  75. package/dist/resources/releases.d.ts.map +1 -1
  76. package/dist/resources/releases.js +18 -39
  77. package/dist/resources/spec-revisions.d.ts +15 -6
  78. package/dist/resources/spec-revisions.d.ts.map +1 -1
  79. package/dist/resources/spec-revisions.js +6 -28
  80. package/dist/resources/specs.d.ts +7 -7
  81. package/dist/resources/specs.d.ts.map +1 -1
  82. package/dist/resources/specs.js +6 -34
  83. package/dist/resources/targets.d.ts +48 -48
  84. package/dist/resources/targets.d.ts.map +1 -1
  85. package/dist/resources/targets.js +58 -114
  86. package/dist/schemas.d.ts.map +1 -1
  87. package/dist/schemas.js +83 -81
  88. package/dist/search.d.ts +54 -0
  89. package/dist/search.d.ts.map +1 -0
  90. package/dist/search.js +421 -0
  91. package/dist/types.d.ts +499 -339
  92. package/dist/types.d.ts.map +1 -1
  93. package/dist/types.js +18 -18
  94. package/package.json +5 -2
  95. package/src/arguments.ts +242 -0
  96. package/src/cli-agent.ts +156 -30
  97. package/src/cli.ts +444 -211
  98. package/src/core/http.ts +457 -58
  99. package/src/core/pagination.ts +129 -18
  100. package/src/credential-storage.ts +16 -6
  101. package/src/dates.ts +1 -1
  102. package/src/errors.ts +46 -115
  103. package/src/fields.ts +91 -0
  104. package/src/index.ts +45 -28
  105. package/src/named-credentials.ts +66 -1
  106. package/src/oauth-login.ts +36 -21
  107. package/src/oauth-request.ts +32 -6
  108. package/src/oauth-session.ts +37 -19
  109. package/src/ops.ts +82 -44
  110. package/src/polling-login.ts +24 -11
  111. package/src/resources/api-keys.ts +34 -48
  112. package/src/resources/deliveries.ts +211 -30
  113. package/src/resources/drafts.ts +60 -107
  114. package/src/resources/files.ts +19 -20
  115. package/src/resources/generations.ts +57 -75
  116. package/src/resources/organization.ts +11 -16
  117. package/src/resources/{generate.ts → packages.ts} +43 -51
  118. package/src/resources/projects.ts +145 -200
  119. package/src/resources/releases.ts +48 -65
  120. package/src/resources/spec-revisions.ts +38 -47
  121. package/src/resources/specs.ts +39 -59
  122. package/src/resources/targets.ts +143 -193
  123. package/src/schemas.ts +83 -81
  124. package/src/search.ts +434 -0
  125. package/src/types.ts +538 -357
  126. package/dist/console-login-check.d.ts +0 -21
  127. package/dist/console-login-check.d.ts.map +0 -1
  128. package/dist/console-login-check.js +0 -107
  129. package/dist/console-login-contract.d.ts +0 -45
  130. package/dist/console-login-contract.d.ts.map +0 -1
  131. package/dist/console-login-contract.js +0 -40
  132. package/dist/resources/generate.d.ts.map +0 -1
  133. package/dist/resources/publications.d.ts +0 -47
  134. package/dist/resources/publications.d.ts.map +0 -1
  135. package/dist/resources/publications.js +0 -70
  136. package/src/console-login-check.ts +0 -88
  137. package/src/console-login-contract.ts +0 -65
  138. package/src/resources/publications.ts +0 -140
@@ -1,14 +1,13 @@
1
- // typeship — releases resource.
2
- // Generated by typeship — https://typeship.dev
1
+ // Typeship — releases resource.
2
+ // Generated by Typeship — https://typeship.dev
3
3
  import { paginate } from "../core/pagination.js";
4
- import { BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, RateLimitedError, UnauthorizedError, } from "../errors.js";
5
4
  export class ReleasesResource {
6
5
  _core;
7
6
  constructor(_core) {
8
7
  this._core = _core;
9
8
  }
10
9
  /**
11
- * List releases
10
+ * List Releases
12
11
  *
13
12
  * Auto-paginates: `for await (const item of …)` walks every page.
14
13
  * `GET /releases`
@@ -23,14 +22,6 @@ export class ReleasesResource {
23
22
  cursor: params?.cursor,
24
23
  target_id: params?.targetId,
25
24
  },
26
- errors: {
27
- "400": BadRequestError,
28
- "401": UnauthorizedError,
29
- "403": ForbiddenError,
30
- "404": NotFoundError,
31
- "429": RateLimitedError,
32
- "500": InternalServerError,
33
- },
34
25
  idempotent: true,
35
26
  schemaKey: "releases.list",
36
27
  options,
@@ -44,7 +35,7 @@ export class ReleasesResource {
44
35
  });
45
36
  }
46
37
  /**
47
- * Get an immutable release
38
+ * Get a Release
48
39
  * `GET /releases/{release_id}`
49
40
  */
50
41
  async get(releaseId, options) {
@@ -52,50 +43,38 @@ export class ReleasesResource {
52
43
  method: "GET",
53
44
  path: `/releases/${encodeURIComponent(String(releaseId))}`,
54
45
  security: [{ "apiKey": [] }],
55
- errors: {
56
- "401": UnauthorizedError,
57
- "403": ForbiddenError,
58
- "404": NotFoundError,
59
- "429": RateLimitedError,
60
- "500": InternalServerError,
61
- },
62
46
  idempotent: true,
63
47
  schemaKey: "releases.get",
64
48
  options,
65
49
  });
66
50
  }
67
51
  /**
68
- * Retry publishing an exact release
52
+ * Retry publishing a Release
69
53
  *
70
- * Retries publishing the specified release through its repository workflow. Uses that release's
71
- * version and accepted commit, even if a newer Draft or release exists.
54
+ * Queues every failed or queued Publication of the release and starts its repository publishing
55
+ * workflow again. Publishing uses that release's version and accepted commit, even if a newer
56
+ * Draft or release exists. Completed Publications are not repeated.
72
57
  *
73
- * A `502 repository_unavailable` means the repository publishing workflow could not be
74
- * dispatched, and nothing was changed.
58
+ * Returns `202` with the Release. Get the Release until each Publication reaches `completed` or
59
+ * `failed`.
60
+ *
61
+ * A `409 publication_not_retryable` means no Publication is queued or failed. A `502
62
+ * repository_unavailable` means the repository publishing workflow could not be dispatched, and
63
+ * nothing was changed.
75
64
  *
76
65
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
77
- * `POST /releases/{release_id}/republish`
66
+ * `POST /releases/{release_id}/retry`
78
67
  */
79
- async republish(releaseId, params, options) {
68
+ async retry(releaseId, params, options) {
80
69
  return this._core.requestData({
81
70
  method: "POST",
82
- path: `/releases/${encodeURIComponent(String(releaseId))}/republish`,
71
+ path: `/releases/${encodeURIComponent(String(releaseId))}/retry`,
83
72
  security: [{ "apiKey": [] }],
84
73
  headers: {
85
74
  "Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
86
75
  },
87
- errors: {
88
- "400": BadRequestError,
89
- "401": UnauthorizedError,
90
- "403": ForbiddenError,
91
- "404": NotFoundError,
92
- "409": ConflictError,
93
- "429": RateLimitedError,
94
- "500": InternalServerError,
95
- "502": BadGatewayError,
96
- },
97
76
  idempotencyKey: "Idempotency-Key",
98
- schemaKey: "releases.republish",
77
+ schemaKey: "releases.retry",
99
78
  options,
100
79
  });
101
80
  }
@@ -1,7 +1,7 @@
1
1
  import { HttpCore, type RequestOptions } from "../core/http.js";
2
2
  import { PagePromise } from "../core/pagination.js";
3
- import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError, InternalServerError, NotFoundError, RateLimitedError, UnauthorizedError } from "../errors.js";
4
- import type { SpecId, SpecRevisionFileRead, SpecRevisionId, SpecRevisionRead, SpecRevisionResponseRead } from "../types.js";
3
+ import { RateLimitError, ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError, NotFoundError, ServerError, UnauthorizedError } from "../errors.js";
4
+ import type { ErrorModelRead, SpecId, SpecRevisionFileRead, SpecRevisionId, SpecRevisionRead, SpecRevisionResponseRead } from "../types.js";
5
5
  export declare class SpecRevisionsResource {
6
6
  private readonly _core;
7
7
  constructor(_core: HttpCore);
@@ -20,7 +20,9 @@ export declare class SpecRevisionsResource {
20
20
  *
21
21
  * Returns metadata for a saved Spec Revision with a Diagnostics summary. Pass
22
22
  * `include=diagnostics` to add every Diagnostic, evaluated with the Spec's current patches and
23
- * Diagnostic policy. List its source files and resolved document with listSpecRevisionFiles.
23
+ * Diagnostic policy. Add `filter=blocking` to receive only the locations that fail the policy,
24
+ * which is what to fix when `diagnostic_summary.status` is blocked. List its source files and
25
+ * resolved document with listSpecRevisionFiles.
24
26
  * `GET /spec-revisions/{spec_revision_id}`
25
27
  */
26
28
  get(specRevisionId: SpecRevisionId, params?: SpecRevisionsGetParams, options?: RequestOptions): Promise<SpecRevisionResponseRead>;
@@ -55,16 +57,23 @@ export interface SpecRevisionsListParams {
55
57
  specId?: SpecId;
56
58
  }
57
59
  /** Typed errors `list` can throw. */
58
- export type SpecRevisionsListError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
60
+ export type SpecRevisionsListError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
59
61
  export interface SpecRevisionsGetParams {
60
62
  /**
61
63
  * Add related data to the response. `diagnostics` adds the `diagnostics` and `patch_diagnostics`
62
64
  * arrays.
63
65
  */
64
66
  include?: "diagnostics";
67
+ /**
68
+ * Narrow the included Diagnostics to matching locations. Requires include=diagnostics. blocking:
69
+ * locations that fail the Diagnostic policy. introduced: locations new since the baseline. A
70
+ * Diagnostic with no matching location is omitted. diagnostic_summary always describes the
71
+ * complete revision.
72
+ */
73
+ filter?: "blocking" | "introduced";
65
74
  }
66
75
  /** Typed errors `get` can throw. */
67
- export type SpecRevisionsGetError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
76
+ export type SpecRevisionsGetError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
68
77
  export interface SpecRevisionsListFilesParams {
69
78
  /**
70
79
  * Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
@@ -83,5 +92,5 @@ export interface SpecRevisionsListFilesParams {
83
92
  cursor?: string;
84
93
  }
85
94
  /** Typed errors `listFiles` can throw. */
86
- export type SpecRevisionsListFilesError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
95
+ export type SpecRevisionsListFilesError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
87
96
  //# sourceMappingURL=spec-revisions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec-revisions.d.ts","sourceRoot":"","sources":["../../src/resources/spec-revisions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAA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d,eAAe,CAAC;AAEpB,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,oCAAoC;AACpC,MAAM,MAAM,qBAAqB,GAC7B,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,4BAA4B;IAC3C;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,0CAA0C;AAC1C,MAAM,MAAM,2BAA2B,GACnC,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
1
+ {"version":3,"file":"spec-revisions.d.ts","sourceRoot":"","sources":["../../src/resources/spec-revisions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,WAAW,EACX,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAEV,cAAc,EACd,MAAM,EAKN,oBAAoB,EACpB,cAAc,EAGd,gBAAgB,EAEhB,wBAAwB,EACzB,MAAM,aAAa,CAAC;AAErB,qBAAa,qBAAqB;IACpB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;;;;OAQG;IACH,IAAI,CACF,MAAM,CAAC,EAAE,uBAAuB,EAChC,OAAO,CAAC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C,cAAc,CAAC,GAC3B,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,4BAA4B;IAC3C;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,0CAA0C;AAC1C,MAAM,MAAM,2BAA2B,GACnC,eAAe,CAAC,cAAc,CAAC,GAC/B,iBAAiB,CAAC,cAAc,CAAC,GACjC,cAAc,CAAC,cAAc,CAAC,GAC9B,aAAa,CAAC,cAAc,CAAC,GAC7B,cAAc,CAAC,cAAc,CAAC,GAC9B,WAAW,CAAC,cAAc,CAAC,GAC3B,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
@@ -1,7 +1,6 @@
1
- // typeship — specRevisions resource.
2
- // Generated by typeship — https://typeship.dev
1
+ // Typeship — specRevisions resource.
2
+ // Generated by Typeship — https://typeship.dev
3
3
  import { paginate } from "../core/pagination.js";
4
- import { BadRequestError, ForbiddenError, InternalServerError, NotFoundError, RateLimitedError, UnauthorizedError, } from "../errors.js";
5
4
  export class SpecRevisionsResource {
6
5
  _core;
7
6
  constructor(_core) {
@@ -26,14 +25,6 @@ export class SpecRevisionsResource {
26
25
  cursor: params?.cursor,
27
26
  spec_id: params?.specId,
28
27
  },
29
- errors: {
30
- "400": BadRequestError,
31
- "401": UnauthorizedError,
32
- "403": ForbiddenError,
33
- "404": NotFoundError,
34
- "429": RateLimitedError,
35
- "500": InternalServerError,
36
- },
37
28
  idempotent: true,
38
29
  schemaKey: "specRevisions.list",
39
30
  options,
@@ -51,7 +42,9 @@ export class SpecRevisionsResource {
51
42
  *
52
43
  * Returns metadata for a saved Spec Revision with a Diagnostics summary. Pass
53
44
  * `include=diagnostics` to add every Diagnostic, evaluated with the Spec's current patches and
54
- * Diagnostic policy. List its source files and resolved document with listSpecRevisionFiles.
45
+ * Diagnostic policy. Add `filter=blocking` to receive only the locations that fail the policy,
46
+ * which is what to fix when `diagnostic_summary.status` is blocked. List its source files and
47
+ * resolved document with listSpecRevisionFiles.
55
48
  * `GET /spec-revisions/{spec_revision_id}`
56
49
  */
57
50
  async get(specRevisionId, params, options) {
@@ -61,14 +54,7 @@ export class SpecRevisionsResource {
61
54
  security: [{ "apiKey": [] }],
62
55
  query: {
63
56
  include: params?.include,
64
- },
65
- errors: {
66
- "400": BadRequestError,
67
- "401": UnauthorizedError,
68
- "403": ForbiddenError,
69
- "404": NotFoundError,
70
- "429": RateLimitedError,
71
- "500": InternalServerError,
57
+ filter: params?.filter,
72
58
  },
73
59
  idempotent: true,
74
60
  schemaKey: "specRevisions.get",
@@ -93,14 +79,6 @@ export class SpecRevisionsResource {
93
79
  limit: params?.limit,
94
80
  cursor: params?.cursor,
95
81
  },
96
- errors: {
97
- "400": BadRequestError,
98
- "401": UnauthorizedError,
99
- "403": ForbiddenError,
100
- "404": NotFoundError,
101
- "429": RateLimitedError,
102
- "500": InternalServerError,
103
- },
104
82
  idempotent: true,
105
83
  schemaKey: "specRevisions.listFiles",
106
84
  options,
@@ -1,6 +1,6 @@
1
1
  import { HttpCore, type RequestOptions } from "../core/http.js";
2
- import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PreconditionFailedError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
3
- import type { SpecId, SpecRead, SpecUpdateRequest } from "../types.js";
2
+ import { RateLimitError, ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ConflictError, ForbiddenError, NotFoundError, PreconditionFailedError, ServerError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
3
+ import type { ErrorModelRead, SpecId, SpecRead, SpecUpdateRequest } from "../types.js";
4
4
  export declare class SpecsResource {
5
5
  private readonly _core;
6
6
  constructor(_core: HttpCore);
@@ -10,7 +10,7 @@ export declare class SpecsResource {
10
10
  */
11
11
  get(specId: SpecId, options?: RequestOptions): Promise<SpecRead>;
12
12
  /**
13
- * Update and resolve a Spec
13
+ * Update a Spec
14
14
  *
15
15
  * Resolves the source files before saving the update and records a new Spec Revision when the
16
16
  * source changes.
@@ -28,7 +28,7 @@ export declare class SpecsResource {
28
28
  */
29
29
  update(specId: SpecId, body: SpecUpdateRequest, params?: SpecsUpdateParams, options?: RequestOptions): Promise<SpecRead>;
30
30
  /**
31
- * Refresh a Spec from its configured source
31
+ * Refresh a Spec
32
32
  *
33
33
  * Fetches the configured source now and creates a new Spec Revision only when its content
34
34
  * changes. Diagnostics then reads that revision. If automatic generation is enabled, refresh
@@ -41,7 +41,7 @@ export declare class SpecsResource {
41
41
  refresh(specId: SpecId, params?: SpecsRefreshParams, options?: RequestOptions): Promise<SpecRead>;
42
42
  }
43
43
  /** Typed errors `get` can throw. */
44
- export type SpecsGetError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
44
+ export type SpecsGetError = UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
45
45
  export interface SpecsUpdateParams {
46
46
  /**
47
47
  * ETag from a preceding response. The write applies only if the resource still has that version;
@@ -58,7 +58,7 @@ export interface SpecsUpdateParams {
58
58
  idempotencyKey?: string;
59
59
  }
60
60
  /** Typed errors `update` can throw. */
61
- export type SpecsUpdateError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | PreconditionFailedError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
61
+ export type SpecsUpdateError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | PreconditionFailedError | UnprocessableEntityError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
62
62
  export interface SpecsRefreshParams {
63
63
  /**
64
64
  * Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
@@ -69,5 +69,5 @@ export interface SpecsRefreshParams {
69
69
  idempotencyKey?: string;
70
70
  }
71
71
  /** Typed errors `refresh` can throw. */
72
- export type SpecsRefreshError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
72
+ export type SpecsRefreshError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | UnprocessableEntityError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
73
73
  //# sourceMappingURL=specs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"specs.d.ts","sourceRoot":"","sources":["../../src/resources/specs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAQ,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE7E,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAA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,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,uCAAuC;AACvC,MAAM,MAAM,gBAAgB,GACxB,eAAe,CAAC,cAAc,CAAC,GAC/B,iBAAiB,CAAC,cAAc,CAAC,GACjC,cAAc,CAAC,cAAc,CAAC,GAC9B,aAAa,CAAC,cAAc,CAAC,GAC7B,aAAa,CAAC,cAAc,CAAC,GAC7B,uBAAuB,GACvB,wBAAwB,CAAC,cAAc,CAAC,GACxC,cAAc,CAAC,cAAc,CAAC,GAC9B,WAAW,CAAC,cAAc,CAAC,GAC3B,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wCAAwC;AACxC,MAAM,MAAM,iBAAiB,GACzB,eAAe,CAAC,cAAc,CAAC,GAC/B,iBAAiB,CAAC,cAAc,CAAC,GACjC,cAAc,CAAC,cAAc,CAAC,GAC9B,aAAa,CAAC,cAAc,CAAC,GAC7B,aAAa,CAAC,cAAc,CAAC,GAC7B,wBAAwB,CAAC,cAAc,CAAC,GACxC,cAAc,CAAC,cAAc,CAAC,GAC9B,WAAW,CAAC,cAAc,CAAC,GAC3B,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
@@ -1,6 +1,6 @@
1
- // typeship — specs resource.
2
- // Generated by typeship — https://typeship.dev
3
- import { BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PreconditionFailedError, RateLimitedError, UnauthorizedError, UnprocessableEntityError, } from "../errors.js";
1
+ // Typeship — specs resource.
2
+ // Generated by Typeship — https://typeship.dev
3
+ import { PreconditionFailedError, } from "../errors.js";
4
4
  export class SpecsResource {
5
5
  _core;
6
6
  constructor(_core) {
@@ -15,20 +15,13 @@ export class SpecsResource {
15
15
  method: "GET",
16
16
  path: `/specs/${encodeURIComponent(String(specId))}`,
17
17
  security: [{ "apiKey": [] }],
18
- errors: {
19
- "401": UnauthorizedError,
20
- "403": ForbiddenError,
21
- "404": NotFoundError,
22
- "429": RateLimitedError,
23
- "500": InternalServerError,
24
- },
25
18
  idempotent: true,
26
19
  schemaKey: "specs.get",
27
20
  options,
28
21
  });
29
22
  }
30
23
  /**
31
- * Update and resolve a Spec
24
+ * Update a Spec
32
25
  *
33
26
  * Resolves the source files before saving the update and records a new Spec Revision when the
34
27
  * source changes.
@@ -54,24 +47,14 @@ export class SpecsResource {
54
47
  "Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
55
48
  },
56
49
  body,
57
- errors: {
58
- "400": BadRequestError,
59
- "401": UnauthorizedError,
60
- "403": ForbiddenError,
61
- "404": NotFoundError,
62
- "409": ConflictError,
63
- "412": PreconditionFailedError,
64
- "422": UnprocessableEntityError,
65
- "429": RateLimitedError,
66
- "500": InternalServerError,
67
- },
50
+ errors: { "412": PreconditionFailedError },
68
51
  idempotencyKey: "Idempotency-Key",
69
52
  schemaKey: "specs.update",
70
53
  options,
71
54
  });
72
55
  }
73
56
  /**
74
- * Refresh a Spec from its configured source
57
+ * Refresh a Spec
75
58
  *
76
59
  * Fetches the configured source now and creates a new Spec Revision only when its content
77
60
  * changes. Diagnostics then reads that revision. If automatic generation is enabled, refresh
@@ -89,17 +72,6 @@ export class SpecsResource {
89
72
  headers: {
90
73
  "Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
91
74
  },
92
- errors: {
93
- "400": BadRequestError,
94
- "401": UnauthorizedError,
95
- "403": ForbiddenError,
96
- "404": NotFoundError,
97
- "409": ConflictError,
98
- "422": UnprocessableEntityError,
99
- "429": RateLimitedError,
100
- "500": InternalServerError,
101
- "502": BadGatewayError,
102
- },
103
75
  idempotencyKey: "Idempotency-Key",
104
76
  schemaKey: "specs.refresh",
105
77
  options,
@@ -1,19 +1,12 @@
1
1
  import { HttpCore, 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, PreconditionFailedError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
4
- import type { DeletedTargetRead, ProjectId, ReleaseResponseRead, TargetAdoption, TargetCreateRequest, TargetId, TargetRead, TargetResponseRead, TargetUpdateRequest } from "../types.js";
3
+ import { RateLimitError, ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ConflictError, ForbiddenError, NotFoundError, PaymentRequiredError, PreconditionFailedError, ServerError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
4
+ import type { DeletedTargetRead, ErrorModelRead, ProjectId, ReleaseResponseRead, TargetAdoption, TargetCreateRequest, TargetId, TargetRead, TargetResponseRead, TargetUpdateRequest } from "../types.js";
5
5
  export declare class TargetsResource {
6
6
  private readonly _core;
7
7
  constructor(_core: HttpCore);
8
8
  /**
9
- * List Targets
10
- *
11
- * Auto-paginates: `for await (const item of …)` walks every page.
12
- * `GET /targets`
13
- */
14
- list(params?: TargetsListParams, options?: RequestOptions): PagePromise<TargetRead, TargetsListError>;
15
- /**
16
- * Create an independently configured Target
9
+ * Create a Target
17
10
  *
18
11
  * Creates a Target with its own configuration, Deliveries, and release history. Multiple Targets
19
12
  * can use the same generator.
@@ -22,30 +15,25 @@ export declare class TargetsResource {
22
15
  * `POST /targets`
23
16
  */
24
17
  create(body: TargetCreateRequest, params?: TargetsCreateParams, options?: RequestOptions): Promise<TargetResponseRead>;
18
+ /**
19
+ * List Targets
20
+ *
21
+ * Auto-paginates: `for await (const item of …)` walks every page.
22
+ * `GET /targets`
23
+ */
24
+ list(params?: TargetsListParams, options?: RequestOptions): PagePromise<TargetRead, TargetsListError>;
25
25
  /**
26
26
  * Get a Target
27
27
  * `GET /targets/{target_id}`
28
28
  */
29
29
  get(targetId: TargetId, options?: RequestOptions): Promise<TargetResponseRead>;
30
30
  /**
31
- * Delete an unused Target
32
- *
33
- * Deletes a Target with no Generation history, release history, or active Draft. A `409
34
- * resource_has_dependencies` means one of those resources still depends on it. Retrieve the
35
- * Target, disable it instead, or resolve the dependency before retrying.
36
- *
37
- * See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
38
- * and If-Match.
39
- * `DELETE /targets/{target_id}`
40
- */
41
- delete(targetId: TargetId, params?: TargetsDeleteParams, options?: RequestOptions): Promise<DeletedTargetRead>;
42
- /**
43
- * Update a Target or its Deliveries
31
+ * Update a Target
44
32
  *
45
- * Omitted fields keep their current values. Supplied config, checks, and deliveries replace their
46
- * complete stored values.
47
- * With Project auto_generate enabled, changing Target config, checks, or Deliveries queues that
48
- * Target's Generation. A queued or running Target reuses that Generation.
33
+ * Omitted fields keep their current values. Supplied config and checks replace their complete
34
+ * stored values. Change Deliveries with createDelivery, updateDelivery, and deleteDelivery.
35
+ * With Project auto_generate enabled, changing Target config or checks queues that Target's
36
+ * Generation. A queued or running Target reuses that Generation.
49
37
  * Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag
50
38
  * returns 412 precondition_failed without saving.
51
39
  * Select the next version through PATCH /drafts/{draft_id} on the Target's draft_id.
@@ -62,7 +50,19 @@ export declare class TargetsResource {
62
50
  */
63
51
  update(targetId: TargetId, body: TargetUpdateRequest, params?: TargetsUpdateParams, options?: RequestOptions): Promise<TargetResponseRead>;
64
52
  /**
65
- * Adopt a verified existing package as the latest release
53
+ * Delete a Target
54
+ *
55
+ * Deletes a Target with no Generation history, release history, or active Draft. A `409
56
+ * resource_has_dependencies` means one of those resources still depends on it. Retrieve the
57
+ * Target, disable it instead, or resolve the dependency before retrying.
58
+ *
59
+ * See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
60
+ * and If-Match.
61
+ * `DELETE /targets/{target_id}`
62
+ */
63
+ delete(targetId: TargetId, params?: TargetsDeleteParams, options?: RequestOptions): Promise<DeletedTargetRead>;
64
+ /**
65
+ * Adopt a package release
66
66
  *
67
67
  * Checks the repository tag, package metadata, and registry artifact, then records the package as
68
68
  * an Imported latest release. Opens the first Typeship Draft at the next major version; review it
@@ -73,6 +73,17 @@ export declare class TargetsResource {
73
73
  */
74
74
  adopt(targetId: TargetId, body: TargetAdoption, params?: TargetsAdoptParams, options?: RequestOptions): Promise<ReleaseResponseRead>;
75
75
  }
76
+ export interface TargetsCreateParams {
77
+ /**
78
+ * Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
79
+ * and operation; generation without an organization uses a hashed network identity. Retrying the
80
+ * same method, path, query, If-Match header, and JSON body replays the original response. Reusing
81
+ * the key with changed intent returns 409. After expiry the key starts a new write.
82
+ */
83
+ idempotencyKey?: string;
84
+ }
85
+ /** Typed errors `create` can throw. */
86
+ export type TargetsCreateError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | PaymentRequiredError | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | UnprocessableEntityError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
76
87
  export interface TargetsListParams {
77
88
  /**
78
89
  * Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
@@ -93,21 +104,10 @@ export interface TargetsListParams {
93
104
  projectId?: ProjectId;
94
105
  }
95
106
  /** Typed errors `list` can throw. */
96
- export type TargetsListError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
97
- export interface TargetsCreateParams {
98
- /**
99
- * Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
100
- * and operation; generation without an organization uses a hashed network identity. Retrying the
101
- * same method, path, query, If-Match header, and JSON body replays the original response. Reusing
102
- * the key with changed intent returns 409. After expiry the key starts a new write.
103
- */
104
- idempotencyKey?: string;
105
- }
106
- /** Typed errors `create` can throw. */
107
- export type TargetsCreateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
107
+ export type TargetsListError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
108
108
  /** Typed errors `get` can throw. */
109
- export type TargetsGetError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
110
- export interface TargetsDeleteParams {
109
+ export type TargetsGetError = UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
110
+ export interface TargetsUpdateParams {
111
111
  /**
112
112
  * ETag from a preceding response. The write applies only if the resource still has that version;
113
113
  * otherwise it returns 412 precondition_failed without changes. Omit to write the current
@@ -115,9 +115,9 @@ export interface TargetsDeleteParams {
115
115
  */
116
116
  ifMatch?: string;
117
117
  }
118
- /** Typed errors `delete` can throw. */
119
- export type TargetsDeleteError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | PreconditionFailedError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
120
- export interface TargetsUpdateParams {
118
+ /** Typed errors `update` can throw. */
119
+ export type TargetsUpdateError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | PaymentRequiredError | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | PreconditionFailedError | UnprocessableEntityError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
120
+ export interface TargetsDeleteParams {
121
121
  /**
122
122
  * ETag from a preceding response. The write applies only if the resource still has that version;
123
123
  * otherwise it returns 412 precondition_failed without changes. Omit to write the current
@@ -125,8 +125,8 @@ export interface TargetsUpdateParams {
125
125
  */
126
126
  ifMatch?: string;
127
127
  }
128
- /** Typed errors `update` can throw. */
129
- export type TargetsUpdateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | PreconditionFailedError | UnprocessableEntityError | RateLimitedError | InternalServerError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
128
+ /** Typed errors `delete` can throw. */
129
+ export type TargetsDeleteError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | PreconditionFailedError | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
130
130
  export interface TargetsAdoptParams {
131
131
  /**
132
132
  * Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
@@ -137,5 +137,5 @@ export interface TargetsAdoptParams {
137
137
  idempotencyKey?: string;
138
138
  }
139
139
  /** Typed errors `adopt` can throw. */
140
- export type TargetsAdoptError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
140
+ export type TargetsAdoptError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | UnprocessableEntityError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
141
141
  //# sourceMappingURL=targets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"targets.d.ts","sourceRoot":"","sources":["../../src/resources/targets.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,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,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAEV,iBAAiB,EACjB,SAAS,EAET,mBAAmB,EAEnB,cAAc,EACd,mBAAmB,EACnB,QAAQ,EAGR,UAAU,EAEV,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAErB,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;OAKG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,WAAW,CAAC,UAAU,EAAE,gBAAgB,CAAC;IA+BrG;;;;;;;;OAQG;IACG,MAAM,CACV,IAAI,EAAE,mBAAmB,EACzB,MAAM,CAAC,EAAE,mBAAmB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,kBAAkB,CAAC;IA0B9B;;;OAGG;IACG,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,k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pC,MAAM,MAAM,eAAe,GACvB,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,uCAAuC;AACvC,MAAM,MAAM,kBAAkB,GAC1B,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,aAAa,GACb,uBAAuB,GACvB,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,uCAAuC;AACvC,MAAM,MAAM,kBAAkB,GAC1B,eAAe,GACf,iBAAiB,GACjB,oBAAoB,GACpB,cAAc,GACd,aAAa,GACb,aAAa,GACb,uBAAuB,GACvB,wBAAwB,GACxB,gBAAgB,GAChB,mBAAmB,GACnB,eAAe,GACf,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,sCAAsC;AACtC,MAAM,MAAM,iBAAiB,GACzB,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,aAAa,GACb,wBAAwB,GACxB,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
1
+ {"version":3,"file":"targets.d.ts","sourceRoot":"","sources":["../../src/resources/targets.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;A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