@postman-cse/onboarding-repo-sync 1.0.1 → 1.0.2
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/README.md +1 -4
- package/dist/action.cjs +78 -4
- package/dist/cli.cjs +78 -4
- package/dist/index.cjs +78 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# Postman Repo Sync
|
|
2
2
|
|
|
3
|
-
[](https://github.com/postman-cs/postman-repo-sync-action/actions/workflows/ci.yml)
|
|
4
|
-
[](https://github.com/postman-cs/postman-repo-sync-action/releases)
|
|
5
|
-
[](https://www.npmjs.com/package/@postman-cse/onboarding-repo-sync)
|
|
6
|
-
[](LICENSE)
|
|
3
|
+
[](https://github.com/postman-cs/postman-repo-sync-action/actions/workflows/ci.yml) [](https://github.com/postman-cs/postman-repo-sync-action/releases) [](https://www.npmjs.com/package/@postman-cse/onboarding-repo-sync) [](LICENSE) [](https://scorecard.dev/viewer/?uri=github.com/postman-cs/postman-repo-sync-action)
|
|
7
4
|
|
|
8
5
|
Exports Postman collections and environments into your repository and wires CI, mocks, and monitors around them.
|
|
9
6
|
|
package/dist/action.cjs
CHANGED
|
@@ -9182,14 +9182,14 @@ var require_retry_agent = __commonJS({
|
|
|
9182
9182
|
this.#options = options;
|
|
9183
9183
|
}
|
|
9184
9184
|
dispatch(opts, handler) {
|
|
9185
|
-
const
|
|
9185
|
+
const retry2 = new RetryHandler({
|
|
9186
9186
|
...opts,
|
|
9187
9187
|
retryOptions: this.#options
|
|
9188
9188
|
}, {
|
|
9189
9189
|
dispatch: this.#agent.dispatch.bind(this.#agent),
|
|
9190
9190
|
handler
|
|
9191
9191
|
});
|
|
9192
|
-
return this.#agent.dispatch(opts,
|
|
9192
|
+
return this.#agent.dispatch(opts, retry2);
|
|
9193
9193
|
}
|
|
9194
9194
|
close() {
|
|
9195
9195
|
return this.#agent.close();
|
|
@@ -25282,12 +25282,60 @@ var postmanRepoSyncActionContract = {
|
|
|
25282
25282
|
}
|
|
25283
25283
|
};
|
|
25284
25284
|
|
|
25285
|
+
// src/lib/retry.ts
|
|
25286
|
+
function sleep(delayMs) {
|
|
25287
|
+
return new Promise((resolve3) => {
|
|
25288
|
+
setTimeout(resolve3, delayMs);
|
|
25289
|
+
});
|
|
25290
|
+
}
|
|
25291
|
+
function normalizeRetryOptions(options) {
|
|
25292
|
+
return {
|
|
25293
|
+
maxAttempts: Math.max(1, options.maxAttempts ?? 3),
|
|
25294
|
+
delayMs: Math.max(0, options.delayMs ?? 2e3),
|
|
25295
|
+
backoffMultiplier: Math.max(1, options.backoffMultiplier ?? 1),
|
|
25296
|
+
maxDelayMs: options.maxDelayMs === void 0 ? Number.POSITIVE_INFINITY : Math.max(0, options.maxDelayMs),
|
|
25297
|
+
onRetry: options.onRetry ?? (async () => void 0),
|
|
25298
|
+
shouldRetry: options.shouldRetry ?? (() => true),
|
|
25299
|
+
sleep: options.sleep ?? sleep
|
|
25300
|
+
};
|
|
25301
|
+
}
|
|
25302
|
+
async function retry(operation, options = {}) {
|
|
25303
|
+
const normalized = normalizeRetryOptions(options);
|
|
25304
|
+
let nextDelayMs = normalized.delayMs;
|
|
25305
|
+
for (let attempt = 1; attempt <= normalized.maxAttempts; attempt += 1) {
|
|
25306
|
+
try {
|
|
25307
|
+
return await operation();
|
|
25308
|
+
} catch (error2) {
|
|
25309
|
+
const shouldRetry = attempt < normalized.maxAttempts && normalized.shouldRetry(error2, {
|
|
25310
|
+
attempt,
|
|
25311
|
+
maxAttempts: normalized.maxAttempts
|
|
25312
|
+
});
|
|
25313
|
+
if (!shouldRetry) {
|
|
25314
|
+
throw error2;
|
|
25315
|
+
}
|
|
25316
|
+
await normalized.onRetry({
|
|
25317
|
+
attempt,
|
|
25318
|
+
maxAttempts: normalized.maxAttempts,
|
|
25319
|
+
delayMs: nextDelayMs,
|
|
25320
|
+
error: error2
|
|
25321
|
+
});
|
|
25322
|
+
await normalized.sleep(nextDelayMs);
|
|
25323
|
+
nextDelayMs = Math.min(
|
|
25324
|
+
normalized.maxDelayMs,
|
|
25325
|
+
Math.round(nextDelayMs * normalized.backoffMultiplier)
|
|
25326
|
+
);
|
|
25327
|
+
}
|
|
25328
|
+
}
|
|
25329
|
+
throw new Error("Retry exhausted without returning or throwing");
|
|
25330
|
+
}
|
|
25331
|
+
|
|
25285
25332
|
// src/lib/postman/postman-assets-client.ts
|
|
25286
25333
|
var PostmanAssetsClient = class {
|
|
25287
25334
|
apiKey;
|
|
25288
25335
|
baseUrl;
|
|
25289
25336
|
bifrostBaseUrl;
|
|
25290
25337
|
fetchImpl;
|
|
25338
|
+
retrySleep;
|
|
25291
25339
|
constructor(options) {
|
|
25292
25340
|
this.apiKey = String(options.apiKey || "").trim();
|
|
25293
25341
|
this.baseUrl = String(options.baseUrl || POSTMAN_ENDPOINT_PROFILES.prod.apiBaseUrl).replace(
|
|
@@ -25298,6 +25346,7 @@ var PostmanAssetsClient = class {
|
|
|
25298
25346
|
options.bifrostBaseUrl || POSTMAN_ENDPOINT_PROFILES.prod.bifrostBaseUrl
|
|
25299
25347
|
).replace(/\/+$/, "");
|
|
25300
25348
|
this.fetchImpl = options.fetchImpl ?? fetch;
|
|
25349
|
+
this.retrySleep = options.retrySleep;
|
|
25301
25350
|
void (options.secretMasker ?? createSecretMasker([this.apiKey]));
|
|
25302
25351
|
}
|
|
25303
25352
|
getBaseUrl() {
|
|
@@ -25361,9 +25410,34 @@ var PostmanAssetsClient = class {
|
|
|
25361
25410
|
})
|
|
25362
25411
|
});
|
|
25363
25412
|
}
|
|
25413
|
+
/**
|
|
25414
|
+
* Monitor and mock creation reference a collection that may have been
|
|
25415
|
+
* created moments earlier; the Postman backend is eventually consistent
|
|
25416
|
+
* and can reject the reference with a 400 "Unable to load collection"
|
|
25417
|
+
* until the collection becomes visible. Retry that specific 400 plus
|
|
25418
|
+
* generic transient statuses with backoff.
|
|
25419
|
+
*/
|
|
25420
|
+
async requestWithCollectionRetry(path8, init) {
|
|
25421
|
+
return retry(() => this.request(path8, init), {
|
|
25422
|
+
maxAttempts: 5,
|
|
25423
|
+
delayMs: 2e3,
|
|
25424
|
+
backoffMultiplier: 2,
|
|
25425
|
+
maxDelayMs: 15e3,
|
|
25426
|
+
...this.retrySleep ? { sleep: this.retrySleep } : {},
|
|
25427
|
+
shouldRetry: (error2) => {
|
|
25428
|
+
if (!(error2 instanceof HttpError)) {
|
|
25429
|
+
return false;
|
|
25430
|
+
}
|
|
25431
|
+
if (error2.status >= 500 || error2.status === 429) {
|
|
25432
|
+
return true;
|
|
25433
|
+
}
|
|
25434
|
+
return error2.status === 400 && /unable to load collection/i.test(error2.responseBody);
|
|
25435
|
+
}
|
|
25436
|
+
});
|
|
25437
|
+
}
|
|
25364
25438
|
async createMonitor(workspaceId, name, collectionUid, environmentUid, cronSchedule) {
|
|
25365
25439
|
const effectiveCron = cronSchedule && cronSchedule.trim() ? cronSchedule.trim() : "0 0 * * 0";
|
|
25366
|
-
const response = await this.
|
|
25440
|
+
const response = await this.requestWithCollectionRetry(`/monitors?workspace=${workspaceId}`, {
|
|
25367
25441
|
method: "POST",
|
|
25368
25442
|
body: JSON.stringify({
|
|
25369
25443
|
monitor: {
|
|
@@ -25393,7 +25467,7 @@ var PostmanAssetsClient = class {
|
|
|
25393
25467
|
return uid;
|
|
25394
25468
|
}
|
|
25395
25469
|
async createMock(workspaceId, name, collectionUid, environmentUid) {
|
|
25396
|
-
const response = await this.
|
|
25470
|
+
const response = await this.requestWithCollectionRetry(`/mocks?workspace=${workspaceId}`, {
|
|
25397
25471
|
method: "POST",
|
|
25398
25472
|
body: JSON.stringify({
|
|
25399
25473
|
mock: {
|
package/dist/cli.cjs
CHANGED
|
@@ -9183,14 +9183,14 @@ var require_retry_agent = __commonJS({
|
|
|
9183
9183
|
this.#options = options;
|
|
9184
9184
|
}
|
|
9185
9185
|
dispatch(opts, handler) {
|
|
9186
|
-
const
|
|
9186
|
+
const retry2 = new RetryHandler({
|
|
9187
9187
|
...opts,
|
|
9188
9188
|
retryOptions: this.#options
|
|
9189
9189
|
}, {
|
|
9190
9190
|
dispatch: this.#agent.dispatch.bind(this.#agent),
|
|
9191
9191
|
handler
|
|
9192
9192
|
});
|
|
9193
|
-
return this.#agent.dispatch(opts,
|
|
9193
|
+
return this.#agent.dispatch(opts, retry2);
|
|
9194
9194
|
}
|
|
9195
9195
|
close() {
|
|
9196
9196
|
return this.#agent.close();
|
|
@@ -23385,12 +23385,60 @@ var postmanRepoSyncActionContract = {
|
|
|
23385
23385
|
}
|
|
23386
23386
|
};
|
|
23387
23387
|
|
|
23388
|
+
// src/lib/retry.ts
|
|
23389
|
+
function sleep(delayMs) {
|
|
23390
|
+
return new Promise((resolve2) => {
|
|
23391
|
+
setTimeout(resolve2, delayMs);
|
|
23392
|
+
});
|
|
23393
|
+
}
|
|
23394
|
+
function normalizeRetryOptions(options) {
|
|
23395
|
+
return {
|
|
23396
|
+
maxAttempts: Math.max(1, options.maxAttempts ?? 3),
|
|
23397
|
+
delayMs: Math.max(0, options.delayMs ?? 2e3),
|
|
23398
|
+
backoffMultiplier: Math.max(1, options.backoffMultiplier ?? 1),
|
|
23399
|
+
maxDelayMs: options.maxDelayMs === void 0 ? Number.POSITIVE_INFINITY : Math.max(0, options.maxDelayMs),
|
|
23400
|
+
onRetry: options.onRetry ?? (async () => void 0),
|
|
23401
|
+
shouldRetry: options.shouldRetry ?? (() => true),
|
|
23402
|
+
sleep: options.sleep ?? sleep
|
|
23403
|
+
};
|
|
23404
|
+
}
|
|
23405
|
+
async function retry(operation, options = {}) {
|
|
23406
|
+
const normalized = normalizeRetryOptions(options);
|
|
23407
|
+
let nextDelayMs = normalized.delayMs;
|
|
23408
|
+
for (let attempt = 1; attempt <= normalized.maxAttempts; attempt += 1) {
|
|
23409
|
+
try {
|
|
23410
|
+
return await operation();
|
|
23411
|
+
} catch (error) {
|
|
23412
|
+
const shouldRetry = attempt < normalized.maxAttempts && normalized.shouldRetry(error, {
|
|
23413
|
+
attempt,
|
|
23414
|
+
maxAttempts: normalized.maxAttempts
|
|
23415
|
+
});
|
|
23416
|
+
if (!shouldRetry) {
|
|
23417
|
+
throw error;
|
|
23418
|
+
}
|
|
23419
|
+
await normalized.onRetry({
|
|
23420
|
+
attempt,
|
|
23421
|
+
maxAttempts: normalized.maxAttempts,
|
|
23422
|
+
delayMs: nextDelayMs,
|
|
23423
|
+
error
|
|
23424
|
+
});
|
|
23425
|
+
await normalized.sleep(nextDelayMs);
|
|
23426
|
+
nextDelayMs = Math.min(
|
|
23427
|
+
normalized.maxDelayMs,
|
|
23428
|
+
Math.round(nextDelayMs * normalized.backoffMultiplier)
|
|
23429
|
+
);
|
|
23430
|
+
}
|
|
23431
|
+
}
|
|
23432
|
+
throw new Error("Retry exhausted without returning or throwing");
|
|
23433
|
+
}
|
|
23434
|
+
|
|
23388
23435
|
// src/lib/postman/postman-assets-client.ts
|
|
23389
23436
|
var PostmanAssetsClient = class {
|
|
23390
23437
|
apiKey;
|
|
23391
23438
|
baseUrl;
|
|
23392
23439
|
bifrostBaseUrl;
|
|
23393
23440
|
fetchImpl;
|
|
23441
|
+
retrySleep;
|
|
23394
23442
|
constructor(options) {
|
|
23395
23443
|
this.apiKey = String(options.apiKey || "").trim();
|
|
23396
23444
|
this.baseUrl = String(options.baseUrl || POSTMAN_ENDPOINT_PROFILES.prod.apiBaseUrl).replace(
|
|
@@ -23401,6 +23449,7 @@ var PostmanAssetsClient = class {
|
|
|
23401
23449
|
options.bifrostBaseUrl || POSTMAN_ENDPOINT_PROFILES.prod.bifrostBaseUrl
|
|
23402
23450
|
).replace(/\/+$/, "");
|
|
23403
23451
|
this.fetchImpl = options.fetchImpl ?? fetch;
|
|
23452
|
+
this.retrySleep = options.retrySleep;
|
|
23404
23453
|
void (options.secretMasker ?? createSecretMasker([this.apiKey]));
|
|
23405
23454
|
}
|
|
23406
23455
|
getBaseUrl() {
|
|
@@ -23464,9 +23513,34 @@ var PostmanAssetsClient = class {
|
|
|
23464
23513
|
})
|
|
23465
23514
|
});
|
|
23466
23515
|
}
|
|
23516
|
+
/**
|
|
23517
|
+
* Monitor and mock creation reference a collection that may have been
|
|
23518
|
+
* created moments earlier; the Postman backend is eventually consistent
|
|
23519
|
+
* and can reject the reference with a 400 "Unable to load collection"
|
|
23520
|
+
* until the collection becomes visible. Retry that specific 400 plus
|
|
23521
|
+
* generic transient statuses with backoff.
|
|
23522
|
+
*/
|
|
23523
|
+
async requestWithCollectionRetry(path4, init) {
|
|
23524
|
+
return retry(() => this.request(path4, init), {
|
|
23525
|
+
maxAttempts: 5,
|
|
23526
|
+
delayMs: 2e3,
|
|
23527
|
+
backoffMultiplier: 2,
|
|
23528
|
+
maxDelayMs: 15e3,
|
|
23529
|
+
...this.retrySleep ? { sleep: this.retrySleep } : {},
|
|
23530
|
+
shouldRetry: (error) => {
|
|
23531
|
+
if (!(error instanceof HttpError)) {
|
|
23532
|
+
return false;
|
|
23533
|
+
}
|
|
23534
|
+
if (error.status >= 500 || error.status === 429) {
|
|
23535
|
+
return true;
|
|
23536
|
+
}
|
|
23537
|
+
return error.status === 400 && /unable to load collection/i.test(error.responseBody);
|
|
23538
|
+
}
|
|
23539
|
+
});
|
|
23540
|
+
}
|
|
23467
23541
|
async createMonitor(workspaceId, name, collectionUid, environmentUid, cronSchedule) {
|
|
23468
23542
|
const effectiveCron = cronSchedule && cronSchedule.trim() ? cronSchedule.trim() : "0 0 * * 0";
|
|
23469
|
-
const response = await this.
|
|
23543
|
+
const response = await this.requestWithCollectionRetry(`/monitors?workspace=${workspaceId}`, {
|
|
23470
23544
|
method: "POST",
|
|
23471
23545
|
body: JSON.stringify({
|
|
23472
23546
|
monitor: {
|
|
@@ -23496,7 +23570,7 @@ var PostmanAssetsClient = class {
|
|
|
23496
23570
|
return uid;
|
|
23497
23571
|
}
|
|
23498
23572
|
async createMock(workspaceId, name, collectionUid, environmentUid) {
|
|
23499
|
-
const response = await this.
|
|
23573
|
+
const response = await this.requestWithCollectionRetry(`/mocks?workspace=${workspaceId}`, {
|
|
23500
23574
|
method: "POST",
|
|
23501
23575
|
body: JSON.stringify({
|
|
23502
23576
|
mock: {
|
package/dist/index.cjs
CHANGED
|
@@ -9183,14 +9183,14 @@ var require_retry_agent = __commonJS({
|
|
|
9183
9183
|
this.#options = options;
|
|
9184
9184
|
}
|
|
9185
9185
|
dispatch(opts, handler) {
|
|
9186
|
-
const
|
|
9186
|
+
const retry2 = new RetryHandler({
|
|
9187
9187
|
...opts,
|
|
9188
9188
|
retryOptions: this.#options
|
|
9189
9189
|
}, {
|
|
9190
9190
|
dispatch: this.#agent.dispatch.bind(this.#agent),
|
|
9191
9191
|
handler
|
|
9192
9192
|
});
|
|
9193
|
-
return this.#agent.dispatch(opts,
|
|
9193
|
+
return this.#agent.dispatch(opts, retry2);
|
|
9194
9194
|
}
|
|
9195
9195
|
close() {
|
|
9196
9196
|
return this.#agent.close();
|
|
@@ -25297,12 +25297,60 @@ var postmanRepoSyncActionContract = {
|
|
|
25297
25297
|
}
|
|
25298
25298
|
};
|
|
25299
25299
|
|
|
25300
|
+
// src/lib/retry.ts
|
|
25301
|
+
function sleep(delayMs) {
|
|
25302
|
+
return new Promise((resolve3) => {
|
|
25303
|
+
setTimeout(resolve3, delayMs);
|
|
25304
|
+
});
|
|
25305
|
+
}
|
|
25306
|
+
function normalizeRetryOptions(options) {
|
|
25307
|
+
return {
|
|
25308
|
+
maxAttempts: Math.max(1, options.maxAttempts ?? 3),
|
|
25309
|
+
delayMs: Math.max(0, options.delayMs ?? 2e3),
|
|
25310
|
+
backoffMultiplier: Math.max(1, options.backoffMultiplier ?? 1),
|
|
25311
|
+
maxDelayMs: options.maxDelayMs === void 0 ? Number.POSITIVE_INFINITY : Math.max(0, options.maxDelayMs),
|
|
25312
|
+
onRetry: options.onRetry ?? (async () => void 0),
|
|
25313
|
+
shouldRetry: options.shouldRetry ?? (() => true),
|
|
25314
|
+
sleep: options.sleep ?? sleep
|
|
25315
|
+
};
|
|
25316
|
+
}
|
|
25317
|
+
async function retry(operation, options = {}) {
|
|
25318
|
+
const normalized = normalizeRetryOptions(options);
|
|
25319
|
+
let nextDelayMs = normalized.delayMs;
|
|
25320
|
+
for (let attempt = 1; attempt <= normalized.maxAttempts; attempt += 1) {
|
|
25321
|
+
try {
|
|
25322
|
+
return await operation();
|
|
25323
|
+
} catch (error2) {
|
|
25324
|
+
const shouldRetry = attempt < normalized.maxAttempts && normalized.shouldRetry(error2, {
|
|
25325
|
+
attempt,
|
|
25326
|
+
maxAttempts: normalized.maxAttempts
|
|
25327
|
+
});
|
|
25328
|
+
if (!shouldRetry) {
|
|
25329
|
+
throw error2;
|
|
25330
|
+
}
|
|
25331
|
+
await normalized.onRetry({
|
|
25332
|
+
attempt,
|
|
25333
|
+
maxAttempts: normalized.maxAttempts,
|
|
25334
|
+
delayMs: nextDelayMs,
|
|
25335
|
+
error: error2
|
|
25336
|
+
});
|
|
25337
|
+
await normalized.sleep(nextDelayMs);
|
|
25338
|
+
nextDelayMs = Math.min(
|
|
25339
|
+
normalized.maxDelayMs,
|
|
25340
|
+
Math.round(nextDelayMs * normalized.backoffMultiplier)
|
|
25341
|
+
);
|
|
25342
|
+
}
|
|
25343
|
+
}
|
|
25344
|
+
throw new Error("Retry exhausted without returning or throwing");
|
|
25345
|
+
}
|
|
25346
|
+
|
|
25300
25347
|
// src/lib/postman/postman-assets-client.ts
|
|
25301
25348
|
var PostmanAssetsClient = class {
|
|
25302
25349
|
apiKey;
|
|
25303
25350
|
baseUrl;
|
|
25304
25351
|
bifrostBaseUrl;
|
|
25305
25352
|
fetchImpl;
|
|
25353
|
+
retrySleep;
|
|
25306
25354
|
constructor(options) {
|
|
25307
25355
|
this.apiKey = String(options.apiKey || "").trim();
|
|
25308
25356
|
this.baseUrl = String(options.baseUrl || POSTMAN_ENDPOINT_PROFILES.prod.apiBaseUrl).replace(
|
|
@@ -25313,6 +25361,7 @@ var PostmanAssetsClient = class {
|
|
|
25313
25361
|
options.bifrostBaseUrl || POSTMAN_ENDPOINT_PROFILES.prod.bifrostBaseUrl
|
|
25314
25362
|
).replace(/\/+$/, "");
|
|
25315
25363
|
this.fetchImpl = options.fetchImpl ?? fetch;
|
|
25364
|
+
this.retrySleep = options.retrySleep;
|
|
25316
25365
|
void (options.secretMasker ?? createSecretMasker([this.apiKey]));
|
|
25317
25366
|
}
|
|
25318
25367
|
getBaseUrl() {
|
|
@@ -25376,9 +25425,34 @@ var PostmanAssetsClient = class {
|
|
|
25376
25425
|
})
|
|
25377
25426
|
});
|
|
25378
25427
|
}
|
|
25428
|
+
/**
|
|
25429
|
+
* Monitor and mock creation reference a collection that may have been
|
|
25430
|
+
* created moments earlier; the Postman backend is eventually consistent
|
|
25431
|
+
* and can reject the reference with a 400 "Unable to load collection"
|
|
25432
|
+
* until the collection becomes visible. Retry that specific 400 plus
|
|
25433
|
+
* generic transient statuses with backoff.
|
|
25434
|
+
*/
|
|
25435
|
+
async requestWithCollectionRetry(path8, init) {
|
|
25436
|
+
return retry(() => this.request(path8, init), {
|
|
25437
|
+
maxAttempts: 5,
|
|
25438
|
+
delayMs: 2e3,
|
|
25439
|
+
backoffMultiplier: 2,
|
|
25440
|
+
maxDelayMs: 15e3,
|
|
25441
|
+
...this.retrySleep ? { sleep: this.retrySleep } : {},
|
|
25442
|
+
shouldRetry: (error2) => {
|
|
25443
|
+
if (!(error2 instanceof HttpError)) {
|
|
25444
|
+
return false;
|
|
25445
|
+
}
|
|
25446
|
+
if (error2.status >= 500 || error2.status === 429) {
|
|
25447
|
+
return true;
|
|
25448
|
+
}
|
|
25449
|
+
return error2.status === 400 && /unable to load collection/i.test(error2.responseBody);
|
|
25450
|
+
}
|
|
25451
|
+
});
|
|
25452
|
+
}
|
|
25379
25453
|
async createMonitor(workspaceId, name, collectionUid, environmentUid, cronSchedule) {
|
|
25380
25454
|
const effectiveCron = cronSchedule && cronSchedule.trim() ? cronSchedule.trim() : "0 0 * * 0";
|
|
25381
|
-
const response = await this.
|
|
25455
|
+
const response = await this.requestWithCollectionRetry(`/monitors?workspace=${workspaceId}`, {
|
|
25382
25456
|
method: "POST",
|
|
25383
25457
|
body: JSON.stringify({
|
|
25384
25458
|
monitor: {
|
|
@@ -25408,7 +25482,7 @@ var PostmanAssetsClient = class {
|
|
|
25408
25482
|
return uid;
|
|
25409
25483
|
}
|
|
25410
25484
|
async createMock(workspaceId, name, collectionUid, environmentUid) {
|
|
25411
|
-
const response = await this.
|
|
25485
|
+
const response = await this.requestWithCollectionRetry(`/mocks?workspace=${workspaceId}`, {
|
|
25412
25486
|
method: "POST",
|
|
25413
25487
|
body: JSON.stringify({
|
|
25414
25488
|
mock: {
|