@theholocron/postman-client 1.31.0 → 1.32.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.
- package/dist/index.d.mts +9 -9
- package/dist/index.mjs +9 -9
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@theholocron/http-client";
|
|
2
2
|
import { ErrorSink, Logger } from "@theholocron/observability/core";
|
|
3
|
-
//#region src/utils.d.ts
|
|
3
|
+
//#region ../../../../../src/utils.d.ts
|
|
4
4
|
interface PostmanClientOptions {
|
|
5
5
|
/** Postman API key. */
|
|
6
6
|
token: string;
|
|
@@ -14,7 +14,7 @@ interface PostmanClientOptions {
|
|
|
14
14
|
errors?: ErrorSink;
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
|
-
//#region src/collections/collections.d.ts
|
|
17
|
+
//#region ../../../../../src/collections/collections.d.ts
|
|
18
18
|
interface PostmanCollection {
|
|
19
19
|
id: string;
|
|
20
20
|
uid: string;
|
|
@@ -24,7 +24,7 @@ interface PostmanCollectionsResponse {
|
|
|
24
24
|
collections: PostmanCollection[];
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
|
-
//#region src/environments/environments.d.ts
|
|
27
|
+
//#region ../../../../../src/environments/environments.d.ts
|
|
28
28
|
interface PostmanEnvironment {
|
|
29
29
|
id: string;
|
|
30
30
|
uid: string;
|
|
@@ -37,12 +37,12 @@ interface PostmanEnvironmentResponse {
|
|
|
37
37
|
environment: PostmanEnvironment;
|
|
38
38
|
}
|
|
39
39
|
//#endregion
|
|
40
|
-
//#region src/import/import.d.ts
|
|
40
|
+
//#region ../../../../../src/import/import.d.ts
|
|
41
41
|
interface PostmanImportOpenApiResponse {
|
|
42
42
|
collections: PostmanCollection[];
|
|
43
43
|
}
|
|
44
44
|
//#endregion
|
|
45
|
-
//#region src/me/me.d.ts
|
|
45
|
+
//#region ../../../../../src/me/me.d.ts
|
|
46
46
|
interface PostmanUser {
|
|
47
47
|
id?: number | string;
|
|
48
48
|
username?: string;
|
|
@@ -53,7 +53,7 @@ interface PostmanMeResponse {
|
|
|
53
53
|
user?: PostmanUser;
|
|
54
54
|
}
|
|
55
55
|
//#endregion
|
|
56
|
-
//#region src/specs/specs.d.ts
|
|
56
|
+
//#region ../../../../../src/specs/specs.d.ts
|
|
57
57
|
interface PostmanSpec {
|
|
58
58
|
id: string;
|
|
59
59
|
name: string;
|
|
@@ -69,7 +69,7 @@ interface PostmanCreateSpecInput {
|
|
|
69
69
|
filePath?: string;
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
|
-
//#region src/workspaces/workspaces.d.ts
|
|
72
|
+
//#region ../../../../../src/workspaces/workspaces.d.ts
|
|
73
73
|
interface PostmanWorkspace {
|
|
74
74
|
id: string;
|
|
75
75
|
name: string;
|
|
@@ -79,7 +79,7 @@ interface PostmanWorkspacesResponse {
|
|
|
79
79
|
workspaces: PostmanWorkspace[];
|
|
80
80
|
}
|
|
81
81
|
//#endregion
|
|
82
|
-
//#region src/errors.d.ts
|
|
82
|
+
//#region ../../../../../src/errors.d.ts
|
|
83
83
|
/**
|
|
84
84
|
* Thrown when Postman returns a `limitReachedError` (e.g., a Free-tier
|
|
85
85
|
* account hitting the "0 APIs" cap).
|
|
@@ -92,7 +92,7 @@ declare class PostmanPlanLimitError extends Error {
|
|
|
92
92
|
}
|
|
93
93
|
declare function detectPlanLimit(body: string): string | null;
|
|
94
94
|
//#endregion
|
|
95
|
-
//#region src/index.d.ts
|
|
95
|
+
//#region ../../../../../src/index.d.ts
|
|
96
96
|
declare function createPostmanClient(opts: PostmanClientOptions): {
|
|
97
97
|
collections: {
|
|
98
98
|
list: (workspaceId: string) => Promise<PostmanCollectionsResponse>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRestClient } from "@theholocron/http-client";
|
|
2
|
-
//#region src/collections/collections.ts
|
|
2
|
+
//#region ../../../../../src/collections/collections.ts
|
|
3
3
|
function collections(rest) {
|
|
4
4
|
return {
|
|
5
5
|
list: (workspaceId) => rest.request("/collections", { query: { workspace: workspaceId } }),
|
|
@@ -7,7 +7,7 @@ function collections(rest) {
|
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
|
-
//#region src/environments/environments.ts
|
|
10
|
+
//#region ../../../../../src/environments/environments.ts
|
|
11
11
|
function environments(rest) {
|
|
12
12
|
return {
|
|
13
13
|
list: (workspaceId) => rest.request("/environments", { query: { workspace: workspaceId } }),
|
|
@@ -23,7 +23,7 @@ function environments(rest) {
|
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
|
-
//#region src/import/import.ts
|
|
26
|
+
//#region ../../../../../src/import/import.ts
|
|
27
27
|
function importApi(rest) {
|
|
28
28
|
return { openapi: (workspaceId, spec) => rest.request("/import/openapi", {
|
|
29
29
|
method: "POST",
|
|
@@ -35,12 +35,12 @@ function importApi(rest) {
|
|
|
35
35
|
}) };
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
|
-
//#region src/me/me.ts
|
|
38
|
+
//#region ../../../../../src/me/me.ts
|
|
39
39
|
function me(rest) {
|
|
40
40
|
return { get: () => rest.request("/me") };
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
|
-
//#region src/specs/specs.ts
|
|
43
|
+
//#region ../../../../../src/specs/specs.ts
|
|
44
44
|
function specs(rest) {
|
|
45
45
|
return {
|
|
46
46
|
list: (workspaceId) => rest.request("/specs", { query: { workspaceId } }),
|
|
@@ -63,7 +63,7 @@ function specs(rest) {
|
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
//#endregion
|
|
66
|
-
//#region src/errors.ts
|
|
66
|
+
//#region ../../../../../src/errors.ts
|
|
67
67
|
/**
|
|
68
68
|
* Thrown when Postman returns a `limitReachedError` (e.g., a Free-tier
|
|
69
69
|
* account hitting the "0 APIs" cap).
|
|
@@ -86,7 +86,7 @@ function detectPlanLimit(body) {
|
|
|
86
86
|
return null;
|
|
87
87
|
}
|
|
88
88
|
//#endregion
|
|
89
|
-
//#region src/utils.ts
|
|
89
|
+
//#region ../../../../../src/utils.ts
|
|
90
90
|
function createPostmanRestClient(opts) {
|
|
91
91
|
const base = createRestClient({
|
|
92
92
|
baseUrl: opts.baseUrl ?? "https://api.getpostman.com",
|
|
@@ -115,12 +115,12 @@ function createPostmanRestClient(opts) {
|
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
117
|
//#endregion
|
|
118
|
-
//#region src/workspaces/workspaces.ts
|
|
118
|
+
//#region ../../../../../src/workspaces/workspaces.ts
|
|
119
119
|
function workspaces(rest) {
|
|
120
120
|
return { list: () => rest.request("/workspaces") };
|
|
121
121
|
}
|
|
122
122
|
//#endregion
|
|
123
|
-
//#region src/index.ts
|
|
123
|
+
//#region ../../../../../src/index.ts
|
|
124
124
|
function createPostmanClient(opts) {
|
|
125
125
|
const rest = createPostmanRestClient(opts);
|
|
126
126
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/postman-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.1",
|
|
4
4
|
"description": "A TypeScript client for the Postman API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"postman",
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@theholocron/observability": "^0.3.0",
|
|
35
|
-
"@theholocron/http-client": "^1.
|
|
35
|
+
"@theholocron/http-client": "^1.32.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
38
|
+
"@theholocron/cli": "5.0.0-alpha.79",
|
|
39
39
|
"@theholocron/eslint-config": "^8.4.3",
|
|
40
40
|
"@theholocron/tsconfig": "^8.2.0",
|
|
41
|
-
"@theholocron/tsdown-config": "^8.
|
|
41
|
+
"@theholocron/tsdown-config": "^8.6.1",
|
|
42
42
|
"@theholocron/vitest-config": "^8.2.0",
|
|
43
43
|
"@types/node": "^26.4.1",
|
|
44
44
|
"@vitest/coverage-v8": "^5.0.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"releases": "https://github.com/theholocron/clients/releases",
|
|
61
61
|
"wiki": "https://github.com/theholocron/clients/wiki",
|
|
62
62
|
"scripts": {
|
|
63
|
-
"delivery.build": "
|
|
63
|
+
"delivery.build": "holocron run delivery.build -- && node ../../scripts/check-bundle-size.mjs",
|
|
64
64
|
"sourceQuality.staticAnalysis": "holocron run sourceQuality.staticAnalysis --",
|
|
65
65
|
"test:watch": "vitest",
|
|
66
66
|
"verification.typeSafety": "holocron run verification.typeSafety --",
|