Skip to content

Commit dbeb0b9

Browse files
seynadioclaude
andauthored
Merging pull request #18276
* Add list sales order items action to Returnless integration - New action component to retrieve items from specific sales orders - Implements cursor-based pagination using existing app methods - Follows existing patterns from list-sales-orders action - Uses orderId and maxResults prop definitions from app file - Increment package version from 0.1.0 to 0.1.1 Features: - Lists all items for a given sales order ID - Supports pagination with configurable max results - Returns structured item data with id, external_id, quantity, amounts - Includes helpful summary with item count and order ID 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * Fix linting error: add required newline at end of file - Add missing newline at end of list-sales-order-items.mjs - Resolves 'Newline required at end of file but not found' lint error * Remove unrelated zendesk learning docs from returnless PR - Remove .claude/zendesk-assignee-learnings.md that was accidentally included - Keep only returnless-related changes in this PR --------- Co-authored-by: Claude <[email protected]>
1 parent a08f3ca commit dbeb0b9

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import returnless from "../../returnless.app.mjs";
2+
3+
export default {
4+
key: "returnless-list-sales-order-items",
5+
name: "List Sales Order Items",
6+
description: "Retrieve all items from a specific sales order with cursor-based pagination support. [See the documentation](https://docs.returnless.com/docs/api-rest-reference/6b3c26dad0434-list-all-items-of-a-sales-order)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
returnless,
11+
orderId: {
12+
propDefinition: [
13+
returnless,
14+
"orderId",
15+
],
16+
},
17+
maxResults: {
18+
propDefinition: [
19+
returnless,
20+
"maxResults",
21+
],
22+
},
23+
},
24+
async run({ $ }) {
25+
const salesOrderItems = await this.returnless.getPaginatedResources({
26+
fn: this.returnless.listSalesOrderItems,
27+
args: {
28+
$,
29+
orderId: this.orderId,
30+
},
31+
max: this.maxResults,
32+
});
33+
34+
$.export("$summary", `Retrieved ${salesOrderItems.length} sales order item${salesOrderItems.length === 1
35+
? ""
36+
: "s"} from order ${this.orderId}`);
37+
return salesOrderItems;
38+
},
39+
};

components/returnless/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/returnless",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Pipedream Returnless Components",
55
"main": "returnless.app.mjs",
66
"keywords": [

0 commit comments

Comments
 (0)