@bevorai/sdk 0.2.1 → 0.2.2-rc2

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 (74) hide show
  1. package/README.md +5 -6
  2. package/dist/client.d.ts +0 -2
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +0 -3
  5. package/dist/client.js.map +1 -1
  6. package/dist/errors.d.ts +1 -1
  7. package/dist/errors.js +1 -1
  8. package/dist/graph/call-node.d.ts.map +1 -1
  9. package/dist/graph/call-node.js +6 -2
  10. package/dist/graph/call-node.js.map +1 -1
  11. package/dist/graph/cursor.d.ts.map +1 -1
  12. package/dist/graph/cursor.js +10 -8
  13. package/dist/graph/cursor.js.map +1 -1
  14. package/dist/graph/graph.d.ts +21 -41
  15. package/dist/graph/graph.d.ts.map +1 -1
  16. package/dist/graph/graph.js +141 -129
  17. package/dist/graph/graph.js.map +1 -1
  18. package/dist/helpers/sarif.d.ts +6 -6
  19. package/dist/helpers/sarif.d.ts.map +1 -1
  20. package/dist/helpers/sarif.js +387 -100
  21. package/dist/helpers/sarif.js.map +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/resources/analyses.d.ts +50 -28
  25. package/dist/resources/analyses.d.ts.map +1 -1
  26. package/dist/resources/analyses.js +67 -32
  27. package/dist/resources/analyses.js.map +1 -1
  28. package/dist/resources/codes.d.ts +6 -22
  29. package/dist/resources/codes.d.ts.map +1 -1
  30. package/dist/resources/codes.js +10 -31
  31. package/dist/resources/codes.js.map +1 -1
  32. package/dist/resources/graph.d.ts +82 -0
  33. package/dist/resources/graph.d.ts.map +1 -0
  34. package/dist/resources/graph.js +133 -0
  35. package/dist/resources/graph.js.map +1 -0
  36. package/dist/resources/index.d.ts +1 -3
  37. package/dist/resources/index.d.ts.map +1 -1
  38. package/dist/resources/index.js +1 -3
  39. package/dist/resources/index.js.map +1 -1
  40. package/dist/resources/projects.d.ts +4 -4
  41. package/dist/resources/projects.d.ts.map +1 -1
  42. package/dist/resources/projects.js +5 -5
  43. package/dist/resources/projects.js.map +1 -1
  44. package/dist/resources/users.d.ts +4 -1
  45. package/dist/resources/users.d.ts.map +1 -1
  46. package/dist/resources/users.js +8 -5
  47. package/dist/resources/users.js.map +1 -1
  48. package/dist/types/events.d.ts +2 -2
  49. package/dist/types/events.d.ts.map +1 -1
  50. package/dist/types/graph-data.d.ts +11 -5
  51. package/dist/types/graph-data.d.ts.map +1 -1
  52. package/dist/types/literals.d.ts +4 -2
  53. package/dist/types/literals.d.ts.map +1 -1
  54. package/dist/types/requests.d.ts +62 -29
  55. package/dist/types/requests.d.ts.map +1 -1
  56. package/dist/types/responses.d.ts +116 -37
  57. package/dist/types/responses.d.ts.map +1 -1
  58. package/dist/version.d.ts +1 -1
  59. package/dist/version.d.ts.map +1 -1
  60. package/dist/version.js +1 -1
  61. package/dist/version.js.map +1 -1
  62. package/package.json +1 -1
  63. package/dist/resources/files.d.ts +0 -36
  64. package/dist/resources/files.d.ts.map +0 -1
  65. package/dist/resources/files.js +0 -55
  66. package/dist/resources/files.js.map +0 -1
  67. package/dist/resources/nodes.d.ts +0 -43
  68. package/dist/resources/nodes.d.ts.map +0 -1
  69. package/dist/resources/nodes.js +0 -75
  70. package/dist/resources/nodes.js.map +0 -1
  71. package/dist/resources/transitions.d.ts +0 -29
  72. package/dist/resources/transitions.d.ts.map +0 -1
  73. package/dist/resources/transitions.js +0 -37
  74. package/dist/resources/transitions.js.map +0 -1
