@unito/integrations-platform-client 0.45.0 → 0.46.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/src/api.d.ts CHANGED
@@ -281,7 +281,11 @@ export declare function deleteIntegration(integrationId: number, name: string, o
281
281
  /**
282
282
  * Get the events associated with this integration.
283
283
  */
284
- export declare function getIntegrationEvents(integrationId: number, opts?: Oazapfts.RequestOpts): Promise<Pagination & {
284
+ export declare function getIntegrationEvents(integrationId: number, { search, $from, limit, }?: {
285
+ search?: string;
286
+ $from?: number;
287
+ limit?: number;
288
+ }, opts?: Oazapfts.RequestOpts): Promise<Pagination & {
285
289
  /** The integration events. */
286
290
  data: IntegrationEvent[];
287
291
  }>;
package/dist/src/api.js CHANGED
@@ -108,8 +108,12 @@ export function deleteIntegration(integrationId, name, opts) {
108
108
  /**
109
109
  * Get the events associated with this integration.
110
110
  */
111
- export function getIntegrationEvents(integrationId, opts) {
112
- return oazapfts.ok(oazapfts.fetchJson(`/integrations/${encodeURIComponent(integrationId)}/events`, {
111
+ export function getIntegrationEvents(integrationId, { search, $from, limit, } = {}, opts) {
112
+ return oazapfts.ok(oazapfts.fetchJson(`/integrations/${encodeURIComponent(integrationId)}/events${QS.query(QS.explode({
113
+ search,
114
+ from: $from,
115
+ limit,
116
+ }))}`, {
113
117
  ...opts,
114
118
  }));
115
119
  }
@@ -17,7 +17,7 @@ function _interopNamespaceDefault(e) {
17
17
  });
18
18
  }
19
19
  n.default = e;
20
- return Object.freeze(n);
20
+ return n;
21
21
  }
22
22
 
23
23
  var Oazapfts__namespace = /*#__PURE__*/_interopNamespaceDefault(Oazapfts);
@@ -143,8 +143,12 @@ function deleteIntegration(integrationId, name, opts) {
143
143
  /**
144
144
  * Get the events associated with this integration.
145
145
  */
146
- function getIntegrationEvents(integrationId, opts) {
147
- return oazapfts.ok(oazapfts.fetchJson(`/integrations/${encodeURIComponent(integrationId)}/events`, {
146
+ function getIntegrationEvents(integrationId, { search, $from, limit, } = {}, opts) {
147
+ return oazapfts.ok(oazapfts.fetchJson(`/integrations/${encodeURIComponent(integrationId)}/events${QS__namespace.query(QS__namespace.explode({
148
+ search,
149
+ from: $from,
150
+ limit,
151
+ }))}`, {
148
152
  ...opts,
149
153
  }));
150
154
  }
@@ -427,7 +431,7 @@ function getHealthAlive(opts) {
427
431
  }));
428
432
  }
429
433
 
430
- var api = /*#__PURE__*/Object.freeze({
434
+ var api = {
431
435
  __proto__: null,
432
436
  HttpError: HttpError,
433
437
  createCredential: createCredential,
@@ -468,6 +472,6 @@ var api = /*#__PURE__*/Object.freeze({
468
472
  updateProfile: updateProfile,
469
473
  updateUser: updateUser,
470
474
  updateWebhookSubscription: updateWebhookSubscription
471
- });
475
+ };
472
476
 
473
477
  module.exports = api;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unito/integrations-platform-client",
3
- "version": "0.45.0",
3
+ "version": "0.46.1",
4
4
  "description": "The Unito Integrations Platform Client",
5
5
  "type": "module",
6
6
  "types": "./dist/src/index.d.ts",
@@ -23,11 +23,11 @@
23
23
  "prepare": "npm run compile",
24
24
  "lint": "eslint --fix src test --ext .ts && prettier --write src test",
25
25
  "compile:esm": "tsc",
26
- "compile:cjs": "rollup dist/src/index.js --file dist/src/index.cjs --format cjs",
26
+ "compile:cjs": "rollup dist/src/index.js --file dist/src/index.cjs --format cjs --no-freeze",
27
27
  "compile": "rm -rf dist && npm run compile:esm && npm run compile:cjs",
28
28
  "test": "NODE_ENV=test node --loader ts-node/esm --test ./test/*.test.ts",
29
29
  "test:debug": "NODE_ENV=test node --loader ts-node/esm --inspect-brk --test ./test/*.test.ts",
30
- "ci:test": "nyc npm run test"
30
+ "ci:test": "c8 npm run test"
31
31
  },
32
32
  "author": {
33
33
  "name": "Unito",
@@ -41,8 +41,8 @@
41
41
  "@types/sinon": "17.x",
42
42
  "@typescript-eslint/eslint-plugin": "6.x",
43
43
  "@typescript-eslint/parser": "6.x",
44
+ "c8": "9.x",
44
45
  "eslint": "8.x",
45
- "nyc": "15.x",
46
46
  "prettier": "3.x",
47
47
  "rollup": "4.x",
48
48
  "sinon": "17.x",