@pipedream/zendesk 0.8.0 → 0.8.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.
@@ -5,7 +5,7 @@ export default {
5
5
  name: "Search Tickets",
6
6
  description: "Searches for tickets using Zendesk's search API. [See the documentation](https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/#search-tickets).",
7
7
  type: "action",
8
- version: "0.0.4",
8
+ version: "0.0.5",
9
9
  props: {
10
10
  app,
11
11
  query: {
@@ -37,6 +37,13 @@ export default {
37
37
  "customSubdomain",
38
38
  ],
39
39
  },
40
+ page: {
41
+ type: "integer",
42
+ label: "Page",
43
+ description: "The page number to retrieve. Default is 1.",
44
+ default: 1,
45
+ optional: true,
46
+ },
40
47
  },
41
48
  async run({ $: step }) {
42
49
  const {
@@ -47,28 +54,20 @@ export default {
47
54
  customSubdomain,
48
55
  } = this;
49
56
 
50
- const results = this.app.paginate({
51
- fn: this.app.searchTickets,
52
- args: {
53
- step,
54
- customSubdomain,
55
- params: {
56
- query,
57
- sort_by: sortBy,
58
- sort_order: sortOrder,
59
- },
57
+ const results = await this.app.searchTickets({
58
+ step,
59
+ customSubdomain,
60
+ params: {
61
+ query,
62
+ sort_by: sortBy,
63
+ sort_order: sortOrder,
64
+ per_page: limit,
65
+ page: this.page,
60
66
  },
61
- resourceKey: "results",
62
- max: limit,
63
67
  });
64
68
 
65
- const tickets = [];
66
- for await (const ticket of results) {
67
- tickets.push(ticket);
68
- }
69
-
70
- step.export("$summary", `Successfully found ${tickets.length} tickets matching the search query`);
69
+ step.export("$summary", "Successfully retrieved tickets matching the search query");
71
70
 
72
- return tickets;
71
+ return results;
73
72
  },
74
73
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/zendesk",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Pipedream Zendesk Components",
5
5
  "main": "zendesk.app.mjs",
6
6
  "keywords": [