Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "returnless-create-return-order",
name: "Create Return Order",
description: "Create a return order. [See the documentation](https://docs.returnless.com/docs/api-rest-reference/1fce50b07484b-creates-a-return-order-from-a-return-order-intent)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "returnless-list-return-orders",
name: "List Return Orders",
description: "Retrieve a list of return orders. [See the documentation](https://docs.returnless.com/docs/api-rest-reference/0640e3c064cdc-list-all-return-orders)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import app from "../../returnless.app.mjs";

export default {
key: "returnless-list-return-statuses",
name: "List Return Statuses",
description: "List all return statuses. [See the documentation](https://docs.returnless.com/docs/api-rest-reference/6129c8f41f66f-list-all-return-statuses)",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
idempotentHint: true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the idempotentHint annotations meant to be included?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove it

},
type: "action",
props: {
app,
maxResults: {
propDefinition: [
app,
"maxResults",
],
},
},
async run({ $ }) {
const resources = await this.app.listReturnStatuses({
$,
});

$.export("$summary", `Successfully retrieved ${resources.length} return status(es)`);
return resources.data;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "returnless-list-sales-order-items",
name: "List Sales Order Items",
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)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "returnless-list-sales-orders",
name: "List Sales Orders",
description: "Retrieve a list of sales orders sorted by creation date, with the most recent sales orders appearing first. [See the documentation](https://docs.returnless.com/docs/api-rest-reference/ce6a0e3d66378-list-all-sales-orders)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import app from "../../returnless.app.mjs";

export default {
key: "returnless-list-shipments-of-return-order",
name: "List Shipments of Return Order",
description: "List all shipments of a return order. [See the documentation](https://docs.returnless.com/docs/api-rest-reference/1e0748fdd876f-list-all-shipments-of-a-return-order)",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
idempotentHint: true,
},
type: "action",
props: {
app,
returnOrderId: {
propDefinition: [
app,
"returnOrderId",
],
},
maxResults: {
propDefinition: [
app,
"maxResults",
],
},
},
async run({ $ }) {
const resources = await this.app.getPaginatedResources({
fn: this.app.listReturnOrderShipments,
args: {
returnOrderId: this.returnOrderId,
},
max: this.maxResults,
});

$.export("$summary", `Successfully retrieved ${resources.length} shipment(s) for return order ${this.returnOrderId}`);
return resources;
},
};
33 changes: 33 additions & 0 deletions components/returnless/actions/list-shipments/list-shipments.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import app from "../../returnless.app.mjs";

export default {
key: "returnless-list-shipments",
name: "List Shipments",
description: "List all shipments. [See the documentation](https://docs.returnless.com/docs/api-rest-reference/7daf3fa2c9bf9-list-all-shipments)",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
idempotentHint: true,
},
type: "action",
props: {
app,
maxResults: {
propDefinition: [
app,
"maxResults",
],
},
},
async run({ $ }) {
const resources = await this.app.getPaginatedResources({
fn: this.app.listShipments,
max: this.maxResults,
});

$.export("$summary", `Successfully retrieved ${resources.length} shipment(s)`);
return resources;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import app from "../../returnless.app.mjs";

export default {
key: "returnless-list-statuses-of-shipment",
name: "List Statuses of Shipment",
description: "List all statuses of a shipment. [See the documentation](https://docs.returnless.com/docs/api-rest-reference/e274dab430bb7-list-all-statuses-of-a-shipment)",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
idempotentHint: true,
},
type: "action",
props: {
app,
shipmentId: {
propDefinition: [
app,
"shipmentId",
],
},
},
async run({ $ }) {
const { data } = await this.app.listShipmentStatuses({
$,
shipmentId: this.shipmentId,
});

$.export("$summary", `Successfully retrieved ${data.length} status(es) for shipment ${this.shipmentId}`);
return data;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import app from "../../returnless.app.mjs";

export default {
key: "returnless-retrieve-return-address",
name: "Retrieve Return Address",
description: "Retrieve a return address. [See the documentation](https://docs.returnless.com/docs/api-rest-reference/b702161eed54f-retrieve-a-return-address)",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
idempotentHint: true,
},
type: "action",
props: {
app,
returnAddressId: {
propDefinition: [
app,
"returnAddressId",
],
},
},
async run({ $ }) {
const { data } = await this.app.getReturnAddress({
$,
returnAddressId: this.returnAddressId,
});

$.export("$summary", `Successfully retrieved return address ${this.returnAddressId}`);
return data;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import app from "../../returnless.app.mjs";

export default {
key: "returnless-retrieve-return-order",
name: "Retrieve Return Order",
description: "Retrieve a return order. [See the documentation](https://docs.returnless.com/docs/api-rest-reference/f670282943eae-retrieve-a-return-order)",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
idempotentHint: true,
},
type: "action",
props: {
app,
returnOrderId: {
propDefinition: [
app,
"returnOrderId",
],
},
},
async run({ $ }) {
const { data } = await this.app.getReturnOrder({
$,
returnOrderId: this.returnOrderId,
});

$.export("$summary", `Successfully retrieved return order ${this.returnOrderId}`);
return data;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import app from "../../returnless.app.mjs";

export default {
key: "returnless-retrieve-return-status",
name: "Retrieve Return Status",
description: "Retrieve a return status. [See the documentation](https://docs.returnless.com/docs/api-rest-reference/ba30f75e2c5fd-retrieve-a-return-status)",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
idempotentHint: true,
},
type: "action",
props: {
app,
returnStatusId: {
propDefinition: [
app,
"returnStatusId",
],
},
},
async run({ $ }) {
const { data } = await this.app.getReturnStatus({
$,
returnStatusId: this.returnStatusId,
});

$.export("$summary", `Successfully retrieved return status ${this.returnStatusId}`);
return data;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import app from "../../returnless.app.mjs";

export default {
key: "returnless-retrieve-sales-order",
name: "Retrieve Sales Order",
description: "Retrieve a sales order. [See the documentation](https://docs.returnless.com/docs/api-rest-reference/4a6a8fe812c44-retrieve-a-sales-order)",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
idempotentHint: true,
},
type: "action",
props: {
app,
orderId: {
propDefinition: [
app,
"orderId",
],
},
},
async run({ $ }) {
const { data } = await this.app.getOrder({
$,
orderId: this.orderId,
});

$.export("$summary", `Successfully retrieved sales order ${this.orderId}`);
return data;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import app from "../../returnless.app.mjs";

export default {
key: "returnless-retrieve-shipment",
name: "Retrieve Shipment",
description: "Retrieve a shipment. [See the documentation](https://docs.returnless.com/docs/api-rest-reference/8add0ab769032-retrieve-a-shipment)",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
idempotentHint: true,
},
type: "action",
props: {
app,
shipmentId: {
propDefinition: [
app,
"shipmentId",
],
},
},
async run({ $ }) {
const { data } = await this.app.getShipment({
$,
shipmentId: this.shipmentId,
});

$.export("$summary", `Successfully retrieved shipment ${this.shipmentId}`);
return data;
},
};
Loading
Loading