@forge/events
Advanced tools
Comparing version 0.1.0-next.1 to 0.1.0-next.2
# @forge/events | ||
## 0.1.0-next.2 | ||
### Minor Changes | ||
- 0831a0a: export queue errors and rename queue param "queueName" to "key" | ||
## 0.1.0-next.1 | ||
@@ -4,0 +10,0 @@ |
@@ -13,3 +13,3 @@ "use strict"; | ||
}; | ||
const getQueue = (apiClientMock, queueName) => new queue_1.Queue({ queueName: queueName }, apiClientMock); | ||
const getQueue = (apiClientMock, queueName) => new queue_1.Queue({ key: queueName }, apiClientMock); | ||
const verifyApiClientCalledWith = (apiClientMock, payloads, name) => { | ||
@@ -16,0 +16,0 @@ expect(apiClientMock).toHaveBeenCalledWith('/webhook/queue/publish/{cloudId}/{environmentId}/{appId}/{appVersion}', expect.objectContaining({ |
export { Queue } from './queue'; | ||
export { InvalidQueueNameError, TooManyEventsError, PayloadTooBigError, NoEventsToPushError, RateLimitError, PartialSuccessError, InternalServerError } from './errors'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -5,1 +5,9 @@ "use strict"; | ||
Object.defineProperty(exports, "Queue", { enumerable: true, get: function () { return queue_1.Queue; } }); | ||
var errors_1 = require("./errors"); | ||
Object.defineProperty(exports, "InvalidQueueNameError", { enumerable: true, get: function () { return errors_1.InvalidQueueNameError; } }); | ||
Object.defineProperty(exports, "TooManyEventsError", { enumerable: true, get: function () { return errors_1.TooManyEventsError; } }); | ||
Object.defineProperty(exports, "PayloadTooBigError", { enumerable: true, get: function () { return errors_1.PayloadTooBigError; } }); | ||
Object.defineProperty(exports, "NoEventsToPushError", { enumerable: true, get: function () { return errors_1.NoEventsToPushError; } }); | ||
Object.defineProperty(exports, "RateLimitError", { enumerable: true, get: function () { return errors_1.RateLimitError; } }); | ||
Object.defineProperty(exports, "PartialSuccessError", { enumerable: true, get: function () { return errors_1.PartialSuccessError; } }); | ||
Object.defineProperty(exports, "InternalServerError", { enumerable: true, get: function () { return errors_1.InternalServerError; } }); |
@@ -12,3 +12,3 @@ "use strict"; | ||
constructor(queueParams, apiClient) { | ||
validators_1.validateQueueName(queueParams.queueName); | ||
validators_1.validateQueueName(queueParams.key); | ||
this.queueParams = queueParams; | ||
@@ -21,3 +21,3 @@ this.apiClient = apiClient || global.api.asApp().__requestAtlassian; | ||
payload: Array.isArray(payloads) ? payloads : [payloads], | ||
queueName: this.queueParams.queueName, | ||
queueName: this.queueParams.key, | ||
schema: 'ari:cloud:ecosystem::forge/app-event', | ||
@@ -24,0 +24,0 @@ type: 'avi:forge:app:event' |
@@ -8,3 +8,3 @@ import { RequestInit, Response } from 'node-fetch'; | ||
export interface QueueParams { | ||
queueName: string; | ||
key: string; | ||
} | ||
@@ -11,0 +11,0 @@ export interface PushBodyParams { |
{ | ||
"name": "@forge/events", | ||
"version": "0.1.0-next.1", | ||
"version": "0.1.0-next.2", | ||
"description": "Forge Async Event methods", | ||
@@ -5,0 +5,0 @@ "author": "Atlassian", |
@@ -22,3 +22,3 @@ import { Queue } from '../queue'; | ||
const getQueue = (apiClientMock: any, queueName: string) => new Queue({ queueName: queueName }, apiClientMock); | ||
const getQueue = (apiClientMock: any, queueName: string) => new Queue({ key: queueName }, apiClientMock); | ||
@@ -25,0 +25,0 @@ const verifyApiClientCalledWith = (apiClientMock: jest.Mock, payloads: Payload | Payload[], name: string) => { |
export { Queue } from './queue'; | ||
export { | ||
InvalidQueueNameError, | ||
TooManyEventsError, | ||
PayloadTooBigError, | ||
NoEventsToPushError, | ||
RateLimitError, | ||
PartialSuccessError, | ||
InternalServerError | ||
} from './errors'; |
@@ -15,3 +15,3 @@ import { getPushBody, PUSH_PATH } from './queries'; | ||
constructor(queueParams: QueueParams, apiClient?: FetchMethod) { | ||
validateQueueName(queueParams.queueName); | ||
validateQueueName(queueParams.key); | ||
this.queueParams = queueParams; | ||
@@ -26,3 +26,3 @@ this.apiClient = apiClient || (global as any).api.asApp().__requestAtlassian; | ||
payload: Array.isArray(payloads) ? payloads : [payloads], | ||
queueName: this.queueParams.queueName, | ||
queueName: this.queueParams.key, | ||
schema: 'ari:cloud:ecosystem::forge/app-event', | ||
@@ -29,0 +29,0 @@ type: 'avi:forge:app:event' |
@@ -8,3 +8,3 @@ import { RequestInit, Response } from 'node-fetch'; | ||
export interface QueueParams { | ||
queueName: string; | ||
key: string; | ||
} | ||
@@ -11,0 +11,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
81944
710
0