@@ -1,55 +0,0 @@
1
- /** Unbound: every method takes the `codeId`. */
2
- export class FileResources {
3
- #client;
4
- constructor(client) {
5
- this.#client = client;
6
- }
7
- /** Methods bound to one code version. */
8
- with(codeId) {
9
- return new BoundFileResources(this, codeId);
10
- }
11
- /** GET `/v1/codes/{code_id}/files` */
12
- list(codeId, options) {
13
- return this.#client.request("GET", `/v1/codes/${codeId}/files`, options);
14
- }
15
- /**
16
- * GET `/v1/codes/{code_id}/files/{file_id}`
17
- *
18
- * A file's metadata.
19
- */
20
- get(codeId, fileId, options) {
21
- return this.#client.request("GET", `/v1/codes/${codeId}/files/${fileId}`, options);
22
- }
23
- /**
24
- * GET `/v1/codes/{code_id}/files/{file_id}/content`
25
- *
26
- * A file's text.
27
- */
28
- async content(codeId, fileId, options) {
29
- const data = await this.#client.request("GET", `/v1/codes/${codeId}/files/${fileId}/content`, options);
30
- if (typeof data?.content !== "string")
31
- throw new Error("file content response is missing `content`");
32
- return data.content;
33
- }
34
- }
35
- /** Bound to one code version; methods omit `codeId`. */
36
- export class BoundFileResources {
37
- #parent;
38
- codeId;
39
- constructor(parent, codeId) {
40
- this.#parent = parent;
41
- this.codeId = codeId;
42
- }
43
- list(options) {
44
- return this.#parent.list(this.codeId, options);
45
- }
46
- /** A file's metadata. */
47
- get(fileId, options) {
48
- return this.#parent.get(this.codeId, fileId, options);
49
- }
50
- /** A file's text. */
51
- content(fileId, options) {
52
- return this.#parent.content(this.codeId, fileId, options);
53
- }
54
- }
55
- //# sourceMappingURL=files.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/resources/files.ts"],"names":[],"mappings":"AAIA,gDAAgD;AAChD,MAAM,OAAO,aAAa;IAChB,OAAO,CAAc;IAE9B,YAAY,MAAmB;QAC9B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,yCAAyC;IACzC,IAAI,CAAC,MAAc;QAClB,OAAO,IAAI,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,sCAAsC;IACtC,IAAI,CACH,MAAc,EACd,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,MAAM,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAED;;;;OAIG;IACH,GAAG,CACF,MAAc,EACd,MAAc,EACd,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAC1B,KAAK,EACL,aAAa,MAAM,UAAU,MAAM,EAAE,EACrC,OAAO,CACP,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,OAAO,CACZ,MAAc,EACd,MAAc,EACd,OAAwB;QAExB,MAAM,IAAI,GAAuC,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAC1E,KAAK,EACL,aAAa,MAAM,UAAU,MAAM,UAAU,EAC7C,OAAO,CACP,CAAC;QACF,IAAI,OAAO,IAAI,EAAE,OAAO,KAAK,QAAQ;YACpC,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;CACD;AAED,wDAAwD;AACxD,MAAM,OAAO,kBAAkB;IACrB,OAAO,CAAgB;IACvB,MAAM,CAAS;IAExB,YAAY,MAAqB,EAAE,MAAc;QAChD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,CAAC;IAED,IAAI,CAAC,OAAwB;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;IAED,yBAAyB;IACzB,GAAG,CAAC,MAAc,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED,qBAAqB;IACrB,OAAO,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CACD"}
@@ -1,43 +0,0 @@
1
- import type { BevorClient, RequestOptions } from "../client.js";
2
- import type { ResultsResponse } from "../types/generics.js";
3
- import type { GraphCallChain, GraphSnapshotEdge, GraphSnapshotNode } from "../types/graph-data.js";
4
- import type { CallChainBody, EdgeListParams, NodeContentParam, NodeListParams } from "../types/requests.js";
5
- /** Unbound: every method takes the `codeId`. */
6
- export declare class NodeResources {
7
- #private;
8
- constructor(client: BevorClient);
9
- /** Methods bound to one code version. */
10
- with(codeId: string): BoundNodeResources;
11
- /** GET `/v1/codes/{code_id}/nodes` */
12
- list(codeId: string, query?: NodeListParams, options?: RequestOptions): Promise<ResultsResponse<GraphSnapshotNode>>;
13
- /** GET `/v1/codes/{code_id}/nodes/{node_id}` */
14
- get(codeId: string, nodeId: string, options?: RequestOptions): Promise<GraphSnapshotNode>;
15
- /**
16
- * GET `/v1/codes/{code_id}/nodes/{node_id}/content`
17
- *
18
- * A node's source text.
19
- */
20
- content(codeId: string, nodeId: string, query?: NodeContentParam, options?: RequestOptions): Promise<string>;
21
- /** GET `/v1/codes/{code_id}/nodes/{node_id}/edges` */
22
- edges(codeId: string, nodeId: string, query?: EdgeListParams, options?: RequestOptions): Promise<ResultsResponse<GraphSnapshotEdge>>;
23
- /**
24
- * POST `/v1/codes/{code_id}/call-chain`
25
- *
26
- * The call chains through the given nodes.
27
- */
28
- callChain(codeId: string, body: CallChainBody, options?: RequestOptions): Promise<ResultsResponse<GraphCallChain>>;
29
- }
30
- /** Bound to one code version; methods omit `codeId`. */
31
- export declare class BoundNodeResources {
32
- #private;
33
- readonly codeId: string;
34
- constructor(parent: NodeResources, codeId: string);
35
- list(query?: NodeListParams, options?: RequestOptions): Promise<ResultsResponse<GraphSnapshotNode>>;
36
- get(nodeId: string, options?: RequestOptions): Promise<GraphSnapshotNode>;
37
- /** A node's source text. */
38
- content(nodeId: string, query?: NodeContentParam, options?: RequestOptions): Promise<string>;
39
- edges(nodeId: string, query?: EdgeListParams, options?: RequestOptions): Promise<ResultsResponse<GraphSnapshotEdge>>;
40
- /** The call chains through the given nodes. */
41
- callChain(body: CallChainBody, options?: RequestOptions): Promise<ResultsResponse<GraphCallChain>>;
42
- }
43
- //# sourceMappingURL=nodes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../src/resources/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EACX,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACX,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,MAAM,sBAAsB,CAAC;AAE9B,gDAAgD;AAChD,qBAAa,aAAa;;IAGzB,YAAY,MAAM,EAAE,WAAW,EAE9B;IAED,yCAAyC;IACzC,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,CAEvC;IAED,sCAAsC;IACtC,IAAI,CACH,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAK7C;IAED,gDAAgD;IAChD,GAAG,CACF,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,iBAAiB,CAAC,CAM5B;IAED;;;;OAIG;IACG,OAAO,CACZ,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,gBAAgB,EACxB,OAAO,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,MAAM,CAAC,CASjB;IAED,sDAAsD;IACtD,KAAK,CACJ,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAM7C;IAED;;;;OAIG;IACH,SAAS,CACR,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,aAAa,EACnB,OAAO,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC,CAK1C;CACD;AAED,wDAAwD;AACxD,qBAAa,kBAAkB;;IAE9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,YAAY,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAGhD;IAED,IAAI,CACH,KAAK,CAAC,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAE7C;IAED,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAExE;IAED,4BAA4B;IAC5B,OAAO,CACN,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,gBAAgB,EACxB,OAAO,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,MAAM,CAAC,CAEjB;IAED,KAAK,CACJ,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAE7C;IAED,+CAA+C;IAC/C,SAAS,CACR,IAAI,EAAE,aAAa,EACnB,OAAO,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC,CAE1C;CACD"}
@@ -1,75 +0,0 @@
1
- /** Unbound: every method takes the `codeId`. */
2
- export class NodeResources {
3
- #client;
4
- constructor(client) {
5
- this.#client = client;
6
- }
7
- /** Methods bound to one code version. */
8
- with(codeId) {
9
- return new BoundNodeResources(this, codeId);
10
- }
11
- /** GET `/v1/codes/{code_id}/nodes` */
12
- list(codeId, query, options) {
13
- return this.#client.request("GET", `/v1/codes/${codeId}/nodes`, {
14
- ...options,
15
- query,
16
- });
17
- }
18
- /** GET `/v1/codes/{code_id}/nodes/{node_id}` */
19
- get(codeId, nodeId, options) {
20
- return this.#client.request("GET", `/v1/codes/${codeId}/nodes/${nodeId}`, options);
21
- }
22
- /**
23
- * GET `/v1/codes/{code_id}/nodes/{node_id}/content`
24
- *
25
- * A node's source text.
26
- */
27
- async content(codeId, nodeId, query, options) {
28
- const data = await this.#client.request("GET", `/v1/codes/${codeId}/nodes/${nodeId}/content`, { ...options, query });
29
- if (typeof data?.content !== "string")
30
- throw new Error("node content response is missing `content`");
31
- return data.content;
32
- }
33
- /** GET `/v1/codes/{code_id}/nodes/{node_id}/edges` */
34
- edges(codeId, nodeId, query, options) {
35
- return this.#client.request("GET", `/v1/codes/${codeId}/nodes/${nodeId}/edges`, { ...options, query });
36
- }
37
- /**
38
- * POST `/v1/codes/{code_id}/call-chain`
39
- *
40
- * The call chains through the given nodes.
41
- */
42
- callChain(codeId, body, options) {
43
- return this.#client.request("POST", `/v1/codes/${codeId}/call-chain`, {
44
- ...options,
45
- json: body,
46
- });
47
- }
48
- }
49
- /** Bound to one code version; methods omit `codeId`. */
50
- export class BoundNodeResources {
51
- #parent;
52
- codeId;
53
- constructor(parent, codeId) {
54
- this.#parent = parent;
55
- this.codeId = codeId;
56
- }
57
- list(query, options) {
58
- return this.#parent.list(this.codeId, query, options);
59
- }
60
- get(nodeId, options) {
61
- return this.#parent.get(this.codeId, nodeId, options);
62
- }
63
- /** A node's source text. */
64
- content(nodeId, query, options) {
65
- return this.#parent.content(this.codeId, nodeId, query, options);
66
- }
67
- edges(nodeId, query, options) {
68
- return this.#parent.edges(this.codeId, nodeId, query, options);
69
- }
70
- /** The call chains through the given nodes. */
71
- callChain(body, options) {
72
- return this.#parent.callChain(this.codeId, body, options);
73
- }
74
- }
75
- //# sourceMappingURL=nodes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../src/resources/nodes.ts"],"names":[],"mappings":"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,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CACD"}
@@ -1,29 +0,0 @@
1
- import type { BevorClient, RequestOptions } from "../client.js";
2
- import { PaginatedResource } from "../pagination.js";
3
- import type { Pagination } from "../types/generics.js";
4
- import type { TransitionListParams } from "../types/requests.js";
5
- import type { FindingTransition } from "../types/responses.js";
6
- import type { WithoutPagination, WithPagination } from "./shared.js";
7
- export declare class TransitionResources {
8
- #private;
9
- constructor(client: BevorClient);
10
- /** Methods bound to one transition. */
11
- with(transitionId: string): BoundTransitionResources;
12
- /**
13
- * GET `/v1/transitions`
14
- *
15
- * How findings changed between versions, across the project.
16
- */
17
- list(query?: TransitionListParams, options?: WithoutPagination): Promise<Pagination<FindingTransition>>;
18
- list(query: TransitionListParams | undefined, options: WithPagination): Promise<PaginatedResource<FindingTransition>>;
19
- /** GET `/v1/transitions/{transition_id}` */
20
- get(transitionId: string, options?: RequestOptions): Promise<FindingTransition>;
21
- }
22
- export declare class BoundTransitionResources {
23
- #private;
24
- readonly transitionId: string;
25
- constructor(parent: TransitionResources, transitionId: string);
26
- /** GET `/v1/transitions/{transition_id}` */
27
- get(options?: RequestOptions): Promise<FindingTransition>;
28
- }
29
- //# sourceMappingURL=transitions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transitions.d.ts","sourceRoot":"","sources":["../../src/resources/transitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,WAAW,EAEX,cAAc,EACd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAErE,qBAAa,mBAAmB;;IAG/B,YAAY,MAAM,EAAE,WAAW,EAE9B;IAED,uCAAuC;IACvC,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,wBAAwB,CAEnD;IAED;;;;OAIG;IACG,IAAI,CACT,KAAK,CAAC,EAAE,oBAAoB,EAC5B,OAAO,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACpC,IAAI,CACT,KAAK,EAAE,oBAAoB,GAAG,SAAS,EACvC,OAAO,EAAE,cAAc,GACrB,OAAO,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAiBjD,4CAA4C;IAC5C,GAAG,CACF,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,iBAAiB,CAAC,CAM5B;CACD;AAED,qBAAa,wBAAwB;;IAEpC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B,YAAY,MAAM,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,EAG5D;IAED,4CAA4C;IAC5C,GAAG,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAExD;CACD"}
@@ -1,37 +0,0 @@
1
- import { PaginatedResource } from "../pagination.js";
2
- export class TransitionResources {
3
- #client;
4
- constructor(client) {
5
- this.#client = client;
6
- }
7
- /** Methods bound to one transition. */
8
- with(transitionId) {
9
- return new BoundTransitionResources(this, transitionId);
10
- }
11
- async list(query, options = {}) {
12
- const { withPagination, ...requestOptions } = options;
13
- const fetchPage = (page) => this.#client.request("GET", "/v1/transitions", {
14
- ...requestOptions,
15
- query: { ...query, page },
16
- });
17
- const first = await fetchPage(query?.page ?? 0);
18
- return withPagination ? new PaginatedResource(first, fetchPage) : first;
19
- }
20
- /** GET `/v1/transitions/{transition_id}` */
21
- get(transitionId, options) {
22
- return this.#client.request("GET", `/v1/transitions/${transitionId}`, options);
23
- }
24
- }
25
- export class BoundTransitionResources {
26
- #parent;
27
- transitionId;
28
- constructor(parent, transitionId) {
29
- this.#parent = parent;
30
- this.transitionId = transitionId;
31
- }
32
- /** GET `/v1/transitions/{transition_id}` */
33
- get(options) {
34
- return this.#parent.get(this.transitionId, options);
35
- }
36
- }
37
- //# sourceMappingURL=transitions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transitions.js","sourceRoot":"","sources":["../../src/resources/transitions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAMrD,MAAM,OAAO,mBAAmB;IACtB,OAAO,CAAc;IAE9B,YAAY,MAAmB;QAC9B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,uCAAuC;IACvC,IAAI,CAAC,YAAoB;QACxB,OAAO,IAAI,wBAAwB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACzD,CAAC;IAeD,KAAK,CAAC,IAAI,CACT,KAA4B,EAC5B,OAAO,GAAsB,EAAE;QAI/B,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,GAAG,OAAO,CAAC;QACtD,MAAM,SAAS,GAAG,CAAC,IAAY,EAA0C,EAAE,CAC1E,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,iBAAiB,EAAE;YAC9C,GAAG,cAAc;YACjB,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE;SACzB,CAAC,CAAC;QACJ,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC;QAChD,OAAO,cAAc,CAAC,CAAC,CAAC,IAAI,iBAAiB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACzE,CAAC;IAED,4CAA4C;IAC5C,GAAG,CACF,YAAoB,EACpB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,OA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