@frogbotai/piece-date-helper 0.5.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 FrogBot
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,24 @@
1
+ import { type PieceFactoryConfig } from "frogbot/pieces";
2
+ export declare const dateHelperActions: readonly ["get_current_date", "format_date", "add_subtract_date", "date_difference", "extract_date_parts", "next_day_of_week", "next_day_of_year", "first_day_of_previous_month", "last_day_of_previous_month"];
3
+ export declare const dateHelperScopes: readonly [];
4
+ export declare function createDateHelper(config?: PieceFactoryConfig): import("frogbot/pieces").Piece & {
5
+ /** Get Current Date: Get the current date */
6
+ getCurrentDate: import("node_modules/frogbot/dist/types/tool").AnyTool;
7
+ /** Format Date: Converts a date from one format to another */
8
+ formatDate: import("node_modules/frogbot/dist/types/tool").AnyTool;
9
+ /** Extract Date Units: Extract date units ( year , month , day , hour , minute , second , day of week , month name ) from a date */
10
+ extractDateParts: import("node_modules/frogbot/dist/types/tool").AnyTool;
11
+ /** Date Difference: Get the difference between two dates */
12
+ dateDifference: import("node_modules/frogbot/dist/types/tool").AnyTool;
13
+ /** Add/Subtract Time: Add or subtract time from a date */
14
+ addSubtractDate: import("node_modules/frogbot/dist/types/tool").AnyTool;
15
+ /** Next Day of Week: Get the date and time of the next day of the week */
16
+ nextDayOfWeek: import("node_modules/frogbot/dist/types/tool").AnyTool;
17
+ /** Next Day of Year: Get the date and time of the next day of the year */
18
+ nextDayOfYear: import("node_modules/frogbot/dist/types/tool").AnyTool;
19
+ /** First Day of Previous Month: Get the date and time of the first day of the previous month */
20
+ firstDayOfPreviousMonth: import("node_modules/frogbot/dist/types/tool").AnyTool;
21
+ /** Last Day of Previous Month: Get the date and time of the last day of the previous month */
22
+ lastDayOfPreviousMonth: import("node_modules/frogbot/dist/types/tool").AnyTool;
23
+ };
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAElF,eAAO,MAAM,iBAAiB,iNAAkN,CAAC;AACjP,eAAO,MAAM,gBAAgB,aAAc,CAAC;AAE5C,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE,kBAAkB;IAUxD,6CAA6C;;IAE7C,8DAA8D;;IAE9D,oIAAoI;;IAEpI,4DAA4D;;IAE5D,0DAA0D;;IAE1D,0EAA0E;;IAE1E,0EAA0E;;IAE1E,gGAAgG;;IAEhG,8FAA8F;;EAGjG"}
package/dist/index.js ADDED
@@ -0,0 +1,35 @@
1
+ import * as module from '@activepieces/piece-date-helper';
2
+ import { createActivepiecesPiece } from "frogbot/pieces";
3
+ export const dateHelperActions = ['get_current_date', 'format_date', 'add_subtract_date', 'date_difference', 'extract_date_parts', 'next_day_of_week', 'next_day_of_year', 'first_day_of_previous_month', 'last_day_of_previous_month'];
4
+ export const dateHelperScopes = [];
5
+ export function createDateHelper(config) {
6
+ const piece = createActivepiecesPiece({
7
+ module: module,
8
+ service: "date_helper",
9
+ credentialType: "none",
10
+ defaultActions: dateHelperActions,
11
+ scopes: dateHelperScopes,
12
+ config,
13
+ });
14
+ return Object.assign(piece, {
15
+ /** Get Current Date: Get the current date */
16
+ getCurrentDate: piece.tool("get_current_date"),
17
+ /** Format Date: Converts a date from one format to another */
18
+ formatDate: piece.tool("format_date"),
19
+ /** Extract Date Units: Extract date units ( year , month , day , hour , minute , second , day of week , month name ) from a date */
20
+ extractDateParts: piece.tool("extract_date_parts"),
21
+ /** Date Difference: Get the difference between two dates */
22
+ dateDifference: piece.tool("date_difference"),
23
+ /** Add/Subtract Time: Add or subtract time from a date */
24
+ addSubtractDate: piece.tool("add_subtract_date"),
25
+ /** Next Day of Week: Get the date and time of the next day of the week */
26
+ nextDayOfWeek: piece.tool("next_day_of_week"),
27
+ /** Next Day of Year: Get the date and time of the next day of the year */
28
+ nextDayOfYear: piece.tool("next_day_of_year"),
29
+ /** First Day of Previous Month: Get the date and time of the first day of the previous month */
30
+ firstDayOfPreviousMonth: piece.tool("first_day_of_previous_month"),
31
+ /** Last Day of Previous Month: Get the date and time of the last day of the previous month */
32
+ lastDayOfPreviousMonth: piece.tool("last_day_of_previous_month"),
33
+ });
34
+ }
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAA2B,MAAM,gBAAgB,CAAC;AAElF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,kBAAkB,EAAE,aAAa,EAAE,mBAAmB,EAAE,iBAAiB,EA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 "author": "Colby Gilbert",
7
+ "type": "module",
8
+ "main": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/index.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "sideEffects": false,
21
+ "dependencies": {
22
+ "@activepieces/piece-date-helper": "0.1.28"
23
+ },
24
+ "peerDependencies": {
25
+ "frogbot": "0.5.0"
26
+ },
27
+ "devDependencies": {
28
+ "typescript": "5.6.2",
29
+ "frogbot": "0.5.0"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "scripts": {
35
+ "build": "tsc -p tsconfig.json",
36
+ "clean": "rm -rf dist",
37
+ "typecheck": "tsc --noEmit"
38
+ }
39
+ }